tdem-web-sdk 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/lib/packages/core/src/core.d.ts +22 -1
- package/lib/packages/core/src/index.d.ts +1 -1
- package/lib/packages/core/src/interface/event.d.ts +203 -6
- package/lib/packages/core/src/interface/index.d.ts +1 -1
- package/lib/packages/core/src/util/cgi-classify.d.ts +20 -0
- package/lib/packages/core/src/util/index.d.ts +2 -0
- package/lib/packages/web-sdk/src/index.d.ts +1 -1
- package/lib/packages/web-sdk/src/interface/index.d.ts +44 -0
- package/lib/packages/web-sdk/src/plugins/blank-screen/constant.d.ts +25 -0
- package/lib/packages/web-sdk/src/plugins/blank-screen/index.d.ts +10 -0
- package/lib/packages/web-sdk/src/plugins/blank-screen/utils.d.ts +40 -0
- package/lib/packages/web-sdk/src/plugins/index.d.ts +4 -1
- package/lib/packages/web-sdk/src/plugins/lag-monitor.d.ts +18 -0
- package/lib/packages/web-sdk/src/plugins/memory-monitor.d.ts +21 -0
- package/lib/packages/web-sdk/src/util/start-time-observer-guard.d.ts +8 -0
- package/lib/tdem.f.min.js +3 -3
- package/lib/tdem.global.min.js +3 -3
- package/lib/tdem.ie.min.js +3 -3
- package/lib/tdem.min.js +3 -3
- package/package.json +1 -1
package/lib/tdem.ie.min.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ===========================================================================
|
|
3
|
-
* tdem-web-sdk@1.0.
|
|
3
|
+
* tdem-web-sdk@1.0.10 (c) 2026 TencentCloud Real User Monitoring.
|
|
4
4
|
* Author pumpkincai.
|
|
5
|
-
* Last Release Time
|
|
5
|
+
* Last Release Time Fri Sep 04 2026 10:32:25 GMT+0800 (China Standard Time).
|
|
6
6
|
* Released under the MIT License.
|
|
7
7
|
* Thanks for supporting TDEM!
|
|
8
8
|
* ===========================================================================
|
|
9
9
|
**/
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TDEM=t()}(this,function(){"use strict";function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function P(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function i(e){w(r,t,n,i,o,"next",e)}function o(e){w(r,t,n,i,o,"throw",e)}i(void 0)})}}function v(e,t,n){t=F(t);var r=e,e=j()?Reflect.construct(t,n||[],F(e).constructor):t.apply(e,n);if(!e||"object"!=typeof e&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(e,t,n){var r;return j()?Reflect.construct.apply(null,arguments):((r=[null]).push.apply(r,t),t=new(e.bind.apply(e,r)),n&&V(t,n.prototype),t)}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,J(r.key),r)}}function k(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Me(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return i=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){i=!0,n=e},f:function(){try{r||null==a["return"]||a["return"]()}finally{if(i)throw n}}};if(Array.isArray(e)||(a=$(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function D(e,t,n){return(t=J(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(){return(N="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=F(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(null,arguments)}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function U(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}function z(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Ae(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach(function(e){D(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function B(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};var n,r={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),o=0;o<i.length;o++)n=i[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function W(){var p,m,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var i,o,a,s,u,l,c,f,d,t=t&&t.prototype instanceof v?t:v,t=Object.create(t.prototype);return H(t,"_invoke",(i=e,o=n,c=r||[],f=!1,d={p:l=0,n:0,v:p,a:h,f:h.bind(p,4),d:function(e,t){return a=e,s=0,u=p,d.n=t,g}},function(e,t,n){if(1<l)throw TypeError("Generator is already running");for(f&&1===t&&h(t,n),s=t,u=n;(m=s<2?p:u)||!f;){a||(s?s<3?(1<s&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,a){if(m=a[e=s?e:"next"]){if(!(m=m.call(a,u)))throw TypeError("iterator result is not an object");if(!m.done)return m;u=m.value,s<2&&(s=0)}else 1===s&&(m=a["return"])&&m.call(a),s<2&&(u=TypeError("The iterator does not provide a '"+e+"' method"),s=1);a=p}else if((m=(f=d.n<0)?u:i.call(o,d))!==g)break}catch(m){a=p,s=1,u=m}finally{l=1}}return{value:m,done:f}}),!0),t;function h(e,t){for(s=e,u=t,m=0;!f&&l&&!n&&m<c.length;m++){var n,r=c[m],i=d.p,o=r[2];3<e?(n=o===t)&&(u=r[(s=r[4])?5:s=3],r[4]=r[5]=p):r[0]<=i&&((n=e<2&&i<r[1])?(s=0,d.v=t,d.n=r[1]):i<o&&(n=e<3||r[0]>t||o<t)&&(r[4]=e,r[5]=t,d.n=o,s=0))}if(n||1<e)return g;throw f=!0,t}}var g={};function v(){}function i(){}function o(){}m=Object.getPrototypeOf;var e=[][t]?m(m([][t]())):(H(m={},t,function(){return this}),m),a=o.prototype=v.prototype=Object.create(e);function s(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,H(e,n,"GeneratorFunction")),e.prototype=Object.create(a),e}return H(a,"constructor",i.prototype=o),H(o,"constructor",i),H(o,n,i.displayName="GeneratorFunction"),H(a),H(a,n,"Generator"),H(a,t,function(){return this}),H(a,"toString",function(){return"[object Generator]"}),(W=function(){return{w:r,m:s}})()}function H(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(H=function(e,t,n,r){function i(t,n){H(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))})(e,t,n,r)}function q(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function V(e,t){return(V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function De(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n["return"]&&(a=n["return"](),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||$(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t,n,r){var i=N(F(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ne(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}()||$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e){e=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);e=t.call(e,"string");if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(e);return"symbol"==typeof e?e:e+""}function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $(e,t){var n;if(e)return"string"==typeof e?u(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}function Z(e){var n="function"==typeof Map?new Map:void 0;return(Z=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(T_){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return Le(e,arguments,F(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),V(t,e)})(e)}var O,g=function(e){try{return!!e()}catch(w){return!0}},K=void 0,y=((O=void 0)({target:"Array",stat:!0},{isArray:K}),void 0),Y=y({}.toString),Q=y("".slice),ee=function(e){return Q(Y(e),8,-1)},te=(Array.isArray,"object"==("undefined"==typeof document?"undefined":S(document))&&document.all),_=void 0===te&&te!==undefined?function(e){return"function"==typeof e||e===te}:function(e){return"function"==typeof e},R=function(e){return"object"==S(e)?null!==e:_(e)},ne=function(e){return null===e||e===undefined},re=TypeError,ie=function(e){if(ne(e))throw new re("Can't call method on "+e);return e},oe=Object,ae=function(e){return oe(ie(e))},se=void 0,ue=(O({target:"Math",stat:!0},{trunc:se}),Math.ceil,function(e){e=+e;return e!=e||0==e?0:se(e)}),le=Math.min,ce=function(e){e=ue(e);return 0<e?le(e,9007199254740991):0},fe=function(e){return ce(e.length)},de=TypeError,he=function(e){if(9007199254740991<e)throw new de("Maximum allowed index exceeded");return e},x=void 0,pe=x.document,me=R(pe)&&R(pe.createElement),ge=function(e){return me?pe.createElement(e):{}},d=void 0,e=(d||g(function(){return 7!==Object.defineProperty(ge("div"),"a",{get:function(){return 7}}).a}),d&&g(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})),ve=String,ye=TypeError,E=function(e){if(R(e))return e;throw new ye(ve(e)+" is not an object")},we=!g(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),be=Function.prototype.call,I=we?be.bind(be):function(){return be.apply(be,arguments)},ke=function(e,t){return arguments.length<2?(n=x[e],_(n)?n:undefined):x[e]&&x[e][t];var n},Se=y({}.isPrototypeOf),_e=String,Ee=function(e){try{return _e(e)}catch(w){return"Object"}},Ce=TypeError,Oe=function(e){if(_(e))return e;throw new Ce(Ee(e)+" is not a function")},Re=void 0,xe=!g(function(){Reflect.apply(function(){})}),xe=(O({target:"Reflect",stat:!0,forced:xe},{apply:function(e,t,n){return Re(Oe(e),t,E(n))}}),Function.prototype),Ie=xe.apply,xe=xe.call,Te=("object"==("undefined"==typeof Reflect?"undefined":S(Reflect))&&Reflect.apply||we&&xe.bind(Ie),y({}.hasOwnProperty)),T=Object.hasOwn||function(e,t){return Te(ae(e),t)},Ie=Function.prototype,xe=d&&Object.getOwnPropertyDescriptor,Fe=T(Ie,"name"),Ue={EXISTS:Fe,PROPER:Fe&&"something"===function(){}.name,CONFIGURABLE:Fe&&(!d||xe(Ie,"name").configurable)},Fe=function(e,t){var n=[][e];return!!n&&g(function(){n.call(null,t||function(){return 1},1)})},je=void 0,ze=void 0,Be=y([].join),Ie=je!==Object||!Fe("join",","),xe=(O({target:"Array",proto:!0,forced:Ie},{join:function(e){return Be(ze(this),e===undefined?",":e)}}),"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});function We(e,t,n){return e(n={path:t,exports:{},require:function(e,t){throw t!==undefined&&null!==t||n.path,new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}},n.exports),n.exports}var He=Object.defineProperty,qe=function(e,t){try{He(x,e,{value:t,configurable:!0,writable:!0})}catch(P){x[e]=t}return t},Ve=We(function(e){e=e.exports=x["__core-js_shared__"]||qe("__core-js_shared__",{});(e.versions||(e.versions=[])).push({version:"3.50.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),Ge=y(Function.toString);_(Ve.inspectSource)||(Ve.inspectSource=function(e){return Ge(e)});var Je,$e=Ve.inspectSource,Ze=void 0,Ke=Ze("toStringTag"),Ye=Object,Xe="Arguments"===ee(function(){return arguments}()),Qe=function(e){var n,t;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(e=Ye(e),Ke))?n:Xe?ee(e):"Object"===(t=ee(e))&&_(e.callee)?"Arguments":t},et=String,C=function(e){if("Symbol"===Qe(e))throw new TypeError("Cannot convert a Symbol value to a string");return et(e)},Ie=(Je=!1,(Ie=/[ac]/).exec=function(){return Je=!0,/./.exec.apply(this,arguments)},!0===Ie.test("abc")&&Je),tt=/./.test,Ie=(O({target:"RegExp",proto:!0,forced:!Ie},{test:function(e){var t=E(this),e=C(e),n=t.exec;return _(n)?null!==(n=I(n,t,e))&&(E(n),!0):I(tt,t,e)}}),x.WeakMap),Ie=_(Ie)&&/native code/.test(String(Ie)),nt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},rt=void 0,it=d?function(e,t,n){return rt.f(e,t,nt(1,n))}:function(e,t,n){return e[t]=n,e},ot=void 0,at=ot.f,st=(O({target:"Object",stat:!0,forced:Object.defineProperties!==at,sham:!d},{defineProperties:at}),void 0),at=g(function(){st(1)}),at=(O({target:"Object",stat:!0,forced:at},{keys:function(e){return st(ae(e))}}),function(e){if("Function"===ee(e))return y(e)}),ut=Math.max,lt=Math.min,ct=function(e,t){e=ue(e);return e<0?ut(e+t,0):lt(e,t)},t=function(s){return function(e,t,n){var r=ze(e),i=fe(r);if(0!==i){var o,a=ct(n,i);if(s&&t!=t){for(;a<i;)if((o=r[a++])!=o)return!0}else for(;a<i;a++)if((s||a in r)&&r[a]===t)return s||a||0}return!s&&-1}},t={includes:t(!0),indexOf:t(!1)},ft=t.indexOf,dt=at([].indexOf),ht=!!dt&&1/dt([1],1,-0)<0,n=ht||!Fe("indexOf");O({target:"Array",proto:!0,forced:n},{indexOf:function(e){var t=1<arguments.length?arguments[1]:undefined;return ht?dt(this,e,t)||0:ft(this,e,t)}});var pt,mt={},gt=(y([].push),["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),vt=(Object.keys,d&&!e&&Object.defineProperties,ke("document","documentElement")),n=void 0,yt=n("IE_PROTO"),wt=function(){},bt=function(e){return"<script>"+e+"<\/script>"},kt=function(e){e.write(bt("")),e.close();var t=e.parentWindow.Object;return e=null,t},St=function(){try{pt=new ActiveXObject("htmlfile")}catch(v){}var e;St="undefined"==typeof document||document.domain&&pt?kt(pt):((e=ge("iframe")).style.display="none",vt.appendChild(e),e.src=String("javascript:"),(e=e.contentWindow.document).open(),e.write(bt("document.F=Object")),e.close(),e.F);for(var t=gt.length;t--;)delete St.prototype[gt[t]];return St()},_t=(mt[yt]=!0,Object.create||function(e,t){var n;return null!==e?(wt.prototype=E(e),n=new wt,wt.prototype=null,n[yt]=e):n=St(),t===undefined?n:ot.f(n,t)});O({target:"Object",stat:!0,sham:!d},{create:_t});var Et,Ct,Ot,Rt,xt=Object.create||Object,e=function(e,t){return Ve[e]||(Ve[e]=t||xt(null))},It=0,Tt=Math.random(),Mt=y(1.1.toString),At=function(e){return"Symbol("+(e===undefined?"":e)+")_"+Mt(++It+Tt,36)},Pt=(e("keys"),x.TypeError),Lt=x.WeakMap,Dt=Ie||Ve.state?((Ot=Ve.state||(Ve.state=new Lt)).get=Ot.get,Ot.has=Ot.has,Ot.set=Ot.set,Et=function(e,t){if(Ot.has(e))throw new Pt("Object already initialized");return t.facade=e,Ot.set(e,t),t},Ct=function(e){return Ot.get(e)||{}},function(e){return Ot.has(e)}):(Rt=n("state"),mt[Rt]=!0,Et=function(e,t){if(T(e,Rt))throw new Pt("Object already initialized");return t.facade=e,it(e,Rt,t),t},Ct=function(e){return T(e,Rt)?e[Rt]:{}},function(e){return T(e,Rt)}),Nt={set:Et,get:Ct,has:Dt,enforce:function(e){return Dt(e)?Ct(e):Et(e,{})},getterFor:function(t){return function(e){if(R(e)&&(e=Ct(e)).type===t)return e;throw new Pt("Incompatible receiver, "+t+" required")}}},Ft=We(function(e){var r=Ue.CONFIGURABLE,i=Nt.enforce,t=Nt.get,o=String,a=Object.defineProperty,s=y("".slice),u=y("".replace),l=y([].join),c=d&&!g(function(){return 8!==a(function(){},"length",{value:8}).length}),f=String(String).split("String"),e=e.exports=function(e,t,n){"Symbol("===s(o(t),0,7)&&(t="["+u(o(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!T(e,"name")||r&&e.name!==t)&&(d?a(e,"name",{value:t,configurable:!0}):e.name=t),c&&n&&T(n,"arity")&&e.length!==n.arity&&a(e,"length",{value:n.arity});try{n&&T(n,"constructor")&&n.constructor?d&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=undefined)}catch(j){}n=i(e);return T(n,"source")||(n.source=l(f,"string"==typeof t?t:"")),e};Function.prototype.toString=e(function(){return _(this)&&t(this).source||$e(this)},"toString")}),Ut=function(e,t,n){return n.get&&Ft(n.get,t,{getter:!0}),n.set&&Ft(n.set,t,{setter:!0}),rt.f(e,t,n)},Lt=Ue.EXISTS,jt=Function.prototype,zt=y(jt.toString),Bt=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Wt=y(Bt.exec),Ht=(d&&!Lt&&Ut(jt,"name",{configurable:!0,get:function(){try{return Wt(Bt,zt(this))[1]}catch(u){return""}}}),function(e,t,n,r){var i=(r=r||{}).enumerable,o=r.name!==undefined?r.name:t;if(_(n)&&Ft(n,o,r),r.global)i?e[t]=n:qe(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(L){}i?e[t]=n:rt.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}),qt=void 0,Vt=Ze("species"),Gt=RegExp.prototype,Lt=function(r,e,t,n){var a,i=Ze(r),s=!g(function(){var e={};return e[i]=function(){return 7},7!==""[r](e)}),o=s&&!g(function(){var e,t=!1,n=/a/;return"split"===r&&((e={})[Vt]=function(){return n},(n={constructor:e,flags:""})[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t});s&&o&&!t||(a=/./[i],o=e(i,""[r],function(e,t,n,r,i){var o=t.exec;return o===qt||o===Gt.exec?s&&!i?{done:!0,value:I(a,t,n,r)}:{done:!0,value:I(e,n,t,r)}:{done:!1}}),Ht(String.prototype,r,o[0]),Ht(Gt,i,o[1])),n&&it(Gt[i],"sham",!0)},Jt=y("".charAt),$t=y("".charCodeAt),Zt=y("".slice),jt=function(i){return function(e,t){var n,e=C(ie(e)),t=ue(t),r=e.length;return t<0||r<=t?i?"":undefined:(n=$t(e,t))<55296||56319<n||t+1===r||(r=$t(e,t+1))<56320||57343<r?i?Jt(e,t):n:i?Zt(e,t,t+2):r-56320+(n-55296<<10)+65536}},jt={codeAt:jt(!1),charAt:jt(!0)},Kt=jt.charAt,Yt=function(e,t,n){return t+(n&&Kt(e,t).length||1)},Xt=function(e,t){t=e[t];return ne(t)?undefined:Oe(t)},Qt=Math.floor,en=y("".charAt),tn=y("".replace),nn=y("".slice),rn=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,on=/\$([$&'`]|\d{1,2})/g,an=x.RegExp,sn={correct:!g(function(){var e=!0;try{an(".","d")}catch(k){e=!1}var t,n={},r="",i=e?"dgimsy":"gimsy",o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(t in e&&(o.hasIndices="d"),o)!function(e,t){Object.defineProperty(n,e,{get:function(){return r+=t,!0}})}(t,o[t]);return Object.getOwnPropertyDescriptor(an.prototype,"flags").get.call(n)!==i||r!==i})},un=function(){var e=E(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ln=(d&&!sn.correct&&(Ut(RegExp.prototype,"flags",{configurable:!0,get:un}),sn.correct=!0),RegExp.prototype),cn=sn.correct?function(e){return e.flags}:function(e){return sn.correct||!Se(ln,e)||T(e,"flags")?e.flags:I(un,e)},fn=TypeError,dn=function(e,t){var n=e.exec;if(_(n))return null!==(n=I(n,e,t))&&E(n),n;if("RegExp"===ee(e))return I(qt,e,t);throw new fn("RegExp#exec called on incompatible receiver")},hn=Ze("replace"),pn=Math.max,mn=Math.min,gn=y([].concat),vn=y([].push),yn=y("".indexOf),wn=y("".slice),r="$0"==="a".replace(/./,"$0"),bn=!!/./[hn]&&""===/./[hn]("a","$0"),kn=(Lt("replace",function(e,b,k){var S=bn?"$":"$0";return[function(e,t){var n=ie(this),r=R(e)?Xt(e,hn):undefined;return r?I(r,e,n,t):I(b,C(n),e,t)},function(e,t){var n=E(this),r=C(e),i=_(t),e=(i||(t=C(t)),C(cn(n)));if("string"==typeof t&&!~yn(t,S)&&!~yn(t,"$<")&&!~yn(e,"y")){var o=k(b,n,r,t);if(o.done)return o.value}var a,s=!!~yn(e,"g");s&&(a=!!~yn(e,"u")||!!~yn(e,"v"),n.lastIndex=0);for(var u,l=[];null!==(u=dn(n,r))&&(vn(l,u),s);)""===C(u[0])&&(n.lastIndex=Yt(r,ce(n.lastIndex),a));for(var c,f="",d=0,h=0;h<l.length;h++){for(var p=C((u=l[h])[0]),m=pn(mn(ue(u.index),r.length),0),g=[],v=1;v<u.length;v++)vn(g,(c=u[v])===undefined?c:String(c));var y=u.groups,w=i?(w=gn([p],g,m,r),y!==undefined&&vn(w,y),C(Re(t,undefined,w))):function(o,a,s,u,l,e){var c=s+o.length,f=u.length,t=on;return l!==undefined&&(l=ae(l),t=rn),tn(e,t,function(e,t){var n;switch(en(t,0)){case"$":return"$";case"&":return o;case"`":return nn(a,0,s);case"'":return nn(a,c);case"<":n=l[nn(t,1,-1)];break;default:var r,i=+t;if(0==i)return e;if(f<i)return 0!==(r=Qt(i/10))&&r<=f?u[r-1]===undefined?en(t,1):u[r-1]+en(t,1):e;n=u[i-1]}return n===undefined?"":n})}(p,r,m,g,y,t);d<=m&&(f+=wn(r,d,m)+w,d=m+p.length)}return f+wn(r,d)}]},!!g(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!r||bn),function(){}),Sn=ke("Reflect","construct"),_n=/^\s*(?:class|function)\b/,En=y(_n.exec),Cn=!_n.test(kn),On=function(e){if(!_(e))return!1;try{return Sn(kn,[],e),!0}catch(w){return!1}},r=function(e){if(!_(e))return!1;switch(Qe(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Cn||!!En(_n,$e(e))}catch(w){return!0}},Rn=(r.sham=!0,!Sn||g(function(){var e;return On(On.call)||!On(Object)||!On(function(){e=!0})||e})?r:On),xn=TypeError,In=Object.getOwnPropertyDescriptor,Tn=d&&!function(){if(this!==undefined)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(u){return u instanceof TypeError}}()?function(e,t){if(K(e)&&!In(e,"length").writable)throw new xn("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Mn=y("".indexOf);Lt("match",function(r,s,u){return[function(e){var t=ie(this),n=R(e)?Xt(e,r):undefined;return n?I(n,e,t):(n=C(t),new RegExp(e)[r](n))},function(e){var t=E(this),n=C(e),e=u(s,t,n);if(e.done)return e.value;e=C(cn(t));if(!~Mn(e,"g"))return dn(t,n);for(var r=!!~Mn(e,"u")||!!~Mn(e,"v"),i=[],o=t.lastIndex=0;null!==(a=dn(t,n));){var a=C(a[0]);""===(i[o]=a)&&(t.lastIndex=Yt(n,ce(t.lastIndex),r)),o++}return 0===o?null:i}]});var An,Pn,Ln,Dn,Nn,Fn,Un,jn,zn,r=x.navigator,r=r&&r.userAgent,Bn=r?String(r):"",r=x.process,Wn=x.Deno,r=r&&r.versions||Wn&&Wn.version,Wn=r&&r.v8,Hn=i=!(i=Wn?0<(er=Wn.split("."))[0]&&er[0]<4?1:+(er[0]+er[1]):i)&&Bn&&(!(er=Bn.match(/Edge\/(\d+)/))||74<=er[1])&&(er=Bn.match(/Chrome\/(\d+)/))?+er[1]:i,qn=Ze("species"),r=function(t){return 51<=Hn||!g(function(){var e=[];return(e.constructor={})[qn]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Vn=void 0,Gn=void 0,Wn=r("slice"),Jn=Ze("species"),$n=Array,Zn=Math.max,Kn=(O({target:"Array",proto:!0,forced:!Wn},{slice:function(e,t){var n,r,i,o=ze(this),a=fe(o),s=ct(e,a),u=ct(t===undefined?a:t,a);if(K(o)&&(n=o.constructor,(n=Rn(n)&&(n===$n||K(n.prototype))||R(n)&&null===(n=n[Jn])?undefined:n)===$n||n===undefined))return Gn(o,s,u);for(r=new(n===undefined?$n:n)(Zn(u-s,0)),i=0;s<u;s++,i++)s in o&&Vn(r,i,o[s]);return Tn(r,i),r}}),y([].slice),void 0),Yn=Kn.f,Xn="object"==("undefined"==typeof window?"undefined":S(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Qn={f:function(e){if(!Xn||"Window"!==ee(e))return Yn(ze(e));try{return Yn(e)}catch(w){return Gn(Xn)}}},er=Qn.f,i=g(function(){return!Object.getOwnPropertyNames(1)}),tr=(O({target:"Object",stat:!0,forced:i},{getOwnPropertyNames:er}),gt.concat("length","prototype"),Object.getOwnPropertyNames,{f:Object.getOwnPropertySymbols}),nr=y([].concat),rr=ke("Reflect","ownKeys")||function(e){var t=Kn.f(E(e)),n=tr.f;return n?nr(t,n(e)):t},ir=void 0,Wn=function(e,t,n){for(var r=rr(t),i=rt.f,o=ir.f,a=0;a<r.length;a++){var s=r[a];T(e,s)||n&&T(n,s)||i(e,s,o(t,s))}},or=x.Symbol,ar=or&&or.prototype,sr=(!d||!_(or)||"description"in ar&&or().description===undefined||(An={},Wn(i=function(){var e=arguments.length<1||arguments[0]===undefined?undefined:C(arguments[0]),t=Se(ar,this)?new or(e):e===undefined?or():or(e);return""===e&&(An[t]=!0),t},or),Pn=i["for"],i["for"]=function(e){var e=C(e),t=I(Pn,this,e);return""===e&&(An[t]=!0),t},(i.prototype=ar).constructor=i,Ln="Symbol(description detection)"===String(or("description detection")),Dn=y(ar.valueOf),Nn=y(ar.toString),Fn=/^Symbol\((.*)\)[^)]+$/,Un=y("".replace),jn=y("".slice),Ut(ar,"description",{configurable:!0,get:function(){var e=Dn(this);return T(An,e)?"":(e=Nn(e),""===(e=Ln?jn(e,7,-1):Un(e,Fn,"$1"))?undefined:e)}}),O({global:!0,constructor:!0,forced:!0},{Symbol:i})),TypeError),ur=function(e,t){if(Se(t,e))return e;throw new sr("Incorrect invocation")},er=!g(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),lr=void 0,Wn=g(function(){lr(1)}),i=(O({target:"Object",stat:!0,forced:Wn,sham:!er},{getPrototypeOf:function(e){return lr(ae(e))}}),n("IE_PROTO"),Object),Wn=(i.prototype,er&&i.getPrototypeOf,rt.f),cr=Ze("unscopables"),fr=Array.prototype,er=(fr[cr]===undefined&&Wn(fr,cr,{configurable:!0,value:_t(null)}),function(e){fr[cr][e]=!0}),dr=Object.create?Object.create(null):{},hr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},i=ge("span").classList,Wn=i&&i.constructor&&i.constructor.prototype,i=Wn===Object.prototype?undefined:Wn,pr=rt.f,mr=Ze("toStringTag"),gr=function(e,t,n){(e=e&&!n?e.prototype:e)&&!T(e,mr)&&pr(e,mr,{configurable:!0,value:t})},vr=void 0,yr=Ze("iterator"),wr=vr.values,br=function(e,t){if(e){if(e[yr]!==wr)try{it(e,yr,wr)}catch(v){e[yr]=wr}if(gr(e,t,!0),hr[t])for(var n in vr)if(e[n]!==vr[n])try{it(e,n,vr[n])}catch(v){e[n]=vr[n]}}};for(zn in hr)br(x[zn]&&x[zn].prototype,zn);br(i,"DOMTokenList");var Wn=void 0,kr=Wn.IteratorPrototype,Sr=function(){return this},_r=function(e,t,n,r){t+=" Iterator";return e.prototype=_t(kr,{next:nt(+!r,n)}),gr(e,t,!1),dr[t]=Sr,e},Er=void 0,Cr=(O({target:"Object",stat:!0},{setPrototypeOf:Er}),String,TypeError,Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e){try{return y(Oe(Object.getOwnPropertyDescriptor(e,"__proto__").set))}catch(v){}}(Object.prototype))(n,[]),t=n instanceof Array}catch(v){}}():undefined),Ue.PROPER),Or=Ue.CONFIGURABLE,Rr=Wn.IteratorPrototype,xr=Wn.BUGGY_SAFARI_ITERATORS,Ir=Ze("iterator"),Tr=function(){return this},Mr=function(e,t){return{value:e,done:t}},Ar=function(e,t,n,r,i,o,a){_r(n,t,r);var s,u,r=function(e){if(e===i&&h)return h;if(!xr&&e&&e in f)return f[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,f=e.prototype,d=f[Ir]||f["@@iterator"]||i&&f[i],h=!xr&&d||r(i),p="Array"===t&&f.entries||d;if(p&&(e=lr(p.call(new e)))!==Object.prototype&&e.next&&(lr(e)!==Rr&&(Er?Er(e,Rr):_(e[Ir])||Ht(e,Ir,Tr)),gr(e,l,!0)),Cr&&"values"===i&&d&&"values"!==d.name&&(Or?it(f,"name","values"):(c=!0,h=function(){return I(d,this)})),i)if(s={values:r("values"),keys:o?h:r("keys"),entries:r("entries")},a)for(u in s)!xr&&!c&&u in f||Ht(f,u,s[u]);else O({target:t,proto:!0,forced:xr||c},s);return f[Ir]!==h&&Ht(f,Ir,h,{name:i}),dr[t]=h,s},Pr=rt.f,Lr=Nt.set,Dr=Nt.getterFor("Array Iterator"),Nr=(Ar(Array,"Array",function(e,t){Lr(this,{type:"Array Iterator",target:ze(e),index:0,kind:t})},function(){var e=Dr(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Mr(undefined,!0);switch(e.kind){case"keys":return Mr(n,!1);case"values":return Mr(t[n],!1)}return Mr([n,t[n]],!1)},"values"),dr.Arguments=dr.Array);if(er("keys"),er("values"),er("entries"),d&&"values"!==Nr.name)try{Pr(Nr,"name",{value:"values"})}catch(X){}var Fr,Ur,jr=Ze("iterator"),zr=([].keys&&("next"in(Nr=[].keys())?(Pr=lr(lr(Nr)))!==Object.prototype&&(Fr=Pr):0),R(Fr)&&!g(function(){var e={};return Fr[jr].call(e)!==e})||(Fr={}),_(Fr[jr])||Ht(Fr,jr,function(){return this}),Wn.IteratorPrototype),Nr=Ze("toStringTag"),Br=TypeError,Wr=x.Iterator,Pr=!_(Wr)||Wr.prototype!==zr||!g(function(){Wr({})}),Hr=function(){if(ur(this,zr),lr(this)===zr)throw new Br("Abstract class Iterator not directly constructable")},qr=function(t,e){d?Ut(zr,t,{configurable:!0,get:function(){return e},set:function(e){if(E(this),this===zr)throw new Br("You can't redefine this property");T(this,t)?this[t]=e:Vn(this,t,e)}}):zr[t]=e},Vr=(T(zr,Nr)||qr(Nr,"Iterator"),!Pr&&T(zr,"constructor")&&zr.constructor!==Object||qr("constructor",Hr),Hr.prototype=zr,O({global:!0,constructor:!0,forced:Pr},{Iterator:Hr}),at(at.bind)),Gr=function(e,t){return Oe(e),t===undefined?e:we?Vr(e,t):function(){return e.apply(t,arguments)}},Jr=Ze("iterator"),$r=Array.prototype,Zr=function(e){return e!==undefined&&(dr.Array===e||$r[Jr]===e)},Kr=Ze("iterator"),Yr=Array.prototype,Xr=function(e){if(!ne(e))return Xt(e,Kr)||Xt(e,"@@iterator")||("Arguments"===ee(e)?Yr[Kr]:undefined)},Qr=TypeError,ei=function(e,t){t=arguments.length<2?Xr(e):t;if(_(t))return E(I(t,e));throw new Qr(Ee(e)+" is not iterable")},ti=function(e,t,n){var r,i;E(e);try{if(!(r=Xt(e,"return"))){if("throw"===t)throw n;return n}r=I(r,e)}catch(X){i=!0,r=X}if("throw"===t)throw n;if(i)throw r;return E(r),n},ni=TypeError,ri=function(e,t){this.stopped=e,this.result=t},ii=ri.prototype,oi=function(e,t,n){var r,i,o,a,s,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),c=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),h=Gr(t,u),p=function(e){var t=r;return r=undefined,t&&ti(t,"normal"),new ri(!0,e)},m=function(e){return l?(E(e),d?h(e[0],e[1],p):h(e[0],e[1])):d?h(e,p):h(e)};if(c)r=e.iterator;else if(f)r=e;else{if(!(n=Xr(e)))throw new ni(Ee(e)+" is not iterable");if(Zr(n)){for(i=0,o=fe(e);i<o;i++)if((a=m(e[i]))&&Se(ii,a))return a;return new ri(!1)}r=ei(e,n)}for(s=(c?e:r).next;!(g=I(s,r)).done;){var g=g.value;try{a=m(g)}catch(X){if(!r)throw X;ti(r,"throw",X)}if("object"==S(a)&&a&&Se(ii,a))return a}return new ri(!1)},ai=function(e){return{iterator:e,next:e.next,done:!1}},Nr=function(e,t){var n=x.Iterator,n=n&&n.prototype,e=n&&n[e],r=!1;if(e)try{e.call({next:function(){return{done:!0}},"return":function(){r=!0}},-1)}catch(X){X instanceof t||(r=!1)}if(!r)return e},si=Nr("forEach",TypeError),ui=(O({target:"Iterator",proto:!0,real:!0,forced:si},{forEach:function(t){E(this);try{Oe(t)}catch(X){ti(this,"throw",X)}if(si)return I(si,this,t);var e=ai(this),n=0;oi(e,function(e){t(e,n++)},{IS_RECORD:!0})}}),void 0),li=function(e){if(e&&e.forEach!==ui)try{it(e,"forEach",ui)}catch(X){e.forEach=ui}};for(Ur in hr)hr[Ur]&&li(x[Ur]&&x[Ur].prototype);li(i);var ci,fi=Ze("species"),di=Array,hi=function(e,t){return new((n=K(e=e)&&(n=e.constructor,Rn(n)&&(n===di||K(n.prototype))||R(n)&&null===(n=n[fi]))?undefined:n)===undefined?di:n)(0===t?0:t);var n},qr=function(d){var h=1===d,p=2===d,m=3===d,g=4===d,v=6===d,y=7===d,w=5===d||v;return function(e,t,n){for(var r,i,o=ae(e),a=je(o),s=fe(a),u=Gr(t,n),l=0,c=0,f=h?hi(e,s):p||y?hi(e,0):undefined;l<s;l++)if((w||l in a)&&(i=u(r=a[l],l,o),d))if(h)Vn(f,l,i);else if(i)switch(d){case 3:return!0;case 5:return r;case 6:return l;case 2:Vn(f,c++,r)}else switch(d){case 4:return!1;case 7:Vn(f,c++,r)}return v?-1:m||g?g:f}},pi={forEach:qr(0),map:qr(1),filter:qr(2),some:qr(3),every:qr(4),find:qr(5),findIndex:qr(6),filterReject:qr(7)},mi=(Fe("forEach"),O({target:"Array",proto:!0,forced:[].forEach!==ui},{forEach:ui}),x.String),Pr=!!Object.getOwnPropertySymbols&&!g(function(){var e=Symbol("symbol detection");return!mi(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Hn&&Hn<41}),Hr={}.propertyIsEnumerable,gi=Object.getOwnPropertyDescriptor,vi={f:gi&&!Hr.call({1:2},1)?function(e){e=gi(this,e);return!!e&&e.enumerable}:Hr},yi={f:Ze},wi=x,bi=rt.f,ki=function(e){var t=wi.Symbol||(wi.Symbol={});T(t,e)||bi(t,e,{value:yi.f(e)})},Si=void 0,_i=pi.forEach,Ei=n("hidden"),Ci=Nt.set,Oi=Nt.getterFor("Symbol"),Ri=Object.prototype,i=x.Symbol,xi=i&&i.prototype,Ii=x.RangeError,Ti=x.TypeError,qr=x.QObject,Mi=ir.f,Ai=rt.f,Pi=Qn.f,Li=vi.f,Di=y([].push),Ni=e("symbols"),Fi=e("op-symbols"),Hr=e("wks"),Ui=!qr||!qr.prototype||!qr.prototype.findChild,ji=function(e,t,n){var r=Mi(Ri,t);return r&&delete Ri[t],Ai(e,t,n),r&&e!==Ri&&Ai(Ri,t,r),e},zi=d&&g(function(){return 7!==_t(Ai({},"a",{get:function(){return Ai(this,"a",{value:7}).a}})).a})?ji:Ai,Bi=function(e,t){var n=Ni[e]=_t(xi);return Ci(n,{type:"Symbol",tag:e,description:t}),d||(n.description=t),n},Wi=function(e,t,n){e===Ri&&Wi(Fi,t,n),E(e);t=Si(t);return E(n),(T(Ni,t)?(("enumerable"in n?!n.enumerable:!T(e,t)||T(e,Ei)&&e[Ei][t])?(T(e,Ei)||Ai(e,Ei,nt(1,_t(null))),e[Ei][t]=!0):(T(e,Ei)&&e[Ei][t]&&(e[Ei][t]=!1),n=_t(n,{enumerable:nt(0,!1)})),zi):Ai)(e,t,n)},Hi=function(t,e){E(t);var n=ze(e),e=st(n).concat(Vi(n));return _i(e,function(e){d&&!I(qi,n,e)||Wi(t,e,n[e])}),t},qi=function(e){var e=Si(e),t=I(Li,this,e);return!(this===Ri&&T(Ni,e)&&!T(Fi,e))&&(!(t||!T(this,e)||!T(Ni,e)||T(this,Ei)&&this[Ei][e])||t)},n=function(e,t){var n,e=ze(e),t=Si(t);if(e!==Ri||!T(Ni,t)||T(Fi,t))return!(n=Mi(e,t))||!T(Ni,t)||T(e,Ei)&&e[Ei][t]||(n.enumerable=!0),n},qr=function(e){var e=Pi(ze(e)),t=[];return _i(e,function(e){T(Ni,e)||T(mt,e)||Di(t,e)}),t},Vi=function(e){var t=e===Ri,e=Pi(t?Fi:ze(e)),n=[];return _i(e,function(e){!T(Ni,e)||t&&!T(Ri,e)||Di(n,Ni[e])}),n},qr=(Pr||(xi=(i=function(){if(Se(xi,this))throw new Ti("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==undefined?C(arguments[0]):undefined,n=At(e),r=function(e){var t=this===undefined?x:this,e=(t===Ri&&I(r,Fi,e),T(t,Ei)&&T(t[Ei],n)&&(t[Ei][n]=!1),nt(1,e));try{zi(t,n,e)}catch(X){if(!(X instanceof Ii))throw X;ji(t,n,e)}};return d&&Ui&&zi(Ri,n,{configurable:!0,set:r}),Bi(n,e)}).prototype,Ht(xi,"toString",function(){return Oi(this).tag}),Ht(i,"withoutSetter",function(e){return Bi(At(e),e)}),vi.f=qi,rt.f=Wi,ot.f=Hi,ir.f=n,Kn.f=Qn.f=qr,tr.f=Vi,yi.f=function(e){return Bi(Ze(e),e)},d&&(Ut(xi,"description",{configurable:!0,get:function(){return Oi(this).description}}),Ht(Ri,"propertyIsEnumerable",qi,{unsafe:!0}))),O({global:!0,constructor:!0,wrap:!0,forced:!Pr,sham:!Pr},{Symbol:i}),_i(st(Hr),function(e){ki(e)}),O({target:"Symbol",stat:!0,forced:!Pr},{useSetter:function(){Ui=!0},useSimple:function(){Ui=!1}}),O({target:"Object",stat:!0,forced:!Pr,sham:!d},{create:function(e,t){return t===undefined?_t(e):Hi(_t(e),t)},defineProperty:Wi,defineProperties:Hi,getOwnPropertyDescriptor:n}),O({target:"Object",stat:!0,forced:!Pr},{getOwnPropertyNames:qr}),Hr=(Hr=ke("Symbol"))&&Hr.prototype,ci=Hr&&Hr.valueOf,n=Ze("toPrimitive"),Hr&&!Hr[n]&&Ht(Hr,n,function(e){return I(ci,this)},{arity:1}),gr(i,"Symbol"),mt[Ei]=!0,Pr&&!!Symbol["for"]&&!!Symbol.keyFor),Gi=e("string-to-symbol-registry"),Ji=e("symbol-to-string-registry"),$i=(O({target:"Symbol",stat:!0,forced:!qr},{"for":function(e){var t,e=C(e);return T(Gi,e)?Gi[e]:(t=ke("Symbol")(e),Gi[e]=t,Ji[t]=e,t)}}),void 0),Zi=e("symbol-to-string-registry"),Ki=(O({target:"Symbol",stat:!0,forced:!qr},{keyFor:function(e){if(!$i(e))throw new TypeError(Ee(e)+" is not a symbol");if(T(Zi,e))return Zi[e]}}),Ze("match")),Yi=function(e){var t;return R(e)&&((t=e[Ki])!==undefined?!!t:"RegExp"===ee(e))},Xi=TypeError,Qi=function(e){if(Yi(e))throw new Xi("The method doesn't accept regular expressions");return e},eo=Ze("match"),Hr=function(e){var t=/./;try{"/./"[e](t)}catch(P){try{return t[eo]=!1,"/./"[e](t)}catch(v){}}return!1},to=y("".indexOf),no=(O({target:"String",proto:!0,forced:!Hr("includes")},{includes:function(e){return!!~to(C(ie(this)),C(Qi(e)),1<arguments.length?arguments[1]:undefined)}}),t.includes),n=g(function(){return!Array(1).includes()}),i=g(function(){return[,1].includes(undefined,1)}),ro=(O({target:"Array",proto:!0,forced:n||i},{includes:function(e){return no(this,e,1<arguments.length?arguments[1]:undefined)}}),er("includes"),RangeError),io=Math.floor,qr=function(e){var t=C(ie(this)),n="",r=ue(e);if(r<0||r===Infinity)throw new ro("Wrong number of repetitions");for(;0<r;(r=io(r/2))&&(t+=t))r%2&&(n+=t);return n},oo=y(qr),ao=y("".slice),so=Math.ceil,n=function(i){return function(e,t,n){var e=C(ie(e)),t=ce(t),r=e.length;return t<=r||""===(n=n===undefined?" ":C(n))?e:((r=oo(n,so((t=t-r)/n.length))).length>t&&(r=ao(r,0,t)),i?e+r:r+e)}},uo=[n(!1),n(!0)][0],lo=RangeError,co=isFinite,fo=Math.abs,i=Date.prototype,ho=i.toISOString,po=y(i.getTime),mo=y(i.getUTCDate),go=y(i.getUTCFullYear),vo=y(i.getUTCHours),yo=y(i.getUTCMilliseconds),wo=y(i.getUTCMinutes),bo=y(i.getUTCMonth),ko=y(i.getUTCSeconds),n=g(function(){return"0385-07-25T07:06:39.999Z"!==ho.call(new Date(-50000000000001))})||!g(function(){ho.call(new Date(NaN))})?function(){var e,t,n;if(co(po(this)))return e=go(this),t=yo(this),(n=e<0?"-":9999<e?"+":"")+uo(fo(e),n?6:4,0)+"-"+uo(bo(this)+1,2,0)+"-"+uo(mo(this),2,0)+"T"+uo(vo(this),2,0)+":"+uo(wo(this),2,0)+":"+uo(ko(this),2,0)+"."+uo(t,3,0)+"Z";throw new lo("Invalid time value")}:ho,So=(O({target:"Date",proto:!0,forced:Date.prototype.toISOString!==n},{toISOString:n}),void 0),i=g(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})});O({target:"Date",proto:!0,forced:i},{toJSON:function(e){var t=ae(this),n=So(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}});var _o,Eo=Nt.get,Co=y(1.1.valueOf),Oo="\t\n\x0B\f\r \u2028\u2029\ufeff",Ro=y("".replace),xo=RegExp("^["+Oo+"]+"),Io=RegExp("(^|[^"+Oo+"])["+Oo+"]+$"),n=function(t){return function(e){e=C(ie(e));return 1&t&&(e=Ro(e,xo,"")),e=2&t?Ro(e,Io,"$1"):e}},i={start:n(1),end:n(2),trim:n(3)},To=Ue.PROPER,Mo=i.trim,Ao=(O({target:"String",proto:!0,forced:(_o="trim",g(function(){return!!Oo[_o]()||"
"!=="
"[_o]()||To&&Oo[_o].name!==_o}))},{trim:function(){return Mo(this)}}),i.trim),Po=x.parseInt,n=x.Symbol,Lo=n&&n.iterator,Do=/^[+-]?0x/i,No=y(Do.exec),n=8!==Po(Oo+"08")||22!==Po(Oo+"0x16")||Lo&&!g(function(){Po(Object(Lo))})?function(e,t){e=Ao(C(e));return Po(e,t>>>0||(No(Do,e)?16:10))}:Po,Fo=(O({global:!0,forced:parseInt!==n},{parseInt:n}),SyntaxError),Uo=parseInt,jo=String.fromCharCode,zo=y("".charAt),Bo=y("".slice),Wo=y(/./.exec),Ho={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},qo=/^[\da-f]{4}$/i,Vo=/^[\u0000-\u001F]$/,Go=void 0,Jo=Go.ArrayBuffer,$o=Go.DataView,n=$o.prototype,Zo=at(Jo.prototype.slice),Ko=at(n.getUint8),Yo=at(n.setUint8),n=g(function(){return!new Jo(2).slice(1,undefined).byteLength}),n=(O({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:n},{slice:function(e,t){if(Zo&&t===undefined)return Zo(E(this),e);for(var n=E(this).byteLength,r=ct(e,n),i=ct(t===undefined?n:t,n),e=new Jo(ce(i-r)),o=new $o(this),a=new $o(e),s=0;r<i;)Yo(a,s++,Ko(o,r++));return e}}),void 0),Xo=(O({global:!0,constructor:!0,forced:!0},{DataView:Go.DataView}),function(e,t,n){for(var r in t)Ht(e,r,t[r],n);return e}),Qo=RangeError,ea=function(e){if(e===undefined)return 0;var e=ue(e),t=ce(e);if(e!==t)throw new Qo("Wrong length or index");return t},ta=(O({target:"Math",stat:!0},{fround:void 0}),O({target:"Math",stat:!0},{sign:void 0}),Math.sign,Array),na=Math.abs,ra=Math.pow,ia=Math.floor,oa=Math.log,aa=Math.LN2,sa=void 0,ua=(O({target:"Array",proto:!0},{fill:sa}),er("fill"),function(e,t,n){return Er&&_(t=t.constructor)&&t!==n&&R(t=t.prototype)&&t!==n.prototype&&Er(e,t),e}),la=Nt.getterFor("ArrayBuffer"),ca=Nt.getterFor("DataView"),fa=Nt.set,o=x.ArrayBuffer,da=o&&o.prototype,a=x.DataView,ha=a&&a.prototype,pa=(Object.prototype,x.Array),ma=x.RangeError,ga=y(sa),va=y([].reverse),ya=function(e,t,n){var r,i,o,a=ta(n),s=8*n-t-1,n=(1<<s)-1,u=n>>1,l=23===t?ra(2,-24)-ra(2,-77):0,c=e<0||0===e&&1/e<0?1:0,f=0;for((e=na(e))!=e||e===Infinity?(i=e!=e?1:0,r=n):(r=ia(oa(e)/aa),e*(o=ra(2,-r))<1&&(r--,o*=2),2<=(e+=1<=r+u?l/o:l*ra(2,1-u))*o&&(r++,o/=2),n<=r+u?(i=0,r=n):1<=r+u?(i=(e*o-1)*ra(2,t),r+=u):(i=e*ra(2,u-1)*ra(2,t),r=0));8<=t;)a[f++]=255&i,i/=256,t-=8;for(r=r<<t|i,s+=t;0<s;)a[f++]=255&r,r/=256,s-=8;return a[f-1]|=128*c,a},wa=function(e,t){var n,r=e.length,i=8*r-t-1,o=(1<<i)-1,a=o>>1,s=i-7,u=r-1,i=e[u--],l=127&i;for(i>>=7;0<s;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;0<s;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===o)return n?NaN:i?-Infinity:Infinity;n+=ra(2,t),l-=a}return(i?-1:1)*n*ra(2,l-t)},ba=function(e){return[255&e]},ka=function(e){return[255&e,e>>8&255]},Sa=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},_a=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Ea=function(e){return ya((void 0)(e),23,4)},Ca=function(e){return ya(e,52,8)},s=function(e,t,n){Ut(e.prototype,t,{configurable:!0,get:function(){return n(this)[t]}})},Oa=function(e,t,n,r){e=ca(e),n=ea(n),r=!!r;if(n+t>e.byteLength)throw new ma("Wrong index");n+=e.byteOffset,e=Gn(e.bytes,n,n+t);return r?e:va(e)},Ra=function(e,t,n,r,i,o){var e=ca(e),n=ea(n),a=r(+i),s=!!o;if(n+t>e.byteLength)throw new ma("Wrong index");for(var u=e.bytes,l=n+e.byteOffset,c=0;c<t;c++)u[l+c]=a[s?c:t-c-1]},da=(o=function(e){ur(this,da);e=ea(e);fa(this,{type:"ArrayBuffer",bytes:ga(pa(e),0),byteLength:e}),d||(this.byteLength=e,this.detached=!1)}).prototype,ha=(a=function(e,t,n){ur(this,ha),ur(e,da);var r=la(e),i=r.byteLength,t=ue(t);if(t<0||i<t)throw new ma("Wrong offset");if(t+(n=n===undefined?i-t:ea(n))>i)throw new ma("Wrong length");fa(this,{type:"DataView",buffer:e,byteLength:n,byteOffset:t,bytes:r.bytes}),d||(this.buffer=e,this.byteLength=n,this.byteOffset=t)}).prototype,xa=(d&&(s(o,"byteLength",la),s(a,"buffer",ca),s(a,"byteLength",ca),s(a,"byteOffset",ca)),Xo(ha,{getInt8:function(e){return Oa(this,1,e)[0]<<24>>24},getUint8:function(e){return Oa(this,1,e)[0]},getInt16:function(e){e=Oa(this,2,e,1<arguments.length&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(e){e=Oa(this,2,e,1<arguments.length&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(e){return _a(Oa(this,4,e,1<arguments.length&&arguments[1]))},getUint32:function(e){return _a(Oa(this,4,e,1<arguments.length&&arguments[1]))>>>0},getFloat32:function(e){return wa(Oa(this,4,e,1<arguments.length&&arguments[1]),23)},getFloat64:function(e){return wa(Oa(this,8,e,1<arguments.length&&arguments[1]),52)},setInt8:function(e,t){Ra(this,1,e,ba,t)},setUint8:function(e,t){Ra(this,1,e,ba,t)},setInt16:function(e,t){Ra(this,2,e,ka,t,2<arguments.length&&arguments[2])},setUint16:function(e,t){Ra(this,2,e,ka,t,2<arguments.length&&arguments[2])},setInt32:function(e,t){Ra(this,4,e,Sa,t,2<arguments.length&&arguments[2])},setUint32:function(e,t){Ra(this,4,e,Sa,t,2<arguments.length&&arguments[2])},setFloat32:function(e,t){Ra(this,4,e,Ea,t,2<arguments.length&&arguments[2])},setFloat64:function(e,t){Ra(this,8,e,Ca,t,2<arguments.length&&arguments[2])}}),gr(o,"ArrayBuffer"),gr(a,"DataView"),Ze("species")),Ia=function(e){e=ke(e);d&&e&&!e[xa]&&Ut(e,xa,{configurable:!0,get:function(){return this}})},s=Go.ArrayBuffer,o=x.ArrayBuffer,Ta=(O({global:!0,constructor:!0,forced:o!==s},{ArrayBuffer:s}),Ia("ArrayBuffer"),g(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e))&&Object.defineProperty(e,"a",{value:8})})),Ma=Object.isExtensible,Aa=g(function(){Ma(1)})||Ta?function(e){return!!R(e)&&(!Ta||"ArrayBuffer"!==ee(e))&&(!Ma||Ma(e))}:Ma,Pa=(O({target:"Object",stat:!0,forced:Object.isExtensible!==Aa},{isExtensible:Aa}),TypeError),La=function(e,t){if(!delete e[t])throw new Pa("Cannot delete property "+Ee(t)+" of "+Ee(e))},a=r("splice"),Da=Math.max,Na=Math.min,Fa=(O({target:"Array",proto:!0,forced:!a},{splice:function(e,t){var n,r,i,o,a,s,u=ae(this),l=fe(u),c=ct(e,l),e=arguments.length;for(0===e?n=r=0:r=1===e?(n=0,l-c):(n=e-2,Na(Da(ue(t),0),l-c)),he(l+n-r),i=hi(u,r),o=0;o<r;o++)(a=c+o)in u&&Vn(i,o,u[a]);if(Tn(i,r),n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:La(u,s);for(o=l;l-r+n<o;o--)La(u,o-1)}else if(r<n)for(o=l-r;c<o;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:La(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return Tn(u,l-r+n),i}}),We(function(e){var t=rt.f,a=At("meta"),n=0,r=function(e){t(e,a,{value:{objectID:"O"+n++,weakData:{}}})},s=e.exports={enable:function(){s.enable=function(){},0;var i=Kn.f,o=y([].splice),e={};e[a]=1,i(e).length&&(Kn.f=function(e){for(var t=i(e),n=0,r=t.length;n<r;n++)if(t[n]===a){o(t,n,1);break}return t},O({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Qn.f}))},fastKey:function(e,t){if(!R(e))return"symbol"==S(e)?e:("string"==typeof e?"S":"P")+e;if(!T(e,a)){if(!Aa(e))return"F";if(!t)return"E";r(e)}return e[a].objectID},getWeakData:function(e,t){if(!T(e,a)){if(!Aa(e))return!0;if(!t)return!1;r(e)}return e[a].weakData},onFreeze:function(e){return e}};mt[a]=!0})),Ua=Fa.onFreeze,ja=Object.preventExtensions,o=g(function(){ja(1)}),za=(O({target:"Object",stat:!0,forced:o,sham:!0},{preventExtensions:function(e){return ja&&R(e)?ja(Ua(e)):e}}),g(function(){return Object.isExtensible(Object.preventExtensions({}))}),Fa.onFreeze),Ba=Object.freeze,s=g(function(){Ba(1)}),Wa=(O({target:"Object",stat:!0,forced:s,sham:!0},{freeze:function(e){return Ba&&R(e)?Ba(za(e)):e}}),!g(function(){var e=JSON.rawJSON("9007199254740993");return!JSON.isRawJSON(e)||"9007199254740993"!==JSON.stringify(e)})),Ha=t.includes,qa=String,Va=TypeError,Ga=ke("JSON","stringify"),a=ke("BigInt"),Ja=y("".valueOf),$a=y((!0).valueOf),Za=a&&y(a.prototype.valueOf),Ka=y(/./.exec),Ya=y("".charAt),Xa=y("".charCodeAt),Qa=y("".replace),es=y("".slice),ts=y([].push),ns=y([].pop),rs=y(1.1.toString),is=/[\uD800-\uDFFF]/g,os=/^[\uD800-\uDBFF]$/,as=/^[\uDC00-\uDFFF]$/,ss=/^\d+$/,us=At(),ls=At(),cs=At(),fs=us.length,ds=ls.length,o=!Pr||g(function(){var e=ke("Symbol")("stringify detection");return"[null]"!==Ga([e])||"{}"!==Ga({a:e})||"{}"!==Ga(Object(e))}),hs=g(function(){return'"\\udf06\\ud834"'!==Ga("\udf06\ud834")||'"\\udead"'!==Ga("\udead")}),ps=Wa?ke("JSON","isRawJSON"):function(e){return!!R(e)&&!!(e=Eo(e))&&"RawJSON"===e.type},ms=o?function(e,n,t){return Ga(e,function(e,t){e=I(n,this,e,t);if(!$i(e))return e},t)}:Ga,gs=function(e,t,n){var r=Ya(n,t-1),n=Ya(n,t+1);return Ka(os,e)&&!Ka(as,n)||Ka(as,e)&&!Ka(os,r)?"\\u"+rs(Xa(e,0),16):e},vs=function(e,t){try{return e(t),!0}catch(X){return!1}},s=(Ga&&O({target:"JSON",stat:!0,arity:3,forced:o||hs||!Wa},{stringify:function(e,t,n){var r,i=_(t)?t:undefined,o=i?undefined:function(e){if(K(e)){for(var t=e.length,n=[],r=_t(null),i=0;i<t;i++){var o,a=e[i];if("string"==typeof a)o=a;else{if("number"!=typeof a&&"Number"!==ee(a)&&"String"!==ee(a))continue;o=C(a)}T(r,o)||(r[o]=!0,ts(n,o))}return n}}(t),a=o&&function(e){for(var t=0,n=e.length;t<n;t++)if(Ka(ss,e[t]))return ls;return""}(o),s=[],u=[],l=[],c=!1,f=!0,d=ms(e,function(e,t){if(e=qa(e),o){if(e===cs)return ns(u),void(r=ns(l));if(f)f=!1;else if(this!==r&&!K(this)&&!Ha(o,e))return}else i&&(t=I(i,this,e,t));if(ps(t))return Wa?t:(c=!0,us+(ts(s,t.rawJSON)-1));if(o&&function(e){if(!R(e)||_(e)||K(e))return!1;try{return!("Number"===(n=ee(t=e))&&vs(Co,t)||"String"===n&&vs(Ja,t)||"Boolean"===n&&vs($a,t)||Za&&"BigInt"===n&&vs(Za,t))}catch(X){return!0}var t,n}(t)){if(Ha(u,t))throw new Va("Converting circular structure to JSON");e=function(e,t,n){for(var r=_t(null),i=0,o=t.length;i<o;i++){var a=t[i];r[n+a]=function(n,r){return{toJSON:function(){var e,t=n[r];return t=(R(t)||"bigint"==typeof t)&&(e=t.toJSON,_(e))?I(e,t,r):t}}}(e,a)}return r[cs]=null,r}(t,o,a);return ts(u,t),ts(l,r),a&&(c=!0),r=e}return t},n);if("string"!=typeof d)return d;if(hs&&(d=Qa(d,is,gs)),!c)return d;for(var h="",p=d.length,m=0;m<p;m++){var g,v,y=Ya(d,m);'"'===y?(g=function(e,t){for(var n=!0,r="";t<e.length;){var i=zo(e,t);if("\\"===i){var o=Bo(e,t,t+2);if(T(Ho,o))r+=Ho[o],t+=2;else{if("\\u"!==o)throw new Fo('Unknown escape sequence: "'+o+'"');o=Bo(e,t+=2,t+4);if(!Wo(qo,o))throw new Fo("Bad Unicode escape at: "+t);r+=jo(Uo(o,16)),t+=4}}else{if('"'===i){n=!1,t++;break}if(Wo(Vo,i))throw new Fo("Bad control character in string literal at: "+t);r+=i,t++}}if(n)throw new Fo("Unterminated string at: "+t);return{value:r,end:t}}(d,++m).end-1,v=es(d,m,g),es(v,0,fs)===us?h+=s[es(v,fs)]:es(v,0,ds)===ls?h+='"'+es(v,ds)+'"':h+='"'+v+'"',m=g):h+=y}return h}}),!Pr||g(function(){tr.f(1)})),ys=(O({target:"Object",stat:!0,forced:s},{getOwnPropertySymbols:function(e){var t=tr.f;return t?t(ae(e)):[]}}),ki("iterator"),jt.charAt),ws=Nt.set,bs=Nt.getterFor("String Iterator"),a=(Ar(String,"String",function(e){ws(this,{type:"String Iterator",string:C(e),index:0})},function(){var e=bs(this),t=e.string,n=e.index;return n>=t.length?Mr(undefined,!0):(t=ys(t,n),e.index+=t.length,Mr(t,!1))}),Pr&&!Symbol.sham&&"symbol"==S(Symbol.iterator)),o=(Object,TypeError,TypeError,Ze("toPrimitive"),TypeError,Object.defineProperty,rt.f),ks=(O({target:"Object",stat:!0,forced:Object.defineProperty!==o,sham:!d},{defineProperty:o}),g(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),Ze("isConcatSpreadable")),s=51<=Hn||!g(function(){var e=[];return e[ks]=!1,e.concat()[0]!==e}),Pr=!s||!r("concat"),Ss=(O({target:"Array",proto:!0,arity:1,forced:Pr},{concat:function(e){for(var t,n,r,i,o,a=ae(this),s=hi(a,0),u=0,l=-1,c=arguments.length;l<c;l++)if(i=r=-1===l?a:arguments[l],o=void 0,!R(i)||((o=i[ks])!==undefined?!o:!K(i)))he(u+1),Vn(s,u++,r);else for(n=fe(r),he(u+n),t=0;t<n;t++,u++)t in r&&Vn(s,u,r[t]);return Tn(s,u),s}}),Function),_s=y([].concat),Es=y([].join),Cs={},Os=we?Ss.bind:function(t){var n=Oe(this),e=n.prototype,r=Gn(arguments,1),i=function(){var e=_s(r,Gn(arguments));return this instanceof i?function(e,t,n){if(!T(Cs,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";Cs[t]=Ss("C,a","return new C("+Es(r,",")+")")}return Cs[t](e,n)}(n,e.length,e):n.apply(t,e)};return R(e)&&(i.prototype=e),i},o=(O({target:"Function",proto:!0,forced:Function.bind!==Os},{bind:Os}),Function.prototype),s=o.call,Pr=(we&&o.bind.bind(s,s),Date.prototype),Rs=y(Pr.toString),xs=y(Pr.getTime),s=("Invalid Date"!==String(new Date(NaN))&&Ht(Pr,"toString",function(){var e=xs(this);return e==e?Rs(this):"Invalid Date"}),Ue.PROPER),o=RegExp.prototype,Is=o.toString,Pr=g(function(){return"/a/b"!==Is.call({source:"a",flags:"b"})}),s=s&&"toString"!==Is.name,Ts=((Pr||s)&&Ht(o,"toString",function(){var e=E(this);return"/"+C(e.source)+"/"+C(cn(e))},{unsafe:!0}),x.RegExp),Pr=g(function(){var e=Ts("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),s=Pr||g(function(){return!Ts("a","y").sticky}),o={BROKEN_CARET:Pr||g(function(){var e=Ts("^r","gy");return e.lastIndex=2,null!==e.exec("str")}),MISSED_STICKY:s,UNSUPPORTED_Y:Pr},Ms=Nt.get,As=RegExp.prototype,Ps=TypeError,Ls=(d&&o.MISSED_STICKY&&Ut(As,"sticky",{configurable:!0,get:function(){if(this!==As){if("RegExp"===ee(this))return!!Ms(this).sticky;throw new Ps("Incompatible receiver, RegExp required")}}}),/#|\.prototype\./),s=function(e,t){e=Ns[Ds(e)];return e===Us||e!==Fs&&(_(t)?g(t):!!t)},Ds=s.normalize=function(e){return String(e).replace(Ls,".").toLowerCase()},Ns=s.data={},Fs=s.NATIVE="N",Us=s.POLYFILL="P",js=s,zs=rt.f,Bs=x.RegExp,Ws=g(function(){var e=Bs(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}),Hs=x.RegExp,qs=g(function(){var e=Hs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),Pr=Kn.f,Vs=Nt.enforce,Gs=Ze("match"),Js=x.RegExp,$s=Js.prototype,Zs=x.SyntaxError,Ks=y($s.exec),Ys=y("".charAt),Xs=y("".replace),Qs=y("".indexOf),eu=y("".slice),tu=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,nu=/a/g,ru=/a/g,s=new Js(nu)!==nu,iu=o.MISSED_STICKY,ou=o.UNSUPPORTED_Y,s=d&&(!s||iu||Ws||qs||g(function(){return ru[Gs]=!1,Js(nu)!==nu||Js(ru)===ru||"/a/i"!==String(Js(nu,"i"))}));if(js("RegExp",s)){for(var au=function(e,t){var n,r,i=Se($s,this),o=Yi(e),a=t===undefined,s=[],u=e;if(!i&&o&&a&&e.constructor===au)return e;if((o||Se($s,e))&&(e=e.source,a)&&(t=cn(u)),e=e===undefined?"":C(e),t=t===undefined?"":C(t),u=e,o=t=Ws&&"dotAll"in nu&&(n=!!t&&-1<Qs(t,"s"))?Xs(t,/s/g,""):t,iu&&"sticky"in nu&&(r=!!t&&-1<Qs(t,"y"))&&ou&&(t=Xs(t,/y/g,"")),qs&&(e=(a=function(e){for(var t,n=e.length,r=0,i="",o=[],a=_t(null),s=!1,u=!1,l=0,c="";r<n;r++){if("\\"===(t=Ys(e,r))){if(t+=Ys(e,++r),!u&&"\\"===Ys(t,1)){i+="\\x5c";continue}}else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:i+=t,Ks(tu,eu(e,r+1))?(r+=2,u=!0,l++):"?"!==Ys(e,r+1)&&l++;continue;case">"===t&&u:if(""===c||T(a,c))throw new Zs("Invalid capture group name");a[c]=!0,u=!(o[o.length]=[c,l]),c="";continue}u?c+=t:i+=t}for(var f=0;f<o.length;f++)for(var d="\\k<"+o[f][0]+">",h="\\"+o[f][1];-1<Qs(i,d);)i=Xs(i,d,h);return[i,o]}(e))[0],s=a[1]),a=ua(Js(e,t),i?this:$s,au),(n||r||s.length)&&(t=Vs(a),n&&(t.dotAll=!0,t.raw=au(function(e){for(var t,n=e.length,r=0,i="",o=!1;r<n;r++)"\\"!==(t=Ys(e,r))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+Ys(e,++r);return i}(e),o)),r&&(t.sticky=!0),s.length)&&(t.groups=s),e!==u)try{it(a,"source",""===u?"(?:)":u)}catch(X){}return a},su=Pr(Js),uu=0;su.length>uu;)!function(e,t,n){n in e||zs(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}(au,Js,su[uu++]);($s.constructor=au).prototype=$s,Ht(x,"RegExp",au,{constructor:!0})}Ia("RegExp");e("native-string-replace",String.prototype.replace);var lu=RegExp.prototype.exec,cu=(y("".charAt),y("".indexOf),y("".replace),y("".slice),s=/b*/g,I(lu,Pr=/a/,"a"),I(lu,s,"a"),/()??/.exec("")[1],undefined,O({target:"RegExp",proto:!0,forced:/./.exec!==qt},{exec:qt}),TypeError),fu=function(e){if(Rn(e))return e;throw new cu(Ee(e)+" is not a constructor")},du=Ze("species"),hu=function(e,t){var e=E(e).constructor;return e===undefined||ne(e=E(e)[du])?t:fu(e)},pu=o.UNSUPPORTED_Y,mu=Math.min,gu=y([].push),vu=y("".slice),yu=y("".indexOf),Pr=!g(function(){var e=/(?:)/,t=e.exec,e=(e.exec=function(){return t.apply(this,arguments)},"ab".split(e));return 2!==e.length||"a"!==e[0]||"b"!==e[1]}),wu="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length,bu=(Lt("split",function(i,p,m){var g="0".split(undefined,0).length?function(e,t){return e===undefined&&0===t?[]:I(p,this,e,t)}:p;return[function(e,t){var n=ie(this),r=R(e)?Xt(e,i):undefined;return r?I(r,e,n,t):I(g,C(n),e,t)},function(e,t){var n=E(this),r=C(e);if(!wu){e=m(g,n,r,t,g!==p);if(e.done)return e.value}var e=hu(n,RegExp),i=C(cn(n)),o=!!~yu(i,"u")||!!~yu(i,"v"),a=(pu?~yu(i,"g")||(i+="g"):~yu(i,"y")||(i+="y"),new e(pu?"^(?:"+n.source+")":n,i)),s=t===undefined?4294967295:t>>>0;if(0==s)return[];if(0===r.length)return null===dn(a,r)?[r]:[];for(var u=0,l=0,c=[];l<r.length;){a.lastIndex=pu?0:l;var f,d=dn(a,pu?vu(r,l):r);if(null===d||(f=mu(ce(a.lastIndex+(pu?l:0)),r.length))===u)l=Yt(r,l,o);else{if(gu(c,vu(r,u,l)),c.length===s)return c;for(var h=1;h<=d.length-1;h++)if(gu(c,d[h]),c.length===s)return c;l=u=f}}return gu(c,vu(r,u)),c}]},wu||!Pr,pu),Object),ku=(y("".split),g(function(){return!bu("z").propertyIsEnumerable(0)}),ir.f),s=!d||g(function(){ku(1)}),o=(O({target:"Object",stat:!0,forced:s,sham:!d},{getOwnPropertyDescriptor:function(e,t){return ku(ze(e),t)}}),Object.getOwnPropertyDescriptor,ir.f,O({global:!0,forced:x.globalThis!==x},{globalThis:x}),function(e){return e&&e.Math===Math&&e}),Pr=(o("object"==("undefined"==typeof globalThis?"undefined":S(globalThis))&&globalThis)||o("object"==("undefined"==typeof window?"undefined":S(window))&&window)||o("object"==("undefined"==typeof self?"undefined":S(self))&&self)||o("object"==S(xe)&&xe)||o("object"==S(xe)&&xe)||function(){return this}()||Function("return this")(),x.Symbol),s=(e("wks"),a?Pr["for"]:Pr&&Pr.withoutSetter,{}),Su=(s[Ze("toStringTag")]="z",String(s),Ht(Object.prototype,"toString",function(){return"[object "+Qe(this)+"]"},{unsafe:!0}),Nr("find",TypeError)),_u=(O({target:"Iterator",proto:!0,real:!0,forced:Su},{find:function(n){E(this);try{Oe(n)}catch(X){ti(this,"throw",X)}var e,r;return Su?I(Su,this,n):(e=ai(this),oi(e,function(e,t){if(n(e,r++))return t(e)},{IS_RECORD:!(r=0),INTERRUPTED:!0}).result)}}),pi.find),Eu=!0,Cu=("find"in[]&&Array(1).find(function(){Eu=!1}),O({target:"Array",proto:!0,forced:Eu},{find:function(e){return _u(this,e,1<arguments.length?arguments[1]:undefined)}}),er("find"),Date),Ou=y(Cu.prototype.getTime),Ru=(O({target:"Date",stat:!0},{now:function(){return Ou(new Cu)}}),function(e,t,n,r){try{return r?t(E(n)[0],n[1]):t(n)}catch(X){ti(e,"throw",X)}}),xu=Array,Iu=function(e){var t=Rn(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&(r=Gr(r,2<n?arguments[2]:undefined));var o,a,s,u,l,c,f=ae(e),n=Xr(f),d=0;if(!n||this===xu&&Zr(n))for(o=fe(f),a=t?new this(o):xu(o);d<o;d++)c=i?r(f[d],d):f[d],Vn(a,d,c);else for(a=t?new this:[],l=(u=ei(f,n)).next;!(s=I(l,u)).done;d++){try{he(d)}catch(X){ti(u,"throw",X)}c=i?Ru(u,r,[s.value,d],!0):s.value;try{Vn(a,d,c)}catch(X){ti(u,"throw",X)}}return Tn(a,d),a},Tu=void 0,xe=!Tu(function(e){Array.from(e)}),o=(O({target:"Array",stat:!0,forced:xe},{from:Iu}),Ze("iterator"));try{var Mu=0,Au={next:function(){return{done:!!Mu++}},"return":function(){0}};Au[o]=function(){return this},Array.from(Au,function(){throw 2})}catch(X){}var Pu,Lu,e=function(e,t,n){var r,i,o,a,s,u=-1!==e.indexOf("Map"),l=-1!==e.indexOf("Weak"),c=u?"set":"add",f=x[e],d=f&&f.prototype,h=f,p={},m=function(e){var n=y(d[e]);Ht(d,e,"add"===e?function(e){return n(this,0===e?0:e),this}:"delete"===e?function(e){return!(l&&!R(e))&&n(this,0===e?0:e)}:"get"===e?function(e){return l&&!R(e)?undefined:n(this,0===e?0:e)}:"has"===e?function(e){return!(l&&!R(e))&&n(this,0===e?0:e)}:function(e,t){return n(this,0===e?0:e,t),this})};return js(e,!_(f)||!(l||d.forEach&&!g(function(){(new f).entries().next()})))?(h=n.getConstructor(t,e,u,c),Fa.enable()):js(e,!0)&&(i=(r=new h)[c](l?{}:-0,1)!==r,o=g(function(){r.has(1)}),a=Tu(function(e){new f(e)}),s=!l&&g(function(){for(var e=new f,t=5;t--;)e[c](t,t);return!e.has(-0)}),a||(((h=t(function(e,t){ur(e,d);e=ua(new f,e,h);return ne(t)||oi(t,e[c],{that:e,AS_ENTRIES:u}),e})).prototype=d).constructor=h),(o||s)&&(m("delete"),m("has"),u)&&m("get"),(s||i)&&m(c),l)&&d.clear&&delete d.clear,O({global:!0,constructor:!0,forced:(p[e]=h)!==f},p),gr(h,e),l||n.setStrong(h,e,u),h},Du=pi.findIndex,Nu=!0,Fu=("findIndex"in[]&&Array(1).findIndex(function(){Nu=!1}),O({target:"Array",proto:!0,forced:Nu},{findIndex:function(e){return Du(this,e,1<arguments.length?arguments[1]:undefined)}}),er("findIndex"),Fa.getWeakData),Uu=Nt.set,ju=Nt.getterFor,zu=pi.find,Bu=pi.findIndex,Wu=y([].splice),Hu=0,qu=function(e){return e.frozen||(e.frozen=new Vu)},Vu=function(){this.entries=[]},Gu=function(e,t){return zu(e.entries,function(e){return e[0]===t})},a=(Vu.prototype={get:function(e){e=Gu(this,e);if(e)return e[1]},has:function(e){return!!Gu(this,e)},set:function(e,t){var n=Gu(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(t){var e=Bu(this.entries,function(e){return e[0]===t});return~e&&Wu(this.entries,e,1),!!~e}},{getConstructor:function(e,n,r,i){var e=e(function(e,t){ur(e,o),Uu(e,{type:n,id:Hu++,frozen:null}),ne(t)||oi(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,a=ju(n),s=function(e,t,n){var r=a(e),i=Fu(E(t),!0);return!0===i?qu(r).set(t,n):i[r.id]=n,e};return Xo(o,{"delete":function(e){var t,n=a(this);return!!R(e)&&(!0===(t=Fu(e))?qu(n)["delete"](e):t&&T(t,n.id)&&delete t[n.id])},has:function(e){var t,n=a(this);return!!R(e)&&(!0===(t=Fu(e))?qu(n).has(e):t&&T(t,n.id))}}),Xo(o,r?{get:function(e){var t,n=a(this);if(R(e))return!0===(t=Fu(e))?qu(n).get(e):t?t[n.id]:void 0},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),e}});function Ju(e){this.name="__st"+(1e9*Math.random()>>>0)+Pu+"__",null!=e&&e.forEach(this.add,this),Pu+=1}e("WeakSet",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},a),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{configurable:!0,writable:!0,value:function(e){if(null===this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var o=t[i];if(e.call(r,o,i,t))return o;i+=1}return undefined}}),window.WeakSet||(Pu=Date.now()%1e9,Ju.prototype.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},Ju.prototype["delete"]=function(e){return!!e[this.name]&&(e[this.name]=undefined,!0)},Ju.prototype.has=function(e){return!!e[this.name]},Lu=Ju,Object.defineProperty(window,"WeakSet",{value:function(e){return new Lu(e)}}));var $u=Object.assign,Zu=Object.defineProperty,Ku=y([].concat),Pr=!$u||g(function(){var e,t,n;return!(!d||1===$u({b:1},$u(Zu({},"a",{enumerable:!0,get:function(){Zu(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},(e={})[n=Symbol("assign detection")]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!==$u({},e)[n])||"abcdefghijklmnopqrst"!==st($u({},t)).join("")})?function(e,t){for(var n=ae(e),r=arguments.length,i=1,o=tr.f,a=vi.f;i<r;)for(var s,u=je(arguments[i++]),l=o?Ku(st(u),o(u)):st(u),c=l.length,f=0;f<c;)s=l[f++],d&&!I(a,u,s)||(n[s]=u[s]);return n}:$u,Yu=(O({target:"Object",stat:!0,arity:2,forced:Object.assign!==Pr},{assign:Pr}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e===undefined||null===e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++)if((r=arguments[n])!==undefined&&null!==r)for(var r=Object(r),i=Object.keys(Object(r)),o=0,a=i.length;o<a;o++){var s=i[o],u=Object.getOwnPropertyDescriptor(r,s);null!=u&&u.enumerable&&(t[s]=r[s])}return t}}),function(e){e.iterator=e.next=e.nextHandler=e.mapper=e.predicate=e.inner=e.iterables=e.iters=e.openIters=e.padding=e.finishResults=e.buffer=null}),Xu=Wn.IteratorPrototype,s=Ze("toStringTag"),Qu=Nt.set,xe=function(c){var f=Nt.getterFor(c?"WrapForValidIterator":"IteratorHelper");return Xo(_t(Xu),{next:function(){var e=f(this);if(c)return e.nextHandler();if(e.done)return Mr(undefined,!0);try{var t=e.nextHandler();return e.done&&Yu(e),e.returnHandlerResult?t:Mr(t,e.done)}catch(X){throw e.done=!0,Yu(e),X}},"return":function(){var e,t=f(this),n=t.iterator,r=t.inner,i=t.openIters,o=t.done;if(t.done=!0,c)return(e=Xt(n,"return"))?I(e,n):Mr(undefined,!0);if(Yu(t),!o){if(r)try{ti(r.iterator,"normal")}catch(X){return ti(n,"throw",X)}if(i)try{for(var a=i,s="normal",u=void 0,l=a.length-1;0<=l;l--)if(a[l]!==undefined)try{u=ti(a[l].iterator,s,u)}catch(X){s="throw",u=X}if("throw"===s)throw u}catch(X){if(n)return ti(n,"throw",X);throw X}n&&ti(n,"normal")}return Mr(undefined,!0)}})},el=xe(!0),tl=xe(!1),o=(it(tl,s,"Iterator Helper"),function(n,r,i){var e=function(e,t){t?(t.iterator=e.iterator,t.next=e.next):t=e,t.type=r?"WrapForValidIterator":"IteratorHelper",t.returnHandlerResult=!!i,t.nextHandler=n,t.counter=0,t.done=!1,Qu(this,t)};return e.prototype=r?el:tl,e}),Au=function(e,t){e="function"==typeof Iterator&&Iterator.prototype[e];if(e)try{e.call({next:null},t).next()}catch(X){return!0}},Wn=!Au("filter",function(){}),nl=!Wn&&Nr("filter",TypeError),xe=Wn||nl,rl=o(function(){for(var e,t=this.iterator,n=this.predicate,r=this.next;;){if(e=E(I(r,t)),this.done=!!e.done)return;if(Ru(t,n,[e=e.value,this.counter++],!0))return e}}),il=(O({target:"Iterator",proto:!0,real:!0,forced:xe},{filter:function(e){E(this);try{Oe(e)}catch(X){ti(this,"throw",X)}return nl?I(nl,this,e):new rl(ai(this),{predicate:e})}}),pi.filter),s=r("filter"),Wn=(O({target:"Array",proto:!0,forced:!s},{filter:function(e){return il(this,e,1<arguments.length?arguments[1]:undefined)}}),!Au("map",function(){})),ol=!Wn&&Nr("map",TypeError),xe=Wn||ol,al=o(function(){var e=this.iterator,t=E(I(this.next,e));if(!(this.done=!!t.done))return Ru(e,this.mapper,[t.value,this.counter++],!0)}),sl=(O({target:"Iterator",proto:!0,real:!0,forced:xe},{map:function(e){E(this);try{Oe(e)}catch(X){ti(this,"throw",X)}return ol?I(ol,this,e):new al(ai(this),{mapper:e})}}),pi.map),s=r("map"),ul=(O({target:"Array",proto:!0,forced:!s},{map:function(e){return sl(this,e,1<arguments.length?arguments[1]:undefined)}}),Fa.fastKey),ll=Nt.set,cl=Nt.getterFor,Wn={getConstructor:function(e,n,r,i){var e=e(function(e,t){ur(e,o),ll(e,{type:n,index:_t(null),first:null,last:null,size:0}),d||(e.size=0),ne(t)||oi(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,a=cl(n),s=function(e,t,n){var r,i=a(e),o=u(e,t);return o?o.value=n:(i.last=o={index:r=ul(t,!0),key:t,value:n,previous:t=i.last,next:null,removed:!1},i.first||(i.first=o),t&&(t.next=o),d?i.size++:e.size++,"F"!==r&&(i.index[r]=o)),e},u=function(e,t){var n,e=a(e),r=ul(t);if("F"!==r)return e.index[r];for(n=e.first;n;n=n.next)if(n.key===t)return n};return Xo(o,{clear:function(){for(var e=a(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=_t(null),d?e.size=0:this.size=0},"delete":function(e){var t,n,r=a(this),e=u(this,e);return e&&(t=e.next,n=e.previous,delete r.index[e.index],e.removed=!0,n&&(n.next=t),t&&(t.previous=n),r.first===e&&(r.first=t),r.last===e&&(r.last=n),d?r.size--:this.size--),!!e},forEach:function(e){for(var t,n=a(this),r=Gr(e,1<arguments.length?arguments[1]:undefined);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),Xo(o,r?{get:function(e){e=u(this,e);return e&&e.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),d&&Ut(o,"size",{configurable:!0,get:function(){return a(this).size}}),e},setStrong:function(e,t,n){var r=t+" Iterator",i=cl(t),o=cl(r);Ar(e,t,function(e,t){ll(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?Mr("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,Mr(undefined,!0))},n?"entries":"values",!n,!0),Ia(t)}},fl=(e("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},Wn),function(e,t){return(fl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)}),h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function dl(e,a,s,u){return new(s=s||Promise)(function(n,t){function r(e){try{o(u.next(e))}catch(a){t(a)}}function i(e){try{o(u["throw"](e))}catch(a){t(a)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((u=u.apply(e,a||[])).next())})}function hl(r,i){var o,a,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),"throw":t(1),"return":t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,a&&(s=2&t[0]?a["return"]:t[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,a=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!((s=0<(s=u.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){u=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))u.label=t[1];else if(6===t[0]&&u.label<s[1])u.label=s[1],s=t;else{if(!(s&&u.label<s[2])){s[2]&&u.ops.pop(),u.trys.pop();continue}u.label=s[2],u.ops.push(t)}}t=i.call(r,u)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function pl(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var ml=/_?t(\d)?(imestamp)?=\d+&?/g,gl=function(e,t){void 0===t&&(t="https://dem.rumt-zh.com");t=(e.url||"").replace(/\/+$/,"")||("string"==typeof t?t:"https://dem.rumt-zh.com");return e.url=t,e.hostUrl=t,e.offlineUrl=t+"/offline",e.whiteListUrl=t+"/collect/whitelist",e.pvUrl=t+"/collect/pv",e.eventUrl=t+"/collect/events",e.speedUrl=t+"/speed",e.customTimeUrl=t+"/speed/custom",e.performanceUrl=t+"/speed/performance",e.performanceUrlForHippy=t+"/speed/hippyPerformance",e.webVitalsUrl=t+"/speed/webvitals",e.setDataReportUrl=t+"/speed/miniProgramData",e},vl=["aegis.qq.com","tamaegis.com","/aegis-sdk","rumt-","/flog.core.min.js","pingfore.qq.com","pingfore.tencent.com","zhiyan.tencent-cloud.net","h.trace.qq.com","btrace.qq.com","beacon.qq.com","dmplog.qq.com","qq.com/report","svibeacon.onezapp.com","cube.weixinbridge.com","doubleclick.net","pcmgrmonitor.3g.qq.com","tdm.qq.com","report.qqweb.qq.com","tpstelemetry.tencent.com","galileotelemetry.tencent.com","insight.cloud.tencent.com","facebook.com","facebook.net","google","yahoo.com","twitter.com","ga-audiences","report.idqqimg.com","arms-retcode.aliyuncs.com","px.effirst.com","sentry","baidu.com","hot-update.json","u.c.b.r.o.w.s.e.r","report.url.cn","sockjs-node","m3u8","flv"],yl=["ResizeObserver loop limit exceeded","ResizeObserver loop completed","Failed to execute 'transaction'","window.indexedDB.deleteDatabase is not a function"],wl=["ext1","ext2","ext3","ext4","ext5","ext6","ext7","ext8","ext9","ext10","level","trace","tag","seq","code"],bl=["static","fetch"],kl="unknown",Sl=function(e,t,n,r,i,o,a,s){for(var u,l,c=i,f=0,d=!!a&&Gr(a,s);f<r;)f in n&&(u=d?d(n[f],f,t):n[f],0<o&&K(u)?(l=fe(u),c=Sl(e,t,u,l,c,o-1)-1):(he(c+1),Vn(e,c,u)),c++),f++;return c},_l=Sl,El=(O({target:"Array",proto:!0},{flatMap:function(e){var t,n=ae(this),r=fe(n);return Oe(e),t=hi(n,0),_l(t,n,n,r,0,1,e,1<arguments.length?arguments[1]:undefined),t}}),Nr("some",TypeError)),Cl=(O({target:"Iterator",proto:!0,real:!0,forced:El},{some:function(n){E(this);try{Oe(n)}catch(X){ti(this,"throw",X)}var e,r;return El?I(El,this,n):(e=ai(this),oi(e,function(e,t){if(n(e,r++))return t()},{IS_RECORD:!(r=0),INTERRUPTED:!0}).stopped)}}),pi.some),xe=Fe("some"),r=(O({target:"Array",proto:!0,forced:!xe},{some:function(e){return Cl(this,e,1<arguments.length?arguments[1]:undefined)}}),er("flatMap"),g(function(){return 1!==[1].values().flatMap(function(){return[1]}).find(function(){return!0})})),s=!r&&!Au("flatMap",function(){}),Ol=!r&&!s&&Nr("flatMap",TypeError),xe=r||s||Ol,Rl=o(function(){for(var e,t,n=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=E(I(t.next,t.iterator))).done)return e.value;this.inner=null}catch(X){ti(n,"throw",X)}if(e=E(I(this.next,n)),this.done=!!e.done)return;try{this.inner=function(e,t){t&&"string"==typeof e||E(e);t=Xr(e);return ai(E(t!==undefined?I(t,e):e))}(r(e.value,this.counter++),!1)}catch(X){ti(n,"throw",X)}}});O({target:"Iterator",proto:!0,real:!0,forced:xe},{flatMap:function(e){E(this);try{Oe(e)}catch(X){ti(this,"throw",X)}return Ol?I(Ol,this,e):new Rl(ai(this),{mapper:e,inner:null})}});Pl.prototype.indexOf=function(e,t){for(var n=0;n<e.length;n++)if(e[n].callback===t)return n;return-1},Pl.prototype.on=function(e,t,n){var r;if(void 0===n&&(n=0),this)return(r=this.eventsList[e])||(this.eventsList[e]=[],r=this.eventsList[e]),-1===this.indexOf(r,t)&&r.push({name:e,type:n||0,callback:t}),this},Pl.prototype.one=function(e,t){this.on(e,t,1)},Pl.prototype.remove=function(e,t){if(this){var n=this.eventsList[e];if(n){if(t)return n.length&&(t=this.indexOf(n,t),n.splice(t,1)),this;try{delete this.eventsList[e]}catch(b){}}return null}},Pl.prototype.clear=function(){this.eventsList={}};var xl,Il=Pl,Tl=function(e){try{return localStorage.getItem(e)}catch(g0){return null}},Ml=function(e,t){try{localStorage.setItem(e,t)}catch(g0){}},Al=function(e,t){try{return e?JSON.parse(e):t}catch(g0){return t}};function Pl(){var a=this;this.emit=function(e,t){if(a){var n;if(null!=(r=a.eventsList[e])&&r.length)for(var r=r.slice(),i=0;i<r.length;i++){n=r[i];try{var o=n.callback.apply(a,[t]);if(1===n.type&&a.remove(e,n.callback),!1===o)break}catch(k){throw k}}return a}},this.eventsList={}}(Au=xl=xl||{})[Au.number=-1]="number",Au.string="";var Ll,Dl=function(e,t){return"number"==typeof e||"string"==typeof e?e:t?xl.string:xl.number},Nl=function(e,t){return"string"==typeof e?e.split("?")[t?1:0]||"":e},Fl=function(e,t){return void 0===t&&(t=2048),String(e).replace(ml,"").slice(0,t)},Ul=function(e){return"string"==typeof e&&/^\//.test(e)?"https:"===(null==location?void 0:location.protocol):/^https/.test(e)},jl=["application/xhtml+xml","application/xml","application/pdf","application/pkcs12","application/javascript","application/x-javascript","application/ecmascript","application/vnd.mspowerpoint","application/vnd.apple.mpegurl","application/ogg","text/css","text/javascript","image","audio","video","video/mp2t"],zl=/\.(json|js|css|jpg|jpeg|png|svg|apng|webp|gif|bmp|mp4|mp3|ts|mpeg|wav|webm|ogg|flv|m3u8|ttf|woff2|otf|eot|woff|html|htm|shtml|shtm|)$/i,Bl=["ret","retcode","code","errcode"],Wl=function(e,t,n){var r,i,o;try{if("function"==typeof(null==t?void 0:t.retCodeHandler))return{code:void 0===(o=(i=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code)?kl:o,isErr:i.isErr};if(!(e="string"==typeof e?JSON.parse(e):e))return{code:kl,isErr:!1};"function"==typeof(null==(r=null==t?void 0:t.ret)?void 0:r.join)&&(Bl=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var a=Object.getOwnPropertyNames(e).filter(function(e){return-1!==Bl.indexOf(e.toLowerCase())});return a.length?{code:""+(o="未知"!==(o=e[a[0]])&&""!==o?o:kl),isErr:0!==o&&"0"!==o&&o!==kl}:{code:kl,isErr:!1}}catch(Me){return{code:kl,isErr:!1}}},Hl=function(e,t,n){try{var r="function"==typeof t?t(e,null==n?void 0:n.url,null==n?void 0:n.ctx)||"":e;return Jl(r).slice(0,10240)}catch(b){return""}},ql=function(){var n=new WeakSet;return function(e,t){if(t instanceof Error)return"Error.message: "+t.message+" \n Error.stack: "+t.stack;if("object"===S(t)&&null!==t){if(n.has(t))return"[Circular "+(e||"root")+"]";n.add(t)}return t}},Vl=function(e){if("string"==typeof e)return e;try{return e instanceof Error?(JSON.stringify(e,ql(),2)||"undefined").replace(/"/gim,""):JSON.stringify(e,ql(),2)||"undefined"}catch(w){return"error happen when tdem stringify: \n "+w.message+" \n "+w.stack}},Gl=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e,ql())||"undefined"}catch(w){return"error happen when tdem stringify: \n "+w.message+" \n "+w.stack}},Jl=function(n,r){void 0===r&&(r=3);var i,o,a,s="";return Array.isArray(n)?(s+="[",i=n.length,n.forEach(function(e,t){"object"===S(e)&&1<r?s+=Jl(e,r-1):s+=Zl(e),s+=t===i-1?"":","}),s+="]"):n instanceof Object||"object"===S(n)?(s="{",o=Object.keys(n),a=o.length,o.forEach(function(e,t){"object"===S(n[e])&&1<r?s+='"'+e+'":'+Jl(n[e],r-1):s+=$l(e,n[e]),s+=t===a-1||t<a-1&&"undefined"==typeof n[o[t+1]]?"":","}),s+="}"):s+=n,s},$l=function(e,t){var n=S(t),r="";return"string"===n||"object"===n?r+='"'+e+'":"'+t+'"':"function"==typeof t?r+='"'+e+'":"function '+t.name+'"':"symbol"===S(t)?r+='"'+e+'":"symbol"':"number"!=typeof t&&"boolean"!==n||(r+='"'+e+'": '+t),r},Zl=function(e){var t=S(e);return""+("undefined"===t||"symbol"===t||"function"===t?"null":"string"===t||"object"===t?'"'+e+'"':e)},Kl=function(t){var n;return t.payload?(n={},Object.keys(t).forEach(function(e){"payload"!==e&&(n[e]=t[e])}),n):t},Yl=function(e,t){var n,r={fetch:[],"static":[],bridge:[]},i=new FormData;return Array.isArray(e)?e.forEach(function(e){var t=Kl(e);r[e.type].push(t)}):(n=Kl(e),r[e.type].push(n)),i.append("payload",Gl(h({duration:r},t))),i},Xl=/data:(image|text|application|font)\/.*;base64/,Ql=function(t,e){return"string"!=typeof t||!t||e&&-1<t.indexOf(e)||Xl.test(t)||vl.some(function(e){return-1<t.indexOf(e)})};(r=Ll=Ll||{}).LOG="log",r.SPEED="speed",r.PERFORMANCE="performance",r.OFFLINE="offline",r.WHITE_LIST="whiteList",r.VITALS="vitals",r.PV="pv",r.CUSTOM_PV="customPV",r.EVENT="event",r.CUSTOM="custom",r.SDK_ERROR="sdkError",r.SET_DATA="setData",r.LOAD_PACKAGE="loadPackage",r.MEMORY="memory";var ec,p,tc,nc={maxAttempts:3,delays:[0,1e3,3e3]};function rc(){return"evt_"+Date.now()+"_"+Math.random().toString(36).substring(2,8)}function ic(e){var t=[];if(e.stack)for(var n=0,r=0,i=e.stack.split("\n");r<i.length;r++){var o,a,s,u,l,c=i[r],f=c.match(/at\s+(.+?)\s+\((.+?):(\d+):(\d+)\)/);f?(o=f[1],a=f[2],s=f[3],u=f[4],l=a.split("/").pop()||a,t.push({abs_path:a,colno:parseInt(u,10),filename:l,"function":o||"(anonymous)",lineno:parseInt(s,10),in_app:a.includes("node_modules")||a.includes("cdn")?0:1,stack_level:n++})):(f=c.match(/at\s+(.+?):(\d+):(\d+)/))&&(a=f[1],s=f[2],u=f[3],l=a.split("/").pop()||a,t.push({abs_path:a,colno:parseInt(u,10),filename:l,"function":"(anonymous)",lineno:parseInt(s,10),in_app:a.includes("node_modules")||a.includes("cdn")?0:1,stack_level:n++}))}return t}(s=ec=ec||{}).production="production",s.development="development",s.gray="gray",s.pre="pre",s.daily="daily",s.local="local",s.test="test",s.others="others",(o=p=p||{}).JS_ERROR="js_error",o.PROMISE_ERROR="promise_error",o.RESOURCE_ERROR="resource_error",o.API_ERROR="api_error",o.PAGE_LOAD="page_load",o.RESOURCE_LOAD="resource_load",o.API_CALL="api_call",o["true"]="web_vitals",o.CLICK="click",o.PAGE_VIEW="page_view",o.TAB_HIDDEN="tab_hidden",o.TAB_VISIBLE="tab_visible",o.WINDOW_BLUR="window_blur",o.WINDOW_FOCUS="window_focus",o.FORM_FOCUS="form_focus",o.FORM_BLUR="form_blur",o.FORM_CHANGE="form_change",o.FORM_SUBMIT="form_submit",o.FORM_SUBMIT_RESULT="form_submit_result",o.STRUGGLE="struggle",o.CUSTOM="custom",o.LOG="log",(xe=tc=tc||{}).ERROR="error",xe.PERFORMANCE="performance",xe.BEHAVIOR="behavior",xe.NETWORK="network",xe.LOG="log",xe.CUSTOM="custom";var oc=TypeError,ac="Reduce of empty array with no initial value",r=function(l){return function(e,t,n,r){var i=ae(e),o=je(i),a=fe(i);if(Oe(t),0===a&&n<2)throw new oc(ac);var s=l?a-1:0,u=l?-1:1;if(n<2)for(;;){if(s in o){r=o[s],s+=u;break}if(s+=u,l?s<0:a<=s)throw new oc(ac)}for(;l?0<=s:s<a;s+=u)s in o&&(r=t(r,o[s],s,i));return r}},s={left:r(!1),right:r(!0)},o=function(e){return Bn.slice(0,e.length)===e},sc=o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":x.Bun&&"string"==typeof Bun.version?"BUN":x.Deno&&"object"==S(Deno.version)?"DENO":"process"===ee(x.process)?"NODE":x.window&&x.document?"BROWSER":"REST",uc="NODE"==sc,lc=s.left,xe=!uc&&79<Hn&&Hn<83||!Fe("reduce"),cc=(O({target:"Array",proto:!0,forced:xe},{reduce:function(e){var t=arguments.length;return lc(this,e,t,1<t?arguments[1]:undefined)}}),TypeError),r=g(function(){[].keys().reduce(function(){},undefined)}),fc=!r&&Nr("reduce",cc),dc=(O({target:"Iterator",proto:!0,real:!0,forced:r||fc},{reduce:function(t){E(this);try{Oe(t)}catch(X){ti(this,"throw",X)}var n=arguments.length<2,r=n?undefined:arguments[1];if(fc)return Re(fc,this,n?[t]:[t,r]);var e=ai(this),i=0;if(oi(e,function(e){r=n?(n=!1,e):t(r,e,i),i++},{IS_RECORD:!0}),n)throw new cc("Reduce of empty iterator with no initial value");return r}}),TypeError),hc=function(e,t){if(e<t)throw new dc("Not enough arguments");return e},pc=x.Function,mc=/MSIE .\./.test(Bn)||"BUN"==sc&&((o=x.Bun.version.split(".")).length<3||"0"===o[0]&&(o[1]<3||"3"===o[1]&&"0"===o[2])),xe=function(o,a){var s=a?2:1;return mc?function(e,t){var n=hc(arguments.length,1)>s,r=_(e)?e:pc(e),i=n?Gn(arguments,s):[],e=n?function(){Re(r,this,i)}:r;return a?o(e,t):o(e)}:o},r=xe(x.setInterval,!0),o=(O({global:!0,bind:!0,forced:x.setInterval!==r},{setInterval:r}),xe(x.setTimeout,!0)),gc=(O({global:!0,bind:!0,forced:x.setTimeout!==o},{setTimeout:o}),function(e){return e.filter(function(n,r){return"static"!==n.type||!e.find(function(e,t){return n.url===e.url&&200===n.status&&r<t})})}),vc=(O({target:"String",proto:!0},{repeat:qr}),{}),yc={},wc=function(e){return vc[e]||(vc[e]=setTimeout(function(){yc[e]={},vc[e]=null},6e4)),vc[e]},bc=function(c,f){return function(i,o){var a,s,u,l,e,t,n;null!=i&&i.log&&null!=i&&i.type?(s=function(e,t){var n,r,t=h(h({},c.bean),{from:t}),i=h({},c.bean);return function(){try{return"undefined"!=typeof FormData&&"function"==typeof FormData.prototype.append}catch(a){}}()?Yl(e,t):(t=e,e=i,r={fetch:[],"static":[],bridge:[]},i={},Array.isArray(t)?t.forEach(function(e){var t;null!=(t=r[e.type])&&t.push(e)}):null!=(n=r[t.type])&&n.push(t),i.payload=JSON.stringify(h({duration:r},e)),i)},u=function(e,t,n,r){switch(t){case Ll.LOG:o=e;var i=(Array.isArray(o)?o:[o]).map(function(n){return Object.getOwnPropertyNames(n).reduce(function(e,t){return"ctx"!==t&&(e[t]=n[t]),e},{level:"2",msg:""})});if(!i||0===i.length)return"{}";i=Array.isArray(i)?i:[i];var o=Array.from(new Set(i.flatMap(function(e){return Object.keys(e)}))),a={};return o.forEach(function(t){a[t]=i.map(function(e){return e[t]||""})}),a.count=i.length,Gl(a);case Ll.SPEED:return s(e,n);case Ll.EVENT:return r;default:return r||{}}var o},1!==(e=Array.isArray(i.log)?i.log:[i.log]).length?(l={},e.forEach(function(e){var t=e.from||"undefined";delete e.from,l[t]||(l[t]=[]),l[t].push(e)}),Object.keys(l).forEach(function(e){var t,n=l[e],r=null!=(r=i.url)&&r.includes("?")?"&":"?";"undefined"===e?(t=""+i.url,o(h(h({},i),{url:t,log:1===n.length?n[0]:n,data:u(n,f,e,i.data)}))):(t=i.url+r+"from="+e,o(h(h({},i),{url:t,log:1===n.length?n[0]:n,beanFilter:pl(i.beanFilter||[],["from"]),data:u(n,f,e,i.data)})))})):(t=(e=e[0]).from,delete e.from,n=null!=(a=i.url)&&a.includes("?")?"&":"?",t?(n=i.url+n+"from="+t,o(h(h({},i),{url:n,log:e,beanFilter:pl(i.beanFilter||[],["from"]),data:u(e,f,t,i.data)}))):(n=""+i.url,o(h(h({},i),{url:n,log:e,data:u(e,f,t,i.data)}))))):o(i)}},kc=function(u,l){return function(e,t){var n,r,i,o=Array.isArray(e),a=o?e:[e],s=(u.lifeCycle.emit("beforeRequest",e),u.config.beforeRequest);(a="function"==typeof s?a.map(function(e){try{var t=s({logs:e,logType:l});return(null==t?void 0:t.logType)===l&&null!=t&&t.logs?t.logs:!1!==t&&e}catch(X){return e}}).filter(function(e){return!1!==e}):a).length&&(n=a,e=wl,!Array.isArray(n)||n.length<=1||(r=[],i=[],!(i="string"==typeof e?[e]:e))||i.length<=0||(i.forEach(function(t){n.forEach(function(e){null!=e&&e[t]&&r.push(t)})}),0<r.length&&(n=n.map(function(e){var t={};return r.forEach(function(e){t[e]=""}),h(h({},t),e)}))),a=n,t(o?a:a[0]))}},Sc=function(i){return function(e,t){i.lifeCycle.emit("modifyRequest",e);var n=i.config.modifyRequest;if("function"==typeof n)try{var r=n(e);"object"===S(r)&&"url"in r&&(e=r)}catch(X){console.error(X)}t(e)}},_c=function(r){return function(e,t){null!=(n=r.lifeCycle)&&n.emit("afterRequest",e);var n=(r.config||{}).afterRequest;"function"==typeof n&&!1===n(e)||t(e)}},r=Kn.f,Ec=ir.f,Cc=rt.f,Oc=i.trim,Rc=x.Number,xc=(wi.Number,Rc.prototype),Ic=x.TypeError,Tc=y("".slice),Mc=y("".charCodeAt),Ac=function(e){var t,n,r,i,o,a,s,u=So(e,"number");if($i(u))throw new Ic("Cannot convert a Symbol value to a number");if("string"==typeof u&&2<u.length)if(u=Oc(u),43===(e=Mc(u,0))||45===e){if(88===(t=Mc(u,2))||120===t)return NaN}else if(48===e){switch(Mc(u,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+u}for(o=(i=Tc(u,2)).length,a=0;a<o;a++)if((s=Mc(i,a))<48||r<s)return NaN;return parseInt(i,n)}return+u},xe=js("Number",!Rc(" 0o1")||!Rc("0b1")||Rc("+0x1")),Pc=function(e){var t,e=arguments.length<1?0:Rc(function(e){e=So(e,"number");return"bigint"==typeof e?e:Ac(e)}(e));return Se(xc,t=this)&&g(function(){Co(t)})?ua(Object(e),this,Pc):e};if(Pc.prototype=xc,xe&&(xc.constructor=Pc),O({global:!0,constructor:!0,wrap:!0,forced:xe},{Number:Pc}),xe)for(var Lc=wi.Number,Dc=Rc,Nc,Fc=d?r(Dc):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Uc=0;Fc.length>Uc;Uc++)T(Dc,Nc=Fc[Uc])&&!T(Lc,Nc)&&Cc(Lc,Nc,Ec(Dc,Nc));var jc={generateTraceId:Bc(16),generateSpanId:Bc(8)},zc=Array(32);function Bc(t){return function(){for(var e=0;e<2*t;e++)zc[e]=Math.floor(16*Math.random())+48,58<=zc[e]&&(zc[e]+=39);return String.fromCharCode.apply(null,zc.slice(0,2*t))}}function Wc(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}var Hc=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},qc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Vc=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Gc=function(e){for(var t,n,r,i="",o=0,a=(e=String(e)).length%3;o<e.length;){if(255<(t=e.charCodeAt(o++))||255<(n=e.charCodeAt(o++))||255<(r=e.charCodeAt(o++)))throw new TypeError("Failed to execute 'btoa': The string to be encoded contains characters outside of the Latin1 range.");i+=qc.charAt((t=t<<16|n<<8|r)>>18&63)+qc.charAt(t>>12&63)+qc.charAt(t>>6&63)+qc.charAt(63&t)}return a?i.slice(0,a-3)+"===".substring(a):i},Jc=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Vc.test(e))throw new TypeError("Failed to execute 'atob': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",o=0;o<e.length;)t=qc.indexOf(e.charAt(o++))<<18|qc.indexOf(e.charAt(o++))<<12|(n=qc.indexOf(e.charAt(o++)))<<6|(r=qc.indexOf(e.charAt(o++))),i+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i},$c=(Yc.prototype.generate=function(e,t,n){if(void 0===t&&(t={}),this.url=e,!this.isUrlIgnored()&&this.isUrlInTraceUrls()&&this.traceType){switch(this.traceType){case"traceparent":this.traceId=this.createTraceparent();break;case"b3":this.traceId=this.createB3();break;case"sw8":this.traceId=this.createSw8(n);break;case"sentry-trace":this.traceId=this.createSentryTrace();break;default:return console.warn("this trace key "+this.traceType+" is not supported"),void(this.traceId="")}return t[this.traceType]&&(this.traceId=t[this.traceType]),{name:this.traceType,value:this.traceId}}},Yc.prototype.createTraceparent=function(){var e=jc.generateSpanId();return"00-"+jc.generateTraceId()+"-"+e+"-0"+this.traceFlag.toString(16)},Yc.prototype.createB3=function(){var e=jc.generateSpanId();return jc.generateTraceId()+"-"+e+"-"+this.traceFlag},Yc.prototype.createSw8=function(e){var t="function"==typeof btoa?btoa:Gc,e=e||{},n=e.host,n=void 0===n?"":n,e=e.pathname,e=void 0===e?"":e,r=Hc(),i=Hc();return"1-"+String(t(i))+"-"+String(t(r))+"-1-"+String(t("tdem"))+"-"+String(t("1.0.8"))+"-"+String(t(encodeURI(e)))+"-"+String(t(n))},Yc.prototype.createSentryTrace=function(){var e=Wc().substring(16);return Wc()+"-"+e+"-"+this.traceFlag},Yc.prototype.isUrlIgnored=function(){if(Array.isArray(this.ignoreUrls)&&0!==this.ignoreUrls.length)for(var e=0,t=this.ignoreUrls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}return!1},Yc.prototype.isUrlInTraceUrls=function(){if(!this.urls)return!0;if(Array.isArray(this.urls)){if(0===this.urls.length)return!1;for(var e=0,t=this.urls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}}return!1},Yc.prototype.urlMatches=function(e,t){return"string"==typeof t?e===t:!!e.match(t)},Yc),Zc={sw8:function(e){var t="function"==typeof atob?atob:Jc,e=e.split("-")[1];return e?t(e):""},traceparent:function(e){return e.split("-")[1]},b3:function(e){return e.split("-")[0]},"sentry-trace":function(e){return e.split("-")[0]}},Kc=function(e){var t,n="";return n="object"===S(e)&&(t=(e=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=e[r]||"function"==typeof e.get&&e.get(r);if(i)return[r,i]}return["",""]}(e,Object.keys(Zc)))[0])?Zc[t](e[1]):n};function Yc(e,t,n,r){void 0===n&&(n=null),this.traceType=e,this.ignoreUrls=t,this.urls=n,this.traceFlag=r===undefined||null===r?1:Number(!!r)}function Xc(u){return function(e){e&&0!==e.length&&u.sendPipeline([function(t,e){var n,r,i,o,a={protocol_version:2,project_key:String(u.config.id||""),sdk:{name:u.sdkName,version:u.sdkVersion},app:{version:String(u.config.version||"1.0.0")},context:(n=u,r=String((null==(a=null==(r=null==(a=n.sessionManager)?void 0:a.getSession)?void 0:r.call(a))?void 0:a.id)||n.bean.sessionId||""),a=String(n.config.userId||n.config.uin||""),r={session_id:r,platform:(r=String(n.runtimePlatform||n.config.platform||"web").trim().toLowerCase(),["web","miniprogram","android","ios","electron","unknown"].includes(r)?r:["wx","my","qq","tt"].includes(r)?"miniprogram":"undefined"!=typeof window?"web":"unknown")},a&&(r.user_id=a),a=n.bean.runtime?String(n.bean.runtime):"",s=n.bean.processType?String(n.bean.processType):"",i=n.bean.windowId!==undefined?String(n.bean.windowId):"",o=n.bean.webContentsId!==undefined?String(n.bean.webContentsId):"",n=n.bean.appVersion?String(n.bean.appVersion):"",a&&(r.runtime=a),s&&(r.process_type=s),i&&(r.window_id=i),o&&(r.web_contents_id=o),n&&(r.app_version=n),"undefined"!=typeof navigator&&(r.user_agent=navigator.userAgent,r.language=navigator.language),"undefined"!=typeof screen&&(r.screen_resolution=screen.width+"x"+screen.height),r),events:t},s=String(u.config.url||"").replace(/\/+$/,"");s&&e({url:s+"/api/v1/collect/events",data:JSON.stringify(a),method:"POST",contentType:"application/json",addBean:!1,type:Ll.EVENT,log:t,success:function(){u.lifeCycle.emit("afterReport",{success:!0,events:t})},fail:function(e){u.lifeCycle.emit("afterReport",{success:!1,error:e,events:t})}})}],Ll.EVENT)(e)}}var Qc=function(){},ef=function(n){if(n&&n.reduce&&n.length)return 1===n.length?function(e,t){n[0](e,t||Qc)}:n.reduce(function(n,r){return function(e,t){return void 0===t&&(t=Qc),n(e,function(e){return null==r?void 0:r(e,t)})}});throw new TypeError("createPipeline need at least one function param")},tf=(O({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(e){for(var t,n,r=ze(e),i=ir.f,o=rr(r),a={},s=0;o.length>s;)(n=i(r,t=o[s++]))!==undefined&&Vn(a,t,n);return a}}),function(t,n){Object.getOwnPropertyNames(t).forEach(function(e){"function"==typeof t[e]&&"constructor"!==e&&(n?n[e]="sendPipeline"===e?function(){return function(){}}:function(){}:t[e]=function(){})})}),nf={rage_click:3,dead_click:4,error_click:4,form_validation_error:3,slow_page:3,back_forward:2,long_focus_time:2,form_zigzag:2,uncompleted_form:3,custom_struggle:3},rf={rage_click:4,dead_click:5,error_click:5,form_validation_error:4,slow_page:4,back_forward:3,long_focus_time:3,form_zigzag:3,uncompleted_form:3,custom_struggle:3},of=(c.use=function(e){-1===c.installedPlugins.indexOf(e)&&e.tdemPlugin&&c.installedPlugins.push(e)},c.unuse=function(e){e=c.installedPlugins.indexOf(e);-1!==e&&c.installedPlugins.splice(e,1)},c.prototype.getInternalTransport=function(){return this.internalTransport},c.prototype.setInternalTransport=function(e){this.internalTransport=e},c.prototype.getInternalRetrySchedule=function(){return this.internalRetrySchedule},c.prototype.transportRequest=function(t,n){return dl(this,void 0,void 0,function(){return hl(this,function(e){switch(e.label){case 0:if(this.internalTransport)return[4,this.internalTransport.request(t,n)];throw new Error("Internal Transport is not configured");case 1:return[2,e.sent()||{ok:!0,request:t}]}})})},c.prototype.transportHandoff=function(t,n){return dl(this,void 0,void 0,function(){return hl(this,function(e){switch(e.label){case 0:if(this.internalTransport)return[4,(this.internalTransport.handoff||this.internalTransport.request).call(this.internalTransport,h(h({},t),{handoff:!0}),n)];throw new Error("Internal Transport is not configured");case 1:return[2,e.sent()||{ok:!0,request:t,handoffAccepted:!0}]}})})},c.prototype.init=function(e){this.setConfig(e),this.config=gl(this.config,e.hostUrl);for(var t=0;t<c.installedPlugins.length;t++)try{c.installedPlugins[t].patch(this)}catch(v){this.sendSDKError(v)}this.lifeCycle.emit("onInited")},c.prototype.destroy=function(e){void 0===e&&(e=!1);var t,n,r=c.instances.indexOf(this);-1!==r&&c.instances.splice(r,1);for(var i=c.installedPlugins.length-1;0<=i;i--)try{c.installedPlugins[i].unpatch(this)}catch(D){this.sendSDKError(D)}if(this.lifeCycle.emit("destroy"),this.lifeCycle.clear(),e)t=this,n=Object.getOwnPropertyDescriptors(t),Object.keys(n).forEach(function(e){n[e].writable&&(t[e]=null)}),Object.setPrototypeOf(this,null);else{for(var o=this;o.constructor!==Object&&tf(o,this),o=Object.getPrototypeOf(o););0===c.instances.length&&(r=Object.getPrototypeOf(this).constructor,tf(r),tf(c))}},c.prototype.setConfig=function(e){Object.assign(this.config,e);var e=this.config,t=e.id,n=e.uin,r=e.version,i=e.aid,o=e.env,a=void 0===o?"production":o,o=e.pageUrl,e=e.userId||(n!==undefined&&null!==n?String(n):""),n=this.bean.id!==t||this.bean.uin!==e||this.bean.aid!==i;return this.bean.id=t||"",this.bean.uin=e,this.bean.version=r||"1.0.8",this.bean.aid=i||"",this.bean.env=function(){switch(a){case ec.production:case ec.development:case ec.gray:case ec.pre:case ec.daily:case ec.local:case ec.test:case ec.others:return 1;default:return}}()?a:ec.others,o&&this.extendBean("from",encodeURIComponent(o.slice(0,2048))),n&&this.lifeCycle.emit("onConfigChange",this.config),this.config},c.prototype.extendBean=function(e,t){this.bean[e]=t},c.prototype.send=function(e,i,o){var t=this;return ef([Sc(this),bc(this,null==e?void 0:e.type),function(n,r){t.request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!1,result:e,logType:n.type,logs:n.log}),null!=i&&i.apply(void 0,e)},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!0,result:e,logType:n.type,logs:n.log}),null!=o&&o.apply(void 0,e)})},_c(this)])(e)},c.prototype.sendSDKError=function(e){var n=this;this.sendPipeline([function(e,t){t({url:n.config.url+"?id=1085&msg[0]="+encodeURIComponent(Vl(e))+"&level[0]=2&from="+n.config.id+"&count=1&version="+n.config.id+"(1.0.8)",addBean:!1,method:"get",type:Ll.SDK_ERROR,log:e})}],Ll.SDK_ERROR)(e)},c.prototype.sendPipeline=function(e,t){var n,o=this;return ef(pl([function(e,t){if(e&&e.type===Ll.EVENT)return t(e);if("number"!=typeof n.config.random&&(console.warn("random must in [0, 1], default is 1."),n.config.random=1),!n.isHidden||!n.isGetSample)if(n.isGetSample)n.isHidden||t(e);else{if(n.isGetSample=!0,Math.random()<n.config.random)return n.isHidden=!1,t(e);n.isHidden=!0}},kc(n=this,t)],e,[bc(this,t),Sc(this),function(r,i){o.request(r,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;-1<(""+e[o.failRequestCount=0]).indexOf("403 forbidden")&&(n=!0,o.destroy()),i({isErr:n,result:e,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(n=null==r?void 0:r.success)&&n.call.apply(n,pl([r],e))},function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];60<=++o.failRequestCount&&o.destroy(),-1<(""+t[0]).indexOf("403 forbidden")&&o.destroy(),i({isErr:!0,result:t,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(e=null==r?void 0:r.fail)&&e.call.apply(e,pl([r],t))})},_c(this)]))},c.prototype.track=function(e,t){void 0===t&&(t={}),e&&"string"==typeof e?(e={event_id:rc(),event_type:p.CUSTOM,event_category:tc.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{event_name:e,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),payload:this.sanitizeEventPayload(t.payload),event_properties:this.sanitizeEventProperties(t.properties)}},this.reportTDEMEvent(e)):console.warn("track: name must be a non-empty string")},c.prototype.reportTDEMEvent=function(e){var n=this,e=Array.isArray(e)?e:[e];e.length&&(e=e.map(function(e){var t;return h(h({},e),{page_url:e.page_url||n.getCurrentEventPageUrl(),data:h(h({},e.data),n.mergeEventTags(null==(t=e.data)?void 0:t.tags)?{tags:n.mergeEventTags(null==(t=e.data)?void 0:t.tags)}:{})})}),this.lifeCycle.emit("tdemEventCreated",e),this.tdemEventPipeline(e))},c.prototype.measure=function(e,t,n){void 0===n&&(n={}),e&&"string"==typeof e?"number"==typeof t?t<0||2147483646<t?console.warn("measure: duration must between 0 and 2147483646"):this.submitMeasure(e,t,n):console.warn("measure: duration must be a number"):console.warn("measure: name must be a non-empty string")},c.prototype.startMeasure=function(e){"string"==typeof e&&e?this.timeMap[e]?console.warn("Measure "+e+" already exists"):this.timeMap[e]=Date.now():console.warn("startMeasure: name must be a non-empty string")},c.prototype.endMeasure=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?(n=this.getTimeEventDuration(e))!==undefined?(this.submitMeasure(e,n,t),delete this.timeMap[e]):console.warn("Measure "+e+" does not exist"):console.warn("endMeasure: name must be a non-empty string")},c.prototype.captureMessage=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?(n="error"===t.level?"error":"warn"===t.level?"warn":"info",n={event_id:rc(),event_type:p.LOG,event_category:tc.LOG,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{log_level:n,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(h({message:e},t.properties||{}))}},this.reportTDEMEvent(n)):console.warn("captureMessage: message must be a non-empty string")},c.prototype.captureException=function(e,t){void 0===t&&(t={});var e="string"==typeof e?new Error(e):e;e instanceof Error?(e={event_id:rc(),event_type:p.JS_ERROR,event_category:tc.ERROR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{exception_stacks:[{type:e.name||"Error",value:e.message,mechanism_type:"manual",mechanism_handled:1}],exception_frames:ic(e),replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(h(h({},t.properties||{}),t.level?{capture_level:t.level}:{}))}},this.reportTDEMEvent(e)):console.warn("captureException: error must be an Error or string")},c.prototype.setTags=function(e){e=this.sanitizeEventTags(e);this.setConfig({defaultTags:h(h({},this.config.defaultTags||{}),e||{})})},c.prototype.removeTags=function(e){var t,e=Array.isArray(e)?e:[e];e.length&&(t=h({},this.config.defaultTags||{}),e.forEach(function(e){delete t[e]}),this.setConfig({defaultTags:t}))},c.prototype.clearTags=function(){this.setConfig({defaultTags:{}})},c.prototype.setUser=function(e){"string"==typeof e&&e?this.setConfig({userId:e}):console.warn("setUser: userId must be a non-empty string")},c.prototype.clearUser=function(){this.setConfig({userId:"",uin:""})},c.prototype.reportStruggle=function(e){var t,n,r;e&&e.type&&e.ownerType&&e.ownerKey?(r=e.type,t="number"==typeof e.severity?e.severity:nf[r],n="number"==typeof e.weight?e.weight:rf[r],r={event_id:rc(),event_type:p.STRUGGLE,event_category:tc.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:r,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(e.tags),is_effective_action:!1,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),struggle_weight:n,struggle_severity:t,struggle_value:"number"==typeof e.value?e.value:n*t,event_properties:{form_id:e.formId||"",field_id:e.fieldId||"",trigger_event_id:e.triggerEventId||"",struggle_status:e.status||"detected",struggle_owner_type:e.ownerType,struggle_owner_key:e.ownerKey,detection_source:e.detectionSource||"sdk_auto",rule_version:e.ruleVersion||this.getDefaultRuleVersion()}}},this.reportTDEMEvent(r)):console.warn("reportStruggle params error")},c.prototype.reportFormSubmitResult=function(e){e&&e.status?(e={event_id:rc(),event_type:p.FORM_SUBMIT_RESULT,event_category:tc.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:e.eventName||"form_submit_"+e.status,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(e.tags),is_effective_action:"boolean"!=typeof e.isEffectiveAction||e.isEffectiveAction,trigger_event_id:e.triggerEventId,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),validation_message:e.validationMessage?e.validationMessage.slice(0,256):undefined,event_properties:{status:e.status,validation_code:e.validationCode||"",form_id:e.formId||"",field_id:e.fieldId||""}}},this.reportTDEMEvent(e)):console.warn("reportFormSubmitResult params error")},c.prototype.reportPageView=function(e,t){void 0===t&&(t={});e=this.getCurrentEventPageUrl(e||t.pageUrl),e={event_id:rc(),event_type:p.PAGE_VIEW,event_category:tc.BEHAVIOR,timestamp:Date.now(),page_url:e,data:{page_title:t.pageTitle||"",referrer:t.referrer,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(h(h(h(h(h(h(h({},t.properties||{}),t.navigationType?{navigation_type:t.navigationType}:{}),t.fromPage?{from_page:t.fromPage}:{}),t.toPage?{to_page:t.toPage}:{}),"boolean"==typeof t.isFirstVisit?{is_first_visit:t.isFirstVisit?"1":"0"}:{}),"boolean"==typeof t.isFirstLoad?{is_first_load:t.isFirstLoad?"1":"0"}:{}),t.deviceType?{device_type:t.deviceType}:{}))}};this.reportTDEMEvent(e)},c.prototype.setPage=function(e,t){var n;e&&"string"==typeof e?(n=this._customPageUrl||this.getCurrentEventPageUrl(),this._customPageUrl=e,this.reportPageView(e,{pageTitle:null==t?void 0:t.pageTitle,navigationType:"push",fromPage:(n||"").slice(0,512),toPage:e.slice(0,512),isFirstVisit:!1,tags:h({source:"manual",environment:this.config.env||"production",version:String(this.config.version||"")},null!=t&&t.pageGroup?{page_group:t.pageGroup}:{})}),this.lifeCycle.emit("pageChanged",{pageUrl:e,previousUrl:n,source:"manual"})):console.warn("setPage: pageUrl must be a non-empty string")},c.prototype.leavePage=function(){var e;this._customPageUrl&&(e=this._customPageUrl,this._customPageUrl=null,this.lifeCycle.emit("pageChanged",{pageUrl:this.getCurrentEventPageUrl(),previousUrl:e,source:"auto"}))},c.prototype.getCurrentEventPageUrl=function(e){if(e)return e;if(this._customPageUrl)return this._customPageUrl;try{return this.getOriginFrom()}catch(Pe){return this.config.pageUrl||"undefined"!=typeof window&&(null==(e=window.location)?void 0:e.href)||""}},c.prototype.getCurrentReplayId=function(){var e,t;return String((null==(t=null==(e=null==(t=this.sessionManager)?void 0:t.getSession)?void 0:e.call(t))?void 0:t.replayId)||"")},c.prototype.getDefaultRuleVersion=function(){var e;return(null==(e=null==(e=this.config)?void 0:e.struggleMonitor)?void 0:e.ruleVersion)||"1.0.0"},c.prototype.getEventReplayId=function(e){return e||this.getCurrentReplayId()||undefined},c.prototype.mergeEventTags=function(e){return this.sanitizeEventTags(h(h({},this.config.defaultTags||{}),e||{}))},c.prototype.sanitizeStringMap=function(n,r){var i;return void 0===r&&(r=1024),n&&"object"===S(n)&&(i={},Object.keys(n).forEach(function(e){var t=n[e];e&&t!==undefined&&null!==t&&(i[String(e)]=String(t).slice(0,r))}),Object.keys(i).length)?i:undefined},c.prototype.sanitizeEventTags=function(e){return this.sanitizeStringMap(e,1024)},c.prototype.sanitizeEventProperties=function(e){return this.sanitizeStringMap(e,1024)},c.prototype.sanitizeEventPayload=function(n,e){var r;return n&&"object"===S(n)&&(e=(e=this.getPayloadAllowlist(e)).length?e:Object.keys(n),r={},e.forEach(function(e){var t;Object.prototype.hasOwnProperty.call(n,e)&&(t=n[e])!==undefined&&null!==t&&("string"==typeof t?r[e]=t.slice(0,256):"number"==typeof t||"boolean"==typeof t?r[e]=t:Array.isArray(t)?r[e]=t.slice(0,10).map(function(e){return"string"==typeof e?e.slice(0,256):"number"==typeof e||"boolean"==typeof e?e:String(e).slice(0,256)}):r[e]=String(t).slice(0,256))}),Object.keys(r).length)?r:undefined},c.prototype.getPayloadAllowlist=function(e){var t=null==(t=null==(t=this.config)?void 0:t.struggleMonitor)?void 0:t.payloadAllowlist;return Array.from(new Set(pl(Array.isArray(t)?t:[],Array.isArray(e)?e:[]).filter(function(e){return!!e})))},c.prototype.normalizeRelatedEventIds=function(e){return Array.isArray(e)&&e.length&&(e=Array.from(new Set(e.filter(function(e){return"string"==typeof e&&e})))).length?e:undefined},c.prototype.ready=function(e,t,n){throw new Error('You need to override "ready" method')},c.prototype.request=function(e,t,n){throw new Error('You need to override "request" method')},c.prototype.speedLogPipeline=function(e){throw new Error('You need to override "speedLogPipeline" method')},c.prototype.getOriginFrom=function(){throw new Error('You need to override "getOriginFrom" method')},Object.defineProperty(c.prototype,"__version__",{get:function(){return"1.0.8"},enumerable:!1,configurable:!0}),c.prototype.submitMeasure=function(e,t,n){void 0===n&&(n={});e={event_id:rc(),event_type:p.CUSTOM,event_category:tc.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(n.pageUrl),data:{event_name:e,measurements:{duration:t},replay_id:this.getEventReplayId(n.replayId),tags:this.sanitizeEventTags(n.tags),payload:this.sanitizeEventPayload(n.payload),event_properties:this.sanitizeEventProperties(n.properties)}};this.reportTDEMEvent(e)},c.prototype.getTimeEventDuration=function(e){return e!==undefined&&this.timeMap[e]?Date.now()-this.timeMap[e]:undefined},c.version="1.0.8",c.instances=[],c.environment=ec,c.installedPlugins=[],c),o=(gf.prototype.patch=function(e){this.canUse(e)&&this.exist(e)&&(this.instances.push(e),this.triggerInit(e),this.triggerOnNewTdem(e))},gf.prototype.unpatch=function(e){var t=this.instances.indexOf(e);-1!==t&&(this.instances.splice(t,1),0===this.instances.length)&&this.uninstall(e)},gf.prototype.countInstance=function(){return this.instances.length},gf.prototype.uninstall=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.destroy)&&t.apply(this,[e])},gf.prototype.walk=function(n){var r=this;this.instances.forEach(function(e){var t=r.canUse(e);t&&n(e,t)})},gf.prototype.canUse=function(e){e=this.getConfig(e);return!(!e||"object"!==S(e))||!!e},gf.prototype.getConfig=function(e){return null==(e=e.config)?void 0:e[this.name]},gf.prototype.exist=function(e){return-1===this.instances.indexOf(e)},gf.prototype.triggerInit=function(e){var t;this.inited||(this.inited=!0,null==(t=null==(t=this.option)?void 0:t.init))||t.call(this.option,this.getConfig(e))},gf.prototype.triggerOnNewTdem=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.onNewTdem)&&t.call(this.option,e,this.getConfig(e))},gf),xe=new o({name:"aid",aid:"",init:function(e){try{var t=!0!==e&&e||window.localStorage.getItem("TDEM_ID");t||(t=Hc(),window.localStorage.setItem("TDEM_ID",t)),this.aid=t}catch(P){}},onNewTdem:function(e){e.bean.aid=this.aid,e.config.aid=this.aid}}),af=RangeError,sf=String,uf=Math.floor,lf=y(qr),cf=y("".slice),ff=y(1.1.toFixed),df=function(e,t,n){return 0===t?n:t%2==1?df(e,t-1,n*e):df(e*e,t/2,n)},hf=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=uf(i/1e7)},pf=function(e,t){for(var n=6,r=0;0<=--n;)r+=e[n],e[n]=uf(r/t),r=r%t*1e7},mf=function(e){for(var t,n=6,r="";0<=--n;)""===r&&0!==n&&0===e[n]||(t=sf(e[n]),r=""===r?t:r+lf("0",7-t.length)+t);return r},r=g(function(){return"0.000"!==ff(8e-5,3)||"1"!==ff(.9,0)||"1.25"!==ff(1.255,2)||"1000000000000000128"!==ff(0xde0b6b3a7640080,0)})||!g(function(){ff({})});function gf(e){this.tdemPlugin=!0,this.name="",this.instances=[],this.inited=!1,e.$walk=this.walk.bind(this),e.$getConfig=this.getConfig.bind(this),this.option=e,this.name=e.name}function c(e,t){var n,r,i,o,a,s,u,l;void 0===t&&(t={}),this.sdkName="tdem-web-sdk",this.sdkVersion=c.version,this.isGetSample=!1,this.isHidden=!1,this.config={version:0,delay:1e3,onError:!0,repeat:60,random:1,aid:!0,device:!0,pagePerformance:!0,webVitals:!0,speedSample:!0,onClose:!0,reportLoadPackageSpeed:!0,env:"production",url:"",reportImmediately:!0,tdemConfig:!0,hostUrl:"https://dem.rumt-zh.com",offlineUrl:"",whiteListUrl:"",pvUrl:"",speedUrl:"",customTimeUrl:"",performanceUrl:"",performanceUrlForHippy:"",webVitalsUrl:"",eventUrl:"",setDataReportUrl:""},this.isWhiteList=!1,this.lifeCycle=new Il,this.bean={},this.internalRetrySchedule=nc,this._customPageUrl=null,this.tdemEventPipeline=ef([(r=n=!1,i=[],this._tdemSampleGate={decide:function(e){n=!0,(r=e)&&i.forEach(function(e){var t=e.event;return(0,e.resolve)(t)}),i=[]},reDecide:function(e){return r=!(e<=0)&&(100<=e||100*Math.random()<e)},get isDecided(){return n},get isSampled(){return r}},function(e,t){n?r&&t(e):i.length<1e3&&i.push({event:e,resolve:t})}),(a=100,u=Math.max(Number(a)||1,1),l=[],function(e,t){var e=Array.isArray(e)?e:[e],n=(l.push.apply(l,e),function(){for(;0<l.length;)t(l.splice(0,u))});clearTimeout(s),u<=l.length?n():s=setTimeout(function(){0<l.length&&n()},5e3)}),function(e,t){try{var n,r=JSON.parse(JSON.stringify(e)),i=(o.lifeCycle.emit("beforeReport",r),o.config.beforeReport);"function"==typeof i?0<(n=e.filter(function(e){return!1!==i(e)})).length&&t(n):t(e)}catch(L){t(e)}},Xc(o=this)]),this.timeMap={},this.failRequestCount=0,this.internalTransport=t.transport,this.internalRetrySchedule=t.retrySchedule||nc,c.instances.push(this)}O({target:"Number",proto:!0,forced:r},{toFixed:function(e){var t,n,r,i=Co(this),e=ue(e),o=[0,0,0,0,0,0],a="",s="0";if(e<0||20<e)throw new af("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||1e21<=i)return sf(i);if(i<0&&(a="-",i=-i),1e-21<i)if(r=(t=function(){for(var e=0,t=i*df(2,69,1);4096<=t;)e+=12,t/=4096;for(;2<=t;)e+=1,t/=2;return e}()-69)<0?i*df(2,-t,1):i/df(2,t,1),r*=4503599627370496,0<(t=52-t)){for(hf(o,0,r),n=e;7<=n;)hf(o,1e7,0),n-=7;for(hf(o,df(10,n,1),0),n=t-1;23<=n;)pf(o,1<<23),n-=23;pf(o,1<<n),hf(o,1,1),pf(o,2),s=mf(o)}else hf(o,0,r),hf(o,1<<-t,0),s=mf(o)+lf("0",e);return 0<e?a+((r=s.length)<=e?"0."+lf("0",e-r)+s:cf(s,0,r-e)+"."+cf(s,r-e)):a+s}});var vf=function(t){return"string"!=typeof t||!t||yl.some(function(e){return-1<t.indexOf(e)})||vl.some(function(e){return-1<t.indexOf(e)})},yf=function(){return"undefined"!=typeof window.performance&&"function"==typeof performance.getEntriesByType&&"function"==typeof performance.now};function wf(e){return e=e.sessionManager,[(null==(e=null==(t=null==e?void 0:e.getSession)?void 0:t.call(e))?void 0:e.replayId)||"",null==e||e.id,!e||e.sampled,null==e||e.sampled][0];var t}var bf=new o({name:"assets"}),qr=bf=new o({name:"assets",collectCur:0,collectEntryType:"resource",ASSETS_INITIATOR_TYPE:["img","css","script","link","audio","video"],getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},onNewTdem:function(e){var t=this;yf()&&(setTimeout(function(){t.collectSuccessLog(e),t.collectFailLog(e)},5e3),performance.onresourcetimingbufferfull=function(){"function"==typeof performance.clearResourceTimings&&(t.collectCur=0,performance.clearResourceTimings())})},processLog:function(e,t){var n=t.duration||0,r=t.transferSize||0,n={event_id:rc(),event_type:p.RESOURCE_LOAD,event_category:tc.NETWORK,timestamp:Date.now(),page_url:t.from||window.location.href,data:{url:t.url,resource_type:t.type||"static",measurements:{duration:n,dns_time:t.domainLookup,tcp_time:t.connectTime,transfer_size:0<r?r:undefined},replay_id:wf(e),tags:{environment:e.config.env||"production",is_https:t.isHttps?"true":"false"},event_properties:{is_cached:String(0===r),protocol:t.nextHopProtocol||"",http_status:String(t.status||0)}}};null!=(r=e.reportTDEMEvent)&&r.call(e,n)},publish:function(t,n){var r=this;this.$walk(function(e){e===n&&(Array.isArray(t)?t.forEach(r.processLog):r.processLog(n,t))})},publishMany:function(e,t){for(var n=t.config,r=this.getFromParam(t),i=0,o=e.length;i<o;i++){var a=e[i];-1===this.ASSETS_INITIATOR_TYPE.indexOf(a.initiatorType)||Ql(a.name,n.hostUrl)||this.publish(this.generateLog(a,n,r),t)}},collectSuccessLog:function(n){var e,t,r=this;"function"==typeof window.PerformanceObserver?(this.publishMany(performance.getEntriesByType(this.collectEntryType),n),(e=new window.PerformanceObserver(function(e){r.publishMany(e.getEntries(),n)})).observe({entryTypes:[this.collectEntryType]}),n.lifeCycle.on("destroy",function(){0===bf.countInstance()&&e.disconnect()})):(t=setInterval(function(){var e=performance.getEntriesByType(r.collectEntryType),t=e.slice(r.collectCur);r.collectCur=e.length,r.publishMany(t,n)},3e3),n.lifeCycle.on("destroy",function(){0===bf.countInstance()&&clearInterval(t)}))},collectFailLog:function(i){var o=this,a=i.config,e=function(e){var t,n,r;e&&(e=e.target||e.srcElement,!(t=(null==e?void 0:e.src)||(null==e?void 0:e.href))||"string"!=typeof t||-1<window.location.href.indexOf(t)||(e="function"==typeof(null==(e=a.api)?void 0:e.resourceTypeHandler)?null==e?void 0:e.resourceTypeHandler(t):"",r=performance.getEntriesByType(o.collectEntryType).find(function(e){return e.name===t}),Ql(t,a.hostUrl))||(n=o.getFromParam(i),r={url:Fl(t),status:400,duration:Number(((null==r?void 0:r.duration)||0).toFixed(2)),method:"get",type:e||"static",isHttps:Ul(t),urlQuery:Nl(t,!0),nextHopProtocol:"",domainLookup:0,connectTime:0,from:n},o.publish(r,i)))};window.document.addEventListener("error",e,!0),i.lifeCycle.on("destroy",function(){0===bf.countInstance()&&window.document.removeEventListener("error",e,!0)})},generateLog:function(e,t,n){var t="function"==typeof(null==(r=t.api)?void 0:r.resourceTypeHandler)?null==(r=t.api)?void 0:r.resourceTypeHandler(e.name):"",r=e.transferSize;return{url:Fl(e.name),method:"get",duration:Number(e.duration.toFixed(2)),status:200,type:t||"static",isHttps:Ul(e.name),nextHopProtocol:e.nextHopProtocol||"",urlQuery:Nl(e.name,!0),domainLookup:Dl(e.domainLookupEnd-e.domainLookupStart),connectTime:Dl(e.connectEnd-e.connectStart),transferSize:0<r?r:-1,from:n}},collectNotReportedLog:function(e){var t,n;yf()&&(t=(n=performance.getEntriesByType(this.collectEntryType)).length,"function"!=typeof window.PerformanceObserver)&&this.collectCur!==t&&(n=n.slice(this.collectCur),this.collectCur=t,this.publishMany(n,e))},destroy:function(){this.option.publish=function(){}}});e("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},Wn);var kf,Sf,r=/ipad|iphone|ipod/i.test(Bn)&&/applewebkit/i.test(Bn),Wn=x.setImmediate,_f=x.clearImmediate,Ef=x.process,Cf=x.Dispatch,Of=x.Function,Rf=x.MessageChannel,xf=x.String,If=0,Tf={},Mf=(g(function(){kf=x.location}),function(e){var t;T(Tf,e)&&(t=Tf[e],delete Tf[e],t())}),Af=function(e){return function(){Mf(e)}},Pf=function(e){Mf(e.data)},l=function(e){x.postMessage(xf(e),kf.protocol+"//"+kf.host)},Rf=(Wn&&_f||(Wn=function(e){hc(arguments.length,1);var t=_(e)?e:Of(e),n=Gn(arguments,1);return Tf[++If]=function(){Re(t,undefined,n)},Sf(If),If},_f=function(e){delete Tf[e]},uc?Sf=function(e){Ef.nextTick(Af(e))}:Cf&&Cf.now?Sf=function(e){Cf.now(Af(e))}:Rf&&!r?(Df=(Rf=new Rf).port2,Rf.port1.onmessage=Pf,Sf=Gr(Df.postMessage,Df)):x.addEventListener&&_(x.postMessage)&&!x.importScripts&&kf&&"file:"!==kf.protocol&&!g(l)?(Sf=l,x.addEventListener("message",Pf,!1)):Sf="onreadystatechange"in ge("script")?function(e){vt.appendChild(ge("script")).onreadystatechange=function(){vt.removeChild(this),Mf(e)}}:function(e){setTimeout(Af(e),0)}),{set:Wn,clear:_f}),Lf=Object.getOwnPropertyDescriptor,Df=function(e){var t;return d?(t=Lf(x,e))&&t.value:x[e]},l=function(){this.head=null,this.tail=null};l.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Nf,Ff,Uf,jf,zf,Bf,Wf=l,Pf=/ipad|iphone|ipod/i.test(Bn)&&"undefined"!=typeof Pebble,Wn=/web0s(?!.*chrome)/i.test(Bn),Hf=Rf.set,_f=x.MutationObserver||x.WebKitMutationObserver,l=x.document,qf=x.process,Vf=x.Promise,Gf=Df("queueMicrotask"),Jf=(Gf||(jf=new Wf,zf=function(){var e,t;for(uc&&(e=qf.domain)&&e.exit();t=jf.get();)try{t()}catch(X){throw jf.head&&Bf(),X}e&&e.enter()},Bf=r||uc||Wn||!_f||!l?!Pf&&Vf&&Vf.resolve?((r=Vf.resolve(undefined)).constructor=Vf,Uf=Gr(r.then,r),function(){Uf(zf)}):uc?function(){qf.nextTick(zf)}:(Hf=Gr(Hf,x),function(){Hf(zf)}):(Nf=!0,Ff=l.createTextNode(""),new _f(zf).observe(Ff,{characterData:!0}),function(){Ff.data=Nf=!Nf}),Gf=function(e){jf.head||Bf(),jf.add(e)}),Gf),$f=function(e){try{return{error:!1,value:e()}}catch(X){return{error:!0,value:X}}},Zf=x.Promise,Kf=TypeError,Yf=function(e){var n,r;this.promise=new e(function(e,t){if(n!==undefined||r!==undefined)throw new Kf("Bad Promise constructor");n=e,r=t}),this.resolve=Oe(n),this.reject=Oe(r)},Xf={f:function(e){return new Yf(e)}},Qf=function(e,t){return E(e),R(t)&&t.constructor===e?t:((0,(e=Xf.f(e)).resolve)(t),e.promise)},ed=Zf&&Zf.prototype,Wn=!!Zf&&g(function(){ed["finally"].call({then:function(){}},function(){})});O({target:"Promise",proto:!0,real:!0,forced:Wn},{"finally":function(t){var n=hu(this,ke("Promise")),e=_(t);return this.then(e?function(e){return Qf(n,t()).then(function(){return e})}:t,e?function(e){return Qf(n,t()).then(function(){throw e})}:t)}}),_(Zf)&&(Pf=ke("Promise").prototype["finally"],ed["finally"]!==Pf)&&Ht(ed,"finally",Pf,{unsafe:!0}),Zf&&Zf.prototype;var td,nd,rd,id,od=Ze("species"),ad=!1,sd=_(x.PromiseRejectionEvent),Vf={CONSTRUCTOR:js("Promise",function(){var e=$e(Zf),t=e!==String(Zf);if(!t&&66===Hn)return!0;if(!Hn||Hn<51||!/native code/.test(e)){var e=new Zf(function(e){e(1)}),n=function(e){e(function(){},function(){})};if((e.constructor={})[od]=n,!(ad=e.then(function(){})instanceof n))return!0}return!(t||"BROWSER"!=sc&&"DENO"!=sc||sd)}),REJECTION_EVENT:sd,SUBCLASSING:ad},ud=Rf.set,r=Vf.CONSTRUCTOR,ld=Vf.REJECTION_EVENT,l=Vf.SUBCLASSING,cd=Nt.getterFor("Promise"),fd=Nt.set,_f=Zf&&Zf.prototype,dd=Zf,hd=_f,pd=x.TypeError,md=x.document,gd=x.process,vd=Xf.f,yd=vd,wd=!!(md&&md.createEvent&&x.dispatchEvent),bd=function(e){var t;return!(!R(e)||!_(t=e.then))&&t},kd=function(e,t){var n,r,i,o=t.value,a=1===t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&Od(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===e.promise?l(new pd("Promise-chain cycle")):(r=bd(n))?I(r,n,u,l):u(n)):l(o)}catch(X){c&&!i&&c.exit(),l(X)}},Sd=function(n,r){n.notified||(n.notified=!0,Jf(function(){for(var e,t=n.reactions;e=t.get();)kd(e,n);n.notified=!1,r&&!n.rejection&&Ed(n)}))},_d=function(e,t,n){var r;wd?((r=md.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),x.dispatchEvent(r)):r={promise:t,reason:n},!ld&&(t=x["on"+e])?t(r):"unhandledrejection"===e&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(X){}}("Unhandled promise rejection",n)},Ed=function(r){I(ud,x,function(){var e,t=r.facade,n=r.value;if(Cd(r)&&(e=$f(function(){uc?gd.emit("unhandledRejection",n,t):_d("unhandledrejection",t,n)}),r.rejection=uc||Cd(r)?2:1,e.error))throw e.value})},Cd=function(e){return 1!==e.rejection&&!e.parent},Od=function(t){I(ud,x,function(){var e=t.facade;uc?gd.emit("rejectionHandled",e):_d("rejectionhandled",e,t.value)})},Rd=function(t,n,r){return function(e){t(n,e,r)}},xd=function(e,t,n){e.done||(e.done=!0,(e=n?n:e).value=t,e.state=2,Sd(e,!0))},Id=function(t,n,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===n)throw new pd("Promise can't be resolved itself");var r=bd(n);r?Jf(function(){var e={done:!1};try{I(r,n,Rd(Id,e,t),Rd(xd,e,t))}catch(X){xd(e,X,t)}}):(t.value=n,t.state=1,Sd(t,!1))}catch(X){xd({done:!1},X,t)}}};if(r&&(hd=(dd=function(e){ur(this,hd),Oe(e),I(td,this);var t=cd(this);try{e(Rd(Id,t),Rd(xd,t))}catch(X){xd(t,X)}}).prototype,(td=function(e){fd(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Wf,rejection:!1,state:0,value:null})}).prototype=Ht(hd,"then",function(e,t){var n=cd(this),r=vd(hu(this,dd));return n.parent=!0,r.ok=!_(e)||e,r.fail=_(t)&&t,r.domain=uc?gd.domain:undefined,0===n.state?n.reactions.add(r):Jf(function(){kd(r,n)}),r.promise}),nd=function(){var e=new td,t=cd(e);this.promise=e,this.resolve=Rd(Id,t),this.reject=Rd(xd,t)},Xf.f=vd=function(e){return e===dd||e===rd?new nd:yd(e)},_(Zf))&&_f!==Object.prototype){id=_f.then,l||Ht(_f,"then",function(e,t){var n=this;return new dd(function(e,t){I(id,n,e,t)}).then(e,t)},{unsafe:!0});try{delete _f.constructor}catch(X){}Er&&Er(_f,hd)}O({global:!0,constructor:!0,wrap:!0,forced:r},{Promise:dd}),rd=wi.Promise,gr(dd,"Promise",!1),Ia("Promise");var Td,Md,Ad,Gf=Vf.CONSTRUCTOR||!Tu(function(e){Zf.all(e).then(undefined,function(){})}),Wn=(O({target:"Promise",stat:!0,forced:Gf},{all:function(e){var s=this,t=Xf.f(s),u=t.resolve,l=t.reject,n=$f(function(){var r=Oe(s.resolve),i=[],o=0,a=1;oi(e,function(e){var t=o++,n=!1;a++,I(r,s,e).then(function(e){n||(n=!0,i[t]=e,--a)||u(i)},l)}),--a||u(i)});return n.error&&l(n.value),t.promise}}),Vf.CONSTRUCTOR),Pf=Zf&&Zf.prototype,l=(O({target:"Promise",proto:!0,forced:Wn,real:!0},{"catch":function(e){return this.then(undefined,e)}}),_(Zf)&&(Rf=ke("Promise").prototype["catch"],Pf["catch"]!==Rf)&&Ht(Pf,"catch",Rf,{unsafe:!0}),O({target:"Promise",stat:!0,forced:Gf},{race:function(e){var n=this,r=Xf.f(n),i=r.reject,t=$f(function(){var t=Oe(n.resolve);oi(e,function(e){I(t,n,e).then(r.resolve,i)})});return t.error&&i(t.value),r.promise}}),O({target:"Promise",stat:!0,forced:Vf.CONSTRUCTOR},{reject:function(e){var t=Xf.f(this);return(0,t.reject)(e),t.promise}}),Vf.CONSTRUCTOR),Pd=(ke("Promise"),O({target:"Promise",stat:!0,forced:l},{resolve:function(e){return Qf(this,e)}}),window.navigator.userAgent.toLowerCase()),f={},Ld=function(e){return-1!==Pd.indexOf(e)},Dd=(f.macos=function(){return Ld("mac")},f.ios=function(){return f.iphone()||f.ipod()||f.ipad()},f.iphone=function(){return!f.windows()&&Ld("iphone")},f.ipod=function(){return Ld("ipod")},f.ipad=function(){var e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;return Ld("ipad")||e},f.android=function(){return!f.windows()&&Ld("android")},f.androidPhone=function(){return f.android()&&Ld("mobile")},f.androidTablet=function(){return f.android()&&!Ld("mobile")},f.blackberry=function(){return Ld("blackberry")||Ld("bb10")},f.blackberryPhone=function(){return f.blackberry()&&!Ld("tablet")},f.blackberryTablet=function(){return f.blackberry()&&Ld("tablet")},f.windows=function(){return Ld("windows")},f.windowsPhone=function(){return f.windows()&&Ld("phone")},f.windowsTablet=function(){return f.windows()&&Ld("touch")&&!f.windowsPhone()},f.fxos=function(){return(Ld("(mobile")||Ld("(tablet"))&&Ld(" rv:")},f.fxosPhone=function(){return f.fxos()&&Ld("mobile")},f.fxosTablet=function(){return f.fxos()&&Ld("tablet")},f.meego=function(){return Ld("meego")},f.cordova=function(){return window.cordova&&"file:"===location.protocol},f.nodeWebkit=function(){return"object"===S(window.process)},f.mobile=function(){return f.androidPhone()||f.iphone()||f.ipod()||f.windowsPhone()||f.blackberryPhone()||f.fxosPhone()||f.meego()},f.tablet=function(){return f.ipad()||f.androidTablet()||f.blackberryTablet()||f.windowsTablet()||f.fxosTablet()},f.desktop=function(){return!f.tablet()&&!f.mobile()},f.isIE=function(){return"ActiveXObject"in window},void 0),Nd=(O({target:"Object",stat:!0},{is:Dd}),Object.is,Lt("search",function(r,i,o){return[function(e){var t=ie(this),n=R(e)?Xt(e,r):undefined;return n?I(n,e,t):(n=C(t),new RegExp(e)[r](n))},function(e){var t=E(this),e=C(e),n=o(i,t,e);return n.done?n.value:(n=t.lastIndex,Dd(n,0)||(t.lastIndex=0),e=dn(t,e),Dd(t.lastIndex,n)||(t.lastIndex=n),null===e?-1:e.index)}]}),Math.floor),Fd=function(e,t){var n=e.length;if(n<8)for(var r,i,o=1;o<n;){for(r=e[i=o];i&&0<t(e[i-1],r);)e[i]=e[--i];i!==o++&&(e[i]=r)}else for(var a=Nd(n/2),s=Fd(Gn(e,0,a),t),u=Fd(Gn(e,a),t),l=s.length,c=u.length,f=0,d=0;f<l||d<c;)e[f+d]=f<l&&d<c?t(s[f],u[d])<=0?s[f++]:u[d++]:f<l?s[f++]:u[d++];return e},Ud=Fd,_f=Bn.match(/firefox\/(\d+)/i),jd=!!_f&&+_f[1],zd=/MSIE|Trident/.test(Bn),r=Bn.match(/AppleWebKit\/(\d+)\./),Bd=!!r&&+r[1],Wd=[],Hd=y(Wd.sort),qd=y(Wd.push),Wn=g(function(){Wd.sort(undefined)}),Pf=g(function(){Wd.sort(null)}),Rf=Fe("sort"),Vd=!g(function(){if(Hn)return Hn<70;if(!(jd&&3<jd)){if(zd)return!0;if(Bd)return Bd<603;for(var e,t,n,r="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)Wd.push({k:e+n,v:t})}for(Wd.sort(function(e,t){return t.v-e.v}),n=0;n<Wd.length;n++)e=Wd[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return"DGBEFHACIJK"!==r}}),Gd=(O({target:"Array",proto:!0,forced:Wn||!Pf||!Rf||!Vd},{sort:function(e){e!==undefined&&Oe(e);var t=ae(this);if(Vd)return e===undefined?Hd(t):Hd(t,e);for(var n,r,i=[],o=fe(t),a=0;a<o;a++)a in t&&qd(i,t[a]);for(Ud(i,(r=e,function(e,t){return t===undefined?-1:e===undefined?1:r!==undefined?+r(e,t)||0:(e=C(e))===(t=C(t))?0:t<e?1:-1})),n=fe(i),a=0;a<n;)t[a]=i[a++];for(;a<o;)La(t,a++);return t}}),(Gf=(Gf=x.URL)&&Gf.prototype)&&Gf.toString),Jd=(O({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return I(Gd,this)}}),RangeError),$d=String.fromCharCode,Vf=String.fromCodePoint,Zd=y([].join),l=!!Vf&&1!==Vf.length,Kd=(O({target:"String",stat:!0,arity:1,forced:l},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,i=0;i<r;){if(ct(t=+arguments[i],1114111)!==t)throw new Jd(t+" is not a valid code point");n[i++]=t<65536?$d(t):$d(55296+((t-=65536)>>10),t%1024+56320)}return Zd(n,"")}}),String.fromCharCode),Yd=ke("String","fromCodePoint"),Xd=encodeURIComponent,Qd=parseInt,eh=y("".charAt),th=y([].push),nh=y("".replace),rh=y("".slice),ih=y(/./.exec),oh=/^[0-9a-f]+$/i,ah=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g,sh=function(e,t){e=rh(e,t,t+2);return ih(oh,e)?Qd(e,16):NaN},uh=function(e){return 2===e.length?e:"�"},Lt=function(e){for(var t=e.length,n="",r=0;r<t;){var i=eh(e,r);if("%"===i){if("%"===eh(e,r+1)||t<r+3){n+="%",r++;continue}var o=sh(e,r+1);if(o!=o){n+=i,r++;continue}r+=2;var a=function(e){for(var t=0,n=128;0<n&&0!=(e&n);n>>=1)t++;return t}(o);if(0===a)i=Kd(o);else{if(1===a||4<a){n+="�",r++;continue}for(var s=[o],u=1;u<a&&!(++r+3>t||"%"!==eh(e,r));){var l=sh(e,r+1);if(l!=l||191<l||l<128)break;if(1===u){if(224===o&&l<160)break;if(237===o&&159<l)break;if(240===o&&l<144)break;if(244===o&&143<l)break}th(s,l),r+=2,u++}if(s.length!==a){n+="�";continue}var c=function(e){var t=null,n=e.length;switch(n){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return null===t||1114111<t||55296<=t&&t<=57343||t<(3<n?65536:2<n?2048:1<n?128:0)?null:t}(s);if(null===c){for(var f=0;f<a;f++)n+="�";r++;continue}i=Yd(c)}}n+=i,r++}return n},_f=function(e){try{return Xd(e)}catch(X){return Xd(nh(e,ah,uh))}},r=Ze("iterator"),lh=Nt.set,ch=Nt.getterFor("URLSearchParams"),fh=Nt.getterFor("URLSearchParamsIterator"),dh=Lt,hh=_f,ph=Df("fetch"),mh=Df("Request"),gh=Df("Headers"),vh=mh&&mh.prototype,Wn=gh&&gh.prototype,yh=x.TypeError,wh=y("".charAt),bh=y([].join),kh=y([].push),Sh=y("".replace),_h=y([].shift),Eh=y([].splice),Ch=y("".split),Oh=y("".slice),Rh=/\+/g,xh=function(e){return dh(Sh(e,Rh," "))},Ih=/[!'()~]|%20/g,Th={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Mh=function(e){return Th[e]},Ah=function(e){return Sh(hh(e),Ih,Mh)},Ph=_r(function(e,t){lh(this,{type:"URLSearchParamsIterator",target:ch(e).entries,index:0,kind:t})},"URLSearchParams",function(){var e=fh(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Mr(undefined,!0);var r=t[n];switch(e.kind){case"keys":return Mr(r.key,!1);case"values":return Mr(r.value,!1)}return Mr([r.key,r.value],!1)},!0),Lh=function(e){this.entries=[],this.url=null,e!==undefined&&(R(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===wh(e,0)?Oh(e,1):e:C(e)))},Pf=(Lh.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s=this.entries,u=Xr(e);if(u)for(n=(t=ei(e,u)).next;!(r=I(n,t)).done;){if(i=(r=ei(E(r.value))).next,(o=I(i,r)).done||(a=I(i,r)).done||!I(i,r).done)throw new yh("Expected sequence with length 2");kh(s,{key:C(o.value),value:C(a.value)})}else for(var l in e)T(e,l)&&kh(s,{key:l,value:C(e[l])})},parseQuery:function(e){if(e)for(var t,n=this.entries,r=Ch(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(t=Ch(t,"="),kh(n,{key:xh(_h(t)),value:xh(bh(t,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],kh(n,Ah(e.key)+"="+Ah(e.value));return bh(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}},function(){ur(this,Dh);var e=0<arguments.length?arguments[0]:undefined,e=lh(this,new Lh(e));d||(this.size=e.entries.length)}),Dh=Pf.prototype;Xo(Dh,{append:function(e,t){var n=ch(this);hc(arguments.length,2),kh(n.entries,{key:C(e),value:C(t)}),d||this.size++,n.updateURL()},"delete":function(e){for(var t=ch(this),n=hc(arguments.length,1),r=t.entries,i=C(e),e=n<2?undefined:arguments[1],o=e===undefined?e:C(e),a=0;a<r.length;){var s=r[a];s.key!==i||o!==undefined&&s.value!==o?a++:Eh(r,a,1)}d||(this.size=r.length),t.updateURL()},get:function(e){var t=ch(this).entries;hc(arguments.length,1);for(var n=C(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=ch(this).entries;hc(arguments.length,1);for(var n=C(e),r=[],i=0;i<t.length;i++)t[i].key===n&&kh(r,t[i].value);return r},has:function(e){for(var t=ch(this).entries,n=hc(arguments.length,1),r=C(e),e=n<2?undefined:arguments[1],i=e===undefined?e:C(e),o=0;o<t.length;){var a=t[o++];if(a.key===r&&(i===undefined||a.value===i))return!0}return!1},set:function(e,t){var n=ch(this);hc(arguments.length,2);for(var r,i=n.entries,o=!1,a=C(e),s=C(t),u=0;u<i.length;u++)(r=i[u]).key===a&&(o?Eh(i,u--,1):(o=!0,r.value=s));o||kh(i,{key:a,value:s}),d||(this.size=i.length),n.updateURL()},sort:function(){var e=ch(this);Ud(e.entries,function(e,t){return e.key>t.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,n=ch(this).entries,r=Gr(e,1<arguments.length?arguments[1]:undefined),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new Ph(this,"keys")},values:function(){return new Ph(this,"values")},entries:function(){return new Ph(this,"entries")}},{enumerable:!0}),Ht(Dh,r,Dh.entries,{name:"entries"}),Ht(Dh,"toString",function(){return ch(this).serialize()},{enumerable:!0}),d&&Ut(Dh,"size",{get:function(){return ch(this).entries.length},configurable:!0,enumerable:!0}),gr(Pf,"URLSearchParams"),O({global:!0,constructor:!0,forced:!0},{URLSearchParams:Pf}),_(gh)&&(Td=y(Wn.has),Md=y(Wn.set),Ad=function(e){if(R(e)){var t,n=e.body;if("URLSearchParams"===Qe(n))return t=e.headers?new gh(e.headers):new gh,Td(t,"content-type")||Md(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),_t(e,{body:nt(0,C(n)),headers:nt(0,t)})}return e},_(ph)&&O({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return ph(e,1<arguments.length?Ad(arguments[1]):{})}}),_(mh))&&((vh.constructor=Rf=function(e){return ur(this,vh),new mh(e,1<arguments.length?Ad(arguments[1]):{})}).prototype=vh,O({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Rf}));var Nh,Gf={URLSearchParams:Pf,getState:ch},Fh=Ze("iterator"),Uh=(g(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),n=e.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",n.forEach(function(e,t){n["delete"]("b"),r+=t+e}),t["delete"]("a",2),t["delete"]("b",undefined),!n.size&&!d||!n.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==n.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!n[Fh]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==r||"x"!==new URL("https://x",undefined).host}),/[^\0-\u007E]/),jh=/[.\u3002\uFF0E\uFF61]/g,zh="Overflow: input needs wider integers to process",Bh=RangeError,Wh=y(jh.exec),Hh=Math.floor,qh=String.fromCharCode,Vh=y("".charCodeAt),Gh=y([].join),Jh=y([].push),$h=y("".replace),Zh=y("".split),Kh=y("".toLowerCase),Yh=function(e){return e+22+75*(e<26)},Xh=function(e,t,n){var r=0;for(e=n?Hh(e/700):e>>1,e+=Hh(e/t);455<e;)e=Hh(e/35),r+=36;return Hh(r+36*e/(e+38))},Qh=function(e){for(var t,n=[],r=Zh($h(Kh(e),jh,"."),"."),i=0;i<r.length;i++)t=r[i],Jh(n,Wh(Uh,t)?"xn--"+function(e){var t,n=[],r=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i,o=Vh(e,n++);55296<=o&&o<=56319&&n<r?56320==(64512&(i=Vh(e,n++)))?Jh(t,((1023&o)<<10)+(1023&i)+65536):(Jh(t,o),n--):Jh(t,o)}return t}(e)).length,i=128,o=0,a=72;for(c=0;c<e.length;c++)(t=e[c])<128&&Jh(n,qh(t));var s=n.length,u=s;for(s&&Jh(n,"-");u<r;){for(var l=2147483647,c=0;c<e.length;c++)(t=e[c])>=i&&t<l&&(l=t);var f=u+1;if(l-i>Hh((2147483647-o)/f))throw new Bh(zh);for(o+=(l-i)*f,i=l,c=0;c<e.length;c++){if((t=e[c])<i&&2147483647<++o)throw new Bh(zh);if(t===i){for(var d=o,h=36;;){var p=h<=a?1:a+26<=h?26:h-a;if(d<p)break;var m=d-p,g=36-p;Jh(n,qh(Yh(p+m%g))),d=Hh(m/g),h+=36}Jh(n,qh(Yh(d))),a=Xh(o,f,u===s),o=0,u++}}o++,i++}return Gh(n,"")}(t):t);return Gh(n,".")},ep=jt.codeAt,tp=Nt.set,np=Nt.getterFor("URL"),rp=Gf.URLSearchParams,ip=Gf.getState,op=Lt,ap=_f,Vf=x.URL,sp=x.TypeError,up=x.parseInt,lp=Math.floor,cp=Math.pow,fp=String.fromCharCode,dp=y("".charAt),hp=y(/./.exec),pp=y([].join),mp=y(1.1.toString),gp=y([].pop),vp=y([].push),yp=y("".replace),wp=y([].shift),bp=y("".split),kp=y("".indexOf),Sp=y("".slice),_p=y("".toLowerCase),Ep=y([].unshift),Cp=/[a-z]/i,Op=/[\d+\-.a-z]/i,Rp=/\d/,xp=/^0x/i,Ip=/^[0-7]+$/,Tp=/^\d+$/,Mp=/^[\da-f]+$/i,Ap=/[\u0000-\u0020#%/:<>?@[\\\]^|\u007F]/,Pp=/[\0\t\n\r #/:<>?@[\\\]^|]/,Lp=/^[\u0000-\u0020]+/,Dp=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Np=/[\t\n\r]/g,Fp=/[^\u0000-\u007F]/,Up=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)Ep(t,e%256),e=lp(e/256);return pp(t,".")}if("object"!=S(e))return e;for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(n<i&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return n<i?r:t}(e),n=0;n<8;n++)i&&0===e[n]||(i=i&&!1,r===n?(t+=n?":":"::",i=!0):(t+=mp(e[n],16),n<7&&(t+=":")));return"["+t+"]"},jp={},zp=Pr({},jp,{" ":1,'"':1,"#":1,"<":1,">":1}),Bp=Pr({},zp,{"'":1}),Wp=Pr({},jp,{" ":1,'"':1,"<":1,">":1,"`":1}),Hp=Pr({},Wp,{"#":1,"?":1,"{":1,"}":1,"^":1}),qp=Pr({},Hp,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Vp=function(e,t){var n=ep(e,0);return 32<=n&&n<127&&!T(t,e)?e:"'"===e&&T(t,e)?"%27":ap(e)},Gp={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Jp=function(e,t){return 2===e.length&&hp(Cp,dp(e,0))&&(":"===(e=dp(e,1))||!t&&"|"===e)},$p=function(e){return 1<e.length&&Jp(Sp(e,0,2))&&(2===e.length||"/"===(e=dp(e,2))||"\\"===e||"?"===e||"#"===e)},Zp={},Kp={},Yp={},Xp={},Qp={},em={},tm={},nm={},rm={},im={},om={},am={},sm={},um={},lm={},cm={},fm={},dm={},hm={},pm={},mm={},gm=function(e,t,n){var r,i,e=C(e);if(t){if(i=this.parse(e))throw new sp(i);this.searchParams=null}else{if(n!==undefined&&(r=new gm(n,!0)),i=this.parse(e,null,r))throw new sp(i);(t=ip(new rp)).bindURL(this),this.searchParams=t}},vm=(gm.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s=this,u=t||Zp,l=0,c="",f=!1,d=!1,h=!1;for(e=C(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=yp(e,Lp,""),e=yp(e,Dp,"$1")),e=yp(e,Np,""),r=Iu(e);l<=r.length;){switch(i=r[l],u){case Zp:if(!i||!hp(Cp,i)){if(t)return"Invalid scheme";u=Yp;continue}c+=_p(i),u=Kp;break;case Kp:if(i&&hp(Op,i))c+=_p(i);else{if(":"!==i){if(t)return"Invalid scheme";c="",u=Yp,l=0;continue}if(t&&(s.isSpecial()!==T(Gp,c)||"file"===c&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&""===s.host))return;if(s.scheme=c,t)return void(s.isSpecial()&&Gp[s.scheme]===s.port&&(s.port=null));c="","file"===s.scheme?u=um:s.isSpecial()&&n&&n.scheme===s.scheme?u=Xp:s.isSpecial()?u=nm:"/"===r[l+1]?(u=Qp,l++):(s.cannotBeABaseURL=!0,vp(s.path,""),u=hm)}break;case Yp:if(!n||n.cannotBeABaseURL&&"#"!==i)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"===i){s.scheme=n.scheme,s.path=Gn(n.path),s.query=n.query,s.fragment="",s.cannotBeABaseURL=!0,u=mm;break}u="file"===n.scheme?um:em;continue;case Xp:if("/"!==i||"/"!==r[l+1]){u=em;continue}u=rm,l++;break;case Qp:if("/"===i){u=im;break}u=dm;continue;case em:if(s.scheme=n.scheme,i===Nh)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Gn(n.path),s.query=n.query;else if("/"===i||"\\"===i&&s.isSpecial())u=tm;else if("?"===i)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Gn(n.path),s.query="",u=pm;else{if("#"!==i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Gn(n.path),s.path.length&&s.path.length--,u=dm;continue}s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Gn(n.path),s.query=n.query,s.fragment="",u=mm}break;case tm:if(!s.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,u=dm;continue}u=im}else u=rm;break;case nm:if(u=rm,"/"!==i||"/"!==r[l+1])continue;l++;break;case rm:if("/"===i||"\\"===i)break;u=im;continue;case im:if("@"===i){f&&(c="%40"+c);for(var f=!0,p=Iu(c),m=0;m<p.length;m++){var g=p[m];":"!==g||h?(g=Vp(g,qp),h?s.password+=g:s.username+=g):h=!0}c=""}else if(i===Nh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()){if(f&&""===c)return"Invalid authority";l-=Iu(c).length+1,c="",u=om}else c+=i;break;case om:case am:if(t&&"file"===s.scheme){u=cm;continue}if(":"!==i||d){if(i===Nh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()){if(s.isSpecial()&&""===c)return"Invalid host";if(t&&""===c&&(s.includesCredentials()||null!==s.port))return;if(o=s.parseHost(c))return o;if(c="",u=fm,t)return;continue}"["===i?d=!0:"]"===i&&(d=!1),c+=i}else{if(""===c)return"Invalid host";if(t===am)return;if(o=s.parseHost(c))return o;c="",u=sm}break;case sm:if(!hp(Rp,i)){if(i===Nh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()||t){if(""!==c){var v=up(c,10);if(65535<v)return"Invalid port";s.port=s.isSpecial()&&v===Gp[s.scheme]?null:v,c=""}if(t)return;u=fm;continue}return"Invalid port"}c+=i;break;case um:if(s.scheme="file",s.host="","/"===i||"\\"===i)u=lm;else{if(!n||"file"!==n.scheme){u=dm;continue}switch(i){case Nh:s.host=n.host,s.path=Gn(n.path),s.query=n.query;break;case"?":s.host=n.host,s.path=Gn(n.path),s.query="",u=pm;break;case"#":s.host=n.host,s.path=Gn(n.path),s.query=n.query,s.fragment="",u=mm;break;default:s.host=n.host,$p(pp(Gn(r,l),""))||(s.path=Gn(n.path),s.shortenPath()),u=dm;continue}}break;case lm:if("/"===i||"\\"===i){u=cm;break}n&&"file"===n.scheme&&(s.host=n.host,!$p(pp(Gn(r,l),"")))&&Jp(n.path[0],!0)&&vp(s.path,n.path[0]),u=dm;continue;case cm:if(i===Nh||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&Jp(c))u=dm;else{if(""===c){if(s.host="",t)return}else{if(o=s.parseHost(c))return o;if("localhost"===s.host&&(s.host=""),t)return;c=""}u=fm}continue}c+=i;break;case fm:if(s.isSpecial()){if(u=dm,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==Nh&&(u=dm,"/"!==i))continue}else s.fragment="",u=mm;else s.query="",u=pm;break;case dm:if(i===Nh||"/"===i||"\\"===i&&s.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(v=_p(c))||"%2e."===v||".%2e"===v||"%2e%2e"===v?(s.shortenPath(),"/"===i||"\\"===i&&s.isSpecial()||vp(s.path,"")):"."===(a=c)||"%2e"===_p(a)?"/"===i||"\\"===i&&s.isSpecial()||vp(s.path,""):("file"===s.scheme&&!s.path.length&&Jp(c)&&(null!==s.host&&""!==s.host&&(s.host=""),c=dp(c,0)+":"),vp(s.path,c)),c="","file"===s.scheme&&(i===Nh||"?"===i||"#"===i))for(;1<s.path.length&&""===s.path[0];)wp(s.path);"?"===i?(s.query="",u=pm):"#"===i&&(s.fragment="",u=mm)}else c+=Vp(i,Hp);break;case hm:"?"===i?(s.query="",u=pm):"#"===i?(s.fragment="",u=mm):i!==Nh&&(s.path[0]+=" "===i?"?"===r[l+1]||"#"===r[l+1]?"%20":" ":Vp(i,jp));break;case pm:t||"#"!==i?i!==Nh&&(s.query+=Vp(i,s.isSpecial()?Bp:zp)):(s.fragment="",u=mm);break;case mm:i!==Nh&&(s.fragment+=Vp(i,Wp))}l++}},parseHost:function(u){var e,t,n;if("["===dp(u,0))return"]"===dp(u,u.length-1)&&(e=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,d=function(){return dp(e,f)};if(":"===d()){if(":"!==dp(e,1))return;f+=2,c=++l}for(;d();){if(8===l)return;if(":"!==d()){for(t=n=0;n<4&&hp(Mp,d());)t=16*t+up(d(),16),f++,n++;if("."===d()){if(0===n)return;if(f-=n,6<l)return;for(r=0;d();){if(i=null,0<r){if(!("."===d()&&r<4))return;f++}if(!hp(Rp,d()))return;for(;hp(Rp,d());){if(o=up(d(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(255<i)return;f++}u[l]=256*u[l]+i,2!=++r&&4!==r||l++}if(4!==r)return;break}if(":"===d()){if(f++,!d())return}else if(d())return;u[l++]=t}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!==l&&0<a;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!==l)return;return u}(Sp(u,1,-1)))?void(this.host=e):"Invalid host";if(this.isSpecial()){if(null===(u=function(e){if(!hp(Fp,e))return""===e?null:Qh(e);for(var t,n,r=Iu(e),i="",o=0;o<r.length;o++){if(t=ep(r[o],0),65533===(n=t)||55296<=n&&n<=57343||128<=n&&n<=159||8206<=n&&n<=8207||8232<=n&&n<=8233||8234<=n&&n<=8238||8293<=n&&n<=8297||64976<=n&&n<=65007||65534==(65534&n)||57344<=n&&n<=63743||983040<=n&&n<=1114109)return null;173===(n=t)||847===n||8203===n||12644===n||65279===n||65440===n||4447<=n&&n<=4448||6068<=n&&n<=6069||6155<=n&&n<=6159||8288<=n&&n<=8292||8298<=n&&n<=8303||65024<=n&&n<=65039||917760<=n&&n<=917999||(i+=(n=65281<=(n=t)&&n<=65374?n-65248:160===n||5760===n||8239===n||8287===n||12288===n||8192<=n&&n<=8202||n<=65535&&-1<kp("¨¯´¸˘˙˚˛˜˝ͺ΄΅᾽᾿῀῁῍῎῏῝῞῟῭΅´῾‗‾⁇⁈⁉℀℁℅℆⩴゛゜ﱞﱟﱠﱡﱢﱣﷺﷻ︓︖﹇﹈﹉﹊﹋﹌﹕﹖﹟﹤﹥﹨﹪﹫ﹰﹲﹴﹶﹸﹺﹼﹾ ̄",fp(n))?32:n)===t?r[o]:fp(n))}return""===i?null:Qh(i)}(op(u)))||hp(Ap,u))return"Invalid host";if(function(){var e=bp(u,".");if(""===e[e.length-1]){if(1===e.length)return;e.length--}return hp(Tp,e=e[e.length-1])||hp(xp,e)&&(""===(e=Sp(e,2))||hp(Mp,e))}()){if(null===(e=function(){var e,t,n,r,i,o,a,s=bp(u,".");if(s.length&&""===s[s.length-1]&&s.length--,4<(e=s.length))return null;for(t=[],n=0;n<e;n++){if(""===(r=s[n]))return null;if(i=10,1<r.length&&"0"===dp(r,0)&&(i=hp(xp,r)?16:8,r=Sp(r,8===i?1:2)),""===r)o=0;else{if(!hp(10===i?Tp:8===i?Ip:Mp,r))return null;o=up(r,i)}vp(t,o)}for(n=0;n<e;n++)if(o=t[n],n===e-1){if(o>=cp(256,5-e))return null}else if(255<o)return null;for(a=gp(t),n=0;n<t.length;n++)a+=t[n]*cp(256,3-n);return a}()))return"Invalid host";this.host=e}else this.host=u}else{if(hp(Pp,u))return"Invalid host";for(e="",t=Iu(u),n=0;n<t.length;n++)e+=Vp(t[n],jp);this.host=e}},cannotHaveUsernamePasswordPort:function(){return null===this.host||""===this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return T(Gp,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Jp(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==i?(l+="//",e.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=Up(i),null!==o&&(l+=":"+o)):"file"===t&&(l+="//"),null===i&&!e.cannotBeABaseURL&&1<a.length&&""===a[0]&&(l+="/."),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+pp(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){e=this.parse(e);if(e)throw new sp(e);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new vm(this.path[0]).origin}catch(X){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+Up(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(C(e)+":",Zp)},getUsername:function(){return this.username},setUsername:function(e){var t=Iu(C(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Vp(t[n],qp)}},getPassword:function(){return this.password},setPassword:function(e){var t=Iu(C(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Vp(t[n],qp)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Up(e):Up(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,om)},getHostname:function(){var e=this.host;return null===e?"":Up(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,am)},getPort:function(){var e=this.port;return null===e?"":C(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=C(e))?this.port=null:this.parse(e,sm))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+pp(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,fm))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=C(e))?this.query=null:("?"===dp(e,0)&&(e=Sp(e,1)),this.query="",this.parse(e,pm)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=C(e))?("#"===dp(e,0)&&(e=Sp(e,1)),this.fragment="",this.parse(e,mm)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}},function(e){var t=ur(this,ym),n=1<hc(arguments.length,1)?arguments[1]:undefined,e=tp(t,new gm(e,!1,n));d||(t.href=e.serialize(),t.origin=e.getOrigin(),t.protocol=e.getProtocol(),t.username=e.getUsername(),t.password=e.getPassword(),t.host=e.getHost(),t.hostname=e.getHostname(),t.port=e.getPort(),t.pathname=e.getPathname(),t.search=e.getSearch(),t.searchParams=e.getSearchParams(),t.hash=e.getHash())}),ym=vm.prototype,l=function(e,t){return{get:function(){return np(this)[e]()},set:t&&function(e){return np(this)[t](e)},configurable:!0,enumerable:!0}};d&&(Ut(ym,"href",l("serialize","setHref")),Ut(ym,"origin",l("getOrigin")),Ut(ym,"protocol",l("getProtocol","setProtocol")),Ut(ym,"username",l("getUsername","setUsername")),Ut(ym,"password",l("getPassword","setPassword")),Ut(ym,"host",l("getHost","setHost")),Ut(ym,"hostname",l("getHostname","setHostname")),Ut(ym,"port",l("getPort","setPort")),Ut(ym,"pathname",l("getPathname","setPathname")),Ut(ym,"search",l("getSearch","setSearch")),Ut(ym,"searchParams",l("getSearchParams")),Ut(ym,"hash",l("getHash","setHash"))),Ht(ym,"toJSON",function(){return np(this).serialize()},{enumerable:!0}),Ht(ym,"toString",function(){return np(this).serialize()},{enumerable:!0}),Vf&&(Df=Vf.createObjectURL,r=Vf.revokeObjectURL,Df&&Ht(vm,"createObjectURL",Gr(Df,Vf)),r)&&Ht(vm,"revokeObjectURL",Gr(r,Vf)),gr(vm,"URL"),O({global:!0,constructor:!0,forced:!0,sham:!d},{URL:vm});var wm,bm,km,Sm,_m,Em,Cm,Om=function(){return{host:new URL(location.href).host,pathname:location.pathname}},Rm=!1,xm=[],Im=/^\/[^/]/,Tm=!1,Mm=[],Am=function(r,e,i){return null!=e&&e.length&&"object"===S(r)?e.reduce(function(e,t){var n=window.Headers&&r instanceof Headers?r.get(t):r[t];return n?e+(""===e?"":"\n\n")+i+" header "+t+": "+n:e},""):""},Pm={maxRetryCount:10,retryInterval:function(e){return 1e3*(2<<e)},whenRetryEndStillFail:"discard"},Lm={API_RESPONSE:"api_response",AJAX_ERROR:"ajax_error",RET_ERROR:"ret_error",SLOW_NET_REQUEST:"slow_net_request"},Dm=function(e,t){return e&&-1===["null","undefined"].indexOf(e)?t+": "+e:""},Nm=function(e,t,n){void 0===t&&(t="");var r,i,e="function"==typeof(null==(i=e.api)?void 0:i.resourceTypeHandler)?null==(i=e.api)?void 0:i.resourceTypeHandler(n):"";return-1===bl.indexOf(e)&&(r=void 0===t?"":t,i=(void 0===n?"":n).split("?")[0],e=zl.test(i)||jl.some(function(e){return-1!==String(r).indexOf(e)})?"static":"fetch"),e},Fm=function(e,t){return e?Lm.AJAX_ERROR:t?Lm.RET_ERROR:Lm.API_RESPONSE},Um=function(e,t,n){if(!e)return!1;t=null==t?void 0:t.api;if(null!=t&&t.isSlowApi&&"function"==typeof(null==t?void 0:t.isSlowApi))try{return t.isSlowApi(n||{duration:e})}catch(X){return console.warn("[TDEM] isSlowApi function happen error:",X,", this data will not be reported."),!1}n=null!=(n=null==t?void 0:t.slowThreshold)?n:null==t?void 0:t.apiSlowThreshold;return n&&"number"==typeof n?n<e:1e3<e},jm=function(e,t){var e=e.api;if(null!=e&&e.usePerformanceTiming&&"string"==typeof t.url){e=null==(e=performance.getEntriesByName(t.url))?void 0:e.pop();if(e)return{url:t.url,isHttps:Ul(t.url),method:t.method,type:t.type,status:t.status,duration:Number(e.duration.toFixed(2)),nextHopProtocol:e.nextHopProtocol||"",domainLookup:Dl(e.domainLookupEnd-e.domainLookupStart),connectTime:Dl(e.connectEnd-e.connectStart)}}return{url:t.url,isHttps:Ul(t.url),method:t.method,type:t.type,status:t.status,duration:Number(t.duration.toFixed(2)),nextHopProtocol:"",domainLookup:xl.number,connectTime:xl.number}},Wn=(new o({name:"api"}),new o({name:"api",override:!1,onNewTdem:function(e){var t,n;this.override||(this.override=!0,null!=(n=e.config.api)&&n.injectTraceHeader&&(this.traceRequestHeader=new $c(n.injectTraceHeader,null!=(t=null==n?void 0:n.injectTraceIgnoreUrls)?t:[],null==n?void 0:n.injectTraceUrls,null==n?void 0:n.traceFlag)),this.overrideFetch(e.config,e),this.overrideXhr(e.config,e))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},overrideFetch:function(b,k){var S=this,e=b.api,e={name:this.name,traceRequestHeader:null!=e&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return S.getFromParam(k)},then:function(d,h,p,m,g,v,y){var e,w;Ql(p,b.hostUrl)||(e=d.headers?d.headers.get("content-type"):"","fetch"===(w=Nm(b,e||"",p))?d.clone().text().then(function(r){var e,i=d.status<=0||400<=d.status,t=(null==(t=b.api)?void 0:t.reqHeaders)||[],o=Am(null==m?void 0:m.headers,t,"req"),t=(null==(t=b.api)?void 0:t.resHeaders)||[],a=Am(d.headers,t,"res"),s=Kc(null==m?void 0:m.headers),t=Wl(r,b.api,{url:p,ctx:d,payload:null==m?void 0:m.body}),u=t.code,l=t.isErr,t=null==(t=b.api)?void 0:t.apiDetail,c=t?Hl(null==m?void 0:m.body,null==(e=b.api)?void 0:e.reqParamHandler,{url:p}):"",f=t?Hl(r,null==(e=b.api)?void 0:e.resBodyHandler,{url:p,ctx:d}):"";setTimeout(function(){var e=jm(b,{url:p,duration:h,type:w,status:d.status||0,method:(null==m?void 0:m.method)||"get"}),t=[i?"FETCH_ERROR: "+r:"","fetch req url: "+p,"res status: "+(e.status||0),"res duration: "+e.duration+"ms","res startTime: "+g,o,a,"req method: "+(e.method||"GET"),"res retcode: "+u,Dm(c,"req param"),Dm(f,"res data")].filter(function(e){return e}).join("\n\n"),t=(e.payload=null==m?void 0:m.body,e.ret=u,e.isErr=+l,e.from=v||S.getFromParam(k),{msg:t,code:u,trace:s,errorMsg:"",from:v||S.getFromParam(k),originFrom:y,level:Lm.API_RESPONSE}),n=Um(null==e?void 0:e.duration,b,e);t.level=n?Lm.SLOW_NET_REQUEST:Fm(i,l),(n||t.level!==Lm.API_RESPONSE||k.isWhiteList||null!=(n=null==(n=k.config)?void 0:n.api)&&n.reportRequest)&&S.publishNormalLog(t,k),S.publishSpeed(e,k)},0)})["catch"](function(e){console.info("ignore something error when process resp "+e)}):setTimeout(function(){var e=jm(b,{url:p,duration:h,type:w,status:d.status||0,method:(null==m?void 0:m.method)||"get"});e.type="static",e.urlQuery=Nl(p,!0),e.from=v||S.getFromParam(k),S.publishSpeed(e,k)},0))},"catch":function(t,n,r,i,o,a,s){var u,e,l,c,f;throw Ql(r,b.hostUrl)||(u=Nm(b,"",r),e=(null==(e=b.api)?void 0:e.reqHeaders)||[],l=Am(null==i?void 0:i.headers,e,"req"),c=Kc(null==i?void 0:i.headers),f=null!=(e=b.api)&&e.apiDetail?Hl(null==i?void 0:i.body,null==(e=b.api)?void 0:e.reqParamHandler,{url:r}):"",setTimeout(function(){var e=jm(b,{url:r,duration:n,type:u,status:0,method:(null==i?void 0:i.method)||"get"}),e=(e.from=a||S.getFromParam(k),S.publishSpeed(e,k),"AJAX_ERROR: "+t+"\n \nreq url: "+r+"\n \nres status: 0\n \nres duration: "+e.duration+"ms\n \nreq method: "+((null==i?void 0:i.method)||"get")+"\n \nreq param: "+f+"\n \nres startTime: "+o+"\n \n"+l);S.publishNormalLog({msg:e,level:Lm.AJAX_ERROR,code:-400,trace:c,errorMsg:"",from:a||S.getFromParam(k),originFrom:s},k)},0)),t}},d=(this.hackFetchOptions=e,this.hackFetchOptions),h=null==(e=b.api)?void 0:e.ignoreHackReg;if(void 0===h&&(h=/\.flv(\?|$)/i),Mm.find(function(e){return e.name===d.name}))throw new Error("name '"+d.name+"' is already in hackFetch option list");Mm.push(d),!Tm&&window.fetch&&(Tm=!0,Sm=window.fetch,window.fetch=function(e,i){void 0===i&&(i={});var o="string"==typeof e?e:null==e?void 0:e.url;if(null!=(a=null==h?void 0:h.test)&&a.call(h,o))return Sm(o,i);Im.test(o)&&(o=""+location.origin+o);var t,n,r,a=(d||{}).traceRequestHeader;a&&(t=void 0===(t=(i||{}).headers)?{}:t,n=(r=Om()).host,r=(n=a.generate(o,t,{host:n,pathname:r.pathname})||{}).name,a=n.value)&&r&&(i.headers=Object.assign(t,((n={})[r]=a,n)));for(var s=new Map,u=window.location.href,l=0;l<Mm.length;l++){var c=Mm[l];try{"function"==typeof c.beforeFetch&&c.beforeFetch(o,i),"function"==typeof c.getCurrentFrom&&s.set(c.name,c.getCurrentFrom())}catch(De){}}var f=Date.now();return Sm(e,i).then(function(e){for(var t=e.clone(),n=0;n<Mm.length;n++){var r=Mm[n];try{"function"==typeof r.then&&r.then(t,Date.now()-f,o,i,f,s.get(r.name),u)}catch(De){}}return e})["catch"](function(e){for(var t=0;t<Mm.length;t++){var n=Mm[t];try{"function"==typeof n["catch"]&&n["catch"](e,Date.now()-f,o,i,f,s.get(n.name),u)}catch(De){}}throw e})})},overrideXhr:function(b,k){var e,i,S=this,o={name:this.name,ignoreHackReg:null==(e=b.api)?void 0:e.ignoreHackReg,traceRequestHeader:null!=(e=b.api)&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return S.getFromParam(k)},send:function(d,h,p,m){var e,t,g=Date.now(),v=(((null==b?void 0:b.api)||{}).injectTraceHeader&&(t=(e=Om()).host,e=(t=S.traceRequestHeader.generate(d.tdemUrl,{},{host:t,pathname:e.pathname})||{}).name,t=t.value,e)&&t&&d.setRequestHeader(e,t),d.addEventListener("loadend",function(){var l,n,e,c,f=d.tdemUrl||"";Ql(f,b.hostUrl)||"abort"===d.failType||(l="",(d.failType||!d.status||400<=d.status)&&(l=d.failType||"failed"),n=Date.now()-g,e=d.getResponseHeader("content-type")||"",c=Nm(b,e,f),setTimeout(function(){var r=jm(b,{url:f,duration:n,type:c,status:d.status,method:d.tdemMethod||"get"});if(r.from=p||S.getFromParam(k),"fetch"===c){var e=(null==(e=b.api)?void 0:e.reqHeaders)||[],i=Am(d.tdemXhrReqHeader,e,"req"),e=(null==(e=b.api)?void 0:e.resHeaders)||[],t=d.getAllResponseHeaders().split("\r\n").reduce(function(e,t){t=t.split(": ");return t[0]&&t[1]&&(e[t[0]]=t[1]),e},{}),o=Am(t,e,"res"),a=Kc(d.tdemXhrReqHeader),e=null==(t=b.api)?void 0:t.apiDetail,s=e?Hl(h,null==(t=b.api)?void 0:t.reqParamHandler,{url:f}):"",u=e?Hl(d.response,null==(t=b.api)?void 0:t.resBodyHandler,{url:f}):"";try{!function(e,t,n,r){var i,o,a;try{if("function"==typeof(null==t?void 0:t.retCodeHandlerAsync))return t.retCodeHandlerAsync(e,null==n?void 0:n.url,null==n?void 0:n.ctx,function(e){var t=e.code;null!=r&&r({code:void 0===t?kl:t,isErr:e.isErr})});if("function"==typeof(null==t?void 0:t.retCodeHandler))return a=(o=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code,null!=r&&r({code:void 0===a?kl:a,isErr:o.isErr});if(!(e="string"==typeof e?JSON.parse(e):e))return null!=r&&r({code:kl,isErr:!1});"function"==typeof(null==(i=null==t?void 0:t.ret)?void 0:i.join)&&(Bl=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var s=Object.getOwnPropertyNames(e).filter(function(e){return-1!==Bl.indexOf(e.toLowerCase())});if(s.length)return"未知"!==(a=e[s[0]])&&""!==a||(a=kl),null!=r&&r({code:""+a,isErr:0!==a&&"0"!==a&&a!==kl});null!=r&&r({code:kl,isErr:!1})}catch(l){null!=r&&r({code:kl,isErr:!1})}}(d.response,b.api,{url:f,ctx:d,payload:h},function(e){var t=e.code,e=e.isErr,n=[l?"AJAX_ERROR: request "+l:"","fetch req url: "+f,"res status: "+(r.status||0),"res duration: "+r.duration+"ms","res startTime: "+g,i,o,"req method: "+(r.method||"GET"),"res retcode: "+t,Dm(s,"req param"),Dm(u,"res data")].filter(function(e){return e}).join("\n\n");r.ret=t,r.isErr=+e,r.payload=h,Um(null==r?void 0:r.duration,b,r)?S.publishNormalLog({msg:n,level:Lm.SLOW_NET_REQUEST,code:t,trace:a,errorMsg:"",from:p||S.getFromParam(k),originFrom:m},k):S.publishNormalLog({msg:n,level:Fm(!!l,e),code:t,trace:a,errorMsg:"",from:p||S.getFromParam(k),originFrom:m},k),S.publishSpeed(r,k)})}catch(O){r.ret=kl,S.publishSpeed(r,k)}}else r.type="static",r.urlQuery=Nl(f,!0),S.publishSpeed(r,k);d.removeEventListener("abort",v),d.removeEventListener("error",y),d.removeEventListener("timeout",w)},0))}),function(){d.failType="abort"}),y=function(){d.failType="error"},w=function(){d.failType="timeout"};d.addEventListener("abort",v),d.addEventListener("error",y),d.addEventListener("timeout",w)}};this.hackXHROptions=o,i=this.hackXHROptions,xm.find(function(e){return e.name===i.name})||(xm.push(i),!Rm&&window.XMLHttpRequest&&(wm=window.XMLHttpRequest.prototype.send,bm=window.XMLHttpRequest.prototype.open,km=window.XMLHttpRequest.prototype.setRequestHeader,Rm=!0,window.XMLHttpRequest.prototype.open=function(){this.tdemMethod=arguments[0];var e,t=arguments[1];if(Im.test(t)&&(t=""+location.origin+t),this.tdemUrl=t,null==(e=null==(t=i.ignoreHackReg)?void 0:t.test)||!e.call(t,this.tdemUrl))if(this.tdemXhrStartTime=Date.now(),this.sendByTdem)f.isIE()||(this.timeout=5e3);else for(var n=0;n<xm.length;n++){var r=xm[n];try{"function"==typeof r.open&&r.open(this)}catch(o){}}return bm.apply(this,arguments)},window.XMLHttpRequest.prototype.setRequestHeader=function(){var e,t,n;return null!=(n=null==(t=i.ignoreHackReg)?void 0:t.test)&&n.call(t,this.tdemUrl)?km.apply(this,arguments):(t=arguments[0],n=arguments[1],this.tdemXhrReqHeader=null!=(e=this.tdemXhrReqHeader)?e:{},null!=i&&i.traceRequestHeader&&-1<["traceparent","b3","sw8","sentry-trace"].indexOf(t)&&(this.tdemXhrReqHeader[t]||(arguments[1]=n),this.tdemXhrReqHeader[t])?void 0:(this.tdemXhrReqHeader[t]=arguments[1],km.apply(this,arguments)))},window.XMLHttpRequest.prototype.send=function(){var e,t;if(!(null!=(t=null==(e=i.ignoreHackReg)?void 0:e.test)&&t.call(e,this.tdemUrl)||this.sendByTdem))for(var n=0;n<xm.length;n++){var r=xm[n];try{"function"==typeof r.send&&r.send(this,arguments[0],"function"==typeof r.getCurrentFrom?r.getCurrentFrom():undefined,window.location.href)}catch(S){}}return wm.apply(this,arguments)}))},publishSpeed:function(e){},publishNormalLog:function(e,t){var n,r,i,o,a,s,u;[Lm.API_RESPONSE,Lm.AJAX_ERROR,Lm.RET_ERROR,Lm.SLOW_NET_REQUEST].includes(e.level)&&(n=(n=null==(n=e.msg)?void 0:n.match(/(?:fetch req url|req url):\s*(.+?)(?:\n|$)/))?n[1].trim():"",r=(r=null==(r=e.msg)?void 0:r.match(/req method:\s*(.+?)(?:\n|$)/i))?r[1].trim().toUpperCase():"GET",i=(i=null==(i=e.msg)?void 0:i.match(/res status:\s*(\d+)/))?parseInt(i[1],10):0,o=(o=null==(o=e.msg)?void 0:o.match(/res duration:\s*([\d.]+)ms/))?parseFloat(o[1]):0,u=(u=null==(u=e.msg)?void 0:u.match(/=+\s*res data\s*=+\s*\n([\s\S]*?)(?:\n=+|$)/))?u[1].trim().slice(0,1e3):undefined,a={},e.trace&&(a.trace_id=e.trace),[Lm.AJAX_ERROR,Lm.RET_ERROR].includes(e.level)||400<=i||0===i?(s={event_id:rc(),event_type:p.API_ERROR,event_category:tc.ERROR,timestamp:Date.now(),page_url:e.from||(null==(s=t.getOriginFrom)?void 0:s.call(t))||window.location.href,data:{url:n,measurements:{duration:o},response_body:u,replay_id:wf(t),tags:0<Object.keys(a).length?a:undefined,event_properties:{http_method:r,http_status:String(i)}}},null!=(u=t.reportTDEMEvent)&&u.call(t,s)):(u={event_id:rc(),event_type:p.API_CALL,event_category:tc.NETWORK,timestamp:Date.now(),page_url:e.from||(null==(s=t.getOriginFrom)?void 0:s.call(t))||window.location.href,data:{url:n,measurements:{duration:o},business_code:String(e.code||""),replay_id:wf(t),tags:0<Object.keys(a).length?a:undefined,event_properties:{http_method:r,http_status:String(i)}}},null!=(s=t.reportTDEMEvent)&&s.call(t,u)))},destroy:function(){var t,n,e;this.option.publishSpeed=function(){},this.option.publishNormalLog=function(){},this.option.hackXHROptions&&(n=this.option.hackXHROptions,-1!==(e=xm.findIndex(function(e){return e.name===n.name})))&&xm.splice(e,1),this.option.hackFetchOptions&&(t=this.option.hackFetchOptions,-1!==(e=Mm.findIndex(function(e){return e.name===t.name})))&&Mm.splice(e,1),this.option.override=!1}})),zm={},Rf=new o({name:"bridge",override:!1,onNewTdem:function(e){this.override||(this.override=!0,this.overrideBridge(e))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},publishSpeed:function(t,n){this.$walk(function(e){e===n&&e.speedLogPipeline(t)})},overrideBridge:function(l){var c=this,f=l.config,e="object"===S(f.bridge)?f.bridge:undefined,t=null==e?void 0:e.target,e=null==e?void 0:e.methods;t&&null!=e&&e.length&&e.forEach(function(e){var u=t[e];zm[e]=u,t[e]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0],i=e[1],n=e[2],o=e[3],a=Date.now(),s=c.getFromParam(l);u(r,i,n,function(e){var t=Wl(e,f.api),n=t.code,t=t.isErr,n={url:r+"-"+i,name:r+"-"+i,duration:Date.now()-a,type:"bridge",ret:n,isErr:+t,from:s};c.publishSpeed(n,l),o(e)})}})},unHackBridge:function(e){var e="object"===S(e.config.bridge)?e.config.bridge:undefined,t=null==e?void 0:e.target;zm=(t&&Object.keys(zm).forEach(function(e){zm[e]&&(t[e]=zm[e])}),{})},destroy:function(e){this.option.publishSpeed=function(){},this.option.unHackBridge(e),this.option.override=!1}}),Lt=((Pf=_m=_m||{})[Pf.unknown=100]="unknown",Pf[Pf.wifi=1]="wifi",Pf[Pf.net2g=2]="net2g",Pf[Pf.net3g=3]="net3g",Pf[Pf.net4g=4]="net4g",Pf[Pf.net5g=5]="net5g",Pf[Pf.net6g=6]="net6g",(jt=Em=Em||{})[jt.android=1]="android",jt[jt.ios=2]="ios",jt[jt.windows=3]="windows",jt[jt.macos=4]="macos",jt[jt.linux=5]="linux",jt[jt.other=100]="other",(Gf=Cm=Cm||{})[Gf.unknown=100]="unknown",Gf[Gf.normal=0]="normal",Gf[Gf.weak=1]="weak",Gf[Gf.disconnected=2]="disconnected",new o({name:"device",onNewTdem:function(e){e.extendBean("platform",this.getPlatform()),e.extendBean("netType",_m.unknown),this.getDpi(e),this.refreshNetworkTypeToBean(e),this.refreshNetworkStatusToBean(e)},getDpi:function(e){e.extendBean("vp",Math.round(window.innerWidth)+" * "+Math.round(window.innerHeight)),window.screen&&e.extendBean("sr",Math.round(window.screen.width)+" * "+Math.round(window.screen.height))},getPlatform:function(){var t={android:/\bAndroid\s*([^;]+)/,ios:/\b(iPad|iPhone|iPod)\b.*? OS ([\d_]+)/,windows:/\b(Windows NT)/,macos:/\b(Mac OS)/,linux:/\b(Linux)/i},e=Object.keys(t).find(function(e){return t[e].test(navigator.userAgent)});return e?Em[e]:Em.other},refreshNetworkTypeToBean:function(t){var n=this,e=t.config;e&&("function"==typeof e.getNetworkType?e.getNetworkType:Bm)(function(e){_m[e]||(e=_m.unknown),t.extendBean("netType",e),n.NetworkRefreshTimer=setTimeout(function(){n.refreshNetworkTypeToBean(t),clearTimeout(n.NetworkRefreshTimer)},1e4)})},refreshNetworkStatusToBean:function(t){var e,n=this,r=t.config;r&&null!=(e="function"==typeof r.getNetworkStatus?r.getNetworkStatus:e)&&e(function(e){Cm[e]===undefined&&(e=Cm.unknown),t.extendBean("netStatus",e),n.NetworkStatusRefreshTimer=setTimeout(function(){n.refreshNetworkStatusToBean(t),clearTimeout(n.NetworkStatusRefreshTimer)},1e4)})}})),Bm=function(e){var t="",n=navigator.userAgent.match(/NetType\/(\w+)/);n?t=n[1]:navigator.connection&&(t=navigator.connection.effectiveType||navigator.connection.type),e((n=t=t||kl,0<=(n=String(n).toLowerCase()).indexOf("4g")?_m.net4g:0<=n.indexOf("wifi")?_m.wifi:0<=n.indexOf("5g")?_m.net5g:0<=n.indexOf("6g")?_m.net6g:0<=n.indexOf("3g")?_m.net3g:0<=n.indexOf("2g")?_m.net2g:_m.unknown))},Wm=window.WebSocket,Hm=[],qm={construct:function(e,t){var r=new e(t[0],t[1]);return r.originSend=r.send,r.addEventListener("error",function(e){var e=(null==e?void 0:e.currentTarget)||{},t=e.url,n=e.readyState;null!=Hm&&Hm.forEach(function(e){e=e.onErr;null!=e&&e({msg:"无法获知具体错误信息,需在浏览器控制台查看!",readyState:n,connectUrl:t})})}),Object.defineProperty(r,"send",{get:function(){return function(e){null!=(t=r.originSend)&&t.call(r,e);var t,e=r.readyState;if(e!==WebSocket.OPEN){var n={readyState:e,connectUrl:r.url};switch(e){case WebSocket.CLOSED:Hm.forEach(function(e){e=e.sendErr;null!=e&&e(h({msg:"消息发送失败,连接已关闭!"},n))});break;case WebSocket.CONNECTING:Hm.forEach(function(e){(0,e.sendErr)(h({msg:"消息发送失败,正在连接中!"},n))});break;case WebSocket.CLOSING:Hm.forEach(function(e){(0,e.sendErr)(h({msg:"消息发送失败,连接正在关闭!"},n))})}}}}}),r}},Vm=new o({name:"onError"}),_f=Vm=new o({name:"onError",onNewTdem:function(e){this.startListen(e)},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},startListen:function(s){var e,t,n,u=this,l=window.onerror,r=(window.onerror=function(e,t,n,r,i){var o,a=Vl(e);vf(a)||(a=[{type:(null==i?void 0:i.name)||"Error",value:String(e),mechanism_type:"onerror",mechanism_handled:0}],o=i?ic(i):[{abs_path:t||"",colno:r||0,filename:(null==t?void 0:t.split("/").pop())||"","function":"(anonymous)",lineno:n||0,in_app:1,stack_level:0}],a={event_id:rc(),event_type:p.JS_ERROR,event_category:tc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{exception_stacks:a,exception_frames:o,replay_id:wf(s),tags:{environment:s.config.env||"production",version:String(s.config.version||"")}}},null!=(o=s.reportTDEMEvent)&&o.call(s,a)),null!=l&&l.call(window,e,t,n,r,i)},function(e){var t,n=e&&Vl(e.reason);n&&(t=[{type:(null==(t=e.reason)?void 0:t.name)||"PromiseRejection",value:(null==(t=e.reason)?void 0:t.message)||String(n),mechanism_type:"unhandledrejection",mechanism_handled:0}],n=e.reason instanceof Error?ic(e.reason):[],e={event_id:rc(),event_type:p.PROMISE_ERROR,event_category:tc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{exception_stacks:t,exception_frames:n,replay_id:wf(s),tags:{environment:s.config.env||"production"}}},null!=(t=s.reportTDEMEvent))&&t.call(s,e)}),i=(window.addEventListener("unhandledrejection",r),function(e){e=(null==e?void 0:e.target)||(null==e?void 0:e.srcElement);if(e){var t=e.src||e.href||"",n=e.tagName,n=(void 0===n?"script":n).toLowerCase(),r=["audio","video"].includes(n);if(!r||null!=e&&e.error){if(!(Ql(i=t,s.config.hostUrl)||-1<window.location.href.indexOf(i))){var i="other";if(/\.js$/.test(t)||"script"===n)i="script";else if(/\.css$/.test(t)||"link"===n)i="stylesheet";else if("img"===n)i="image";else{if(!r)return;i="media"}t={event_id:rc(),event_type:p.RESOURCE_ERROR,event_category:tc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{url:t,resource_type:i,replay_id:wf(s),tags:h({environment:s.config.env||"production"},r&&null!=e&&e.error?{error_code:String(e.error.code),error_message:e.error.message||""}:{}),event_properties:{element_tag:n}}};null!=(i=s.reportTDEMEvent)&&i.call(s,t)}}else console.log("may be media load success because error is undefine")}}),o=(window.document.addEventListener("error",i,!0),s.lifeCycle.on("destroy",function(){0===Vm.countInstance()&&(window.removeEventListener("unhandledrejection",r),window.document.removeEventListener("error",i,!0))}),s.config.websocket);(("object"===S(o)?!1!==o.enabled:o)||s.config.websocketHack)&&(o={key:s.config.id+"-"+this.name,onErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,s)},sendErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,s)}},this.hackWebsocketConfig=o,o=this.hackWebsocketConfig,window.Proxy)&&window.WebSocket&&(e=window.WebSocket,window&&!e.isHack&&(t=new Proxy(WebSocket,qm),e.isHack=!0,window.WebSocket=t),n=o,Hm.find(function(e){return e.key===n.key})||n&&Hm.push(n))},publishWsErrorLog:function(e,n){var t=e.connectUrl,r=e.msg,e=e.readyState,i={event_id:rc(),event_type:p.JS_ERROR,event_category:tc.ERROR,timestamp:Date.now(),page_url:this.getFromParam(n),data:{exception_stacks:[{type:"WebSocketError",value:"WEBSOCKET_ERROR: connect: "+t+" readyState: "+e+" msg: "+r,mechanism_type:"websocket",mechanism_handled:0}],exception_frames:[],replay_id:wf(n),tags:{environment:n.config.env||"production",websocket_url:t||"",websocket_ready_state:String(null!=e?e:"")}}};this.$walk(function(e){var t;e===n&&null!=(t=e.reportTDEMEvent)&&t.call(e,i)})},destroy:function(){var t,e;this.option.hackWebsocketConfig&&(t=this.option.hackWebsocketConfig,window.WebSocket=Wm,-1!==(e=Hm.findIndex(function(e){return e.key===t.key})))&&Hm.splice(e,1)}}),Pr=vi.f,Gm=y(Pr),Jm=y([].push),$m=d&&g(function(){var e=Object.create(null);return e[2]=2,!Gm(e,2)}),l=function(u){return function(e){for(var t,n=ze(e),r=st(n),i=$m&&null===lr(n),o=r.length,a=0,s=[];a<o;)t=r[a++],d&&!(i?t in n:Gm(n,t))||Jm(s,u?[t,n[t]]:n[t]);return s}},Df={entries:l(!0),values:l(!1)},Zm=Df.entries,Km=(O({target:"Object",stat:!0},{entries:function(e){return Zm(e)}}),new o({name:"click"}),function(e){if(""!==e.id&&e.id)return'id("'+e.id+'")';if(e===document.body)return e.tagName;if(e instanceof Document)return"document";var t=0;if(e.parentNode)for(var n=e.parentNode.childNodes,r=0;r<n.length;r+=1){var i=n[r];if(i===e)return Km(e.parentNode)+"/"+e.tagName+"["+(t+1)+"]";1===i.nodeType&&i.tagName===e.tagName&&(t+=1)}return 0}),Ym=function(e){return e instanceof Array?new Map(e.map(function(e){return[e,!0]})):new Map},Xm=function(e,t){return"string"==typeof e?e.split(t):[]},Qm=function(e){if(3===e.nodeType||4===e.nodeType)return e.nodeValue||"";if(1!==e.nodeType)return"";if("string"==typeof e.textContent)return e.textContent;for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=Qm(n);return t},r=new o({name:"click",listeners:[],onNewTdem:function(e){this.startListen(e)},startListen:function(a){for(var e=function(o){var e,t,n,r,i;s.listeners.push((e=document,t=o,n=function(e,t){var n,r,i;t&&!function(e,t){e="object"===S((e=e).click)?e.click:undefined,n=Ym((null==e?void 0:e.ignoreClasses)||[])||new Map;for(var n,e={ignoreIds:Ym((null==e?void 0:e.ignoreIds)||[])||new Map,ignoreClasses:n},r=e.ignoreClasses,i=e.ignoreIds,o=!(0===i.size&&0===r.size),a=t,s=(Xm(t.getAttribute("id")||""," "),Xm(t.getAttribute("class")||"",""),0),u=!1;a&&o&&a.getAttribute;){if(u)return!0;if(10<=s)break;for(var l=Xm(a.getAttribute("id")||""," "),c=Xm(a.getAttribute("class")||"",""),f=0,d=l;f<d.length;f++){var h=d[f];if(i.has(h)){u=!0;break}}for(var p=0,m=c;p<m.length;p++){var g=m[p];if(r.has(g)){u=!0;break}}s+=1,a=a.parentNode||a.parentElement}return!1}(a.config,t)&&(i=Km(t),n=function(e){e=function(e){var t="",n=e.nodeType;if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(var r=e.firstChild;r;r=r.nextSibling)t+=Qm(e)}else if(3===n||4===n)return e.nodeValue;return t}(e);return e?e.replace(/^\s+|\s+$/g,""):""}(t),r=t.getBoundingClientRect&&t.getBoundingClientRect(),i={event_id:rc(),event_type:p.CLICK,event_category:tc.BEHAVIOR,timestamp:Date.now(),page_url:window.location.href,data:{target_element:String(i),target_text:n.slice(0,127),click_position:r?{x:parseInt(String(r.left+window.scrollX),10)||0,y:parseInt(String(r.top+window.scrollY),10)||0}:undefined,replay_id:wf(a),tags:{environment:a.config.env||"production",event_op:o,node_name:(null==t?void 0:t.nodeName)||""},event_properties:{target_id:t.id||"",target_class:"string"==typeof t.className?t.className.slice(0,128):""}}},null!=(n=a.reportTDEMEvent))&&n.call(a,i)},void 0===(r=!0)&&(r=!0),i=function(e){var t=document.documentElement;t&&n.call(t,e,e.target)},e.addEventListener(t,i,r),{destroy:function(){e.removeEventListener(t,i,r)}}))},s=this,t=0,n=Object.entries({click:1,longpress:2});t<n.length;t++)e(n[t][0])},destroy:function(){this.listeners.forEach(function(e){return e.destroy()}),this.listeners=[]}}),eg=(new o({name:"console"}),["log","error","warn","info","debug","trace"]),tg={log:console.log,error:console.error,warn:console.warn,info:console.info,debug:console.debug,trace:console.trace};var ng,rg,ig,og,ag,sg,ug,lg,cg,fg,dg,Vf=new o({name:"console",onNewTdem:function(e){this.startListen(e)},startListen:function(e){var d,h;h="object"===S((d=e).config.console)?d.config.console:undefined,eg.forEach(function(c){var f=tg[c];console[c]=function(){for(var e,t,n,r,i,o,a,s,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];try{f.apply(console,u),o=c,a=d.isWhiteList,("all"===(s=(null==(s=h)?void 0:s.level)||"error")||a||("error"===s?"error"===o:"warn"===s?"error"===o||"warn"===o:"info"===s?["error","warn","info"].includes(o):"log"===s?["error","warn","info","log"].includes(o):"error"===o))&&(r=u.map(function(e){if("object"===S(e)&&null!==e)try{return JSON.stringify(e)}catch(h){}return String(e)}).join(" "),i={event_id:rc(),event_type:p.LOG,event_category:tc.LOG,timestamp:Date.now(),page_url:(null==(e=d.getOriginFrom)?void 0:e.call(d))||("undefined"!=typeof window?null==(t=window.location)?void 0:t.href:""),data:{log_level:"error"===c?"error":"warn"===c?"warn":"info",replay_id:wf(d),tags:{console_method:c},event_properties:{message:("console."+c+": "+r).slice(0,2048)}}},null!=(n=d.reportTDEMEvent)&&n.call(d,i))}catch(F){tg.error("Console hook error:",F)}}})},destroy:function(){Object.keys(tg).forEach(function(e){console[e]=tg[e]})}}),hg=(ag={passive:!0,capture:!0},sg=new Date,Pf=function(){og=[],rg=-1,ng=null,fg(addEventListener)},ug=function(e,t){ng||(ng=t,rg=e,ig=new Date,fg(removeEventListener),lg())},lg=function(){var t;0<=rg&&rg<ig-sg&&(t={entryType:"first-input",name:ng.type,target:ng.target,cancelable:ng.cancelable,startTime:ng.timeStamp,processingStart:ng.timeStamp+rg},og.forEach(function(e){e(t)}),og=[])},cg=function(e){var t,n,r,i,o,a;e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){ug(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,ag),removeEventListener("pointercancel",o,ag)},addEventListener("pointerup",i,ag),addEventListener("pointercancel",o,ag)):ug(t,e))},fg=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,cg,ag)})},dg="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",function U(e){"hidden"===document.visibilityState&&(dg=e.timeStamp,removeEventListener("visibilitychange",U,!0))},!0),Pf(),self.webVitals={firstInputPolyfill:function(e){og.push(e),lg()},resetFirstInputPolyfill:Pf,get firstHiddenTime(){return dg}},function(e,t){var n,r=function(t,n,r,i){var o=function(e){"visibilitychange"===t&&"hidden"!==document.visibilityState||(i?setTimeout(function(){return n(e)},i):n(e),r&&removeEventListener(t,o,!0))};addEventListener(t,o,!0)};r("visibilitychange",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.visibilitychange),r("pagehide",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.pagehide),r("beforeunload",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.beforeunload)});new o({name:"webVitals"});var pg,mg={FCP:-1,LCP:-1,FID:-1,CLS:-1,INP:-1,TTI:-1,from:undefined},gg=(new o({name:"pagePerformance"}),function(e,t,n,r){return void 0===n&&(n=15e3),void 0===r&&(r=0),(t=void 0===t?0:t)<=e&&e<=n?e:r}),vg=new Map,jt=new o({name:"pagePerformance",performanceMap:{},onNewTdem:function(t){var e;yf()&&(vg.set(t,{isPagePerformanceReported:!1}),pg?this.publish(pg,t):this.startCalcPerformance(t),e=this.publishWhenObHidden.bind(this,t),hg(e,{once:!0}),t.lifeCycle.on("destroy",function(){var e=vg.get(t);e&&(e.isPagePerformanceReported=!1)}))},publishWhenObHidden:function(e){var t,n=vg.get(e);if(null==n||!n.isPagePerformanceReported){n=0;if(null!=(t=e.firstScreenInfo)&&t.timing)n=e.firstScreenInfo.timing;else if(-1<(null==(t=null==(t=window.PerformanceObserver)?void 0:t.supportedEntryTypes)?void 0:t.indexOf("paint")))try{var r,i=performance.getEntriesByName("first-contentful-paint");i&&0<i.length&&(r=i[0])&&0<r.startTime&&(n=r.startTime)}catch(L){}(pg=this.buildPerformanceLog(e,n,this.getPageUrl(e),window.location.href))&&this.publish(pg,e,!0)}},buildPerformanceLog:function(e,t,n,r){var i=performance.timing;return i?(n={from:n,originFrom:r,dnsLookup:gg(i.domainLookupEnd-i.domainLookupStart),tcp:gg(i.connectEnd-i.connectStart),ssl:gg(0===i.secureConnectionStart?0:i.requestStart-i.secureConnectionStart),ttfb:gg(i.responseStart-i.requestStart),contentDownload:gg(i.responseEnd-i.responseStart),domParse:gg(i.domInteractive-i.domLoading,0,15e3,1070),resourceDownload:gg(i.loadEventStart-i.domInteractive,0,15e3,1070),firstScreenTiming:gg(Math.floor(t),0,15e3,15e3)},(r=e.config).extraPerformanceData&&"{}"!==JSON.stringify(r.extraPerformanceData)&&(t=(i=r.extraPerformanceData).engineInit,e=i.bundleLoad,n=h(h({},n),{engineInit:gg(t,0,1e4),bundleLoad:gg(e,0,1e4)})),n):undefined},publish:function(r,i){var o=this;this.$walk(function(e){var t,n;e===i&&(t=(n=performance.timing).navigationStart,n={event_id:rc(),event_type:p.PAGE_LOAD,event_category:tc.PERFORMANCE,timestamp:Date.now(),page_url:r.originFrom||window.location.href,data:{measurements:{lcp:mg.lcp,fcp:mg.fcp,fid:mg.fid,cls:mg.cls,ttfb:mg.ttfb||r.ttfb,dns_time:r.dnsLookup,tcp_time:r.tcp,ssl_time:r.ssl,request_time:r.ttfb,response_time:r.contentDownload,dom_parse_time:r.domParse,dom_ready:n.domContentLoadedEventEnd-t,load_complete:n.loadEventEnd-t,first_screen_time:r.firstScreenTiming},replay_id:wf(e),device_type:o.getDeviceType(),tags:{environment:e.config.env||"production",version:String(e.config.version||"")}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),n=vg.get(e))&&(n.isPagePerformanceReported=!0)})},getPageUrl:function(e){var t=this.$getConfig(e);if(null!=t&&t.urlHandler&&"function"==typeof(null==t?void 0:t.urlHandler)){t=null==t?void 0:t.urlHandler();if(t)return encodeURIComponent(t)}return e.getCurrentPageUrl()},getDeviceType:function(){var e=navigator.userAgent;return/mobile/i.test(e)?"Mobile":/tablet|ipad/i.test(e)?"Tablet":"Desktop"},startCalcPerformance:function(t){var n=this;try{var r=this.getPageUrl(t),i=t.getOriginFrom();this.getFirstScreenTiming(t,function(e){pg=n.buildPerformanceLog(t,e,r,i);e=vg.get(t);!pg||null!=e&&e.isPagePerformanceReported||n.publish(pg,t)})}catch(b){}},getFirstScreenTiming:function(e,t){null!=t&&t(0)},setFirstScreenInfo:function(e,t,n,r){var i;e.config.id&&this.performanceMap[e.config.id]||(e.config.id&&(this.performanceMap[e.config.id]=!0),("object"!==S(null==(i=e.config)?void 0:i.pagePerformance)||null!=(i=e.config.pagePerformance)&&i.firstScreenInfo)&&(e.firstScreenInfo={element:n,timing:t,markDoms:r}))},isEleInArray:function(e,t){return!(!e||e===document.documentElement)&&(-1!==t.indexOf(e)||this.isEleInArray(e.parentElement,t))},isInFirstScreen:function(e){var t;return!(!e||"function"!=typeof e.getBoundingClientRect)&&(e=e.getBoundingClientRect(),t=window.innerHeight,0<=e.left)&&e.left<window.innerWidth&&0<=e.top&&e.top<t&&0<e.width&&0<e.height},walkAndCount:function(e){var t=0;if(e&&1===e.nodeType){t+=1;var n=e.children;if(null!=n&&n.length)for(var r=0;r<n.length;r++)1===n[r].nodeType&&(n[r].hasAttribute("TDEM-IGNORE-FIRST-SCREEN-TIMING")||n[r].hasAttribute("AEGIS-IGNORE-FIRST-SCREEN-TIMING"))||(t+=this.walkAndCount(n[r]))}return t},hasAncestorOrSelfWithAttribute:function(e,t){for(var n=t.replace(/^TDEM-/,"AEGIS-"),r=e;r&&r!==document.body;){if(r.hasAttribute(t)||n!==t&&r.hasAttribute(n))return!0;r=r.parentElement}return!1}}),yg=Math.min,wg=[].lastIndexOf,bg=!!wg&&1/[1].lastIndexOf(1,-0)<0,Gf=Fe("lastIndexOf"),kg=bg||!Gf?function(e){if(bg)return Re(wg,this,arguments)||0;var t=ze(this),n=fe(t);if(0!==n){var r=n-1;for((r=1<arguments.length?yg(r,ue(arguments[1])):r)<0&&(r=n+r);0<=r;r--)if(r in t&&t[r]===e)return r||0}return-1}:wg,Sg=(O({target:"Array",proto:!0,forced:kg!==[].lastIndexOf},{lastIndexOf:kg}),new o({name:"spa"}),["replaceState","pushState","popstate","hashchange"]),Pr=new o({name:"spa",originFireUrl:"",lastPageUrl:"",navigationStack:[],navigationIndex:-1,onNewTdem:function(n){var r=this,e=(history.pushState=this.wr("pushState")||history.pushState,history.replaceState=this.wr("replaceState")||history.replaceState,this.sendPv=this.sendPv.bind(this),location.href);this.navigationStack.length||(this.navigationStack=[e],this.navigationIndex=0),n.config.spa&&this.sendPv(n,"reload"),Sg.forEach(function(e){var t=e;window.addEventListener(e,function(){return r.sendPv.call(r,n,t)})})},wr:function(n){var r=history[n],e="__"+n+"__hasWrittenByTamSpa";return"function"==typeof r&&!history[e]&&(Object.defineProperty(history,e,{value:!0,enumerable:!1}),function(){var e=r.apply(this,arguments),t=null;return"function"==typeof Event?t=new Event(n):(t=document.createEvent("HTMLEvents")).initEvent(n,!1,!0),window.dispatchEvent(t),e})},resolveNavigationType:function(e,t){var n;return"pushState"===e?(this.navigationIndex<this.navigationStack.length-1&&(this.navigationStack=this.navigationStack.slice(0,this.navigationIndex+1)),this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"push"):"replaceState"===e?(this.navigationIndex<0?(this.navigationStack=[t],this.navigationIndex=0):this.navigationStack[this.navigationIndex]=t,"replace"):"hashchange"===e?"hashchange":"popstate"===e?0<=(e=this.navigationStack.lastIndexOf(t))?(n=e<this.navigationIndex?"back":"forward",this.navigationIndex=e,n):(this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"forward"):"reload"},sendPv:function(s,e){var u=this;void 0===e&&(e="reload"),setTimeout(function(){s._customPageUrl=null;var r=location.pathname+location.hash+s.config.id,i=s.getOriginFrom(),o=u.lastPageUrl||undefined,a=u.resolveNavigationType(e,location.href);u.$walk(function(e){var t,n;e===s&&r&&r!==u.originFireUrl&&(n={event_id:rc(),event_type:p.PAGE_VIEW,event_category:tc.BEHAVIOR,timestamp:Date.now(),page_url:i,data:{page_title:document.title||"",referrer:document.referrer||undefined,is_effective_action:!0,replay_id:wf(e),tags:{environment:e.config.env||"production",version:String(e.config.version||""),is_spa:"true"},event_properties:{navigation_type:a,from_page:(o||"").slice(0,512),to_page:(i||"").slice(0,512)}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),u.originFireUrl=r,u.lastPageUrl=i)})},0)},destroy:function(){this.option.sendPv=function(){}}}),_g="__MONITOR_SESSION_V1__";function Eg(e,t){"undefined"!=typeof document&&(e=[e+"="+encodeURIComponent(t),"path=/","SameSite=Lax"],"undefined"!=typeof location&&"https:"===location.protocol&&e.push("Secure"),document.cookie=e.join("; "))}function Cg(e,t,n){void 0===n&&(n=1);var r=Date.now();return{sessionId:e,createdAt:r,lastActivity:r,source:t,version:n}}function Og(e,t){var n,r,i;return"undefined"==typeof window?Cg(t(),e):(r="undefined"!=typeof document&&(r="_tdem_s".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)")))?decodeURIComponent(r[1]):null,n=window[_g],r?(null==n?void 0:n.sessionId)===r?(n.lastActivity=Date.now(),n):(i=Cg(r,(null==n?void 0:n.source)||e,(null==n?void 0:n.version)||1),window[_g]=i):null!=n&&n.sessionId?(n.lastActivity=Date.now(),Eg("_tdem_s",n.sessionId),n):(i=Cg(t(),e),Eg("_tdem_s",(window[_g]=i).sessionId),i))}Dg.prototype.request=function(o,a){var s=this;return void 0===a&&(a={}),o.sendBeacon||o.handoff?this.handoff(o,a):new Promise(function(n){var e,r,t,i=new XMLHttpRequest;i.sendByTdem=!0,i.addEventListener("readystatechange",function(){var e,t;4===i.readyState&&((e={ok:0<i.status&&i.status<400,status:i.status,statusText:i.statusText,body:i.response,request:o}).ok?(null!=(t=a.success)&&t.call(a,i.response),null!=(t=a["final"])&&t.call(a,e),n(e)):(t=h(h({},e),{error:i.response}),null!=(e=a.fail)&&e.call(a,i.response),null!=(e=a["final"])&&e.call(a,t),n(t)))}),"get"===(o.method||"GET").toLowerCase()?(i.open("get",(e=o.url,r=o.data,"string"!=typeof e?"":"object"===S(r)&&r?(t=Object.getOwnPropertyNames(r).map(function(e){var t=r[e];return e+"="+("string"==typeof t?encodeURIComponent(t):encodeURIComponent(JSON.stringify(t)))}).join("&").replace(/eval/gi,"evaI"),e+(-1===e.indexOf("?")?"?":"&")+t):e)),s.applyHeaders(i,o.headers),i.send()):(i.open("post",o.url),s.applyHeaders(i,o.headers),o.contentType&&i.setRequestHeader("Content-Type",o.contentType),t=o.body!==undefined?o.body:o.data,s.shouldSanitizeEvalKeyword(o,t)&&(t=t.replace(/eval/gi,"evaI")),i.send(t))})},Dg.prototype.shouldSanitizeEvalKeyword=function(e,t){return"string"==typeof t&&!("replay"===e.kind||(e=null!=(t=null==(t=e.headers)?void 0:t["Content-Encoding"])?t:null==(t=e.headers)?void 0:t["content-encoding"])&&/gzip/i.test(e))},Dg.prototype.handoff=function(e,t){void 0===t&&(t={});var n,r="undefined"!=typeof navigator?navigator:undefined;return r&&"function"==typeof r.sendBeacon?(n=e.body!==undefined?e.body:e.data,r={ok:n=r.sendBeacon(e.url,n),request:e,handoffAccepted:n,error:n?undefined:new Error("navigator.sendBeacon rejected the payload")},n?null!=(n=t.success)&&n.call(t,{accepted:!0}):null!=(n=t.fail)&&n.call(t,r.error),null!=(n=t["final"])&&n.call(t,r),Promise.resolve(r)):(n={ok:!1,request:e,error:new Error("navigator.sendBeacon is unavailable")},null!=(r=t.fail)&&r.call(t,n.error),null!=(e=t["final"])&&e.call(t,n),Promise.resolve(n))},Dg.prototype.applyHeaders=function(t,n){n&&Object.keys(n).forEach(function(e){t.setRequestHeader(e,n[e])})};var Rg,xg,Ig=Dg,Tg=new Map,Mg=(fl(xg=Pg,l=Rg=of),xg.prototype=null===l?Object.create(l):(Lg.prototype=l.prototype,new Lg),Pg.prototype._bootstrapInit=function(e){this.setConfig(e),this.config=gl(this.config,e.hostUrl),this._prefetchConfigAndInit(e)},Pg.prototype._initImmediately=function(e){this.init(e),this._afterInit(e)},Pg.prototype._prefetchConfigAndInit=function(a){return dl(this,void 0,void 0,function(){var t,n,r,i,o;return hl(this,function(e){switch(e.label){case 0:if(t=this.config.id,n=this._buildPrefetchConfigUrl(),r=!1,i=null,!t||!n)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transportRequest({kind:"config",url:n,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:t})})];case 2:return(o=e.sent()).ok&&0===(o="string"==typeof o.body?JSON.parse(o.body):o.body).code&&o.data&&(r=!!o.data.enabled,i=o.data),[3,4];case 3:return e.sent(),(o=this._loadPrefetchDataFromCache(t))&&(r=!!o.enabled,i=o),[3,4];case 4:if(r){i&&(this._prefetchedConfigData=i);try{this._initAfterPreparedConfig(a)}catch(D){console.warn(D),console.log("%cThe above error occurred in the process of initializing TDEM, which will affect your normal use of TDEM.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),this.sendSDKError(D)}}else console.info("[TDEM] SDK disabled by remote config, skip initialization");return[2]}})})},Pg.prototype._buildPrefetchConfigUrl=function(){var e=(this.config.url||"").replace(/\/+$/,"");return e?e+"/api/v1/config":""},Pg.prototype._loadPrefetchDataFromCache=function(e){try{var t,n,r=localStorage.getItem("TDEM_SAMPLE_CONFIG");return r?!((t=JSON.parse(r)).projectKey!==e||6048e5<=Date.now()-t.timestamp)&&0<t.sampleRate?(n={enabled:t.remoteEnabled!==undefined?!!t.remoteEnabled:0<t.sampleRate,tdem_sample_rate:t.sampleRate},t.replaySampleRate!==undefined&&(n.replay_sample_rate=t.replaySampleRate),t.errorTraceback!==undefined&&(n.error_traceback=t.errorTraceback),t.errorSampleRate!==undefined&&(n.error_sample_rate=t.errorSampleRate),n):null:null}catch(g0){return null}},Pg.prototype._initAfterPreparedConfig=function(e){for(var t=0;t<of.installedPlugins.length;t++)try{of.installedPlugins[t].patch(this)}catch(P){this.sendSDKError(P)}this.lifeCycle.emit("onInited"),this._afterInit(e)},Pg.prototype._afterInit=function(e){var t,o,n=this;this._sdkInitialized=!0,this.extendBean("sessionId",Pg.sessionID),this.extendBean("from",this.getCurrentPageUrl()),"undefined"!=typeof document&&this.extendBean("referer",encodeURIComponent(document.referrer||"")),t=Al(Tl("tdem-web-retry-report-requests"),[]),(o=function(){var i;t.length&&(i=t.splice(0,1)[0],Ml("tdem-web-retry-report-requests",JSON.stringify(t)),n.$request(i,function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=Tg.get(null==(e=i.extraRetryOptions)?void 0:e.success))?void 0:t.apply(i,n)}finally{o()}},function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=Tg.get(null==(e=i.extraRetryOptions)?void 0:e.fail))?void 0:t.apply(i,n)}finally{o()}}))})()},Pg.prototype.getBean=function(t){var n=this;return void 0===t&&(t=[]),""+Object.getOwnPropertyNames(this.bean).filter(function(e){return-1===t.indexOf(e)}).map(function(e){return"from"===e?"from="+n.getCurrentPageUrl():e+"="+n.bean[e]}).join("&")},Pg.prototype.getCurrentPageUrl=function(){var e;return this._customPageUrl?encodeURIComponent(this._customPageUrl.slice(0,2048)):(e=this.config.pageUrl||location.href,e=(e="function"==typeof this.config.urlHandler?this.config.urlHandler()||location.href:e).slice(0,2048),encodeURIComponent(e))},Pg.prototype.getOriginFrom=function(){if(this._customPageUrl)return this._customPageUrl.slice(0,2048);try{return("undefined"!=typeof window&&window.location?window.location.href:"").slice(0,2048)}catch(Pe){return""}},Pg.prototype.ready=function(){var t=this,o=function(){var e,n,r,i;t.reportRequestQueue.length&&(e=t.reportRequestQueue.splice(0,1)[0],n=e.options,r=e.success,i=e.fail,t.$request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==r?void 0:r.apply(n,e)}finally{o()}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==i?void 0:i.apply(n,e)}finally{o()}}))};o(),this.isReportReady=!0},Pg.prototype.request=function(u,n,l){var c,f,d=this;this.config.reportImmediately||this.isReportReady?this.$request(u,c=function(e){var t=Al(Tl("tdem-web-retry-report-requests"),[]);null!=t&&t.length&&u.extraRetryOptions&&(t.splice(t.findIndex(function(e){return e.extraRetryOptions.requestId===u.extraRetryOptions.requestId}),1),Ml("tdem-web-retry-report-requests",JSON.stringify(t)),Tg["delete"](u.extraRetryOptions.success),Tg["delete"](u.extraRetryOptions.fail)),null!=n&&n(e)},f=function(e){if(!d.config.reportRetry)return null==l?void 0:l(e);var t,n="boolean"==typeof d.config.reportRetry?Pm:h(h({},Pm),d.config.reportRetry),r=n.maxRetryCount,i=void 0===r?Pm.maxRetryCount:r,r=n.retryInterval,r=void 0===r?Pm.retryInterval:r,n=n.whenRetryEndStillFail,o=void 0===n?Pm.whenRetryEndStillFail:n,a=(u.extraRetryOptions||(u.extraRetryOptions={requestId:"",retriedCount:0,success:"",fail:""}),u.extraRetryOptions),s=(a.requestId=a.requestId||u.url+"-"+Date.now()+"-"+Math.random(),a.requestId),n=(a.retriedCount=a.retriedCount||0,a.success=a.success||s+"_successCallback",a.fail=a.fail||s+"_failCallback",Al(Tl("tdem-web-retry-report-requests"),[]));n.find(function(e){return e.extraRetryOptions.requestId===s})?(t=n.findIndex(function(e){return e.extraRetryOptions.requestId===s}),n[t]=u):n.push(u),Ml("tdem-web-retry-report-requests",JSON.stringify(n)),setTimeout(function(){var e;a.retriedCount<i?(u.extraRetryOptions.retriedCount+=1,d.$request(u,c,f)):("discard"===o&&((e=Al(Tl("tdem-web-retry-report-requests"),[]).filter(function(e){return(null==(e=e.extraRetryOptions)?void 0:e.requestId)!==s})).length?Ml("tdem-web-retry-report-requests",JSON.stringify(e)):function(e){try{localStorage.removeItem(e)}catch(g0){}}("tdem-web-retry-report-requests")),Tg["delete"](a.success),Tg["delete"](a.fail))},"function"==typeof r?r(u.extraRetryOptions.retriedCount):r),null!=l&&l(e),Tg.has(a.success)||Tg.set(a.success,c),Tg.has(a.fail)||Tg.set(a.fail,f)}):this.reportRequestQueue.push({options:u,success:n,fail:l})},Pg.prototype.$request=function(s,e,t){var n,r;if(s&&"string"==typeof s.url&&""!==s.url&&this.bean.id)return n=s.url,!1!==s.addBean&&(n=function(e,t){var n,r,i,o=e,a=s.beanFilter||[];for(n in t)-1===a.indexOf(n)&&((i=(r=new RegExp("([?&])"+n+"(=([^&]*))?(?=&|$)")).exec(o))?i[2]&&""!==i[3]&&"undefined"!==i[3]||(o=o.replace(r,"$1"+n+"="+t[n])):(i=-1<o.indexOf("?")?"&":"?",o+=i+n+"="+t[n]));return o}(n,h(h({},this.bean),{from:this.getCurrentPageUrl()}))),s.url=n,n=s.method||"get",r=this.config.onBeforeRequest,(s=r?r(s,this):s)?s.url?(r={success:e,fail:t},void((e={kind:s.type===Ll.WHITE_LIST?"config":"events",url:s.url,method:n.toUpperCase(),contentType:s.contentType,data:s.data,body:s.data,sendBeacon:!!(null!=s&&s.sendBeacon||this.sendNow),source:s}).sendBeacon?this.transportHandoff(e,r):this.transportRequest(e,r))):console.warn("Please handle the parameters reasonably, options.url is necessary"):console.warn("Sending request blocked")},Pg.prototype.publishPluginsLogs=function(){var e=Pg.installedPlugins.find(function(e){return"assets"===e.name});null!=e&&e.option.collectNotReportedLog(this)},Pg.prototype.uploadLogs=function(e,t){var n;void 0===e&&(e={}),void 0===t&&(t={}),null!=(n=this.lifeCycle)&&n.emit("uploadLogs",e,t)},Pg.prototype.reportWebVitals=function(e){try{var t=Pg.installedPlugins.find(function(e){return"webVitals"===e.name});t&&this.config.webVitals&&this.config.webVitals.manualReport&&t.option.publish(this,e)}catch(Pe){}},Pg.sessionID=Og("tdem",Wc).sessionId,Pg),Pf=(new o({name:"ie"}),new o({name:"ie",init:function(){this.overrideTdemSend()},onNewTdem:function(e){this.startListen(e)},startListen:function(o){var a=this,s=window.onerror;window.onerror=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r,i=Vl(t[0]);vf(i)||(r={event_id:rc(),event_type:p.JS_ERROR,event_category:tc.ERROR,timestamp:Date.now(),page_url:("undefined"!=typeof window?null==(e=window.location)?void 0:e.href:"")||"",data:{exception_stacks:[{type:"Error",value:String(i||""),mechanism_type:"onerror",mechanism_handled:0}],exception_frames:[{abs_path:String(t[1]||""),colno:Number(t[3])||0,filename:String(t[1]||"").split("/").pop()||"","function":"(anonymous)",lineno:Number(t[2])||0,in_app:1,stack_level:0}]}},a.$walk(function(e){var t;e===o&&null!=(t=e.reportTDEMEvent)&&t.call(e,r)})),null!=s&&s.call.apply(s,pl([window],t))}},overrideTdemSend:function(){Mg.prototype.request=function(e,t,n){var r,i,o=this;e&&"string"==typeof e.url&&""!==e.url&&this.bean.id&&(r=e.url,!1!==e.addBean&&(r=r+(-1===r.indexOf("?")?"?":"&")+this.getBean(e.beanFilter)),(i=new Image).onload=function(){o.request(e,t,n),null!=t&&t(null)},i.onerror=function(){o.request(e,t,n),null!=n&&n(null)},e.data?i.src=r+"&"+e.data:i.src=r)}},destroy:function(){}})),Gf=(new o({name:"onClose"}),new o({name:"onClose",onNewTdem:function(n){var r,i=this;f.desktop()?(r=window.onunload,window.onunload=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.publishNotReportedLog(n),null!=r&&r.call.apply(r,pl([window],e))}):hg(this.publishNotReportedLog.bind(this,n),{once:!0})},publishNotReportedLog:function(t){var n=this;this.$walk(function(e){e===t&&(e.sendNow=!0,e.publishPluginsLogs(),n.publishThrottlePipeLogs(e))})},publishThrottlePipeLogs:function(e){null!=e&&e.speedLogPipeline([]),null!=e&&e.tdemEventPipeline([])}})),Ag=void 0;function Pg(e,t){var n,r,i,a,o,s,u,l,c,f,d=Rg.call(this,e,t=void 0===t?{}:t)||this;d.sendNow=!1,d.isReportReady=!1,d.reportRequestQueue=[],d._sdkInitialized=!1,d.speedLogPipeline=ef([(l=[],c=(o=d).config,o.lifeCycle.on("destroy",function(){l.length=0}),function(e,t){Array.isArray(e)?l=l.concat(e):l.push(e),s&&l.length>=s||o.sendNow&&0<l.length?(l=gc(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length)),u&&clearTimeout(u)):(u&&clearTimeout(u),u=setTimeout(function(){u=null,l=gc(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length))},c.delay))}),(a=d.config,function(e,t){var n,r,i,o="number"==typeof a.repeat?a.repeat:60;!a.speedSample||o<=0?t(e):(n=(null==a?void 0:a.id)||"0",r=yc[n]||{},Array.isArray(e)?(i=e.filter(function(e){var t=!r[e.url]||r[e.url]<o;return t?(r[e.url]=1+~~r[e.url],yc[n]=r):vc[n]||wc(n),t})).length&&t(i):!r[e.url]||r[e.url]<o?(r[e.url]=1+~~r[e.url],yc[n]=r,t(e)):vc[n]||wc(n))}),(i=d,function(t,n){Bm(function(e){i.extendBean("netType",e),n(t)})}),function(e,t){null!=(n=d.lifeCycle)&&n.emit("beforeReportSpeed",e);var n,r=d.config.beforeReportSpeed;if((e="function"==typeof r?e.filter(function(e){return!1!==r(e)}):e).length)return t(e)},function(e,t){t(e.map(function(e){return"undefined"!=typeof e.payload&&delete e.payload,e}))},function(e){return d.sendPipeline([function(e,t){t({type:Ll.SPEED,url:""+d.config.speedUrl,method:"post",data:Yl(e,h(h({},d.bean),{from:d.getCurrentPageUrl()})),log:e})}],Ll.SPEED)(e)}]),d.getInternalTransport()||d.setInternalTransport(new Ig),e.asyncPlugin=!0;try{"undefined"!=typeof document&&(f=String(e.userId||e.uin||(null!=(n=document.cookie.match(/\buin=\D+(\d*)/))?n:[])[1]||(null!=(r=document.cookie.match(/\bilive_uin=\D*(\d+)/))?r:[])[1]||""),e.userId=f,e.uin=e.uin||f),d._bootstrapInit(e)}catch(Me){console.warn(Me),console.log("%cThe above error occurred in the process of initializing TDEM, which will affect your normal use of TDEM.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),d.sendSDKError(Me)}return d}function Lg(){this.constructor=xg}function Dg(){}O({target:"Math",stat:!0},{log1p:Ag});Math.log;var l=Math.acosh,Ng=Math.log,Fg=Math.sqrt,Ug=Math.LN2,l=!l||710!==Math.floor(l(Number.MAX_VALUE))||l(Infinity)!==Infinity,l=(O({target:"Math",stat:!0,forced:l},{acosh:function(e){e=+e;return e<1?NaN:94906265.62425156<e?Ng(e)+Ug:Ag(e-1+Fg(e-1)*Fg(1+e))}}),Math.asinh),jg=Math.log,zg=Math.sqrt,Bg=Math.LN2,l=!(l&&0<1/l(0)),l=(O({target:"Math",stat:!0,forced:l},{asinh:function tR(e){e=+e;return isFinite(e)&&0!=e?e<0?-tR(-e):94906265.62425156<e?jg(e)+Bg:e<1e-8?e:Ag(e+e*e/(1+zg(e*e+1))):e}}),Math.atanh),l=!(l&&1/l(-0)<0),Wg=(O({target:"Math",stat:!0,forced:l},{atanh:function(e){e=+e;return 0==e?e:Ag(2*e/(1-e))/2}}),void 0),l=(O({target:"Math",stat:!0,forced:Wg!==Math.expm1},{expm1:Wg}),Math.expm1),l=(!l||22025.465794806718<l(10)||l(10)<22025.465794806718||l(-2e-17),Math.cosh),Hg=Math.abs,qg=Math.E,l=!l||l(710)===Infinity,Vg=(O({target:"Math",stat:!0,forced:l},{cosh:function(e){e=Wg(Hg(e)-1)+1;return(e+1/(e*qg*qg))*(qg/2)}}),Math.abs),Gg=Math.exp,Jg=Math.E,l=g(function(){return-2e-17!==Math.sinh(-2e-17)}),$g=(O({target:"Math",stat:!0,forced:l},{sinh:function(e){e=+e;return Vg(e)<1?(Wg(e)-Wg(-e))/2:(Gg(e-1)-Gg(-e-1))*(Jg/2)}}),Math.exp),Zg=(O({target:"Math",stat:!0},{tanh:function(e){var e=+e,t=Wg(e),n=Wg(-e);return t===Infinity?1:n===Infinity?-1:(t-n)/($g(e)+$g(-e))}}),Df.values);O({target:"Object",stat:!0},{values:function(e){return Zg(e)}});var Kg,Yg,Xg,Qg=Nt.enforce,ev=Nt.get,l=x.Int8Array,tv=l&&l.prototype,Df=x.Uint8ClampedArray,Df=Df&&Df.prototype,nv=l&&lr(l),rv=tv&&lr(tv),l=Object.prototype,iv=x.TypeError,ov=Ze("toStringTag"),av=At("TYPED_ARRAY_TAG"),sv=n,n=!1,uv={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},lv={BigInt64Array:8,BigUint64Array:8},cv=function(e){var t,e=lr(e);if(R(e))return(t=ev(e))&&T(t,"TypedArrayConstructor")?t.TypedArrayConstructor:cv(e)},fv=function(e){return!!R(e)&&(e=Qe(e),T(uv,e)||T(lv,e))};for(Kg in uv)(Xg=(Yg=x[Kg])&&Yg.prototype)?Qg(Xg).TypedArrayConstructor=Yg:sv=!1;for(Kg in lv)(Xg=(Yg=x[Kg])&&Yg.prototype)&&(Qg(Xg).TypedArrayConstructor=Yg);if((!sv||!_(nv)||nv===Function.prototype)&&(nv=function(){throw new iv("Incorrect invocation")},sv))for(Kg in uv)x[Kg]&&Er(x[Kg],nv);if((!sv||!rv||rv===l)&&(rv=nv.prototype,sv))for(Kg in uv)x[Kg]&&Er(x[Kg].prototype,rv);if(sv&&lr(Df)!==rv&&Er(Df,rv),d&&!T(rv,ov))for(Kg in Ut(rv,ov,{configurable:n=!0,get:function(){return R(this)?this[av]:undefined}}),uv)x[Kg]&&it(x[Kg].prototype,av,Kg);var M={NATIVE_ARRAY_BUFFER_VIEWS:sv,TYPED_ARRAY_TAG:n&&av,aTypedArray:function(e){if(fv(e))return e;throw new iv("Target is not a typed array")},aTypedArrayConstructor:function(e){if(!_(e)||Er&&!Se(nv,e))throw new iv(Ee(e)+" is not a typed array constructor");return e},exportTypedArrayMethod:function(e,t,n,r){if(d){if(n)for(var i in uv){i=x[i];if(i&&T(i.prototype,e))try{delete i.prototype[e]}catch(X){try{i.prototype[e]=t}catch(L){}}}rv[e]&&!n||Ht(rv,e,!n&&sv&&tv[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(d){if(Er){if(n)for(r in uv)if((i=x[r])&&T(i,e))try{delete i[e]}catch(X){}if(nv[e]&&!n)return;try{return Ht(nv,e,!n&&sv&&nv[e]||t)}catch(X){}}for(r in uv)!(i=x[r])||i[e]&&!n||Ht(i,e,t)}},getTypedArrayConstructor:cv,isView:function(e){return!!R(e)&&("DataView"===(e=Qe(e))||T(uv,e)||T(lv,e))},isTypedArray:fv,TypedArray:nv,TypedArrayPrototype:rv},dv=x.ArrayBuffer,hv=x.Int8Array,pv=!M.NATIVE_ARRAY_BUFFER_VIEWS||!g(function(){hv(1)})||!g(function(){new hv(-1)})||!Tu(function(e){new hv,new hv(null),new hv(1.5),new hv(e)},!0)||g(function(){return 1!==new hv(new dv(2),1,undefined).length}),mv=(O({target:"Number",stat:!0},{isInteger:void 0}),Math.floor,Number.isInteger,RangeError),gv=RangeError,vv=function(t,e){var n=function(){var e=ue(t);if(e<0)throw new mv("The argument can't be less than 0");return e}();if(n%e)throw new gv("Wrong offset");return n},yv=Math.floor,wv=TypeError,bv=function(e){e=So(e,"number");if("number"==typeof e)throw new wv("Can't convert number to bigint");return BigInt(e)},kv=M.aTypedArrayConstructor,Sv=function(e){var t=fu(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&Oe(r);var o,a,s,u,l,c,f,d,h=ae(e),e=Xr(h);if(e&&!Zr(e))for(d=(f=ei(h,e)).next,h=[];!(c=I(d,f)).done;)h.push(c.value);for(i&&2<n&&(r=Gr(r,arguments[2])),a=fe(h),u=function(e){e=Qe(e);return"BigInt64Array"===e||"BigUint64Array"===e}(s=new(kv(t))(a)),o=0;o<a;o++)l=i?r(h[o],o):h[o],s[o]=u?bv(l):+l;return s},_v=function(e,t,n){for(var r=0,i=2<arguments.length?n:fe(t),o=new e(i);r<i;)o[r]=t[r++];return o},l=We(function(e){var r=Kn.f,u=pi.forEach,h=Nt.get,p=Nt.set,m=Nt.enforce,g=rt.f,n=ir.f,v=x.RangeError,y=Go.ArrayBuffer,t=y.prototype,w=Go.DataView,b=M.NATIVE_ARRAY_BUFFER_VIEWS,k=M.TYPED_ARRAY_TAG,S=M.TypedArray,_=M.TypedArrayPrototype,E=M.isTypedArray,i=function(e,t){Ut(e,t,{configurable:!0,get:function(){return h(this)[t]}})},C=function(e){return Se(t,e)||"ArrayBuffer"===(e=Qe(e))||"SharedArrayBuffer"===e},o=function(e,t){return E(e)&&!$i(t)&&t in e&&(void 0)(+t)&&0<=t},a=function(e,t){return t=Si(t),o(e,t)?nt(2,e[t]):n(e,t)},s=function(e,t,n){return t=Si(t),!(o(e,t)&&R(n)&&T(n,"value"))||T(n,"get")||T(n,"set")||n.configurable||T(n,"writable")&&!n.writable||T(n,"enumerable")&&!n.enumerable?g(e,t,n):(e[t]=n.value,e)};d?(b||(ir.f=a,rt.f=s,i(_,"buffer"),i(_,"byteOffset"),i(_,"byteLength"),i(_,"length")),O({target:"Object",stat:!0,forced:!b},{getOwnPropertyDescriptor:a,defineProperty:s}),e.exports=function(e,t,i){var l=e.match(/\d+/)[0]/8,n=e+(i?"Clamped":"")+"Array",o="get"+e,a="set"+e,s=x[n],c=s,f=c&&c.prototype,e={},d=function(e,r){g(e,r,{get:function(){var e=this,t=r;return(e=h(e)).view[o](t*l+e.byteOffset,!0)},set:function(e){var t,n;t=r,e=e,(n=h(n=this)).view[a](t*l+n.byteOffset,i?(t=+e)!=t||t<=0?0:255<=t?255:!((n=yv(t))+.5<t)&&(t<n+.5||n%2==0)?n:n+1:e,!0)},enumerable:!0})},t=(b?pv&&(c=t(function(e,t,n,r){return ur(e,f),ua(R(t)?C(t)?r!==undefined?new s(t,vv(n,l),r):n!==undefined?new s(t,vv(n,l)):new s(t):E(t)?_v(c,t):I(Sv,c,t):new s(ea(t)),e,c)}),Er&&Er(c,S),u(r(s),function(e){e in c||it(c,e,s[e])}),c.prototype=f):(c=t(function(e,t,n,r){ur(e,f);var i,o,a=0,s=0;if(R(t)){if(!C(t))return E(t)?_v(c,t):I(Sv,c,t);var u=t,s=vv(n,l),n=t.byteLength;if(r===undefined){if(n%l)throw new v("Wrong length");if((i=n-s)<0)throw new v("Wrong length")}else if((i=ea(r)*l)+s>n)throw new v("Wrong length");o=i/l}else o=ea(t),u=new y(i=o*l);for(p(e,{buffer:u,byteOffset:s,byteLength:i,length:o,view:new w(u)});a<o;)d(e,a++)}),Er&&Er(c,S),f=c.prototype=_t(_)),f.constructor!==c&&it(f,"constructor",c),m(f).TypedArrayConstructor=c,k&&it(f,k,n),c!==s);e[n]=c,O({global:!0,constructor:!0,forced:t,sham:!b},e),"BYTES_PER_ELEMENT"in c||it(c,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in f||it(f,"BYTES_PER_ELEMENT",l),Ia(n)}):e.exports=function(){}}),Ev=(l("Float32",function(r){return function(e,t,n){return r(this,e,t,n)}}),l("Uint8",function(r){return function(e,t,n){return r(this,e,t,n)}}),O({target:"Array",proto:!0},{copyWithin:void 0}),er("copyWithin"),Math.min,y(void 0)),Cv=M.aTypedArray,Ov=((0,M.exportTypedArrayMethod)("copyWithin",function(e,t){return Ev(Cv(this),e,t,2<arguments.length?arguments[2]:undefined)}),Nr("every",TypeError)),Rv=(O({target:"Iterator",proto:!0,real:!0,forced:Ov},{every:function(n){E(this);try{Oe(n)}catch(X){ti(this,"throw",X)}var e,r;return Ov?I(Ov,this,n):(e=ai(this),!oi(e,function(e,t){if(!n(e,r++))return t()},{IS_RECORD:!(r=0),INTERRUPTED:!0}).stopped)}}),pi.every),Df=Fe("every"),xv=(O({target:"Array",proto:!0,forced:!Df},{every:function(e){return Rv(this,e,1<arguments.length?arguments[1]:undefined)}}),pi.every),Iv=M.aTypedArray,Tv=((0,M.exportTypedArrayMethod)("every",function(e){return xv(Iv(this),e,1<arguments.length?arguments[1]:undefined)}),l("Int8",function(r){return function(e,t,n){return r(this,e,t,n)}}),M.getTypedArrayConstructor),Mv=function(e,t){return _v(Tv(e),t)},Av=pi.filter,Pv=M.aTypedArray,Lv=((0,M.exportTypedArrayMethod)("filter",function(e){e=Av(Pv(this),e,1<arguments.length?arguments[1]:undefined);return Mv(this,e)}),pi.find),Dv=M.aTypedArray,Nv=((0,M.exportTypedArrayMethod)("find",function(e){return Lv(Dv(this),e,1<arguments.length?arguments[1]:undefined)}),pi.findIndex),Fv=M.aTypedArray,Uv=((0,M.exportTypedArrayMethod)("findIndex",function(e){return Nv(Fv(this),e,1<arguments.length?arguments[1]:undefined)}),pi.forEach),jv=M.aTypedArray,zv=((0,M.exportTypedArrayMethod)("forEach",function(e){Uv(jv(this),e,1<arguments.length?arguments[1]:undefined)}),t.includes),Bv=M.aTypedArray,Wv=((0,M.exportTypedArrayMethod)("includes",function(e){return zv(Bv(this),e,1<arguments.length?arguments[1]:undefined)}),t.indexOf),Hv=M.aTypedArray,qv=((0,M.exportTypedArrayMethod)("indexOf",function(e){return Wv(Hv(this),e,1<arguments.length?arguments[1]:undefined)}),Ze("iterator")),ov=x.Uint8Array,Vv=y(vr.values),Gv=y(vr.keys),Jv=y(vr.entries),$v=M.aTypedArray,n=M.exportTypedArrayMethod,Zv=ov&&ov.prototype,er=!g(function(){Zv[qv].call([1])}),Nr=!!Zv&&Zv.values&&Zv[qv]===Zv.values&&"values"===Zv.values.name,Fe=function(){return Vv($v(this))},Kv=(n("entries",function(){return Jv($v(this))},er),n("keys",function(){return Gv($v(this))},er),n("values",Fe,er||!Nr,{name:"values"}),n(qv,Fe,er||!Nr,{name:"values"}),M.aTypedArray),Df=M.exportTypedArrayMethod,Yv=y([].join),Xv=(Df("join",function(e){return Yv(Kv(this),e)}),M.aTypedArray),Qv=((0,M.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return Re(kg,Xv(this),1<t?[e,arguments[1]]:[e])}),pi.map),ey=M.aTypedArray,ty=((0,M.exportTypedArrayMethod)("map",function(e){e=Qv(ey(this),e,1<arguments.length?arguments[1]:undefined);return Mv(this,e)}),s.left),ny=M.aTypedArray,ry=((0,M.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return ty(ny(this),e,t,1<t?arguments[1]:undefined)}),s.right),iy=M.aTypedArray,oy=((0,M.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return ry(iy(this),e,t,1<t?arguments[1]:undefined)}),M.aTypedArray),t=M.exportTypedArrayMethod,ay=Math.floor,sy=(t("reverse",function(){for(var e,t=oy(this).length,n=ay(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this}),l("Uint8",function(r){return function(e,t,n){return r(this,e,t,n)}},!0),pi.some),uy=M.aTypedArray,ly=((0,M.exportTypedArrayMethod)("some",function(e){return sy(uy(this),e,1<arguments.length?arguments[1]:undefined)}),M.aTypedArray),ov=M.exportTypedArrayMethod,cy=x.Uint16Array,fy=cy&&at(cy.prototype.sort),Fe=!(!fy||g(function(){fy(new cy(2),null)})&&g(function(){fy(new cy(2),{})})),dy=!!fy&&!g(function(){if(Hn)return Hn<74;if(jd)return jd<67;if(zd)return!0;if(Bd)return Bd<602;for(var e,t=new cy(516),n=Array(516),r=0;r<516;r++)e=r%4,t[r]=515-r,n[r]=r-2*e+3;for(fy(t,function(e,t){return(e/4|0)-(t/4|0)}),r=0;r<516;r++)if(t[r]!==n[r])return!0}),hy=(ov("sort",function(e){return e!==undefined&&Oe(e),dy?fy(this,e):Ud(ly(this),(n=e,function(e,t){return n!==undefined?+n(e,t)||0:t!=t?e!=e?0:-1:e!=e?1:0===e&&0===t?0<1/e?0<1/t?0:1:0<1/t?-1:0:t<e?1:e<t?-1:0}));var n},!dy||Fe),M.aTypedArray),py=M.getTypedArrayConstructor,my=((0,M.exportTypedArrayMethod)("subarray",function(e,t){var n=hy(this),r=n.length,e=ct(e,r);return new(py(n))(n.buffer,n.byteOffset+e*n.BYTES_PER_ELEMENT,ce((t===undefined?r:ct(t,r))-e))}),x.Int8Array),gy=M.aTypedArray,er=M.exportTypedArrayMethod,vy=[].toLocaleString,yy=!!my&&g(function(){vy.call(new my(1))}),Nr=(er("toLocaleString",function(){return Re(vy,yy?Gn(gy(this)):gy(this),Gn(arguments))},g(function(){return[1,2].toLocaleString()!==new my([1,2]).toLocaleString()})||!g(function(){my.prototype.toLocaleString.call([1,2])})),M.exportTypedArrayMethod),n=x.Uint8Array,Df=n&&n.prototype||{},wy=[].toString,by=y([].join),s=(g(function(){wy.call({})})&&(wy=function(){return by(this)}),Df.toString!==wy),ky=(Nr("toString",wy,s),M.aTypedArray),Sy=M.getTypedArrayConstructor,_y=((0,M.exportTypedArrayMethod)("slice",function(e,t){for(var n=Gn(ky(this),e,t),e=Sy(this),r=0,i=n.length,o=new e(i);r<i;)o[r]=n[r++];return o},g(function(){new Int8Array(1).slice()})),x.RangeError),Ey=x.Int8Array,t=Ey&&Ey.prototype,Cy=t&&t.set,Oy=M.aTypedArray,Fe=M.exportTypedArrayMethod,Ry=!g(function(){var e=new Uint8ClampedArray(2);return I(Cy,e,{length:1,0:3},1),3!==e[1]}),ov=Ry&&M.NATIVE_ARRAY_BUFFER_VIEWS&&g(function(){var e=new Ey(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}),xy=(Fe("set",function(e){Oy(this);var t=vv(1<arguments.length?arguments[1]:undefined,1),n=ae(e);if(Ry)return I(Cy,this,n,t);var e=this.length,r=fe(n),i=0;if(e<r+t)throw new _y("Wrong length");for(;i<r;)this[t+i]=n[i++]},!Ry||ov),M.aTypedArray),er=M.exportTypedArrayMethod,Iy=y("".slice);er("fill",function(e){var t=arguments.length,e=(xy(this),"Big"===Iy(Qe(this),0,3)?bv(e):+e);return I(sa,this,e,1<t?arguments[1]:undefined,2<t?arguments[2]:undefined)},g(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})),new o({name:"aid"});var n=ir.f,Ty=at("".slice),My=Math.min,Df=Hr("startsWith"),Nr=!(Df||!(s=n(String.prototype,"startsWith"))||s.writable);function Ay(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}O({target:"String",proto:!0,forced:!Nr&&!Df},{startsWith:function(e){var t=C(ie(this)),e=(Qi(e),C(e)),n=ce(My(1<arguments.length?arguments[1]:undefined,t.length));return Ty(t,n,n+e.length)===e}});Ny.generate=function(){return"rep_"+this.uuid32()},Ny.uuid32=function(){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/x/g,function(){return Math.floor(16*Math.random()).toString(16)})};var Py=Ny,Ly="[SessionReplay]",Dy=!1;function Ny(){}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Dy&&console.log.apply(console,pl([Ly+"["+e+"]"],t))}function Fy(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Dy&&console.debug.apply(console,pl([Ly+"["+e+"]"],t))}function Uy(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Dy&&console.log.apply(console,pl([Ly+"["+e+"] WARN:"],t))}function jy(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Dy&&console.log.apply(console,pl([Ly+"["+e+"] ERROR:"],t))}qy.prototype.setTdemInstance=function(e){this.tdemInstance=e},qy.prototype.createSession=function(e){void 0===e&&(e="session");var t=null==(t=this.session)?void 0:t.replayId,n=Og("tdem",Ay),n=h({id:n.sessionId,replayId:Py.generate(),started:Date.now(),lastActivity:Date.now(),segmentId:0,sampled:e},t?{previousReplayId:t}:{});return this.session=n,this.syncSharedSession(n.id),m("SessionManager","Document replay session created:",n.id,n.replayId),n},qy.prototype.restoreSession=function(){return this.session},qy.prototype.saveSession=function(){},qy.prototype.refreshSession=function(){var e=null!=(e=null==(e=this.session)?void 0:e.sampled)?e:"session";return this.createSession(e)},qy.prototype.updateActivity=function(){this.session&&(this.session.lastActivity=Date.now())},qy.prototype.incrementSegmentId=function(){var e;return this.session?(e=this.session.segmentId,this.session.segmentId+=1,e):0},qy.prototype.shouldRefreshSession=function(){return!1},qy.prototype.getSession=function(){return this.session},qy.prototype.getSessionId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.id)?e:""},qy.prototype.getReplayId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.replayId)?e:""},qy.prototype.clearSession=function(){var e;this.session=null;try{null!=(e=window.sessionStorage)&&e.removeItem("tdem_session")}catch(w){}},qy.prototype.syncSharedSession=function(e){var t,n,r;this.tdemInstance&&this.tdemInstance.extendBean("sessionId",e),e=e,"undefined"!=typeof window&&(t=Date.now(),(n=window[_g])?(r=n.sessionId!==e,n.sessionId=e,n.version=r?n.version+1:n.version,n.source="tdem",r&&(n.createdAt=t),n.lastActivity=t):window[_g]=Cg(e,"tdem"),Eg("_tdem_s",e),window.dispatchEvent(new CustomEvent("monitor-session-update",{detail:{sessionId:e,source:"tdem"}})))};var zy=qy,By=((t={})[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.Asset=7]="Asset",t),Wy=(Hy.prototype.ensureReady=function(){return dl(this,void 0,void 0,function(){return hl(this,function(e){return[2,this.ready]})})},Hy.prototype.postMessage=function(n,r){var i=this,o=this.nextId++;return new Promise(function(e,t){i.pendingRequests.set(o,{resolve:e,reject:t}),i.worker.postMessage({id:o,method:n,arg:r})})},Hy.prototype.destroy=function(){this.pendingRequests.forEach(function(e){return(0,e.reject)(new Error("Worker destroyed"))}),this.pendingRequests.clear(),this.worker.terminate()},Hy);function Hy(e){var o=this;this.nextId=0,this.pendingRequests=new Map,this.worker=e,this.worker.addEventListener("message",function(e){var e=e.data,t=e.id,n=e.success,r=e.response;"init"!==e.method&&(e=o.pendingRequests.get(t))&&(o.pendingRequests["delete"](t),n?e.resolve(r):e.reject(new Error(r||"Worker request failed")))}),this.ready=new Promise(function(t,n){var r=function(e){e=e.data;"init"===e.method&&e.success&&(o.worker.removeEventListener("message",r),clearTimeout(i),t())},i=(o.worker.addEventListener("message",r),o.worker.addEventListener("error",function(e){o.worker.removeEventListener("message",r),clearTimeout(i),n(new Error("Worker error: "+(e.message||"unknown")))}),setTimeout(function(){o.worker.removeEventListener("message",r),n(new Error("Worker init timeout (5s)"))},5e3))})}function qy(e){this.session=null,this.tdemInstance=null}Gy.prototype.initWorker=function(){var t=this,e=function(){try{var e,t,n;return"undefined"==typeof Worker||"undefined"==typeof Blob||"undefined"==typeof URL?null:(e=new Blob(["\n(function() {\n var events = [];\n var totalSize = 0;\n\n function handleMessage(data) {\n var method = data.method;\n var id = data.id;\n\n switch (method) {\n case 'addEvent':\n events.push(data.arg);\n totalSize += data.arg.length;\n return { id: id, method: method, success: true, response: totalSize };\n\n case 'finish':\n var json = '[' + events.join(',') + ']';\n events = [];\n totalSize = 0;\n // 返回原始 JSON 字符串,压缩在主线程做(pako 不好内联到 worker)\n return { id: id, method: method, success: true, response: json };\n\n case 'clear':\n events = [];\n totalSize = 0;\n return { id: id, method: method, success: true, response: void 0 };\n\n default:\n return { id: id, method: method, success: false, response: 'Unknown method' };\n }\n }\n\n self.addEventListener('message', function(e) {\n try {\n var result = handleMessage(e.data);\n self.postMessage(result);\n } catch (err) {\n self.postMessage({\n id: e.data.id,\n method: e.data.method,\n success: false,\n response: err.message || 'Worker error'\n });\n }\n });\n\n // 就绪信号\n self.postMessage({ method: 'init', success: true });\n})();\n"],{type:"application/javascript"}),t=URL.createObjectURL(e),n=new Worker(t,{name:"tdem-replay-compressor"}),URL.revokeObjectURL(t),m("CompressionWorker","Worker created successfully"),new Wy(n))}catch(v){return Uy("CompressionWorker","Failed to create worker, will fallback to sync buffer:",v),null}}();e?(this.workerHandler=e,this.useWorker=!0,e.ensureReady().then(function(){t.workerReady=!0,m("EventBuffer","Worker ready, migrating buffered events"),t.migrateEventsToWorker()})["catch"](function(e){Uy("EventBuffer","Worker init failed, falling back to sync buffer:",e),t.useWorker=!1,t.workerHandler=null})):m("EventBuffer","Worker not available, using sync buffer")},Gy.prototype.migrateEventsToWorker=function(){if(this.workerHandler&&this.workerReady){var e=this.events;this.events=[];for(var t=0,n=e;t<n.length;t++){var r=n[t];this.addEventToWorker(r)}this.currentSize=0}},Gy.prototype.addEventToWorker=function(e){if(this.workerHandler)try{var t=JSON.stringify(e);this.workerHandler.postMessage("addEvent",t),this.workerEventCount++,this.workerSize+=t.length}catch(P){Uy("EventBuffer","Failed to send event to worker:",P)}},Gy.prototype.addEvent=function(e){var t;this.useWorker&&this.workerReady&&this.workerHandler?(t=this.estimateEventSize(e),this.workerSize+t>this.config.maxSize&&(Uy("EventBuffer","Worker buffer size limit exceeded, dropping old events"),this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0),this.addEventToWorker(e)):(t=this.estimateEventSize(e),this.currentSize+t>this.config.maxSize&&(Uy("EventBuffer","Size limit exceeded, removing old events"),this.trimOldEvents(t)),this.events.push(e),this.currentSize+=t)},Gy.prototype.getEvents=function(){return pl(this.events)},Gy.prototype.getEventCount=function(){return this.useWorker&&this.workerReady?this.workerEventCount+this.events.length:this.events.length},Gy.prototype.getSize=function(){return this.useWorker&&this.workerReady?this.workerSize+this.currentSize:this.currentSize},Gy.prototype.isEmpty=function(){return!(this.useWorker&&this.workerReady&&0!==this.workerEventCount||0!==this.events.length)},Gy.prototype.finishAsync=function(){return dl(this,void 0,void 0,function(){var t,n,r;return hl(this,function(e){switch(e.label){case 0:if(!(this.useWorker&&this.workerReady&&this.workerHandler&&0<this.workerEventCount))return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.workerHandler.postMessage("finish")];case 2:return t=e.sent(),r=this.workerEventCount,n=this.workerSize,this.workerEventCount=0,this.workerSize=0,[2,{events:[],eventCount:r,uncompressedSize:n,eventsJson:t}];case 3:return Uy("EventBuffer","Worker finish failed, falling back to sync:",e.sent()),[3,4];case 4:return[2,{events:r=this.getEvents(),eventCount:r.length,uncompressedSize:this.currentSize}]}})})},Gy.prototype.finish=function(){var e=this.getEvents();return{events:e,eventCount:e.length,uncompressedSize:this.currentSize}},Gy.prototype.clear=function(){this.events=[],this.currentSize=0,this.useWorker&&this.workerHandler&&(this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0)},Gy.prototype.destroy=function(){this.clear(),this.workerHandler&&(this.workerHandler.destroy(),this.workerHandler=null),this.useWorker=!1,this.workerReady=!1},Gy.prototype.estimateEventSize=function(e){try{return JSON.stringify(e).length}catch(g0){return 1024}},Gy.prototype.trimOldEvents=function(e){for(var t=-1,n=this.events.length-1;0<=n;n--)if(this.events[n].type===By.FullSnapshot){t=n;break}var r=t;if(0<r)for(n=r-1;0<=n;n--)if(this.events[n].type===By.Meta){r=n;break}for(var i,o=0,a=Math.max(e,.2*this.config.maxSize),s=0;s<r&&o<a;)s++,(i=this.events.shift())&&(o+=this.estimateEventSize(i));if(r<0)for(;0<this.events.length&&o<a;)(i=this.events.shift())&&(o+=this.estimateEventSize(i));this.currentSize=Math.max(0,this.currentSize-o)},Gy.prototype.hasCheckout=function(){return this.events.some(function(e){return e.type===By.Meta||e.type===By.FullSnapshot})},Gy.prototype.getLastCheckoutTime=function(){for(var e=this.events.length-1;0<=e;e--){var t=this.events[e];if(t.type===By.FullSnapshot)return t.timestamp}return null},Gy.prototype.isUsingWorker=function(){return this.useWorker&&this.workerReady};var Vy=Gy;function Gy(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this.events=[],this.currentSize=0,this.workerHandler=null,this.useWorker=!1,this.workerReady=!1,this.workerEventCount=0,this.workerSize=0,this.config={maxSize:null!=(e=e.maxSize)?e:5242880},t&&this.initWorker()}ki("toStringTag"),gr(ke("Symbol"),"Symbol"),gr(x.JSON,"JSON",!0),gr(Math,"Math",!0),O({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Jy=i.trim,$y=y("".charAt),Zy=x.parseFloat,ov=x.Symbol,Ky=ov&&ov.iterator,Fe=1/Zy(Oo+"-0")!=-Infinity||Ky&&!g(function(){Zy(Object(Ky))})?function(e){var e=Jy(C(e)),t=Zy(e);return 0===t&&"-"===$y(e,0)?-0:t}:Zy,Yy=(O({target:"Number",stat:!0,forced:Number.parseFloat!==Fe},{parseFloat:Fe}),ke("Reflect","construct")),Xy=Object.prototype,Qy=[].push,e0=g(function(){function e(){}return!(Yy(function(){},[],e)instanceof e)}),t0=!g(function(){Yy(function(){})}),er=e0||t0,n0=(O({target:"Reflect",stat:!0,forced:er,sham:er},{construct:function(e,t){fu(e);var n=arguments.length<3?e:fu(arguments[2]);if(E(t),t0&&!e0)return Yy(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return Re(Qy,r,t),new(Re(Os,e,r))}r=n.prototype,n=_t(R(r)?r:Xy),r=Re(e,n,t);return R(r)?r:n}}),function(e,t,n){var r,i;return E(e)===n?e[t]:(r=ir.f(e,t))?(i=r)!==undefined&&(T(i,"value")||T(i,"writable"))?r.value:r.get===undefined?undefined:I(r.get,n):(i=lr(e),R(i)?n0(i,t,n):void 0)}),n=(O({target:"Reflect",stat:!0},{get:function(e,t){return n0(E(e),Si(t),arguments.length<3?e:arguments[2])}}),ir.f),r0=at("".slice),i0=Math.min,s=Hr("endsWith"),Df=!(s||!(Nr=n(String.prototype,"endsWith"))||Nr.writable),o0=(O({target:"String",proto:!0,forced:!Df&&!s},{endsWith:function(e){var t=C(ie(this)),e=(Qi(e),C(e)),n=1<arguments.length?arguments[1]:undefined,r=t.length,n=n===undefined?r:i0(ce(n),r);return r0(t,n-e.length,n)===e}}),y("".replace),O({target:"String",proto:!0,forced:g(function(){var e="".bold('"');return e!==e.toLowerCase()||3<e.split('"').length})},{bold:function(){return 0,"<b"+">"+C(ie(this))+"</b>"}}),l("Float64",function(r){return function(e,t,n){return r(this,e,t,n)}}),l("Int16",function(r){return function(e,t,n){return r(this,e,t,n)}}),l("Int32",function(r){return function(e,t,n){return r(this,e,t,n)}}),l("Uint16",function(r){return function(e,t,n){return r(this,e,t,n)}}),l("Uint32",function(r){return function(e,t,n){return r(this,e,t,n)}}),Object.isFrozen),t=Ta||g(function(){o0(1)}),a0=(O({target:"Object",stat:!0,forced:t},{isFrozen:function(e){return!R(e)||!(!Ta||"ArrayBuffer"!==ee(e))||!!o0&&o0(e)}}),Object.isSealed),i=Ta||g(function(){a0(1)}),s0=(O({target:"Object",stat:!0,forced:i},{isSealed:function(e){return!R(e)||!(!Ta||"ArrayBuffer"!==ee(e))||!!a0&&a0(e)}}),Fa.onFreeze),u0=Object.seal,ov=g(function(){u0(1)});O({target:"Object",stat:!0,forced:ov,sham:!0},{seal:function(e){return u0&&R(e)?u0(s0(e)):e}});var l0,c0,f0,d0,h0=Nt.enforce,Fe=Object,p0=(Array.isArray,Fe.isExtensible),er=!x.ActiveXObject&&"ActiveXObject"in x,at=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},Hr=e("WeakMap",at,a),n=Hr.prototype,m0=y(n.set);Ie&&er&&(l0=a.getConstructor(at,"WeakMap",!0),Fa.enable(),c0=y(n["delete"]),f0=y(n.has),d0=y(n.get),Xo(n,{"delete":function(e){var t;return R(e)&&!p0(e)?((t=h0(this)).frozen||(t.frozen=new l0),c0(this,e)||t.frozen["delete"](e)):c0(this,e)},has:function(e){var t;return R(e)&&!p0(e)?((t=h0(this)).frozen||(t.frozen=new l0),f0(this,e)||t.frozen.has(e)):f0(this,e)},get:function(e){var t;return!R(e)||p0(e)||((t=h0(this)).frozen||(t.frozen=new l0),f0(this,e))?d0(this,e):t.frozen.get(e)},set:function(e,t){var n;return!R(e)||p0(e)||((n=h0(this)).frozen||(n.frozen=new l0),f0(this,e))?m0(this,e,t):n.frozen.set(e,t),this}}));var g0,v0=["inputs"],y0=["inputId"],w0=["inputs"],b0=["inputId"],k0=["type"],S0=Object.defineProperty,A=function(e,t,n){return e=e,t="symbol"!==S(t)?t+"":t,n=n,t in e?S0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},_0=Object.defineProperty,E0=function(e,t,n){return e=e,t="symbol"!==S(t)?t+"":t,n=n,t in e?_0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},C0=((Nr=C0||{})[Nr.Document=0]="Document",Nr[Nr.DocumentType=1]="DocumentType",Nr[Nr.Element=2]="Element",Nr[Nr.Text=3]="Text",Nr[Nr.CDATA=4]="CDATA",Nr[Nr.Comment=5]="Comment",Nr),O0={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},R0={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},x0={},I0={};function T0(e){if(x0[e])return x0[e];var t=globalThis[e],n=t.prototype,r=e in O0?O0[e]:void 0,r=Boolean(r&&r.every(function(e){return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),i=e in R0?R0[e]:void 0,i=Boolean(i&&i.every(function(e){return"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))}));if(r&&i&&!globalThis.Zone)return x0[e]=t.prototype,t.prototype;try{var o,a,s=document.createElement("iframe"),u=(s.style.display="none",document.body.appendChild(s),s.contentWindow);return u?(o=u[e].prototype)?((a=navigator.userAgent).includes("Safari")&&!a.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),I0[e]=function(){return s.remove()}):s.remove(),x0[e]=o):(s.remove(),n):t.prototype}catch(F){return n}}var M0={};function A0(e,t,n){var r="".concat(e,".").concat(String(n));return M0[r]?M0[r].call(t):(e=T0(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(M0[r]=e).call(t):t[n])}var P0={};function L0(e,t,n){var r="".concat(e,".").concat(String(n));return P0[r]?P0[r].bind(t):"function"!=typeof(e=T0(e)[n])?t[n]:(P0[r]=e).bind(t)}var Df=Date.now,D0={ownerDocument:function(e){return A0("Node",e,"ownerDocument")},childNodes:function(e){return A0("Node",e,"childNodes")},parentNode:function(e){return A0("Node",e,"parentNode")},parentElement:function(e){return A0("Node",e,"parentElement")},textContent:function(e){return A0("Node",e,"textContent")},contains:function(e,t){return L0("Node",e,"contains")(t)},getRootNode:function(e){return L0("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?A0("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?A0("Element",e,"shadowRoot"):null},querySelector:function(e,t){return A0("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return A0("Element",e,"querySelectorAll")(t)},nowTimestamp:Df=/[1-9][0-9]{12}/.test(Date.now().toString())?Df:function(){return(new Date).getTime()},mutationObserverCtor:function(){var e;return[T0("MutationObserver").constructor,null!=(e=I0.MutationObserver)?e:function(){}]},patch:function(e,t,n){try{var r,i;return t in e?("function"==typeof(i=n(r=e[t]))&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}):function(){}}catch(Le){return function(){}}}};function N0(e){return e.nodeType===e.ELEMENT_NODE}function F0(e){var t=e&&"host"in e&&"mode"in e&&D0.host(e)||null;return Boolean(t&&"shadowRoot"in t&&D0.shadowRoot(t)===e)}function U0(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function j0(e){try{var t,n=e.rules||e.cssRules;return n?(!(t=e.href)&&e.ownerNode&&(t=e.ownerNode.baseURI),r=(r=Array.from(n,function(e){return z0(e,t)}).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")?r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"):r):null}catch(X){return null}var r}function z0(e,t){if("styleSheet"in e){var n;try{n=j0(e.styleSheet)||((r=(i=e).cssText).split('"').length<3?r:(r=["@import","url(".concat(JSON.stringify(i.href),")")],""===i.layerName?r.push("layer"):i.layerName&&r.push("layer(".concat(i.layerName,")")),i.supportsText&&r.push("supports(".concat(i.supportsText,")")),i.media.length&&r.push(i.media.mediaText),r.join(" ")+";"))}catch(X){n=e.cssText}return e.styleSheet.href?K0(n,e.styleSheet.href):n}var r,i=e.cssText;return"selectorText"in e&&e.selectorText.includes(":")&&(i=i.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?K0(i,t):i}var B0=k(function u(){b(this,u),E0(this,"idNodeMap",new Map),E0(this,"nodeMetaMap",new WeakMap)},[{key:"getId",value:function(e){return e&&null!=(e=null==(e=this.getMeta(e))?void 0:e.id)?e:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap["delete"](n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);n&&(n=this.nodeMetaMap.get(n))&&this.nodeMetaMap.set(t,n),this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]);function W0(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.maskInputFn,e=e.value||"",i=i&&H0(i);return e=n[r.toLowerCase()]||i&&n[i]?o?o(e,t):"*".repeat(e.length):e}function H0(e){return e.toLowerCase()}function q0(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?H0(t):null}function V0(e,t){var n;try{n=new URL(e,null!=t?t:window.location.href)}catch(Pe){return null}e=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(t=null==e?void 0:e[1])?t:null}var G0=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,J0=/^(?:[a-z+]+:)?\/\//i,$0=/^www\..*/i,Z0=/^(data:)([^,]*),(.*)/i;function K0(e,c){return(e||"").replace(G0,function(e,t,n,r,i,o){n=n||i||o,i=t||r||"";if(!n)return e;if(J0.test(n)||$0.test(n))return"url(".concat(i).concat(n).concat(i,")");if(Z0.test(n))return"url(".concat(i).concat(n).concat(i,")");if("/"===n[0])return"url(".concat(i).concat((-1<(o=c).indexOf("//")?o.split("/").slice(0,3).join("/"):o.split("/")[0]).split("?")[0]+n).concat(i,")");var t=n.split("#")[0],r=n.substring(t.length),a=c.split("#")[0].split("/"),e=t.split("/");a.pop();var s,u=Me(e);try{for(u.s();!(s=u.n()).done;){var l=s.value;"."!==l&&(".."===l?a.pop():a.push(l))}}catch(Pe){u.e(Pe)}finally{u.f()}return"url(".concat(i).concat(a.join("/")).concat(r).concat(i,")")})}function Y0(e,t){return 1<arguments.length&&t!==undefined&&t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}var X0,Q0,ew=1,tw=new RegExp("[^a-z0-9-_:]");function nw(){return ew++}var rw=/^[^ \t\n\r\u000c]+/,iw=/^[, \t\n\r\u000c]+/,ow=new WeakMap;function aw(e,t){return t&&""!==t.trim()?sw(e,t):t}function sw(e,t){var n=ow.get(e);if(n||(n=e.createElement("a"),ow.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function uw(e,t,n,r){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&["table","td","th"].includes(t)?aw(e,r):"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var e=e.exec(t.substring(n));return e?(e=e[0],n+=e.length,e):""}for(var i=[];r(iw),!(n>=t.length);)if(","===(a=r(rw)).slice(-1))a=aw(e,a.substring(0,a.length-1)),i.push(a);else for(var o="",a=aw(e,a),s=!1;;){var u=t.charAt(n);if(""===u){i.push((a+o).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((a+o).trim());break}"("===u&&(s=!0)}o+=u,n+=1}return i.join(", ")}(e,r):"style"===n?K0(r,sw(e)):"object"===t&&"data"===n?aw(e,r):r)}function lw(e,t){return["video","audio"].includes(e)&&"autoplay"===t}function cw(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE)for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&cw(D0.parentNode(e),t,n)}function fw(e,t,n,r){var i;if(N0(e)){if(!D0.childNodes(i=e).length)return!1}else{if(null===D0.parentElement(e))return!1;i=D0.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest(".".concat(t)))return!0}else if(i.classList.contains(t))return!0}else if(cw(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(Le){}return!1}function dw(e,t){var n=t.doc,r=t.blockClass,i=t.blockSelector,o=t.needsMask,a=t.inlineStylesheet,s=t.maskInputOptions,u=void 0===s?{}:s,l=t.maskTextFn,c=t.maskInputFn,s=t.dataURLOptions,f=void 0===s?{}:s,d=t.inlineImages,N=t.recordCanvas,F=t.keepIframeSrcFn,s=t.newlyAddedElement,U=void 0!==s&&s,s=t.cssCaptured,j=void 0!==s&&s,h=(s=n,!(t=t.mirror).hasNode(s)||1===(s=t.getId(s))?void 0:s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:C0.Document,childNodes:[],compatMode:e.compatMode}:{type:C0.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:C0.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:h};case e.ELEMENT_NODE:for(var p,m,g,v,y,w,b=e,k=(M={doc:n,blockClass:r,blockSelector:i,inlineStylesheet:a,maskInputOptions:u,maskInputFn:c,dataURLOptions:f,inlineImages:d,recordCanvas:N,keepIframeSrcFn:F,newlyAddedElement:U,rootId:h}).doc,S=M.blockSelector,_=M.inlineStylesheet,E=void 0===(E=M.maskInputOptions)?{}:E,C=M.maskInputFn,O=void 0===(R=M.dataURLOptions)?{}:R,R=M.inlineImages,x=M.recordCanvas,I=M.keepIframeSrcFn,T=void 0!==(T=M.newlyAddedElement)&&T,z=M.rootId,M=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(S){}return!1}(b,M.blockClass,S),A=(m=b)instanceof HTMLFormElement?"form":(m=H0(m.tagName),tw.test(m)?"div":m),P={},B=b.attributes.length,L=0;L<B;L++){var D=b.attributes[L];lw(A,D.name)||(P[D.name]=uw(k,A,H0(D.name),D.value))}"link"===A&&_&&(m=null,m=(_=Array.from(k.styleSheets).find(function(e){return e.href===b.href}))?j0(_):m)&&(delete P.rel,delete P.href,P._cssText=m),"style"===A&&b.sheet&&(_=j0(b.sheet))&&(1<b.childNodes.length&&(_=function(e,t,n){var r=2<arguments.length&&n!==undefined&&n,i=Array.from(t.childNodes),o=[],a=0;if(1<i.length&&e&&"string"==typeof e)for(var s=Y0(e,r),u=s.length/e.length,l=1;l<i.length;l++)if(i[l].textContent&&"string"==typeof i[l].textContent){for(var c=Y0(i[l].textContent,r),f=3;f<c.length&&(c[f].match(/[a-zA-Z0-9]/)||-1!==c.indexOf(c.substring(0,f),1));f++);for(;f<c.length;f++){var d,h=c.substring(0,f),p=s.split(h),m=-1;if(2===p.length)m=p[0].length;else if(2<p.length&&""===p[0]&&""!==i[l-1].textContent)m=s.indexOf(h,1);else if(1===p.length){if(h=h.substring(0,h.length-1),(p=s.split(h)).length<=1)return o.push(e),o;f=101}else f===c.length-1&&(m=s.indexOf(h));if(-1!==(m=2<=p.length&&100<f&&((d=i[l-1].textContent)&&"string"==typeof d&&(d=Y0(d).length,m=s.indexOf(h,d)),-1===m)?p[0].length:m)){for(var g=Math.floor(m/u);0<g&&g<e.length;){if((a+=1)>50*i.length)return o.push(e),o;var v=Y0(e.substring(0,g),r);if(v.length===m){o.push(e.substring(0,g)),e=e.substring(g),s=s.substring(m);break}v.length<m?g+=Math.max(1,Math.floor((m-v.length)/u)):g-=Math.max(1,Math.floor((v.length-m)*u))}break}}}return o.push(e),o}(_,b).join("/* rr_split */")),P._cssText=_),["input","textarea","select"].includes(A)&&(m=b.value,_=b.checked,"radio"!==P.type&&"checkbox"!==P.type&&"submit"!==P.type&&"button"!==P.type&&m?P.value=W0({element:b,type:q0(b),tagName:A,value:m,maskInputOptions:E,maskInputFn:C}):_&&(P.checked=_)),"option"===A&&(b.selected&&!E.select?P.selected=!0:delete P.selected),"dialog"===A&&b.open&&(P.rr_open_mode=b.matches("dialog:modal")?"modal":"non-modal"),"canvas"===A&&x&&("2d"===b.__context?function(e){var t=e.getContext("2d");if(t)for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,i="__rrweb_original__"in i?i.__rrweb_original__:i;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(function(e){return 0!==e}))return}return 1}(b)||(P.rr_dataURL=b.toDataURL(O.type,O.quality)):"__context"in b||(m=b.toDataURL(O.type,O.quality),(C=k.createElement("canvas")).width=b.width,C.height=b.height,m!==C.toDataURL(O.type,O.quality)&&(P.rr_dataURL=m))),"img"===A&&R&&(X0||(X0=k.createElement("canvas"),Q0=X0.getContext("2d")),v=(g=b).currentSrc||g.getAttribute("src")||"<unknown-src>",y=g.crossOrigin,w=function(){g.removeEventListener("load",w);try{X0.width=g.naturalWidth,X0.height=g.naturalHeight,Q0.drawImage(g,0,0),P.rr_dataURL=X0.toDataURL(O.type,O.quality)}catch(Pe){if("anonymous"!==g.crossOrigin)return g.crossOrigin="anonymous",void(g.complete&&0!==g.naturalWidth?w():g.addEventListener("load",w));console.warn("Cannot inline img src=".concat(v,"! Error: ").concat(Pe))}"anonymous"===g.crossOrigin&&(y?P.crossOrigin=y:g.removeAttribute("crossorigin"))},g.complete&&0!==g.naturalWidth?w():g.addEventListener("load",w)),["audio","video"].includes(A)&&((_=P).rr_mediaState=b.paused?"paused":"played",_.rr_mediaCurrentTime=b.currentTime,_.rr_mediaPlaybackRate=b.playbackRate,_.rr_mediaMuted=b.muted,_.rr_mediaLoop=b.loop,_.rr_mediaVolume=b.volume),T||(b.scrollLeft&&(P.rr_scrollLeft=b.scrollLeft),b.scrollTop&&(P.rr_scrollTop=b.scrollTop)),M&&(x=(E=b.getBoundingClientRect()).width,C=E.height,P={"class":P["class"],rr_width:"".concat(x,"px"),rr_height:"".concat(C,"px")}),"iframe"!==A||I(P.src)||(b.contentDocument||(P.rr_src=P.src),delete P.src);try{customElements.get(A)&&(p=!0)}catch(re){}return{type:C0.Element,tagName:A,attributes:P,childNodes:[],isSVG:Boolean("svg"===b.tagName||b.ownerSVGElement)||void 0,needBlock:M,rootId:z,isCustom:p};case e.TEXT_NODE:return m=e,_=(R={doc:n,needsMask:o,maskTextFn:l,rootId:h,cssCaptured:j}).needsMask,T=R.maskTextFn,E=R.rootId,x=R.cssCaptured,C=(C=D0.parentNode(m))&&C.tagName,I="",M="STYLE"===C||void 0,(C="SCRIPT"===C||void 0)?I="SCRIPT_PLACEHOLDER":x||(I=D0.textContent(m),M&&(I=I&&K0(I,sw(R.doc)))),!M&&!C&&I&&_&&(I=T?T(I,D0.parentElement(m)):I.replace(/[\S]/g,"*")),{type:C0.Text,textContent:I||"",rootId:E};case e.CDATA_SECTION_NODE:return{type:C0.CDATA,textContent:"",rootId:h};case e.COMMENT_NODE:return{type:C0.Comment,textContent:D0.textContent(e)||"",rootId:h};default:return!1}}function hw(e){return null==e?"":e.toLowerCase()}function pw(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function mw(t,e){var n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.maskTextClass,s=e.maskTextSelector,u=e.skipChild,u=void 0!==u&&u,l=e.inlineStylesheet,c=void 0===l||l,l=e.maskInputOptions,f=void 0===l?{}:l,d=e.maskTextFn,h=e.maskInputFn,p=e.slimDOMOptions,l=e.dataURLOptions,m=void 0===l?{}:l,l=e.inlineImages,g=void 0!==l&&l,l=e.recordCanvas,v=void 0!==l&&l,y=e.onSerialize,w=e.onIframeLoad,l=e.iframeLoadTimeout,b=void 0===l?5e3:l,k=e.onStylesheetLoad,l=e.stylesheetLoadTimeout,S=void 0===l?5e3:l,l=e.keepIframeSrcFn,_=void 0===l?function(){return!1}:l,l=e.newlyAddedElement,l=void 0!==l&&l,E=e.cssCaptured,E=void 0!==E&&E,C=e.needsMask,e=e.preserveWhiteSpace,O=void 0===e||e,C=C||fw(t,a,s,void 0===C),e=dw(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:h,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:_,newlyAddedElement:l,cssCaptured:E});if(!e)return console.warn(t,"not serialized"),null;var l=r.hasNode(t)?r.getId(t):function(e,t){if(t.comment&&e.type===C0.Comment)return 1;if(e.type===C0.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===V0(e.attributes.href)))return 1;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(hw(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===hw(e.attributes.name)||"icon"===hw(e.attributes.rel)||"apple-touch-icon"===hw(e.attributes.rel)||"shortcut icon"===hw(e.attributes.rel))))return 1;if("meta"===e.tagName){if(t.headMetaDescKeywords&&hw(e.attributes.name).match(/^description|keywords$/))return 1;if(t.headMetaSocial&&(hw(e.attributes.property).match(/^(og|twitter|fb):/)||hw(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===hw(e.attributes.name)))return 1;if(t.headMetaRobots&&("robots"===hw(e.attributes.name)||"googlebot"===hw(e.attributes.name)||"bingbot"===hw(e.attributes.name)))return 1;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return 1;if(t.headMetaAuthorship&&("author"===hw(e.attributes.name)||"generator"===hw(e.attributes.name)||"framework"===hw(e.attributes.name)||"publisher"===hw(e.attributes.name)||"progid"===hw(e.attributes.name)||hw(e.attributes.property).match(/^article:/)||hw(e.attributes.property).match(/^product:/)))return 1;if(t.headMetaVerification&&("google-site-verification"===hw(e.attributes.name)||"yandex-verification"===hw(e.attributes.name)||"csrf-token"===hw(e.attributes.name)||"p:domain_verify"===hw(e.attributes.name)||"verify-v1"===hw(e.attributes.name)||"verification"===hw(e.attributes.name)||"shopify-checkout-api-token"===hw(e.attributes.name)))return 1}}}(e,p)||!O&&e.type===C0.Text&&!e.textContent.replace(/^\s+|\s+$/gm,"").length?-2:ew++,R=Object.assign(e,{id:l});if(r.add(t,R),-2===l)return null;y&&y(t);E=!u;if(R.type===C0.Element&&(E=E&&!R.needBlock,delete R.needBlock,e=D0.shadowRoot(t))&&U0(e)&&(R.isShadowHost=!0),(R.type===C0.Document||R.type===C0.Element)&&E){p.headWhitespace&&R.type===C0.Element&&"head"===R.tagName&&(O=!1);var x={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_,cssCaptured:!1};if(R.type!==C0.Element||"textarea"!==R.tagName||void 0===R.attributes.value){R.type===C0.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(x.cssCaptured=!0);for(var I=0,T=Array.from(D0.childNodes(t));I<T.length;I++){var M=mw(T[I],x);M&&R.childNodes.push(M)}}var A=null;if(N0(t)&&(A=D0.shadowRoot(t)))for(var P=0,L=Array.from(D0.childNodes(A));P<L.length;P++){var D=mw(L[P],x);D&&(U0(A)&&(D.isShadow=!0),R.childNodes.push(D))}}l=D0.parentNode(t);return l&&F0(l)&&U0(l)&&(R.isShadow=!0),R.type===C0.Element&&"iframe"===R.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(X){return}if("complete"===i){if("about:blank"!==r.location.href||"about:blank"===e.src||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()})}}}(t,function(){var e=t.contentDocument;e&&w&&(e=mw(e,{doc:e,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_}))&&w(t,e)},b),R.type===C0.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===V0(R.attributes.href))&&function(e,t,n){var r,i,o=!1;try{r=e.sheet}catch(X){return}r||(i=setTimeout(function(){o||(t(),o=!0)},n),e.addEventListener("load",function(){clearTimeout(i),o=!0,t()}))}(t,function(){var e;k&&(e=mw(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_}))&&k(t,e)},S),R}var gw,vw={exports:{}};var yw,ww,bw,kw,Sw,_w=(bw=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?bw:("function"==typeof(kw=bw["default"])?(Sw=function bw(){return this instanceof bw?Reflect.construct(kw,arguments,this.constructor):kw.apply(this,arguments)}).prototype=kw.prototype:Sw={},Object.defineProperty(Sw,"__esModule",{value:!0}),Object.keys(bw).forEach(function(e){var t=Object.getOwnPropertyDescriptor(bw,e);Object.defineProperty(Sw,e,t.get?t:{enumerable:!0,get:function(){return bw[e]}})}),Sw);function Ew(){var f,d,e,t,n;return ww||(ww=1,gw||(gw=1,t=String,vw.exports=(n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}})(),vw.exports.createColors=n),f=vw.exports,d=_w,n=Z(Error),U(s,n),e=k(s,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(e){var r=this;if(!this.source)return"";var t=this.source;null==e&&(e=f.isColorSupported);var n,i,o,a,s,t=(t=d&&e?d(t):t).split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,t.length),c=String(l).length;return e?(e=f.createColors(!0),n=e.bold,i=e.gray,o=e.red,a=function(e){return n(o(e))},s=function(e){return i(e)}):a=s=function(e){return e},t.slice(u,l).map(function(e,t){var t=u+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=s(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),a(">")+s(n)+e+"\n "+t+a("^")):" "+s(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(yw=e)["default"]=e),yw;function s(e,t,n,r,i,o){var a;return b(this,s),(a=v(this,s,[e])).name="CssSyntaxError",a.reason=e,i&&(a.file=i),r&&(a.source=r),o&&(a.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(a.line=t,a.column=n):(a.line=t.line,a.column=t.column,a.endLine=n.line,a.endColumn=n.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,s),a}}var Cw,Ow,Rw,xw,Iw,Tw,Mw,Aw,Pw,Lw,Dw,Nw,Fw,Uw,jw,zw,Bw,Ww,Hw,qw,Vw,Gw,Jw,$w,Zw,Kw,Yw,Xw,Qw,eb,tb,nb,rb,ib,ob,ab,sb,ub,lb,cb,fb,db,hb,pb,mb,gb,vb,yb,wb,bb,kb,Sb={};function _b(){return Cw||(Cw=1,Sb.isClean=Symbol("isClean"),Sb.my=Symbol("my")),Sb}function Eb(){var a,t;return Rw||(a={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!(Rw=1)},t=k(function t(e){b(this,t),this.builder=e},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}},{key:"beforeAfter",value:function(e,t){for(var n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n}},{key:"block",value:function(e,t){var n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),(t=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(t),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;0<t&&"comment"===e.nodes[t].type;)--t;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),n=e.prop+n+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(e,t,n){var r;if(t&&void 0!==(r=e.raws[t]))return r;var i,o=e.parent;if("before"===(n=n||t)){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}return o?((o=e.root()).rawCache||(o.rawCache={}),"undefined"!=typeof o.rawCache[n]?o.rawCache[n]:"before"===n||"after"===n?this.beforeAfter(e,n):(this[i="raw"+((i=n)[0].toUpperCase()+i.slice(1))]?r=this[i](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=a[n]),o.rawCache[n]=r)):a[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(t){var n;return t.walk(function(e){if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(n){return n.raws.indent||(n.walk(function(e){var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r);var r}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),(Ow=t)["default"]=t),Ow}function Cb(){var n;return Iw||(Iw=1,n=Eb(),(xw=e)["default"]=e),xw;function e(e,t){new n(t).stringify(e)}}function Ob(){var o,a,s,i,n,r,e;return Mw||(Mw=1,a=(o=_b()).isClean,s=o.my,i=Ew(),n=Eb(),r=Cb(),e=k(function o(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in b(this,o),this.raws={},this[a]=!1,this[s]=!0,t)if("nodes"===e){this.nodes=[];var n,r=Me(t[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}catch(Pe){r.e(Pe)}finally{r.f()}}else this[e]=t[e]},[{key:"addToError",value:function(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))),e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in t)this[e]=t[e];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},n=function a(e,t){var n,r,i,o=new e.constructor;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n&&(i=S(r=e[n]),"parent"===n&&"object"===i?t&&(o[n]=t):"source"===n?o[n]=r:Array.isArray(r)?o[n]=r.map(function(e){return a(e,o)}):("object"===i&&null!==r&&(r=a(r)),o[n]=r));return o}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return this.source?(t=(n=this.rangeBy(r)).end,this.source.input.error(e,{column:(n=n.start).column,line:n.line},{column:t.column,line:t.line},r)):new i(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}},{key:"markDirty",value:function(){if(this[a]){this[a]=!1;for(var e=this;e=e.parent;)e[a]=!1}}},{key:"next",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}},{key:"positionBy",value:function(e,t){var n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?i+=r=1:r+=1;return{column:r,line:i}}},{key:"prev",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}},{key:"rangeBy",value:function(e){var t,n,r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};return e.word?-1!==(n=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(n,t),i=this.positionInside(n+e.word.length,t)):(e.start?r={column:e.start.column,line:e.start.line}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1))),{end:i=i.line<r.line||i.line===r.line&&i.column<=r.column?{column:r.column+1,line:r.line}:i,start:r}}},{key:"raw",value:function(e,t){return(new n).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){if(this.parent){for(var e=this,t=!1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s)}t||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n,r,i,o={},a=null==t,s=(t=t||new Map,0);for(n in this)Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n&&(r=this[n],Array.isArray(r)?o[n]=r.map(function(e){return"object"===S(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===S(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=s,t.set(r.input,s),s++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return a&&(o.inputs=Ne(t.keys()).map(function(e){return e.toJSON()})),o}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r,t=(e.stringify&&(e=e.stringify),"");return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}},{key:"proxyOf",get:function(){return this}}]),(Tw=e)["default"]=e),Tw}function Rb(){var e;return Pw||(Pw=1,e=Ob(),U(t,e),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(Aw=e)["default"]=e),Aw;function t(e){return b(this,t),e&&"undefined"!=typeof e.value&&"string"!=typeof e.value&&(e=Ae(Ae({},e),{},{value:String(e.value)})),(e=v(this,t,[e])).type="decl",e}}function xb(){var r,i,t,n,o,a,s;return Fw||(Fw=1,r=_w.SourceMapConsumer,i=_w.SourceMapGenerator,t=_w.existsSync,n=_w.readFileSync,o=_w.dirname,a=_w.join,s=k(function s(e,t){b(this,s),!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=o(this.mapFile)),e)&&(this.text=e)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===S(e)&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}},{key:"loadFile",value:function(e){if(this.root=o(e),t(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(e,t){if(!1===t)return!1;if(!t)return this.inline?this.decodeInline(this.annotation):this.annotation?(n=this.annotation,e&&(n=a(o(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){e=this.loadFile(n);if(e)return e;throw new Error("Unable to load previous source map: "+n.toString())}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}}]),(Nw=s)["default"]=s),Nw}function Ib(){var n,a,u,s,r,i,e,l,o,c,f,d,t;return jw||(jw=1,n=_w.SourceMapConsumer,t=_w.SourceMapGenerator,a=_w.fileURLToPath,u=_w.pathToFileURL,s=_w.isAbsolute,r=_w.resolve,i=(Dw?Lw:(Dw=1,Lw={nanoid:function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,e=_w,l=Ew(),o=xb(),c=Symbol("fromOffsetCache"),f=Boolean(n&&t),d=Boolean(r&&s),t=k(function n(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};if(b(this,n),null==e||"object"===S(e)&&!e.toString)throw new Error("PostCSS received ".concat(e," instead of CSS string"));this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=r(t.from)),d&&f&&(e=new o(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,a=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{},s=(t&&"object"===S(t)?(s=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof s.offset?(r=(o=this.fromOffset(s.offset)).line,o.col):(r=s.line,s.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=s?new l(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,a.plugin):new l(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,a.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(u&&(o.input.url=u(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[c])n=this[c];else{for(var t=this.css.split("\n"),n=new Array(t.length),r=0,i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;this[c]=n}var a=0;if(e>=n[n.length-1])a=n.length-1;else for(var s,u=n.length-2;a<u;)if(e<n[s=a+(u-a>>1)])u=s-1;else{if(!(e>=n[s+1])){a=s;break}a=s+1}return{col:e-n[a]+1,line:a+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,n,r){if(!this.map)return!1;var i,o=this.map.consumer(),t=o.originalPositionFor({column:t,line:e});if(!t.source)return!1;"number"==typeof n&&(i=o.originalPositionFor({column:r,line:n}));e=s(t.source)?u(t.source):new URL(t.source,this.map.consumer().sourceRoot||u(this.map.mapFile)),r={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:e.toString()};if("file:"===e.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");r.file=a(e)}n=o.sourceContentFor(t.source);return n&&(r.source=n),r}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Ae({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),(Uw=t)["default"]=t,e&&e.registerInput&&e.registerInput(t)),Uw}function Tb(){if(Bw)return zw;Bw=1;var a=_w.SourceMapConsumer,t=_w.SourceMapGenerator,s=_w.dirname,n=_w.relative,r=_w.resolve,i=_w.sep,o=_w.pathToFileURL,u=Ib(),e=Boolean(a&&t),l=Boolean(s&&r&&n&&i);return zw=k(function j(e,t,n,r){b(this,j),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map},[{key:"addAnnotation",value:function(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map",t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var e,t=Me(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||s(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new a(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(Pe){t.e(Pe)}finally{t.f()}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){var t;return this.clearAnnotation(),l&&e&&this.isMap()?this.generateMap():(t="",this.stringify(this.root,function(e){t+=e}),[t])}},{key:"generateMap",value:function(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var r=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,a=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(e,t,n){r.css+=e,t&&"end"!==n&&(s.generated.line=o,s.generated.column=a-1,t.source&&t.source.start?(s.source=r.sourcePath(t),s.original.line=t.source.start.line,s.original.column=t.source.start.column-1):(s.source="<no source>",s.original.line=1,s.original.column=0),r.map.addMapping(s)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),a=e.length-i):a+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(s.source=r.sourcePath(t),s.original.line=t.source.end.line,s.original.column=t.source.end.column-1,s.generated.line=o,s.generated.column=a-2):(s.source="<no source>",s.original.line=1,s.original.column=0,s.generated.line=o,s.generated.column=a-1),r.map.addMapping(s))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){var t;return this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e)?e:this.memoizedPaths.get(e)||(t=this.opts.to?s(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=s(r(t,this.mapOpts.annotation))),t=n(t,e),this.memoizedPaths.set(e,t),t)}},{key:"previous",value:function(){var e,t=this;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(function(e){e.source&&e.source.input.map&&(e=e.source.input.map,t.previousMaps.includes(e)||t.previousMaps.push(e))}):(e=new u(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}},{key:"setSourcesContent",value:function(){var e,n=this,r={};this.root?this.root.walk(function(e){var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=n.usesFileUrls?n.toFileUrl(t):n.toUrl(n.path(t)),n.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(o)return t=o(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}])}function Mb(){var e;return Hw||(Hw=1,e=Ob(),U(t,e),e=k(t),(Ww=e)["default"]=e),Ww;function t(e){return b(this,t),(e=v(this,t,[e])).type="comment",e}}function Ab(){var l,c,f,t,d,h,p,m,n,e;return Vw||(Vw=1,e=_b(),d=e.isClean,h=e.my,p=Rb(),m=Mb(),e=Ob(),U(g,e),(n=k(g,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o,a=i[r],a=this.normalize(a,this.last),s=Me(a);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.proxyOf.nodes.push(u)}}catch(Pe){s.e(Pe)}finally{s.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(G(g,"cleanRaws",this,3)([e]),this.nodes){var t,n=Me(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(Pe){n.e(Pe)}finally{n.f()}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(r,o){return"proxyOf"===o?r:r[o]&&("each"===o||"string"==typeof o&&o.startsWith("walk")?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r[o].apply(r,Ne(t.map(function(n){return"function"==typeof n?function(e,t){return n(e.toProxy(),t)}:n})))}:"every"===o||"some"===o?function(i){return r[o](function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.apply(void 0,[e.toProxy()].concat(n))})}:"root"===o?function(){return r.root().toProxy()}:"nodes"===o?r.nodes.map(function(e){return e.toProxy()}):"first"===o||"last"===o?r[o].toProxy():r[o])},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o+1,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function H(e){return e.map(function(e){return e.nodes&&(e.nodes=H(e.nodes)),delete e.source,e})}(l(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Me(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(Pe){i.e(Pe)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var a,s=Me(e=e.nodes.slice(0));try{for(s.s();!(a=s.n()).done;){var u=a.value;u.parent&&u.parent.removeChild(u,"ignore")}}catch(Pe){s.e(Pe)}finally{s.f()}}else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new p(e)]}else if(e.selector)e=[new c(e)];else if(e.name)e=[new f(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new m(e)]}return e.map(function(e){return e[h]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[d]&&function c(e){if(e[d]=!1,e.proxyOf.nodes){var t,n=Me(e.proxyOf.nodes);try{for(n.s();!(t=n.n()).done;)c(t.value)}catch(Pe){n.e(Pe)}finally{n.f()}}}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e})}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Me(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,a,s=r.value,u=this.normalize(s,this.first,"prepend").reverse(),l=Me(u);try{for(l.s();!(o=l.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(a in this.indexes)this.indexes[a]=this.indexes[a]+u.length}}catch(Pe){i.e(Pe)}finally{i.f()}return this.markDirty(),this}},{key:"push",value:function(e){return(e.parent=this).proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e,t=Me(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(Pe){t.e(Pe)}finally{t.f()}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,n,r){return r||(r=n,n={}),this.walkDecls(function(e){n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(r){return this.each(function(e,t){var n;try{n=r(e,t)}catch(b){throw e.addToError(b)}return n=!1!==n&&e.walk?e.walk(r):n})}},{key:"walkAtRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk(function(e,t){if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("atrule"===e.type)return r(e,t)}))}},{key:"walkComments",value:function(n){return this.walk(function(e,t){if("comment"===e.type)return n(e,t)})}},{key:"walkDecls",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk(function(e,t){if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("decl"===e.type)return r(e,t)}))}},{key:"walkRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk(function(e,t){if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("rule"===e.type)return r(e,t)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}])).registerParse=function(e){l=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){f=e},n.registerRoot=function(e){t=e},((qw=n)["default"]=n).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,f.prototype):"rule"===e.type?Object.setPrototypeOf(e,c.prototype):"decl"===e.type?Object.setPrototypeOf(e,p.prototype):"comment"===e.type?Object.setPrototypeOf(e,m.prototype):"root"===e.type&&Object.setPrototypeOf(e,t.prototype),e[h]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),qw;function g(){return b(this,g),v(this,g,arguments)}}function Pb(){var t,n,e;return Jw||(Jw=1,e=Ab(),U(r,e),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(Gw=e)["default"]=e),Gw;function r(e){return b(this,r),(e=v(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function Lb(){if(Zw)return $w;Zw=1;var t={};return $w=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Db(){var r;return Yw||(Yw=1,r=k(function r(e){var t,n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};for(t in b(this,r),this.type="warning",this.text=e,n.node&&n.node.source&&(e=n.node.rangeBy(n),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),n)this[t]=n[t]},[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),(Kw=r)["default"]=r),Kw}function Nb(){var n,r;return Qw||(Qw=1,n=Db(),r=k(function r(e,t,n){b(this,r),this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0},[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new n(e,t));return this.messages.push(e),e}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),(Xw=r)["default"]=r),Xw}function Fb(){var e,t;return rb||(rb=1,e=Ab(),U(r,e),t=k(r,[{key:"append",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return G(r,"append",this,3)(t)}},{key:"prepend",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return G(r,"prepend",this,3)(t)}}]),(nb=t)["default"]=t,e.registerAtRule(t)),nb;function r(e){return b(this,r),(e=v(this,r,[e])).type="atrule",e}}function Ub(){var t,n,e,r;return ob||(ob=1,e=Ab(),U(o,e),(r=k(o,[{key:"normalize",value:function(e,t,n){e=G(o,"normalize",this,3)([e]);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var r,i=Me(e);try{for(i.s();!(r=i.n()).done;)r.value.raws.before=t.raws.before}catch(Pe){i.e(Pe)}finally{i.f()}}return e}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),G(o,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},ib=r,e.registerRoot(r["default"]=r)),ib;function o(e){return b(this,o),(e=v(this,o,[e])).type="root",e.nodes||(e.nodes=[]),e}}function jb(){var t;return sb||(sb=1,(ab=t={comma:function(e){return t.split(e,[","],!0)},space:function(e){return t.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",a=!1,s=0,u=!1,l="",c=!1,f=Me(e);try{for(f.s();!(r=f.n()).done;){var d=r.value;c?c=!1:"\\"===d?c=!0:u?d===l&&(u=!1):'"'===d||"'"===d?(u=!0,l=d):"("===d?s+=1:")"===d?0<s&&--s:0===s&&t.includes(d)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=d}}catch(Pe){f.e(Pe)}finally{f.f()}return!n&&""===o||i.push(o.trim()),i}})["default"]=t),ab}function zb(){var e,t,n;return lb||(lb=1,e=Ab(),t=jb(),U(r,e),n=k(r,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}}]),(ub=n)["default"]=n,e.registerRule(n)),ub;function r(e){return b(this,r),(e=v(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function Bb(){if(fb)return cb;fb=1;var p=Rb(),e=function(){if(tb)return eb;tb=1;var w="'".charCodeAt(0),b='"'.charCodeAt(0),k="\\".charCodeAt(0),S="/".charCodeAt(0),_="\n".charCodeAt(0),E=" ".charCodeAt(0),C="\f".charCodeAt(0),O="\t".charCodeAt(0),R="\r".charCodeAt(0),x="[".charCodeAt(0),I="]".charCodeAt(0),T="(".charCodeAt(0),M=")".charCodeAt(0),A="{".charCodeAt(0),P="}".charCodeAt(0),L=";".charCodeAt(0),D="*".charCodeAt(0),N=":".charCodeAt(0),F="@".charCodeAt(0),U=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,z=/.[\r\n"'(/\\]/,B=/[\da-f]/i;return eb=function(t){var r,i,o,a,s,u,l,c,f,e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},d=t.css.valueOf(),h=e.ignoreErrors,p=d.length,m=0,g=[],v=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&p<=m},nextToken:function(e){if(v.length)return v.pop();if(!(p<=m)){var t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m)){case _:case E:case O:case R:case C:for(i=m;i+=1,(r=d.charCodeAt(i))===E||r===_||r===O||r===R||r===C;);f=["space",d.slice(m,i)],m=i-1;break;case x:case I:case A:case P:case N:case L:case M:var n=String.fromCharCode(r);f=[n,n,m];break;case T:if(l=g.length?g.pop()[1]:"",c=d.charCodeAt(m+1),"url"===l&&c!==w&&c!==b&&c!==E&&c!==_&&c!==O&&c!==C&&c!==R){i=m;do{if(s=!1,-1===(i=d.indexOf(")",i+1))){if(h||t){i=m;break}y("bracket")}for(u=i;d.charCodeAt(u-1)===k;)--u,s=!s}while(s);f=["brackets",d.slice(m,i+1),m,i],m=i}else i=d.indexOf(")",m+1),l=d.slice(m,i+1),-1===i||z.test(l)?f=["(","(",m]:(f=["brackets",l,m,i],m=i);break;case w:case b:o=r===w?"'":'"',i=m;do{if(s=!1,-1===(i=d.indexOf(o,i+1))){if(h||t){i=m+1;break}y("string")}for(u=i;d.charCodeAt(u-1)===k;)--u,s=!s}while(s);f=["string",d.slice(m,i+1),m,i],m=i;break;case F:U.lastIndex=m+1,U.test(d),i=0===U.lastIndex?d.length-1:U.lastIndex-2,f=["at-word",d.slice(m,i+1),m,i],m=i;break;case k:for(i=m,a=!0;d.charCodeAt(i+1)===k;)i+=1,a=!a;if(r=d.charCodeAt(i+1),a&&r!==S&&r!==E&&r!==_&&r!==O&&r!==R&&r!==C&&(i+=1,B.test(d.charAt(i)))){for(;B.test(d.charAt(i+1));)i+=1;d.charCodeAt(i+1)===E&&(i+=1)}f=["word",d.slice(m,i+1),m,i],m=i;break;default:m=(r===S&&d.charCodeAt(m+1)===D?(0===(i=d.indexOf("*/",m+2)+1)&&(h||t?i=d.length:y("comment")),f=["comment",d.slice(m,i+1),m,i]):(j.lastIndex=m+1,j.test(d),i=0===j.lastIndex?d.length-1:j.lastIndex-2,f=["word",d.slice(m,i+1),m,i],g.push(f)),i)}return m++,f}},position:function(){return m}}}}(),n=Mb(),l=Fb(),t=Ub(),r=zb(),d={empty:!0,space:!0};return cb=k(function N(e){b(this,N),this.input=e,this.root=new t,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new l;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&0<u.length?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(0<s.length){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(s.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;0<=i&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i,o=0,a=Me(e.entries());try{for(a.s();!(i=a.n()).done;){var s=De(i.value,2),u=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return u}this.doubleColon(t)}r=t}}catch(Pe){a.e(Pe)}finally{a.f()}return!1}},{key:"comment",value:function(e){var t=new n,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}},{key:"createTokenizer",value:function(){this.tokenizer=e(this.input)}},{key:"decl",value:function(e,t){var n=new p;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;0<=t;t--){var n=e[t],n=n[3]||n[2];if(n)return n}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var u=e.length-1;0<=u;u--){if("!important"===(r=e[u])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,u);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),f="",d=u;0<d;d--){var h=c[d][0];if(0===f.trim().indexOf("!")&&"space"!==h)break;f=c.pop()[1]+f}0===f.trim().indexOf("!")&&(n.important=!0,n.raws.important=f,e=c)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new r;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t,n=!1,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],u=e;u;){if(t=u[0],s.push(u),"("===t||"["===t)i=i||u,o.push("("===t?")":"]");else if(a&&r&&"{"===t)i=i||u,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(s,a);break}if("{"===t)return void this.rule(s);if("}"===t){this.tokenizer.back(s.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,s,u=n.length,l="",c=!0,f=0;f<u;f+=1)"space"===(a=(i=n[f])[0])&&f===u-1&&!r||"comment"===a&&(a=n[f-1]?n[f-1][0]:"empty",o=n[f+1]?n[f+1][0]:"empty",d[a]||d[o]||","===l.slice(-1))?c=!1:l+=i[1];c||(s=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:s,value:l}),e[t]=l}},{key:"rule",value:function(e){e.pop();var t=new r;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}])}function Wb(){var e,n,r;return hb||(hb=1,e=Ab(),n=Bb(),r=Ib(),db=t,e.registerParse(t["default"]=t)),db;function t(e,t){e=new r(e,t),e=new n(e);try{e.parse()}catch(L){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===L.name&&t&&t.from&&(/\.scss$/i.test(t.from)?L.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?L.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(L.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),L}return e.root}}function Hb(){var f,a,n,r,u,s,i,c,l,e,o,d,h,p,t,m;return mb||(mb=1,t=_b(),f=t.isClean,a=t.my,n=Tb(),r=Cb(),u=Ab(),s=Pb(),i=Lb(),c=Nb(),l=Wb(),e=Ub(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0},p={},(t=k(function s(e,t,n){var r,i=this;if(b(this,s),this.stringified=!1,this.processed=!1,"object"!==S(t)||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof s||t instanceof c)r=w(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var o=l;n.syntax&&(o=n.syntax.parse),(o=n.parser?n.parser:o).parse&&(o=o.parse);try{r=o(t,n)}catch(X){this.processed=!0,this.error=X}r&&!r[a]&&u.rebuild(r)}else r=w(t);this.result=new c(e,r,n),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===S(e)&&e.prepare?Ae(Ae({},e),e.prepare(i.result)):e})},[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n,r,i,o,a,s=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?s.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=s.postcssPlugin,r=s.postcssVersion,i=this.result.processor.version,o=r.split("."),a=i.split("."),o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=s.postcssPlugin,e.setMessage())}catch(Pe){console&&console.error&&console.error(Pe)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};var e,t=function(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])},n=Me(this.plugins);try{for(n.s();!(e=n.n()).done;){var i=e.value;if("object"===S(i))for(var o in i){if(!d[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event ".concat(o," in ").concat(i.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[o])if("object"===S(i[o]))for(var a in i[o])t(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&t(i,o,i[o])}}}catch(Pe){n.e(Pe)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(m=P(W().m(function e(){var t,i,n,r,o,a,s,u,l,c=this;return W().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(s=this.plugins[t],g(s=this.runOnRoot(s)))return e.p=2,e.n=3,s;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,s=e.v,this.handleError(s);case 5:t++,e.n=1;break;case 6:if(this.prepareVisitors(),!this.hasListener){e.n=21;break}i=this.result.root;case 7:if(i[f]){e.n=14;break}i[f]=!0,n=[y(i)];case 8:if(0<n.length){if(g(u=this.visitTick(n)))return e.p=9,e.n=10,u;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,u=e.v,l=n[n.length-1].node,this.handleError(u,l);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Me(this.listeners.OnceExit),e.p=15,a=W().m(function d(){var t,n,r;return W().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=De(o.value,2),r=n[0],t=n[1],c.result.lastPlugin=r,e.p=1,"document"===i.type)return n=i.nodes.map(function(e){return t(e,c.helpers)}),e.n=2,Promise.all(n);e.n=3;break;case 2:e.n=4;break;case 3:return e.n=4,t(i,c.helpers);case 4:e.n=6;break;case 5:throw e.p=5,r=e.v,c.handleError(r);case 6:return e.a(2)}},d,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(q(a()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,l=e.v,r.e(l);case 20:return e.p=20,r.f(),e.f(20);case 21:return this.processed=!0,e.a(2,this.stringify())}},e,this,[[15,19,20,21],[9,11],[2,4]])})),function(){return m.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===S(t)&&t.Once?"document"===this.result.root.type?g((e=this.result.root.nodes.map(function(e){return t.Once(e,n.helpers)}))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(X){throw this.handleError(X)}}},{key:"stringify",value:function(){if(this.error)throw this.error;var e,t;return this.stringified||(this.stringified=!0,this.sync(),t=this.result.opts,e=r,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new n(e,this.result.root,this.result.opts).generate(),this.result.css=t[0],this.result.map=t[1]),this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();var e,t=Me(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(g(this.runOnRoot(n)))throw this.getAsyncError()}}catch(Pe){t.e(Pe)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[f];)r[f]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Me(r.nodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}}catch(Pe){o.e(Pe)}finally{o.f()}}else this.visitSync(this.listeners.OnceExit,r)}}return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n,r=Me(e);try{for(r.s();!(n=r.n()).done;){var i=De(n.value,2),o=i[0],a=i[1],s=(this.result.lastPlugin=o,void 0);try{s=a(t,this.helpers)}catch(u){throw this.handleError(u,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(s))throw this.getAsyncError()}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"visitTick",value:function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var i=De(r[t.visitorIndex],2),o=i[0],i=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return i(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(0!==t.iterator){for(var a,s=t.iterator;a=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!a[f])return a[f]=!0,void e.push(y(a));t.iterator=0,delete n.indexes[s]}for(var u=t.events;t.eventIndex<u.length;){var l=u[t.eventIndex];if(t.eventIndex+=1,0===l)return void(n.nodes&&n.nodes.length&&(n[f]=!0,t.iterator=n.getIterator()));if(this.listeners[l])return void(t.visitors=this.listeners[l])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[f]=!0;var n,r=Me(v(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[f]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}])).registerPostcss=function(e){p=e},pb=t,e.registerLazyResult(t["default"]=t),s.registerLazyResult(t)),pb;function g(e){return"object"===S(e)&&"function"==typeof e.then}function v(e){var t=!1,n=o[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[f]=!1,e.nodes&&e.nodes.forEach(w),e}}function qb(){var n,r,t,e,i,o,a,s,u,l,c;return wb||(wb=1,vb||(vb=1,o=Tb(),a=Cb(),s=Lb(),u=Wb(),l=Nb(),c=k(function c(e,t,n){b(this,c),t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var e=a,r=(this.result=new l(this._processor,void 0,this._opts),this.result.css=t,this),n=(Object.defineProperty(this.result,"root",{get:function(){return r.root}}),new o(e,void 0,this._opts,t));n.isMap()?(t=(e=De(n.generate(),2))[0],e=e[1],t&&(this.result.css=t),e&&(this.result.map=e)):(n.clearAnnotation(),this.result.css=n.css)},[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this._opts||s("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=u;try{e=t(this._css,this._opts)}catch(X){this.error=X}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(gb=c)["default"]=c),n=gb,r=Hb(),t=Pb(),e=Ub(),i=k(function t(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:[];b(this,t),this.version="8.4.38",this.plugins=this.normalize(e)},[{key:"normalize",value:function(e){var t,n=[],r=Me(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===S(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===S(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==S(i)||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(Pe){r.e(Pe)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?r:n)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(yb=i)["default"]=i,e.registerProcessor(i),t.registerProcessor(i)),yb}_E||(_E=1,s=Ew(),Vb=Rb(),l=Hb(),t=Ab(),Gb=qb(),i=Cb(),$O||($O=1,Xb=Rb(),Qb=xb(),e1=Mb(),t1=Fb(),n1=Ib(),r1=Ub(),i1=zb(),(bb=o1)["default"]=o1),ov=bb,Jb=Pb(),Fe=Db(),$b=Mb(),Zb=Fb(),e=Nb(),Hr=Ib(),Ie=Wb(),er=jb(),Kb=zb(),Yb=Ub(),at=Ob(),a1.plugin=function(t,n){var e,r=!1;function i(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");var e=n.apply(void 0,arguments);return e.postcssPlugin=t,e.postcssVersion=(new Gb).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return a1([i(n)]).process(e,t)},i},a1.stringify=i,a1.parse=Ie,a1.fromJSON=ov,a1.list=er,a1.comment=function(e){return new $b(e)},a1.atRule=function(e){return new Zb(e)},a1.decl=function(e){return new Vb(e)},a1.rule=function(e){return new Kb(e)},a1.root=function(e){return new Yb(e)},a1.document=function(e){return new Jb(e)},a1.CssSyntaxError=s,a1.Declaration=Vb,a1.Container=t,a1.Processor=Gb,a1.Document=Jb,a1.Comment=$b,a1.Warning=Fe,a1.AtRule=Zb,a1.Result=e,a1.Input=Hr,a1.Rule=Kb,a1.Root=Yb,a1.Node=at,l.registerPostcss(a1),(kb=a1)["default"]=a1);var Vb,Gb,Jb,$b,Zb,Kb,Yb,Xb,Qb,e1,t1,n1,r1,i1,n=(a=kb)&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a["default"]:a;function o1(e,t){if(Array.isArray(e))return e.map(function(e){return o1(e)});var n,r=e.inputs,i=B(e,v0);if(r){t=[];var o,a=Me(r);try{for(a.s();!(o=a.n()).done;){var s=Ae(Ae({},o.value),{},{__proto__:n1.prototype});s.map&&(s.map=Ae(Ae({},s.map),{},{__proto__:Qb.prototype})),t.push(s)}}catch(Pe){a.e(Pe)}finally{a.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return o1(e,t)})),i.source&&(n=(r=i.source).inputId,r=B(r,y0),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new r1(i);if("decl"===i.type)return new Xb(i);if("rule"===i.type)return new i1(i);if("comment"===i.type)return new e1(i);if("atrule"===i.type)return new t1(i);throw new Error("Unknown node type: "+e.type)}function a1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new Gb(t)}n.stringify;var s1=Object.defineProperty,u1=function(e,t,n){return e=e,t="symbol"!==S(t)?t+"":t,n=n,t in e?s1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n};Date.now().toString();var l1,c1={exports:{}};var f1,d1,h1,p1,m1,g1=(h1=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?h1:("function"==typeof(p1=h1["default"])?(m1=function h1(){return this instanceof h1?Reflect.construct(p1,arguments,this.constructor):p1.apply(this,arguments)}).prototype=p1.prototype:m1={},Object.defineProperty(m1,"__esModule",{value:!0}),Object.keys(h1).forEach(function(e){var t=Object.getOwnPropertyDescriptor(h1,e);Object.defineProperty(m1,e,t.get?t:{enumerable:!0,get:function(){return h1[e]}})}),m1);function v1(){var f,d,e,t,n;return d1||(d1=1,l1||(l1=1,t=String,c1.exports=(n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}})(),c1.exports.createColors=n),f=c1.exports,d=g1,n=Z(Error),U(s,n),e=k(s,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(e){var r=this;if(!this.source)return"";var t=this.source;null==e&&(e=f.isColorSupported);var n,i,o,a,s,t=(t=d&&e?d(t):t).split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,t.length),c=String(l).length;return e?(e=f.createColors(!0),n=e.bold,i=e.gray,o=e.red,a=function(e){return n(o(e))},s=function(e){return i(e)}):a=s=function(e){return e},t.slice(u,l).map(function(e,t){var t=u+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=s(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),a(">")+s(n)+e+"\n "+t+a("^")):" "+s(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(f1=e)["default"]=e),f1;function s(e,t,n,r,i,o){var a;return b(this,s),(a=v(this,s,[e])).name="CssSyntaxError",a.reason=e,i&&(a.file=i),r&&(a.source=r),o&&(a.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(a.line=t,a.column=n):(a.line=t.line,a.column=t.column,a.endLine=n.line,a.endColumn=n.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,s),a}}var y1,w1,b1,k1,S1,_1,E1,C1,O1,R1,x1,I1,T1,M1,A1,P1,L1,D1,N1,F1,U1,j1,z1,B1,W1,H1,q1,V1,G1,J1,$1,Z1,K1,Y1,X1,Q1,ek,tk,nk,rk,ik,ok,ak,sk,uk,lk,ck,fk,dk,hk,pk,mk={};function gk(){return y1||(y1=1,mk.isClean=Symbol("isClean"),mk.my=Symbol("my")),mk}function vk(){var a,t;return b1||(a={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!(b1=1)},t=k(function t(e){b(this,t),this.builder=e},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}},{key:"beforeAfter",value:function(e,t){for(var n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n}},{key:"block",value:function(e,t){var n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),(t=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(t),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;0<t&&"comment"===e.nodes[t].type;)--t;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),n=e.prop+n+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(e,t,n){var r;if(t&&void 0!==(r=e.raws[t]))return r;var i,o=e.parent;if("before"===(n=n||t)){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}return o?((o=e.root()).rawCache||(o.rawCache={}),"undefined"!=typeof o.rawCache[n]?o.rawCache[n]:"before"===n||"after"===n?this.beforeAfter(e,n):(this[i="raw"+((i=n)[0].toUpperCase()+i.slice(1))]?r=this[i](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=a[n]),o.rawCache[n]=r)):a[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(t){var n;return t.walk(function(e){if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(n){return n.raws.indent||(n.walk(function(e){var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r);var r}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),(w1=t)["default"]=t),w1}function yk(){var n;return S1||(S1=1,n=vk(),(k1=e)["default"]=e),k1;function e(e,t){new n(t).stringify(e)}}function wk(){var o,a,s,i,n,r,e;return E1||(E1=1,a=(o=gk()).isClean,s=o.my,i=v1(),n=vk(),r=yk(),e=k(function o(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in b(this,o),this.raws={},this[a]=!1,this[s]=!0,t)if("nodes"===e){this.nodes=[];var n,r=Me(t[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}catch(Pe){r.e(Pe)}finally{r.f()}}else this[e]=t[e]},[{key:"addToError",value:function(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))),e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in t)this[e]=t[e];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},n=function a(e,t){var n,r,i,o=new e.constructor;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n&&(i=S(r=e[n]),"parent"===n&&"object"===i?t&&(o[n]=t):"source"===n?o[n]=r:Array.isArray(r)?o[n]=r.map(function(e){return a(e,o)}):("object"===i&&null!==r&&(r=a(r)),o[n]=r));return o}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return this.source?(t=(n=this.rangeBy(r)).end,this.source.input.error(e,{column:(n=n.start).column,line:n.line},{column:t.column,line:t.line},r)):new i(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}},{key:"markDirty",value:function(){if(this[a]){this[a]=!1;for(var e=this;e=e.parent;)e[a]=!1}}},{key:"next",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}},{key:"positionBy",value:function(e,t){var n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?i+=r=1:r+=1;return{column:r,line:i}}},{key:"prev",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}},{key:"rangeBy",value:function(e){var t,n,r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};return e.word?-1!==(n=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(n,t),i=this.positionInside(n+e.word.length,t)):(e.start?r={column:e.start.column,line:e.start.line}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1))),{end:i=i.line<r.line||i.line===r.line&&i.column<=r.column?{column:r.column+1,line:r.line}:i,start:r}}},{key:"raw",value:function(e,t){return(new n).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){if(this.parent){for(var e=this,t=!1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s)}t||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n,r,i,o={},a=null==t,s=(t=t||new Map,0);for(n in this)Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n&&(r=this[n],Array.isArray(r)?o[n]=r.map(function(e){return"object"===S(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===S(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=s,t.set(r.input,s),s++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return a&&(o.inputs=Ne(t.keys()).map(function(e){return e.toJSON()})),o}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r,t=(e.stringify&&(e=e.stringify),"");return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}},{key:"proxyOf",get:function(){return this}}]),(_1=e)["default"]=e),_1}function bk(){var e;return O1||(O1=1,e=wk(),U(t,e),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(C1=e)["default"]=e),C1;function t(e){return b(this,t),e&&"undefined"!=typeof e.value&&"string"!=typeof e.value&&(e=Ae(Ae({},e),{},{value:String(e.value)})),(e=v(this,t,[e])).type="decl",e}}function kk(){var r,i,t,n,o,a,s;return T1||(T1=1,r=g1.SourceMapConsumer,i=g1.SourceMapGenerator,t=g1.existsSync,n=g1.readFileSync,o=g1.dirname,a=g1.join,s=k(function s(e,t){b(this,s),!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=o(this.mapFile)),e)&&(this.text=e)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===S(e)&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}},{key:"loadFile",value:function(e){if(this.root=o(e),t(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(e,t){if(!1===t)return!1;if(!t)return this.inline?this.decodeInline(this.annotation):this.annotation?(n=this.annotation,e&&(n=a(o(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){e=this.loadFile(n);if(e)return e;throw new Error("Unable to load previous source map: "+n.toString())}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}}]),(I1=s)["default"]=s),I1}function Sk(){var n,a,u,s,r,i,e,l,o,c,f,d,t;return A1||(A1=1,n=g1.SourceMapConsumer,t=g1.SourceMapGenerator,a=g1.fileURLToPath,u=g1.pathToFileURL,s=g1.isAbsolute,r=g1.resolve,i=(x1?R1:(x1=1,R1={nanoid:function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,e=g1,l=v1(),o=kk(),c=Symbol("fromOffsetCache"),f=Boolean(n&&t),d=Boolean(r&&s),t=k(function n(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};if(b(this,n),null==e||"object"===S(e)&&!e.toString)throw new Error("PostCSS received ".concat(e," instead of CSS string"));this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=r(t.from)),d&&f&&(e=new o(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,a=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{},s=(t&&"object"===S(t)?(s=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof s.offset?(r=(o=this.fromOffset(s.offset)).line,o.col):(r=s.line,s.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=s?new l(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,a.plugin):new l(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,a.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(u&&(o.input.url=u(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[c])n=this[c];else{for(var t=this.css.split("\n"),n=new Array(t.length),r=0,i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;this[c]=n}var a=0;if(e>=n[n.length-1])a=n.length-1;else for(var s,u=n.length-2;a<u;)if(e<n[s=a+(u-a>>1)])u=s-1;else{if(!(e>=n[s+1])){a=s;break}a=s+1}return{col:e-n[a]+1,line:a+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,n,r){if(!this.map)return!1;var i,o=this.map.consumer(),t=o.originalPositionFor({column:t,line:e});if(!t.source)return!1;"number"==typeof n&&(i=o.originalPositionFor({column:r,line:n}));e=s(t.source)?u(t.source):new URL(t.source,this.map.consumer().sourceRoot||u(this.map.mapFile)),r={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:e.toString()};if("file:"===e.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");r.file=a(e)}n=o.sourceContentFor(t.source);return n&&(r.source=n),r}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Ae({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),(M1=t)["default"]=t,e&&e.registerInput&&e.registerInput(t)),M1}function _k(){if(L1)return P1;L1=1;var a=g1.SourceMapConsumer,t=g1.SourceMapGenerator,s=g1.dirname,n=g1.relative,r=g1.resolve,i=g1.sep,o=g1.pathToFileURL,u=Sk(),e=Boolean(a&&t),l=Boolean(s&&r&&n&&i);return P1=k(function j(e,t,n,r){b(this,j),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map},[{key:"addAnnotation",value:function(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map",t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var e,t=Me(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||s(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new a(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(Pe){t.e(Pe)}finally{t.f()}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){var t;return this.clearAnnotation(),l&&e&&this.isMap()?this.generateMap():(t="",this.stringify(this.root,function(e){t+=e}),[t])}},{key:"generateMap",value:function(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var r=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,a=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(e,t,n){r.css+=e,t&&"end"!==n&&(s.generated.line=o,s.generated.column=a-1,t.source&&t.source.start?(s.source=r.sourcePath(t),s.original.line=t.source.start.line,s.original.column=t.source.start.column-1):(s.source="<no source>",s.original.line=1,s.original.column=0),r.map.addMapping(s)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),a=e.length-i):a+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(s.source=r.sourcePath(t),s.original.line=t.source.end.line,s.original.column=t.source.end.column-1,s.generated.line=o,s.generated.column=a-2):(s.source="<no source>",s.original.line=1,s.original.column=0,s.generated.line=o,s.generated.column=a-1),r.map.addMapping(s))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){var t;return this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e)?e:this.memoizedPaths.get(e)||(t=this.opts.to?s(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=s(r(t,this.mapOpts.annotation))),t=n(t,e),this.memoizedPaths.set(e,t),t)}},{key:"previous",value:function(){var e,t=this;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(function(e){e.source&&e.source.input.map&&(e=e.source.input.map,t.previousMaps.includes(e)||t.previousMaps.push(e))}):(e=new u(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}},{key:"setSourcesContent",value:function(){var e,n=this,r={};this.root?this.root.walk(function(e){var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=n.usesFileUrls?n.toFileUrl(t):n.toUrl(n.path(t)),n.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(o)return t=o(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}])}function Ek(){var e;return N1||(N1=1,e=wk(),U(t,e),e=k(t),(D1=e)["default"]=e),D1;function t(e){return b(this,t),(e=v(this,t,[e])).type="comment",e}}function Ck(){var l,c,f,t,d,h,p,m,n,e;return U1||(U1=1,e=gk(),d=e.isClean,h=e.my,p=bk(),m=Ek(),e=wk(),U(g,e),(n=k(g,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o,a=i[r],a=this.normalize(a,this.last),s=Me(a);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.proxyOf.nodes.push(u)}}catch(Pe){s.e(Pe)}finally{s.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(G(g,"cleanRaws",this,3)([e]),this.nodes){var t,n=Me(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(Pe){n.e(Pe)}finally{n.f()}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(r,o){return"proxyOf"===o?r:r[o]&&("each"===o||"string"==typeof o&&o.startsWith("walk")?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r[o].apply(r,Ne(t.map(function(n){return"function"==typeof n?function(e,t){return n(e.toProxy(),t)}:n})))}:"every"===o||"some"===o?function(i){return r[o](function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.apply(void 0,[e.toProxy()].concat(n))})}:"root"===o?function(){return r.root().toProxy()}:"nodes"===o?r.nodes.map(function(e){return e.toProxy()}):"first"===o||"last"===o?r[o].toProxy():r[o])},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o+1,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function H(e){return e.map(function(e){return e.nodes&&(e.nodes=H(e.nodes)),delete e.source,e})}(l(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Me(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(Pe){i.e(Pe)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var a,s=Me(e=e.nodes.slice(0));try{for(s.s();!(a=s.n()).done;){var u=a.value;u.parent&&u.parent.removeChild(u,"ignore")}}catch(Pe){s.e(Pe)}finally{s.f()}}else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new p(e)]}else if(e.selector)e=[new c(e)];else if(e.name)e=[new f(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new m(e)]}return e.map(function(e){return e[h]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[d]&&function c(e){if(e[d]=!1,e.proxyOf.nodes){var t,n=Me(e.proxyOf.nodes);try{for(n.s();!(t=n.n()).done;)c(t.value)}catch(Pe){n.e(Pe)}finally{n.f()}}}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e})}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Me(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,a,s=r.value,u=this.normalize(s,this.first,"prepend").reverse(),l=Me(u);try{for(l.s();!(o=l.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(a in this.indexes)this.indexes[a]=this.indexes[a]+u.length}}catch(Pe){i.e(Pe)}finally{i.f()}return this.markDirty(),this}},{key:"push",value:function(e){return(e.parent=this).proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e,t=Me(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(Pe){t.e(Pe)}finally{t.f()}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,n,r){return r||(r=n,n={}),this.walkDecls(function(e){n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(r){return this.each(function(e,t){var n;try{n=r(e,t)}catch(b){throw e.addToError(b)}return n=!1!==n&&e.walk?e.walk(r):n})}},{key:"walkAtRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk(function(e,t){if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("atrule"===e.type)return r(e,t)}))}},{key:"walkComments",value:function(n){return this.walk(function(e,t){if("comment"===e.type)return n(e,t)})}},{key:"walkDecls",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk(function(e,t){if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("decl"===e.type)return r(e,t)}))}},{key:"walkRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk(function(e,t){if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("rule"===e.type)return r(e,t)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}])).registerParse=function(e){l=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){f=e},n.registerRoot=function(e){t=e},((F1=n)["default"]=n).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,f.prototype):"rule"===e.type?Object.setPrototypeOf(e,c.prototype):"decl"===e.type?Object.setPrototypeOf(e,p.prototype):"comment"===e.type?Object.setPrototypeOf(e,m.prototype):"root"===e.type&&Object.setPrototypeOf(e,t.prototype),e[h]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),F1;function g(){return b(this,g),v(this,g,arguments)}}function Ok(){var t,n,e;return z1||(z1=1,e=Ck(),U(r,e),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(j1=e)["default"]=e),j1;function r(e){return b(this,r),(e=v(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function Rk(){if(W1)return B1;W1=1;var t={};return B1=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function xk(){var r;return q1||(q1=1,r=k(function r(e){var t,n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};for(t in b(this,r),this.type="warning",this.text=e,n.node&&n.node.source&&(e=n.node.rangeBy(n),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),n)this[t]=n[t]},[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),(H1=r)["default"]=r),H1}function Ik(){var n,r;return G1||(G1=1,n=xk(),r=k(function r(e,t,n){b(this,r),this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0},[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new n(e,t));return this.messages.push(e),e}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),(V1=r)["default"]=r),V1}function Tk(){var e,t;return K1||(K1=1,e=Ck(),U(r,e),t=k(r,[{key:"append",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return G(r,"append",this,3)(t)}},{key:"prepend",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return G(r,"prepend",this,3)(t)}}]),(Z1=t)["default"]=t,e.registerAtRule(t)),Z1;function r(e){return b(this,r),(e=v(this,r,[e])).type="atrule",e}}function Mk(){var t,n,e,r;return X1||(X1=1,e=Ck(),U(o,e),(r=k(o,[{key:"normalize",value:function(e,t,n){e=G(o,"normalize",this,3)([e]);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var r,i=Me(e);try{for(i.s();!(r=i.n()).done;)r.value.raws.before=t.raws.before}catch(Pe){i.e(Pe)}finally{i.f()}}return e}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),G(o,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},Y1=r,e.registerRoot(r["default"]=r)),Y1;function o(e){return b(this,o),(e=v(this,o,[e])).type="root",e.nodes||(e.nodes=[]),e}}function Ak(){var t;return ek||(ek=1,(Q1=t={comma:function(e){return t.split(e,[","],!0)},space:function(e){return t.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",a=!1,s=0,u=!1,l="",c=!1,f=Me(e);try{for(f.s();!(r=f.n()).done;){var d=r.value;c?c=!1:"\\"===d?c=!0:u?d===l&&(u=!1):'"'===d||"'"===d?(u=!0,l=d):"("===d?s+=1:")"===d?0<s&&--s:0===s&&t.includes(d)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=d}}catch(Pe){f.e(Pe)}finally{f.f()}return!n&&""===o||i.push(o.trim()),i}})["default"]=t),Q1}function Pk(){var e,t,n;return nk||(nk=1,e=Ck(),t=Ak(),U(r,e),n=k(r,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}}]),(tk=n)["default"]=n,e.registerRule(n)),tk;function r(e){return b(this,r),(e=v(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function Lk(){if(ik)return rk;ik=1;var p=bk(),e=function(){if($1)return J1;$1=1;var w="'".charCodeAt(0),b='"'.charCodeAt(0),k="\\".charCodeAt(0),S="/".charCodeAt(0),_="\n".charCodeAt(0),E=" ".charCodeAt(0),C="\f".charCodeAt(0),O="\t".charCodeAt(0),R="\r".charCodeAt(0),x="[".charCodeAt(0),I="]".charCodeAt(0),T="(".charCodeAt(0),M=")".charCodeAt(0),A="{".charCodeAt(0),P="}".charCodeAt(0),L=";".charCodeAt(0),D="*".charCodeAt(0),N=":".charCodeAt(0),F="@".charCodeAt(0),U=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,z=/.[\r\n"'(/\\]/,B=/[\da-f]/i;return J1=function(t){var r,i,o,a,s,u,l,c,f,e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},d=t.css.valueOf(),h=e.ignoreErrors,p=d.length,m=0,g=[],v=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&p<=m},nextToken:function(e){if(v.length)return v.pop();if(!(p<=m)){var t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m)){case _:case E:case O:case R:case C:for(i=m;i+=1,(r=d.charCodeAt(i))===E||r===_||r===O||r===R||r===C;);f=["space",d.slice(m,i)],m=i-1;break;case x:case I:case A:case P:case N:case L:case M:var n=String.fromCharCode(r);f=[n,n,m];break;case T:if(l=g.length?g.pop()[1]:"",c=d.charCodeAt(m+1),"url"===l&&c!==w&&c!==b&&c!==E&&c!==_&&c!==O&&c!==C&&c!==R){i=m;do{if(s=!1,-1===(i=d.indexOf(")",i+1))){if(h||t){i=m;break}y("bracket")}for(u=i;d.charCodeAt(u-1)===k;)--u,s=!s}while(s);f=["brackets",d.slice(m,i+1),m,i],m=i}else i=d.indexOf(")",m+1),l=d.slice(m,i+1),-1===i||z.test(l)?f=["(","(",m]:(f=["brackets",l,m,i],m=i);break;case w:case b:o=r===w?"'":'"',i=m;do{if(s=!1,-1===(i=d.indexOf(o,i+1))){if(h||t){i=m+1;break}y("string")}for(u=i;d.charCodeAt(u-1)===k;)--u,s=!s}while(s);f=["string",d.slice(m,i+1),m,i],m=i;break;case F:U.lastIndex=m+1,U.test(d),i=0===U.lastIndex?d.length-1:U.lastIndex-2,f=["at-word",d.slice(m,i+1),m,i],m=i;break;case k:for(i=m,a=!0;d.charCodeAt(i+1)===k;)i+=1,a=!a;if(r=d.charCodeAt(i+1),a&&r!==S&&r!==E&&r!==_&&r!==O&&r!==R&&r!==C&&(i+=1,B.test(d.charAt(i)))){for(;B.test(d.charAt(i+1));)i+=1;d.charCodeAt(i+1)===E&&(i+=1)}f=["word",d.slice(m,i+1),m,i],m=i;break;default:m=(r===S&&d.charCodeAt(m+1)===D?(0===(i=d.indexOf("*/",m+2)+1)&&(h||t?i=d.length:y("comment")),f=["comment",d.slice(m,i+1),m,i]):(j.lastIndex=m+1,j.test(d),i=0===j.lastIndex?d.length-1:j.lastIndex-2,f=["word",d.slice(m,i+1),m,i],g.push(f)),i)}return m++,f}},position:function(){return m}}}}(),n=Ek(),l=Tk(),t=Mk(),r=Pk(),d={empty:!0,space:!0};return rk=k(function N(e){b(this,N),this.input=e,this.root=new t,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new l;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&0<u.length?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(0<s.length){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(s.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;0<=i&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i,o=0,a=Me(e.entries());try{for(a.s();!(i=a.n()).done;){var s=De(i.value,2),u=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return u}this.doubleColon(t)}r=t}}catch(Pe){a.e(Pe)}finally{a.f()}return!1}},{key:"comment",value:function(e){var t=new n,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}},{key:"createTokenizer",value:function(){this.tokenizer=e(this.input)}},{key:"decl",value:function(e,t){var n=new p;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;0<=t;t--){var n=e[t],n=n[3]||n[2];if(n)return n}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var u=e.length-1;0<=u;u--){if("!important"===(r=e[u])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,u);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),f="",d=u;0<d;d--){var h=c[d][0];if(0===f.trim().indexOf("!")&&"space"!==h)break;f=c.pop()[1]+f}0===f.trim().indexOf("!")&&(n.important=!0,n.raws.important=f,e=c)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new r;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t,n=!1,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],u=e;u;){if(t=u[0],s.push(u),"("===t||"["===t)i=i||u,o.push("("===t?")":"]");else if(a&&r&&"{"===t)i=i||u,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(s,a);break}if("{"===t)return void this.rule(s);if("}"===t){this.tokenizer.back(s.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,s,u=n.length,l="",c=!0,f=0;f<u;f+=1)"space"===(a=(i=n[f])[0])&&f===u-1&&!r||"comment"===a&&(a=n[f-1]?n[f-1][0]:"empty",o=n[f+1]?n[f+1][0]:"empty",d[a]||d[o]||","===l.slice(-1))?c=!1:l+=i[1];c||(s=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:s,value:l}),e[t]=l}},{key:"rule",value:function(e){e.pop();var t=new r;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}])}function Dk(){var e,n,r;return ak||(ak=1,e=Ck(),n=Lk(),r=Sk(),ok=t,e.registerParse(t["default"]=t)),ok;function t(e,t){e=new r(e,t),e=new n(e);try{e.parse()}catch(L){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===L.name&&t&&t.from&&(/\.scss$/i.test(t.from)?L.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?L.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(L.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),L}return e.root}}function Nk(){var f,a,n,r,u,s,i,c,l,e,o,d,h,p,t,m;return uk||(uk=1,t=gk(),f=t.isClean,a=t.my,n=_k(),r=yk(),u=Ck(),s=Ok(),i=Rk(),c=Ik(),l=Dk(),e=Mk(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0},p={},(t=k(function s(e,t,n){var r,i=this;if(b(this,s),this.stringified=!1,this.processed=!1,"object"!==S(t)||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof s||t instanceof c)r=w(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var o=l;n.syntax&&(o=n.syntax.parse),(o=n.parser?n.parser:o).parse&&(o=o.parse);try{r=o(t,n)}catch(X){this.processed=!0,this.error=X}r&&!r[a]&&u.rebuild(r)}else r=w(t);this.result=new c(e,r,n),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===S(e)&&e.prepare?Ae(Ae({},e),e.prepare(i.result)):e})},[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n,r,i,o,a,s=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?s.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=s.postcssPlugin,r=s.postcssVersion,i=this.result.processor.version,o=r.split("."),a=i.split("."),o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=s.postcssPlugin,e.setMessage())}catch(Pe){console&&console.error&&console.error(Pe)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};var e,t=function(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])},n=Me(this.plugins);try{for(n.s();!(e=n.n()).done;){var i=e.value;if("object"===S(i))for(var o in i){if(!d[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event ".concat(o," in ").concat(i.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[o])if("object"===S(i[o]))for(var a in i[o])t(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&t(i,o,i[o])}}}catch(Pe){n.e(Pe)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(m=P(W().m(function e(){var t,i,n,r,o,a,s,u,l,c=this;return W().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(s=this.plugins[t],g(s=this.runOnRoot(s)))return e.p=2,e.n=3,s;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,s=e.v,this.handleError(s);case 5:t++,e.n=1;break;case 6:if(this.prepareVisitors(),!this.hasListener){e.n=21;break}i=this.result.root;case 7:if(i[f]){e.n=14;break}i[f]=!0,n=[y(i)];case 8:if(0<n.length){if(g(u=this.visitTick(n)))return e.p=9,e.n=10,u;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,u=e.v,l=n[n.length-1].node,this.handleError(u,l);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Me(this.listeners.OnceExit),e.p=15,a=W().m(function d(){var t,n,r;return W().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=De(o.value,2),r=n[0],t=n[1],c.result.lastPlugin=r,e.p=1,"document"===i.type)return n=i.nodes.map(function(e){return t(e,c.helpers)}),e.n=2,Promise.all(n);e.n=3;break;case 2:e.n=4;break;case 3:return e.n=4,t(i,c.helpers);case 4:e.n=6;break;case 5:throw e.p=5,r=e.v,c.handleError(r);case 6:return e.a(2)}},d,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(q(a()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,l=e.v,r.e(l);case 20:return e.p=20,r.f(),e.f(20);case 21:return this.processed=!0,e.a(2,this.stringify())}},e,this,[[15,19,20,21],[9,11],[2,4]])})),function(){return m.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===S(t)&&t.Once?"document"===this.result.root.type?g((e=this.result.root.nodes.map(function(e){return t.Once(e,n.helpers)}))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(X){throw this.handleError(X)}}},{key:"stringify",value:function(){if(this.error)throw this.error;var e,t;return this.stringified||(this.stringified=!0,this.sync(),t=this.result.opts,e=r,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new n(e,this.result.root,this.result.opts).generate(),this.result.css=t[0],this.result.map=t[1]),this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();var e,t=Me(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(g(this.runOnRoot(n)))throw this.getAsyncError()}}catch(Pe){t.e(Pe)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[f];)r[f]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Me(r.nodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}}catch(Pe){o.e(Pe)}finally{o.f()}}else this.visitSync(this.listeners.OnceExit,r)}}return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n,r=Me(e);try{for(r.s();!(n=r.n()).done;){var i=De(n.value,2),o=i[0],a=i[1],s=(this.result.lastPlugin=o,void 0);try{s=a(t,this.helpers)}catch(u){throw this.handleError(u,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(s))throw this.getAsyncError()}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"visitTick",value:function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var i=De(r[t.visitorIndex],2),o=i[0],i=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return i(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(0!==t.iterator){for(var a,s=t.iterator;a=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!a[f])return a[f]=!0,void e.push(y(a));t.iterator=0,delete n.indexes[s]}for(var u=t.events;t.eventIndex<u.length;){var l=u[t.eventIndex];if(t.eventIndex+=1,0===l)return void(n.nodes&&n.nodes.length&&(n[f]=!0,t.iterator=n.getIterator()));if(this.listeners[l])return void(t.visitors=this.listeners[l])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[f]=!0;var n,r=Me(v(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[f]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}])).registerPostcss=function(e){p=e},sk=t,e.registerLazyResult(t["default"]=t),s.registerLazyResult(t)),sk;function g(e){return"object"===S(e)&&"function"==typeof e.then}function v(e){var t=!1,n=o[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[f]=!1,e.nodes&&e.nodes.forEach(w),e}}function Fk(){var n,r,t,e,i,o,a,s,u,l,c;return dk||(dk=1,ck||(ck=1,o=_k(),a=yk(),s=Rk(),u=Dk(),l=Ik(),c=k(function c(e,t,n){b(this,c),t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var e=a,r=(this.result=new l(this._processor,void 0,this._opts),this.result.css=t,this),n=(Object.defineProperty(this.result,"root",{get:function(){return r.root}}),new o(e,void 0,this._opts,t));n.isMap()?(t=(e=De(n.generate(),2))[0],e=e[1],t&&(this.result.css=t),e&&(this.result.map=e)):(n.clearAnnotation(),this.result.css=n.css)},[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this._opts||s("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=u;try{e=t(this._css,this._opts)}catch(X){this.error=X}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(lk=c)["default"]=c),n=lk,r=Nk(),t=Ok(),e=Mk(),i=k(function t(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:[];b(this,t),this.version="8.4.38",this.plugins=this.normalize(e)},[{key:"normalize",value:function(e){var t,n=[],r=Me(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===S(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===S(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==S(i)||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(Pe){r.e(Pe)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?r:n)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(fk=i)["default"]=i,e.registerProcessor(i),t.registerProcessor(i)),fk}MO||(MO=1,Nr=v1(),Uk=bk(),Df=Nk(),_E=Ck(),jk=Fk(),$O=yk(),qO||(qO=1,Vk=bk(),Gk=kk(),Jk=Ek(),$k=Tk(),Zk=Sk(),Kk=Mk(),Yk=Pk(),(hk=Xk)["default"]=Xk),i=hk,zk=Ok(),Ie=xk(),Bk=Ek(),Wk=Tk(),ov=Ik(),s=Sk(),t=Dk(),Fe=Ak(),Hk=Pk(),qk=Mk(),e=wk(),Qk.plugin=function(t,n){var e,r=!1;function i(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");var e=n.apply(void 0,arguments);return e.postcssPlugin=t,e.postcssVersion=(new jk).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return Qk([i(n)]).process(e,t)},i},Qk.stringify=$O,Qk.parse=t,Qk.fromJSON=i,Qk.list=Fe,Qk.comment=function(e){return new Bk(e)},Qk.atRule=function(e){return new Wk(e)},Qk.decl=function(e){return new Uk(e)},Qk.rule=function(e){return new Hk(e)},Qk.root=function(e){return new qk(e)},Qk.document=function(e){return new zk(e)},Qk.CssSyntaxError=Nr,Qk.Declaration=Uk,Qk.Container=_E,Qk.Processor=jk,Qk.Document=zk,Qk.Comment=Bk,Qk.Warning=Ie,Qk.AtRule=Wk,Qk.Result=ov,Qk.Input=s,Qk.Rule=Hk,Qk.Root=qk,Qk.Node=e,Df.registerPostcss(Qk),(pk=Qk)["default"]=Qk);var Uk,jk,zk,Bk,Wk,Hk,qk,Vk,Gk,Jk,$k,Zk,Kk,Yk,at=(Hr=pk)&&Hr.__esModule&&Object.prototype.hasOwnProperty.call(Hr,"default")?Hr["default"]:Hr;function Xk(e,t){if(Array.isArray(e))return e.map(function(e){return Xk(e)});var n,r=e.inputs,i=B(e,w0);if(r){t=[];var o,a=Me(r);try{for(a.s();!(o=a.n()).done;){var s=Ae(Ae({},o.value),{},{__proto__:Zk.prototype});s.map&&(s.map=Ae(Ae({},s.map),{},{__proto__:Gk.prototype})),t.push(s)}}catch(Pe){a.e(Pe)}finally{a.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return Xk(e,t)})),i.source&&(n=(r=i.source).inputId,r=B(r,b0),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new Kk(i);if("decl"===i.type)return new Vk(i);if("rule"===i.type)return new Yk(i);if("comment"===i.type)return new Jk(i);if("atrule"===i.type)return new $k(i);throw new Error("Unknown node type: "+e.type)}function Qk(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new jk(t)}at.stringify;var eS=k(oS,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(e){if(e instanceof oS&&e.ownerDocument===this.ownerDocument){if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),tS={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},nS={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},rS={},iS={};function oS(){b(this,oS),u1(this,"parentElement",null),u1(this,"parentNode",null),u1(this,"ownerDocument"),u1(this,"firstChild",null),u1(this,"lastChild",null),u1(this,"previousSibling",null),u1(this,"nextSibling",null),u1(this,"ELEMENT_NODE",1),u1(this,"TEXT_NODE",3),u1(this,"nodeType"),u1(this,"nodeName"),u1(this,"RRNodeType")}function aS(e){if(rS[e])return rS[e];var t=globalThis[e],n=t.prototype,r=e in tS?tS[e]:void 0,r=Boolean(r&&r.every(function(e){return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),i=e in nS?nS[e]:void 0,i=Boolean(i&&i.every(function(e){return"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))}));if(r&&i&&!globalThis.Zone)return rS[e]=t.prototype,t.prototype;try{var o,a,s=document.createElement("iframe"),u=(s.style.display="none",document.body.appendChild(s),s.contentWindow);return u?(o=u[e].prototype)?((a=navigator.userAgent).includes("Safari")&&!a.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),iS[e]=function(){return s.remove()}):s.remove(),rS[e]=o):(s.remove(),n):t.prototype}catch(F){return n}}var sS={};function uS(e,t,n){var r="".concat(e,".").concat(String(n));return sS[r]?sS[r].call(t):(e=aS(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(sS[r]=e).call(t):t[n])}var lS={};function cS(e,t,n){var r="".concat(e,".").concat(String(n));return lS[r]?lS[r].bind(t):"function"!=typeof(e=aS(e)[n])?t[n]:(lS[r]=e).bind(t)}function fS(){var e;return[aS("MutationObserver").constructor,null!=(e=iS.MutationObserver)?e:function(){}]}var dS=Date.now;function hS(e,t,n){try{var r,i;return t in e?("function"==typeof(i=n(r=e[t]))&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}):function(){}}catch(Le){return function(){}}}var pS={ownerDocument:function(e){return uS("Node",e,"ownerDocument")},childNodes:function(e){return uS("Node",e,"childNodes")},parentNode:function(e){return uS("Node",e,"parentNode")},parentElement:function(e){return uS("Node",e,"parentElement")},textContent:function(e){return uS("Node",e,"textContent")},contains:function(e,t){return cS("Node",e,"contains")(t)},getRootNode:function(e){return cS("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?uS("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?uS("Element",e,"shadowRoot"):null},querySelector:function(e,t){return uS("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return uS("Element",e,"querySelectorAll")(t)},nowTimestamp:dS=/[1-9][0-9]{12}/.test(Date.now().toString())?dS:function(){return(new Date).getTime()},mutationObserverCtor:fS,patch:hS};function mS(e,t,n){var r=2<arguments.length&&n!==undefined?n:document,i={capture:!0,passive:!0};return r.addEventListener(e,t,i),function(){return r.removeEventListener(e,t,i)}}var gS="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",l={map:{},getId:function(){return console.error(gS),-1},getNode:function(){return console.error(gS),null},removeNodeFromMap:function(){console.error(gS)},has:function(){return console.error(gS),!1},reset:function(){console.error(gS)}};function vS(a,s,e){var u=2<arguments.length&&e!==undefined?e:{},l=null,c=0;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Date.now(),i=(c||!1!==u.leading||(c=r),s-(r-c)),o=this;i<=0||s<i?(l&&(clearTimeout(l),l=null),c=r,a.apply(o,t)):l||!1===u.trailing||(l=setTimeout(function(){c=!1===u.leading?0:Date.now(),l=null,a.apply(o,t)},i))}}function yS(e,t,n,r,i){var i=4<arguments.length&&i!==undefined?i:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return yS(e,t,o||{},!0)}}function wS(e){var t,n=e.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:n.documentElement.scrollLeft||(null==n?void 0:n.body)&&(null==(t=pS.parentElement(n.body))?void 0:t.scrollLeft)||(null==(t=null==n?void 0:n.body)?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==n?void 0:n.documentElement.scrollTop)||(null==n?void 0:n.body)&&(null==(t=pS.parentElement(n.body))?void 0:t.scrollTop)||(null==(e=null==n?void 0:n.body)?void 0:e.scrollTop)||0}}function bS(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function kS(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function SS(e){return e?e.nodeType===e.ELEMENT_NODE?e:pS.parentElement(e):null}function _S(e,t,n,r){if(e){e=SS(e);if(e){try{if("string"==typeof t){if(e.classList.contains(t))return 1;if(r&&null!==e.closest("."+t))return 1}else if(cw(e,t,r))return 1}catch(Le){}if(n){if(e.matches(n))return 1;if(r&&null!==e.closest(n))return 1}}}}function ES(e,t,n){return"TITLE"===e.tagName&&n.headTitleMutations||-2===t.getId(e)}function CS(e){return Boolean(e.changedTouches)}function OS(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function RS(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function xS(e){return e&&(e instanceof eS&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(pS.shadowRoot(e)))}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(l,{get:function(e,t,n){return"map"===t&&console.error(gS),Reflect.get(e,t,n)}});var IS=k(function u(){b(this,u),A(this,"id",1),A(this,"styleIDMap",new WeakMap),A(this,"idStyleMap",new Map)},[{key:"getId",value:function(e){return null!=(e=this.styleIDMap.get(e))?e:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(t=void 0===t?this.id++:t,this.styleIDMap.set(e,t),this.idStyleMap.set(t,e),t)}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]);function TS(e){var t,n=null;return n="getRootNode"in e&&(null==(t=pS.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&pS.host(pS.getRootNode(e))?pS.host(pS.getRootNode(e)):n}function MS(e){var n,t=pS.ownerDocument(e);return t&&(pS.contains(t,e)||(n=e,!!(t=pS.ownerDocument(n))&&(e=function(){for(var e,t=n;e=TS(t);)t=e;return t}(),pS.contains(t,e))))}(a={})[a.DomContentLoaded=0]="DomContentLoaded",a[a.Load=1]="Load",a[a.FullSnapshot=2]="FullSnapshot",a[a.IncrementalSnapshot=3]="IncrementalSnapshot",a[a.Meta=4]="Meta",a[a.Custom=5]="Custom",a[a.Plugin=6]="Plugin",a[a.Asset=7]="Asset";var AS=a,PS=((n=PS||{})[n.Mutation=0]="Mutation",n[n.MouseMove=1]="MouseMove",n[n.MouseInteraction=2]="MouseInteraction",n[n.Scroll=3]="Scroll",n[n.ViewportResize=4]="ViewportResize",n[n.Input=5]="Input",n[n.TouchMove=6]="TouchMove",n[n.MediaInteraction=7]="MediaInteraction",n[n.StyleSheetRule=8]="StyleSheetRule",n[n.CanvasMutation=9]="CanvasMutation",n[n.Font=10]="Font",n[n.Log=11]="Log",n[n.Drag=12]="Drag",n[n.StyleDeclaration=13]="StyleDeclaration",n[n.Selection=14]="Selection",n[n.AdoptedStyleSheet=15]="AdoptedStyleSheet",n[n.CustomElement=16]="CustomElement",n),LS=((MO=LS||{})[MO.MouseUp=0]="MouseUp",MO[MO.MouseDown=1]="MouseDown",MO[MO.Click=2]="Click",MO[MO.ContextMenu=3]="ContextMenu",MO[MO.DblClick=4]="DblClick",MO[MO.Focus=5]="Focus",MO[MO.Blur=6]="Blur",MO[MO.TouchStart=7]="TouchStart",MO[MO.TouchMove_Departed=8]="TouchMove_Departed",MO[MO.TouchEnd=9]="TouchEnd",MO[MO.TouchCancel=10]="TouchCancel",MO),DS=((qO=DS||{})[qO.Mouse=0]="Mouse",qO[qO.Pen=1]="Pen",qO[qO.Touch=2]="Touch",qO),NS=(($O={})[$O["2D"]=0]="2D",$O[$O.WebGL=1]="WebGL",$O[$O.WebGL2=2]="WebGL2",$O),FS=((t=FS||{})[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t),US=((i={})[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i);function jS(e){return"__ln"in e}var zS,BS=k(function u(){b(this,u),A(this,"length",0),A(this,"head",null),A(this,"tail",null)},[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t,n={value:e,previous:null,next:null};e.__ln=n,e.previousSibling&&jS(e.previousSibling)?(t=e.previousSibling.__ln.next,n.next=t,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,t&&(t.previous=n)):e.nextSibling&&jS(e.nextSibling)&&e.nextSibling.__ln.previous?(t=e.nextSibling.__ln.previous,n.previous=t,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,t&&(t.next=n)):(this.head&&(this.head.previous=n),n.next=this.head,this.head=n),null===n.next&&(this.tail=n),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),WS=function(e,t){return"".concat(e,"@").concat(t)},HS=k(function u(){var w=this;b(this,u),A(this,"frozen",!1),A(this,"locked",!1),A(this,"texts",[]),A(this,"attributes",[]),A(this,"attributeMap",new WeakMap),A(this,"removes",[]),A(this,"mapRemoves",[]),A(this,"movedMap",{}),A(this,"addedSet",new Set),A(this,"movedSet",new Set),A(this,"droppedSet",new Set),A(this,"removesSubTreeCache",new Set),A(this,"mutationCb"),A(this,"blockClass"),A(this,"blockSelector"),A(this,"maskTextClass"),A(this,"maskTextSelector"),A(this,"inlineStylesheet"),A(this,"maskInputOptions"),A(this,"maskTextFn"),A(this,"maskInputFn"),A(this,"keepIframeSrcFn"),A(this,"recordCanvas"),A(this,"inlineImages"),A(this,"slimDOMOptions"),A(this,"dataURLOptions"),A(this,"doc"),A(this,"mirror"),A(this,"iframeManager"),A(this,"stylesheetManager"),A(this,"shadowDomManager"),A(this,"canvasManager"),A(this,"processedNodeManager"),A(this,"unattachedDoc"),A(this,"processMutations",function(e){e.forEach(w.processMutation),w.emit()}),A(this,"emit",function(){if(!w.frozen&&!w.locked){for(var i=[],o=new Set,a=new BS,s=function(e){for(var t=e,n=-2;-2===n;)n=(t=t&&t.nextSibling)&&w.mirror.getId(t);return n},e=function(t){var e=pS.parentNode(t);if(e&&MS(t)){var n=!1;if(t.nodeType===Node.TEXT_NODE){var r=e.tagName;if("TEXTAREA"===r)return;"STYLE"===r&&w.addedSet.has(e)&&(n=!0)}r=F0(e)?w.mirror.getId(TS(t)):w.mirror.getId(e),e=s(t);if(-1===r||-1===e)return a.addNode(t);n=mw(t,{doc:w.doc,mirror:w.mirror,blockClass:w.blockClass,blockSelector:w.blockSelector,maskTextClass:w.maskTextClass,maskTextSelector:w.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:w.inlineStylesheet,maskInputOptions:w.maskInputOptions,maskTextFn:w.maskTextFn,maskInputFn:w.maskInputFn,slimDOMOptions:w.slimDOMOptions,dataURLOptions:w.dataURLOptions,recordCanvas:w.recordCanvas,inlineImages:w.inlineImages,onSerialize:function(e){OS(e,w.mirror)&&w.iframeManager.addIframe(e),RS(e,w.mirror)&&w.stylesheetManager.trackLinkElement(e),xS(t)&&w.shadowDomManager.addShadowRoot(pS.shadowRoot(t),w.doc)},onIframeLoad:function(e,t){w.iframeManager.attachIframe(e,t),w.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,t){w.stylesheetManager.attachLinkElement(e,t)},cssCaptured:n});n&&(i.push({parentId:r,nextId:e,node:n}),o.add(n.id))}};w.mapRemoves.length;)w.mirror.removeNodeFromMap(w.mapRemoves.shift());var t,n=Me(w.movedSet);try{for(n.s();!(t=n.n()).done;){var r=t.value;VS(w.removesSubTreeCache,r,w.mirror)&&!w.movedSet.has(pS.parentNode(r))||e(r)}}catch(Pe){n.e(Pe)}finally{n.f()}var u,l=Me(w.addedSet);try{for(l.s();!(u=l.n()).done;){var c=u.value;!GS(w.droppedSet,c)&&!VS(w.removesSubTreeCache,c,w.mirror)||GS(w.movedSet,c)?e(c):w.droppedSet.add(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(var f=null;a.length;){var d,h,p=null;if(!(p=f&&(d=w.mirror.getId(pS.parentNode(f.value)),h=s(f.value),-1!==d)&&-1!==h?f:p))for(var m=a.tail;m;){var g=m,m=m.previous;if(g){var v=w.mirror.getId(pS.parentNode(g.value));if(-1!==s(g.value)){if(-1!==v){p=g;break}v=g.value,v=pS.parentNode(v);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){v=pS.host(v);if(-1!==w.mirror.getId(v)){p=g;break}}}}}if(!p){for(;a.head;)a.removeNode(a.head.value);break}f=p.previous,a.removeNode(p.value),e(p.value)}var y={texts:w.texts.map(function(e){var t=e.node,n=pS.parentNode(t);return n&&"TEXTAREA"===n.tagName&&w.genTextAreaValueMutation(n),{id:w.mirror.getId(t),value:e.value}}).filter(function(e){return!o.has(e.id)}).filter(function(e){return w.mirror.has(e.id)}),attributes:w.attributes.map(function(e){var t,n,r=e.attributes;return"string"==typeof r.style&&(t=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles),t.length<r.style.length)&&(t+n).split("var(").length===r.style.split("var(").length&&(r.style=e.styleDiff),{id:w.mirror.getId(e.node),attributes:r}}).filter(function(e){return!o.has(e.id)}).filter(function(e){return w.mirror.has(e.id)}),removes:w.removes,adds:i};(y.texts.length||y.attributes.length||y.removes.length||y.adds.length)&&(w.texts=[],w.attributes=[],w.attributeMap=new WeakMap,w.removes=[],w.addedSet=new Set,w.movedSet=new Set,w.droppedSet=new Set,w.removesSubTreeCache=new Set,w.movedMap={},w.mutationCb(y))}}),A(this,"genTextAreaValueMutation",function(e){var t=w.attributeMap.get(e),n=(t||(w.attributes.push(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}}),w.attributeMap.set(e,t)),Array.from(pS.childNodes(e),function(e){return pS.textContent(e)||""}).join(""));t.attributes.value=W0({element:e,maskInputOptions:w.maskInputOptions,tagName:e.tagName,type:q0(e),value:n,maskInputFn:w.maskInputFn})}),A(this,"processMutation",function(a){if(!ES(a.target,w.mirror,w.slimDOMOptions))switch(a.type){case"characterData":var e=pS.textContent(a.target);_S(a.target,w.blockClass,w.blockSelector,!1)||e===a.oldValue||w.texts.push({value:fw(a.target,w.maskTextClass,w.maskTextSelector,!0)&&e?w.maskTextFn?w.maskTextFn(e,SS(a.target)):e.replace(/[\S]/g,"*"):e,node:a.target});break;case"attributes":var t,n=a.target,e=a.attributeName,s=a.target.getAttribute(e);if("value"===e&&(t=q0(n),s=W0({element:n,maskInputOptions:w.maskInputOptions,tagName:n.tagName,type:t,value:s,maskInputFn:w.maskInputFn})),!_S(a.target,w.blockClass,w.blockSelector,!1)&&s!==a.oldValue){var r=w.attributeMap.get(a.target);if("IFRAME"===n.tagName&&"src"===e&&!w.keepIframeSrcFn(s)){if(n.contentDocument)return;e="rr_src"}if(r||(r={node:a.target,attributes:{},styleDiff:{},_unchangedStyles:{}},w.attributes.push(r),w.attributeMap.set(a.target,r)),"type"===e&&"INPUT"===n.tagName&&"password"===(a.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!lw(n.tagName,e))if(r.attributes[e]=uw(w.doc,H0(n.tagName),H0(e),s),"style"===e){if(!w.unattachedDoc)try{w.unattachedDoc=document.implementation.createHTMLDocument()}catch(W){w.unattachedDoc=w.doc}var i=w.unattachedDoc.createElement("span");a.oldValue&&i.setAttribute("style",a.oldValue);for(var o=0,u=Array.from(n.style);o<u.length;o++){var l=u[o],c=n.style.getPropertyValue(l),f=n.style.getPropertyPriority(l);c!==i.style.getPropertyValue(l)||f!==i.style.getPropertyPriority(l)?r.styleDiff[l]=""===f?c:[c,f]:r._unchangedStyles[l]=[c,f]}for(var d=0,h=Array.from(i.style);d<h.length;d++){var p=h[d];""===n.style.getPropertyValue(p)&&(r.styleDiff[p]=!1)}}else"open"===e&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal")}break;case"childList":return _S(a.target,w.blockClass,w.blockSelector,!0)?void 0:"TEXTAREA"===a.target.tagName?void w.genTextAreaValueMutation(a.target):(a.addedNodes.forEach(function(e){return w.genAdds(e,a.target)}),void a.removedNodes.forEach(function(e){var t=w.mirror.getId(e),n=F0(a.target)?w.mirror.getId(pS.host(a.target)):w.mirror.getId(a.target);if(!_S(a.target,w.blockClass,w.blockSelector,!1)&&!ES(e,w.mirror,w.slimDOMOptions)&&-1!==w.mirror.getId(e)){if(w.addedSet.has(e))qS(w.addedSet,e),w.droppedSet.add(e);else if(!(w.addedSet.has(a.target)&&-1===t||function s(e,t){var n;return!F0(e)&&(n=t.getId(e),!t.has(n)||(!(n=pS.parentNode(e))||n.nodeType!==e.DOCUMENT_NODE)&&(!n||s(n,t)))}(a.target,w.mirror)))if(w.movedSet.has(e)&&w.movedMap[WS(t,n)])qS(w.movedSet,e);else{w.removes.push({parentId:n,id:t,isShadow:!(!F0(a.target)||!U0(a.target))||void 0});for(var r=w.removesSubTreeCache,i=[e];i.length;){var o=i.pop();r.has(o)||(r.add(o),pS.childNodes(o).forEach(function(e){return i.push(e)}))}}w.mapRemoves.push(e)}}))}}),A(this,"genAdds",function(t,e){if(!w.processedNodeManager.inOtherBuffer(t,w)&&!w.addedSet.has(t)&&!w.movedSet.has(t)){if(w.mirror.hasNode(t)){if(ES(t,w.mirror,w.slimDOMOptions))return;w.movedSet.add(t);var n=null;(n=e&&w.mirror.hasNode(e)?w.mirror.getId(e):n)&&-1!==n&&(w.movedMap[WS(w.mirror.getId(t),n)]=!0)}else w.addedSet.add(t),w.droppedSet["delete"](t);_S(t,w.blockClass,w.blockSelector,!1)||(pS.childNodes(t).forEach(function(e){return w.genAdds(e)}),xS(t)&&pS.childNodes(pS.shadowRoot(t)).forEach(function(e){w.processedNodeManager.add(e,w),w.genAdds(e,t)}))}})},[{key:"init",value:function(t){var n=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(e){n[e]=t[e]})}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]);function qS(t,e){t["delete"](e),pS.childNodes(e).forEach(function(e){return qS(t,e)})}function VS(e,t){return 0!==e.size&&(e=e,t=pS.parentNode(t))&&e.has(t)}function GS(e,t){return 0!==e.size&&function P(e,t){t=pS.parentNode(t);return!!t&&(!!e.has(t)||P(e,t))}(e,t)}var JS=function(e){return zS?function(){try{return e.apply(void 0,arguments)}catch(X){if(!zS||!0!==zS(X))throw X}}:e},$S=[];function ZS(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(P){}return e&&e.target}function KS(e,t){var n=new HS,e=($S.push(n),n.init(e),De(fS(),2)),r=e[0],e=e[1],n=new r(JS(n.processMutations.bind(n)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[n,e]}function YS(e){var t,r,a,s=e.mouseInteractionCb,i=e.doc,u=e.mirror,l=e.blockClass,c=e.blockSelector,e=e.sampling;return!1===e.mouseInteraction?function(){}:(t=!0===e.mouseInteraction||void 0===e.mouseInteraction?{}:e.mouseInteraction,r=[],a=null,Object.keys(LS).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==t[e]}).forEach(function(e){var o,t=H0(e),n=(o=e,function(e){var t=ZS(e);if(!_S(t,l,c,!0)){var n=null,r=o;if("pointerType"in e){switch(e.pointerType){case"mouse":n=DS.Mouse;break;case"touch":n=DS.Touch;break;case"pen":n=DS.Pen}n===DS.Touch?LS[o]===LS.MouseDown?r="TouchStart":LS[o]===LS.MouseUp&&(r="TouchEnd"):DS.Pen}else CS(e)&&(n=DS.Touch);null!==n?(a=n,(r.startsWith("Touch")&&n===DS.Touch||r.startsWith("Mouse")&&n===DS.Mouse)&&(n=null)):LS[o]===LS.Click&&(n=a,a=null);var i,e=CS(e)?e.changedTouches[0]:e;e&&(t=u.getId(t),i=e.clientX,e=e.clientY,JS(s)(Ae({type:LS[r],id:t,x:i,y:e},null!==n&&{pointerType:n})))}});if(window.PointerEvent)switch(LS[e]){case LS.MouseDown:case LS.MouseUp:t=t.replace("mouse","pointer");break;case LS.TouchStart:case LS.TouchEnd:return}r.push(mS(t,n,i))}),JS(function(){r.forEach(function(e){return e()})}))}function XS(e){var r=e.scrollCb,i=e.doc,o=e.mirror,a=e.blockClass,s=e.blockSelector,e=e.sampling;return mS("scroll",JS(vS(JS(function(e){var t,n,e=ZS(e);e&&!_S(e,a,s,!0)&&(t=o.getId(e),e===i&&i.defaultView?(n=wS(i.defaultView),r({id:t,x:n.left,y:n.top})):r({id:t,x:e.scrollLeft,y:e.scrollTop}))}),e.scroll||100)),i)}var QS=["INPUT","TEXTAREA","SELECT"],e_=new WeakMap;function t_(e){return function w(e,t){var n;return o_("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||o_("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||o_("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||o_("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?(n=Array.from(e.parentRule.cssRules).indexOf(e),t.unshift(n),w(e.parentRule,t)):(e.parentStyleSheet&&(n=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(n)),t)}(e,[])}function n_(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function r_(e,t){var n,r=e.mirror,i=e.stylesheetManager,o="#document"===t.nodeName?r.getId(t):r.getId(pS.host(t)),e="#document"===t.nodeName?null==(e=t.defaultView)?void 0:e.Document:null==(r=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:r.ShadowRoot,a=null!=e&&e.prototype?Object.getOwnPropertyDescriptor(null==e?void 0:e.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&e&&a?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:function(){var e;return null==(e=a.get)?void 0:e.call(this)},set:function(e){var t=null==(t=a.set)?void 0:t.call(this,e);if(null!==o&&-1!==o)try{i.adoptStyleSheets(e,o)}catch(n){}return t}}),JS(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})})):function(){}}function i_(e){var t,n,D,N,F,U,j,z,B,W,H,q,V,G,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},i=e.doc.defaultView;if(!i)return function(){};t=r,n=(r=e).mutationCb,D=r.mousemoveCb,N=r.mouseInteractionCb,F=r.scrollCb,U=r.viewportResizeCb,j=r.inputCb,z=r.mediaInteractionCb,B=r.styleSheetRuleCb,W=r.styleDeclarationCb,H=r.canvasMutationCb,q=r.fontCb,V=r.selectionCb,G=r.customElementCb,r.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},r.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),D.apply(void 0,arguments)},r.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),N.apply(void 0,arguments)},r.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),F.apply(void 0,arguments)},r.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),U.apply(void 0,arguments)},r.inputCb=function(){t.input&&t.input.apply(t,arguments),j.apply(void 0,arguments)},r.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),z.apply(void 0,arguments)},r.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),B.apply(void 0,arguments)},r.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),W.apply(void 0,arguments)},r.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),H.apply(void 0,arguments)},r.fontCb=function(){t.font&&t.font.apply(t,arguments),q.apply(void 0,arguments)},r.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),V.apply(void 0,arguments)},r.customElementCb=function(){t.customElement&&t.customElement.apply(t,arguments),G.apply(void 0,arguments)};var o,J,$,Z,K,Y,X,Q,a,ee,te,ne,re,s,u,ie,l,c,f,oe,d,h,p,m,ae,se,ue,le,g,v,y,ce,w,b,k,S,_,E,C,O,fe=function(){},de=(e.recordDOM&&(r=KS(e,e.doc),r=De(r,2),o=r[0],fe=r[1]),ue=(r=e).mousemoveCb,x=r.doc,le=r.mirror,!1===(R=r.sampling).mousemove?function(){}:(r="number"==typeof R.mousemove?R.mousemove:50,R="number"==typeof R.mousemoveCallback?R.mousemoveCallback:500,m=[],ae=vS(JS(function(e){var t=Date.now()-p;ue(m.map(function(e){return e.timeOffset-=t,e}),e),m=[],p=null}),R),R=JS(vS(JS(function(e){var t=ZS(e),n=CS(e)?e.changedTouches[0]:e,r=n.clientX,n=n.clientY;p=p||dS(),m.push({x:r,y:n,id:le.getId(t),timeOffset:dS()-p}),ae("undefined"!=typeof DragEvent&&e instanceof DragEvent?PS.Drag:e instanceof MouseEvent?PS.MouseMove:PS.TouchMove)}),r,{trailing:!1})),se=[mS("mousemove",R,x),mS("touchmove",R,x),mS("drag",R,x)],JS(function(){se.forEach(function(e){return e()})}))),he=YS(e),pe=XS(e),me=(r={win:i},oe=(R=e).viewportResizeCb,R=r.win,h=d=-1,mS("resize",JS(vS(JS(function(){var e=bS(),t=kS();d===e&&h===t||(oe({width:Number(t),height:Number(e)}),d=e,h=t)}),200)),R)),ge=(Q=(x=e).inputCb,a=x.doc,ee=x.mirror,te=x.blockClass,ne=x.blockSelector,re=x.ignoreClass,s=x.ignoreSelector,u=x.maskInputOptions,ie=x.maskInputFn,l=x.userTriggeredOnInput,c=("last"===x.sampling.input?["change"]:["input","change"]).map(function(e){return mS(e,JS(Se),a)}),(f=a.defaultView)?(x=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),r=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]],x&&x.set&&c.push.apply(c,Ne(r.map(function(e){return yS(e[0],e[1],{set:function(){JS(Se)({target:this,isTrusted:!1})}},!1,f)}))),JS(function(){c.forEach(function(e){return e()})})):function(){c.forEach(function(e){return e()})}),ve=(J=(R=e).mediaInteractionCb,$=R.blockClass,Z=R.blockSelector,K=R.mirror,Y=R.sampling,R=R.doc,x=JS(function(a){return vS(JS(function(e){var t,n,r,i,o,e=ZS(e);e&&!_S(e,$,Z,!0)&&(t=e.currentTime,n=e.volume,r=e.muted,i=e.playbackRate,o=e.loop,J({type:a,id:K.getId(e),currentTime:t,volume:n,muted:r,playbackRate:i,loop:o}))}),Y.media||500)}),X=[mS("play",x(FS.Play),R),mS("pause",x(FS.Pause),R),mS("seeked",x(FS.Seeked),R),mS("volumechange",x(FS.VolumeChange),R),mS("ratechange",x(FS.RateChange),R)],JS(function(){X.forEach(function(e){return e()})})),ye=function(){},we=function(){},be=function(){},ke=function(){};function Se(e){var t,n,r,i=ZS(e),e=e.isTrusted,o=i&&i.tagName;!(i=i&&"OPTION"===o?pS.parentElement(i):i)||!o||QS.indexOf(o)<0||_S(i,te,ne,!0)||i.classList.contains(re)||s&&i.matches(s)||(t=i.value,n=!1,"radio"===(r=q0(i)||"")||"checkbox"===r?n=i.checked:(u[o.toLowerCase()]||u[r])&&(t=W0({element:i,maskInputOptions:u,tagName:o,type:r,value:t,maskInputFn:ie})),_e(i,l?{text:t,isChecked:n,userTriggered:e}:{text:t,isChecked:n}),o=i.name,"radio"===r&&o&&n&&a.querySelectorAll('input[type="radio"][name="'.concat(o,'"]')).forEach(function(e){var t;e!==i&&(t=e.value,_e(e,l?{text:t,isChecked:!n,userTriggered:!1}:{text:t,isChecked:!n}))}))}function _e(e,t){var n=e_.get(e);n&&n.text===t.text&&n.isChecked===t.isChecked||(e_.set(e,t),n=ee.getId(e),JS(Q)(Ae(Ae({},t),{},{id:n})))}e.recordDOM&&(ye=function(e,t){var s=e.styleSheetRuleCb,u=e.mirror,l=e.stylesheetManager,r=t.win;if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return function(){};var n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:JS(function(e,t,n){var r=De(n,2),i=r[0],r=r[1],o=n_(t,u,l.styleMirror),a=o.id,o=o.styleId;return(a&&-1!==a||o&&-1!==o)&&s({id:a,styleId:o,adds:[{rule:i,index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.addRule=function(e,t){var n=2<arguments.length&&arguments[2]!==undefined?arguments[2]:this.cssRules.length,e="".concat(e," { ").concat(t," }");return r.CSSStyleSheet.prototype.insertRule.apply(this,[e,n])};var i,o,a=r.CSSStyleSheet.prototype.deleteRule,c=(r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:JS(function(e,t,n){var r=De(n,1)[0],i=n_(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,removes:[{index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:JS(function(e,t,n){var r=De(n,1)[0],i=n_(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,replace:r}),e.apply(t,n)})})),r.CSSStyleSheet.prototype.replaceSync&&(o=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:JS(function(e,t,n){var r=De(n,1)[0],i=n_(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,replaceSync:r}),e.apply(t,n)})})),{}),f=(a_("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(a_("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),a_("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),a_("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule)),{});return Object.entries(c).forEach(function(e){var e=De(e,2),t=e[0],e=e[1];f[t]={insertRule:e.prototype.insertRule,deleteRule:e.prototype.deleteRule},e.prototype.insertRule=new Proxy(f[t].insertRule,{apply:JS(function(e,t,n){var r=De(n,2),i=r[0],r=r[1],o=n_(t.parentStyleSheet,u,l.styleMirror),a=o.id,o=o.styleId;return(a&&-1!==a||o&&-1!==o)&&s({id:a,styleId:o,adds:[{rule:i,index:[].concat(Ne(t_(t)),[r||0])}]}),e.apply(t,n)})}),e.prototype.deleteRule=new Proxy(f[t].deleteRule,{apply:JS(function(e,t,n){var r=De(n,1)[0],i=n_(t.parentStyleSheet,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,removes:[{index:[].concat(Ne(t_(t)),[r])}]}),e.apply(t,n)})})}),JS(function(){r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=a,i&&(r.CSSStyleSheet.prototype.replace=i),o&&(r.CSSStyleSheet.prototype.replaceSync=o),Object.entries(c).forEach(function(e){var e=De(e,2),t=e[0],e=e[1];e.prototype.insertRule=f[t].insertRule,e.prototype.deleteRule=f[t].deleteRule})})}(e,{win:i}),we=r_(e,e.doc),r={win:i},b=(x=e).styleDeclarationCb,k=x.mirror,S=x.ignoreCSSAttributes,_=x.stylesheetManager,E=r.win,C=E.CSSStyleDeclaration.prototype.setProperty,E.CSSStyleDeclaration.prototype.setProperty=new Proxy(C,{apply:JS(function(e,t,n){var r,i,o=De(n,3),a=o[0],s=o[1],o=o[2];return S.has(a)?C.apply(t,[a,s,o]):(r=(i=n_(null==(i=t.parentRule)?void 0:i.parentStyleSheet,k,_.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&b({id:r,styleId:i,set:{property:a,value:s,priority:o},index:t_(t.parentRule)}),e.apply(t,n))})}),O=E.CSSStyleDeclaration.prototype.removeProperty,E.CSSStyleDeclaration.prototype.removeProperty=new Proxy(O,{apply:JS(function(e,t,n){var r,i,o=De(n,1)[0];return S.has(o)?O.apply(t,[o]):(r=(i=n_(null==(i=t.parentRule)?void 0:i.parentStyleSheet,k,_.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&b({id:r,styleId:i,remove:{property:o},index:t_(t.parentRule)}),e.apply(t,n))})}),be=JS(function(){E.CSSStyleDeclaration.prototype.setProperty=C,E.CSSStyleDeclaration.prototype.removeProperty=O}),e.collectFonts)&&(ce=(R=e).fontCb,w=(R=R.doc).defaultView,ke=w?(g=[],v=new WeakMap,y=w.FontFace,w.FontFace=function(e,t,n){var r=new y(e,t,n);return v.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r},R=hS(R.fonts,"add",function(e){return function(t){return setTimeout(JS(function(){var e=v.get(t);e&&(ce(e),v["delete"](t))}),0),e.apply(this,[t])}}),g.push(function(){w.FontFace=y}),g.push(R),JS(function(){g.forEach(function(e){return e()})})):function(){});Oe=(x=e).doc,I=x.mirror,T=x.blockClass,M=x.blockSelector,Re=x.selectionCb,A=!0,(x=JS(function(){var e=Oe.getSelection();if(!(!e||A&&null!=e&&e.isCollapsed)){A=e.isCollapsed||!1;for(var t=[],n=e.rangeCount||0,r=0;r<n;r++){var i=e.getRangeAt(r),o=i.startContainer,a=i.startOffset,s=i.endContainer,i=i.endOffset;_S(o,T,M,!0)||_S(s,T,M,!0)||t.push({start:I.getId(o),startOffset:a,end:I.getId(s),endOffset:i})}Re({ranges:t})}}))();var Ee,R,Ce,x,Oe,I,T,M,Re,A,xe=mS("selectionchange",x),Ie=(R=(r=e).doc,Ce=r.customElementCb,(r=R.defaultView)&&r.customElements?hS(r.customElements,"define",function(r){return function(e,t,n){try{Ce({define:{name:e}})}catch(Le){console.warn("Custom element callback failed for ".concat(e))}return r.apply(this,[e,t,n])}}):function(){}),Te=[],P=Me(e.plugins);try{for(P.s();!(Ee=P.n()).done;){var L=Ee.value;Te.push(L.observer(L.callback,i,L.options))}}catch(Pe){P.e(Pe)}finally{P.f()}return JS(function(){$S.forEach(function(e){return e.reset()}),null!=o&&o.disconnect(),fe(),de(),he(),pe(),me(),ge(),ve(),ye(),we(),be(),ke(),xe(),Ie(),Te.forEach(function(e){return e()})})}function o_(e){return"undefined"!=typeof window[e]}function a_(e){return Boolean("undefined"!=typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var s_=k(function u(e){b(this,u),A(this,"iframeIdToRemoteIdMap",new WeakMap),A(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e},[{key:"getId",value:function(e,t,n,r){n=n||this.getIdToRemoteIdMap(e),r=r||this.getRemoteIdToIdMap(e),e=n.get(t);return e||(e=this.generateIdFn(),n.set(t,e),r.set(e,t)),e}},{key:"getIds",value:function(t,e){var n=this,r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map(function(e){return n.getId(t,e,r,i)})}},{key:"getRemoteId",value:function(e,t,n){n=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:n.get(t)||-1}},{key:"getRemoteIds",value:function(t,e){var n=this,r=this.getRemoteIdToIdMap(t);return e.map(function(e){return n.getRemoteId(t,e,r)})}},{key:"reset",value:function(e){e?(this.iframeIdToRemoteIdMap["delete"](e),this.iframeRemoteIdToIdMap["delete"](e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),u_=k(function u(e){b(this,u),A(this,"iframes",new WeakMap),A(this,"crossOriginIframeMap",new WeakMap),A(this,"crossOriginIframeMirror",new s_(nw)),A(this,"crossOriginIframeStyleMirror"),A(this,"crossOriginIframeRootIdMap",new WeakMap),A(this,"mirror"),A(this,"mutationCb"),A(this,"wrappedEmit"),A(this,"loadListener"),A(this,"stylesheetManager"),A(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new s_(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))},[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(t=e.contentWindow)&&t.addEventListener("message",this.handleMessage.bind(this)),null!=(t=this.loadListener)&&t.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&0<e.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;"rrweb"===t.data.type&&t.origin===t.data.origin&&e.source&&(e=this.crossOriginIframeMap.get(e.source))&&(e=this.transformCrossOriginEvent(e,t.data.event))&&this.wrappedEmit(e,t.data.isCheckout)}},{key:"transformCrossOriginEvent",value:function(n,e){var t,r=this;switch(e.type){case AS.FullSnapshot:this.crossOriginIframeMirror.reset(n),this.crossOriginIframeStyleMirror.reset(n),this.replaceIdOnNode(e.data.node,n);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(n,i),this.patchRootIdOnNode(e.data.node,i),{timestamp:e.timestamp,type:AS.IncrementalSnapshot,data:{source:PS.Mutation,adds:[{parentId:this.mirror.getId(n),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case AS.Meta:case AS.Load:case AS.DomContentLoaded:return!1;case AS.Plugin:return e;case AS.Custom:return this.replaceIds(e.data.payload,n,["id","parentId","previousId","nextId"]),e;case AS.IncrementalSnapshot:switch(e.data.source){case PS.Mutation:return e.data.adds.forEach(function(e){r.replaceIds(e,n,["parentId","nextId","previousId"]),r.replaceIdOnNode(e.node,n);var t=r.crossOriginIframeRootIdMap.get(n);t&&r.patchRootIdOnNode(e.node,t)}),e.data.removes.forEach(function(e){r.replaceIds(e,n,["parentId","id"])}),e.data.attributes.forEach(function(e){r.replaceIds(e,n,["id"])}),e.data.texts.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case PS.Drag:case PS.TouchMove:case PS.MouseMove:return e.data.positions.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case PS.ViewportResize:return!1;case PS.MediaInteraction:case PS.MouseInteraction:case PS.Scroll:case PS.CanvasMutation:case PS.Input:return this.replaceIds(e.data,n,["id"]),e;case PS.StyleSheetRule:case PS.StyleDeclaration:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleId"]),e;case PS.Font:return e;case PS.Selection:return e.data.ranges.forEach(function(e){r.replaceIds(e,n,["start","end"])}),e;case PS.AdoptedStyleSheet:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleIds"]),null!=(t=e.data.styles)&&t.forEach(function(e){r.replaceStyleIds(e,n,["styleId"])}),e}}return!1}},{key:"replace",value:function(e,t,n,r){var i,o=Me(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;!Array.isArray(t[a])&&"number"!=typeof t[a]||(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]))}}catch(Pe){o.e(Pe)}finally{o.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===US.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})}}]),l_=k(function u(e){b(this,u),A(this,"shadowDoms",new WeakSet),A(this,"mutationCb"),A(this,"scrollCb"),A(this,"bypassOptions"),A(this,"mirror"),A(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()},[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n,r=this;U0(e)&&!this.shadowDoms.has(e)&&(this.shadowDoms.add(e),n=De(KS(Ae(Ae({},this.bypassOptions),{},{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),1)[0],this.restoreHandlers.push(function(){return n.disconnect()}),this.restoreHandlers.push(XS(Ae(Ae({},this.bypassOptions),{},{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&0<e.adoptedStyleSheets.length&&r.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,r.mirror.getId(pS.host(e))),r.restoreHandlers.push(r_({mirror:r.mirror,stylesheetManager:r.bypassOptions.stylesheetManager},e))},0))}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,r){var i=this;this.restoreHandlers.push(hS(e.prototype,"attachShadow",function(n){return function(e){var e=n.call(this,e),t=pS.shadowRoot(this);return t&&MS(this)&&i.addShadowRoot(t,r),e}}))}},{key:"reset",value:function(){this.restoreHandlers.forEach(function(e){try{e()}catch(w){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),c_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f_="undefined"==typeof Uint8Array?[]:new Uint8Array(256),d_=0;d_<c_.length;d_++)f_[c_.charCodeAt(d_)]=d_;var h_=new Map,p_=function(e,t,n){var r;if(e&&(g_(e,t)||"object"===S(e)))return t=n,n=e.constructor.name,(r=h_.get(t))||(r=new Map,h_.set(t,r)),r.has(n)||r.set(n,[]),-1===(n=(t=r.get(n)).indexOf(e))&&(n=t.length,t.push(e)),n};var m_=function(e,t,n){return e.map(function(e){return function r(i,t,n){return i instanceof Array?i.map(function(e){return r(e,t,n)}):null===i?i:i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray?{rr_type:i.constructor.name,args:[Object.values(i)]}:i instanceof ArrayBuffer?{rr_type:i.constructor.name,base64:function(){for(var e=new Uint8Array(i),t=e.length,n="",r=0;r<t;r+=3)n=(n=(n=(n+=c_[e[r]>>2])+c_[(3&e[r])<<4|e[r+1]>>4])+c_[(15&e[r+1])<<2|e[r+2]>>6])+c_[63&e[r+2]];return t%3==2?n=n.substring(0,n.length-1)+"=":t%3==1&&(n=n.substring(0,n.length-2)+"=="),n}()}:i instanceof DataView?{rr_type:i.constructor.name,args:[r(i.buffer,t,n),i.byteOffset,i.byteLength]}:i instanceof HTMLImageElement?{rr_type:i.constructor.name,src:i.src}:i instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:i.toDataURL()}:i instanceof ImageData?{rr_type:i.constructor.name,args:[r(i.data,t,n),i.width,i.height]}:g_(i,t)||"object"===S(i)?{rr_type:i.constructor.name,index:p_(i,t,n)}:i}(e,t,n)})},g_=function(t,n){var e=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof n[e]});return Boolean(e.find(function(e){return t instanceof n[e]}))};function v_(e,a,s,u){var t=[];try{var n=hS(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(e){for(var t,n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return _S(this,a,s,!0)||(t="experimental-webgl"===(t=e)?"webgl":t,"__context"in this||(this.__context=t),u&&["webgl","webgl2"].includes(t)&&(r[0]&&"object"===S(r[0])?(t=r[0]).preserveDrawingBuffer||(t.preserveDrawingBuffer=!0):r.splice(0,1,{preserveDrawingBuffer:!0}))),o.apply(this,[e].concat(r))}});t.push(n)}catch(L){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){t.forEach(function(e){return e()})}}function y_(t,s,u,l,c,f){var n,r=[],e=Me(Object.getOwnPropertyNames(t));try{for(e.s();!(n=e.n()).done;)!function(){var a=n.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))return;try{if("function"!=typeof t[a])return;var e=hS(t,a,function(o){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=o.apply(this,t);return p_(i,f,this),"tagName"in this.canvas&&!_S(this.canvas,l,c,!0)&&(r=m_(t,f,this),u(this.canvas,{type:s,property:a,args:r})),i}});r.push(e)}catch(F){e=yS(t,a,{set:function(e){u(this.canvas,{type:s,property:a,args:[e],setter:!0})}});r.push(e)}}()}catch(Pe){e.e(Pe)}finally{e.f()}return r}var w_='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n',b_="undefined"!=typeof self&&self.Blob&&new Blob([w_],{type:"text/javascript;charset=utf-8"});function k_(e){var t,n;try{if(t=b_&&(self.URL||self.webkitURL).createObjectURL(b_))return(n=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",function(){(self.URL||self.webkitURL).revokeObjectURL(t)}),n;throw""}catch(v){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(w_),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var S_,__,E_,C_,O_=k(function u(e){var n=this,t=(b(this,u),A(this,"pendingCanvasMutations",new Map),A(this,"rafStamps",{latestId:0,invokeId:null}),A(this,"mirror"),A(this,"mutationCb"),A(this,"resetObservers"),A(this,"frozen",!1),A(this,"locked",!1),A(this,"processMutation",function(e,t){(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId||!n.rafStamps.invokeId)&&(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)}),e.sampling),t=void 0===t?"all":t,r=e.win,i=e.blockClass,o=e.blockSelector,a=e.recordCanvas,s=e.dataURLOptions;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===t&&this.initCanvasMutationObserver(r,i,o),a&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:s})},[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,o,r,i,a){var s=this,t=v_(o,r,i,!0),u=new Map,l=new k_;l.onmessage=function(e){var t,n=e.data.id;u.set(n,!1),"base64"in e.data&&(t=(e=e.data).base64,s.mutationCb({id:n,type:NS["2D"],commands:[{property:"clearRect",args:[0,0,e.width,e.height]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:t}],type:e.type}]},0,0]}]}))};var c=1e3/e,f=0,d=function(e){var t,n;h=(f&&e-f<c||(f=e,t=[],o.document.querySelectorAll("canvas").forEach(function(e){_S(e,r,i,!0)||t.push(e)}),t.forEach((n=P(W().m(function o(t){var n,r,i;return W().w(function(e){for(;;)switch(e.n){case 0:if(n=s.mirror.getId(t),u.get(n))return e.a(2);e.n=1;break;case 1:if(0===t.width||0===t.height)return e.a(2);e.n=2;break;case 2:return u.set(n,!0),["webgl","webgl2"].includes(t.__context)&&(r=t.getContext(t.__context),!1===(null==(i=null==r?void 0:r.getContextAttributes())?void 0:i.preserveDrawingBuffer))&&r.clear(r.COLOR_BUFFER_BIT),e.n=3,createImageBitmap(t);case 3:i=e.v,l.postMessage({id:n,bitmap:i,width:t.width,height:t.height,dataURLOptions:a.dataURLOptions},[i]);case 4:return e.a(2)}},o)})),function(e){return n.apply(this,arguments)}))),requestAnimationFrame(d))},h=requestAnimationFrame(d);this.resetObservers=function(){t(),cancelAnimationFrame(h)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r,i,o=v_(e,t,n,!1),a=function(a,s,u,l){var t,n=[],e=Me(Object.getOwnPropertyNames(s.CanvasRenderingContext2D.prototype));try{for(e.s();!(t=e.n()).done;)!function(){var o=t.value;try{if("function"!=typeof s.CanvasRenderingContext2D.prototype[o])return;var e=hS(s.CanvasRenderingContext2D.prototype,o,function(i){return function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return _S(this.canvas,u,l,!0)||setTimeout(function(){var e=m_(n,s,t);a(t.canvas,{type:NS["2D"],property:o,args:e})},0),i.apply(this,n)}});n.push(e)}catch(D){e=yS(s.CanvasRenderingContext2D.prototype,o,{set:function(e){a(this.canvas,{type:NS["2D"],property:o,args:[e],setter:!0})}});n.push(e)}}()}catch(Pe){e.e(Pe)}finally{e.f()}return function(){n.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n),s=(r=this.processMutation.bind(this),t=t,n=n,i=[],"undefined"!=typeof(e=e).WebGLRenderingContext&&i.push.apply(i,Ne(y_(e.WebGLRenderingContext.prototype,NS.WebGL,r,t,n,e))),"undefined"!=typeof e.WebGL2RenderingContext&&i.push.apply(i,Ne(y_(e.WebGL2RenderingContext.prototype,NS.WebGL2,r,t,n,e))),function(){i.forEach(function(e){return e()})});this.resetObservers=function(){o(),a(),s()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})}},{key:"startRAFTimestamping",value:function(){var t=this,n=function(e){t.rafStamps.latestId=e,requestAnimationFrame(n)};requestAnimationFrame(n)}},{key:"flushPendingCanvasMutations",value:function(){var r=this;this.pendingCanvasMutations.forEach(function(e,t){var n=r.mirror.getId(t);r.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(function(){return r.flushPendingCanvasMutations()})}},{key:"flushPendingCanvasMutationFor",value:function(e,t){var n,r;this.frozen||this.locked||(r=this.pendingCanvasMutations.get(e))&&-1!==t&&(n=r.map(function(e){return e.type,B(e,k0)}),r=r[0].type,this.mutationCb({id:t,type:r,commands:n}),this.pendingCanvasMutations["delete"](e))}}]),R_=k(function u(e){b(this,u),A(this,"trackedLinkElements",new WeakSet),A(this,"mutationCb"),A(this,"adoptedStyleSheetCb"),A(this,"styleMirror",new IS),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb},[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){var r=this;if(0!==e.length){var i,o={id:t,styleIds:[]},a=[],n=Me(e);try{for(n.s();!(i=n.n()).done;)!function(){var e,n=i.value;r.styleMirror.has(n)?e=r.styleMirror.getId(n):(e=r.styleMirror.add(n),a.push({styleId:e,rules:Array.from(n.rules||CSSRule,function(e,t){return{rule:z0(e,n.href),index:t}})})),o.styleIds.push(e)}()}catch(Pe){n.e(Pe)}finally{n.f()}0<a.length&&(o.styles=a),this.adoptedStyleSheetCb(o)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),x_=k(function u(){b(this,u),A(this,"nodeMap",new WeakMap),A(this,"active",!1)},[{key:"inOtherBuffer",value:function(e,t){e=this.nodeMap.get(e);return e&&Array.from(e).some(function(e){return e!==t})}},{key:"add",value:function(e,t){var n=this;this.active||(this.active=!0,requestAnimationFrame(function(){n.nodeMap=new WeakMap,n.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"destroy",value:function(){}}]),I_=!1;try{2!==Array.from([1],function(e){return 2*e})[0]&&(C_=document.createElement("iframe"),document.body.appendChild(C_),Array.from=(null==(g0=C_.contentWindow)?void 0:g0.Array.from)||Array.from,document.body.removeChild(C_))}catch(Pe){console.debug("Unable to override Array.from",Pe)}var T_,M_=new B0;function A_(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},r=e.emit,i=e.checkoutEveryNms,o=e.checkoutEveryNth,t=e.blockClass,u=void 0===t?"rr-block":t,t=e.blockSelector,l=void 0===t?null:t,t=e.ignoreClass,D=void 0===t?"rr-ignore":t,t=e.ignoreSelector,N=void 0===t?null:t,t=e.maskTextClass,c=void 0===t?"rr-mask":t,t=e.maskTextSelector,f=void 0===t?null:t,t=e.inlineStylesheet,d=void 0===t||t,t=e.maskAllInputs,n=e.maskInputOptions,F=e.slimDOMOptions,h=e.maskInputFn,p=e.maskTextFn,U=e.hooks,j=e.packFn,a=e.sampling,s=void 0===a?{}:a,a=e.dataURLOptions,m=void 0===a?{}:a,a=e.mousemoveWait,g=e.recordDOM,z=void 0===g||g,g=e.recordCanvas,v=void 0!==g&&g,g=e.recordCrossOriginIframes,g=void 0!==g&&g,y=e.recordAfter,B=void 0===y?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":y,y=e.userTriggeredOnInput,W=void 0!==y&&y,y=e.collectFonts,H=void 0!==y&&y,y=e.inlineImages,w=void 0!==y&&y,b=e.plugins,y=e.keepIframeSrcFn,k=void 0===y?function(){return!1}:y,y=e.ignoreCSSAttributes,q=void 0===y?new Set([]):y,S=(zS=e.errorHandler,!g||window.parent===window),_=!1;if(!S)try{window.parent.document&&(_=!1)}catch(Ce){_=!0}if(S&&!r)throw new Error("emit function is required");if(!S&&!_)return function(){};void 0!==a&&void 0===s.mousemove&&(s.mousemove=a),M_.reset();var V,E=!0===t?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==n?n:{password:!0},C=pw(F),O=(!function(e){"NodeList"in(e=0<arguments.length&&e!==undefined?e:window)&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}(),0),G=function(e){var t,n=Me(b||[]);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}}catch(Pe){n.e(Pe)}finally{n.f()}return e=j&&!_?j(e):e};S_=function(e,t){var n;e.timestamp=dS(),null==(n=$S[0])||!n.isFrozen()||e.type===AS.FullSnapshot||e.type===AS.IncrementalSnapshot&&e.data.source===PS.Mutation||$S.forEach(function(e){return e.unfreeze()}),S?null!=r&&r(G(e),t):_&&(n={type:"rrweb",event:G(e),origin:window.location.origin,isCheckout:t},window.parent.postMessage(n,"*")),e.type===AS.FullSnapshot?(V=e,O=0):e.type!==AS.IncrementalSnapshot||e.data.source===PS.Mutation&&e.data.isAttachIframe||(O++,t=o&&o<=O,n=i&&e.timestamp-V.timestamp>i,(t||n)&&__(!0))};var J,R=function(e){S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.Mutation},e)})},$=function(e){return S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.Scroll},e)})},Z=function(e){return S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.CanvasMutation},e)})},x=new R_({mutationCb:R,adoptedStyleSheetCb:function(e){return S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.AdoptedStyleSheet},e)})}}),I=new u_({mirror:M_,mutationCb:R,stylesheetManager:x,recordCrossOriginIframes:g,wrappedEmit:S_}),T=Me(b||[]);try{for(T.s();!(J=T.n()).done;){var K=J.value;K.getMirror&&K.getMirror({nodeMirror:M_,crossOriginIframeMirror:I.crossOriginIframeMirror,crossOriginIframeStyleMirror:I.crossOriginIframeStyleMirror})}}catch(Pe){T.e(Pe)}finally{T.f()}var M=new x_,A=(E_=new O_({recordCanvas:v,mutationCb:Z,win:window,blockClass:u,blockSelector:l,mirror:M_,sampling:s.canvas,dataURLOptions:m}),new l_({mutationCb:R,scrollCb:$,bypassOptions:{blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:f,inlineStylesheet:d,maskInputOptions:E,dataURLOptions:m,maskTextFn:p,maskInputFn:h,recordCanvas:v,inlineImages:w,sampling:s,slimDOMOptions:C,iframeManager:I,stylesheetManager:x,canvasManager:E_,keepIframeSrcFn:k,processedNodeManager:M},mirror:M_}));__=function(){var e,t,n,r,i,o,a=0<arguments.length&&arguments[0]!==undefined&&arguments[0];if(z){S_({type:AS.Meta,data:{href:window.location.href,width:kS(),height:bS()}},a),x.reset(),A.init(),$S.forEach(function(e){return e.lock()});s=document,r=void 0===(r=(e={mirror:M_,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:f,inlineStylesheet:d,maskAllInputs:E,maskTextFn:p,maskInputFn:h,slimDOM:C,dataURLOptions:m,recordCanvas:v,inlineImages:w,onSerialize:function(e){OS(e,M_)&&I.addIframe(e),RS(e,M_)&&x.trackLinkElement(e),xS(e)&&A.addShadowRoot(pS.shadowRoot(e),document)},onIframeLoad:function(e,t){I.attachIframe(e,t),A.observeAttachShadow(e)},onStylesheetLoad:function(e,t){x.attachLinkElement(e,t)},keepIframeSrcFn:k}).mirror)?new B0:r,t=e.inlineImages,n=e.recordCanvas,i=e.slimDOM,o=e.keepIframeSrcFn;var s=mw(s,{doc:s,mirror:r,blockClass:void 0===(s=e.blockClass)?"rr-block":s,blockSelector:void 0===(r=e.blockSelector)?null:r,maskTextClass:void 0===(s=e.maskTextClass)?"rr-mask":s,maskTextSelector:void 0===(r=e.maskTextSelector)?null:r,skipChild:!1,inlineStylesheet:void 0===(s=e.inlineStylesheet)||s,maskInputOptions:!0===(r=void 0!==(r=e.maskAllInputs)&&r)?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===r?{password:!0}:r,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:pw(void 0!==i&&i),dataURLOptions:e.dataURLOptions,inlineImages:void 0!==t&&t,recordCanvas:void 0!==n&&n,preserveWhiteSpace:e.preserveWhiteSpace,onSerialize:e.onSerialize,onIframeLoad:e.onIframeLoad,iframeLoadTimeout:e.iframeLoadTimeout,onStylesheetLoad:e.onStylesheetLoad,stylesheetLoadTimeout:e.stylesheetLoadTimeout,keepIframeSrcFn:void 0===o?function(){return!1}:o,newlyAddedElement:!1});if(!s)return console.warn("Failed to snapshot the document");S_({type:AS.FullSnapshot,data:{node:s,initialOffset:wS(window)}},a),$S.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&x.adoptStyleSheets(document.adoptedStyleSheets,M_.getId(document))}};try{var P=[],Y=function(e){return JS(i_)({mutationCb:R,mousemoveCb:function(e,t){return S_({type:AS.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.MouseInteraction},e)})},scrollCb:$,viewportResizeCb:function(e){return S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.ViewportResize},e)})},inputCb:function(e){return S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.Input},e)})},mediaInteractionCb:function(e){return S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.MediaInteraction},e)})},styleSheetRuleCb:function(e){return S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.StyleSheetRule},e)})},styleDeclarationCb:function(e){return S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.StyleDeclaration},e)})},canvasMutationCb:Z,fontCb:function(e){return S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.Font},e)})},selectionCb:function(e){S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.Selection},e)})},customElementCb:function(e){S_({type:AS.IncrementalSnapshot,data:Ae({source:PS.CustomElement},e)})},blockClass:u,ignoreClass:D,ignoreSelector:N,maskTextClass:c,maskTextSelector:f,maskInputOptions:E,inlineStylesheet:d,sampling:s,recordDOM:z,recordCanvas:v,inlineImages:w,userTriggeredOnInput:W,collectFonts:H,doc:e,maskInputFn:h,maskTextFn:p,keepIframeSrcFn:k,blockSelector:l,slimDOMOptions:C,dataURLOptions:m,mirror:M_,iframeManager:I,stylesheetManager:x,shadowDomManager:A,processedNodeManager:M,canvasManager:E_,ignoreCSSAttributes:q,plugins:(null==(e=null==b?void 0:b.filter(function(e){return e.observer}))?void 0:e.map(function(t){return{observer:t.observer,options:t.options,callback:function(e){return S_({type:AS.Plugin,data:{plugin:t.name,payload:e}})}}}))||[]},U)},L=(I.addLoadListener(function(e){try{P.push(Y(e.contentDocument))}catch(X){console.warn(X)}}),function(){__(),P.push(Y(document)),I_=!0});return["interactive","complete"].includes(document.readyState)?L():(P.push(mS("DOMContentLoaded",function(){S_({type:AS.DomContentLoaded,data:{}}),"DOMContentLoaded"===B&&L()})),P.push(mS("load",function(){S_({type:AS.Load,data:{}}),"load"===B&&L()},window))),function(){P.forEach(function(e){try{e()}catch(X){String(X).toLowerCase().includes("cross-origin")||console.warn(X)}}),M.destroy(),I_=!1,zS=void 0}}catch(X){console.warn(X)}}A_.addCustomEvent=function(e,t){if(!I_)throw new Error("please add custom event after start recording");S_({type:AS.Custom,data:{tag:e,payload:t}})},A_.freezePage=function(){$S.forEach(function(e){return e.freeze()})},A_.takeFullSnapshot=function(e){if(!I_)throw new Error("please take full snapshot after start recording");__(e)},A_.mirror=M_,(Fe=T_=T_||{})[Fe.NotStarted=0]="NotStarted",Fe[Fe.Running=1]="Running",Fe[Fe.Stopped=2]="Stopped";var P_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',L_={maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,autoDetectSensitiveData:!0,mask:[".tdem-mask","[data-tdem-mask]","[data-sensitive]",".sensitive",".private"],block:[".tdem-block","[data-tdem-block]",".secret","[data-secret]","iframe[srcdoc]:not([src])",".replayer-wrapper"],ignore:[".tdem-ignore","[data-tdem-ignore]",'input[type="file"]','input[type="password"]'],maskInputOptions:{password:!0,email:!0,tel:!0,text:!1}},D_=(N_.maskPhone=function(e){return e.replace(this.phoneRegex,function(e){var t=e.replace(/[^\d]/g,"");return 11===t.length?e.substring(0,3)+"****"+e.substring(7):13===t.length?e.substring(0,6)+"****"+e.substring(10):e.substring(0,3)+"****"+e.substring(e.length-4)})},N_.maskIdCard=function(e){return e.replace(this.idCardRegex,function(e){return 18===e.length?e.substring(0,6)+"********"+e.substring(14):15===e.length?e.substring(0,6)+"******"+e.substring(12):e})},N_.maskEmail=function(e){return e.replace(this.emailRegex,function(e){var t,n=e.indexOf("@");return n<=1?"*"+e.substring(1):(t=e.substring(0,n),n=e.substring(n),t.charAt(0)+"***"+t.charAt(t.length-1)+n)})},N_.maskBankCard=function(e){return e.replace(this.bankCardRegex,function(e){var t=e.replace(/[^\d]/g,"");return t.length<13?e:t.substring(0,4)+" **** **** "+t.substring(t.length-4)})},N_.maskIP=function(e){return e.replace(this.ipv4Regex,function(e){e=e.split(".");return e[0]+".*.*."+e[3]})},N_.autoMask=function(e){var t;return e&&"string"==typeof e?(t=this.maskPhone(t=e),t=this.maskIdCard(t),t=this.maskEmail(t),this.maskBankCard(t)):e},N_.hasSensitiveData=function(e){return!(!e||"string"!=typeof e)&&(this.phoneRegex.test(e)||this.idCardRegex.test(e)||this.emailRegex.test(e)||this.bankCardRegex.test(e))},N_.phoneRegex=/1[3-9]\d{9}|(?:\+?86)?1[3-9]\d{9}/g,N_.idCardRegex=/[1-9]\d{5}(?:19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dXx]|[1-9]\d{7}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}/g,N_.emailRegex=/[\w.-]+@[\w.-]+\.\w{2,}/g,N_.bankCardRegex=/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{1,7}\b/g,N_.ipv4Regex=/\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\b/g,N_);function N_(){}function F_(e,t){return void 0===e&&(e={}),h(h(h({},t=void 0===t?L_:t),e),{mask:U_(t.mask,e.mask),block:U_(t.block,e.block),ignore:U_(t.ignore,e.ignore),maskInputOptions:h(h({},t.maskInputOptions),e.maskInputOptions)})}function U_(e,t){e=new Set(pl(e||[],t||[]));return Array.from(e)}q_.prototype.push=function(e,t){if(this.emitFn=t,3===e.type&&this.isMutationEvent(e)){var n=e.data;if(this.buffer){if(this.enableRepeatDetection&&this.isRepeatPattern(n)){if(this.repeatCount++,3<this.repeatCount)return this.buffer=this.cloneEvent(e),void this.droppedByRepeat++}else this.repeatCount=0;this.mergeInto(n,e.timestamp),this.mergedCount++,(null!=(n=null==(n=this.buffer.data.adds)?void 0:n.length)?n:0)>=this.maxAddsPerMerge&&this.flush()}else this.buffer=this.cloneEvent(e),this.scheduleFlush()}else this.flush(),t(e)},q_.prototype.flush=function(){this.clearTimer(),this.buffer&&this.emitFn&&(this.emitFn(this.buffer),this.buffer=null,this.repeatCount=0)},q_.prototype.destroy=function(){this.flush(),this.clearTimer(),this.emitFn=null},q_.prototype.getStats=function(){return{mergedCount:this.mergedCount,droppedByRepeat:this.droppedByRepeat,cancelledByOffset:this.cancelledByOffset}},q_.prototype.isMutationEvent=function(e){return 0===(null==(e=e.data)?void 0:e.source)},q_.prototype.isRepeatPattern=function(e){var t;return!!this.buffer&&(t=null!=(t=this.buffer.data.adds)?t:[],e=null!=(e=e.adds)?e:[],0!==t.length)&&0!==e.length&&t.length===e.length&&(null==(t=t[0])?void 0:t.parentId)===(null==(t=e[0])?void 0:t.parentId)},q_.prototype.mergeInto=function(e,t){var n,r,i,o;if(this.buffer){var a=this.buffer.data;this.buffer.timestamp=Math.max(this.buffer.timestamp,t);for(var s=this,u=0,l=null!=(t=e.removes)?t:[];u<l.length;u++)!function(t){var e=(null!=(n=a.adds)?n:[]).findIndex(function(e){return(null==(e=e.node)?void 0:e.id)===t.id});0<=e?(a.adds.splice(e,1),s.cancelledByOffset++):(a.removes=null!=(n=a.removes)?n:[],a.removes.push(t))}(l[u]);for(var c=0,f=null!=(t=e.adds)?t:[];c<f.length;c++){var d=f[c];a.adds=null!=(r=a.adds)?r:[],a.adds.push(d)}for(var h=0,p=null!=(t=e.attributes)?t:[];h<p.length;h++)!function(t){a.attributes=null!=(i=a.attributes)?i:[];var e=a.attributes.findIndex(function(e){return e.id===t.id});0<=e?a.attributes[e]=t:a.attributes.push(t)}(p[h]);for(var m=0,g=null!=(t=e.texts)?t:[];m<g.length;m++)!function(t){a.texts=null!=(o=a.texts)?o:[];var e=a.texts.findIndex(function(e){return e.id===t.id});0<=e?a.texts[e]=t:a.texts.push(t)}(g[m])}},q_.prototype.cloneEvent=function(e){var t=e.data;return{type:e.type,timestamp:e.timestamp,data:{source:0,adds:pl(null!=(e=t.adds)?e:[]),removes:pl(null!=(e=t.removes)?e:[]),attributes:pl(null!=(e=t.attributes)?e:[]),texts:pl(null!=(e=t.texts)?e:[])}}},q_.prototype.scheduleFlush=function(){var e=this;this.clearTimer(),this.flushTimer=setTimeout(function(){e.flushTimer=null,e.flush()},this.windowMs)},q_.prototype.clearTimer=function(){null!==this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=null)};var j_=q_,z_=(H_.prototype.startRecording=function(e){var r,i,n=this;if(void 0===e&&(e={}),"recording"!==this.state){this.mutationLimitReached=!1,this.throttleCount=0,this.throttleWindowStart=Date.now(),this.throttleNotified=!1,this.mutationAddsInWindow=0;var t="buffer"===this.options.mode?12e4:3e5,t="number"==typeof e.checkoutEveryNms&&0<e.checkoutEveryNms?e.checkoutEveryNms:t,o="number"==typeof e.checkoutEveryNth&&0<e.checkoutEveryNth?e.checkoutEveryNth:undefined,a=F_(e.privacy||{},L_),s=h(h(h(h({emit:function(e,t){n.handleEvent(e,t)},checkoutEveryNms:t},o?{checkoutEveryNth:o}:{}),{sampling:{scroll:150,mousemove:!f.ios()&&50,mouseInteraction:!0,input:"last"},slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:!0}}),(t={},(o=a).maskAllInputs!==undefined&&(t.maskAllInputs=o.maskAllInputs),o.maskInputOptions&&(t.maskInputOptions=o.maskInputOptions),null!=(s=o.mask)&&s.length&&(t.maskTextSelector=o.mask.join(",")),null!=(s=o.block)&&s.length&&(t.blockSelector=o.block.join(",")),o.blockAllMedia&&(t.blockSelector=t.blockSelector?t.blockSelector+","+P_:P_,t.ignoreCSSAttributes=new Set(["background-image"])),null!=(s=o.ignore)&&s.length&&(t.ignoreSelector=o.ignore.join(",")),!o.maskTextFn&&!1===o.autoDetectSensitiveData||(t.maskTextFn=(r=o.maskTextFn,i=!1!==o.autoDetectSensitiveData,function(e,t){var n;return e&&(n=e,i&&(n=D_.autoMask(n)),r?r(n,t):n)})),t)),e.rrwebConfig);try{this.hookMutationObserver(),this.stopRecordingFn=A_(s),this.state="recording",this.lastCheckoutTime=Date.now(),this.startCheckpointTimer(),m("RecorderManager","Recording started with config:",{maskAllText:a.maskAllText,maskAllInputs:a.maskAllInputs,autoDetectSensitiveData:a.autoDetectSensitiveData,mutationLimit:this.mutationLimit,checkpointIntervalMs:12e4})}catch(X){jy("RecorderManager","Failed to start recording:",X),this.state="stopped"}}else Uy("RecorderManager","Already recording")},H_.prototype.stopRecording=function(){var e;this.stopCheckpointTimer(),null!=(e=this.mutationMerger)&&e.destroy(),this.unhookMutationObserver(),this.stopRecordingFn&&(this.stopRecordingFn(),this.stopRecordingFn=undefined),this.state="stopped",m("RecorderManager","Recording stopped")},H_.prototype.pauseRecording=function(){"recording"===this.state&&(this.stopRecording(),this.state="paused",m("RecorderManager","Recording paused"))},H_.prototype.resumeRecording=function(e){void 0===e&&(e={}),"paused"===this.state&&(this.startRecording(e),m("RecorderManager","Recording resumed"))},H_.prototype.hookMutationObserver=function(){try{var r,e,t=window.MutationObserver;t&&(r=this,(e=function(n){return new t(function(e,t){r.unhookMutationObserver(),r.onMutationHandler(e)&&n(e,t)})}).prototype=t.prototype,window.MutationObserver=e,this.restoreMutationObserver=function(){window.MutationObserver=t},Fy("RecorderManager","MutationObserver hooked"))}catch(Pe){Uy("RecorderManager","Failed to hook MutationObserver:",Pe)}},H_.prototype.unhookMutationObserver=function(){this.restoreMutationObserver&&(this.restoreMutationObserver(),this.restoreMutationObserver=null,Fy("RecorderManager","MutationObserver restored"))},H_.prototype.onMutationHandler=function(e){var t,n=this;return!this.mutationLimitReached&&(t=(e=e.length)>this.mutationLimit,(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(this.mutationLimitReached=!0,jy("RecorderManager","Mutation limit reached: "+e+" > "+this.mutationLimit+". Stopping."),setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1))},H_.prototype.checkMutationLimit=function(e){var n=this;if(this.mutationLimitReached)return!1;if(3!==e.type)return!0;e=e.data;if(0!==(null==e?void 0:e.source))return!0;e=Array.isArray(e.adds)?e.adds.length:0;if(0===e)return!0;this.mutationAddsInWindow+=e;var t=e>this.mutationLimit||this.mutationAddsInWindow>2*this.mutationLimit;return(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(jy("RecorderManager","Mutation limit: "+e+" adds (window: "+this.mutationAddsInWindow+"). Stopping."),this.mutationLimitReached=!0,setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1)},H_.prototype.emitMutationBreadcrumb=function(e,t){var n;try{null!=(n=A_.addCustomEvent)&&n.call(A_,"replay.mutations",{count:e,limit:t,timestamp:Date.now()})}catch(b){}},H_.prototype.handleEvent=function(e,t){var n=this,r=(t&&(null!=(r=(i=this.options).onCheckout)&&r.call(i),this.lastCheckoutTime=Date.now(),null!=(i=this.mutationMerger))&&i.flush(),e.type);if(t||2===r||4===r||r<=1||this.checkEventThrottle()){if(3===r&&!this.mutationLimitReached){var i=Date.now();if(12e4<=i-this.lastCheckoutTime){this.lastCheckoutTime=i;try{var o=A_.takeFullSnapshot;"function"==typeof o&&(o(!0),Fy("RecorderManager","Inline checkpoint: forced FullSnapshot"))}catch(Pe){Uy("RecorderManager","Inline checkpoint failed:",Pe)}}}this.checkMutationLimit(e)&&(this.mutationMerger?this.mutationMerger.push(e,function(e){n.options.onRecordingEvent(e)}):this.options.onRecordingEvent(e))}},H_.prototype.checkEventThrottle=function(){var e,t=Date.now();if(5e3<t-this.throttleWindowStart&&(this.throttleCount=0,this.throttleWindowStart=t,this.throttleNotified=!1,this.mutationAddsInWindow=0),this.throttleCount++,300<this.throttleCount){if(!this.throttleNotified){this.throttleNotified=!0,Uy("RecorderManager","Event throttled: "+this.throttleCount+" events in 5000ms window");try{null!=(e=A_.addCustomEvent)&&e.call(A_,"replay.throttled",{count:this.throttleCount,window:5e3})}catch(v){}}return!1}return!0},H_.prototype.startCheckpointTimer=function(){var t=this;this.stopCheckpointTimer(),this.checkpointTimer=setInterval(function(){if("recording"===t.state&&!t.mutationLimitReached)try{var e=A_.takeFullSnapshot;"function"==typeof e&&(e(!0),t.lastCheckoutTime=Date.now(),Fy("RecorderManager","Checkpoint: forced FullSnapshot"))}catch(Pe){Uy("RecorderManager","Checkpoint FullSnapshot failed:",Pe)}},12e4)},H_.prototype.stopCheckpointTimer=function(){null!==this.checkpointTimer&&(clearInterval(this.checkpointTimer),this.checkpointTimer=null)},H_.prototype.getState=function(){return this.state},H_.prototype.isRecording=function(){return"recording"===this.state},H_.prototype.getLastCheckoutTime=function(){return this.lastCheckoutTime},H_.prototype.takeFullSnapshot=function(){var e,t;"recording"===this.state&&this.stopRecordingFn&&(null!=(t=null==(e=this.stopRecordingFn)?void 0:e.takeFullSnapshot)&&t.call(e),this.lastCheckoutTime=Date.now())},H_.prototype.isMutationLimitReached=function(){return this.mutationLimitReached},H_),B_=(W_.prototype.initializeSampling=function(){return null!==this.samplingDecision?{mode:this.currentMode,shouldRecord:!1!==this.currentMode}:Math.random()<this.config.sessionSampleRate?(this.currentMode="session",this.samplingDecision=!0,m("SamplerManager","Sampled: session mode"),{mode:"session",shouldRecord:!0}):0<this.config.errorSampleRate?(this.currentMode="buffer",this.samplingDecision=!0,m("SamplerManager","Sampled: buffer mode"),{mode:"buffer",shouldRecord:!0}):(this.currentMode=!1,this.samplingDecision=!1,m("SamplerManager","Not sampled"),{mode:!1,shouldRecord:!1})},W_.prototype.decideSamplingMode=function(){return this.initializeSampling().mode},W_.prototype.onErrorOccurred=function(e){return"buffer"===this.currentMode&&!this.hasUpgraded&&!!(Math.random()<this.config.errorSampleRate)&&(this.switchMode("session"),this.hasUpgraded=!0)},W_.prototype.switchMode=function(e){var t=this.currentMode;this.currentMode=e,this.samplingDecision=!1!==e,m("SamplerManager","Mode switched: "+t+" -> "+e)},W_.prototype.getCurrentMode=function(){return this.currentMode},W_.prototype.isSampled=function(){return!0===this.samplingDecision},W_.prototype.isSessionMode=function(){return"session"===this.currentMode},W_.prototype.isBufferMode=function(){return"buffer"===this.currentMode},W_.prototype.upgradeToSessionMode=function(){return"buffer"===this.currentMode&&Math.random()<this.config.errorSampleRate&&(this.currentMode="session",m("SamplerManager","Upgraded to session mode due to error"),!0)},W_.prototype.updateRates=function(e,t){"number"==typeof e&&(this.config.sessionSampleRate=e),"number"==typeof t&&(this.config.errorSampleRate=t)},W_.prototype.forceMode=function(e){this.currentMode=e,this.samplingDecision=!1!==e},W_.prototype.reset=function(){this.currentMode=!1,this.samplingDecision=null},W_.prototype.getConfig=function(){return h({},this.config)},W_);function W_(e){var t;void 0===e&&(e={}),this.currentMode=!1,this.samplingDecision=null,this.hasUpgraded=!1,this.config={sessionSampleRate:null!=(t=e.sessionSampleRate)?t:.1,errorSampleRate:null!=(t=e.errorSampleRate)?t:1}}function H_(e,t){this.state="stopped",this.lastCheckoutTime=0,this.checkpointTimer=null,this.mutationLimitReached=!1,this.mutationMerger=null,this.mutationBreadcrumbLimit=750,this.mutationLimit=1e4,this.restoreMutationObserver=null,this.throttleCount=0,this.throttleWindowStart=0,this.throttleNotified=!1,this.mutationAddsInWindow=0,this.options=e,this.mutationBreadcrumbLimit=null!=(e=null==t?void 0:t.mutationBreadcrumbLimit)?e:750,this.mutationLimit=null!=(e=null==t?void 0:t.mutationLimit)?e:1e4,null!=t&&t.enableMutationMerge&&(this.mutationMerger=new j_({windowMs:null!=(e=null==t?void 0:t.mutationMergeWindowMs)?e:200,maxAddsPerMerge:500,enableRepeatDetection:!0}))}function q_(e){var t;this.buffer=null,this.flushTimer=null,this.repeatCount=0,this.emitFn=null,this.mergedCount=0,this.droppedByRepeat=0,this.cancelledByOffset=0,this.windowMs=null!=(t=null==e?void 0:e.windowMs)?t:200,this.maxAddsPerMerge=null!=(t=null==e?void 0:e.maxAddsPerMerge)?t:500,this.enableRepeatDetection=null==(t=null==e?void 0:e.enableRepeatDetection)||t}function V_(e){for(var t=e.length;0<=--t;)e[t]=0}var G_=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]),J_=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]),$_=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Z_=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),K_=new Array(576),Y_=(V_(K_),new Array(60)),X_=(V_(Y_),new Array(512)),Q_=(V_(X_),new Array(256)),eE=(V_(Q_),new Array(29));V_(eE);var tE,nE,rE,iE=new Array(30);function oE(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function aE(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}V_(iE);var sE=function(e){return e<256?X_[e]:X_[256+(e>>>7)]},uE=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},lE=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,uE(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},cE=function(e,t,n){lE(e,n[2*t],n[2*t+1])},fE=function(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1},dE=function(e,t,n){for(var r,i=new Array(16),o=0,a=1;a<=15;a++)o=o+n[a-1]<<1,i[a]=o;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=fE(i[s]++,s))}},hE=function(e){for(var t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},pE=function(e){8<e.bi_valid?uE(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},mE=function(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},gE=function(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&mE(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!mE(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},vE=function(e,t,n){var r,i,o,a,s=0;if(0!==e.sym_next)for(;r=255&e.pending_buf[e.sym_buf+s++],r+=(255&e.pending_buf[e.sym_buf+s++])<<8,i=e.pending_buf[e.sym_buf+s++],0==r?cE(e,i,t):(o=Q_[i],cE(e,o+256+1,t),0!==(a=G_[o])&&(i-=eE[o],lE(e,i,a)),o=sE(--r),cE(e,o,n),0!==(a=J_[o])&&(r-=iE[o],lE(e,r,a))),s<e.sym_next;);cE(e,256,t)},yE=function(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;1<=n;n--)gE(e,o,n);for(i=u;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],gE(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,gE(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1];for(var c,f,d,h,p,m=e,g=t.dyn_tree,v=t.max_code,y=t.stat_desc.static_tree,w=t.stat_desc.has_stree,b=t.stat_desc.extra_bits,k=t.stat_desc.extra_base,S=t.stat_desc.max_length,_=0,E=0;E<=15;E++)m.bl_count[E]=0;for(g[2*m.heap[m.heap_max]+1]=0,c=m.heap_max+1;c<573;c++)(E=g[2*g[2*(f=m.heap[c])+1]+1]+1)>S&&(E=S,_++),g[2*f+1]=E,v<f||(m.bl_count[E]++,h=0,k<=f&&(h=b[f-k]),p=g[2*f],m.opt_len+=p*(E+h),w&&(m.static_len+=p*(y[2*f+1]+h)));if(0!==_){do{for(E=S-1;0===m.bl_count[E];)E--}while(m.bl_count[E]--,m.bl_count[E+1]+=2,m.bl_count[S]--,0<(_-=2));for(E=S;0!==E;E--)for(f=m.bl_count[E];0!==f;)(d=m.heap[--c])>v||(g[2*d+1]!==E&&(m.opt_len+=(E-g[2*d+1])*g[2*d],g[2*d+1]=E),f--)}dE(o,l,e.bl_count)},wE=function(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<l?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=i,l=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4))},bE=function(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<l)for(;cE(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==o&&(cE(e,i,e.bl_tree),s--),cE(e,16,e.bl_tree),lE(e,s-3,2)):s<=10?(cE(e,17,e.bl_tree),lE(e,s-3,3)):(cE(e,18,e.bl_tree),lE(e,s-11,7));o=i,l=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4)}},kE=!1,SE=function(e,t,n,r){lE(e,0+(r?1:0),3),pE(e),uE(e,n),uE(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},Nr=function(e){if(!kE){for(var t,n,r,i=new Array(16),o=0,a=0;a<28;a++)for(eE[a]=o,t=0;t<1<<G_[a];t++)Q_[o++]=a;for(Q_[o-1]=a,a=r=0;a<16;a++)for(iE[a]=r,t=0;t<1<<J_[a];t++)X_[r++]=a;for(r>>=7;a<30;a++)for(iE[a]=r<<7,t=0;t<1<<J_[a]-7;t++)X_[256+r++]=a;for(n=0;n<=15;n++)i[n]=0;for(t=0;t<=143;)K_[2*t+1]=8,t++,i[8]++;for(;t<=255;)K_[2*t+1]=9,t++,i[9]++;for(;t<=279;)K_[2*t+1]=7,t++,i[7]++;for(;t<=287;)K_[2*t+1]=8,t++,i[8]++;for(dE(K_,287,i),t=0;t<30;t++)Y_[2*t+1]=5,Y_[2*t]=fE(t,5);tE=new oE(K_,G_,257,286,15),nE=new oE(Y_,J_,0,30,15),rE=new oE(new Array(0),$_,0,19,7),kE=!0}e.l_desc=new aE(e.dyn_ltree,tE),e.d_desc=new aE(e.dyn_dtree,nE),e.bl_desc=new aE(e.bl_tree,rE),e.bi_buf=0,e.bi_valid=0,hE(e)},_E=SE,Ie=function(e,t,n,r){var i,o,a,s=0;if(0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){for(var t=4093624447,n=0;n<=31;n++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*n])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(n=32;n<256;n++)if(0!==e.dyn_ltree[2*n])return 1;return 0}(e)),yE(e,e.l_desc),yE(e,e.d_desc),s=function(e){var t;for(wE(e,e.dyn_ltree,e.l_desc.max_code),wE(e,e.dyn_dtree,e.d_desc.max_code),yE(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*Z_[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),(o=e.static_len+3+7>>>3)<=(i=e.opt_len+3+7>>>3)&&(i=o)):i=o=n+5,n+4<=i&&-1!==t)SE(e,t,n,r);else if(4===e.strategy||o===i)lE(e,2+(r?1:0),3),vE(e,K_,Y_);else{lE(e,4+(r?1:0),3);var u=e,l=(t=e.l_desc.max_code+1,n=e.d_desc.max_code+1,s+1);for(lE(u,t-257,5),lE(u,n-1,5),lE(u,l-4,4),a=0;a<l;a++)lE(u,u.bl_tree[2*Z_[a]+1],3);bE(u,u.dyn_ltree,t-1),bE(u,u.dyn_dtree,n-1),vE(e,e.dyn_ltree,e.dyn_dtree)}hE(e),r&&pE(e)},ov=function(e,t,n){return e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Q_[n]+256+1)]++,e.dyn_dtree[2*sE(t)]++),e.sym_next===e.sym_end},s=function(e){lE(e,2,3),cE(e,256,K_),16===(e=e).bi_valid?(uE(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)},EE=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3<n?2e3:n;o=o+(i=i+t[r++]|0)|0,--a;);i%=65521,o%=65521}return i|o<<16|0},CE=new Uint32Array(function(){for(var e=[],t=0;t<256;t++){for(var n=t,r=0;r<8;r++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}()),OE=function(e,t,n,r){var i=CE,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e},RE={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"},e={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},xE=Nr,IE=_E,TE=Ie,ME=ov,AE=s,PE=e.Z_NO_FLUSH,LE=e.Z_PARTIAL_FLUSH,DE=e.Z_FULL_FLUSH,NE=e.Z_FINISH,FE=e.Z_BLOCK,UE=e.Z_OK,jE=e.Z_STREAM_END,zE=e.Z_STREAM_ERROR,BE=e.Z_DATA_ERROR,WE=e.Z_BUF_ERROR,HE=e.Z_DEFAULT_COMPRESSION,qE=e.Z_FILTERED,VE=e.Z_HUFFMAN_ONLY,GE=e.Z_RLE,JE=e.Z_FIXED,$E=e.Z_UNKNOWN,ZE=e.Z_DEFLATED,Pe=function(e,t){return e.msg=RE[t],t},KE=function(e){return 2*e-(4<e?9:0)},YE=function(e){for(var t=e.length;0<=--t;)e[t]=0},XE=function(e){for(var t,n,r=e.w_size,i=t=e.hash_size;n=e.head[--i],e.head[i]=r<=n?n-r:0,--t;);for(i=t=r;n=e.prev[--i],e.prev[i]=r<=n?n-r:0,--t;);},QE=function(e,t,n){return(t<<e.hash_shift^n)&e.hash_mask},eC=function(e,t){n=e.legacy_hash?e.ins_h=QE(e,e.ins_h,e.window[t+3-1]):(n=(n=e.window)[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24,e.ins_h=Math.imul(n,66521)+66521>>>16&e.hash_mask);var n,r=e.prev[t&e.w_mask]=e.head[n];return e.head[n]=t,r},tC=function(e){var t=e.state,n=t.pending;0!==(n=e.avail_out<n?e.avail_out:n)&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending)&&(t.pending_out=0)},nC=function(e,t){TE(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,tC(e.strm)},rC=function(e,t){e.pending_buf[e.pending++]=t},iC=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},oC=function(e,t,n,r){var i=e.avail_in;return 0===(i=r<i?r:i)?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=EE(e.adler,t,i,n):2===e.state.wrap&&(e.adler=OE(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},aC=function(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.w_size-262<e.strstart?e.strstart-(e.w_size-262):0,l=e.window,c=e.w_mask,f=e.prev,d=e.strstart+258,h=l[o+a-1],p=l[o+a];e.good_match<=e.prev_length&&(i>>=2),e.lookahead<s&&(s=e.lookahead);do{if(l[(n=t)+a]===p&&l[n+a-1]===h&&l[n]===l[o]&&l[++n]===l[o+1]){for(o+=2,n++;l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<d;);if(r=258-(d-o),o=d-258,a<r){if(e.match_start=t,s<=(a=r))break;h=l[o+a-1],p=l[o+a]}}}while((t=f[t&c])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead},sC=function(e){var t,n,r=e.w_size;do{if(t=e.window_size-e.lookahead-e.strstart,r+(r-262)<=e.strstart&&(e.window.set(e.window.subarray(r,r+r-t),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.strstart<e.insert&&(e.insert=e.strstart),XE(e),t+=r),0===e.strm.avail_in)break;if(t=oC(e.strm,e.window,e.strstart+e.lookahead,t),e.lookahead+=t,e.legacy_hash){if(3<=e.lookahead+e.insert)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=QE(e,e.ins_h,e.window[n+1]);e.insert&&(eC(e,n),n++,e.insert--,!(e.lookahead+e.insert<3)););}else if(3<e.lookahead+e.insert)for(n=e.strstart-e.insert;e.insert&&(eC(e,n),n++,e.insert--,!(e.lookahead+e.insert<=3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},uC=function(e,t){for(var n,r,i,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,s=e.strm.avail_in;n=65535,i=e.bi_valid+42>>3,!(e.strm.avail_out<i||(n=(i=e.strm.avail_out-i)<(n=n>(r=e.strstart-e.block_start)+e.strm.avail_in?r+e.strm.avail_in:n)?i:n)<o&&(0===n&&t!==NE||t===PE||n!==r+e.strm.avail_in)||(a=t===NE&&n===r+e.strm.avail_in?1:0,IE(e,0,0,a),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,tC(e.strm),r&&(n<r&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(oC(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n),0!==a)););return(s-=e.strm.avail_in)&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.strstart<e.insert)&&(e.insert=e.strstart),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=e.w_size-e.insert<s?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?4:t!==PE&&t!==NE&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(i=e.window_size-e.strstart,e.strm.avail_in>i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.strstart<e.insert)&&(e.insert=e.strstart),(i=i>e.strm.avail_in?e.strm.avail_in:i)&&(oC(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=e.w_size-e.insert<i?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),o=(i=65535<e.pending_buf_size-(i=e.bi_valid+42>>3)?65535:e.pending_buf_size-i)>e.w_size?e.w_size:i,((r=e.strstart-e.block_start)>=o||(r||t===NE)&&t!==PE&&0===e.strm.avail_in&&r<=i)&&(n=i<r?i:r,a=t===NE&&0===e.strm.avail_in&&n===r?1:0,IE(e,e.block_start,n,a),e.block_start+=n,tC(e.strm)),a?3:1)},Hr=function(e,t){for(var n,r;;){if(e.lookahead<262){if(sC(e),e.lookahead<262&&t===PE)return 1;if(0===e.lookahead)break}if((n=0)!==(n=3<=e.lookahead?eC(e,e.strstart):n)&&e.strstart-n<=e.w_size-262&&(e.match_length=aC(e,n)),3<=e.match_length)if(r=ME(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&3<=e.lookahead){for(e.match_length--;e.strstart++,n=eC(e,e.strstart),0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=QE(e,e.ins_h,e.window[e.strstart+1]));else r=ME(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(nC(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===NE?(nC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(nC(e,!1),0===e.strm.avail_out)?1:2},at=function(e,t){for(var n,r,i;;){if(e.lookahead<262){if(sC(e),e.lookahead<262&&t===PE)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(n=eC(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=aC(e,n),e.match_length<=5)&&(e.strategy===qE||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2),3<=e.prev_length&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,r=ME(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(n=eC(e,e.strstart)),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(nC(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=ME(e,0,e.window[e.strstart-1]))&&nC(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=ME(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===NE?(nC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(nC(e,!1),0===e.strm.avail_out)?1:2};function lC(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var cC=[new lC(0,0,0,0,uC),new lC(4,4,8,4,Hr),new lC(4,5,16,8,Hr),new lC(4,6,32,32,Hr),new lC(4,4,16,16,at),new lC(8,16,32,32,at),new lC(8,16,128,128,at),new lC(8,32,128,256,at),new lC(32,128,258,1024,at),new lC(32,258,258,4096,at)];function fC(){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=ZE,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.legacy_hash=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),YE(this.dyn_ltree),YE(this.dyn_dtree),YE(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),YE(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),YE(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var dC=function(e){var t;return!e||!(t=e.state)||t.strm!==e||42!==t.status&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&113!==t.status&&666!==t.status?1:0},hC=function(e){if(dC(e))return Pe(e,zE);e.total_in=e.total_out=0,e.data_type=$E;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=-2,xE(t),UE},pC=function(e){var t=hC(e);return t===UE&&((e=e.state).window_size=2*e.w_size,YE(e.head),e.max_lazy_match=cC[e.level].max_lazy,e.good_match=cC[e.level].good_length,e.nice_match=cC[e.level].nice_length,e.max_chain_length=cC[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),t},l=function(e,t,n,r,i,o,a){if(!e)return zE;var s=1;if(t===HE&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),i<1||9<i||n!==ZE||r<8||15<r||t<0||9<t||o<0||JE<o||8===r&&1!==s)return Pe(e,zE);8===r&&(r=9);var u=new fC;return(e.state=u).strm=e,u.status=42,u.wrap=s,u.gzhead=null,u.w_bits=r,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.legacy_hash=a?1:0,u.hash_bits=i+7,!u.legacy_hash&&u.hash_bits<15&&(u.hash_bits=15),u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new Uint8Array(2*u.w_size),u.head=new Uint16Array(u.hash_size),u.prev=new Uint16Array(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new Uint8Array(u.pending_buf_size),u.sym_buf=u.lit_bufsize,u.sym_end=3*(u.lit_bufsize-1),u.level=t,u.strategy=o,u.method=n,pC(e)},mC=l,gC=function(e,t){return dC(e)||2!==e.state.wrap?zE:(e.state.gzhead=t,UE)},vC=function(e,t){if(dC(e)||FE<t||t<0)return e?Pe(e,zE):zE;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==NE)return Pe(e,0===e.avail_out?WE:zE);var r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(tC(e),0===e.avail_out)return n.last_flush=-1,UE}else if(0===e.avail_in&&KE(t)<=KE(r)&&t!==NE)return Pe(e,WE);if(666===n.status&&0!==e.avail_in)return Pe(e,WE);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){r=ZE+(n.w_bits-8<<4)<<8;if(r|=(n.strategy>=VE||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(r|=32),iC(n,r+=31-r%31),0!==n.strstart&&(iC(n,e.adler>>>16),iC(n,65535&e.adler)),e.adler=1,n.status=113,tC(e),0!==n.pending)return n.last_flush=-1,UE}if(57===n.status)if(e.adler=0,rC(n,31),rC(n,139),rC(n,8),n.gzhead)rC(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),rC(n,255&n.gzhead.time),rC(n,n.gzhead.time>>8&255),rC(n,n.gzhead.time>>16&255),rC(n,n.gzhead.time>>24&255),rC(n,9===n.level?2:n.strategy>=VE||n.level<2?4:0),rC(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(rC(n,255&n.gzhead.extra.length),rC(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=OE(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(rC(n,0),rC(n,0),rC(n,0),rC(n,0),rC(n,0),rC(n,9===n.level?2:n.strategy>=VE||n.level<2?4:0),rC(n,3),n.status=113,tC(e),0!==n.pending)return n.last_flush=-1,UE;if(69===n.status){if(n.gzhead.extra){for(var i=n.pending,o=(65535&n.gzhead.extra.length)-n.gzindex;n.pending+o>n.pending_buf_size;){var a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=OE(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=a,tC(e),0!==n.pending)return n.last_flush=-1,UE;i=0,o-=a}r=new Uint8Array(n.gzhead.extra);n.pending_buf.set(r.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=OE(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var s,u=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>u&&(e.adler=OE(e.adler,n.pending_buf,n.pending-u,u)),tC(e),0!==n.pending)return n.last_flush=-1,UE;u=0}}while(s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,rC(n,s),0!=s);n.gzhead.hcrc&&n.pending>u&&(e.adler=OE(e.adler,n.pending_buf,n.pending-u,u)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var l,c=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>c&&(e.adler=OE(e.adler,n.pending_buf,n.pending-c,c)),tC(e),0!==n.pending)return n.last_flush=-1,UE;c=0}}while(l=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,rC(n,l),0!=l);n.gzhead.hcrc&&n.pending>c&&(e.adler=OE(e.adler,n.pending_buf,n.pending-c,c))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(tC(e),0!==n.pending))return n.last_flush=-1,UE;rC(n,255&e.adler),rC(n,e.adler>>8&255),e.adler=0}if(n.status=113,tC(e),0!==n.pending)return n.last_flush=-1,UE}if(0!==e.avail_in||0!==n.lookahead||t!==PE&&666!==n.status){r=0===n.level?uC(n,t):n.strategy===VE?function(e,t){for(var n;;){if(0===e.lookahead&&(sC(e),0===e.lookahead)){if(t===PE)return 1;break}if(e.match_length=0,n=ME(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(nC(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===NE?(nC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(nC(e,!1),0===e.strm.avail_out)?1:2}(n,t):n.strategy===GE?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=258){if(sC(e),e.lookahead<=258&&t===PE)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0<e.strstart&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){for(o=e.strstart+258;r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o;);e.match_length=258-(o-i),e.lookahead<e.match_length&&(e.match_length=e.lookahead)}if(3<=e.match_length?(n=ME(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=ME(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(nC(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===NE?(nC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(nC(e,!1),0===e.strm.avail_out)?1:2}(n,t):cC[n.level].func(n,t);if(3!==r&&4!==r||(n.status=666),1===r||3===r)return 0===e.avail_out&&(n.last_flush=-1),UE;if(2===r&&(t===LE?AE(n):t!==FE&&(IE(n,0,0,!1),t===DE)&&(YE(n.head),0===n.lookahead)&&(n.strstart=0,n.block_start=0,n.insert=0),tC(e),0===e.avail_out))return n.last_flush=-1,UE}return t!==NE||!(n.wrap<=0)&&(2===n.wrap?(rC(n,255&e.adler),rC(n,e.adler>>8&255),rC(n,e.adler>>16&255),rC(n,e.adler>>24&255),rC(n,255&e.total_in),rC(n,e.total_in>>8&255),rC(n,e.total_in>>16&255),rC(n,e.total_in>>24&255)):(iC(n,e.adler>>>16),iC(n,65535&e.adler)),tC(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending)?UE:jE},yC=function(e){var t;return dC(e)?zE:(t=e.state.status,e.state=null,113===t?Pe(e,BE):UE)},wC=function(e,t){var n=t.length;if(dC(e))return zE;var r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return zE;1===i&&(e.adler=EE(e.adler,t,n,0)),r.wrap=0,r.w_size<=n&&(0===i&&(YE(r.head),r.strstart=0,r.block_start=0,r.insert=0),(o=new Uint8Array(r.w_size)).set(t.subarray(n-r.w_size,n),0),t=o,n=r.w_size);var o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,sC(r);3<=r.lookahead;){for(var u=r.strstart,l=r.lookahead-2;eC(r,u),u++,--l;);r.strstart=u,r.lookahead=2,sC(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,UE},bC=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},kC=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==S(n))throw new TypeError(n+"must be non-object");for(var r in n)bC(n,r)&&(e[r]=n[r])}}return e},SC=function(e){for(var t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;for(var i=new Uint8Array(t),o=0,a=0,s=e.length;o<s;o++){var u=e[o];i.set(u,a),a+=u.length}return i},_C=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(nR){_C=!1}for(var EC=new Uint8Array(256),CC=0;CC<256;CC++)EC[CC]=252<=CC?6:248<=CC?5:240<=CC?4:224<=CC?3:192<=CC?2:1;EC[254]=EC[255]=1;var OC=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);for(var t,n,r,i,o=e.length,a=0,s=0;s<o;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),s=i=0;i<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),n<128?t[i++]=n:(n<2048?t[i++]=192|n>>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t},RC=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},xC=Object.prototype.toString,IC=e.Z_NO_FLUSH,TC=e.Z_SYNC_FLUSH,MC=e.Z_FULL_FLUSH,AC=e.Z_FINISH,PC=e.Z_OK,LC=e.Z_STREAM_END,DC={level:e.Z_DEFAULT_COMPRESSION,method:e.Z_DEFLATED,chunkSize:16384,windowBits:15,memLevel:8,strategy:e.Z_DEFAULT_STRATEGY,legacyHash:!0};function NC(e){this.options=kC({},DC,e||{});var e=this.options,t=(e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new RC,this.strm.avail_out=0,mC(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy,e.legacyHash));if(t!==PC)throw new Error(RE[t]);if(e.header&&gC(this.strm,e.header),e.dictionary){e="string"==typeof e.dictionary?OC(e.dictionary):"[object ArrayBuffer]"===xC.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary;if((t=wC(this.strm,e))!==PC)throw new Error(RE[t]);this._dict_set=!0}}function FC(e,t){t=new NC(t);if(t.push(e,!0),t.err)throw t.msg||RE[t.err];return t.result}NC.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;for(r=t===~~t?t:!0===t?AC:IC,"string"==typeof e?i.input=OC(e):"[object ArrayBuffer]"===xC.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(r===TC||r===MC)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(vC(i,r)===LC)return 0<i.next_out&&this.onData(i.output.subarray(0,i.next_out)),n=yC(this.strm),this.onEnd(n),this.ended=!0,n===PC;if(0!==i.avail_out){if(0<r&&0<i.next_out)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},NC.prototype.onData=function(e){this.chunks.push(e)},NC.prototype.onEnd=function(e){e===PC&&(this.result=SC(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var a={Deflate:NC,deflate:FC,deflateRaw:function(e,t){return(t=t||{}).raw=!0,FC(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,FC(e,t)},constants:e},UC=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),jC=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),zC=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),BC=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),WC=function(e,t,n,r,i,o,a,s){for(var u,l,c,f,d,h,p,m,g,v=s.bits,y=0,w=0,b=0,k=0,S=0,_=0,E=0,C=0,O=0,R=0,x=null,I=new Uint16Array(16),T=new Uint16Array(16),M=null,y=0;y<=15;y++)I[y]=0;for(w=0;w<r;w++)I[t[n+w]]++;for(S=v,k=15;1<=k&&0===I[k];k--);if(k<S&&(S=k),0===k)i[o++]=20971520,i[o++]=20971520,s.bits=1;else{for(b=1;b<k&&0===I[b];b++);for(S<b&&(S=b),y=C=1;y<=15;y++)if((C=(C<<1)-I[y])<0)return-1;if(0<C&&(0===e||1!==k))return-1;for(T[1]=0,y=1;y<15;y++)T[y+1]=T[y]+I[y];for(w=0;w<r;w++)0!==t[n+w]&&(a[T[t[n+w]]++]=w);if(h=0===e?(x=M=a,20):1===e?(x=UC,M=jC,257):(x=zC,M=BC,0),y=b,d=o,E=w=R=0,c=-1,f=(O=1<<(_=S))-1,1===e&&852<O||2===e&&592<O)return 1;for(;;){for(g=a[w]+1<h?(m=0,a[w]):a[w]>=h?(m=M[a[w]-h],x[a[w]-h]):(m=96,0),u=1<<(p=y-E),b=l=1<<_;i[d+(R>>E)+(l-=u)]=p<<24|m<<16|g|0,0!==l;);for(u=1<<y-1;R&u;)u>>=1;if(0!==u?R=(R&u-1)+u:R=0,w++,0==--I[y]){if(y===k)break;y=t[n+a[w]]}if(S<y&&(R&f)!==c){for(d+=b,C=1<<(_=y-(E=0===E?S:E));_+E<k&&!((C-=I[_+E])<=0);)_++,C<<=1;if(O+=1<<_,1===e&&852<O||2===e&&592<O)return 1;i[c=R&f]=S<<24|_<<16|d-o|0}}0!==R&&(i[d+R]=y-E<<24|64<<16|0),s.bits=S}return 0},HC=e.Z_FINISH,qC=e.Z_BLOCK,VC=e.Z_TREES,GC=e.Z_OK,JC=e.Z_STREAM_END,$C=e.Z_NEED_DICT,ZC=e.Z_STREAM_ERROR,KC=e.Z_DATA_ERROR,YC=e.Z_MEM_ERROR,XC=e.Z_BUF_ERROR,QC=e.Z_DEFLATED,eO=16209,tO=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function nO(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var rO,iO,oO=function(e){var t;return!e||!(t=e.state)||t.strm!==e||t.mode<16180||16211<t.mode?1:0},aO=function(e){var t;return oO(e)?ZC:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=16180,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,GC)},sO=function(e){var t;return oO(e)?ZC:((t=e.state).wsize=0,t.whave=0,t.wnext=0,aO(e))},uO=function(e,t){var n,r;return oO(e)||(r=e.state,t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?ZC:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,sO(e))},n=function(e,t){var n;return e?(n=new nO,(e.state=n).strm=e,n.window=null,n.mode=16180,(n=uO(e,t))!==GC&&(e.state=null),n):ZC},lO=!0,cO=function(e,t,n,r){var i,e=e.state;return null===e.window&&(e.window=new Uint8Array(1<<e.wbits)),0===e.wsize&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0),e.wsize<=r?(e.window.set(t.subarray(n-e.wsize,n),0),e.wnext=0,e.whave=e.wsize):((i=e.wsize-e.wnext)>r&&(i=r),e.window.set(t.subarray(n-r,n-r+i),e.wnext),(r-=i)?(e.window.set(t.subarray(n-r,n),0),e.wnext=r,e.whave=e.wsize):(e.wnext+=i,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=i))),0},fO=sO,dO=n,hO=function(e,t){var n,r,i,o,a,s,u,l,c,f,d,h,p,m,g,v,y,w,b,k,S,_,E,C,O=0,R=new Uint8Array(4),x=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(oO(e)||!e.output||!e.input&&0!==e.avail_in)return ZC;16191===(n=e.state).mode&&(n.mode=16192),a=e.next_out,i=e.output,o=e.next_in,r=e.input,l=n.hold,c=n.bits,f=s=e.avail_in,d=u=e.avail_out,_=GC;e:for(;;)switch(n.mode){case 16180:if(0===n.wrap)n.mode=16192;else{for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}2&n.wrap&&35615===l?(0===n.wbits&&(n.wbits=15),R[n.check=0]=255&l,R[1]=l>>>8&255,n.check=OE(n.check,R,2,0),c=l=0,n.mode=16181):(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31?(e.msg="incorrect header check",n.mode=eO):(15&l)!==QC?(e.msg="unknown compression method",n.mode=eO):(c-=4,S=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=S),15<S||S>n.wbits?(e.msg="invalid window size",n.mode=eO):(n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&l?16189:16191,c=l=0)))}break;case 16181:for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(n.flags=l,(255&n.flags)!==QC){e.msg="unknown compression method",n.mode=eO;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=eO;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&4&n.wrap&&(R[0]=255&l,R[1]=l>>>8&255,n.check=OE(n.check,R,2,0)),c=l=0,n.mode=16182;case 16182:for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.time=l),512&n.flags&&4&n.wrap&&(R[0]=255&l,R[1]=l>>>8&255,R[2]=l>>>16&255,R[3]=l>>>24&255,n.check=OE(n.check,R,4,0)),c=l=0,n.mode=16183;case 16183:for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&4&n.wrap&&(R[0]=255&l,R[1]=l>>>8&255,n.check=OE(n.check,R,2,0)),c=l=0,n.mode=16184;case 16184:if(1024&n.flags){for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&4&n.wrap&&(R[0]=255&l,R[1]=l>>>8&255,n.check=OE(n.check,R,2,0)),c=l=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&((h=(h=n.length)>s?s:h)&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+h),S)),512&n.flags&&4&n.wrap&&(n.check=OE(n.check,r,h,o)),s-=h,o+=h,n.length-=h),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===s)break e;for(h=0;S=r[o+h++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S)),S&&h<s;);if(512&n.flags&&4&n.wrap&&(n.check=OE(n.check,r,h,o)),s-=h,o+=h,S)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===s)break e;for(h=0;S=r[o+h++],n.head&&S&&n.length<65536&&(n.head.comment+=String.fromCharCode(S)),S&&h<s;);if(512&n.flags&&4&n.wrap&&(n.check=OE(n.check,r,h,o)),s-=h,o+=h,S)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=eO;break}c=l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=16191;break;case 16189:for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}e.adler=n.check=tO(l),c=l=0,n.mode=16190;case 16190:if(0===n.havedict)return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,$C;e.adler=n.check=1,n.mode=16191;case 16191:if(t===qC||t===VC)break e;case 16192:if(n.last)l>>>=7&c,c-=7&c,n.mode=16206;else{for(;c<3;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}switch(n.last=1&l,--c,3&(l>>>=1)){case 0:n.mode=16193;break;case 1:if(function(e){if(lO){rO=new Int32Array(512),iO=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(WC(1,e.lens,0,288,rO,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;WC(2,e.lens,0,32,iO,0,e.work,{bits:5}),lO=!1}e.lencode=rO,e.lenbits=9,e.distcode=iO,e.distbits=5}(n),n.mode=16199,t!==VC)break;l>>>=2,c-=2;break e;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=eO}l>>>=2,c-=2}break;case 16193:for(l>>>=7&c,c-=7&c;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=eO;break}if(n.length=65535&l,c=l=0,n.mode=16194,t===VC)break e;case 16194:n.mode=16195;case 16195:if(h=n.length){if(0===(h=u<(h=s<h?s:h)?u:h))break e;i.set(r.subarray(o,o+h),a),s-=h,o+=h,u-=h,a+=h,n.length-=h}else n.mode=16191;break;case 16196:for(;c<14;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(n.nlen=257+(31&l),l>>>=5,c-=5,n.ndist=1+(31&l),l>>>=5,c-=5,n.ncode=4+(15&l),l>>>=4,c-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=eO;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;c<3;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.lens[x[n.have++]]=7&l,l>>>=3,c-=3}for(;n.have<19;)n.lens[x[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},_=WC(0,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,_){e.msg="invalid code lengths set",n.mode=eO;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;v=(O=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&O,!((g=O>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(y<16)l>>>=g,c-=g,n.lens[n.have++]=y;else{if(16===y){for(C=g+2;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(l>>>=g,c-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=eO;break}S=n.lens[n.have-1],h=3+(3&l),l>>>=2,c-=2}else if(17===y){for(C=g+3;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}S=0,h=3+(7&(l>>>=g)),l>>>=3,c=c-g-3}else{for(C=g+7;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}S=0,h=11+(127&(l>>>=g)),l>>>=7,c=c-g-7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=eO;break}for(;h--;)n.lens[n.have++]=S}}if(n.mode===eO)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=eO;break}if(n.lenbits=9,E={bits:n.lenbits},_=WC(1,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,_){e.msg="invalid literal/lengths set",n.mode=eO;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},_=WC(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,_){e.msg="invalid distances set",n.mode=eO;break}if(n.mode=16199,t===VC)break e;case 16199:n.mode=16200;case 16200:if(6<=s&&258<=u){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,function(e,t){var n,r,i,o,a,s,u=e.state,l=e.next_in,c=e.input,f=l+(e.avail_in-5),d=e.next_out,h=e.output,p=d-(t-e.avail_out),m=d+(e.avail_out-257),g=u.dmax,v=u.wsize,y=u.whave,w=u.wnext,b=u.window,k=u.hold,S=u.bits,_=u.lencode,E=u.distcode,C=(1<<u.lenbits)-1,O=(1<<u.distbits)-1;t:do{for(S<15&&(k+=c[l++]<<S,S+=8,k+=c[l++]<<S,S+=8),n=_[k&C];;){if(k>>>=r=n>>>24,S-=r,0==(r=n>>>16&255))h[d++]=65535&n;else{if(!(16&r)){if(0==(64&r)){n=_[(65535&n)+(k&(1<<r)-1)];continue}if(32&r){u.mode=16191;break t}e.msg="invalid literal/length code",u.mode=16209;break t}for(i=65535&n,(r&=15)&&(S<r&&(k+=c[l++]<<S,S+=8),i+=k&(1<<r)-1,k>>>=r,S-=r),S<15&&(k+=c[l++]<<S,S+=8,k+=c[l++]<<S,S+=8),n=E[k&O];;){if(k>>>=r=n>>>24,S-=r,!(16&(r=n>>>16&255))){if(0==(64&r)){n=E[(65535&n)+(k&(1<<r)-1)];continue}e.msg="invalid distance code",u.mode=16209;break t}if(o=65535&n,S<(r&=15)&&(k+=c[l++]<<S,(S+=8)<r)&&(k+=c[l++]<<S,S+=8),(o+=k&(1<<r)-1)>g){e.msg="invalid distance too far back",u.mode=16209;break t}if(k>>>=r,S-=r,o>(r=d-p)){if((r=o-r)>y&&u.sane){e.msg="invalid distance too far back",u.mode=16209;break t}if(s=b,(a=0)===w){if(a+=v-r,r<i){for(i-=r;h[d++]=b[a++],--r;);a=d-o,s=h}}else if(w<r){if(a+=v+w-r,(r-=w)<i){for(i-=r;h[d++]=b[a++],--r;);if(a=0,w<i){for(i-=r=w;h[d++]=b[a++],--r;);a=d-o,s=h}}}else if(a+=w-r,r<i){for(i-=r;h[d++]=b[a++],--r;);a=d-o,s=h}for(;2<i;)h[d++]=s[a++],h[d++]=s[a++],h[d++]=s[a++],i-=3;i&&(h[d++]=s[a++],1<i)&&(h[d++]=s[a++])}else{for(a=d-o;h[d++]=h[a++],h[d++]=h[a++],h[d++]=h[a++],2<(i-=3););i&&(h[d++]=h[a++],1<i)&&(h[d++]=h[a++])}break}}break}}while(l<f&&d<m);l-=i=S>>3,k&=(1<<(S-=i<<3))-1,e.next_in=l,e.next_out=d,e.avail_in=l<f?f-l+5:5-(l-f),e.avail_out=d<m?m-d+257:257-(d-m),u.hold=k,u.bits=S}(e,d),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,16191===n.mode&&(n.back=-1);break}for(n.back=0;v=(O=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&O,!((g=O>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(v&&0==(240&v)){for(w=g,b=v,k=y;v=(O=n.lencode[k+((l&(1<<w+b)-1)>>w)])>>>16&255,y=65535&O,!(w+(g=O>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,n.back+=w}if(l>>>=g,c-=g,n.back+=g,n.length=y,0===v){n.mode=16205;break}if(32&v){n.back=-1,n.mode=16191;break}if(64&v){e.msg="invalid literal/length code",n.mode=eO;break}n.extra=15&v,n.mode=16201;case 16201:if(n.extra){for(C=n.extra;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;v=(O=n.distcode[l&(1<<n.distbits)-1])>>>16&255,y=65535&O,!((g=O>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(0==(240&v)){for(w=g,b=v,k=y;v=(O=n.distcode[k+((l&(1<<w+b)-1)>>w)])>>>16&255,y=65535&O,!(w+(g=O>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,n.back+=w}if(l>>>=g,c-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=eO;break}n.offset=y,n.extra=15&v,n.mode=16203;case 16203:if(n.extra){for(C=n.extra;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=eO;break}n.mode=16204;case 16204:if(0===u)break e;if(n.offset>(h=d-u)){if((h=n.offset-h)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=eO;break}p=h>n.wnext?(h-=n.wnext,n.wsize-h):n.wnext-h,h>n.length&&(h=n.length),m=n.window}else m=i,p=a-n.offset,h=n.length;for(u-=h=u<h?u:h,n.length-=h;i[a++]=m[p++],--h;);0===n.length&&(n.mode=16200);break;case 16205:if(0===u)break e;i[a++]=n.length,u--,n.mode=16200;break;case 16206:if(n.wrap){for(;c<32;){if(0===s)break e;s--,l|=r[o++]<<c,c+=8}if(d-=u,e.total_out+=d,n.total+=d,4&n.wrap&&d&&(e.adler=n.check=(n.flags?OE:EE)(n.check,i,d,a-d)),d=u,4&n.wrap&&(n.flags?l:tO(l))!==n.check){e.msg="incorrect data check",n.mode=eO;break}c=l=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=eO;break}c=l=0}n.mode=16208;case 16208:_=JC;break e;case eO:_=KC;break e;case 16210:return YC;default:return ZC}return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,(n.wsize||d!==e.avail_out&&n.mode<eO&&(n.mode<16206||t!==HC))&&cO(e,e.output,e.next_out,d-e.avail_out),d-=e.avail_out,e.total_in+=f-=e.avail_in,e.total_out+=d,n.total+=d,4&n.wrap&&d&&(e.adler=n.check=(n.flags?OE:EE)(n.check,i,d,e.next_out-d)),e.data_type=n.bits+(n.last?64:0)+(16191===n.mode?128:0)+(16199===n.mode||16194===n.mode?256:0),_=(0==f&&0===d||t===HC)&&_===GC?XC:_},pO=function(e){var t;return oO(e)?ZC:((t=e.state).window&&(t.window=null),e.state=null,GC)},mO=function(e,t){return oO(e)||0==(2&(e=e.state).wrap)?ZC:((e.head=t).done=!1,GC)},gO=function(e,t){var n,r=t.length;return oO(e)||0!==(n=e.state).wrap&&16190!==n.mode?ZC:16190===n.mode&&EE(1,t,r,0)!==n.check?KC:cO(e,t,r,r)?(n.mode=16210,YC):(n.havedict=1,GC)},vO=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},yO=Object.prototype.toString,wO=e.Z_NO_FLUSH,bO=e.Z_FINISH,kO=e.Z_OK,SO=e.Z_STREAM_END,_O=e.Z_NEED_DICT,EO=e.Z_STREAM_ERROR,CO=e.Z_DATA_ERROR,OO=e.Z_MEM_ERROR,RO=e.Z_BUF_ERROR,xO={chunkSize:65536,windowBits:15,to:""};function IO(e){this.options=kC({},xO,e||{});var t=this.options,e=(t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits)&&(t.windowBits=-15),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new RC,this.strm.avail_out=0,dO(this.strm,t.windowBits));if(e!==kO)throw new Error(RE[e]);if(this.header=new vO,mO(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=OC(t.dictionary):"[object ArrayBuffer]"===yO.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=gO(this.strm,t.dictionary))!==kO)throw new Error(RE[e])}function TO(e,t){t=new IO(t);if(t.push(e,!0),t.err)throw t.msg||RE[t.err];return t.result}IO.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize,a=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?bO:wO,"[object ArrayBuffer]"===yO.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(n=hO(i,r))===_O&&a&&((n=gO(i,a))===kO?n=hO(i,r):n===CO&&(n=_O));0<i.avail_in&&n===SO&&2&i.state.wrap&&0!==i.state.flags&&0!==i.input[i.next_in];)fO(i),n=hO(i,r);switch(n){case EO:case CO:case _O:case OO:return this.onEnd(n),!(this.ended=!0)}var s,u,l,c=i.avail_out;if(i.next_out&&(0===i.avail_out||n===SO||0<r)&&("string"===this.options.to?(s=function(e,t){for(var n=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+EC[e[n]]>t?n:t}(i.output,i.next_out),u=i.next_out-s,l=function(e,t){var n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));for(var r=new Array(2*n),i=0,o=0;o<n;){var a=e[o++];if(a<128)r[i++]=a;else{var s=EC[a];if(4<s)r[i++]=65533,o+=s-1;else{for(a&=2===s?31:3===s?15:7;1<s&&o<n;)a=a<<6|63&e[o++],s--;1<s?r[i++]=65533:a<65536?r[i++]=a:(a-=65536,r[i++]=55296|a>>10&1023,r[i++]=56320|1023&a)}}}var u=r,l=i;if(l<65534&&u.subarray&&_C)return String.fromCharCode.apply(null,u.length===l?u:u.subarray(0,l));for(var c="",f=0;f<l;f++)c+=String.fromCharCode(u[f]);return c}(i.output,s),i.next_out=u,i.avail_out=o-u,u&&i.output.set(i.output.subarray(s,s+u),0),this.onData(l)):(this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out)),i.avail_out=0,i.next_out=0)),n!==kO&&n!==RO||0!==c){if(n===SO)return n=pO(this.strm),this.onEnd(n),this.ended=!0;if(0===i.avail_in){if(r===bO)return n=pO(this.strm),this.onEnd(n===kO?RO:n),!(this.ended=!0);break}}}return!0},IO.prototype.onData=function(e){this.chunks.push(e)},IO.prototype.onEnd=function(e){e===kO&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=SC(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var MO={Inflate:IO,inflate:TO,inflateRaw:function(e,t){return(t=t||{}).raw=!0,TO(e,t)},ungzip:TO,constants:e},AO={Deflate:a.Deflate,deflate:a.deflate,deflateRaw:a.deflateRaw,gzip:a.gzip,Inflate:MO.Inflate,inflate:MO.inflate,inflateRaw:MO.inflateRaw,ungzip:MO.ungzip,constants:e},PO=(FO.prototype.uploadReplay=function(n){return dl(this,void 0,void 0,function(){var t;return hl(this,function(e){switch(e.label){case 0:if(this.isUploading)return Uy("Uploader","Upload in progress, skipping"),[2,!1];this.isUploading=!0,e.label=1;case 1:return e.trys.push([1,3,4,5]),(t=this.config.beforeSend(n))?[4,this.doUploadWithRetry(t,0)]:(m("Uploader","Upload cancelled by beforeSend"),[2,!1]);case 2:return e.sent(),m("Uploader","Upload success:",{replay_id:n.replay_id,segment_id:n.segment_id}),[2,!0];case 3:return jy("Uploader","Upload failed:",t=e.sent()),this.config.onError(t),[2,!1];case 4:return this.isUploading=!1,[7];case 5:return[2]}})})},FO.prototype.doUploadWithRetry=function(r,i){return dl(this,void 0,void 0,function(){var t,n;return hl(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,5]),[4,this.doUpload(r)];case 1:return e.sent(),[3,5];case 2:return t=e.sent(),i<this.config.maxRetries?(m("Uploader","Retrying in "+(n=1e3*Math.pow(2,i))+"ms (attempt "+(i+1)+"/"+this.config.maxRetries+")"),[4,this.sleep(n)]):[3,4];case 3:return e.sent(),[2,this.doUploadWithRetry(r,i+1)];case 4:throw t;case 5:return[2]}})})},FO.prototype.prepareUploadPayload=function(e){var t=e.replay_format||"rrweb",n=e.events_encoding||"plain_json";if("rrweb"!==t)return e;if(!this.config.eventsCompression||"gzip_base64"===n)return h(h({},e),{replay_format:t,platform:e.platform||"web",events_encoding:n});try{var r=AO.gzip(e.events),i=this.uint8ArrayToBase64(r),o=e.events.length,a=r.length,s=i.length;return m("Uploader","Events compressed: "+Math.round(o/1024)+"KB -> gzip "+Math.round(a/1024)+"KB -> base64 "+Math.round(s/1024)+"KB"),h(h({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"gzip_base64",events:i})}catch(X){return Uy("Uploader","Events compression failed, fallback to plain_json:",X),h(h({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"plain_json"})}},FO.prototype.uint8ArrayToBase64=function(e){for(var t="",n=0;n<e.length;n+=32768){for(var r=e.subarray(n,n+32768),i="",o=0;o<r.length;o++)i+=String.fromCharCode(r[o]);t+=i}if("function"==typeof btoa)return btoa(t);if("undefined"!=typeof Buffer)return Buffer.from(e).toString("base64");throw new Error("base64 encode is not supported")},FO.prototype.doUpload=function(i){return dl(this,void 0,void 0,function(){var t,n,r;return hl(this,function(e){switch(e.label){case 0:if(t=this.prepareUploadPayload(i),r=JSON.stringify(t),n={"Content-Type":"application/json","X-App-ID":this.config.appId},m("Uploader","Sending replay payload: "+Math.round(r.length/1024)+"KB, events_encoding="+(t.events_encoding||"plain_json")),r.length<65536||m("Uploader","Data size "+Math.round(r.length/1024)+"KB exceeds keepalive limit, using normal fetch"),this.config.transport)return[4,this.config.transport.request({kind:"replay",url:this.config.uploadUrl,method:"POST",headers:n,body:r})];throw new Error("Replay Transport is not configured");case 1:if(t=e.sent(),!(n=t||{ok:!1,status:0,statusText:"Transport failed"}).ok)throw new Error("HTTP "+(n.status||0)+": "+(n.statusText||"Transport failed"));if(0!==(r="string"==typeof n.body?JSON.parse(n.body):n.body).code)throw new Error("Server error (code "+r.code+"): "+r.message);return[2]}})})},FO.prototype.sendBeacon=function(e){var t;try{var n=this.prepareUploadPayload(e),r=JSON.stringify(n);return!(null==(t=this.config.transport)||!t.handoff||(this.config.transport.handoff({kind:"replay",url:this.config.uploadUrl,method:"POST",contentType:"application/json",body:r,sendBeacon:!0}),0))}catch(X){return jy("Uploader","sendBeacon failed:",X),!1}},FO.prototype.isUploadInProgress=function(){return this.isUploading},FO.prototype.sleep=function(t){return new Promise(function(e){return setTimeout(e,t)})},FO),LO=["a","button",'input[type="button"]','input[type="submit"]','[role="button"]',"[onclick]","[ng-click]","[v-on\\:click]"].join(","),DO=(NO.prototype.start=function(){this.isRunning||(document.addEventListener("pointerdown",this.handlePointerDown,!0),document.addEventListener("click",this.handleClick,!0),this.isRunning=!0,m("ClickDetector","Started"))},NO.prototype.stop=function(){this.isRunning&&(document.removeEventListener("pointerdown",this.handlePointerDown,!0),document.removeEventListener("click",this.handleClick,!0),this.cleanupSlowClick(),this.isRunning=!1,m("ClickDetector","Stopped"))},NO.prototype.handlePointerDown=function(e){var t,n,r=this,i=e.target;i&&i instanceof Element&&(i=this.getClickableElement(i))&&(this.cleanupSlowClick(),this.clickStartTime=Date.now(),this.clickNode=i,t=this.getNodeInfo(i),n=this.getExternalNavigationReason(e,i),this.options.onClickStart({node:t,timestamp:this.clickStartTime,target:i,event:e,effectiveActionReason:n||undefined}),n?this.markEffectiveAction(n):(this.slowClickTimeoutId=setTimeout(function(){r.handleSlowClick("timeout")},this.options.slowClickTimeout),this.startMutationObserver()))},NO.prototype.handleClick=function(e){var t=this,n=e.target,r=Date.now();this.rageActiveTarget&&r-this.rageLastClickTime>=this.options.rageClickWindow&&(this.rageActiveTarget=null,this.rageLastClickTime=0),this.rageActiveTarget&&this.isSameTarget(this.rageActiveTarget,n)?this.rageLastClickTime=r:(this.clickHistory.push({time:r,target:n}),this.clickHistory=this.clickHistory.filter(function(e){return r-e.time<t.options.rageClickWindow}),(e=this.clickHistory.filter(function(e){return t.isSameTarget(e.target,n)})).length>=this.options.rageClickCount&&(this.options.onRageClick({node:this.getNodeInfo(n),clickCount:e.length,timeWindowMs:this.options.rageClickWindow,timestamp:r}),this.rageActiveTarget=n,this.rageLastClickTime=r))},NO.prototype.startMutationObserver=function(){var t=this;this.clickNode&&document.body&&"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver(function(e){t.hasSignificantMutation(e)&&(t.emitEffectiveAction("dom_mutation"),t.handleSlowClick("mutation"))}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","style","hidden","disabled","aria-hidden","aria-disabled","aria-busy"],characterData:!0}))},NO.prototype.hasSignificantMutation=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if("characterData"===r.type)return!0;if("childList"===r.type&&(0<r.addedNodes.length||0<r.removedNodes.length)&&Array.from(r.addedNodes).concat(Array.from(r.removedNodes)).some(function(e){return e.nodeType===Node.ELEMENT_NODE&&!["SCRIPT","STYLE","LINK"].includes(e.tagName)}))return!0;if("attributes"===r.type){r=r.attributeName;if(["class","style","hidden","disabled","aria-hidden","aria-disabled","aria-busy"].includes(r||""))return!0}}return!1},NO.prototype.handleSlowClick=function(e){var t;this.clickNode&&this.clickStartTime&&((t=Date.now()-this.clickStartTime)>=this.options.slowClickThreshold&&this.options.onSlowClick({node:this.getNodeInfo(this.clickNode),timeAfterClickMs:t,endReason:e,timestamp:this.clickStartTime}),this.cleanupSlowClick())},NO.prototype.cleanupSlowClick=function(){this.slowClickTimeoutId&&(clearTimeout(this.slowClickTimeoutId),this.slowClickTimeoutId=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.clickStartTime=0,this.clickNode=null},NO.prototype.isSameTarget=function(e,t){return e===t||e.contains(t)||t.contains(e)},NO.prototype.markEffectiveAction=function(e){this.clickNode&&this.clickStartTime&&(this.emitEffectiveAction(e),this.cleanupSlowClick())},NO.prototype.emitEffectiveAction=function(e){this.clickNode&&this.options.onEffectiveAction({reason:e,timestamp:Date.now(),node:this.getNodeInfo(this.clickNode)})},NO.prototype.getClickableElement=function(e){return e.matches(LO)?e:e.closest(LO)},NO.prototype.getExternalNavigationReason=function(e,t){var n=t.closest("a");if(n){if(n.download)return"download";var r=(n.getAttribute("target")||"").toLowerCase();if(r&&"_self"!==r)return"external_navigation";if(n.href&&(1===e.button||e.metaKey||e.ctrlKey||e.shiftKey))return"external_navigation"}r=t.closest("form"),n=((null==r?void 0:r.getAttribute("target"))||"").toLowerCase();return n&&"_self"!==n?"external_navigation":t.hasAttribute("data-tdem-ignore-dead-click")||t.closest("[data-tdem-ignore-dead-click]")||t.hasAttribute("data-tdem-effective-action")||t.closest("[data-tdem-effective-action]")?"custom":null},NO.prototype.getNodeInfo=function(e){var t;return{id:(null==(t=e.__sn)?void 0:t.id)||0,tagName:e.tagName.toLowerCase(),textContent:(e.textContent||"").trim().substring(0,100),selector:this.getSelector(e)}},NO.prototype.getSelector=function(e){for(var t=[],n=e;n&&n!==document.body&&t.length<5;){var r,i=n.tagName.toLowerCase();if(n.id){i+="#"+n.id,t.unshift(i);break}n.className&&"string"==typeof n.className&&0<(r=n.className.trim().split(/\s+/).slice(0,2)).length&&(i+="."+r.join(".")),t.unshift(i),n=n.parentElement}return t.join(" > ")},NO.prototype.isActive=function(){return this.isRunning},NO);function NO(e){var t;void 0===e&&(e={}),this.isRunning=!1,this.clickStartTime=0,this.clickNode=null,this.slowClickTimeoutId=null,this.mutationObserver=null,this.clickHistory=[],this.rageActiveTarget=null,this.rageLastClickTime=0,this.options={slowClickTimeout:null!=(t=e.slowClickTimeout)?t:7e3,slowClickThreshold:null!=(t=e.slowClickThreshold)?t:3e3,rageClickCount:null!=(t=e.rageClickCount)?t:5,rageClickWindow:null!=(t=e.rageClickWindow)?t:1e3,onSlowClick:e.onSlowClick||function(){},onRageClick:e.onRageClick||function(){},onClickStart:e.onClickStart||function(){},onEffectiveAction:e.onEffectiveAction||function(){},onDeadClick:e.onDeadClick||function(){}},this.handleClick=this.handleClick.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this)}function FO(e){var t;this.isUploading=!1,this.useCompression=!1,this.config={uploadUrl:e.uploadUrl||"/api/v1/collect/replay",appId:e.appId,maxRetries:null!=(t=e.maxRetries)?t:3,beforeSend:e.beforeSend||function(e){return e},onError:e.onError||function(){},eventsCompression:null==(t=e.eventsCompression)||t,transport:e.transport}}function UO(e){return Number.isNaN(e)?0:Math.max(0,Math.min(1,e))}function jO(e){return UO((e=e,(Number.isNaN(e)?0:Math.max(0,Math.min(100,e)))/100))}function zO(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function BO(e,t){var e=!1===(e=e)||e===undefined?{enabled:!1,sessionSampleRate:.1,errorSampleRate:1,errorTraceback:!0}:!0===e?{enabled:!0,sessionSampleRate:.1,errorSampleRate:1,errorTraceback:!0}:{enabled:!1!==e.enabled,sessionSampleRate:"number"==typeof e.sessionSampleRate?UO(e.sessionSampleRate):.1,errorSampleRate:"number"==typeof e.errorSampleRate?UO(e.errorSampleRate):1,errorTraceback:e.errorTraceback===undefined||!!e.errorTraceback},t=t&&"object"===S(t)?t:null,n=e.enabled,r=(t&&zO(t,"enabled")&&(n=e.enabled&&!!t.enabled),e.sessionSampleRate),i=e.errorSampleRate,e=e.errorTraceback;return n&&t&&(zO(t,"replay_sample_rate")&&t.replay_sample_rate!==undefined&&null!==t.replay_sample_rate&&(r=jO(Number(t.replay_sample_rate))),zO(t,"error_traceback")&&t.error_traceback!==undefined&&null!==t.error_traceback&&(e=!!t.error_traceback),zO(t,"error_sample_rate"))&&t.error_sample_rate!==undefined&&null!==t.error_sample_rate&&(i=jO(Number(t.error_sample_rate))),{enabled:n,sessionSampleRate:r,errorSampleRate:e?i:0,errorTraceback:e}}function WO(e,t){return h(h({},e),{enabled:t.enabled,sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,errorTraceback:t.errorTraceback})}function HO(e){var t=null==(t=e)?void 0:t._tdemSampleGate;if(!t)return 1;if(t.isDecided&&t.isSampled)return(!(t=e._effectiveReplayPolicy)||t.enabled)&&!1!==e._replaySampled}new o({name:"sessionReplay"});var qO=new o({name:"sessionReplay",sessionManager:null,eventBuffer:null,recorderManager:null,samplerManager:null,uploader:null,clickDetector:null,flushTimer:null,replayConfig:null,isInitialized:!1,errorTraceback:!0,_tdemRef:null,_isCheckoutFlushing:!1,_lastLifecycleSnapshotAt:0,init:function(e){},applyEffectivePolicy:function(e){var t,n;if(this.errorTraceback=e.errorTraceback,this.replayConfig&&(this.replayConfig=WO(this.replayConfig,e)),this.samplerManager&&this.samplerManager.updateRates(e.sessionSampleRate,e.errorSampleRate),this.isInitialized){if(e.enabled)return(n=this.samplerManager)?0<e.sessionSampleRate||e.errorTraceback&&0<e.errorSampleRate?!e.errorTraceback&&n.isBufferMode()?(m("Plugin","Error traceback off while in buffer, stopping replay"),this.stopReplay(),null!=(t=this.eventBuffer)&&t.clear(),void n.forceMode(!1)):void(e.errorTraceback&&e.sessionSampleRate<=0&&0<e.errorSampleRate&&n.isSessionMode()&&(m("Plugin","Remote SSR=0 with traceback on: demote session→buffer"),n.forceMode("buffer"),this.flushTimer)&&(clearInterval(this.flushTimer),this.flushTimer=null)):(m("Plugin","Effective policy no longer allows recording, stopping"),this.stopReplay(),null!=(t=this.eventBuffer)&&t.clear(),void n.forceMode(!1)):void 0;m("Plugin","Effective policy disabled, stopping replay"),this.stopReplay(),null!=(e=this.eventBuffer)&&e.clear()}},shouldSkipBufferFlush:function(){var e;return!0===(null==(e=this.samplerManager)?void 0:e.isBufferMode())},onNewTdem:function(e,t){var n,r,t=this.parseConfig(t),i=null!=(i=t.debug)&&i,i=(Dy=i,e._effectiveReplayPolicy);i||(i=BO(t,(n=e._prefetchedConfigData)&&"object"===S(n)&&("replay_sample_rate"in n||"error_traceback"in n||"error_sample_rate"in n||"tdem_sample_rate"in n||"enabled"in n)?(r={},Object.prototype.hasOwnProperty.call(n,"enabled")&&(r.enabled=!!n.enabled),Object.prototype.hasOwnProperty.call(n,"replay_sample_rate")&&(r.replay_sample_rate=Number(n.replay_sample_rate)),Object.prototype.hasOwnProperty.call(n,"error_traceback")&&(r.error_traceback=!!n.error_traceback),Object.prototype.hasOwnProperty.call(n,"error_sample_rate")&&(r.error_sample_rate=Number(n.error_sample_rate)),r):null),e._effectiveReplayPolicy=i,e._replaySampled=i.enabled),i.enabled?(n=WO(h(h({},t),{enabled:!0}),i),this.replayConfig=n,this.errorTraceback=i.errorTraceback,this._tdemRef=e,this.initializeModules(e,n),(r=this.samplerManager.initializeSampling()).shouldRecord?(this.startReplay(e,n,r.mode),this.registerReplaySamplingCheck(e,n),this.listenForErrors(e,n),this.listenForPerformance(e),this.listenForLifecycle(e,n),this.listenForUnload(e),this.isInitialized=!0):m("Plugin","Not sampled by sampler, skipping")):m("Plugin","disabled by effective policy")},registerReplaySamplingCheck:function(t,e){var n=this,r=function(e){clearInterval(i),e?(m("Plugin","Session/policy rejected, stopping replay and clearing buffer"),n.stopReplay(),n.eventBuffer&&n.eventBuffer.clear()):m("Plugin","Session sampled, replay continues")},i=setInterval(function(){var e=null==(e=t)?void 0:e._tdemSampleGate;e&&e.isDecided&&(e.isSampled&&(!(e=t._effectiveReplayPolicy)||e.enabled)?r(!1):r(!0))},50);t.lifeCycle.on("destroy",function(){clearInterval(i)})},parseConfig:function(e){return!0===e?{enabled:!0}:"object"===S(e)?h(h({},e),{enabled:!1!==e.enabled}):{enabled:!1}},initializeModules:function(t,e){var n=this,r=(this.sessionManager=new zy({stickySession:null==(r=e.stickySession)||r}),this.sessionManager.setTdemInstance(t),t.sessionManager=this.sessionManager,this.eventBuffer=new Vy({},null!=(r=e.useCompression)&&r),this.samplerManager=new B_({sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate}),this.recorderManager=new z_({onRecordingEvent:function(e){n.handleRecordingEvent(e,t)},onCheckout:function(){if(!n._isCheckoutFlushing){n._isCheckoutFlushing=!0;try{var e,t;n.shouldSkipBufferFlush()?m("SessionReplay","Checkout in buffer mode (error traceback), skip flush"):(e=n._tdemRef,t=n.replayConfig,e&&t&&n.eventBuffer&&!n.eventBuffer.isEmpty()&&(m("SessionReplay","Checkout triggered, flushing current buffer"),n.flushReplayData(e,t,!0)))}finally{n._isCheckoutFlushing=!1}}},mode:"session"},e),(t.config.url||t.config.hostUrl||"").replace(/\/+$/,""));this.uploader=new PO({uploadUrl:e.uploadUrl||r+"/api/v1/collect/replay",appId:String(t.config.id||""),beforeSend:e.beforeSend,onError:e.onError,eventsCompression:null==(r=e.eventsCompression)||r,transport:null==(r=t.getInternalTransport)?void 0:r.call(t)}),this.clickDetector=new DO({slowClickTimeout:e.slowClickTimeout,slowClickThreshold:e.slowClickThreshold,rageClickCount:e.rageClickCount,rageClickWindow:e.rageClickWindow,onSlowClick:function(e){n.handleSlowClick(e,t)},onRageClick:function(e){n.handleRageClick(e,t)}}),m("Plugin","Modules initialized")},startReplay:function(e,t,n){var r;this.sessionManager&&this.recorderManager&&this.eventBuffer?(m("Plugin","Session started:",(this.sessionManager.restoreSession()||this.sessionManager.createSession(n)).id,"mode:",n),this.recorderManager.options.mode=n,r=F_(h({maskAllText:!1!==t.maskAllInputs,maskAllInputs:t.maskAllInputs,maskTextSelector:t.maskTextSelector,blockSelector:t.blockSelector,ignoreSelector:t.ignoreSelector},t.privacy)),this.recorderManager.startRecording({privacy:r}),this.clickDetector&&this.clickDetector.start(),"session"===n?this.startFlushTimer(e,t):m("Plugin","Buffer mode - flush on error only")):jy("Plugin","Modules not initialized")},handleRecordingEvent:function(e,t){this.eventBuffer&&this.sessionManager&&(this.sanitizeDataURLs(e),this.eventBuffer.addEvent(e),this.sessionManager.updateActivity())},sanitizeDataURLs:function(e){var t=e.type;if(2===t){var n=null==(n=e.data)?void 0:n.node;n&&this.sanitizeNodeTree(n,1024)}else if(3===t){n=e.data;if(0===(null==n?void 0:n.source)&&Array.isArray(n.adds)){for(var r=0,i=n.adds;r<i.length;r++){var o=i[r];null!=o&&o.node&&this.sanitizeNodeTree(o.node,1024)}if(Array.isArray(n.attributes))for(var a=0,s=n.attributes;a<s.length;a++){var u=s[a];if(null!=u&&u.attributes)for(var l=0,c=Object.entries(u.attributes);l<c.length;l++){var f=c[l],d=f[0],f=f[1];"string"==typeof f&&1024<f.length&&f.startsWith("data:")&&(u.attributes[d]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}}}}},sanitizeNodeTree:function(e,t){if(e){if(e.attributes)for(var n=e.attributes,r=0,i=Object.keys(n);r<i.length;r++){var o=i[r],a=n[o];"string"==typeof a&&a.length>t&&a.startsWith("data:")&&(n[o]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}if(Array.isArray(e.childNodes))for(var s=0,u=e.childNodes;s<u.length;s++){var l=u[s];this.sanitizeNodeTree(l,t)}}},handleSlowClick:function(e,t){m("ClickDetector","Slow click detected:",e.timeAfterClickMs,"ms"),this.addCustomEvent({category:"ui.slowClickDetected",message:"Slow click: "+e.timeAfterClickMs+"ms on "+e.node.tagName,data:{node:e.node,timeAfterClickMs:e.timeAfterClickMs,endReason:e.endReason}},t)},handleRageClick:function(e,t){m("ClickDetector","Rage click detected:",e.clickCount,"clicks"),this.addCustomEvent({category:"ui.multiClick",message:"Rage click: "+e.clickCount+" clicks on "+e.node.tagName,data:{node:e.node,clickCount:e.clickCount,timeWindowMs:e.timeWindowMs}},t)},addCustomEvent:function(e,t){this.eventBuffer&&(e={type:5,data:{tag:e.category,payload:h({message:e.message},e.data)},timestamp:Date.now()},this.eventBuffer.addEvent(e))},startFlushTimer:function(e,t){var n=this;this.flushTimer&&clearInterval(this.flushTimer),this.flushTimer=setInterval(function(){n.flushReplayData(e,t)},2e4)},flushReplayData:function(c,f,d){return void 0===d&&(d=!1),dl(this,void 0,void 0,function(){var t,n,r,i,o,a,s,u,l;return hl(this,function(e){switch(e.label){case 0:return this.sessionManager&&this.eventBuffer&&this.uploader&&HO(c)&&(t=this.sessionManager.getSession())?this.sessionManager.shouldRefreshSession()?(m("Plugin","Session expired, refreshing"),this.stopReplay(),i=this.sessionManager.refreshSession(),c.lifeCycle.emit("sessionRefreshed"),n=c._replaySampled,i.sampled&&!1!==n&&this.startReplay(c,f,i.sampled),[2]):this.eventBuffer.isEmpty()?[2]:(n=this.eventBuffer.getEventCount(),!d&&n<10?(m("Flush","Skipping flush, only "+n+" events (min: 10)"),[2]):(0!==t.segmentId||this.eventBuffer.hasCheckout()||(Uy("Flush","First segment missing FullSnapshot, triggering manual checkout"),this.recorderManager&&this.recorderManager.takeFullSnapshot()),[4,this.eventBuffer.finishAsync()])):[2];case 1:if(0===(r=e.sent()).eventCount)return[2];if(0===(i=r.events).length&&r.eventsJson)try{i=JSON.parse(r.eventsJson)}catch(q){return jy("Flush","Failed to parse eventsJson from worker:",q),[2]}s=this.splitEventsIntoChunks(i),m("Flush","Flushing "+r.eventCount+" events in "+s.length+" chunk(s), total size: "+Math.round(r.uncompressedSize/1024)+"KB"),o=!0,a=0,s=s,e.label=2;case 2:return a<s.length?(u=s[a],u=JSON.stringify(u),u={project_key:String(c.config.id||""),session_id:t.id,replay_id:t.replayId,segment_id:this.sessionManager.incrementSegmentId(),timestamp:Date.now(),replay_start_timestamp:t.started,replay_format:"rrweb",platform:"web",events_encoding:"plain_json",events:u},[4,this.uploader.uploadReplay(u)]):[3,5];case 3:if(!e.sent())return o=!1,[3,5];e.label=4;case 4:return a++,[3,2];case 5:return u=this.eventBuffer.isUsingWorker(),l=u?"(worker)":"(sync)",m("Flush","Flushing "+r.eventCount+" events, size: "+Math.round(r.uncompressedSize/1024)+"KB "+l),o&&(this.eventBuffer.clear(),this.sessionManager.saveSession()),[2]}})})},splitEventsIntoChunks:function(e,t,n){if(void 0===t&&(t=3145728),void 0===n&&(n=5242880),0===e.length)return[];var r=JSON.stringify(e);if(r.length<=t)return[e];Uy("Split","Events size "+Math.round(r.length/1024)+"KB exceeds limit "+Math.round(t/1024)+"KB, splitting");for(var i=[],o=[],a=2,s=0,u=e;s<u.length;s++){var l,c,f=u[s],d=JSON.stringify(f).length+1;0<o.length&&t<a+d&&(i.push(o),o=[],a=2),n<d?((c=2===(l=f.type)||4===l)?jy:Uy)("Split","Single event too large ("+Math.round(d/1024)+"KB), type="+l+(c?" (baseline snapshot, replay may become unplayable)":"")+", skipping"):(o.push(f),a+=d)}return 0<o.length&&i.push(o),i},stopReplay:function(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),m("Plugin","Recording stopped")},listenForErrors:function(t,n){var r=this;t.lifeCycle.on("errorOccurred",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){e&&r.handleError(e,t,n)})}),t.lifeCycle.on("tdemEventCreated",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){r.isErrorTDEMEvent(e)&&r.handleError(e,t,n)})})},isErrorTDEMEvent:function(e){return!!e&&("error"===String(e.event_category||"").toLowerCase()||(e=String(e.event_type||"").toLowerCase(),["js_error","promise_error","resource_error","api_error"].includes(e)))},handleError:function(e,t,n){this.samplerManager&&(this.samplerManager.isBufferMode()&&this.samplerManager.onErrorOccurred(e)&&(m("Plugin","Converting to session mode due to error"),this.flushReplayData(t,n,!0),this.startFlushTimer(t,n)),this.addCustomEvent({category:"error",message:(null==e?void 0:e.msg)||(null==e?void 0:e.message)||"Unknown error",data:{type:(null==e?void 0:e.type)||"error",stack:null==e?void 0:e.stack}},t))},listenForPerformance:function(n){var r=this;if(n.lifeCycle.on("afterReportWebVitals",function(e){r.handlePerformanceEvent("webVitals",e,n)}),n.lifeCycle.on("afterReportPagePerformance",function(e){r.handlePerformanceEvent("pageLoad",e,n)}),"undefined"!=typeof PerformanceObserver)try{var e=new PerformanceObserver(function(e){var t,e=e.getEntries(),e=e[e.length-1];e&&r.addCustomEvent({category:"performance.lcp",message:"LCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime,element:(null==(t=e.element)?void 0:t.tagName)||"unknown",size:e.size}},n)}),t=(e.observe({type:"largest-contentful-paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){"first-contentful-paint"===e.name&&r.addCustomEvent({category:"performance.fcp",message:"FCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime}},n)})})),i=(t.observe({type:"paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){100<e.duration&&r.addCustomEvent({category:"performance.longTask",message:"Long Task: "+Math.round(e.duration)+"ms",data:{duration:e.duration,startTime:e.startTime}},n)})}));i.observe({type:"longtask",buffered:!0}),n.lifeCycle.on("destroy",function(){e.disconnect(),t.disconnect(),i.disconnect()})}catch(Le){}},handlePerformanceEvent:function(e,n,r){var i=this;n&&("webVitals"===e?["LCP","FCP","FID","CLS","TTFB","TTI","INP"].forEach(function(e){var t=n[e];t!==undefined&&-1!==t&&0<t&&i.addCustomEvent({category:"performance."+e.toLowerCase(),message:e+": "+("number"==typeof t?Math.round(t):t)+("CLS"===e?"":"ms"),data:{metric:e,value:t}},r)}):"pageLoad"===e&&this.addCustomEvent({category:"performance.pageLoad",message:"Page Load: "+(n.firstScreenTiming?Math.round(n.firstScreenTiming):"N/A")+"ms",data:{dnsLookup:n.dnsLookup,tcp:n.tcp,ssl:n.ssl,ttfb:n.ttfb,contentDownload:n.contentDownload,domParse:n.domParse,resourceDownload:n.resourceDownload,firstScreenTiming:n.firstScreenTiming}},r))},listenForLifecycle:function(o,t){var n,e,a=this;"undefined"!=typeof document&&(n=function(e){var t,n=null==(n=a.sessionManager)?void 0:n.getSession(),n=(null==n?void 0:n.replayId)||"",r=(null==(i=null==(r=o)?void 0:r.getOriginFrom)?void 0:i.call(r))||("undefined"!=typeof location?location.href:""),i="undefined"!=typeof document&&document.title||"";null!=(t=o.reportTDEMEvent)&&t.call(o,{event_id:rc(),event_type:e,event_category:tc.BEHAVIOR,timestamp:Date.now(),page_url:r,data:{page_title:i,replay_id:n,is_effective_action:!1,tags:{environment:o.config.env||"production",version:String(o.config.version||"")},event_properties:{visibility_state:"undefined"!=typeof document?document.visibilityState:"",lifecycle_type:e}}})},document.addEventListener("visibilitychange",e=function(){var e;if("undefined"!=typeof document){if("hidden"===document.visibilityState)return n(p.TAB_HIDDEN),a.shouldSkipBufferFlush()?void m("Lifecycle","Buffer mode (error traceback), skip flush on hidden"):void a.flushReplayData(o,t,!0);"visible"===document.visibilityState&&(n(p.TAB_VISIBLE),(e=Date.now())-a._lastLifecycleSnapshotAt<5e3||(a._lastLifecycleSnapshotAt=e,null!=(e=a.recorderManager)&&e.takeFullSnapshot(),a.shouldSkipBufferFlush()?m("Lifecycle","Buffer mode (error traceback), skip flush on visible"):a.flushReplayData(o,t,!0)))}}),o.lifeCycle.on("destroy",function(){document.removeEventListener("visibilitychange",e)}))},listenForUnload:function(e){var t=this,n=function(){t.flushOnUnload(e)};window.addEventListener("beforeunload",n),window.addEventListener("pagehide",n),e.lifeCycle.on("destroy",function(){window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)})},flushOnUnload:function(e){if(this.sessionManager&&this.eventBuffer&&this.uploader&&HO(e))if(this.shouldSkipBufferFlush())m("Unload","Buffer mode (error traceback), skip flush on unload");else{var t=this.sessionManager.getSession();if(t&&(this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),!this.eventBuffer.isEmpty())){var n=this.eventBuffer.finish();if(0!==n.eventCount){for(var n=this.splitEventsIntoChunks(n.events,51200,51200),r=0,i=0,o=0,a=n;o<a.length;o++){var s=a[o],s={project_key:String(e.config.id||""),session_id:t.id,replay_id:t.replayId,segment_id:this.sessionManager.incrementSegmentId(),timestamp:Date.now(),replay_start_timestamp:t.started,replay_format:"rrweb",platform:"web",events_encoding:"plain_json",events:JSON.stringify(s)};this.uploader.sendBeacon(s)?r++:(i++,Uy("Unload","sendBeacon rejected chunk (segment_id="+s.segment_id+"), likely exceeds 64KB browser limit or queue full"))}m("SessionReplay","sendBeacon on unload: "+r+"/"+n.length+" chunk(s) queued, "+i+" rejected")}}}},destroy:function(){this.stopReplay(),this.sessionManager&&this.sessionManager.saveSession(),this.sessionManager=null,this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,this.recorderManager=null,this.samplerManager=null,this.uploader=null,this.clickDetector=null,this.replayConfig=null,this._tdemRef=null,this._isCheckoutFlushing=!1,this._lastLifecycleSnapshotAt=0,this.isInitialized=!1,m("Plugin","destroyed")}}),VO={enabled:!0,ruleVersion:"1.0.0",payloadAllowlist:[],click:{enabled:!0,deadClickWindowMs:3e3,rageClickWindowMs:1e3,rageClickCount:5,errorClickWindowMs:3e3,resolveOnDomMutation:!0,resolveOnSpaNavigation:!0,resolveOnExternalNavigation:!0,resolveOnWindowOpen:!0,resolveOnPageUnload:!0,resolveOnFormAction:!0,resolveOnApiSuccess:!0,ignoreDeadClickSelectors:[],effectiveActionSelectors:[]},performance:{enabled:!0,slowPageLcpThreshold:4e3,slowPageInpThreshold:500},form:{enabled:!0,fieldIdAttr:"data-field-id",formIdAttr:"data-form-id",longFocusThresholdMs:2e4,incompleteMinFieldRatio:.3,zigzagMinCount:2},navigation:{enabled:!0,backForwardAsStruggle:!0},custom:{enabled:!0,detector:undefined}},GO=new Set([p.JS_ERROR,p.PROMISE_ERROR,p.RESOURCE_ERROR,p.API_ERROR]),JO=new Set([p.FORM_CHANGE,p.FORM_SUBMIT,p.FORM_SUBMIT_RESULT]),$O=(new o({name:"struggleMonitor"}),new o({name:"struggleMonitor",instanceStates:new Map,originalWindowOpen:null,windowOpenHooked:!1,onNewTdem:function(t){var n,r=this,e=!0===(e=this.$getConfig(t))?h({},VO):e&&"object"===S(e)?h(h(h({},VO),e),{click:h(h({},VO.click),e.click||{}),performance:h(h({},VO.performance),e.performance||{}),form:h(h({},VO.form),e.form||{}),navigation:h(h({},VO.navigation),e.navigation||{}),custom:h(h({},VO.custom),e.custom||{}),payloadAllowlist:(Array.isArray(e.payloadAllowlist)?e:VO).payloadAllowlist,enabled:!1!==e.enabled}):h(h({},VO),{enabled:!1});e.enabled&&(n={config:e,clickDetector:null,recentClicks:[],pendingDeadClicks:new Map,focusStartMap:new Map,formStateMap:new Map,removeDomListeners:[],onEventCreated:null,onDestroy:null},this.instanceStates.set(t,n),this.initClickDetector(t,n),this.initFormListeners(t,n),n.onEventCreated=function(e){r.handleEventCreated(t,n,e||[])},t.lifeCycle.on("tdemEventCreated",n.onEventCreated),n.onDestroy=function(){return r.cleanupInstance(t)},t.lifeCycle.on("destroy",n.onDestroy))},initClickDetector:function(t,n){var e,r=this;"undefined"!=typeof window&&"undefined"!=typeof document&&(n.clickDetector=new DO({slowClickTimeout:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,slowClickThreshold:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,rageClickCount:null!=(e=null==(e=n.config.click)?void 0:e.rageClickCount)?e:5,rageClickWindow:null!=(e=null==(e=n.config.click)?void 0:e.rageClickWindowMs)?e:1e3,onRageClick:function(e){r.onRageClick(t,n,e)},onClickStart:function(e){r.onClickStart(t,n,e)},onEffectiveAction:function(e){r.onEffectiveAction(n,e)},onSlowClick:function(e){r.onSlowClick(t,n,e)}}),n.clickDetector.start(),this.initClickEffectiveActionListeners(n),this.initWindowOpenHook())},initClickEffectiveActionListeners:function(n){var e,t=this;"undefined"!=typeof window&&((e=function(e,t){window.addEventListener(e,t),n.removeDomListeners.push(function(){window.removeEventListener(e,t)})})("pagehide",function(){var e;!1!==(null==(e=n.config.click)?void 0:e.resolveOnPageUnload)&&(t.resolvePendingDeadClicks(n,"page_unload"),null!=(e=n.clickDetector))&&e.markEffectiveAction("page_unload")}),e("beforeunload",function(){var e;!1!==(null==(e=n.config.click)?void 0:e.resolveOnPageUnload)&&(t.resolvePendingDeadClicks(n,"page_unload"),null!=(e=n.clickDetector))&&e.markEffectiveAction("page_unload")}))},initWindowOpenHook:function(){var r,i;"undefined"==typeof window||this.windowOpenHooked||(r=window.open,this.originalWindowOpen=r,this.windowOpenHooked=!0,i=this,window.open=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=r.apply(window,e);return i.resolveWindowOpenActions(),n})},resolveWindowOpenActions:function(){var n=this,r=Date.now();this.instanceStates.forEach(function(e){var t;!1!==(null==(t=e.config.click)?void 0:t.resolveOnWindowOpen)&&(null!=(t=e.clickDetector)&&t.markEffectiveAction("window_open"),n.resolvePendingDeadClicks(e,"window_open",r,n.getCurrentPageUrl()))})},restoreWindowOpenHook:function(){"undefined"!=typeof window&&this.windowOpenHooked&&this.originalWindowOpen&&(window.open=this.originalWindowOpen,this.originalWindowOpen=null,this.windowOpenHooked=!1)},initFormListeners:function(r,i){var e,t,o=this;null!=(t=i.config.form)&&t.enabled&&"undefined"!=typeof document&&((t=function(e,t,n){void 0===n&&(n=!0),document.addEventListener(e,t,n),i.removeDomListeners.push(function(){document.removeEventListener(e,t,n)})})("focusin",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,p.FORM_FOCUS,e,e.form||undefined)}),t("focusout",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,p.FORM_BLUR,e,e.form||undefined)}),t("change",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,p.FORM_CHANGE,e,e.form||undefined)}),t("submit",function(e){e=e.target;e instanceof HTMLFormElement&&o.reportFormEvent(r,i,p.FORM_SUBMIT,null,e)}),t("invalid",function(e){var t,n,e=o.getTrackableField(e.target);e&&(n=e.form||undefined,n=o.buildFormBaseData(r,i,e,n),n={event_id:rc(),event_type:p.FORM_SUBMIT_RESULT,event_category:tc.BEHAVIOR,timestamp:Date.now(),page_url:"undefined"!=typeof window?window.location.href:(null==(t=r.getOriginFrom)?void 0:t.call(r))||"",data:h(h({},n),{event_name:"form_submit_fail",is_effective_action:!0,validation_message:e.validationMessage||undefined,event_properties:h(h({},n.event_properties||{}),{status:"fail",validation_code:!1===(null==(t=e.validity)?void 0:t.valid)?"invalid":"validation_error"})})},null!=(e=r.reportTDEMEvent))&&e.call(r,n)}),e=function(){o.reportPendingUncompletedForms(r,i,"pagehide")},"undefined"!=typeof window)&&(window.addEventListener("pagehide",e),i.removeDomListeners.push(function(){window.removeEventListener("pagehide",e)}))},getTrackableField:function(e){return!(e&&e instanceof Element)||!(e=e.closest("input, textarea, select"))||e instanceof HTMLInputElement&&["button","submit","reset","image","hidden"].includes(e.type)?null:e},buildFormBaseData:function(e,t,n,r){var n=n||null,r=r||(null==n?void 0:n.form)||undefined,i=(null==(i=t.config.form)?void 0:i.fieldIdAttr)||"data-field-id",t=(null==(t=t.config.form)?void 0:t.formIdAttr)||"data-form-id",i=n?n.getAttribute(i)||n.id||n.name||n.tagName.toLowerCase()+"_"+(n.type||"field"):undefined,t=r&&(r.getAttribute(t)||r.id||r.getAttribute("name")||r.getAttribute("action"))||undefined,o="string"==typeof(null==(o=n)?void 0:o.value)?n.value.length:0,o=0===o?"0":o<=10?"1_10":o<=50?"11_50":"51_plus";return{replay_id:wf(e),is_effective_action:!0,form_id:t,field_id:i,tags:{},event_properties:{field_name:(null==n?void 0:n.name)||"",field_type:(null==n?void 0:n.type)||(null==(e=null==n?void 0:n.tagName)?void 0:e.toLowerCase())||"",form_name:(null==r?void 0:r.getAttribute("name"))||"",is_required:String(!(null==n||!n.required)),value_length_bucket:String(o)}}},reportFormEvent:function(e,t,n,r,i){var t=this.buildFormBaseData(e,t,r,i),i="undefined"!=typeof window?window.location.href:(null==(r=e.getOriginFrom)?void 0:r.call(e))||"",r={event_id:rc(),timestamp:Date.now(),page_url:i};n!==p.FORM_FOCUS?n!==p.FORM_BLUR?n!==p.FORM_CHANGE?(i=h(h({},r),{event_type:p.FORM_SUBMIT,event_category:tc.BEHAVIOR,data:h(h({},t),{submit_method:"native_submit"})}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=h(h({},r),{event_type:p.FORM_CHANGE,event_category:tc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=h(h({},r),{event_type:p.FORM_BLUR,event_category:tc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=h(h({},r),{event_type:p.FORM_FOCUS,event_category:tc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i))},onClickStart:function(e,t,n){var r,i=t.config.click||VO.click;!1!==i.enabled&&(r=n.node.selector||n.node.tagName||"unknown",this.shouldIgnoreDeadClick(n.target,i)?this.resolvePendingDeadClicks(t,"custom",n.timestamp,this.getCurrentPageUrl()):this.scheduleDeadClick(e,t,{pendingId:"pending_"+n.timestamp+"_"+Math.random().toString(16).slice(2),timestamp:n.timestamp,pageUrl:this.getCurrentPageUrl(),ownerKey:r,node:n.node}))},onEffectiveAction:function(e,t){this.shouldResolveByReason(e,t.reason)&&this.resolvePendingDeadClicks(e,t.reason,t.timestamp,this.getCurrentPageUrl())},scheduleDeadClick:function(t,n,r){var i=this,o=null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,e=setTimeout(function(){var e=n.pendingDeadClicks.get(r.pendingId);e&&(n.pendingDeadClicks["delete"](r.pendingId),i.emitDeadClick(t,n,e,o))},o);n.pendingDeadClicks.set(r.pendingId,h(h({},r),{timeout:e}))},emitDeadClick:function(e,t,n,r){var i,o=n.clickEventId?[n.clickEventId]:undefined;null!=(i=e.reportStruggle)&&i.call(e,{type:"dead_click",ownerType:"element",ownerKey:n.ownerKey,pageUrl:n.pageUrl,triggerEventId:n.clickEventId,relatedEventIds:o,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{timeout_ms:r,selector:n.node.selector||""}})},resolvePendingDeadClicks:function(r,i,o,a){void 0===o&&(o=Date.now());var e,s=null!=(e=null==(e=r.config.click)?void 0:e.deadClickWindowMs)?e:3e3;r.pendingDeadClicks.forEach(function(e,t){var n=o-e.timestamp;n<0||s<n||"spa_navigation"!==i&&"page_unload"!==i&&a&&e.pageUrl&&a!==e.pageUrl||(clearTimeout(e.timeout),r.pendingDeadClicks["delete"](t))})},linkPendingDeadClickToClickEvent:function(e,n,r){var i=n.timestamp||Date.now(),o=this.getEventPageUrl(n);e.pendingDeadClicks.forEach(function(e){var t;e.clickEventId||(t=i-e.timestamp)<0||1e3<t||o&&e.pageUrl&&o!==e.pageUrl||(e.clickEventId=n.event_id,r&&"unknown"!==r&&(e.ownerKey=r))})},shouldResolveByReason:function(e,t){e=e.config.click||VO.click;return!1!==e.enabled&&("dom_mutation"===t?!1!==e.resolveOnDomMutation:"spa_navigation"===t?!1!==e.resolveOnSpaNavigation:"external_navigation"===t||"download"===t?!1!==e.resolveOnExternalNavigation:"window_open"===t?!1!==e.resolveOnWindowOpen:"page_unload"===t?!1!==e.resolveOnPageUnload:"form_change"===t||"form_submit"===t?!1!==e.resolveOnFormAction:"api_success"!==t||!1!==e.resolveOnApiSuccess)},shouldIgnoreDeadClick:function(t,e){return pl(e.ignoreDeadClickSelectors||[],e.effectiveActionSelectors||[]).some(function(e){try{return!!e&&!!t.closest(e)}catch(Pe){return!1}})},getCurrentPageUrl:function(){return"undefined"==typeof window?"":window.location.href},getEventPageUrl:function(e){return(null==e?void 0:e.page_url)||(null==(e=null==e?void 0:e.data)?void 0:e.page_url)||""},onRageClick:function(e,t,n){var r=n.node.selector||n.node.tagName||"unknown",i=null!=(o=null==(o=t.config.click)?void 0:o.rageClickWindowMs)?o:1e3,o=t.recentClicks.filter(function(e){return n.timestamp-e.timestamp<=i}).map(function(e){return e.eventId}).filter(Boolean).slice(-10),r={type:"rage_click",ownerType:"element",ownerKey:r,pageUrl:window.location.href,triggerEventId:o[0],relatedEventIds:o.length?o:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{clickCount:n.clickCount,timeWindowMs:n.timeWindowMs,selector:n.node.selector||""}};null!=(o=e.reportStruggle)&&o.call(e,r)},onSlowClick:function(e,t,n){},handleEventCreated:function(i,o,e){var t,a=this,s=Date.now(),n=o.config.click||VO.click,r=Math.max(null!=(t=n.errorClickWindowMs)?t:3e3,null!=(t=n.rageClickWindowMs)?t:1e3,null!=(t=n.deadClickWindowMs)?t:3e3);o.recentClicks=o.recentClicks.filter(function(e){return s-e.timestamp<=r}),e.forEach(function(e){var t,n,r;e&&e.event_type!==p.STRUGGLE&&(t=e.timestamp||s,n=a.getEventPageUrl(e),e.event_type===p.CLICK?(r=(null==(r=e.data)?void 0:r.target_element)||(null==(r=e.data)?void 0:r.target_id)||(null==(r=e.data)?void 0:r.target_class)||"unknown",o.recentClicks.push({eventId:e.event_id,timestamp:t,pageUrl:n,ownerKey:r}),a.linkPendingDeadClickToClickEvent(o,e,r)):(a.isEffectiveActionEvent(o,e)&&(a.resolvePendingDeadClicks(o,a.getEffectiveActionReason(e),t,n),null!=(r=o.clickDetector)&&r.markEffectiveAction(a.getEffectiveActionReason(e))),GO.has(e.event_type)?a.tryReportErrorClick(i,o,e):e.event_type===p.PAGE_LOAD||e.event_type===p["true"]?a.tryReportSlowPage(i,o,e):e.event_type===p.FORM_FOCUS?(a.trackFormFocus(o,e),a.trackFormChangeAndZigzag(i,o,e)):e.event_type===p.FORM_CHANGE?a.trackFormChangeAndZigzag(i,o,e):e.event_type===p.FORM_BLUR?a.tryReportLongFocusTime(i,o,e):e.event_type===p.FORM_SUBMIT?a.trackFormSubmitResult(o,e):e.event_type===p.FORM_SUBMIT_RESULT?(a.trackFormSubmitResult(o,e),a.tryReportFormValidationError(i,o,e)):e.event_type===p.PAGE_VIEW&&null!=(n=null==(t=e.data)?void 0:t.event_properties)&&n.navigation_type&&a.tryReportBackForward(i,o,e)),a.tryReportCustomStruggle(i,o,e))})},isEffectiveActionEvent:function(e,t){var n;return!1!==(null==(n=e.config.click)?void 0:n.enabled)&&(t.event_type===p.API_CALL?!1!==(null==(n=e.config.click)?void 0:n.resolveOnApiSuccess):t.event_type===p.PAGE_VIEW&&null!=(n=null==(n=t.data)?void 0:n.event_properties)&&n.navigation_type?!1!==(null==(n=e.config.click)?void 0:n.resolveOnSpaNavigation):JO.has(t.event_type)?!1!==(null==(n=e.config.click)?void 0:n.resolveOnFormAction):!0===(null==(e=t.data)?void 0:e.is_effective_action))},getEffectiveActionReason:function(e){return e.event_type===p.API_CALL?"api_success":e.event_type===p.PAGE_VIEW?"spa_navigation":e.event_type===p.FORM_CHANGE?"form_change":e.event_type===p.FORM_SUBMIT||e.event_type===p.FORM_SUBMIT_RESULT?"form_submit":"custom"},getFormStateKey:function(e,t){return e||t||"unknown_form"},ensureFormState:function(e,t,n){var r=this.getFormStateKey(t,n);return e.formStateMap.has(r)||e.formStateMap.set(r,{formId:t||r,pageUrl:n||"",touchedFieldIds:new Set,requiredFieldIds:new Set,changedFieldIds:new Set,focusPath:[],zigzagHits:0,hasSuccessSubmit:!1,reportedZigzag:!1,reportedUncompleted:!1}),e.formStateMap.get(r)},recordFormTouch:function(e,t){var n,e=this.ensureFormState(e,null==(e=null==t?void 0:t.data)?void 0:e.form_id,null==t?void 0:t.page_url),r=String((null==(r=null==t?void 0:t.data)?void 0:r.field_id)||"");return r&&(e.touchedFieldIds.add(r),!0===(null==(n=t.data)?void 0:n.is_required)&&e.requiredFieldIds.add(r),t.event_type===p.FORM_CHANGE)&&e.changedFieldIds.add(r),null!=t&&t.page_url&&(e.pageUrl=t.page_url),e},trackFormFocus:function(e,t){var n,r=t,i=String((null==(i=null==r?void 0:r.data)?void 0:i.field_id)||"");i&&((n=this.recordFormTouch(e,r)).focusPath.push(i),12<n.focusPath.length&&n.focusPath.shift(),e.focusStartMap.set(i,{timestamp:t.timestamp||Date.now(),eventId:t.event_id,formId:null==(n=null==r?void 0:r.data)?void 0:n.form_id,pageUrl:null==r?void 0:r.page_url}))},trackFormChangeAndZigzag:function(e,t,n){var r,i,o,a,s;n.event_type!==p.FORM_CHANGE?n.event_type!==p.FORM_FOCUS||(s=(i=this.recordFormTouch(t,r=n)).focusPath).length<4||i.reportedZigzag||(o=(s=s.slice(-4))[0],a=s[1],!o)||!a||o===a||o!==s[2]||a!==s[3]||i.changedFieldIds.size<2||(i.zigzagHits+=1,s=null!=(a=null==(o=t.config.form)?void 0:o.zigzagMinCount)?a:2,i.zigzagHits<s)||(i.reportedZigzag=!0,null==(o=e.reportStruggle))||o.call(e,{type:"form_zigzag",ownerType:"form",ownerKey:i.formId,pageUrl:i.pageUrl,formId:i.formId,fieldId:String((null==(a=null==r?void 0:r.data)?void 0:a.field_id)||""),triggerEventId:r.event_id,relatedEventIds:[r.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{zigzag_hits:i.zigzagHits,changed_field_count:i.changedFieldIds.size}}):this.recordFormTouch(t,n)},trackFormSubmitResult:function(e,t){t.event_type!==p.FORM_SUBMIT&&t.event_type!==p.FORM_SUBMIT_RESULT||((e=this.recordFormTouch(e,t)).lastSubmitEventId=t.event_id,t.event_type!==p.FORM_SUBMIT_RESULT)||"success"===(null==(t=null==(t=t.data)?void 0:t.event_properties)?void 0:t.status)&&(e.hasSuccessSubmit=!0)},reportPendingUncompletedForms:function(t,n,r){var i=this;n.formStateMap.forEach(function(e){i.tryReportUncompletedForm(t,n,e,r)})},tryReportUncompletedForm:function(e,t,n,r){var i,o,a,s;n.reportedUncompleted||n.hasSuccessSubmit||0===n.touchedFieldIds.size||(a=0<(o=n.requiredFieldIds.size)?o:n.touchedFieldIds.size)<=0||(a=n.changedFieldIds.size/a)<(s=null!=(s=null==(s=t.config.form)?void 0:s.incompleteMinFieldRatio)?s:.3)||(n.reportedUncompleted=!0,null==(i=e.reportStruggle))||i.call(e,{type:"uncompleted_form",ownerType:"form",ownerKey:n.formId,pageUrl:n.pageUrl,formId:n.formId,triggerEventId:n.lastSubmitEventId,relatedEventIds:n.lastSubmitEventId?[n.lastSubmitEventId]:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{touched_field_count:n.touchedFieldIds.size,changed_field_count:n.changedFieldIds.size,required_field_count:o,changed_ratio:Number(a.toFixed(4)),threshold_ratio:s}})},tryReportLongFocusTime:function(e,t,n){var r,i,o,a,s=String((null==(s=null==n?void 0:n.data)?void 0:s.field_id)||"");s&&(i=t.focusStartMap.get(s))&&(t.focusStartMap["delete"](s),o=null!=(o=null==(o=t.config.form)?void 0:o.longFocusThresholdMs)?o:2e4,(a=Math.max((n.timestamp||Date.now())-i.timestamp,0))<o||null==(r=e.reportStruggle)||r.call(e,{type:"long_focus_time",ownerType:"field",ownerKey:s,pageUrl:(null==n?void 0:n.page_url)||i.pageUrl,formId:(null==(e=null==n?void 0:n.data)?void 0:e.form_id)||i.formId,fieldId:s,triggerEventId:n.event_id,relatedEventIds:[i.eventId||"",n.event_id].filter(Boolean),detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{focus_duration_ms:a,threshold_ms:o}}))},tryReportErrorClick:function(e,t,n){var r,i,o;t.recentClicks.length&&(i=null!=(o=(t.config.click||VO.click).errorClickWindowMs)?o:3e3,o=pl(t.recentClicks).reverse().find(function(e){return 0<=n.timestamp-e.timestamp&&n.timestamp-e.timestamp<=i}))&&null!=(r=e.reportStruggle)&&r.call(e,{type:"error_click",ownerType:"element",ownerKey:o.ownerKey,pageUrl:o.pageUrl||n.page_url,triggerEventId:o.eventId,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{errorEventType:n.event_type}})},tryReportSlowPage:function(e,t,n){var r,i,o,a=t.config.performance||VO.performance;a.enabled&&(i=(null==(i=n.data)?void 0:i.measurements)||{},r=Number(i.lcp||0),i=Number(i.inp||0),o=null!=(o=a.slowPageLcpThreshold)?o:4e3,a=null!=(a=a.slowPageInpThreshold)?a:500,o<=r||a<=i)&&null!=(o=e.reportStruggle)&&o.call(e,{type:"slow_page",ownerType:"page",ownerKey:n.page_url||("undefined"!=typeof window?window.location.href:""),pageUrl:n.page_url,triggerEventId:n.event_id,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{lcp:r,inp:i,sourceEventType:n.event_type}})},tryReportFormValidationError:function(e,t,n){var r,i,o,a,s=(null==(s=null==n?void 0:n.data)?void 0:s.event_properties)||{},u=(null==n?void 0:n.data)||{};"fail"===String((null==s?void 0:s.status)||(null===(i=u)?void 0:i.status)||"")&&(i=String((null==s?void 0:s.field_id)||(null===(i=u)?void 0:i.field_id)||""),o=String((null==s?void 0:s.form_id)||(null===(o=u)?void 0:o.form_id)||""),a=i||o||(null==n?void 0:n.page_url)||"unknown",null!=(r=e.reportStruggle))&&r.call(e,{type:"form_validation_error",ownerType:i?"field":"form",ownerKey:a,pageUrl:null==n?void 0:n.page_url,formId:o,fieldId:i,triggerEventId:n.event_id,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{validation_code:(null==s?void 0:s.validation_code)||(null===(e=u)?void 0:e.validation_code),validation_message:null==(a=null==n?void 0:n.data)?void 0:a.validation_message,sourceEventType:n.event_type}})},tryReportBackForward:function(e,t,n){var r,i,o=t.config.navigation||VO.navigation;o.enabled&&o.backForwardAsStruggle&&(n=null==(n=null==(o=n)?void 0:o.data)?void 0:n.event_properties,"back"!==(i=String((null==n?void 0:n.navigation_type)||""))&&"forward"!==i||null==(r=e.reportStruggle)||r.call(e,{type:"back_forward",ownerType:"page",ownerKey:String((null==n?void 0:n.to_page)||"")||(null==o?void 0:o.page_url)||"unknown",pageUrl:null==o?void 0:o.page_url,triggerEventId:o.event_id,relatedEventIds:[o.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{navigation_type:i,from_page:null==n?void 0:n.from_page,to_page:null==n?void 0:n.to_page}}))},tryReportCustomStruggle:function(n,r,i){var e=r.config.custom||VO.custom;e.enabled&&"function"==typeof e.detector&&(e=e.detector({event:i,tdem:n}),(Array.isArray(e)?e:e?[e]:[]).forEach(function(e){var t,e=h(h({},e),{type:(null==e?void 0:e.type)||"custom_struggle",ownerType:(null==e?void 0:e.ownerType)||"app",ownerKey:(null==e?void 0:e.ownerKey)||i.page_url||"custom",ruleVersion:(null==e?void 0:e.ruleVersion)||r.config.ruleVersion,payloadAllowlist:(null==e?void 0:e.payloadAllowlist)||r.config.payloadAllowlist,detectionSource:(null==e?void 0:e.detectionSource)||"custom"});null!=(t=n.reportStruggle)&&t.call(n,e)}))},cleanupInstance:function(e){var t=this.instanceStates.get(e);t&&(t.onEventCreated&&e.lifeCycle.remove("tdemEventCreated",t.onEventCreated),t.onDestroy&&e.lifeCycle.remove("destroy",t.onDestroy),t.clickDetector&&t.clickDetector.stop(),t.pendingDeadClicks.forEach(function(e){clearTimeout(e.timeout)}),t.pendingDeadClicks.clear(),this.reportPendingUncompletedForms(e,t,"destroy"),t.focusStartMap.clear(),t.formStateMap.clear(),t.removeDomListeners.forEach(function(e){return e()}),t.removeDomListeners=[],this.instanceStates["delete"](e),0===this.instanceStates.size)&&this.restoreWindowOpenHook()},destroy:function(){var n=this;this.instanceStates.forEach(function(e,t){n.cleanupInstance(t)}),this.instanceStates.clear(),this.restoreWindowOpenHook()}}));function ZO(e,t,n){try{var r={projectKey:e,sampleRate:t,replaySampleRate:n.replay_sample_rate!==undefined?Number(n.replay_sample_rate):1,errorTraceback:n.error_traceback,errorSampleRate:n.error_sample_rate,remoteEnabled:n.enabled,timestamp:Date.now()};localStorage.setItem("TDEM_SAMPLE_CONFIG",JSON.stringify(r))}catch(g0){}}function KO(e){return e._tdemSampleGate||null}function YO(e,t,n){e=KO(e);e?!n||t<=0?e.decide(!1):100<=t?e.decide(!0):(n=100*Math.random(),e.decide(n<t)):console.warn("[TDEM] Sample gate not found")}function XO(e,t){var t=BO(e.config.sessionReplay,t),e=(e._effectiveReplayPolicy=t,e._replaySampled=t.enabled,null==(n=null==(e=e.constructor.installedPlugins)?void 0:e.find)?void 0:n.call(e,function(e){return e&&"sessionReplay"===e.name})),n=null==(n=null==e?void 0:e.option)?void 0:n.applyEffectivePolicy;"function"==typeof n&&n.call(e.option,t)}function QO(e){var t={};return e&&"object"===S(e)&&(Object.prototype.hasOwnProperty.call(e,"enabled")&&(t.enabled=!!e.enabled),Object.prototype.hasOwnProperty.call(e,"replay_sample_rate")&&(t.replay_sample_rate=Number(e.replay_sample_rate)),Object.prototype.hasOwnProperty.call(e,"error_traceback")&&(t.error_traceback=!!e.error_traceback),Object.prototype.hasOwnProperty.call(e,"error_sample_rate"))&&(t.error_sample_rate=Number(e.error_sample_rate)),t}function eR(e,t,n){var r,i=KO(e);i&&((t=t?function(e){try{var t,n=localStorage.getItem("TDEM_SAMPLE_CONFIG");return n?(t=JSON.parse(n)).projectKey===e&&Date.now()-t.timestamp<6048e5?t:null:null}catch(g0){return null}}(t):null)?(console.info("[TDEM] Using cached config, sampleRate:",t.sampleRate),n._cachedSampleRate=t.sampleRate,r={},t.remoteEnabled!==undefined&&(r.enabled=t.remoteEnabled),t.replaySampleRate!==undefined&&(r.replay_sample_rate=t.replaySampleRate),t.errorTraceback!==undefined&&(r.error_traceback=t.errorTraceback),t.errorSampleRate!==undefined&&(r.error_sample_rate=t.errorSampleRate),n._cachedRemote=r,n=t.remoteEnabled!==undefined?!!t.remoteEnabled:0<t.sampleRate,YO(e,t.sampleRate,n),XO(e,r)):(console.warn("[TDEM] No cached config, default to not report"),i.decide(!1),XO(e,null)))}t=new o({name:"tdemConfig",_cachedSampleRate:null,_cachedRemote:null,onNewTdem:function(e){var t=this,n=e._prefetchedConfigData;XO(e,n?QO(n):null),function(u,l){dl(this,void 0,void 0,function(){var n,r,i,o,a,s;return hl(this,function(e){switch(e.label){case 0:if(!(n=u.config.id))return eR(u,n,l),[2];if(r=u._prefetchedConfigData)return delete u._prefetchedConfigData,i=r.tdem_sample_rate,o=r.enabled,a=QO(r),ZO(n,i,a),l._cachedSampleRate=i,l._cachedRemote=a,YO(u,i,o),XO(u,a),[2];if(t=(u.config.url||"").replace(/\/+$/,""),!(r=t?t+"/api/v1/config":""))return eR(u,n,l),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,u.transportRequest({kind:"config",url:r,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:n})})];case 2:if(!(s=e.sent()).ok)throw new Error("HTTP "+s.status);if(0===(s="string"==typeof s.body?JSON.parse(s.body):s.body).code&&s.data)return i=s.data.tdem_sample_rate,o=s.data.enabled,a=QO(s.data),ZO(n,i,a),l._cachedSampleRate=i,l._cachedRemote=a,YO(u,i,o),XO(u,a),[3,4];throw new Error("API error: code="+s.code);case 3:return s=e.sent(),console.warn("[TDEM] Failed to fetch remote config:",s),eR(u,n,l),[3,4];case 4:return[2]}var t})})}(e,this),e.lifeCycle.on("sessionRefreshed",function(){t.onSessionRefreshed(e)})},onSessionRefreshed:function(e){var t,n=KO(e);n&&n.isDecided&&null!==(t=this._cachedSampleRate)&&t!==undefined&&(t=n.reDecide(t),n=e._effectiveReplayPolicy,e._replaySampled=t&&(!n||n.enabled),console.info("[TDEM] Session refreshed, session="+t+", replayPolicyEnabled="+(null==n?void 0:n.enabled)))}});return Mg.use(_f),Mg.use(Wn),Mg.use(qr),Mg.use(jt),Mg.use(xe),Mg.use(Lt),Mg.use(Pr),Mg.use(Pf),Mg.use(Gf),Mg.use(r),Mg.use(Vf),Mg.use(Rf),Mg.use(t),Mg.use(qO),Mg.use($O),Mg});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TDEM=t()}(this,function(){"use strict";function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function S(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function i(e){m(r,t,n,i,o,"next",e)}function o(e){m(r,t,n,i,o,"throw",e)}i(void 0)})}}function v(e,t,n){t=F(t);var r=e,e=j()?Reflect.construct(t,n||[],F(e).constructor):t.apply(e,n);if(!e||"object"!=typeof e&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t,n){var r;return j()?Reflect.construct.apply(null,arguments):((r=[null]).push.apply(r,t),t=new(e.bind.apply(e,r)),n&&V(t,n.prototype),t)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$(r.key),r)}}function k(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ie(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return i=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){i=!0,n=e},f:function(){try{r||null==a["return"]||a["return"]()}finally{if(i)throw n}}};if(Array.isArray(e)||(a=Z(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L(e,t,n){return(t=$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(){return(N="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=G(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(null,arguments)}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function U(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}function z(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Ae(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach(function(e){L(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function B(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};var n,r={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),o=0;o<i.length;o++)n=i[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function W(){var p,m,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var i,o,a,s,u,l,c,d,f,t=t&&t.prototype instanceof v?t:v,t=Object.create(t.prototype);return H(t,"_invoke",(i=e,o=n,c=r||[],d=!1,f={p:l=0,n:0,v:p,a:h,f:h.bind(p,4),d:function(e,t){return a=e,s=0,u=p,f.n=t,g}},function(e,t,n){if(1<l)throw TypeError("Generator is already running");for(d&&1===t&&h(t,n),s=t,u=n;(m=s<2?p:u)||!d;){a||(s?s<3?(1<s&&(f.n=-1),h(s,u)):f.n=u:f.v=u);try{if(l=2,a){if(m=a[e=s?e:"next"]){if(!(m=m.call(a,u)))throw TypeError("iterator result is not an object");if(!m.done)return m;u=m.value,s<2&&(s=0)}else 1===s&&(m=a["return"])&&m.call(a),s<2&&(u=TypeError("The iterator does not provide a '"+e+"' method"),s=1);a=p}else if((m=(d=f.n<0)?u:i.call(o,f))!==g)break}catch(m){a=p,s=1,u=m}finally{l=1}}return{value:m,done:d}}),!0),t;function h(e,t){for(s=e,u=t,m=0;!d&&l&&!n&&m<c.length;m++){var n,r=c[m],i=f.p,o=r[2];3<e?(n=o===t)&&(u=r[(s=r[4])?5:s=3],r[4]=r[5]=p):r[0]<=i&&((n=e<2&&i<r[1])?(s=0,f.v=t,f.n=r[1]):i<o&&(n=e<3||r[0]>t||o<t)&&(r[4]=e,r[5]=t,f.n=o,s=0))}if(n||1<e)return g;throw d=!0,t}}var g={};function v(){}function i(){}function o(){}m=Object.getPrototypeOf;var e=[][t]?m(m([][t]())):(H(m={},t,function(){return this}),m),a=o.prototype=v.prototype=Object.create(e);function s(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,H(e,n,"GeneratorFunction")),e.prototype=Object.create(a),e}return H(a,"constructor",i.prototype=o),H(o,"constructor",i),H(o,n,i.displayName="GeneratorFunction"),H(a),H(a,n,"Generator"),H(a,t,function(){return this}),H(a,"toString",function(){return"[object Generator]"}),(W=function(){return{w:r,m:s}})()}function H(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(H=function(e,t,n,r){function i(t,n){H(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))})(e,t,n,r)}function q(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function V(e,t){return(V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n["return"]&&(a=n["return"](),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||Z(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=F(e)););return e}function J(e,t,n,r){var i=N(F(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ne(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}()||Z(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e){e=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);e=t.call(e,"string");if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(e);return"symbol"==typeof e?e:e+""}function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){var n;if(e)return"string"==typeof e?u(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}function K(e){var n="function"==typeof Map?new Map:void 0;return(K=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(D_){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return De(e,arguments,F(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),V(t,e)})(e)}var R,g=function(e){try{return!!e()}catch(m){return!0}},Y=void 0,y=((R=void 0)({target:"Array",stat:!0},{isArray:Y}),void 0),Q=y({}.toString),ee=y("".slice),te=function(e){return ee(Q(e),8,-1)},ne=(Array.isArray,"object"==("undefined"==typeof document?"undefined":T(document))&&document.all),_=void 0===ne&&ne!==undefined?function(e){return"function"==typeof e||e===ne}:function(e){return"function"==typeof e},O=function(e){return"object"==T(e)?null!==e:_(e)},re=function(e){return null===e||e===undefined},ie=TypeError,oe=function(e){if(re(e))throw new ie("Can't call method on "+e);return e},ae=Object,se=function(e){return ae(oe(e))},ue=void 0,le=(R({target:"Math",stat:!0},{trunc:ue}),Math.ceil,function(e){e=+e;return e!=e||0==e?0:ue(e)}),ce=Math.min,de=function(e){e=le(e);return 0<e?ce(e,9007199254740991):0},fe=function(e){return de(e.length)},he=TypeError,pe=function(e){if(9007199254740991<e)throw new he("Maximum allowed index exceeded");return e},x=void 0,me=x.document,ge=O(me)&&O(me.createElement),ve=function(e){return ge?me.createElement(e):{}},f=void 0,e=(f||g(function(){return 7!==Object.defineProperty(ve("div"),"a",{get:function(){return 7}}).a}),f&&g(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})),ye=String,we=TypeError,E=function(e){if(O(e))return e;throw new we(ye(e)+" is not an object")},be=!g(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),ke=Function.prototype.call,M=be?ke.bind(ke):function(){return ke.apply(ke,arguments)},Se=function(e,t){return arguments.length<2?(n=x[e],_(n)?n:undefined):x[e]&&x[e][t];var n},_e=y({}.isPrototypeOf),Ee=String,Ce=function(e){try{return Ee(e)}catch(m){return"Object"}},Re=TypeError,Oe=function(e){if(_(e))return e;throw new Re(Ce(e)+" is not a function")},xe=void 0,Te=!g(function(){Reflect.apply(function(){})}),Te=(R({target:"Reflect",stat:!0,forced:Te},{apply:function(e,t,n){return xe(Oe(e),t,E(n))}}),Function.prototype),Me=Te.apply,Te=Te.call,Fe=("object"==("undefined"==typeof Reflect?"undefined":T(Reflect))&&Reflect.apply||be&&Te.bind(Me),y({}.hasOwnProperty)),I=Object.hasOwn||function(e,t){return Fe(se(e),t)},Me=Function.prototype,Te=f&&Object.getOwnPropertyDescriptor,Ue=I(Me,"name"),je={EXISTS:Ue,PROPER:Ue&&"something"===function(){}.name,CONFIGURABLE:Ue&&(!f||Te(Me,"name").configurable)},Ue=function(e,t){var n=[][e];return!!n&&g(function(){n.call(null,t||function(){return 1},1)})},ze=void 0,Be=void 0,We=y([].join),Me=ze!==Object||!Ue("join",","),Te=(R({target:"Array",proto:!0,forced:Me},{join:function(e){return We(Be(this),e===undefined?",":e)}}),"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});function He(e,t,n){return e(n={path:t,exports:{},require:function(e,t){throw t!==undefined&&null!==t||n.path,new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}},n.exports),n.exports}var qe=Object.defineProperty,Ve=function(e,t){try{qe(x,e,{value:t,configurable:!0,writable:!0})}catch(S){x[e]=t}return t},Ge=He(function(e){e=e.exports=x["__core-js_shared__"]||Ve("__core-js_shared__",{});(e.versions||(e.versions=[])).push({version:"3.50.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),Je=y(Function.toString);_(Ge.inspectSource)||(Ge.inspectSource=function(e){return Je(e)});var $e,Ze=Ge.inspectSource,Ke=void 0,Ye=Ke("toStringTag"),Xe=Object,Qe="Arguments"===te(function(){return arguments}()),et=function(e){var n,t;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(e=Xe(e),Ye))?n:Qe?te(e):"Object"===(t=te(e))&&_(e.callee)?"Arguments":t},tt=String,C=function(e){if("Symbol"===et(e))throw new TypeError("Cannot convert a Symbol value to a string");return tt(e)},Me=($e=!1,(Me=/[ac]/).exec=function(){return $e=!0,/./.exec.apply(this,arguments)},!0===Me.test("abc")&&$e),nt=/./.test,Me=(R({target:"RegExp",proto:!0,forced:!Me},{test:function(e){var t=E(this),e=C(e),n=t.exec;return _(n)?null!==(n=M(n,t,e))&&(E(n),!0):M(nt,t,e)}}),x.WeakMap),Me=_(Me)&&/native code/.test(String(Me)),rt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},it=void 0,ot=f?function(e,t,n){return it.f(e,t,rt(1,n))}:function(e,t,n){return e[t]=n,e},at=void 0,st=at.f,ut=(R({target:"Object",stat:!0,forced:Object.defineProperties!==st,sham:!f},{defineProperties:st}),void 0),st=g(function(){ut(1)}),st=(R({target:"Object",stat:!0,forced:st},{keys:function(e){return ut(se(e))}}),function(e){if("Function"===te(e))return y(e)}),lt=Math.max,ct=Math.min,dt=function(e,t){e=le(e);return e<0?lt(e+t,0):ct(e,t)},t=function(s){return function(e,t,n){var r=Be(e),i=fe(r);if(0!==i){var o,a=dt(n,i);if(s&&t!=t){for(;a<i;)if((o=r[a++])!=o)return!0}else for(;a<i;a++)if((s||a in r)&&r[a]===t)return s||a||0}return!s&&-1}},t={includes:t(!0),indexOf:t(!1)},ft=t.indexOf,ht=st([].indexOf),pt=!!ht&&1/ht([1],1,-0)<0,n=pt||!Ue("indexOf");R({target:"Array",proto:!0,forced:n},{indexOf:function(e){var t=1<arguments.length?arguments[1]:undefined;return pt?ht(this,e,t)||0:ft(this,e,t)}});var mt,gt={},vt=(y([].push),["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),yt=(Object.keys,f&&!e&&Object.defineProperties,Se("document","documentElement")),n=void 0,wt=n("IE_PROTO"),bt=function(){},kt=function(e){return"<script>"+e+"<\/script>"},St=function(e){e.write(kt("")),e.close();var t=e.parentWindow.Object;return e=null,t},_t=function(){try{mt=new ActiveXObject("htmlfile")}catch(v){}var e;_t="undefined"==typeof document||document.domain&&mt?St(mt):((e=ve("iframe")).style.display="none",yt.appendChild(e),e.src=String("javascript:"),(e=e.contentWindow.document).open(),e.write(kt("document.F=Object")),e.close(),e.F);for(var t=vt.length;t--;)delete _t.prototype[vt[t]];return _t()},Et=(gt[wt]=!0,Object.create||function(e,t){var n;return null!==e?(bt.prototype=E(e),n=new bt,bt.prototype=null,n[wt]=e):n=_t(),t===undefined?n:at.f(n,t)});R({target:"Object",stat:!0,sham:!f},{create:Et});var Ct,Rt,Ot,xt,Tt=Object.create||Object,e=function(e,t){return Ge[e]||(Ge[e]=t||Tt(null))},Mt=0,It=Math.random(),At=y(1.1.toString),Pt=function(e){return"Symbol("+(e===undefined?"":e)+")_"+At(++Mt+It,36)},Dt=(e("keys"),x.TypeError),Lt=x.WeakMap,Nt=Me||Ge.state?((Ot=Ge.state||(Ge.state=new Lt)).get=Ot.get,Ot.has=Ot.has,Ot.set=Ot.set,Ct=function(e,t){if(Ot.has(e))throw new Dt("Object already initialized");return t.facade=e,Ot.set(e,t),t},Rt=function(e){return Ot.get(e)||{}},function(e){return Ot.has(e)}):(xt=n("state"),gt[xt]=!0,Ct=function(e,t){if(I(e,xt))throw new Dt("Object already initialized");return t.facade=e,ot(e,xt,t),t},Rt=function(e){return I(e,xt)?e[xt]:{}},function(e){return I(e,xt)}),Ft={set:Ct,get:Rt,has:Nt,enforce:function(e){return Nt(e)?Rt(e):Ct(e,{})},getterFor:function(t){return function(e){if(O(e)&&(e=Rt(e)).type===t)return e;throw new Dt("Incompatible receiver, "+t+" required")}}},Ut=He(function(e){var r=je.CONFIGURABLE,i=Ft.enforce,t=Ft.get,o=String,a=Object.defineProperty,s=y("".slice),u=y("".replace),l=y([].join),c=f&&!g(function(){return 8!==a(function(){},"length",{value:8}).length}),d=String(String).split("String"),e=e.exports=function(e,t,n){"Symbol("===s(o(t),0,7)&&(t="["+u(o(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!I(e,"name")||r&&e.name!==t)&&(f?a(e,"name",{value:t,configurable:!0}):e.name=t),c&&n&&I(n,"arity")&&e.length!==n.arity&&a(e,"length",{value:n.arity});try{n&&I(n,"constructor")&&n.constructor?f&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=undefined)}catch(j){}n=i(e);return I(n,"source")||(n.source=l(d,"string"==typeof t?t:"")),e};Function.prototype.toString=e(function(){return _(this)&&t(this).source||Ze(this)},"toString")}),jt=function(e,t,n){return n.get&&Ut(n.get,t,{getter:!0}),n.set&&Ut(n.set,t,{setter:!0}),it.f(e,t,n)},Lt=je.EXISTS,zt=Function.prototype,Bt=y(zt.toString),Wt=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Ht=y(Wt.exec),qt=(f&&!Lt&&jt(zt,"name",{configurable:!0,get:function(){try{return Ht(Wt,Bt(this))[1]}catch(u){return""}}}),function(e,t,n,r){var i=(r=r||{}).enumerable,o=r.name!==undefined?r.name:t;if(_(n)&&Ut(n,o,r),r.global)i?e[t]=n:Ve(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(w){}i?e[t]=n:it.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}),Vt=void 0,Gt=Ke("species"),Jt=RegExp.prototype,Lt=function(r,e,t,n){var a,i=Ke(r),s=!g(function(){var e={};return e[i]=function(){return 7},7!==""[r](e)}),o=s&&!g(function(){var e,t=!1,n=/a/;return"split"===r&&((e={})[Gt]=function(){return n},(n={constructor:e,flags:""})[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t});s&&o&&!t||(a=/./[i],o=e(i,""[r],function(e,t,n,r,i){var o=t.exec;return o===Vt||o===Jt.exec?s&&!i?{done:!0,value:M(a,t,n,r)}:{done:!0,value:M(e,n,t,r)}:{done:!1}}),qt(String.prototype,r,o[0]),qt(Jt,i,o[1])),n&&ot(Jt[i],"sham",!0)},$t=y("".charAt),Zt=y("".charCodeAt),Kt=y("".slice),zt=function(i){return function(e,t){var n,e=C(oe(e)),t=le(t),r=e.length;return t<0||r<=t?i?"":undefined:(n=Zt(e,t))<55296||56319<n||t+1===r||(r=Zt(e,t+1))<56320||57343<r?i?$t(e,t):n:i?Kt(e,t,t+2):r-56320+(n-55296<<10)+65536}},zt={codeAt:zt(!1),charAt:zt(!0)},Yt=zt.charAt,Xt=function(e,t,n){return t+(n&&Yt(e,t).length||1)},Qt=function(e,t){t=e[t];return re(t)?undefined:Oe(t)},en=Math.floor,tn=y("".charAt),nn=y("".replace),rn=y("".slice),on=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,an=/\$([$&'`]|\d{1,2})/g,sn=x.RegExp,un={correct:!g(function(){var e=!0;try{sn(".","d")}catch(k){e=!1}var t,n={},r="",i=e?"dgimsy":"gimsy",o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(t in e&&(o.hasIndices="d"),o)!function(e,t){Object.defineProperty(n,e,{get:function(){return r+=t,!0}})}(t,o[t]);return Object.getOwnPropertyDescriptor(sn.prototype,"flags").get.call(n)!==i||r!==i})},ln=function(){var e=E(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},cn=(f&&!un.correct&&(jt(RegExp.prototype,"flags",{configurable:!0,get:ln}),un.correct=!0),RegExp.prototype),dn=un.correct?function(e){return e.flags}:function(e){return un.correct||!_e(cn,e)||I(e,"flags")?e.flags:M(ln,e)},fn=TypeError,hn=function(e,t){var n=e.exec;if(_(n))return null!==(n=M(n,e,t))&&E(n),n;if("RegExp"===te(e))return M(Vt,e,t);throw new fn("RegExp#exec called on incompatible receiver")},pn=Ke("replace"),mn=Math.max,gn=Math.min,vn=y([].concat),yn=y([].push),wn=y("".indexOf),bn=y("".slice),r="$0"==="a".replace(/./,"$0"),kn=!!/./[pn]&&""===/./[pn]("a","$0"),Sn=(Lt("replace",function(e,b,k){var S=kn?"$":"$0";return[function(e,t){var n=oe(this),r=O(e)?Qt(e,pn):undefined;return r?M(r,e,n,t):M(b,C(n),e,t)},function(e,t){var n=E(this),r=C(e),i=_(t),e=(i||(t=C(t)),C(dn(n)));if("string"==typeof t&&!~wn(t,S)&&!~wn(t,"$<")&&!~wn(e,"y")){var o=k(b,n,r,t);if(o.done)return o.value}var a,s=!!~wn(e,"g");s&&(a=!!~wn(e,"u")||!!~wn(e,"v"),n.lastIndex=0);for(var u,l=[];null!==(u=hn(n,r))&&(yn(l,u),s);)""===C(u[0])&&(n.lastIndex=Xt(r,de(n.lastIndex),a));for(var c,d="",f=0,h=0;h<l.length;h++){for(var p=C((u=l[h])[0]),m=mn(gn(le(u.index),r.length),0),g=[],v=1;v<u.length;v++)yn(g,(c=u[v])===undefined?c:String(c));var y=u.groups,w=i?(w=vn([p],g,m,r),y!==undefined&&yn(w,y),C(xe(t,undefined,w))):function(o,a,s,u,l,e){var c=s+o.length,d=u.length,t=an;return l!==undefined&&(l=se(l),t=on),nn(e,t,function(e,t){var n;switch(tn(t,0)){case"$":return"$";case"&":return o;case"`":return rn(a,0,s);case"'":return rn(a,c);case"<":n=l[rn(t,1,-1)];break;default:var r,i=+t;if(0==i)return e;if(d<i)return 0!==(r=en(i/10))&&r<=d?u[r-1]===undefined?tn(t,1):u[r-1]+tn(t,1):e;n=u[i-1]}return n===undefined?"":n})}(p,r,m,g,y,t);f<=m&&(d+=bn(r,f,m)+w,f=m+p.length)}return d+bn(r,f)}]},!!g(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!r||kn),function(){}),_n=Se("Reflect","construct"),En=/^\s*(?:class|function)\b/,Cn=y(En.exec),Rn=!En.test(Sn),On=function(e){if(!_(e))return!1;try{return _n(Sn,[],e),!0}catch(m){return!1}},r=function(e){if(!_(e))return!1;switch(et(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Rn||!!Cn(En,Ze(e))}catch(m){return!0}},xn=(r.sham=!0,!_n||g(function(){var e;return On(On.call)||!On(Object)||!On(function(){e=!0})||e})?r:On),Tn=TypeError,Mn=Object.getOwnPropertyDescriptor,In=f&&!function(){if(this!==undefined)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(u){return u instanceof TypeError}}()?function(e,t){if(Y(e)&&!Mn(e,"length").writable)throw new Tn("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},An=y("".indexOf);Lt("match",function(r,s,u){return[function(e){var t=oe(this),n=O(e)?Qt(e,r):undefined;return n?M(n,e,t):(n=C(t),new RegExp(e)[r](n))},function(e){var t=E(this),n=C(e),e=u(s,t,n);if(e.done)return e.value;e=C(dn(t));if(!~An(e,"g"))return hn(t,n);for(var r=!!~An(e,"u")||!!~An(e,"v"),i=[],o=t.lastIndex=0;null!==(a=hn(t,n));){var a=C(a[0]);""===(i[o]=a)&&(t.lastIndex=Xt(n,de(t.lastIndex),r)),o++}return 0===o?null:i}]});var Pn,Dn,Ln,Nn,Fn,Un,jn,zn,Bn,r=x.navigator,r=r&&r.userAgent,Wn=r?String(r):"",r=x.process,Hn=x.Deno,r=r&&r.versions||Hn&&Hn.version,Hn=r&&r.v8,qn=i=!(i=Hn?0<(tr=Hn.split("."))[0]&&tr[0]<4?1:+(tr[0]+tr[1]):i)&&Wn&&(!(tr=Wn.match(/Edge\/(\d+)/))||74<=tr[1])&&(tr=Wn.match(/Chrome\/(\d+)/))?+tr[1]:i,Vn=Ke("species"),r=function(t){return 51<=qn||!g(function(){var e=[];return(e.constructor={})[Vn]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Gn=void 0,Jn=void 0,Hn=r("slice"),$n=Ke("species"),Zn=Array,Kn=Math.max,Yn=(R({target:"Array",proto:!0,forced:!Hn},{slice:function(e,t){var n,r,i,o=Be(this),a=fe(o),s=dt(e,a),u=dt(t===undefined?a:t,a);if(Y(o)&&(n=o.constructor,(n=xn(n)&&(n===Zn||Y(n.prototype))||O(n)&&null===(n=n[$n])?undefined:n)===Zn||n===undefined))return Jn(o,s,u);for(r=new(n===undefined?Zn:n)(Kn(u-s,0)),i=0;s<u;s++,i++)s in o&&Gn(r,i,o[s]);return In(r,i),r}}),y([].slice),void 0),Xn=Yn.f,Qn="object"==("undefined"==typeof window?"undefined":T(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],er={f:function(e){if(!Qn||"Window"!==te(e))return Xn(Be(e));try{return Xn(e)}catch(m){return Jn(Qn)}}},tr=er.f,i=g(function(){return!Object.getOwnPropertyNames(1)}),nr=(R({target:"Object",stat:!0,forced:i},{getOwnPropertyNames:tr}),vt.concat("length","prototype"),Object.getOwnPropertyNames,{f:Object.getOwnPropertySymbols}),rr=y([].concat),ir=Se("Reflect","ownKeys")||function(e){var t=Yn.f(E(e)),n=nr.f;return n?rr(t,n(e)):t},or=void 0,Hn=function(e,t,n){for(var r=ir(t),i=it.f,o=or.f,a=0;a<r.length;a++){var s=r[a];I(e,s)||n&&I(n,s)||i(e,s,o(t,s))}},ar=x.Symbol,sr=ar&&ar.prototype,ur=(!f||!_(ar)||"description"in sr&&ar().description===undefined||(Pn={},Hn(i=function(){var e=arguments.length<1||arguments[0]===undefined?undefined:C(arguments[0]),t=_e(sr,this)?new ar(e):e===undefined?ar():ar(e);return""===e&&(Pn[t]=!0),t},ar),Dn=i["for"],i["for"]=function(e){var e=C(e),t=M(Dn,this,e);return""===e&&(Pn[t]=!0),t},(i.prototype=sr).constructor=i,Ln="Symbol(description detection)"===String(ar("description detection")),Nn=y(sr.valueOf),Fn=y(sr.toString),Un=/^Symbol\((.*)\)[^)]+$/,jn=y("".replace),zn=y("".slice),jt(sr,"description",{configurable:!0,get:function(){var e=Nn(this);return I(Pn,e)?"":(e=Fn(e),""===(e=Ln?zn(e,7,-1):jn(e,Un,"$1"))?undefined:e)}}),R({global:!0,constructor:!0,forced:!0},{Symbol:i})),TypeError),lr=function(e,t){if(_e(t,e))return e;throw new ur("Incorrect invocation")},tr=!g(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),cr=void 0,Hn=g(function(){cr(1)}),i=(R({target:"Object",stat:!0,forced:Hn,sham:!tr},{getPrototypeOf:function(e){return cr(se(e))}}),n("IE_PROTO"),Object),Hn=(i.prototype,tr&&i.getPrototypeOf,it.f),dr=Ke("unscopables"),fr=Array.prototype,tr=(fr[dr]===undefined&&Hn(fr,dr,{configurable:!0,value:Et(null)}),function(e){fr[dr][e]=!0}),hr=Object.create?Object.create(null):{},pr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},i=ve("span").classList,Hn=i&&i.constructor&&i.constructor.prototype,i=Hn===Object.prototype?undefined:Hn,mr=it.f,gr=Ke("toStringTag"),vr=function(e,t,n){(e=e&&!n?e.prototype:e)&&!I(e,gr)&&mr(e,gr,{configurable:!0,value:t})},yr=void 0,wr=Ke("iterator"),br=yr.values,kr=function(e,t){if(e){if(e[wr]!==br)try{ot(e,wr,br)}catch(v){e[wr]=br}if(vr(e,t,!0),pr[t])for(var n in yr)if(e[n]!==yr[n])try{ot(e,n,yr[n])}catch(v){e[n]=yr[n]}}};for(Bn in pr)kr(x[Bn]&&x[Bn].prototype,Bn);kr(i,"DOMTokenList");var Hn=void 0,Sr=Hn.IteratorPrototype,_r=function(){return this},Er=function(e,t,n,r){t+=" Iterator";return e.prototype=Et(Sr,{next:rt(+!r,n)}),vr(e,t,!1),hr[t]=_r,e},Cr=void 0,Rr=(R({target:"Object",stat:!0},{setPrototypeOf:Cr}),String,TypeError,Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e){try{return y(Oe(Object.getOwnPropertyDescriptor(e,"__proto__").set))}catch(v){}}(Object.prototype))(n,[]),t=n instanceof Array}catch(v){}}():undefined),je.PROPER),Or=je.CONFIGURABLE,xr=Hn.IteratorPrototype,Tr=Hn.BUGGY_SAFARI_ITERATORS,Mr=Ke("iterator"),Ir=function(){return this},Ar=function(e,t){return{value:e,done:t}},Pr=function(e,t,n,r,i,o,a){Er(n,t,r);var s,u,r=function(e){if(e===i&&h)return h;if(!Tr&&e&&e in d)return d[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,d=e.prototype,f=d[Mr]||d["@@iterator"]||i&&d[i],h=!Tr&&f||r(i),p="Array"===t&&d.entries||f;if(p&&(e=cr(p.call(new e)))!==Object.prototype&&e.next&&(cr(e)!==xr&&(Cr?Cr(e,xr):_(e[Mr])||qt(e,Mr,Ir)),vr(e,l,!0)),Rr&&"values"===i&&f&&"values"!==f.name&&(Or?ot(d,"name","values"):(c=!0,h=function(){return M(f,this)})),i)if(s={values:r("values"),keys:o?h:r("keys"),entries:r("entries")},a)for(u in s)!Tr&&!c&&u in d||qt(d,u,s[u]);else R({target:t,proto:!0,forced:Tr||c},s);return d[Mr]!==h&&qt(d,Mr,h,{name:i}),hr[t]=h,s},Dr=it.f,Lr=Ft.set,Nr=Ft.getterFor("Array Iterator"),Fr=(Pr(Array,"Array",function(e,t){Lr(this,{type:"Array Iterator",target:Be(e),index:0,kind:t})},function(){var e=Nr(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Ar(undefined,!0);switch(e.kind){case"keys":return Ar(n,!1);case"values":return Ar(t[n],!1)}return Ar([n,t[n]],!1)},"values"),hr.Arguments=hr.Array);if(tr("keys"),tr("values"),tr("entries"),f&&"values"!==Fr.name)try{Dr(Fr,"name",{value:"values"})}catch(X){}var Ur,jr,zr=Ke("iterator"),Br=([].keys&&("next"in(Fr=[].keys())?(Dr=cr(cr(Fr)))!==Object.prototype&&(Ur=Dr):0),O(Ur)&&!g(function(){var e={};return Ur[zr].call(e)!==e})||(Ur={}),_(Ur[zr])||qt(Ur,zr,function(){return this}),Hn.IteratorPrototype),Fr=Ke("toStringTag"),Wr=TypeError,Hr=x.Iterator,Dr=!_(Hr)||Hr.prototype!==Br||!g(function(){Hr({})}),qr=function(){if(lr(this,Br),cr(this)===Br)throw new Wr("Abstract class Iterator not directly constructable")},Vr=function(t,e){f?jt(Br,t,{configurable:!0,get:function(){return e},set:function(e){if(E(this),this===Br)throw new Wr("You can't redefine this property");I(this,t)?this[t]=e:Gn(this,t,e)}}):Br[t]=e},Gr=(I(Br,Fr)||Vr(Fr,"Iterator"),!Dr&&I(Br,"constructor")&&Br.constructor!==Object||Vr("constructor",qr),qr.prototype=Br,R({global:!0,constructor:!0,forced:Dr},{Iterator:qr}),st(st.bind)),Jr=function(e,t){return Oe(e),t===undefined?e:be?Gr(e,t):function(){return e.apply(t,arguments)}},$r=Ke("iterator"),Zr=Array.prototype,Kr=function(e){return e!==undefined&&(hr.Array===e||Zr[$r]===e)},Yr=Ke("iterator"),Xr=Array.prototype,Qr=function(e){if(!re(e))return Qt(e,Yr)||Qt(e,"@@iterator")||("Arguments"===te(e)?Xr[Yr]:undefined)},ei=TypeError,ti=function(e,t){t=arguments.length<2?Qr(e):t;if(_(t))return E(M(t,e));throw new ei(Ce(e)+" is not iterable")},ni=function(e,t,n){var r,i;E(e);try{if(!(r=Qt(e,"return"))){if("throw"===t)throw n;return n}r=M(r,e)}catch(X){i=!0,r=X}if("throw"===t)throw n;if(i)throw r;return E(r),n},ri=TypeError,ii=function(e,t){this.stopped=e,this.result=t},oi=ii.prototype,ai=function(e,t,n){var r,i,o,a,s,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),c=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),h=Jr(t,u),p=function(e){var t=r;return r=undefined,t&&ni(t,"normal"),new ii(!0,e)},m=function(e){return l?(E(e),f?h(e[0],e[1],p):h(e[0],e[1])):f?h(e,p):h(e)};if(c)r=e.iterator;else if(d)r=e;else{if(!(n=Qr(e)))throw new ri(Ce(e)+" is not iterable");if(Kr(n)){for(i=0,o=fe(e);i<o;i++)if((a=m(e[i]))&&_e(oi,a))return a;return new ii(!1)}r=ti(e,n)}for(s=(c?e:r).next;!(g=M(s,r)).done;){var g=g.value;try{a=m(g)}catch(X){if(!r)throw X;ni(r,"throw",X)}if("object"==T(a)&&a&&_e(oi,a))return a}return new ii(!1)},si=function(e){return{iterator:e,next:e.next,done:!1}},Fr=function(e,t){var n=x.Iterator,n=n&&n.prototype,e=n&&n[e],r=!1;if(e)try{e.call({next:function(){return{done:!0}},"return":function(){r=!0}},-1)}catch(X){X instanceof t||(r=!1)}if(!r)return e},ui=Fr("forEach",TypeError),li=(R({target:"Iterator",proto:!0,real:!0,forced:ui},{forEach:function(t){E(this);try{Oe(t)}catch(X){ni(this,"throw",X)}if(ui)return M(ui,this,t);var e=si(this),n=0;ai(e,function(e){t(e,n++)},{IS_RECORD:!0})}}),void 0),ci=function(e){if(e&&e.forEach!==li)try{ot(e,"forEach",li)}catch(X){e.forEach=li}};for(jr in pr)pr[jr]&&ci(x[jr]&&x[jr].prototype);ci(i);var di,fi=Ke("species"),hi=Array,pi=function(e,t){return new((n=Y(e=e)&&(n=e.constructor,xn(n)&&(n===hi||Y(n.prototype))||O(n)&&null===(n=n[fi]))?undefined:n)===undefined?hi:n)(0===t?0:t);var n},Vr=function(f){var h=1===f,p=2===f,m=3===f,g=4===f,v=6===f,y=7===f,w=5===f||v;return function(e,t,n){for(var r,i,o=se(e),a=ze(o),s=fe(a),u=Jr(t,n),l=0,c=0,d=h?pi(e,s):p||y?pi(e,0):undefined;l<s;l++)if((w||l in a)&&(i=u(r=a[l],l,o),f))if(h)Gn(d,l,i);else if(i)switch(f){case 3:return!0;case 5:return r;case 6:return l;case 2:Gn(d,c++,r)}else switch(f){case 4:return!1;case 7:Gn(d,c++,r)}return v?-1:m||g?g:d}},mi={forEach:Vr(0),map:Vr(1),filter:Vr(2),some:Vr(3),every:Vr(4),find:Vr(5),findIndex:Vr(6),filterReject:Vr(7)},gi=(Ue("forEach"),R({target:"Array",proto:!0,forced:[].forEach!==li},{forEach:li}),x.String),Dr=!!Object.getOwnPropertySymbols&&!g(function(){var e=Symbol("symbol detection");return!gi(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&qn&&qn<41}),qr={}.propertyIsEnumerable,vi=Object.getOwnPropertyDescriptor,yi={f:vi&&!qr.call({1:2},1)?function(e){e=vi(this,e);return!!e&&e.enumerable}:qr},wi={f:Ke},bi=x,ki=it.f,Si=function(e){var t=bi.Symbol||(bi.Symbol={});I(t,e)||ki(t,e,{value:wi.f(e)})},_i=void 0,Ei=mi.forEach,Ci=n("hidden"),Ri=Ft.set,Oi=Ft.getterFor("Symbol"),xi=Object.prototype,i=x.Symbol,Ti=i&&i.prototype,Mi=x.RangeError,Ii=x.TypeError,Vr=x.QObject,Ai=or.f,Pi=it.f,Di=er.f,Li=yi.f,Ni=y([].push),Fi=e("symbols"),Ui=e("op-symbols"),qr=e("wks"),ji=!Vr||!Vr.prototype||!Vr.prototype.findChild,zi=function(e,t,n){var r=Ai(xi,t);return r&&delete xi[t],Pi(e,t,n),r&&e!==xi&&Pi(xi,t,r),e},Bi=f&&g(function(){return 7!==Et(Pi({},"a",{get:function(){return Pi(this,"a",{value:7}).a}})).a})?zi:Pi,Wi=function(e,t){var n=Fi[e]=Et(Ti);return Ri(n,{type:"Symbol",tag:e,description:t}),f||(n.description=t),n},Hi=function(e,t,n){e===xi&&Hi(Ui,t,n),E(e);t=_i(t);return E(n),(I(Fi,t)?(("enumerable"in n?!n.enumerable:!I(e,t)||I(e,Ci)&&e[Ci][t])?(I(e,Ci)||Pi(e,Ci,rt(1,Et(null))),e[Ci][t]=!0):(I(e,Ci)&&e[Ci][t]&&(e[Ci][t]=!1),n=Et(n,{enumerable:rt(0,!1)})),Bi):Pi)(e,t,n)},qi=function(t,e){E(t);var n=Be(e),e=ut(n).concat(Gi(n));return Ei(e,function(e){f&&!M(Vi,n,e)||Hi(t,e,n[e])}),t},Vi=function(e){var e=_i(e),t=M(Li,this,e);return!(this===xi&&I(Fi,e)&&!I(Ui,e))&&(!(t||!I(this,e)||!I(Fi,e)||I(this,Ci)&&this[Ci][e])||t)},n=function(e,t){var n,e=Be(e),t=_i(t);if(e!==xi||!I(Fi,t)||I(Ui,t))return!(n=Ai(e,t))||!I(Fi,t)||I(e,Ci)&&e[Ci][t]||(n.enumerable=!0),n},Vr=function(e){var e=Di(Be(e)),t=[];return Ei(e,function(e){I(Fi,e)||I(gt,e)||Ni(t,e)}),t},Gi=function(e){var t=e===xi,e=Di(t?Ui:Be(e)),n=[];return Ei(e,function(e){!I(Fi,e)||t&&!I(xi,e)||Ni(n,Fi[e])}),n},Vr=(Dr||(Ti=(i=function(){if(_e(Ti,this))throw new Ii("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==undefined?C(arguments[0]):undefined,n=Pt(e),r=function(e){var t=this===undefined?x:this,e=(t===xi&&M(r,Ui,e),I(t,Ci)&&I(t[Ci],n)&&(t[Ci][n]=!1),rt(1,e));try{Bi(t,n,e)}catch(X){if(!(X instanceof Mi))throw X;zi(t,n,e)}};return f&&ji&&Bi(xi,n,{configurable:!0,set:r}),Wi(n,e)}).prototype,qt(Ti,"toString",function(){return Oi(this).tag}),qt(i,"withoutSetter",function(e){return Wi(Pt(e),e)}),yi.f=Vi,it.f=Hi,at.f=qi,or.f=n,Yn.f=er.f=Vr,nr.f=Gi,wi.f=function(e){return Wi(Ke(e),e)},f&&(jt(Ti,"description",{configurable:!0,get:function(){return Oi(this).description}}),qt(xi,"propertyIsEnumerable",Vi,{unsafe:!0}))),R({global:!0,constructor:!0,wrap:!0,forced:!Dr,sham:!Dr},{Symbol:i}),Ei(ut(qr),function(e){Si(e)}),R({target:"Symbol",stat:!0,forced:!Dr},{useSetter:function(){ji=!0},useSimple:function(){ji=!1}}),R({target:"Object",stat:!0,forced:!Dr,sham:!f},{create:function(e,t){return t===undefined?Et(e):qi(Et(e),t)},defineProperty:Hi,defineProperties:qi,getOwnPropertyDescriptor:n}),R({target:"Object",stat:!0,forced:!Dr},{getOwnPropertyNames:Vr}),qr=(qr=Se("Symbol"))&&qr.prototype,di=qr&&qr.valueOf,n=Ke("toPrimitive"),qr&&!qr[n]&&qt(qr,n,function(e){return M(di,this)},{arity:1}),vr(i,"Symbol"),gt[Ci]=!0,Dr&&!!Symbol["for"]&&!!Symbol.keyFor),Ji=e("string-to-symbol-registry"),$i=e("symbol-to-string-registry"),Zi=(R({target:"Symbol",stat:!0,forced:!Vr},{"for":function(e){var t,e=C(e);return I(Ji,e)?Ji[e]:(t=Se("Symbol")(e),Ji[e]=t,$i[t]=e,t)}}),void 0),Ki=e("symbol-to-string-registry"),Yi=(R({target:"Symbol",stat:!0,forced:!Vr},{keyFor:function(e){if(!Zi(e))throw new TypeError(Ce(e)+" is not a symbol");if(I(Ki,e))return Ki[e]}}),Ke("match")),Xi=function(e){var t;return O(e)&&((t=e[Yi])!==undefined?!!t:"RegExp"===te(e))},Qi=TypeError,eo=function(e){if(Xi(e))throw new Qi("The method doesn't accept regular expressions");return e},to=Ke("match"),qr=function(e){var t=/./;try{"/./"[e](t)}catch(S){try{return t[to]=!1,"/./"[e](t)}catch(v){}}return!1},no=y("".indexOf),ro=(R({target:"String",proto:!0,forced:!qr("includes")},{includes:function(e){return!!~no(C(oe(this)),C(eo(e)),1<arguments.length?arguments[1]:undefined)}}),t.includes),n=g(function(){return!Array(1).includes()}),i=g(function(){return[,1].includes(undefined,1)}),io=(R({target:"Array",proto:!0,forced:n||i},{includes:function(e){return ro(this,e,1<arguments.length?arguments[1]:undefined)}}),tr("includes"),RangeError),oo=Math.floor,Vr=function(e){var t=C(oe(this)),n="",r=le(e);if(r<0||r===Infinity)throw new io("Wrong number of repetitions");for(;0<r;(r=oo(r/2))&&(t+=t))r%2&&(n+=t);return n},ao=y(Vr),so=y("".slice),uo=Math.ceil,n=function(i){return function(e,t,n){var e=C(oe(e)),t=de(t),r=e.length;return t<=r||""===(n=n===undefined?" ":C(n))?e:((r=ao(n,uo((t=t-r)/n.length))).length>t&&(r=so(r,0,t)),i?e+r:r+e)}},lo=[n(!1),n(!0)][0],co=RangeError,fo=isFinite,ho=Math.abs,i=Date.prototype,po=i.toISOString,mo=y(i.getTime),go=y(i.getUTCDate),vo=y(i.getUTCFullYear),yo=y(i.getUTCHours),wo=y(i.getUTCMilliseconds),bo=y(i.getUTCMinutes),ko=y(i.getUTCMonth),So=y(i.getUTCSeconds),n=g(function(){return"0385-07-25T07:06:39.999Z"!==po.call(new Date(-50000000000001))})||!g(function(){po.call(new Date(NaN))})?function(){var e,t,n;if(fo(mo(this)))return e=vo(this),t=wo(this),(n=e<0?"-":9999<e?"+":"")+lo(ho(e),n?6:4,0)+"-"+lo(ko(this)+1,2,0)+"-"+lo(go(this),2,0)+"T"+lo(yo(this),2,0)+":"+lo(bo(this),2,0)+":"+lo(So(this),2,0)+"."+lo(t,3,0)+"Z";throw new co("Invalid time value")}:po,_o=(R({target:"Date",proto:!0,forced:Date.prototype.toISOString!==n},{toISOString:n}),void 0),i=g(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})});R({target:"Date",proto:!0,forced:i},{toJSON:function(e){var t=se(this),n=_o(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}});var Eo,Co=Ft.get,Ro=y(1.1.valueOf),Oo="\t\n\x0B\f\r \u2028\u2029\ufeff",xo=y("".replace),To=RegExp("^["+Oo+"]+"),Mo=RegExp("(^|[^"+Oo+"])["+Oo+"]+$"),n=function(t){return function(e){e=C(oe(e));return 1&t&&(e=xo(e,To,"")),e=2&t?xo(e,Mo,"$1"):e}},i={start:n(1),end:n(2),trim:n(3)},Io=je.PROPER,Ao=i.trim,Po=(R({target:"String",proto:!0,forced:(Eo="trim",g(function(){return!!Oo[Eo]()||"
"!=="
"[Eo]()||Io&&Oo[Eo].name!==Eo}))},{trim:function(){return Ao(this)}}),i.trim),Do=x.parseInt,n=x.Symbol,Lo=n&&n.iterator,No=/^[+-]?0x/i,Fo=y(No.exec),n=8!==Do(Oo+"08")||22!==Do(Oo+"0x16")||Lo&&!g(function(){Do(Object(Lo))})?function(e,t){e=Po(C(e));return Do(e,t>>>0||(Fo(No,e)?16:10))}:Do,Uo=(R({global:!0,forced:parseInt!==n},{parseInt:n}),SyntaxError),jo=parseInt,zo=String.fromCharCode,Bo=y("".charAt),Wo=y("".slice),Ho=y(/./.exec),qo={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},Vo=/^[\da-f]{4}$/i,Go=/^[\u0000-\u001F]$/,Jo=void 0,$o=Jo.ArrayBuffer,Zo=Jo.DataView,n=Zo.prototype,Ko=st($o.prototype.slice),Yo=st(n.getUint8),Xo=st(n.setUint8),n=g(function(){return!new $o(2).slice(1,undefined).byteLength}),n=(R({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:n},{slice:function(e,t){if(Ko&&t===undefined)return Ko(E(this),e);for(var n=E(this).byteLength,r=dt(e,n),i=dt(t===undefined?n:t,n),e=new $o(de(i-r)),o=new Zo(this),a=new Zo(e),s=0;r<i;)Xo(a,s++,Yo(o,r++));return e}}),void 0),Qo=(R({global:!0,constructor:!0,forced:!0},{DataView:Jo.DataView}),function(e,t,n){for(var r in t)qt(e,r,t[r],n);return e}),ea=RangeError,ta=function(e){if(e===undefined)return 0;var e=le(e),t=de(e);if(e!==t)throw new ea("Wrong length or index");return t},na=(R({target:"Math",stat:!0},{fround:void 0}),R({target:"Math",stat:!0},{sign:void 0}),Math.sign,Array),ra=Math.abs,ia=Math.pow,oa=Math.floor,aa=Math.log,sa=Math.LN2,ua=void 0,la=(R({target:"Array",proto:!0},{fill:ua}),tr("fill"),function(e,t,n){return Cr&&_(t=t.constructor)&&t!==n&&O(t=t.prototype)&&t!==n.prototype&&Cr(e,t),e}),ca=Ft.getterFor("ArrayBuffer"),da=Ft.getterFor("DataView"),fa=Ft.set,o=x.ArrayBuffer,ha=o&&o.prototype,a=x.DataView,pa=a&&a.prototype,ma=(Object.prototype,x.Array),ga=x.RangeError,va=y(ua),ya=y([].reverse),wa=function(e,t,n){var r,i,o,a=na(n),s=8*n-t-1,n=(1<<s)-1,u=n>>1,l=23===t?ia(2,-24)-ia(2,-77):0,c=e<0||0===e&&1/e<0?1:0,d=0;for((e=ra(e))!=e||e===Infinity?(i=e!=e?1:0,r=n):(r=oa(aa(e)/sa),e*(o=ia(2,-r))<1&&(r--,o*=2),2<=(e+=1<=r+u?l/o:l*ia(2,1-u))*o&&(r++,o/=2),n<=r+u?(i=0,r=n):1<=r+u?(i=(e*o-1)*ia(2,t),r+=u):(i=e*ia(2,u-1)*ia(2,t),r=0));8<=t;)a[d++]=255&i,i/=256,t-=8;for(r=r<<t|i,s+=t;0<s;)a[d++]=255&r,r/=256,s-=8;return a[d-1]|=128*c,a},ba=function(e,t){var n,r=e.length,i=8*r-t-1,o=(1<<i)-1,a=o>>1,s=i-7,u=r-1,i=e[u--],l=127&i;for(i>>=7;0<s;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;0<s;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===o)return n?NaN:i?-Infinity:Infinity;n+=ia(2,t),l-=a}return(i?-1:1)*n*ia(2,l-t)},ka=function(e){return[255&e]},Sa=function(e){return[255&e,e>>8&255]},_a=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Ea=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Ca=function(e){return wa((void 0)(e),23,4)},Ra=function(e){return wa(e,52,8)},s=function(e,t,n){jt(e.prototype,t,{configurable:!0,get:function(){return n(this)[t]}})},Oa=function(e,t,n,r){e=da(e),n=ta(n),r=!!r;if(n+t>e.byteLength)throw new ga("Wrong index");n+=e.byteOffset,e=Jn(e.bytes,n,n+t);return r?e:ya(e)},xa=function(e,t,n,r,i,o){var e=da(e),n=ta(n),a=r(+i),s=!!o;if(n+t>e.byteLength)throw new ga("Wrong index");for(var u=e.bytes,l=n+e.byteOffset,c=0;c<t;c++)u[l+c]=a[s?c:t-c-1]},ha=(o=function(e){lr(this,ha);e=ta(e);fa(this,{type:"ArrayBuffer",bytes:va(ma(e),0),byteLength:e}),f||(this.byteLength=e,this.detached=!1)}).prototype,pa=(a=function(e,t,n){lr(this,pa),lr(e,ha);var r=ca(e),i=r.byteLength,t=le(t);if(t<0||i<t)throw new ga("Wrong offset");if(t+(n=n===undefined?i-t:ta(n))>i)throw new ga("Wrong length");fa(this,{type:"DataView",buffer:e,byteLength:n,byteOffset:t,bytes:r.bytes}),f||(this.buffer=e,this.byteLength=n,this.byteOffset=t)}).prototype,Ta=(f&&(s(o,"byteLength",ca),s(a,"buffer",da),s(a,"byteLength",da),s(a,"byteOffset",da)),Qo(pa,{getInt8:function(e){return Oa(this,1,e)[0]<<24>>24},getUint8:function(e){return Oa(this,1,e)[0]},getInt16:function(e){e=Oa(this,2,e,1<arguments.length&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(e){e=Oa(this,2,e,1<arguments.length&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(e){return Ea(Oa(this,4,e,1<arguments.length&&arguments[1]))},getUint32:function(e){return Ea(Oa(this,4,e,1<arguments.length&&arguments[1]))>>>0},getFloat32:function(e){return ba(Oa(this,4,e,1<arguments.length&&arguments[1]),23)},getFloat64:function(e){return ba(Oa(this,8,e,1<arguments.length&&arguments[1]),52)},setInt8:function(e,t){xa(this,1,e,ka,t)},setUint8:function(e,t){xa(this,1,e,ka,t)},setInt16:function(e,t){xa(this,2,e,Sa,t,2<arguments.length&&arguments[2])},setUint16:function(e,t){xa(this,2,e,Sa,t,2<arguments.length&&arguments[2])},setInt32:function(e,t){xa(this,4,e,_a,t,2<arguments.length&&arguments[2])},setUint32:function(e,t){xa(this,4,e,_a,t,2<arguments.length&&arguments[2])},setFloat32:function(e,t){xa(this,4,e,Ca,t,2<arguments.length&&arguments[2])},setFloat64:function(e,t){xa(this,8,e,Ra,t,2<arguments.length&&arguments[2])}}),vr(o,"ArrayBuffer"),vr(a,"DataView"),Ke("species")),Ma=function(e){e=Se(e);f&&e&&!e[Ta]&&jt(e,Ta,{configurable:!0,get:function(){return this}})},s=Jo.ArrayBuffer,o=x.ArrayBuffer,Ia=(R({global:!0,constructor:!0,forced:o!==s},{ArrayBuffer:s}),Ma("ArrayBuffer"),g(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e))&&Object.defineProperty(e,"a",{value:8})})),Aa=Object.isExtensible,Pa=g(function(){Aa(1)})||Ia?function(e){return!!O(e)&&(!Ia||"ArrayBuffer"!==te(e))&&(!Aa||Aa(e))}:Aa,Da=(R({target:"Object",stat:!0,forced:Object.isExtensible!==Pa},{isExtensible:Pa}),TypeError),La=function(e,t){if(!delete e[t])throw new Da("Cannot delete property "+Ce(t)+" of "+Ce(e))},a=r("splice"),Na=Math.max,Fa=Math.min,Ua=(R({target:"Array",proto:!0,forced:!a},{splice:function(e,t){var n,r,i,o,a,s,u=se(this),l=fe(u),c=dt(e,l),e=arguments.length;for(0===e?n=r=0:r=1===e?(n=0,l-c):(n=e-2,Fa(Na(le(t),0),l-c)),pe(l+n-r),i=pi(u,r),o=0;o<r;o++)(a=c+o)in u&&Gn(i,o,u[a]);if(In(i,r),n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:La(u,s);for(o=l;l-r+n<o;o--)La(u,o-1)}else if(r<n)for(o=l-r;c<o;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:La(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return In(u,l-r+n),i}}),He(function(e){var t=it.f,a=Pt("meta"),n=0,r=function(e){t(e,a,{value:{objectID:"O"+n++,weakData:{}}})},s=e.exports={enable:function(){s.enable=function(){},0;var i=Yn.f,o=y([].splice),e={};e[a]=1,i(e).length&&(Yn.f=function(e){for(var t=i(e),n=0,r=t.length;n<r;n++)if(t[n]===a){o(t,n,1);break}return t},R({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:er.f}))},fastKey:function(e,t){if(!O(e))return"symbol"==T(e)?e:("string"==typeof e?"S":"P")+e;if(!I(e,a)){if(!Pa(e))return"F";if(!t)return"E";r(e)}return e[a].objectID},getWeakData:function(e,t){if(!I(e,a)){if(!Pa(e))return!0;if(!t)return!1;r(e)}return e[a].weakData},onFreeze:function(e){return e}};gt[a]=!0})),ja=Ua.onFreeze,za=Object.preventExtensions,o=g(function(){za(1)}),Ba=(R({target:"Object",stat:!0,forced:o,sham:!0},{preventExtensions:function(e){return za&&O(e)?za(ja(e)):e}}),g(function(){return Object.isExtensible(Object.preventExtensions({}))}),Ua.onFreeze),Wa=Object.freeze,s=g(function(){Wa(1)}),Ha=(R({target:"Object",stat:!0,forced:s,sham:!0},{freeze:function(e){return Wa&&O(e)?Wa(Ba(e)):e}}),!g(function(){var e=JSON.rawJSON("9007199254740993");return!JSON.isRawJSON(e)||"9007199254740993"!==JSON.stringify(e)})),qa=t.includes,Va=String,Ga=TypeError,Ja=Se("JSON","stringify"),a=Se("BigInt"),$a=y("".valueOf),Za=y((!0).valueOf),Ka=a&&y(a.prototype.valueOf),Ya=y(/./.exec),Xa=y("".charAt),Qa=y("".charCodeAt),es=y("".replace),ts=y("".slice),ns=y([].push),rs=y([].pop),is=y(1.1.toString),os=/[\uD800-\uDFFF]/g,as=/^[\uD800-\uDBFF]$/,ss=/^[\uDC00-\uDFFF]$/,us=/^\d+$/,ls=Pt(),cs=Pt(),ds=Pt(),fs=ls.length,hs=cs.length,o=!Dr||g(function(){var e=Se("Symbol")("stringify detection");return"[null]"!==Ja([e])||"{}"!==Ja({a:e})||"{}"!==Ja(Object(e))}),ps=g(function(){return'"\\udf06\\ud834"'!==Ja("\udf06\ud834")||'"\\udead"'!==Ja("\udead")}),ms=Ha?Se("JSON","isRawJSON"):function(e){return!!O(e)&&!!(e=Co(e))&&"RawJSON"===e.type},gs=o?function(e,n,t){return Ja(e,function(e,t){e=M(n,this,e,t);if(!Zi(e))return e},t)}:Ja,vs=function(e,t,n){var r=Xa(n,t-1),n=Xa(n,t+1);return Ya(as,e)&&!Ya(ss,n)||Ya(ss,e)&&!Ya(as,r)?"\\u"+is(Qa(e,0),16):e},ys=function(e,t){try{return e(t),!0}catch(X){return!1}},s=(Ja&&R({target:"JSON",stat:!0,arity:3,forced:o||ps||!Ha},{stringify:function(e,t,n){var r,i=_(t)?t:undefined,o=i?undefined:function(e){if(Y(e)){for(var t=e.length,n=[],r=Et(null),i=0;i<t;i++){var o,a=e[i];if("string"==typeof a)o=a;else{if("number"!=typeof a&&"Number"!==te(a)&&"String"!==te(a))continue;o=C(a)}I(r,o)||(r[o]=!0,ns(n,o))}return n}}(t),a=o&&function(e){for(var t=0,n=e.length;t<n;t++)if(Ya(us,e[t]))return cs;return""}(o),s=[],u=[],l=[],c=!1,d=!0,f=gs(e,function(e,t){if(e=Va(e),o){if(e===ds)return rs(u),void(r=rs(l));if(d)d=!1;else if(this!==r&&!Y(this)&&!qa(o,e))return}else i&&(t=M(i,this,e,t));if(ms(t))return Ha?t:(c=!0,ls+(ns(s,t.rawJSON)-1));if(o&&function(e){if(!O(e)||_(e)||Y(e))return!1;try{return!("Number"===(n=te(t=e))&&ys(Ro,t)||"String"===n&&ys($a,t)||"Boolean"===n&&ys(Za,t)||Ka&&"BigInt"===n&&ys(Ka,t))}catch(X){return!0}var t,n}(t)){if(qa(u,t))throw new Ga("Converting circular structure to JSON");e=function(e,t,n){for(var r=Et(null),i=0,o=t.length;i<o;i++){var a=t[i];r[n+a]=function(n,r){return{toJSON:function(){var e,t=n[r];return t=(O(t)||"bigint"==typeof t)&&(e=t.toJSON,_(e))?M(e,t,r):t}}}(e,a)}return r[ds]=null,r}(t,o,a);return ns(u,t),ns(l,r),a&&(c=!0),r=e}return t},n);if("string"!=typeof f)return f;if(ps&&(f=es(f,os,vs)),!c)return f;for(var h="",p=f.length,m=0;m<p;m++){var g,v,y=Xa(f,m);'"'===y?(g=function(e,t){for(var n=!0,r="";t<e.length;){var i=Bo(e,t);if("\\"===i){var o=Wo(e,t,t+2);if(I(qo,o))r+=qo[o],t+=2;else{if("\\u"!==o)throw new Uo('Unknown escape sequence: "'+o+'"');o=Wo(e,t+=2,t+4);if(!Ho(Vo,o))throw new Uo("Bad Unicode escape at: "+t);r+=zo(jo(o,16)),t+=4}}else{if('"'===i){n=!1,t++;break}if(Ho(Go,i))throw new Uo("Bad control character in string literal at: "+t);r+=i,t++}}if(n)throw new Uo("Unterminated string at: "+t);return{value:r,end:t}}(f,++m).end-1,v=ts(f,m,g),ts(v,0,fs)===ls?h+=s[ts(v,fs)]:ts(v,0,hs)===cs?h+='"'+ts(v,hs)+'"':h+='"'+v+'"',m=g):h+=y}return h}}),!Dr||g(function(){nr.f(1)})),ws=(R({target:"Object",stat:!0,forced:s},{getOwnPropertySymbols:function(e){var t=nr.f;return t?t(se(e)):[]}}),Si("iterator"),zt.charAt),bs=Ft.set,ks=Ft.getterFor("String Iterator"),a=(Pr(String,"String",function(e){bs(this,{type:"String Iterator",string:C(e),index:0})},function(){var e=ks(this),t=e.string,n=e.index;return n>=t.length?Ar(undefined,!0):(t=ws(t,n),e.index+=t.length,Ar(t,!1))}),Dr&&!Symbol.sham&&"symbol"==T(Symbol.iterator)),o=(Object,TypeError,TypeError,Ke("toPrimitive"),TypeError,Object.defineProperty,it.f),Ss=(R({target:"Object",stat:!0,forced:Object.defineProperty!==o,sham:!f},{defineProperty:o}),g(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),Ke("isConcatSpreadable")),s=51<=qn||!g(function(){var e=[];return e[Ss]=!1,e.concat()[0]!==e}),Dr=!s||!r("concat"),_s=(R({target:"Array",proto:!0,arity:1,forced:Dr},{concat:function(e){for(var t,n,r,i,o,a=se(this),s=pi(a,0),u=0,l=-1,c=arguments.length;l<c;l++)if(i=r=-1===l?a:arguments[l],o=void 0,!O(i)||((o=i[Ss])!==undefined?!o:!Y(i)))pe(u+1),Gn(s,u++,r);else for(n=fe(r),pe(u+n),t=0;t<n;t++,u++)t in r&&Gn(s,u,r[t]);return In(s,u),s}}),Function),Es=y([].concat),Cs=y([].join),Rs={},Os=be?_s.bind:function(t){var n=Oe(this),e=n.prototype,r=Jn(arguments,1),i=function(){var e=Es(r,Jn(arguments));return this instanceof i?function(e,t,n){if(!I(Rs,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";Rs[t]=_s("C,a","return new C("+Cs(r,",")+")")}return Rs[t](e,n)}(n,e.length,e):n.apply(t,e)};return O(e)&&(i.prototype=e),i},o=(R({target:"Function",proto:!0,forced:Function.bind!==Os},{bind:Os}),Function.prototype),s=o.call,Dr=(be&&o.bind.bind(s,s),Date.prototype),xs=y(Dr.toString),Ts=y(Dr.getTime),s=("Invalid Date"!==String(new Date(NaN))&&qt(Dr,"toString",function(){var e=Ts(this);return e==e?xs(this):"Invalid Date"}),je.PROPER),o=RegExp.prototype,Ms=o.toString,Dr=g(function(){return"/a/b"!==Ms.call({source:"a",flags:"b"})}),s=s&&"toString"!==Ms.name,Is=((Dr||s)&&qt(o,"toString",function(){var e=E(this);return"/"+C(e.source)+"/"+C(dn(e))},{unsafe:!0}),x.RegExp),Dr=g(function(){var e=Is("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),s=Dr||g(function(){return!Is("a","y").sticky}),o={BROKEN_CARET:Dr||g(function(){var e=Is("^r","gy");return e.lastIndex=2,null!==e.exec("str")}),MISSED_STICKY:s,UNSUPPORTED_Y:Dr},As=Ft.get,Ps=RegExp.prototype,Ds=TypeError,Ls=(f&&o.MISSED_STICKY&&jt(Ps,"sticky",{configurable:!0,get:function(){if(this!==Ps){if("RegExp"===te(this))return!!As(this).sticky;throw new Ds("Incompatible receiver, RegExp required")}}}),/#|\.prototype\./),s=function(e,t){e=Fs[Ns(e)];return e===js||e!==Us&&(_(t)?g(t):!!t)},Ns=s.normalize=function(e){return String(e).replace(Ls,".").toLowerCase()},Fs=s.data={},Us=s.NATIVE="N",js=s.POLYFILL="P",zs=s,Bs=it.f,Ws=x.RegExp,Hs=g(function(){var e=Ws(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}),qs=x.RegExp,Vs=g(function(){var e=qs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),Dr=Yn.f,Gs=Ft.enforce,Js=Ke("match"),$s=x.RegExp,Zs=$s.prototype,Ks=x.SyntaxError,Ys=y(Zs.exec),Xs=y("".charAt),Qs=y("".replace),eu=y("".indexOf),tu=y("".slice),nu=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ru=/a/g,iu=/a/g,s=new $s(ru)!==ru,ou=o.MISSED_STICKY,au=o.UNSUPPORTED_Y,s=f&&(!s||ou||Hs||Vs||g(function(){return iu[Js]=!1,$s(ru)!==ru||$s(iu)===iu||"/a/i"!==String($s(ru,"i"))}));if(zs("RegExp",s)){for(var su=function(e,t){var n,r,i=_e(Zs,this),o=Xi(e),a=t===undefined,s=[],u=e;if(!i&&o&&a&&e.constructor===su)return e;if((o||_e(Zs,e))&&(e=e.source,a)&&(t=dn(u)),e=e===undefined?"":C(e),t=t===undefined?"":C(t),u=e,o=t=Hs&&"dotAll"in ru&&(n=!!t&&-1<eu(t,"s"))?Qs(t,/s/g,""):t,ou&&"sticky"in ru&&(r=!!t&&-1<eu(t,"y"))&&au&&(t=Qs(t,/y/g,"")),Vs&&(e=(a=function(e){for(var t,n=e.length,r=0,i="",o=[],a=Et(null),s=!1,u=!1,l=0,c="";r<n;r++){if("\\"===(t=Xs(e,r))){if(t+=Xs(e,++r),!u&&"\\"===Xs(t,1)){i+="\\x5c";continue}}else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:i+=t,Ys(nu,tu(e,r+1))?(r+=2,u=!0,l++):"?"!==Xs(e,r+1)&&l++;continue;case">"===t&&u:if(""===c||I(a,c))throw new Ks("Invalid capture group name");a[c]=!0,u=!(o[o.length]=[c,l]),c="";continue}u?c+=t:i+=t}for(var d=0;d<o.length;d++)for(var f="\\k<"+o[d][0]+">",h="\\"+o[d][1];-1<eu(i,f);)i=Qs(i,f,h);return[i,o]}(e))[0],s=a[1]),a=la($s(e,t),i?this:Zs,su),(n||r||s.length)&&(t=Gs(a),n&&(t.dotAll=!0,t.raw=su(function(e){for(var t,n=e.length,r=0,i="",o=!1;r<n;r++)"\\"!==(t=Xs(e,r))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+Xs(e,++r);return i}(e),o)),r&&(t.sticky=!0),s.length)&&(t.groups=s),e!==u)try{ot(a,"source",""===u?"(?:)":u)}catch(X){}return a},uu=Dr($s),lu=0;uu.length>lu;)!function(e,t,n){n in e||Bs(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}(su,$s,uu[lu++]);(Zs.constructor=su).prototype=Zs,qt(x,"RegExp",su,{constructor:!0})}Ma("RegExp");e("native-string-replace",String.prototype.replace);var cu=RegExp.prototype.exec,du=(y("".charAt),y("".indexOf),y("".replace),y("".slice),s=/b*/g,M(cu,Dr=/a/,"a"),M(cu,s,"a"),/()??/.exec("")[1],undefined,R({target:"RegExp",proto:!0,forced:/./.exec!==Vt},{exec:Vt}),TypeError),fu=function(e){if(xn(e))return e;throw new du(Ce(e)+" is not a constructor")},hu=Ke("species"),pu=function(e,t){var e=E(e).constructor;return e===undefined||re(e=E(e)[hu])?t:fu(e)},mu=o.UNSUPPORTED_Y,gu=Math.min,vu=y([].push),yu=y("".slice),wu=y("".indexOf),Dr=!g(function(){var e=/(?:)/,t=e.exec,e=(e.exec=function(){return t.apply(this,arguments)},"ab".split(e));return 2!==e.length||"a"!==e[0]||"b"!==e[1]}),bu="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length,ku=(Lt("split",function(i,p,m){var g="0".split(undefined,0).length?function(e,t){return e===undefined&&0===t?[]:M(p,this,e,t)}:p;return[function(e,t){var n=oe(this),r=O(e)?Qt(e,i):undefined;return r?M(r,e,n,t):M(g,C(n),e,t)},function(e,t){var n=E(this),r=C(e);if(!bu){e=m(g,n,r,t,g!==p);if(e.done)return e.value}var e=pu(n,RegExp),i=C(dn(n)),o=!!~wu(i,"u")||!!~wu(i,"v"),a=(mu?~wu(i,"g")||(i+="g"):~wu(i,"y")||(i+="y"),new e(mu?"^(?:"+n.source+")":n,i)),s=t===undefined?4294967295:t>>>0;if(0==s)return[];if(0===r.length)return null===hn(a,r)?[r]:[];for(var u=0,l=0,c=[];l<r.length;){a.lastIndex=mu?0:l;var d,f=hn(a,mu?yu(r,l):r);if(null===f||(d=gu(de(a.lastIndex+(mu?l:0)),r.length))===u)l=Xt(r,l,o);else{if(vu(c,yu(r,u,l)),c.length===s)return c;for(var h=1;h<=f.length-1;h++)if(vu(c,f[h]),c.length===s)return c;l=u=d}}return vu(c,yu(r,u)),c}]},bu||!Dr,mu),Object),Su=(y("".split),g(function(){return!ku("z").propertyIsEnumerable(0)}),or.f),s=!f||g(function(){Su(1)}),o=(R({target:"Object",stat:!0,forced:s,sham:!f},{getOwnPropertyDescriptor:function(e,t){return Su(Be(e),t)}}),Object.getOwnPropertyDescriptor,or.f,R({global:!0,forced:x.globalThis!==x},{globalThis:x}),function(e){return e&&e.Math===Math&&e}),Dr=(o("object"==("undefined"==typeof globalThis?"undefined":T(globalThis))&&globalThis)||o("object"==("undefined"==typeof window?"undefined":T(window))&&window)||o("object"==("undefined"==typeof self?"undefined":T(self))&&self)||o("object"==T(Te)&&Te)||o("object"==T(Te)&&Te)||function(){return this}()||Function("return this")(),x.Symbol),s=(e("wks"),a?Dr["for"]:Dr&&Dr.withoutSetter,{}),_u=(s[Ke("toStringTag")]="z",String(s),qt(Object.prototype,"toString",function(){return"[object "+et(this)+"]"},{unsafe:!0}),Fr("find",TypeError)),Eu=(R({target:"Iterator",proto:!0,real:!0,forced:_u},{find:function(n){E(this);try{Oe(n)}catch(X){ni(this,"throw",X)}var e,r;return _u?M(_u,this,n):(e=si(this),ai(e,function(e,t){if(n(e,r++))return t(e)},{IS_RECORD:!(r=0),INTERRUPTED:!0}).result)}}),mi.find),Cu=!0,Ru=("find"in[]&&Array(1).find(function(){Cu=!1}),R({target:"Array",proto:!0,forced:Cu},{find:function(e){return Eu(this,e,1<arguments.length?arguments[1]:undefined)}}),tr("find"),Date),Ou=y(Ru.prototype.getTime),xu=(R({target:"Date",stat:!0},{now:function(){return Ou(new Ru)}}),function(e,t,n,r){try{return r?t(E(n)[0],n[1]):t(n)}catch(X){ni(e,"throw",X)}}),Tu=Array,Mu=function(e){var t=xn(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&(r=Jr(r,2<n?arguments[2]:undefined));var o,a,s,u,l,c,d=se(e),n=Qr(d),f=0;if(!n||this===Tu&&Kr(n))for(o=fe(d),a=t?new this(o):Tu(o);f<o;f++)c=i?r(d[f],f):d[f],Gn(a,f,c);else for(a=t?new this:[],l=(u=ti(d,n)).next;!(s=M(l,u)).done;f++){try{pe(f)}catch(X){ni(u,"throw",X)}c=i?xu(u,r,[s.value,f],!0):s.value;try{Gn(a,f,c)}catch(X){ni(u,"throw",X)}}return In(a,f),a},Iu=void 0,Te=!Iu(function(e){Array.from(e)}),o=(R({target:"Array",stat:!0,forced:Te},{from:Mu}),Ke("iterator"));try{var Au=0,Pu={next:function(){return{done:!!Au++}},"return":function(){0}};Pu[o]=function(){return this},Array.from(Pu,function(){throw 2})}catch(X){}var Du,Lu,e=function(e,t,n){var r,i,o,a,s,u=-1!==e.indexOf("Map"),l=-1!==e.indexOf("Weak"),c=u?"set":"add",d=x[e],f=d&&d.prototype,h=d,p={},m=function(e){var n=y(f[e]);qt(f,e,"add"===e?function(e){return n(this,0===e?0:e),this}:"delete"===e?function(e){return!(l&&!O(e))&&n(this,0===e?0:e)}:"get"===e?function(e){return l&&!O(e)?undefined:n(this,0===e?0:e)}:"has"===e?function(e){return!(l&&!O(e))&&n(this,0===e?0:e)}:function(e,t){return n(this,0===e?0:e,t),this})};return zs(e,!_(d)||!(l||f.forEach&&!g(function(){(new d).entries().next()})))?(h=n.getConstructor(t,e,u,c),Ua.enable()):zs(e,!0)&&(i=(r=new h)[c](l?{}:-0,1)!==r,o=g(function(){r.has(1)}),a=Iu(function(e){new d(e)}),s=!l&&g(function(){for(var e=new d,t=5;t--;)e[c](t,t);return!e.has(-0)}),a||(((h=t(function(e,t){lr(e,f);e=la(new d,e,h);return re(t)||ai(t,e[c],{that:e,AS_ENTRIES:u}),e})).prototype=f).constructor=h),(o||s)&&(m("delete"),m("has"),u)&&m("get"),(s||i)&&m(c),l)&&f.clear&&delete f.clear,R({global:!0,constructor:!0,forced:(p[e]=h)!==d},p),vr(h,e),l||n.setStrong(h,e,u),h},Nu=mi.findIndex,Fu=!0,Uu=("findIndex"in[]&&Array(1).findIndex(function(){Fu=!1}),R({target:"Array",proto:!0,forced:Fu},{findIndex:function(e){return Nu(this,e,1<arguments.length?arguments[1]:undefined)}}),tr("findIndex"),Ua.getWeakData),ju=Ft.set,zu=Ft.getterFor,Bu=mi.find,Wu=mi.findIndex,Hu=y([].splice),qu=0,Vu=function(e){return e.frozen||(e.frozen=new Gu)},Gu=function(){this.entries=[]},Ju=function(e,t){return Bu(e.entries,function(e){return e[0]===t})},a=(Gu.prototype={get:function(e){e=Ju(this,e);if(e)return e[1]},has:function(e){return!!Ju(this,e)},set:function(e,t){var n=Ju(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(t){var e=Wu(this.entries,function(e){return e[0]===t});return~e&&Hu(this.entries,e,1),!!~e}},{getConstructor:function(e,n,r,i){var e=e(function(e,t){lr(e,o),ju(e,{type:n,id:qu++,frozen:null}),re(t)||ai(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,a=zu(n),s=function(e,t,n){var r=a(e),i=Uu(E(t),!0);return!0===i?Vu(r).set(t,n):i[r.id]=n,e};return Qo(o,{"delete":function(e){var t,n=a(this);return!!O(e)&&(!0===(t=Uu(e))?Vu(n)["delete"](e):t&&I(t,n.id)&&delete t[n.id])},has:function(e){var t,n=a(this);return!!O(e)&&(!0===(t=Uu(e))?Vu(n).has(e):t&&I(t,n.id))}}),Qo(o,r?{get:function(e){var t,n=a(this);if(O(e))return!0===(t=Uu(e))?Vu(n).get(e):t?t[n.id]:void 0},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),e}});function $u(e){this.name="__st"+(1e9*Math.random()>>>0)+Du+"__",null!=e&&e.forEach(this.add,this),Du+=1}e("WeakSet",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},a),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{configurable:!0,writable:!0,value:function(e){if(null===this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var o=t[i];if(e.call(r,o,i,t))return o;i+=1}return undefined}}),window.WeakSet||(Du=Date.now()%1e9,$u.prototype.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},$u.prototype["delete"]=function(e){return!!e[this.name]&&(e[this.name]=undefined,!0)},$u.prototype.has=function(e){return!!e[this.name]},Lu=$u,Object.defineProperty(window,"WeakSet",{value:function(e){return new Lu(e)}}));var Zu=Object.assign,Ku=Object.defineProperty,Yu=y([].concat),Dr=!Zu||g(function(){var e,t,n;return!(!f||1===Zu({b:1},Zu(Ku({},"a",{enumerable:!0,get:function(){Ku(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},(e={})[n=Symbol("assign detection")]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!==Zu({},e)[n])||"abcdefghijklmnopqrst"!==ut(Zu({},t)).join("")})?function(e,t){for(var n=se(e),r=arguments.length,i=1,o=nr.f,a=yi.f;i<r;)for(var s,u=ze(arguments[i++]),l=o?Yu(ut(u),o(u)):ut(u),c=l.length,d=0;d<c;)s=l[d++],f&&!M(a,u,s)||(n[s]=u[s]);return n}:Zu,Xu=(R({target:"Object",stat:!0,arity:2,forced:Object.assign!==Dr},{assign:Dr}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e===undefined||null===e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++)if((r=arguments[n])!==undefined&&null!==r)for(var r=Object(r),i=Object.keys(Object(r)),o=0,a=i.length;o<a;o++){var s=i[o],u=Object.getOwnPropertyDescriptor(r,s);null!=u&&u.enumerable&&(t[s]=r[s])}return t}}),function(e){e.iterator=e.next=e.nextHandler=e.mapper=e.predicate=e.inner=e.iterables=e.iters=e.openIters=e.padding=e.finishResults=e.buffer=null}),Qu=Hn.IteratorPrototype,s=Ke("toStringTag"),el=Ft.set,Te=function(c){var d=Ft.getterFor(c?"WrapForValidIterator":"IteratorHelper");return Qo(Et(Qu),{next:function(){var e=d(this);if(c)return e.nextHandler();if(e.done)return Ar(undefined,!0);try{var t=e.nextHandler();return e.done&&Xu(e),e.returnHandlerResult?t:Ar(t,e.done)}catch(X){throw e.done=!0,Xu(e),X}},"return":function(){var e,t=d(this),n=t.iterator,r=t.inner,i=t.openIters,o=t.done;if(t.done=!0,c)return(e=Qt(n,"return"))?M(e,n):Ar(undefined,!0);if(Xu(t),!o){if(r)try{ni(r.iterator,"normal")}catch(X){return ni(n,"throw",X)}if(i)try{for(var a=i,s="normal",u=void 0,l=a.length-1;0<=l;l--)if(a[l]!==undefined)try{u=ni(a[l].iterator,s,u)}catch(X){s="throw",u=X}if("throw"===s)throw u}catch(X){if(n)return ni(n,"throw",X);throw X}n&&ni(n,"normal")}return Ar(undefined,!0)}})},tl=Te(!0),nl=Te(!1),o=(ot(nl,s,"Iterator Helper"),function(n,r,i){var e=function(e,t){t?(t.iterator=e.iterator,t.next=e.next):t=e,t.type=r?"WrapForValidIterator":"IteratorHelper",t.returnHandlerResult=!!i,t.nextHandler=n,t.counter=0,t.done=!1,el(this,t)};return e.prototype=r?tl:nl,e}),Pu=function(e,t){e="function"==typeof Iterator&&Iterator.prototype[e];if(e)try{e.call({next:null},t).next()}catch(X){return!0}},Hn=!Pu("filter",function(){}),rl=!Hn&&Fr("filter",TypeError),Te=Hn||rl,il=o(function(){for(var e,t=this.iterator,n=this.predicate,r=this.next;;){if(e=E(M(r,t)),this.done=!!e.done)return;if(xu(t,n,[e=e.value,this.counter++],!0))return e}}),ol=(R({target:"Iterator",proto:!0,real:!0,forced:Te},{filter:function(e){E(this);try{Oe(e)}catch(X){ni(this,"throw",X)}return rl?M(rl,this,e):new il(si(this),{predicate:e})}}),mi.filter),s=r("filter"),Hn=(R({target:"Array",proto:!0,forced:!s},{filter:function(e){return ol(this,e,1<arguments.length?arguments[1]:undefined)}}),!Pu("map",function(){})),al=!Hn&&Fr("map",TypeError),Te=Hn||al,sl=o(function(){var e=this.iterator,t=E(M(this.next,e));if(!(this.done=!!t.done))return xu(e,this.mapper,[t.value,this.counter++],!0)}),ul=(R({target:"Iterator",proto:!0,real:!0,forced:Te},{map:function(e){E(this);try{Oe(e)}catch(X){ni(this,"throw",X)}return al?M(al,this,e):new sl(si(this),{mapper:e})}}),mi.map),s=r("map"),ll=(R({target:"Array",proto:!0,forced:!s},{map:function(e){return ul(this,e,1<arguments.length?arguments[1]:undefined)}}),TypeError),cl="Reduce of empty array with no initial value",Hn=function(l){return function(e,t,n,r){var i=se(e),o=ze(i),a=fe(i);if(Oe(t),0===a&&n<2)throw new ll(cl);var s=l?a-1:0,u=l?-1:1;if(n<2)for(;;){if(s in o){r=o[s],s+=u;break}if(s+=u,l?s<0:a<=s)throw new ll(cl)}for(;l?0<=s:s<a;s+=u)s in o&&(r=t(r,o[s],s,i));return r}},Te={left:Hn(!1),right:Hn(!0)},r=function(e){return Wn.slice(0,e.length)===e},dl=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":x.Bun&&"string"==typeof Bun.version?"BUN":x.Deno&&"object"==T(Deno.version)?"DENO":"process"===te(x.process)?"NODE":x.window&&x.document?"BROWSER":"REST",fl="NODE"==dl,hl=Te.left,s=!fl&&79<qn&&qn<83||!Ue("reduce"),pl=(R({target:"Array",proto:!0,forced:s},{reduce:function(e){var t=arguments.length;return hl(this,e,t,1<t?arguments[1]:undefined)}}),Ua.fastKey),ml=Ft.set,gl=Ft.getterFor,Hn={getConstructor:function(e,n,r,i){var e=e(function(e,t){lr(e,o),ml(e,{type:n,index:Et(null),first:null,last:null,size:0}),f||(e.size=0),re(t)||ai(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,a=gl(n),s=function(e,t,n){var r,i=a(e),o=u(e,t);return o?o.value=n:(i.last=o={index:r=pl(t,!0),key:t,value:n,previous:t=i.last,next:null,removed:!1},i.first||(i.first=o),t&&(t.next=o),f?i.size++:e.size++,"F"!==r&&(i.index[r]=o)),e},u=function(e,t){var n,e=a(e),r=pl(t);if("F"!==r)return e.index[r];for(n=e.first;n;n=n.next)if(n.key===t)return n};return Qo(o,{clear:function(){for(var e=a(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=Et(null),f?e.size=0:this.size=0},"delete":function(e){var t,n,r=a(this),e=u(this,e);return e&&(t=e.next,n=e.previous,delete r.index[e.index],e.removed=!0,n&&(n.next=t),t&&(t.previous=n),r.first===e&&(r.first=t),r.last===e&&(r.last=n),f?r.size--:this.size--),!!e},forEach:function(e){for(var t,n=a(this),r=Jr(e,1<arguments.length?arguments[1]:undefined);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),Qo(o,r?{get:function(e){e=u(this,e);return e&&e.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),f&&jt(o,"size",{configurable:!0,get:function(){return a(this).size}}),e},setStrong:function(e,t,n){var r=t+" Iterator",i=gl(t),o=gl(r);Pr(e,t,function(e,t){ml(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?Ar("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,Ar(undefined,!0))},n?"entries":"values",!n,!0),Ma(t)}},vl=(e("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},Hn),TypeError),r=g(function(){[].keys().reduce(function(){},undefined)}),yl=!r&&Fr("reduce",vl),wl=(R({target:"Iterator",proto:!0,real:!0,forced:r||yl},{reduce:function(t){E(this);try{Oe(t)}catch(X){ni(this,"throw",X)}var n=arguments.length<2,r=n?undefined:arguments[1];if(yl)return xe(yl,this,n?[t]:[t,r]);var e=si(this),i=0;if(ai(e,function(e){r=n?(n=!1,e):t(r,e,i),i++},{IS_RECORD:!0}),n)throw new vl("Reduce of empty iterator with no initial value");return r}}),function(e,t){return(wl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)}),A=function(){return(A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function bl(e,a,s,u){return new(s=s||Promise)(function(n,t){function r(e){try{o(u.next(e))}catch(a){t(a)}}function i(e){try{o(u["throw"](e))}catch(a){t(a)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((u=u.apply(e,a||[])).next())})}function kl(r,i){var o,a,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),"throw":t(1),"return":t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,a&&(s=2&t[0]?a["return"]:t[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,a=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!((s=0<(s=u.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){u=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))u.label=t[1];else if(6===t[0]&&u.label<s[1])u.label=s[1],s=t;else{if(!(s&&u.label<s[2])){s[2]&&u.ops.pop(),u.trys.pop();continue}u.label=s[2],u.ops.push(t)}}t=i.call(r,u)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function Sl(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var _l=/_?t(\d)?(imestamp)?=\d+&?/g,El=function(e,t){void 0===t&&(t="https://dem.rumt-zh.com");t=(e.url||"").replace(/\/+$/,"")||("string"==typeof t?t:"https://dem.rumt-zh.com");return e.url=t,e.hostUrl=t,e.offlineUrl=t+"/offline",e.whiteListUrl=t+"/collect/whitelist",e.pvUrl=t+"/collect/pv",e.eventUrl=t+"/collect/events",e.speedUrl=t+"/speed",e.customTimeUrl=t+"/speed/custom",e.performanceUrl=t+"/speed/performance",e.performanceUrlForHippy=t+"/speed/hippyPerformance",e.webVitalsUrl=t+"/speed/webvitals",e.setDataReportUrl=t+"/speed/miniProgramData",e},Cl=["aegis.qq.com","tamaegis.com","/aegis-sdk","rumt-","/flog.core.min.js","pingfore.qq.com","pingfore.tencent.com","zhiyan.tencent-cloud.net","h.trace.qq.com","btrace.qq.com","beacon.qq.com","dmplog.qq.com","qq.com/report","svibeacon.onezapp.com","cube.weixinbridge.com","doubleclick.net","pcmgrmonitor.3g.qq.com","tdm.qq.com","report.qqweb.qq.com","tpstelemetry.tencent.com","galileotelemetry.tencent.com","insight.cloud.tencent.com","facebook.com","facebook.net","google","yahoo.com","twitter.com","ga-audiences","report.idqqimg.com","arms-retcode.aliyuncs.com","px.effirst.com","sentry","baidu.com","hot-update.json","u.c.b.r.o.w.s.e.r","report.url.cn","sockjs-node","m3u8","flv"],Rl=["ResizeObserver loop limit exceeded","ResizeObserver loop completed","Failed to execute 'transaction'","window.indexedDB.deleteDatabase is not a function"],Ol=["ext1","ext2","ext3","ext4","ext5","ext6","ext7","ext8","ext9","ext10","level","trace","tag","seq","code"],xl=["static","fetch"],Tl="unknown",Ml=function(e,t,n,r,i,o,a,s){for(var u,l,c=i,d=0,f=!!a&&Jr(a,s);d<r;)d in n&&(u=f?f(n[d],d,t):n[d],0<o&&Y(u)?(l=fe(u),c=Ml(e,t,u,l,c,o-1)-1):(pe(c+1),Gn(e,c,u)),c++),d++;return c},Il=Ml,Al=(R({target:"Array",proto:!0},{flatMap:function(e){var t,n=se(this),r=fe(n);return Oe(e),t=pi(n,0),Il(t,n,n,r,0,1,e,1<arguments.length?arguments[1]:undefined),t}}),Fr("some",TypeError)),Pl=(R({target:"Iterator",proto:!0,real:!0,forced:Al},{some:function(n){E(this);try{Oe(n)}catch(X){ni(this,"throw",X)}var e,r;return Al?M(Al,this,n):(e=si(this),ai(e,function(e,t){if(n(e,r++))return t()},{IS_RECORD:!(r=0),INTERRUPTED:!0}).stopped)}}),mi.some),s=Ue("some"),r=(R({target:"Array",proto:!0,forced:!s},{some:function(e){return Pl(this,e,1<arguments.length?arguments[1]:undefined)}}),tr("flatMap"),g(function(){return 1!==[1].values().flatMap(function(){return[1]}).find(function(){return!0})})),s=!r&&!Pu("flatMap",function(){}),Dl=!r&&!s&&Fr("flatMap",TypeError),Pu=r||s||Dl,Ll=o(function(){for(var e,t,n=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=E(M(t.next,t.iterator))).done)return e.value;this.inner=null}catch(X){ni(n,"throw",X)}if(e=E(M(this.next,n)),this.done=!!e.done)return;try{this.inner=function(e,t){t&&"string"==typeof e||E(e);t=Qr(e);return si(E(t!==undefined?M(t,e):e))}(r(e.value,this.counter++),!1)}catch(X){ni(n,"throw",X)}}}),Nl=(R({target:"Iterator",proto:!0,real:!0,forced:Pu},{flatMap:function(e){E(this);try{Oe(e)}catch(X){ni(this,"throw",X)}return Dl?M(Dl,this,e):new Ll(si(this),{mapper:e,inner:null})}}),ql.prototype.indexOf=function(e,t){for(var n=0;n<e.length;n++)if(e[n].callback===t)return n;return-1},ql.prototype.on=function(e,t,n){var r;if(void 0===n&&(n=0),this)return(r=this.eventsList[e])||(this.eventsList[e]=[],r=this.eventsList[e]),-1===this.indexOf(r,t)&&r.push({name:e,type:n||0,callback:t}),this},ql.prototype.one=function(e,t){this.on(e,t,1)},ql.prototype.remove=function(e,t){if(this){var n=this.eventsList[e];if(n){if(t)return n.length&&(t=this.indexOf(n,t),n.splice(t,1)),this;try{delete this.eventsList[e]}catch(b){}}return null}},ql.prototype.clear=function(){this.eventsList={}},ql),Fl=function(e){try{return localStorage.getItem(e)}catch(k0){return null}},Ul=function(e,t){try{localStorage.setItem(e,t)}catch(k0){}},jl=function(e,t){try{return e?JSON.parse(e):t}catch(k0){return t}},r=Yn.f,zl=or.f,Bl=it.f,Wl=i.trim,Hl=x.Number;function ql(){var a=this;this.emit=function(e,t){if(a){var n;if(null!=(r=a.eventsList[e])&&r.length)for(var r=r.slice(),i=0;i<r.length;i++){n=r[i];try{var o=n.callback.apply(a,[t]);if(1===n.type&&a.remove(e,n.callback),!1===o)break}catch(k){throw k}}return a}},this.eventsList={}}bi.Number;var Vl=Hl.prototype,Gl=x.TypeError,Jl=y("".slice),$l=y("".charCodeAt),Zl=function(e){var t,n,r,i,o,a,s,u=_o(e,"number");if(Zi(u))throw new Gl("Cannot convert a Symbol value to a number");if("string"==typeof u&&2<u.length)if(u=Wl(u),43===(e=$l(u,0))||45===e){if(88===(t=$l(u,2))||120===t)return NaN}else if(48===e){switch($l(u,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+u}for(o=(i=Jl(u,2)).length,a=0;a<o;a++)if((s=$l(i,a))<48||r<s)return NaN;return parseInt(i,n)}return+u},s=zs("Number",!Hl(" 0o1")||!Hl("0b1")||Hl("+0x1")),Kl=function(e){var t,e=arguments.length<1?0:Hl(function(e){e=_o(e,"number");return"bigint"==typeof e?e:Zl(e)}(e));return _e(Vl,t=this)&&g(function(){Ro(t)})?la(Object(e),this,Kl):e};if(Kl.prototype=Vl,s&&(Vl.constructor=Kl),R({global:!0,constructor:!0,wrap:!0,forced:s},{Number:Kl}),s)for(var Yl=bi.Number,Xl=Hl,Ql,ec=f?r(Xl):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),tc=0;ec.length>tc;tc++)I(Xl,Ql=ec[tc])&&!I(Yl,Ql)&&Bl(Yl,Ql,zl(Xl,Ql));var nc,rc=x.isFinite,o=Number.isFinite||function(e){return"number"==typeof e&&rc(e)};function ic(e){var t;return e===undefined||null===e||!(e=String(e).trim())||(t=e.toLowerCase())===Tl||"undefined"===t||"null"===t||"未知"===e?undefined:e}R({target:"Number",stat:!0},{isFinite:o}),(Pu=nc=nc||{})[Pu.number=-1]="number",Pu.string="";var oc,ac=function(e,t){return"number"==typeof e||"string"==typeof e?e:t?nc.string:nc.number},sc=function(e,t){return"string"==typeof e?e.split("?")[t?1:0]||"":e},uc=function(e,t){return void 0===t&&(t=2048),String(e).replace(_l,"").slice(0,t)},lc=function(e){return"string"==typeof e&&/^\//.test(e)?"https:"===(null==location?void 0:location.protocol):/^https/.test(e)},cc=["application/xhtml+xml","application/xml","application/pdf","application/pkcs12","application/javascript","application/x-javascript","application/ecmascript","application/vnd.mspowerpoint","application/vnd.apple.mpegurl","application/ogg","text/css","text/javascript","image","audio","video","video/mp2t"],dc=/\.(json|js|css|jpg|jpeg|png|svg|apng|webp|gif|bmp|mp4|mp3|ts|mpeg|wav|webm|ogg|flv|m3u8|ttf|woff2|otf|eot|woff|html|htm|shtml|shtm|)$/i,fc=["ret","retcode","code","errcode"],hc=function(e,t,n){var r,i,o;try{if("function"==typeof(null==t?void 0:t.retCodeHandler))return{code:void 0===(o=(i=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code)?Tl:o,isErr:i.isErr};if(!(e="string"==typeof e?JSON.parse(e):e))return{code:Tl,isErr:!1};"function"==typeof(null==(r=null==t?void 0:t.ret)?void 0:r.join)&&(fc=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var a=Object.getOwnPropertyNames(e).filter(function(e){return-1!==fc.indexOf(e.toLowerCase())});return a.length?{code:""+(o="未知"!==(o=e[a[0]])&&""!==o?o:Tl),isErr:0!==o&&"0"!==o&&o!==Tl}:{code:Tl,isErr:!1}}catch(Ie){return{code:Tl,isErr:!1}}},pc=function(e,t,n){try{var r="function"==typeof t?t(e,null==n?void 0:n.url,null==n?void 0:n.ctx)||"":e;return yc(r).slice(0,10240)}catch(b){return""}},mc=function(){var n=new WeakSet;return function(e,t){if(t instanceof Error)return"Error.message: "+t.message+" \n Error.stack: "+t.stack;if("object"===T(t)&&null!==t){if(n.has(t))return"[Circular "+(e||"root")+"]";n.add(t)}return t}},gc=function(e){if("string"==typeof e)return e;try{return e instanceof Error?(JSON.stringify(e,mc(),2)||"undefined").replace(/"/gim,""):JSON.stringify(e,mc(),2)||"undefined"}catch(m){return"error happen when tdem stringify: \n "+m.message+" \n "+m.stack}},vc=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e,mc())||"undefined"}catch(m){return"error happen when tdem stringify: \n "+m.message+" \n "+m.stack}},yc=function(n,r){void 0===r&&(r=3);var i,o,a,s="";return Array.isArray(n)?(s+="[",i=n.length,n.forEach(function(e,t){"object"===T(e)&&1<r?s+=yc(e,r-1):s+=bc(e),s+=t===i-1?"":","}),s+="]"):n instanceof Object||"object"===T(n)?(s="{",o=Object.keys(n),a=o.length,o.forEach(function(e,t){"object"===T(n[e])&&1<r?s+='"'+e+'":'+yc(n[e],r-1):s+=wc(e,n[e]),s+=t===a-1||t<a-1&&"undefined"==typeof n[o[t+1]]?"":","}),s+="}"):s+=n,s},wc=function(e,t){var n=T(t),r="";return"string"===n||"object"===n?r+='"'+e+'":"'+t+'"':"function"==typeof t?r+='"'+e+'":"function '+t.name+'"':"symbol"===T(t)?r+='"'+e+'":"symbol"':"number"!=typeof t&&"boolean"!==n||(r+='"'+e+'": '+t),r},bc=function(e){var t=T(e);return""+("undefined"===t||"symbol"===t||"function"===t?"null":"string"===t||"object"===t?'"'+e+'"':e)},kc=function(t){var n;return t.payload?(n={},Object.keys(t).forEach(function(e){"payload"!==e&&(n[e]=t[e])}),n):t},Sc=function(e,t){var n,r={fetch:[],"static":[],bridge:[]},i=new FormData;return Array.isArray(e)?e.forEach(function(e){var t=kc(e);r[e.type].push(t)}):(n=kc(e),r[e.type].push(n)),i.append("payload",vc(A({duration:r},t))),i},_c=/data:(image|text|application|font)\/.*;base64/,Ec=function(t,e){return"string"!=typeof t||!t||e&&-1<t.indexOf(e)||_c.test(t)||Cl.some(function(e){return-1<t.indexOf(e)})};(s=oc=oc||{}).LOG="log",s.SPEED="speed",s.PERFORMANCE="performance",s.OFFLINE="offline",s.WHITE_LIST="whiteList",s.VITALS="vitals",s.PV="pv",s.CUSTOM_PV="customPV",s.EVENT="event",s.CUSTOM="custom",s.SDK_ERROR="sdkError",s.SET_DATA="setData",s.LOAD_PACKAGE="loadPackage",s.MEMORY="memory";var Cc,P,Rc,Oc={maxAttempts:3,delays:[0,1e3,3e3]};function xc(){return"evt_"+Date.now()+"_"+Math.random().toString(36).substring(2,8)}function Tc(e){var t=[];if(e.stack)for(var n=0,r=0,i=e.stack.split("\n");r<i.length;r++){var o,a,s,u,l,c=i[r],d=c.match(/at\s+(.+?)\s+\((.+?):(\d+):(\d+)\)/);d?(o=d[1],a=d[2],s=d[3],u=d[4],l=a.split("/").pop()||a,t.push({abs_path:a,colno:parseInt(u,10),filename:l,"function":o||"(anonymous)",lineno:parseInt(s,10),in_app:a.includes("node_modules")||a.includes("cdn")?0:1,stack_level:n++})):(d=c.match(/at\s+(.+?):(\d+):(\d+)/))&&(a=d[1],s=d[2],u=d[3],l=a.split("/").pop()||a,t.push({abs_path:a,colno:parseInt(u,10),filename:l,"function":"(anonymous)",lineno:parseInt(s,10),in_app:a.includes("node_modules")||a.includes("cdn")?0:1,stack_level:n++}))}return t}(r=Cc=Cc||{}).production="production",r.development="development",r.gray="gray",r.pre="pre",r.daily="daily",r.local="local",r.test="test",r.others="others",(o=P=P||{}).JS_ERROR="js_error",o.PROMISE_ERROR="promise_error",o.RESOURCE_ERROR="resource_error",o.API_ERROR="api_error",o.BLANK_SCREEN="blank_screen",o.PAGE_LOAD="page_load",o.RESOURCE_LOAD="resource_load",o.API_CALL="api_call",o["true"]="web_vitals",o.LAG_DETECTED="lag_detected",o.NO_RESPONSE="no_response",o.MEMORY_USAGE="memory_usage",o.MEMORY_OOM="memory_oom",o.FILE_IO="file_io",o.CLICK="click",o.SCROLL="scroll",o.LONG_PRESS="long_press",o.PAGE_VIEW="page_view",o.TAB_HIDDEN="tab_hidden",o.TAB_VISIBLE="tab_visible",o.WINDOW_BLUR="window_blur",o.WINDOW_FOCUS="window_focus",o.FORM_FOCUS="form_focus",o.FORM_BLUR="form_blur",o.FORM_CHANGE="form_change",o.FORM_SUBMIT="form_submit",o.FORM_SUBMIT_RESULT="form_submit_result",o.STRUGGLE="struggle",o.CUSTOM="custom",o.LOG="log",(s=Rc=Rc||{}).ERROR="error",s.PERFORMANCE="performance",s.BEHAVIOR="behavior",s.NETWORK="network",s.LOG="log",s.CUSTOM="custom";var Mc=TypeError,Ic=function(e,t){if(e<t)throw new Mc("Not enough arguments");return e},Ac=x.Function,Pc=/MSIE .\./.test(Wn)||"BUN"==dl&&((r=x.Bun.version.split(".")).length<3||"0"===r[0]&&(r[1]<3||"3"===r[1]&&"0"===r[2])),o=function(o,a){var s=a?2:1;return Pc?function(e,t){var n=Ic(arguments.length,1)>s,r=_(e)?e:Ac(e),i=n?Jn(arguments,s):[],e=n?function(){xe(r,this,i)}:r;return a?o(e,t):o(e)}:o},s=o(x.setInterval,!0),r=(R({global:!0,bind:!0,forced:x.setInterval!==s},{setInterval:s}),o(x.setTimeout,!0)),Dc=(R({global:!0,bind:!0,forced:x.setTimeout!==r},{setTimeout:r}),function(e){return e.filter(function(n,r){return"static"!==n.type||!e.find(function(e,t){return n.url===e.url&&200===n.status&&r<t})})}),Lc=(R({target:"String",proto:!0},{repeat:Vr}),{}),Nc={},Fc=function(e){return Lc[e]||(Lc[e]=setTimeout(function(){Nc[e]={},Lc[e]=null},6e4)),Lc[e]},Uc=function(c,d){return function(i,o){var a,s,u,l,e,t,n;null!=i&&i.log&&null!=i&&i.type?(s=function(e,t){var n,r,t=A(A({},c.bean),{from:t}),i=A({},c.bean);return function(){try{return"undefined"!=typeof FormData&&"function"==typeof FormData.prototype.append}catch(a){}}()?Sc(e,t):(t=e,e=i,r={fetch:[],"static":[],bridge:[]},i={},Array.isArray(t)?t.forEach(function(e){var t;null!=(t=r[e.type])&&t.push(e)}):null!=(n=r[t.type])&&n.push(t),i.payload=JSON.stringify(A({duration:r},e)),i)},u=function(e,t,n,r){switch(t){case oc.LOG:o=e;var i=(Array.isArray(o)?o:[o]).map(function(n){return Object.getOwnPropertyNames(n).reduce(function(e,t){return"ctx"!==t&&(e[t]=n[t]),e},{level:"2",msg:""})});if(!i||0===i.length)return"{}";i=Array.isArray(i)?i:[i];var o=Array.from(new Set(i.flatMap(function(e){return Object.keys(e)}))),a={};return o.forEach(function(t){a[t]=i.map(function(e){return e[t]||""})}),a.count=i.length,vc(a);case oc.SPEED:return s(e,n);case oc.EVENT:return r;default:return r||{}}var o},1!==(e=Array.isArray(i.log)?i.log:[i.log]).length?(l={},e.forEach(function(e){var t=e.from||"undefined";delete e.from,l[t]||(l[t]=[]),l[t].push(e)}),Object.keys(l).forEach(function(e){var t,n=l[e],r=null!=(r=i.url)&&r.includes("?")?"&":"?";"undefined"===e?(t=""+i.url,o(A(A({},i),{url:t,log:1===n.length?n[0]:n,data:u(n,d,e,i.data)}))):(t=i.url+r+"from="+e,o(A(A({},i),{url:t,log:1===n.length?n[0]:n,beanFilter:Sl(i.beanFilter||[],["from"]),data:u(n,d,e,i.data)})))})):(t=(e=e[0]).from,delete e.from,n=null!=(a=i.url)&&a.includes("?")?"&":"?",t?(n=i.url+n+"from="+t,o(A(A({},i),{url:n,log:e,beanFilter:Sl(i.beanFilter||[],["from"]),data:u(e,d,t,i.data)}))):(n=""+i.url,o(A(A({},i),{url:n,log:e,data:u(e,d,t,i.data)}))))):o(i)}},jc=function(u,l){return function(e,t){var n,r,i,o=Array.isArray(e),a=o?e:[e],s=(u.lifeCycle.emit("beforeRequest",e),u.config.beforeRequest);(a="function"==typeof s?a.map(function(e){try{var t=s({logs:e,logType:l});return(null==t?void 0:t.logType)===l&&null!=t&&t.logs?t.logs:!1!==t&&e}catch(X){return e}}).filter(function(e){return!1!==e}):a).length&&(n=a,e=Ol,!Array.isArray(n)||n.length<=1||(r=[],i=[],!(i="string"==typeof e?[e]:e))||i.length<=0||(i.forEach(function(t){n.forEach(function(e){null!=e&&e[t]&&r.push(t)})}),0<r.length&&(n=n.map(function(e){var t={};return r.forEach(function(e){t[e]=""}),A(A({},t),e)}))),a=n,t(o?a:a[0]))}},zc=function(i){return function(e,t){i.lifeCycle.emit("modifyRequest",e);var n=i.config.modifyRequest;if("function"==typeof n)try{var r=n(e);"object"===T(r)&&"url"in r&&(e=r)}catch(X){console.error(X)}t(e)}},Bc=function(r){return function(e,t){null!=(n=r.lifeCycle)&&n.emit("afterRequest",e);var n=(r.config||{}).afterRequest;"function"==typeof n&&!1===n(e)||t(e)}},Wc={generateTraceId:qc(16),generateSpanId:qc(8)},Hc=Array(32);function qc(t){return function(){for(var e=0;e<2*t;e++)Hc[e]=Math.floor(16*Math.random())+48,58<=Hc[e]&&(Hc[e]+=39);return String.fromCharCode.apply(null,Hc.slice(0,2*t))}}function Vc(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}var Gc=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},Jc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",$c=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Zc=function(e){for(var t,n,r,i="",o=0,a=(e=String(e)).length%3;o<e.length;){if(255<(t=e.charCodeAt(o++))||255<(n=e.charCodeAt(o++))||255<(r=e.charCodeAt(o++)))throw new TypeError("Failed to execute 'btoa': The string to be encoded contains characters outside of the Latin1 range.");i+=Jc.charAt((t=t<<16|n<<8|r)>>18&63)+Jc.charAt(t>>12&63)+Jc.charAt(t>>6&63)+Jc.charAt(63&t)}return a?i.slice(0,a-3)+"===".substring(a):i},Kc=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!$c.test(e))throw new TypeError("Failed to execute 'atob': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",o=0;o<e.length;)t=Jc.indexOf(e.charAt(o++))<<18|Jc.indexOf(e.charAt(o++))<<12|(n=Jc.indexOf(e.charAt(o++)))<<6|(r=Jc.indexOf(e.charAt(o++))),i+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i},Yc=(ed.prototype.generate=function(e,t,n){if(void 0===t&&(t={}),this.url=e,!this.isUrlIgnored()&&this.isUrlInTraceUrls()&&this.traceType){switch(this.traceType){case"traceparent":this.traceId=this.createTraceparent();break;case"b3":this.traceId=this.createB3();break;case"sw8":this.traceId=this.createSw8(n);break;case"sentry-trace":this.traceId=this.createSentryTrace();break;default:return console.warn("this trace key "+this.traceType+" is not supported"),void(this.traceId="")}return t[this.traceType]&&(this.traceId=t[this.traceType]),{name:this.traceType,value:this.traceId}}},ed.prototype.createTraceparent=function(){var e=Wc.generateSpanId();return"00-"+Wc.generateTraceId()+"-"+e+"-0"+this.traceFlag.toString(16)},ed.prototype.createB3=function(){var e=Wc.generateSpanId();return Wc.generateTraceId()+"-"+e+"-"+this.traceFlag},ed.prototype.createSw8=function(e){var t="function"==typeof btoa?btoa:Zc,e=e||{},n=e.host,n=void 0===n?"":n,e=e.pathname,e=void 0===e?"":e,r=Gc(),i=Gc();return"1-"+String(t(i))+"-"+String(t(r))+"-1-"+String(t("tdem"))+"-"+String(t("1.0.10"))+"-"+String(t(encodeURI(e)))+"-"+String(t(n))},ed.prototype.createSentryTrace=function(){var e=Vc().substring(16);return Vc()+"-"+e+"-"+this.traceFlag},ed.prototype.isUrlIgnored=function(){if(Array.isArray(this.ignoreUrls)&&0!==this.ignoreUrls.length)for(var e=0,t=this.ignoreUrls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}return!1},ed.prototype.isUrlInTraceUrls=function(){if(!this.urls)return!0;if(Array.isArray(this.urls)){if(0===this.urls.length)return!1;for(var e=0,t=this.urls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}}return!1},ed.prototype.urlMatches=function(e,t){return"string"==typeof t?e===t:!!e.match(t)},ed),Xc={sw8:function(e){var t="function"==typeof atob?atob:Kc,e=e.split("-")[1];return e?t(e):""},traceparent:function(e){return e.split("-")[1]},b3:function(e){return e.split("-")[0]},"sentry-trace":function(e){return e.split("-")[0]}},Qc=function(e){var t,n="";return n="object"===T(e)&&(t=(e=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=e[r]||"function"==typeof e.get&&e.get(r);if(i)return[r,i]}return["",""]}(e,Object.keys(Xc)))[0])?Xc[t](e[1]):n};function ed(e,t,n,r){void 0===n&&(n=null),this.traceType=e,this.ignoreUrls=t,this.urls=n,this.traceFlag=r===undefined||null===r?1:Number(!!r)}function td(u){return function(e){e&&0!==e.length&&u.sendPipeline([function(t,e){var n,r,i,o,a={protocol_version:2,project_key:String(u.config.id||""),sdk:{name:u.sdkName,version:u.sdkVersion},app:{version:String(u.config.version||"1.0.0")},context:(n=u,r=String((null==(a=null==(r=null==(a=n.sessionManager)?void 0:a.getSession)?void 0:r.call(a))?void 0:a.id)||n.bean.sessionId||""),a=String(n.config.userId||n.config.uin||""),r={session_id:r,platform:(r=String(n.runtimePlatform||n.config.platform||"web").trim().toLowerCase(),["web","miniprogram","uniapp","android","ios","electron","unknown"].includes(r)?r:["wx","my","qq","tt"].includes(r)?"miniprogram":"undefined"!=typeof window?"web":"unknown")},a&&(r.user_id=a),a=n.bean.runtime?String(n.bean.runtime):"",s=n.bean.processType?String(n.bean.processType):"",i=n.bean.windowId!==undefined?String(n.bean.windowId):"",o=n.bean.webContentsId!==undefined?String(n.bean.webContentsId):"",n=n.bean.appVersion?String(n.bean.appVersion):"",a&&(r.runtime=a),s&&(r.process_type=s),i&&(r.window_id=i),o&&(r.web_contents_id=o),n&&(r.app_version=n),"undefined"!=typeof navigator&&(r.user_agent=navigator.userAgent,r.language=navigator.language),"undefined"!=typeof screen&&(r.screen_resolution=screen.width+"x"+screen.height),r),events:t},s=String(u.config.url||"").replace(/\/+$/,"");s&&e({url:s+"/api/v1/collect/events",data:JSON.stringify(a),method:"POST",contentType:"application/json",addBean:!1,type:oc.EVENT,log:t,success:function(){u.lifeCycle.emit("afterReport",{success:!0,events:t})},fail:function(e){u.lifeCycle.emit("afterReport",{success:!1,error:e,events:t})}})}],oc.EVENT)(e)}}var nd=function(){},rd=function(n){if(n&&n.reduce&&n.length)return 1===n.length?function(e,t){n[0](e,t||nd)}:n.reduce(function(n,r){return function(e,t){return void 0===t&&(t=nd),n(e,function(e){return null==r?void 0:r(e,t)})}});throw new TypeError("createPipeline need at least one function param")},id=(R({target:"Object",stat:!0,sham:!f},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Be(e),i=or.f,o=ir(r),a={},s=0;o.length>s;)(n=i(r,t=o[s++]))!==undefined&&Gn(a,t,n);return a}}),function(t,n){Object.getOwnPropertyNames(t).forEach(function(e){"function"==typeof t[e]&&"constructor"!==e&&(n?n[e]="sendPipeline"===e?function(){return function(){}}:function(){}:t[e]=function(){})})}),od={low:1,medium:3,high:5},ad=new Set(["custom_struggle_name","form_id","field_id","trigger_event_id","struggle_status","struggle_owner_type","struggle_owner_key","detection_source","rule_version"]),sd={rage_click:3,dead_click:4,error_click:4,form_validation_error:3,slow_page:3,back_forward:2,long_focus_time:2,form_zigzag:2,uncompleted_form:3,custom_struggle:3},ud={rage_click:4,dead_click:5,error_click:5,form_validation_error:4,slow_page:4,back_forward:3,long_focus_time:3,form_zigzag:3,uncompleted_form:3,custom_struggle:3},ld=(d.use=function(e){-1===d.installedPlugins.indexOf(e)&&e.tdemPlugin&&d.installedPlugins.push(e)},d.unuse=function(e){e=d.installedPlugins.indexOf(e);-1!==e&&d.installedPlugins.splice(e,1)},d.prototype.getInternalTransport=function(){return this.internalTransport},d.prototype.setInternalTransport=function(e){this.internalTransport=e},d.prototype.getInternalRetrySchedule=function(){return this.internalRetrySchedule},d.prototype.transportRequest=function(t,n){return bl(this,void 0,void 0,function(){return kl(this,function(e){switch(e.label){case 0:if(this.internalTransport)return[4,this.internalTransport.request(t,n)];throw new Error("Internal Transport is not configured");case 1:return[2,e.sent()||{ok:!0,request:t}]}})})},d.prototype.transportHandoff=function(t,n){return bl(this,void 0,void 0,function(){return kl(this,function(e){switch(e.label){case 0:if(this.internalTransport)return[4,(this.internalTransport.handoff||this.internalTransport.request).call(this.internalTransport,A(A({},t),{handoff:!0}),n)];throw new Error("Internal Transport is not configured");case 1:return[2,e.sent()||{ok:!0,request:t,handoffAccepted:!0}]}})})},d.prototype.init=function(e){this.setConfig(e),this.config=El(this.config,e.hostUrl);for(var t=0;t<d.installedPlugins.length;t++)try{d.installedPlugins[t].patch(this)}catch(v){this.sendSDKError(v)}this.lifeCycle.emit("onInited")},d.prototype.destroy=function(e){void 0===e&&(e=!1);var t,n,r=d.instances.indexOf(this);-1!==r&&d.instances.splice(r,1);for(var i=d.installedPlugins.length-1;0<=i;i--)try{d.installedPlugins[i].unpatch(this)}catch(L){this.sendSDKError(L)}if(this.lifeCycle.emit("destroy"),this.lifeCycle.clear(),e)t=this,n=Object.getOwnPropertyDescriptors(t),Object.keys(n).forEach(function(e){n[e].writable&&(t[e]=null)}),Object.setPrototypeOf(this,null);else{for(var o=this;o.constructor!==Object&&id(o,this),o=Object.getPrototypeOf(o););0===d.instances.length&&(r=Object.getPrototypeOf(this).constructor,id(r),id(d))}},d.prototype.setConfig=function(e){Object.assign(this.config,e);var e=this.config,t=e.id,n=e.uin,r=e.version,i=e.aid,o=e.env,a=void 0===o?"production":o,o=e.pageUrl,e=e.userId||(n!==undefined&&null!==n?String(n):""),n=this.bean.id!==t||this.bean.uin!==e||this.bean.aid!==i;return this.bean.id=t||"",this.bean.uin=e,this.bean.version=r||"1.0.10",this.bean.aid=i||"",this.bean.env=function(){switch(a){case Cc.production:case Cc.development:case Cc.gray:case Cc.pre:case Cc.daily:case Cc.local:case Cc.test:case Cc.others:return 1;default:return}}()?a:Cc.others,o&&this.extendBean("from",encodeURIComponent(o.slice(0,2048))),n&&this.lifeCycle.emit("onConfigChange",this.config),this.config},d.prototype.extendBean=function(e,t){this.bean[e]=t},d.prototype.send=function(e,i,o){var t=this;return rd([zc(this),Uc(this,null==e?void 0:e.type),function(n,r){t.request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!1,result:e,logType:n.type,logs:n.log}),null!=i&&i.apply(void 0,e)},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!0,result:e,logType:n.type,logs:n.log}),null!=o&&o.apply(void 0,e)})},Bc(this)])(e)},d.prototype.sendSDKError=function(e){var n=this;this.sendPipeline([function(e,t){t({url:n.config.url+"?id=1085&msg[0]="+encodeURIComponent(gc(e))+"&level[0]=2&from="+n.config.id+"&count=1&version="+n.config.id+"(1.0.10)",addBean:!1,method:"get",type:oc.SDK_ERROR,log:e})}],oc.SDK_ERROR)(e)},d.prototype.sendPipeline=function(e,t){var n,o=this;return rd(Sl([function(e,t){if(e&&e.type===oc.EVENT)return t(e);if("number"!=typeof n.config.random&&(console.warn("random must in [0, 1], default is 1."),n.config.random=1),!n.isHidden||!n.isGetSample)if(n.isGetSample)n.isHidden||t(e);else{if(n.isGetSample=!0,Math.random()<n.config.random)return n.isHidden=!1,t(e);n.isHidden=!0}},jc(n=this,t)],e,[Uc(this,t),zc(this),function(r,i){o.request(r,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;-1<(""+e[o.failRequestCount=0]).indexOf("403 forbidden")&&(n=!0,o.destroy()),i({isErr:n,result:e,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(n=null==r?void 0:r.success)&&n.call.apply(n,Sl([r],e))},function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];60<=++o.failRequestCount&&o.destroy(),-1<(""+t[0]).indexOf("403 forbidden")&&o.destroy(),i({isErr:!0,result:t,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(e=null==r?void 0:r.fail)&&e.call.apply(e,Sl([r],t))})},Bc(this)]))},d.prototype.track=function(e,t){void 0===t&&(t={}),e&&"string"==typeof e?(e={event_id:xc(),event_type:P.CUSTOM,event_category:Rc.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(),data:{event_name:e,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(t.properties)}},this.reportTDEMEvent(e)):console.warn("track: name must be a non-empty string")},d.prototype.trackStruggle=function(e,t){void 0===t&&(t={});var n,e="string"==typeof e?e.trim():"";!e||128<e.length?console.warn("trackStruggle: name must be a non-empty string limited to 128 characters"):(n=t.severity||"medium",(n=od[n])?this.reportStruggle({type:"custom_struggle",ownerType:"business",ownerKey:e,severity:n,detectionSource:"custom",ruleVersion:"custom-v1",tags:t.tags,properties:A(A({},t.properties||{}),{custom_struggle_name:e})}):console.warn("trackStruggle: severity must be low, medium, or high"))},d.prototype.reportTDEMEvent=function(e){var n=this,e=Array.isArray(e)?e:[e];e.length&&(e=e.map(function(e){var t;return A(A({},e),{page_url:e.page_url||n.getCurrentEventPageUrl(),data:A(A(A({},e.data),null!=(t=e.data)&&t.replay_id||!n.getCurrentReplayId()?{}:{replay_id:n.getCurrentReplayId()}),n.mergeEventTags(null==(t=e.data)?void 0:t.tags)?{tags:n.mergeEventTags(null==(t=e.data)?void 0:t.tags)}:{})})}),this.lifeCycle.emit("tdemEventCreated",e),this.tdemEventPipeline(e))},d.prototype.measure=function(e,t,n){void 0===n&&(n={}),e&&"string"==typeof e?"number"==typeof t?t<0||2147483646<t?console.warn("measure: duration must between 0 and 2147483646"):this.submitMeasure(e,t,n):console.warn("measure: duration must be a number"):console.warn("measure: name must be a non-empty string")},d.prototype.startMeasure=function(e){"string"==typeof e&&e?this.timeMap[e]?console.warn("Measure "+e+" already exists"):this.timeMap[e]=Date.now():console.warn("startMeasure: name must be a non-empty string")},d.prototype.endMeasure=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?(n=this.getTimeEventDuration(e))!==undefined?(this.submitMeasure(e,n,t),delete this.timeMap[e]):console.warn("Measure "+e+" does not exist"):console.warn("endMeasure: name must be a non-empty string")},d.prototype.captureMessage=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?(n="error"===t.level?"error":"warn"===t.level?"warn":"info",n={event_id:xc(),event_type:P.LOG,event_category:Rc.LOG,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{log_level:n,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(A({message:e},t.properties||{}))}},this.reportTDEMEvent(n)):console.warn("captureMessage: message must be a non-empty string")},d.prototype.captureException=function(e,t){void 0===t&&(t={});var e="string"==typeof e?new Error(e):e;e instanceof Error?(e={event_id:xc(),event_type:P.JS_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{exception_stacks:[{type:e.name||"Error",value:e.message,mechanism_type:"manual",mechanism_handled:1}],exception_frames:Tc(e),replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(A(A({},t.properties||{}),t.level?{capture_level:t.level}:{}))}},this.reportTDEMEvent(e)):console.warn("captureException: error must be an Error or string")},d.prototype.setTags=function(e){e=this.sanitizeEventTags(e);this.setConfig({defaultTags:A(A({},this.config.defaultTags||{}),e||{})})},d.prototype.removeTags=function(e){var t,e=Array.isArray(e)?e:[e];e.length&&(t=A({},this.config.defaultTags||{}),e.forEach(function(e){delete t[e]}),this.setConfig({defaultTags:t}))},d.prototype.clearTags=function(){this.setConfig({defaultTags:{}})},d.prototype.setUser=function(e){"string"==typeof e&&e?this.setConfig({userId:e}):console.warn("setUser: userId must be a non-empty string")},d.prototype.clearUser=function(){this.setConfig({userId:"",uin:""})},d.prototype.reportStruggle=function(e){var t,n,r;e&&e.type&&e.ownerType&&e.ownerKey?(r=e.type,t="number"==typeof e.severity?e.severity:sd[r],n="number"==typeof e.weight?e.weight:ud[r],r={event_id:xc(),event_type:P.STRUGGLE,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:r,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(e.tags),is_effective_action:!1,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),struggle_weight:n,struggle_severity:t,struggle_value:"number"==typeof e.value?e.value:n*t,event_properties:A(A({},this.sanitizeStruggleProperties(e.properties)),{form_id:e.formId||"",field_id:e.fieldId||"",trigger_event_id:e.triggerEventId||"",struggle_status:e.status||"detected",struggle_owner_type:e.ownerType,struggle_owner_key:e.ownerKey,detection_source:e.detectionSource||"sdk_auto",rule_version:e.ruleVersion||this.getDefaultRuleVersion()})}},this.reportTDEMEvent(r)):console.warn("reportStruggle params error")},d.prototype.reportFormSubmitResult=function(e){e&&e.status?(e={event_id:xc(),event_type:P.FORM_SUBMIT_RESULT,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:e.eventName||"form_submit_"+e.status,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(e.tags),is_effective_action:"boolean"!=typeof e.isEffectiveAction||e.isEffectiveAction,trigger_event_id:e.triggerEventId,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),validation_message:e.validationMessage?e.validationMessage.slice(0,256):undefined,event_properties:{status:e.status,validation_code:e.validationCode||"",form_id:e.formId||"",field_id:e.fieldId||""}}},this.reportTDEMEvent(e)):console.warn("reportFormSubmitResult params error")},d.prototype.reportPageView=function(e,t){void 0===t&&(t={});e=this.getCurrentEventPageUrl(e||t.pageUrl),e={event_id:xc(),event_type:P.PAGE_VIEW,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:e,data:{page_title:t.pageTitle||"",referrer:t.referrer,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(A(A(A(A(A(A(A({},t.properties||{}),t.navigationType?{navigation_type:t.navigationType}:{}),t.fromPage?{from_page:t.fromPage}:{}),t.toPage?{to_page:t.toPage}:{}),"boolean"==typeof t.isFirstVisit?{is_first_visit:t.isFirstVisit?"1":"0"}:{}),"boolean"==typeof t.isFirstLoad?{is_first_load:t.isFirstLoad?"1":"0"}:{}),t.deviceType?{device_type:t.deviceType}:{}))}};this.reportTDEMEvent(e)},d.prototype.setPage=function(e,t){var n;e&&"string"==typeof e?(n=this._customPageUrl||this.getCurrentEventPageUrl(),this._customPageUrl=e,this.reportPageView(e,{pageTitle:null==t?void 0:t.pageTitle,navigationType:"push",fromPage:(n||"").slice(0,512),toPage:e.slice(0,512),isFirstVisit:!1,tags:A({source:"manual",environment:this.config.env||"production",version:String(this.config.version||"")},null!=t&&t.pageGroup?{page_group:t.pageGroup}:{})}),this.lifeCycle.emit("pageChanged",{pageUrl:e,previousUrl:n,source:"manual"})):console.warn("setPage: pageUrl must be a non-empty string")},d.prototype.leavePage=function(){var e;this._customPageUrl&&(e=this._customPageUrl,this._customPageUrl=null,this.lifeCycle.emit("pageChanged",{pageUrl:this.getCurrentEventPageUrl(),previousUrl:e,source:"auto"}))},d.prototype.getCurrentEventPageUrl=function(e){if(e)return e;if(this._customPageUrl)return this._customPageUrl;try{return this.getOriginFrom()}catch(Pe){return this.config.pageUrl||"undefined"!=typeof window&&(null==(e=window.location)?void 0:e.href)||""}},d.prototype.getCurrentReplayId=function(){var e,t;return String((null==(t=null==(e=null==(t=this.sessionManager)?void 0:t.getSession)?void 0:e.call(t))?void 0:t.replayId)||"")},d.prototype.getDefaultRuleVersion=function(){var e;return(null==(e=null==(e=this.config)?void 0:e.struggleMonitor)?void 0:e.ruleVersion)||"1.0.0"},d.prototype.getEventReplayId=function(e){return e||this.getCurrentReplayId()||undefined},d.prototype.mergeEventTags=function(e){return this.sanitizeEventTags(A(A({},this.config.defaultTags||{}),e||{}))},d.prototype.sanitizeStringMap=function(n,r){var i;return void 0===r&&(r=1024),n&&"object"===T(n)&&(i={},Object.keys(n).forEach(function(e){var t=n[e];e&&t!==undefined&&null!==t&&(i[String(e)]=String(t).slice(0,r))}),Object.keys(i).length)?i:undefined},d.prototype.sanitizeEventTags=function(e){return this.sanitizeStringMap(e,1024)},d.prototype.sanitizeEventProperties=function(e){return this.sanitizeStringMap(e,1024)},d.prototype.sanitizeStruggleProperties=function(e){var n=this.sanitizeEventProperties(e);return n?Object.keys(n).reduce(function(e,t){return ad.has(t)&&"custom_struggle_name"!==t||(e[t]=n[t]),e},{}):undefined},d.prototype.sanitizeEventPayload=function(n,e){var r,i=this;return n&&"object"===T(n)&&(e=(e=this.getPayloadAllowlist(e)).length?e:Object.keys(n),r={},e.forEach(function(e){var t;Object.prototype.hasOwnProperty.call(n,e)&&(t=i.sanitizePayloadValue(n[e]))!==undefined&&(r[e]=t)}),Object.keys(r).length)?r:undefined},d.prototype.sanitizePayloadValue=function(n,r){var i=this;if(void 0===r&&(r=0),n===undefined||null===n)return undefined;if("string"==typeof n)return n.slice(0,256);if("number"==typeof n||"boolean"==typeof n)return n;if(Array.isArray(n))return n.slice(0,10).map(function(e){e=i.sanitizePayloadValue(e,r+1);return e===undefined?null:e});if("object"!==T(n))return String(n).slice(0,256);if(2<=r)try{return JSON.stringify(n).slice(0,256)}catch(k0){return undefined}var o={};return Object.keys(n).slice(0,20).forEach(function(e){var t=i.sanitizePayloadValue(n[e],r+1);t!==undefined&&(o[e]=t)}),Object.keys(o).length?o:undefined},d.prototype.getPayloadAllowlist=function(e){var t=null==(t=null==(t=this.config)?void 0:t.struggleMonitor)?void 0:t.payloadAllowlist;return Array.from(new Set(Sl(Array.isArray(t)?t:[],Array.isArray(e)?e:[]).filter(function(e){return!!e})))},d.prototype.normalizeRelatedEventIds=function(e){return Array.isArray(e)&&e.length&&(e=Array.from(new Set(e.filter(function(e){return"string"==typeof e&&e})))).length?e:undefined},d.prototype.ready=function(e,t,n){throw new Error('You need to override "ready" method')},d.prototype.request=function(e,t,n){throw new Error('You need to override "request" method')},d.prototype.speedLogPipeline=function(e){throw new Error('You need to override "speedLogPipeline" method')},d.prototype.getOriginFrom=function(){throw new Error('You need to override "getOriginFrom" method')},Object.defineProperty(d.prototype,"__version__",{get:function(){return"1.0.10"},enumerable:!1,configurable:!0}),d.prototype.submitMeasure=function(e,t,n){void 0===n&&(n={});e={event_id:xc(),event_type:P.CUSTOM,event_category:Rc.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(n.pageUrl),data:{event_name:e,measurements:{duration:t},replay_id:this.getEventReplayId(n.replayId),tags:this.sanitizeEventTags(n.tags),payload:this.sanitizeEventPayload(n.payload),event_properties:this.sanitizeEventProperties(n.properties)}};this.reportTDEMEvent(e)},d.prototype.getTimeEventDuration=function(e){return e!==undefined&&this.timeMap[e]?Date.now()-this.timeMap[e]:undefined},d.version="1.0.10",d.instances=[],d.environment=Cc,d.installedPlugins=[],d),s=(bd.prototype.patch=function(e){this.canUse(e)&&this.exist(e)&&(this.instances.push(e),this.triggerInit(e),this.triggerOnNewTdem(e))},bd.prototype.unpatch=function(e){var t=this.instances.indexOf(e);-1!==t&&(this.instances.splice(t,1),0===this.instances.length)&&this.uninstall(e)},bd.prototype.countInstance=function(){return this.instances.length},bd.prototype.uninstall=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.destroy)&&t.apply(this,[e])},bd.prototype.walk=function(n){var r=this;this.instances.forEach(function(e){var t=r.canUse(e);t&&n(e,t)})},bd.prototype.canUse=function(e){e=this.getConfig(e);return!(!e||"object"!==T(e))||!!e},bd.prototype.getConfig=function(e){return null==(e=e.config)?void 0:e[this.name]},bd.prototype.exist=function(e){return-1===this.instances.indexOf(e)},bd.prototype.triggerInit=function(e){var t;this.inited||(this.inited=!0,null==(t=null==(t=this.option)?void 0:t.init))||t.call(this.option,this.getConfig(e))},bd.prototype.triggerOnNewTdem=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.onNewTdem)&&t.call(this.option,e,this.getConfig(e))},bd),o=new s({name:"aid",aid:"",init:function(e){try{var t=!0!==e&&e||window.localStorage.getItem("TDEM_ID");t||(t=Gc(),window.localStorage.setItem("TDEM_ID",t)),this.aid=t}catch(S){}},onNewTdem:function(e){e.bean.aid=this.aid,e.config.aid=this.aid}}),cd=RangeError,dd=String,fd=Math.floor,hd=y(Vr),pd=y("".slice),md=y(1.1.toFixed),gd=function(e,t,n){return 0===t?n:t%2==1?gd(e,t-1,n*e):gd(e*e,t/2,n)},vd=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=fd(i/1e7)},yd=function(e,t){for(var n=6,r=0;0<=--n;)r+=e[n],e[n]=fd(r/t),r=r%t*1e7},wd=function(e){for(var t,n=6,r="";0<=--n;)""===r&&0!==n&&0===e[n]||(t=dd(e[n]),r=""===r?t:r+hd("0",7-t.length)+t);return r},r=g(function(){return"0.000"!==md(8e-5,3)||"1"!==md(.9,0)||"1.25"!==md(1.255,2)||"1000000000000000128"!==md(0xde0b6b3a7640080,0)})||!g(function(){md({})});function bd(e){this.tdemPlugin=!0,this.name="",this.instances=[],this.inited=!1,e.$walk=this.walk.bind(this),e.$getConfig=this.getConfig.bind(this),this.option=e,this.name=e.name}function d(e,t){var n,r,i,o,a,s,u,l,c;void 0===t&&(t={}),this.sdkName="tdem-web-sdk",this.sdkVersion=d.version,this.isGetSample=!1,this.isHidden=!1,this.config={version:0,delay:1e3,onError:!0,repeat:60,random:1,aid:!0,device:!0,pagePerformance:!0,webVitals:!0,lagMonitor:!0,blankScreen:!0,memoryMonitor:!0,speedSample:!0,onClose:!0,reportLoadPackageSpeed:!0,env:"production",url:"",reportImmediately:!0,tdemConfig:!0,hostUrl:"https://dem.rumt-zh.com",offlineUrl:"",whiteListUrl:"",pvUrl:"",speedUrl:"",customTimeUrl:"",performanceUrl:"",performanceUrlForHippy:"",webVitalsUrl:"",eventUrl:"",setDataReportUrl:""},this.isWhiteList=!1,this.lifeCycle=new Nl,this.bean={},this.internalRetrySchedule=Oc,this._customPageUrl=null,this.tdemEventPipeline=rd([(r=n=!1,i=[],this._tdemSampleGate={decide:function(e){n=!0,(r=e)&&i.forEach(function(e){var t=e.event;return(0,e.resolve)(t)}),i=[]},reDecide:function(e){return r=!(e<=0)&&(100<=e||100*Math.random()<e)},get isDecided(){return n},get isSampled(){return r}},function(e,t){n?r&&t(e):i.length<1e3&&i.push({event:e,resolve:t})}),(a=20,l=Math.max(Number(a)||1,1),c=[],function(e,t){var e=Array.isArray(e)?e:[e],n=(c.push.apply(c,e),function(){for(clearTimeout(s),clearTimeout(u),s=undefined,u=undefined;0<c.length;)t(c.splice(0,l))});l<=c.length?n():(clearTimeout(s),s=setTimeout(function(){0<c.length&&n()},5e3),u=u||setTimeout(function(){0<c.length&&n()},3e4))}),function(e,t){try{var n,r=JSON.parse(JSON.stringify(e)),i=(o.lifeCycle.emit("beforeReport",r),o.config.beforeReport);"function"==typeof i?0<(n=e.filter(function(e){return!1!==i(e)})).length&&t(n):t(e)}catch(w){t(e)}},td(o=this)]),this.timeMap={},this.failRequestCount=0,this.internalTransport=t.transport,this.internalRetrySchedule=t.retrySchedule||Oc,d.instances.push(this)}R({target:"Number",proto:!0,forced:r},{toFixed:function(e){var t,n,r,i=Ro(this),e=le(e),o=[0,0,0,0,0,0],a="",s="0";if(e<0||20<e)throw new cd("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||1e21<=i)return dd(i);if(i<0&&(a="-",i=-i),1e-21<i)if(r=(t=function(){for(var e=0,t=i*gd(2,69,1);4096<=t;)e+=12,t/=4096;for(;2<=t;)e+=1,t/=2;return e}()-69)<0?i*gd(2,-t,1):i/gd(2,t,1),r*=4503599627370496,0<(t=52-t)){for(vd(o,0,r),n=e;7<=n;)vd(o,1e7,0),n-=7;for(vd(o,gd(10,n,1),0),n=t-1;23<=n;)yd(o,1<<23),n-=23;yd(o,1<<n),vd(o,1,1),yd(o,2),s=wd(o)}else vd(o,0,r),vd(o,1<<-t,0),s=wd(o)+hd("0",e);return 0<e?a+((r=s.length)<=e?"0."+hd("0",e-r)+s:pd(s,0,r-e)+"."+pd(s,r-e)):a+s}});var kd=function(t){return"string"!=typeof t||!t||Rl.some(function(e){return-1<t.indexOf(e)})||Cl.some(function(e){return-1<t.indexOf(e)})},Sd=function(){return"undefined"!=typeof window.performance&&"function"==typeof performance.getEntriesByType&&"function"==typeof performance.now};function _d(e){return e=e.sessionManager,[(null==(e=null==(t=null==e?void 0:e.getSession)?void 0:t.call(e))?void 0:e.replayId)||"",null==e||e.id,!e||e.sampled,null==e||e.sampled][0];var t}var Ed=new s({name:"assets"}),Vr=Ed=new s({name:"assets",collectCur:0,collectEntryType:"resource",ASSETS_INITIATOR_TYPE:["img","css","script","link","audio","video"],getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},onNewTdem:function(e){var t=this;Sd()&&(setTimeout(function(){t.collectSuccessLog(e),t.collectFailLog(e)},5e3),performance.onresourcetimingbufferfull=function(){"function"==typeof performance.clearResourceTimings&&(t.collectCur=0,performance.clearResourceTimings())})},processLog:function(e,t){var n=t.duration||0,r=t.transferSize||0,n={event_id:xc(),event_type:P.RESOURCE_LOAD,event_category:Rc.NETWORK,timestamp:Date.now(),page_url:t.from||window.location.href,data:{url:t.url,resource_type:t.type||"static",measurements:{duration:n,dns_time:t.domainLookup,tcp_time:t.connectTime,transfer_size:0<r?r:undefined},replay_id:_d(e),tags:{environment:e.config.env||"production",is_https:t.isHttps?"true":"false"},event_properties:{is_cached:String(0===r),protocol:t.nextHopProtocol||"",http_status:String(t.status||0)}}};null!=(r=e.reportTDEMEvent)&&r.call(e,n)},publish:function(t,n){var r=this;this.$walk(function(e){e===n&&(Array.isArray(t)?t.forEach(r.processLog):r.processLog(n,t))})},publishMany:function(e,t){for(var n=t.config,r=this.getFromParam(t),i=0,o=e.length;i<o;i++){var a=e[i];-1===this.ASSETS_INITIATOR_TYPE.indexOf(a.initiatorType)||Ec(a.name,n.hostUrl)||this.publish(this.generateLog(a,n,r),t)}},collectSuccessLog:function(n){var e,t,r=this;"function"==typeof window.PerformanceObserver?(this.publishMany(performance.getEntriesByType(this.collectEntryType),n),(e=new window.PerformanceObserver(function(e){r.publishMany(e.getEntries(),n)})).observe({entryTypes:[this.collectEntryType]}),n.lifeCycle.on("destroy",function(){0===Ed.countInstance()&&e.disconnect()})):(t=setInterval(function(){var e=performance.getEntriesByType(r.collectEntryType),t=e.slice(r.collectCur);r.collectCur=e.length,r.publishMany(t,n)},3e3),n.lifeCycle.on("destroy",function(){0===Ed.countInstance()&&clearInterval(t)}))},collectFailLog:function(i){var o=this,a=i.config,e=function(e){var t,n,r;e&&(e=e.target||e.srcElement,!(t=(null==e?void 0:e.src)||(null==e?void 0:e.href))||"string"!=typeof t||-1<window.location.href.indexOf(t)||(e="function"==typeof(null==(e=a.api)?void 0:e.resourceTypeHandler)?null==e?void 0:e.resourceTypeHandler(t):"",r=performance.getEntriesByType(o.collectEntryType).find(function(e){return e.name===t}),Ec(t,a.hostUrl))||(n=o.getFromParam(i),r={url:uc(t),status:400,duration:Number(((null==r?void 0:r.duration)||0).toFixed(2)),method:"get",type:e||"static",isHttps:lc(t),urlQuery:sc(t,!0),nextHopProtocol:"",domainLookup:0,connectTime:0,from:n},o.publish(r,i)))};window.document.addEventListener("error",e,!0),i.lifeCycle.on("destroy",function(){0===Ed.countInstance()&&window.document.removeEventListener("error",e,!0)})},generateLog:function(e,t,n){var t="function"==typeof(null==(r=t.api)?void 0:r.resourceTypeHandler)?null==(r=t.api)?void 0:r.resourceTypeHandler(e.name):"",r=e.transferSize;return{url:uc(e.name),method:"get",duration:Number(e.duration.toFixed(2)),status:200,type:t||"static",isHttps:lc(e.name),nextHopProtocol:e.nextHopProtocol||"",urlQuery:sc(e.name,!0),domainLookup:ac(e.domainLookupEnd-e.domainLookupStart),connectTime:ac(e.connectEnd-e.connectStart),transferSize:0<r?r:-1,from:n}},collectNotReportedLog:function(e){var t,n;Sd()&&(t=(n=performance.getEntriesByType(this.collectEntryType)).length,"function"!=typeof window.PerformanceObserver)&&this.collectCur!==t&&(n=n.slice(this.collectCur),this.collectCur=t,this.publishMany(n,e))},destroy:function(){this.option.publish=function(){}}});e("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},Hn);var Cd,Rd,r=/ipad|iphone|ipod/i.test(Wn)&&/applewebkit/i.test(Wn),Hn=x.setImmediate,Od=x.clearImmediate,xd=x.process,Td=x.Dispatch,Md=x.Function,Id=x.MessageChannel,Ad=x.String,Pd=0,Dd={},Ld=(g(function(){Cd=x.location}),function(e){var t;I(Dd,e)&&(t=Dd[e],delete Dd[e],t())}),Nd=function(e){return function(){Ld(e)}},Fd=function(e){Ld(e.data)},l=function(e){x.postMessage(Ad(e),Cd.protocol+"//"+Cd.host)},Id=(Hn&&Od||(Hn=function(e){Ic(arguments.length,1);var t=_(e)?e:Md(e),n=Jn(arguments,1);return Dd[++Pd]=function(){xe(t,undefined,n)},Rd(Pd),Pd},Od=function(e){delete Dd[e]},fl?Rd=function(e){xd.nextTick(Nd(e))}:Td&&Td.now?Rd=function(e){Td.now(Nd(e))}:Id&&!r?(jd=(Id=new Id).port2,Id.port1.onmessage=Fd,Rd=Jr(jd.postMessage,jd)):x.addEventListener&&_(x.postMessage)&&!x.importScripts&&Cd&&"file:"!==Cd.protocol&&!g(l)?(Rd=l,x.addEventListener("message",Fd,!1)):Rd="onreadystatechange"in ve("script")?function(e){yt.appendChild(ve("script")).onreadystatechange=function(){yt.removeChild(this),Ld(e)}}:function(e){setTimeout(Nd(e),0)}),{set:Hn,clear:Od}),Ud=Object.getOwnPropertyDescriptor,jd=function(e){var t;return f?(t=Ud(x,e))&&t.value:x[e]},l=function(){this.head=null,this.tail=null};l.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var zd,Bd,Wd,Hd,qd,Vd,Gd=l,Fd=/ipad|iphone|ipod/i.test(Wn)&&"undefined"!=typeof Pebble,Hn=/web0s(?!.*chrome)/i.test(Wn),Jd=Id.set,Od=x.MutationObserver||x.WebKitMutationObserver,l=x.document,$d=x.process,Zd=x.Promise,Kd=jd("queueMicrotask"),Yd=(Kd||(Hd=new Gd,qd=function(){var e,t;for(fl&&(e=$d.domain)&&e.exit();t=Hd.get();)try{t()}catch(X){throw Hd.head&&Vd(),X}e&&e.enter()},Vd=r||fl||Hn||!Od||!l?!Fd&&Zd&&Zd.resolve?((r=Zd.resolve(undefined)).constructor=Zd,Wd=Jr(r.then,r),function(){Wd(qd)}):fl?function(){$d.nextTick(qd)}:(Jd=Jr(Jd,x),function(){Jd(qd)}):(zd=!0,Bd=l.createTextNode(""),new Od(qd).observe(Bd,{characterData:!0}),function(){Bd.data=zd=!zd}),Kd=function(e){Hd.head||Vd(),Hd.add(e)}),Kd),Xd=function(e){try{return{error:!1,value:e()}}catch(X){return{error:!0,value:X}}},Qd=x.Promise,ef=TypeError,tf=function(e){var n,r;this.promise=new e(function(e,t){if(n!==undefined||r!==undefined)throw new ef("Bad Promise constructor");n=e,r=t}),this.resolve=Oe(n),this.reject=Oe(r)},nf={f:function(e){return new tf(e)}},rf=function(e,t){return E(e),O(t)&&t.constructor===e?t:((0,(e=nf.f(e)).resolve)(t),e.promise)},of=Qd&&Qd.prototype,Hn=!!Qd&&g(function(){of["finally"].call({then:function(){}},function(){})});R({target:"Promise",proto:!0,real:!0,forced:Hn},{"finally":function(t){var n=pu(this,Se("Promise")),e=_(t);return this.then(e?function(e){return rf(n,t()).then(function(){return e})}:t,e?function(e){return rf(n,t()).then(function(){throw e})}:t)}}),_(Qd)&&(Fd=Se("Promise").prototype["finally"],of["finally"]!==Fd)&&qt(of,"finally",Fd,{unsafe:!0}),Qd&&Qd.prototype;var af,sf,uf,lf,cf=Ke("species"),df=!1,ff=_(x.PromiseRejectionEvent),Zd={CONSTRUCTOR:zs("Promise",function(){var e=Ze(Qd),t=e!==String(Qd);if(!t&&66===qn)return!0;if(!qn||qn<51||!/native code/.test(e)){var e=new Qd(function(e){e(1)}),n=function(e){e(function(){},function(){})};if((e.constructor={})[cf]=n,!(df=e.then(function(){})instanceof n))return!0}return!(t||"BROWSER"!=dl&&"DENO"!=dl||ff)}),REJECTION_EVENT:ff,SUBCLASSING:df},hf=Id.set,r=Zd.CONSTRUCTOR,pf=Zd.REJECTION_EVENT,l=Zd.SUBCLASSING,mf=Ft.getterFor("Promise"),gf=Ft.set,Od=Qd&&Qd.prototype,vf=Qd,yf=Od,wf=x.TypeError,bf=x.document,kf=x.process,Sf=nf.f,_f=Sf,Ef=!!(bf&&bf.createEvent&&x.dispatchEvent),Cf=function(e){var t;return!(!O(e)||!_(t=e.then))&&t},Rf=function(e,t){var n,r,i,o=t.value,a=1===t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&If(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===e.promise?l(new wf("Promise-chain cycle")):(r=Cf(n))?M(r,n,u,l):u(n)):l(o)}catch(X){c&&!i&&c.exit(),l(X)}},Of=function(n,r){n.notified||(n.notified=!0,Yd(function(){for(var e,t=n.reactions;e=t.get();)Rf(e,n);n.notified=!1,r&&!n.rejection&&Tf(n)}))},xf=function(e,t,n){var r;Ef?((r=bf.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),x.dispatchEvent(r)):r={promise:t,reason:n},!pf&&(t=x["on"+e])?t(r):"unhandledrejection"===e&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(X){}}("Unhandled promise rejection",n)},Tf=function(r){M(hf,x,function(){var e,t=r.facade,n=r.value;if(Mf(r)&&(e=Xd(function(){fl?kf.emit("unhandledRejection",n,t):xf("unhandledrejection",t,n)}),r.rejection=fl||Mf(r)?2:1,e.error))throw e.value})},Mf=function(e){return 1!==e.rejection&&!e.parent},If=function(t){M(hf,x,function(){var e=t.facade;fl?kf.emit("rejectionHandled",e):xf("rejectionhandled",e,t.value)})},Af=function(t,n,r){return function(e){t(n,e,r)}},Pf=function(e,t,n){e.done||(e.done=!0,(e=n?n:e).value=t,e.state=2,Of(e,!0))},Df=function(t,n,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===n)throw new wf("Promise can't be resolved itself");var r=Cf(n);r?Yd(function(){var e={done:!1};try{M(r,n,Af(Df,e,t),Af(Pf,e,t))}catch(X){Pf(e,X,t)}}):(t.value=n,t.state=1,Of(t,!1))}catch(X){Pf({done:!1},X,t)}}};if(r&&(yf=(vf=function(e){lr(this,yf),Oe(e),M(af,this);var t=mf(this);try{e(Af(Df,t),Af(Pf,t))}catch(X){Pf(t,X)}}).prototype,(af=function(e){gf(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Gd,rejection:!1,state:0,value:null})}).prototype=qt(yf,"then",function(e,t){var n=mf(this),r=Sf(pu(this,vf));return n.parent=!0,r.ok=!_(e)||e,r.fail=_(t)&&t,r.domain=fl?kf.domain:undefined,0===n.state?n.reactions.add(r):Yd(function(){Rf(r,n)}),r.promise}),sf=function(){var e=new af,t=mf(e);this.promise=e,this.resolve=Af(Df,t),this.reject=Af(Pf,t)},nf.f=Sf=function(e){return e===vf||e===uf?new sf:_f(e)},_(Qd))&&Od!==Object.prototype){lf=Od.then,l||qt(Od,"then",function(e,t){var n=this;return new vf(function(e,t){M(lf,n,e,t)}).then(e,t)},{unsafe:!0});try{delete Od.constructor}catch(X){}Cr&&Cr(Od,yf)}R({global:!0,constructor:!0,wrap:!0,forced:r},{Promise:vf}),uf=bi.Promise,vr(vf,"Promise",!1),Ma("Promise");var Lf,Nf,Ff,Kd=Zd.CONSTRUCTOR||!Iu(function(e){Qd.all(e).then(undefined,function(){})}),Hn=(R({target:"Promise",stat:!0,forced:Kd},{all:function(e){var s=this,t=nf.f(s),u=t.resolve,l=t.reject,n=Xd(function(){var r=Oe(s.resolve),i=[],o=0,a=1;ai(e,function(e){var t=o++,n=!1;a++,M(r,s,e).then(function(e){n||(n=!0,i[t]=e,--a)||u(i)},l)}),--a||u(i)});return n.error&&l(n.value),t.promise}}),Zd.CONSTRUCTOR),Fd=Qd&&Qd.prototype,l=(R({target:"Promise",proto:!0,forced:Hn,real:!0},{"catch":function(e){return this.then(undefined,e)}}),_(Qd)&&(Id=Se("Promise").prototype["catch"],Fd["catch"]!==Id)&&qt(Fd,"catch",Id,{unsafe:!0}),R({target:"Promise",stat:!0,forced:Kd},{race:function(e){var n=this,r=nf.f(n),i=r.reject,t=Xd(function(){var t=Oe(n.resolve);ai(e,function(e){M(t,n,e).then(r.resolve,i)})});return t.error&&i(t.value),r.promise}}),R({target:"Promise",stat:!0,forced:Zd.CONSTRUCTOR},{reject:function(e){var t=nf.f(this);return(0,t.reject)(e),t.promise}}),Zd.CONSTRUCTOR),Uf=(Se("Promise"),R({target:"Promise",stat:!0,forced:l},{resolve:function(e){return rf(this,e)}}),window.navigator.userAgent.toLowerCase()),c={},jf=function(e){return-1!==Uf.indexOf(e)},zf=(c.macos=function(){return jf("mac")},c.ios=function(){return c.iphone()||c.ipod()||c.ipad()},c.iphone=function(){return!c.windows()&&jf("iphone")},c.ipod=function(){return jf("ipod")},c.ipad=function(){var e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;return jf("ipad")||e},c.android=function(){return!c.windows()&&jf("android")},c.androidPhone=function(){return c.android()&&jf("mobile")},c.androidTablet=function(){return c.android()&&!jf("mobile")},c.blackberry=function(){return jf("blackberry")||jf("bb10")},c.blackberryPhone=function(){return c.blackberry()&&!jf("tablet")},c.blackberryTablet=function(){return c.blackberry()&&jf("tablet")},c.windows=function(){return jf("windows")},c.windowsPhone=function(){return c.windows()&&jf("phone")},c.windowsTablet=function(){return c.windows()&&jf("touch")&&!c.windowsPhone()},c.fxos=function(){return(jf("(mobile")||jf("(tablet"))&&jf(" rv:")},c.fxosPhone=function(){return c.fxos()&&jf("mobile")},c.fxosTablet=function(){return c.fxos()&&jf("tablet")},c.meego=function(){return jf("meego")},c.cordova=function(){return window.cordova&&"file:"===location.protocol},c.nodeWebkit=function(){return"object"===T(window.process)},c.mobile=function(){return c.androidPhone()||c.iphone()||c.ipod()||c.windowsPhone()||c.blackberryPhone()||c.fxosPhone()||c.meego()},c.tablet=function(){return c.ipad()||c.androidTablet()||c.blackberryTablet()||c.windowsTablet()||c.fxosTablet()},c.desktop=function(){return!c.tablet()&&!c.mobile()},c.isIE=function(){return"ActiveXObject"in window},void 0),Bf=(R({target:"Object",stat:!0},{is:zf}),Object.is,Lt("search",function(r,i,o){return[function(e){var t=oe(this),n=O(e)?Qt(e,r):undefined;return n?M(n,e,t):(n=C(t),new RegExp(e)[r](n))},function(e){var t=E(this),e=C(e),n=o(i,t,e);return n.done?n.value:(n=t.lastIndex,zf(n,0)||(t.lastIndex=0),e=hn(t,e),zf(t.lastIndex,n)||(t.lastIndex=n),null===e?-1:e.index)}]}),Math.floor),Wf=function(e,t){var n=e.length;if(n<8)for(var r,i,o=1;o<n;){for(r=e[i=o];i&&0<t(e[i-1],r);)e[i]=e[--i];i!==o++&&(e[i]=r)}else for(var a=Bf(n/2),s=Wf(Jn(e,0,a),t),u=Wf(Jn(e,a),t),l=s.length,c=u.length,d=0,f=0;d<l||f<c;)e[d+f]=d<l&&f<c?t(s[d],u[f])<=0?s[d++]:u[f++]:d<l?s[d++]:u[f++];return e},Hf=Wf,Od=Wn.match(/firefox\/(\d+)/i),qf=!!Od&&+Od[1],Vf=/MSIE|Trident/.test(Wn),r=Wn.match(/AppleWebKit\/(\d+)\./),Gf=!!r&&+r[1],Jf=[],$f=y(Jf.sort),Zf=y(Jf.push),Hn=g(function(){Jf.sort(undefined)}),Fd=g(function(){Jf.sort(null)}),Id=Ue("sort"),Kf=!g(function(){if(qn)return qn<70;if(!(qf&&3<qf)){if(Vf)return!0;if(Gf)return Gf<603;for(var e,t,n,r="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)Jf.push({k:e+n,v:t})}for(Jf.sort(function(e,t){return t.v-e.v}),n=0;n<Jf.length;n++)e=Jf[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return"DGBEFHACIJK"!==r}}),Yf=(R({target:"Array",proto:!0,forced:Hn||!Fd||!Id||!Kf},{sort:function(e){e!==undefined&&Oe(e);var t=se(this);if(Kf)return e===undefined?$f(t):$f(t,e);for(var n,r,i=[],o=fe(t),a=0;a<o;a++)a in t&&Zf(i,t[a]);for(Hf(i,(r=e,function(e,t){return t===undefined?-1:e===undefined?1:r!==undefined?+r(e,t)||0:(e=C(e))===(t=C(t))?0:t<e?1:-1})),n=fe(i),a=0;a<n;)t[a]=i[a++];for(;a<o;)La(t,a++);return t}}),(Kd=(Kd=x.URL)&&Kd.prototype)&&Kd.toString),Xf=(R({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return M(Yf,this)}}),RangeError),Qf=String.fromCharCode,Zd=String.fromCodePoint,eh=y([].join),l=!!Zd&&1!==Zd.length,th=(R({target:"String",stat:!0,arity:1,forced:l},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,i=0;i<r;){if(dt(t=+arguments[i],1114111)!==t)throw new Xf(t+" is not a valid code point");n[i++]=t<65536?Qf(t):Qf(55296+((t-=65536)>>10),t%1024+56320)}return eh(n,"")}}),String.fromCharCode),nh=Se("String","fromCodePoint"),rh=encodeURIComponent,ih=parseInt,oh=y("".charAt),ah=y([].push),sh=y("".replace),uh=y("".slice),lh=y(/./.exec),ch=/^[0-9a-f]+$/i,dh=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g,fh=function(e,t){e=uh(e,t,t+2);return lh(ch,e)?ih(e,16):NaN},hh=function(e){return 2===e.length?e:"�"},Lt=function(e){for(var t=e.length,n="",r=0;r<t;){var i=oh(e,r);if("%"===i){if("%"===oh(e,r+1)||t<r+3){n+="%",r++;continue}var o=fh(e,r+1);if(o!=o){n+=i,r++;continue}r+=2;var a=function(e){for(var t=0,n=128;0<n&&0!=(e&n);n>>=1)t++;return t}(o);if(0===a)i=th(o);else{if(1===a||4<a){n+="�",r++;continue}for(var s=[o],u=1;u<a&&!(++r+3>t||"%"!==oh(e,r));){var l=fh(e,r+1);if(l!=l||191<l||l<128)break;if(1===u){if(224===o&&l<160)break;if(237===o&&159<l)break;if(240===o&&l<144)break;if(244===o&&143<l)break}ah(s,l),r+=2,u++}if(s.length!==a){n+="�";continue}var c=function(e){var t=null,n=e.length;switch(n){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return null===t||1114111<t||55296<=t&&t<=57343||t<(3<n?65536:2<n?2048:1<n?128:0)?null:t}(s);if(null===c){for(var d=0;d<a;d++)n+="�";r++;continue}i=nh(c)}}n+=i,r++}return n},Od=function(e){try{return rh(e)}catch(X){return rh(sh(e,dh,hh))}},r=Ke("iterator"),ph=Ft.set,mh=Ft.getterFor("URLSearchParams"),gh=Ft.getterFor("URLSearchParamsIterator"),vh=Lt,yh=Od,wh=jd("fetch"),bh=jd("Request"),kh=jd("Headers"),Sh=bh&&bh.prototype,Hn=kh&&kh.prototype,_h=x.TypeError,Eh=y("".charAt),Ch=y([].join),Rh=y([].push),Oh=y("".replace),xh=y([].shift),Th=y([].splice),Mh=y("".split),Ih=y("".slice),Ah=/\+/g,Ph=function(e){return vh(Oh(e,Ah," "))},Dh=/[!'()~]|%20/g,Lh={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Nh=function(e){return Lh[e]},Fh=function(e){return Oh(yh(e),Dh,Nh)},Uh=Er(function(e,t){ph(this,{type:"URLSearchParamsIterator",target:mh(e).entries,index:0,kind:t})},"URLSearchParams",function(){var e=gh(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Ar(undefined,!0);var r=t[n];switch(e.kind){case"keys":return Ar(r.key,!1);case"values":return Ar(r.value,!1)}return Ar([r.key,r.value],!1)},!0),jh=function(e){this.entries=[],this.url=null,e!==undefined&&(O(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Eh(e,0)?Ih(e,1):e:C(e)))},Fd=(jh.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s=this.entries,u=Qr(e);if(u)for(n=(t=ti(e,u)).next;!(r=M(n,t)).done;){if(i=(r=ti(E(r.value))).next,(o=M(i,r)).done||(a=M(i,r)).done||!M(i,r).done)throw new _h("Expected sequence with length 2");Rh(s,{key:C(o.value),value:C(a.value)})}else for(var l in e)I(e,l)&&Rh(s,{key:l,value:C(e[l])})},parseQuery:function(e){if(e)for(var t,n=this.entries,r=Mh(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(t=Mh(t,"="),Rh(n,{key:Ph(xh(t)),value:Ph(Ch(t,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Rh(n,Fh(e.key)+"="+Fh(e.value));return Ch(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}},function(){lr(this,zh);var e=0<arguments.length?arguments[0]:undefined,e=ph(this,new jh(e));f||(this.size=e.entries.length)}),zh=Fd.prototype;Qo(zh,{append:function(e,t){var n=mh(this);Ic(arguments.length,2),Rh(n.entries,{key:C(e),value:C(t)}),f||this.size++,n.updateURL()},"delete":function(e){for(var t=mh(this),n=Ic(arguments.length,1),r=t.entries,i=C(e),e=n<2?undefined:arguments[1],o=e===undefined?e:C(e),a=0;a<r.length;){var s=r[a];s.key!==i||o!==undefined&&s.value!==o?a++:Th(r,a,1)}f||(this.size=r.length),t.updateURL()},get:function(e){var t=mh(this).entries;Ic(arguments.length,1);for(var n=C(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=mh(this).entries;Ic(arguments.length,1);for(var n=C(e),r=[],i=0;i<t.length;i++)t[i].key===n&&Rh(r,t[i].value);return r},has:function(e){for(var t=mh(this).entries,n=Ic(arguments.length,1),r=C(e),e=n<2?undefined:arguments[1],i=e===undefined?e:C(e),o=0;o<t.length;){var a=t[o++];if(a.key===r&&(i===undefined||a.value===i))return!0}return!1},set:function(e,t){var n=mh(this);Ic(arguments.length,2);for(var r,i=n.entries,o=!1,a=C(e),s=C(t),u=0;u<i.length;u++)(r=i[u]).key===a&&(o?Th(i,u--,1):(o=!0,r.value=s));o||Rh(i,{key:a,value:s}),f||(this.size=i.length),n.updateURL()},sort:function(){var e=mh(this);Hf(e.entries,function(e,t){return e.key>t.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,n=mh(this).entries,r=Jr(e,1<arguments.length?arguments[1]:undefined),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new Uh(this,"keys")},values:function(){return new Uh(this,"values")},entries:function(){return new Uh(this,"entries")}},{enumerable:!0}),qt(zh,r,zh.entries,{name:"entries"}),qt(zh,"toString",function(){return mh(this).serialize()},{enumerable:!0}),f&&jt(zh,"size",{get:function(){return mh(this).entries.length},configurable:!0,enumerable:!0}),vr(Fd,"URLSearchParams"),R({global:!0,constructor:!0,forced:!0},{URLSearchParams:Fd}),_(kh)&&(Lf=y(Hn.has),Nf=y(Hn.set),Ff=function(e){if(O(e)){var t,n=e.body;if("URLSearchParams"===et(n))return t=e.headers?new kh(e.headers):new kh,Lf(t,"content-type")||Nf(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Et(e,{body:rt(0,C(n)),headers:rt(0,t)})}return e},_(wh)&&R({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return wh(e,1<arguments.length?Ff(arguments[1]):{})}}),_(bh))&&((Sh.constructor=Id=function(e){return lr(this,Sh),new bh(e,1<arguments.length?Ff(arguments[1]):{})}).prototype=Sh,R({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Id}));var Bh,Kd={URLSearchParams:Fd,getState:mh},Wh=Ke("iterator"),Hh=(g(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),n=e.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",n.forEach(function(e,t){n["delete"]("b"),r+=t+e}),t["delete"]("a",2),t["delete"]("b",undefined),!n.size&&!f||!n.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==n.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!n[Wh]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==r||"x"!==new URL("https://x",undefined).host}),/[^\0-\u007E]/),qh=/[.\u3002\uFF0E\uFF61]/g,Vh="Overflow: input needs wider integers to process",Gh=RangeError,Jh=y(qh.exec),$h=Math.floor,Zh=String.fromCharCode,Kh=y("".charCodeAt),Yh=y([].join),Xh=y([].push),Qh=y("".replace),ep=y("".split),tp=y("".toLowerCase),np=function(e){return e+22+75*(e<26)},rp=function(e,t,n){var r=0;for(e=n?$h(e/700):e>>1,e+=$h(e/t);455<e;)e=$h(e/35),r+=36;return $h(r+36*e/(e+38))},ip=function(e){for(var t,n=[],r=ep(Qh(tp(e),qh,"."),"."),i=0;i<r.length;i++)t=r[i],Xh(n,Jh(Hh,t)?"xn--"+function(e){var t,n=[],r=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i,o=Kh(e,n++);55296<=o&&o<=56319&&n<r?56320==(64512&(i=Kh(e,n++)))?Xh(t,((1023&o)<<10)+(1023&i)+65536):(Xh(t,o),n--):Xh(t,o)}return t}(e)).length,i=128,o=0,a=72;for(c=0;c<e.length;c++)(t=e[c])<128&&Xh(n,Zh(t));var s=n.length,u=s;for(s&&Xh(n,"-");u<r;){for(var l=2147483647,c=0;c<e.length;c++)(t=e[c])>=i&&t<l&&(l=t);var d=u+1;if(l-i>$h((2147483647-o)/d))throw new Gh(Vh);for(o+=(l-i)*d,i=l,c=0;c<e.length;c++){if((t=e[c])<i&&2147483647<++o)throw new Gh(Vh);if(t===i){for(var f=o,h=36;;){var p=h<=a?1:a+26<=h?26:h-a;if(f<p)break;var m=f-p,g=36-p;Xh(n,Zh(np(p+m%g))),f=$h(m/g),h+=36}Xh(n,Zh(np(f))),a=rp(o,d,u===s),o=0,u++}}o++,i++}return Yh(n,"")}(t):t);return Yh(n,".")},op=zt.codeAt,ap=Ft.set,sp=Ft.getterFor("URL"),up=Kd.URLSearchParams,lp=Kd.getState,cp=Lt,dp=Od,Zd=x.URL,fp=x.TypeError,hp=x.parseInt,pp=Math.floor,mp=Math.pow,gp=String.fromCharCode,vp=y("".charAt),yp=y(/./.exec),wp=y([].join),bp=y(1.1.toString),kp=y([].pop),Sp=y([].push),_p=y("".replace),Ep=y([].shift),Cp=y("".split),Rp=y("".indexOf),Op=y("".slice),xp=y("".toLowerCase),Tp=y([].unshift),Mp=/[a-z]/i,Ip=/[\d+\-.a-z]/i,Ap=/\d/,Pp=/^0x/i,Dp=/^[0-7]+$/,Lp=/^\d+$/,Np=/^[\da-f]+$/i,Fp=/[\u0000-\u0020#%/:<>?@[\\\]^|\u007F]/,Up=/[\0\t\n\r #/:<>?@[\\\]^|]/,jp=/^[\u0000-\u0020]+/,zp=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Bp=/[\t\n\r]/g,Wp=/[^\u0000-\u007F]/,Hp=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)Tp(t,e%256),e=pp(e/256);return wp(t,".")}if("object"!=T(e))return e;for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(n<i&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return n<i?r:t}(e),n=0;n<8;n++)i&&0===e[n]||(i=i&&!1,r===n?(t+=n?":":"::",i=!0):(t+=bp(e[n],16),n<7&&(t+=":")));return"["+t+"]"},qp={},Vp=Dr({},qp,{" ":1,'"':1,"#":1,"<":1,">":1}),Gp=Dr({},Vp,{"'":1}),Jp=Dr({},qp,{" ":1,'"':1,"<":1,">":1,"`":1}),$p=Dr({},Jp,{"#":1,"?":1,"{":1,"}":1,"^":1}),Zp=Dr({},$p,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Kp=function(e,t){var n=op(e,0);return 32<=n&&n<127&&!I(t,e)?e:"'"===e&&I(t,e)?"%27":dp(e)},Yp={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Xp=function(e,t){return 2===e.length&&yp(Mp,vp(e,0))&&(":"===(e=vp(e,1))||!t&&"|"===e)},Qp=function(e){return 1<e.length&&Xp(Op(e,0,2))&&(2===e.length||"/"===(e=vp(e,2))||"\\"===e||"?"===e||"#"===e)},em={},tm={},nm={},rm={},im={},om={},am={},sm={},um={},lm={},cm={},dm={},fm={},hm={},pm={},mm={},gm={},vm={},ym={},wm={},bm={},km=function(e,t,n){var r,i,e=C(e);if(t){if(i=this.parse(e))throw new fp(i);this.searchParams=null}else{if(n!==undefined&&(r=new km(n,!0)),i=this.parse(e,null,r))throw new fp(i);(t=lp(new up)).bindURL(this),this.searchParams=t}},Sm=(km.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s=this,u=t||em,l=0,c="",d=!1,f=!1,h=!1;for(e=C(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=_p(e,jp,""),e=_p(e,zp,"$1")),e=_p(e,Bp,""),r=Mu(e);l<=r.length;){switch(i=r[l],u){case em:if(!i||!yp(Mp,i)){if(t)return"Invalid scheme";u=nm;continue}c+=xp(i),u=tm;break;case tm:if(i&&yp(Ip,i))c+=xp(i);else{if(":"!==i){if(t)return"Invalid scheme";c="",u=nm,l=0;continue}if(t&&(s.isSpecial()!==I(Yp,c)||"file"===c&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&""===s.host))return;if(s.scheme=c,t)return void(s.isSpecial()&&Yp[s.scheme]===s.port&&(s.port=null));c="","file"===s.scheme?u=hm:s.isSpecial()&&n&&n.scheme===s.scheme?u=rm:s.isSpecial()?u=sm:"/"===r[l+1]?(u=im,l++):(s.cannotBeABaseURL=!0,Sp(s.path,""),u=ym)}break;case nm:if(!n||n.cannotBeABaseURL&&"#"!==i)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"===i){s.scheme=n.scheme,s.path=Jn(n.path),s.query=n.query,s.fragment="",s.cannotBeABaseURL=!0,u=bm;break}u="file"===n.scheme?hm:om;continue;case rm:if("/"!==i||"/"!==r[l+1]){u=om;continue}u=um,l++;break;case im:if("/"===i){u=lm;break}u=vm;continue;case om:if(s.scheme=n.scheme,i===Bh)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Jn(n.path),s.query=n.query;else if("/"===i||"\\"===i&&s.isSpecial())u=am;else if("?"===i)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Jn(n.path),s.query="",u=wm;else{if("#"!==i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Jn(n.path),s.path.length&&s.path.length--,u=vm;continue}s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Jn(n.path),s.query=n.query,s.fragment="",u=bm}break;case am:if(!s.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,u=vm;continue}u=lm}else u=um;break;case sm:if(u=um,"/"!==i||"/"!==r[l+1])continue;l++;break;case um:if("/"===i||"\\"===i)break;u=lm;continue;case lm:if("@"===i){d&&(c="%40"+c);for(var d=!0,p=Mu(c),m=0;m<p.length;m++){var g=p[m];":"!==g||h?(g=Kp(g,Zp),h?s.password+=g:s.username+=g):h=!0}c=""}else if(i===Bh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()){if(d&&""===c)return"Invalid authority";l-=Mu(c).length+1,c="",u=cm}else c+=i;break;case cm:case dm:if(t&&"file"===s.scheme){u=mm;continue}if(":"!==i||f){if(i===Bh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()){if(s.isSpecial()&&""===c)return"Invalid host";if(t&&""===c&&(s.includesCredentials()||null!==s.port))return;if(o=s.parseHost(c))return o;if(c="",u=gm,t)return;continue}"["===i?f=!0:"]"===i&&(f=!1),c+=i}else{if(""===c)return"Invalid host";if(t===dm)return;if(o=s.parseHost(c))return o;c="",u=fm}break;case fm:if(!yp(Ap,i)){if(i===Bh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()||t){if(""!==c){var v=hp(c,10);if(65535<v)return"Invalid port";s.port=s.isSpecial()&&v===Yp[s.scheme]?null:v,c=""}if(t)return;u=gm;continue}return"Invalid port"}c+=i;break;case hm:if(s.scheme="file",s.host="","/"===i||"\\"===i)u=pm;else{if(!n||"file"!==n.scheme){u=vm;continue}switch(i){case Bh:s.host=n.host,s.path=Jn(n.path),s.query=n.query;break;case"?":s.host=n.host,s.path=Jn(n.path),s.query="",u=wm;break;case"#":s.host=n.host,s.path=Jn(n.path),s.query=n.query,s.fragment="",u=bm;break;default:s.host=n.host,Qp(wp(Jn(r,l),""))||(s.path=Jn(n.path),s.shortenPath()),u=vm;continue}}break;case pm:if("/"===i||"\\"===i){u=mm;break}n&&"file"===n.scheme&&(s.host=n.host,!Qp(wp(Jn(r,l),"")))&&Xp(n.path[0],!0)&&Sp(s.path,n.path[0]),u=vm;continue;case mm:if(i===Bh||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&Xp(c))u=vm;else{if(""===c){if(s.host="",t)return}else{if(o=s.parseHost(c))return o;if("localhost"===s.host&&(s.host=""),t)return;c=""}u=gm}continue}c+=i;break;case gm:if(s.isSpecial()){if(u=vm,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==Bh&&(u=vm,"/"!==i))continue}else s.fragment="",u=bm;else s.query="",u=wm;break;case vm:if(i===Bh||"/"===i||"\\"===i&&s.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(v=xp(c))||"%2e."===v||".%2e"===v||"%2e%2e"===v?(s.shortenPath(),"/"===i||"\\"===i&&s.isSpecial()||Sp(s.path,"")):"."===(a=c)||"%2e"===xp(a)?"/"===i||"\\"===i&&s.isSpecial()||Sp(s.path,""):("file"===s.scheme&&!s.path.length&&Xp(c)&&(null!==s.host&&""!==s.host&&(s.host=""),c=vp(c,0)+":"),Sp(s.path,c)),c="","file"===s.scheme&&(i===Bh||"?"===i||"#"===i))for(;1<s.path.length&&""===s.path[0];)Ep(s.path);"?"===i?(s.query="",u=wm):"#"===i&&(s.fragment="",u=bm)}else c+=Kp(i,$p);break;case ym:"?"===i?(s.query="",u=wm):"#"===i?(s.fragment="",u=bm):i!==Bh&&(s.path[0]+=" "===i?"?"===r[l+1]||"#"===r[l+1]?"%20":" ":Kp(i,qp));break;case wm:t||"#"!==i?i!==Bh&&(s.query+=Kp(i,s.isSpecial()?Gp:Vp)):(s.fragment="",u=bm);break;case bm:i!==Bh&&(s.fragment+=Kp(i,Jp))}l++}},parseHost:function(u){var e,t,n;if("["===vp(u,0))return"]"===vp(u,u.length-1)&&(e=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,d=0,f=function(){return vp(e,d)};if(":"===f()){if(":"!==vp(e,1))return;d+=2,c=++l}for(;f();){if(8===l)return;if(":"!==f()){for(t=n=0;n<4&&yp(Np,f());)t=16*t+hp(f(),16),d++,n++;if("."===f()){if(0===n)return;if(d-=n,6<l)return;for(r=0;f();){if(i=null,0<r){if(!("."===f()&&r<4))return;d++}if(!yp(Ap,f()))return;for(;yp(Ap,f());){if(o=hp(f(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(255<i)return;d++}u[l]=256*u[l]+i,2!=++r&&4!==r||l++}if(4!==r)return;break}if(":"===f()){if(d++,!f())return}else if(f())return;u[l++]=t}else{if(null!==c)return;d++,c=++l}}if(null!==c)for(a=l-c,l=7;0!==l&&0<a;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!==l)return;return u}(Op(u,1,-1)))?void(this.host=e):"Invalid host";if(this.isSpecial()){if(null===(u=function(e){if(!yp(Wp,e))return""===e?null:ip(e);for(var t,n,r=Mu(e),i="",o=0;o<r.length;o++){if(t=op(r[o],0),65533===(n=t)||55296<=n&&n<=57343||128<=n&&n<=159||8206<=n&&n<=8207||8232<=n&&n<=8233||8234<=n&&n<=8238||8293<=n&&n<=8297||64976<=n&&n<=65007||65534==(65534&n)||57344<=n&&n<=63743||983040<=n&&n<=1114109)return null;173===(n=t)||847===n||8203===n||12644===n||65279===n||65440===n||4447<=n&&n<=4448||6068<=n&&n<=6069||6155<=n&&n<=6159||8288<=n&&n<=8292||8298<=n&&n<=8303||65024<=n&&n<=65039||917760<=n&&n<=917999||(i+=(n=65281<=(n=t)&&n<=65374?n-65248:160===n||5760===n||8239===n||8287===n||12288===n||8192<=n&&n<=8202||n<=65535&&-1<Rp("¨¯´¸˘˙˚˛˜˝ͺ΄΅᾽᾿῀῁῍῎῏῝῞῟῭΅´῾‗‾⁇⁈⁉℀℁℅℆⩴゛゜ﱞﱟﱠﱡﱢﱣﷺﷻ︓︖﹇﹈﹉﹊﹋﹌﹕﹖﹟﹤﹥﹨﹪﹫ﹰﹲﹴﹶﹸﹺﹼﹾ ̄",gp(n))?32:n)===t?r[o]:gp(n))}return""===i?null:ip(i)}(cp(u)))||yp(Fp,u))return"Invalid host";if(function(){var e=Cp(u,".");if(""===e[e.length-1]){if(1===e.length)return;e.length--}return yp(Lp,e=e[e.length-1])||yp(Pp,e)&&(""===(e=Op(e,2))||yp(Np,e))}()){if(null===(e=function(){var e,t,n,r,i,o,a,s=Cp(u,".");if(s.length&&""===s[s.length-1]&&s.length--,4<(e=s.length))return null;for(t=[],n=0;n<e;n++){if(""===(r=s[n]))return null;if(i=10,1<r.length&&"0"===vp(r,0)&&(i=yp(Pp,r)?16:8,r=Op(r,8===i?1:2)),""===r)o=0;else{if(!yp(10===i?Lp:8===i?Dp:Np,r))return null;o=hp(r,i)}Sp(t,o)}for(n=0;n<e;n++)if(o=t[n],n===e-1){if(o>=mp(256,5-e))return null}else if(255<o)return null;for(a=kp(t),n=0;n<t.length;n++)a+=t[n]*mp(256,3-n);return a}()))return"Invalid host";this.host=e}else this.host=u}else{if(yp(Up,u))return"Invalid host";for(e="",t=Mu(u),n=0;n<t.length;n++)e+=Kp(t[n],qp);this.host=e}},cannotHaveUsernamePasswordPort:function(){return null===this.host||""===this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return I(Yp,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Xp(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==i?(l+="//",e.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=Hp(i),null!==o&&(l+=":"+o)):"file"===t&&(l+="//"),null===i&&!e.cannotBeABaseURL&&1<a.length&&""===a[0]&&(l+="/."),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+wp(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){e=this.parse(e);if(e)throw new fp(e);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new Sm(this.path[0]).origin}catch(X){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+Hp(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(C(e)+":",em)},getUsername:function(){return this.username},setUsername:function(e){var t=Mu(C(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Kp(t[n],Zp)}},getPassword:function(){return this.password},setPassword:function(e){var t=Mu(C(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Kp(t[n],Zp)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Hp(e):Hp(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,cm)},getHostname:function(){var e=this.host;return null===e?"":Hp(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,dm)},getPort:function(){var e=this.port;return null===e?"":C(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=C(e))?this.port=null:this.parse(e,fm))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+wp(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,gm))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=C(e))?this.query=null:("?"===vp(e,0)&&(e=Op(e,1)),this.query="",this.parse(e,wm)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=C(e))?("#"===vp(e,0)&&(e=Op(e,1)),this.fragment="",this.parse(e,bm)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}},function(e){var t=lr(this,_m),n=1<Ic(arguments.length,1)?arguments[1]:undefined,e=ap(t,new km(e,!1,n));f||(t.href=e.serialize(),t.origin=e.getOrigin(),t.protocol=e.getProtocol(),t.username=e.getUsername(),t.password=e.getPassword(),t.host=e.getHost(),t.hostname=e.getHostname(),t.port=e.getPort(),t.pathname=e.getPathname(),t.search=e.getSearch(),t.searchParams=e.getSearchParams(),t.hash=e.getHash())}),_m=Sm.prototype,l=function(e,t){return{get:function(){return sp(this)[e]()},set:t&&function(e){return sp(this)[t](e)},configurable:!0,enumerable:!0}};f&&(jt(_m,"href",l("serialize","setHref")),jt(_m,"origin",l("getOrigin")),jt(_m,"protocol",l("getProtocol","setProtocol")),jt(_m,"username",l("getUsername","setUsername")),jt(_m,"password",l("getPassword","setPassword")),jt(_m,"host",l("getHost","setHost")),jt(_m,"hostname",l("getHostname","setHostname")),jt(_m,"port",l("getPort","setPort")),jt(_m,"pathname",l("getPathname","setPathname")),jt(_m,"search",l("getSearch","setSearch")),jt(_m,"searchParams",l("getSearchParams")),jt(_m,"hash",l("getHash","setHash"))),qt(_m,"toJSON",function(){return sp(this).serialize()},{enumerable:!0}),qt(_m,"toString",function(){return sp(this).serialize()},{enumerable:!0}),Zd&&(jd=Zd.createObjectURL,r=Zd.revokeObjectURL,jd&&qt(Sm,"createObjectURL",Jr(jd,Zd)),r)&&qt(Sm,"revokeObjectURL",Jr(r,Zd)),vr(Sm,"URL"),R({global:!0,constructor:!0,forced:!0,sham:!f},{URL:Sm});var Em,Cm,Rm,Om,xm,Tm,Mm,Im=function(){return{host:new URL(location.href).host,pathname:location.pathname}},Am=!1,Pm=[],Dm=/^\/[^/]/,Lm=!1,Nm=[],Fm=function(r,e,i){return null!=e&&e.length&&"object"===T(r)?e.reduce(function(e,t){var n=window.Headers&&r instanceof Headers?r.get(t):r[t];return n?e+(""===e?"":"\n\n")+i+" header "+t+": "+n:e},""):""},Um={maxRetryCount:10,retryInterval:function(e){return 1e3*(2<<e)},whenRetryEndStillFail:"discard"},jm={API_RESPONSE:"api_response",AJAX_ERROR:"ajax_error",RET_ERROR:"ret_error",SLOW_NET_REQUEST:"slow_net_request"},zm=function(e,t){return e&&-1===["null","undefined"].indexOf(e)?t+": "+e:""},Bm=function(e,t,n){void 0===t&&(t="");var r,i,e="function"==typeof(null==(i=e.api)?void 0:i.resourceTypeHandler)?null==(i=e.api)?void 0:i.resourceTypeHandler(n):"";return-1===xl.indexOf(e)&&(r=void 0===t?"":t,i=(void 0===n?"":n).split("?")[0],e=dc.test(i)||cc.some(function(e){return-1!==String(r).indexOf(e)})?"static":"fetch"),e},Wm=function(e,t){return e?jm.AJAX_ERROR:t?jm.RET_ERROR:jm.API_RESPONSE},Hm=function(e,t,n){if(!e)return!1;t=null==t?void 0:t.api;if(null!=t&&t.isSlowApi&&"function"==typeof(null==t?void 0:t.isSlowApi))try{return t.isSlowApi(n||{duration:e})}catch(X){return console.warn("[TDEM] isSlowApi function happen error:",X,", this data will not be reported."),!1}n=null!=(n=null==t?void 0:t.slowThreshold)?n:null==t?void 0:t.apiSlowThreshold;return n&&"number"==typeof n?n<e:1e3<e},qm=function(e,t){var e=e.api;if(null!=e&&e.usePerformanceTiming&&"string"==typeof t.url){e=null==(e=performance.getEntriesByName(t.url))?void 0:e.pop();if(e)return{url:t.url,isHttps:lc(t.url),method:t.method,type:t.type,status:t.status,duration:Number(e.duration.toFixed(2)),nextHopProtocol:e.nextHopProtocol||"",domainLookup:ac(e.domainLookupEnd-e.domainLookupStart),connectTime:ac(e.connectEnd-e.connectStart)}}return{url:t.url,isHttps:lc(t.url),method:t.method,type:t.type,status:t.status,duration:Number(t.duration.toFixed(2)),nextHopProtocol:"",domainLookup:nc.number,connectTime:nc.number}},Hn=(new s({name:"api"}),new s({name:"api",override:!1,onNewTdem:function(e){var t,n;this.override||(this.override=!0,null!=(n=e.config.api)&&n.injectTraceHeader&&(this.traceRequestHeader=new Yc(n.injectTraceHeader,null!=(t=null==n?void 0:n.injectTraceIgnoreUrls)?t:[],null==n?void 0:n.injectTraceUrls,null==n?void 0:n.traceFlag)),this.overrideFetch(e.config,e),this.overrideXhr(e.config,e))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},overrideFetch:function(k,S){var _=this,e=k.api,e={name:this.name,traceRequestHeader:null!=e&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return _.getFromParam(S)},then:function(h,p,m,g,v,y,w){var e,b;Ec(m,k.hostUrl)||(e=h.headers?h.headers.get("content-type"):"","fetch"===(b=Bm(k,e||"",m))?h.clone().text().then(function(i){var e,o=h.status<=0||400<=h.status,t=(null==(t=k.api)?void 0:t.reqHeaders)||[],a=Fm(null==g?void 0:g.headers,t,"req"),t=(null==(t=k.api)?void 0:t.resHeaders)||[],s=Fm(h.headers,t,"res"),u=Qc(null==g?void 0:g.headers),t=hc(i,k.api,{url:m,ctx:h,payload:null==g?void 0:g.body}),l=t.code,c=t.isErr,t=null==(t=k.api)?void 0:t.apiDetail,d=t?pc(null==g?void 0:g.body,null==(e=k.api)?void 0:e.reqParamHandler,{url:m}):"",f=t?pc(i,null==(e=k.api)?void 0:e.resBodyHandler,{url:m,ctx:h}):"";setTimeout(function(){var e=qm(k,{url:m,duration:p,type:b,status:h.status||0,method:(null==g?void 0:g.method)||"get"}),t=[o?"FETCH_ERROR: "+i:"","fetch req url: "+m,"res status: "+(e.status||0),"res duration: "+e.duration+"ms","res startTime: "+v,a,s,"req method: "+(e.method||"GET"),"res retcode: "+l,zm(d,"req param"),zm(f,"res data")].filter(function(e){return e}).join("\n\n"),t=(e.payload=null==g?void 0:g.body,e.ret=l,e.isErr=+c,e.from=y||_.getFromParam(S),{msg:t,code:l,trace:u,errorMsg:"",from:y||_.getFromParam(S),originFrom:w,level:jm.API_RESPONSE}),n=Hm(null==e?void 0:e.duration,k,e),r=Wm(o,c);t.level=r===jm.API_RESPONSE&&n?jm.SLOW_NET_REQUEST:r,t.isErr=c,(n||t.level!==jm.API_RESPONSE||S.isWhiteList||null!=(n=null==(r=S.config)?void 0:r.api)&&n.reportRequest)&&_.publishNormalLog(t,S),_.publishSpeed(e,S)},0)})["catch"](function(e){console.info("ignore something error when process resp "+e)}):setTimeout(function(){var e=qm(k,{url:m,duration:p,type:b,status:h.status||0,method:(null==g?void 0:g.method)||"get"});e.type="static",e.urlQuery=sc(m,!0),e.from=y||_.getFromParam(S),_.publishSpeed(e,S)},0))},"catch":function(t,n,r,i,o,a,s){var u,e,l,c,d;if(Ec(r,k.hostUrl))throw t;if("AbortError"!==(t&&t.name))throw u=Bm(k,"",r),e=(null==(e=k.api)?void 0:e.reqHeaders)||[],l=Fm(null==i?void 0:i.headers,e,"req"),c=Qc(null==i?void 0:i.headers),d=null!=(e=k.api)&&e.apiDetail?pc(null==i?void 0:i.body,null==(e=k.api)?void 0:e.reqParamHandler,{url:r}):"",setTimeout(function(){var e=qm(k,{url:r,duration:n,type:u,status:0,method:(null==i?void 0:i.method)||"get"}),e=(e.from=a||_.getFromParam(S),_.publishSpeed(e,S),"AJAX_ERROR: "+t+"\n \nreq url: "+r+"\n \nres status: 0\n \nres duration: "+e.duration+"ms\n \nreq method: "+((null==i?void 0:i.method)||"get")+"\n \nreq param: "+d+"\n \nres startTime: "+o+"\n \n"+l);_.publishNormalLog({msg:e,level:jm.AJAX_ERROR,code:-400,trace:c,errorMsg:"",from:a||_.getFromParam(S),originFrom:s},S)},0),t}},f=(this.hackFetchOptions=e,this.hackFetchOptions),h=null==(e=k.api)?void 0:e.ignoreHackReg;if(void 0===h&&(h=/\.flv(\?|$)/i),Nm.find(function(e){return e.name===f.name}))throw new Error("name '"+f.name+"' is already in hackFetch option list");Nm.push(f),!Lm&&window.fetch&&(Lm=!0,Om=window.fetch,window.fetch=function(e,i){void 0===i&&(i={});var o="string"==typeof e?e:null==e?void 0:e.url;if(null!=(a=null==h?void 0:h.test)&&a.call(h,o))return Om(o,i);Dm.test(o)&&(o=""+location.origin+o);var t,n,r,a=(f||{}).traceRequestHeader;a&&(t=void 0===(t=(i||{}).headers)?{}:t,n=(r=Im()).host,r=(n=a.generate(o,t,{host:n,pathname:r.pathname})||{}).name,a=n.value)&&r&&(i.headers=Object.assign(t,((n={})[r]=a,n)));for(var s=new Map,u=window.location.href,l=0;l<Nm.length;l++){var c=Nm[l];try{"function"==typeof c.beforeFetch&&c.beforeFetch(o,i),"function"==typeof c.getCurrentFrom&&s.set(c.name,c.getCurrentFrom())}catch(Le){}}var d=Date.now();return Om(e,i).then(function(e){for(var t=e.clone(),n=0;n<Nm.length;n++){var r=Nm[n];try{"function"==typeof r.then&&r.then(t,Date.now()-d,o,i,d,s.get(r.name),u)}catch(Le){}}return e})["catch"](function(e){for(var t=0;t<Nm.length;t++){var n=Nm[t];try{"function"==typeof n["catch"]&&n["catch"](e,Date.now()-d,o,i,d,s.get(n.name),u)}catch(Le){}}throw e})})},overrideXhr:function(b,k){var e,i,S=this,o={name:this.name,ignoreHackReg:null==(e=b.api)?void 0:e.ignoreHackReg,traceRequestHeader:null!=(e=b.api)&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return S.getFromParam(k)},send:function(i,p,m,g){var e,t,v=Date.now(),o=(((null==b?void 0:b.api)||{}).injectTraceHeader&&(t=(e=Im()).host,e=(t=S.traceRequestHeader.generate(i.tdemUrl,{},{host:t,pathname:e.pathname})||{}).name,t=t.value,e)&&t&&i.setRequestHeader(e,t),i.addEventListener("loadend",function(){var f,n,e,r,h=i.tdemUrl||"";Ec(h,b.hostUrl)||"abort"===i.failType||(f="",(i.failType||!i.status||400<=i.status)&&(f=i.failType||"failed"),n=Date.now()-v,e=i.getResponseHeader("content-type")||"",r=Bm(b,e,h),setTimeout(function(){var a=qm(b,{url:h,duration:n,type:r,status:i.status,method:i.tdemMethod||"get"});if(a.from=m||S.getFromParam(k),"fetch"===r){var e=(null==(e=b.api)?void 0:e.reqHeaders)||[],s=Fm(i.tdemXhrReqHeader,e,"req"),e=(null==(e=b.api)?void 0:e.resHeaders)||[],t=i.getAllResponseHeaders().split("\r\n").reduce(function(e,t){t=t.split(": ");return t[0]&&t[1]&&(e[t[0]]=t[1]),e},{}),u=Fm(t,e,"res"),l=Qc(i.tdemXhrReqHeader),e=null==(t=b.api)?void 0:t.apiDetail,c=e?pc(p,null==(t=b.api)?void 0:t.reqParamHandler,{url:h}):"",d=e?pc(i.response,null==(t=b.api)?void 0:t.resBodyHandler,{url:h}):"";try{!function(e,t,n,r){var i,o,a;try{if("function"==typeof(null==t?void 0:t.retCodeHandlerAsync))return t.retCodeHandlerAsync(e,null==n?void 0:n.url,null==n?void 0:n.ctx,function(e){var t=e.code;null!=r&&r({code:void 0===t?Tl:t,isErr:e.isErr})});if("function"==typeof(null==t?void 0:t.retCodeHandler))return a=(o=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code,null!=r&&r({code:void 0===a?Tl:a,isErr:o.isErr});if(!(e="string"==typeof e?JSON.parse(e):e))return null!=r&&r({code:Tl,isErr:!1});"function"==typeof(null==(i=null==t?void 0:t.ret)?void 0:i.join)&&(fc=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var s=Object.getOwnPropertyNames(e).filter(function(e){return-1!==fc.indexOf(e.toLowerCase())});if(s.length)return"未知"!==(a=e[s[0]])&&""!==a||(a=Tl),null!=r&&r({code:""+a,isErr:0!==a&&"0"!==a&&a!==Tl});null!=r&&r({code:Tl,isErr:!1})}catch(f){null!=r&&r({code:Tl,isErr:!1})}}(i.response,b.api,{url:h,ctx:i,payload:p},function(e){var t,n=e.code,e=e.isErr,r=[f?"AJAX_ERROR: request "+f:"","fetch req url: "+h,"res status: "+(a.status||0),"res duration: "+a.duration+"ms","res startTime: "+v,s,u,"req method: "+(a.method||"GET"),"res retcode: "+n,zm(c,"req param"),zm(d,"res data")].filter(function(e){return e}).join("\n\n"),i=(a.ret=n,a.isErr=+e,a.payload=p,Wm(!!f,e)),o=Hm(null==a?void 0:a.duration,b,a);(i!==jm.API_RESPONSE||o||k.isWhiteList||null!=(t=null==(t=k.config)?void 0:t.api)&&t.reportRequest)&&S.publishNormalLog({msg:r,level:i===jm.API_RESPONSE&&o?jm.SLOW_NET_REQUEST:i,code:n,isErr:e,trace:l,errorMsg:"",from:m||S.getFromParam(k),originFrom:g},k),S.publishSpeed(a,k)})}catch(R){a.ret=Tl,S.publishSpeed(a,k)}}else a.type="static",a.urlQuery=sc(h,!0),S.publishSpeed(a,k);i.removeEventListener("abort",o),i.removeEventListener("error",y),i.removeEventListener("timeout",w)},0))}),function(){i.failType="abort"}),y=function(){i.failType="error"},w=function(){i.failType="timeout"};i.addEventListener("abort",o),i.addEventListener("error",y),i.addEventListener("timeout",w)}};this.hackXHROptions=o,i=this.hackXHROptions,Pm.find(function(e){return e.name===i.name})||(Pm.push(i),!Am&&window.XMLHttpRequest&&(Em=window.XMLHttpRequest.prototype.send,Cm=window.XMLHttpRequest.prototype.open,Rm=window.XMLHttpRequest.prototype.setRequestHeader,Am=!0,window.XMLHttpRequest.prototype.open=function(){this.tdemMethod=arguments[0];var e,t=arguments[1];if(Dm.test(t)&&(t=""+location.origin+t),this.tdemUrl=t,null==(e=null==(t=i.ignoreHackReg)?void 0:t.test)||!e.call(t,this.tdemUrl))if(this.tdemXhrStartTime=Date.now(),this.sendByTdem)c.isIE()||(this.timeout=5e3);else for(var n=0;n<Pm.length;n++){var r=Pm[n];try{"function"==typeof r.open&&r.open(this)}catch(o){}}return Cm.apply(this,arguments)},window.XMLHttpRequest.prototype.setRequestHeader=function(){var e,t,n;return null!=(n=null==(t=i.ignoreHackReg)?void 0:t.test)&&n.call(t,this.tdemUrl)?Rm.apply(this,arguments):(t=arguments[0],n=arguments[1],this.tdemXhrReqHeader=null!=(e=this.tdemXhrReqHeader)?e:{},null!=i&&i.traceRequestHeader&&-1<["traceparent","b3","sw8","sentry-trace"].indexOf(t)&&(this.tdemXhrReqHeader[t]||(arguments[1]=n),this.tdemXhrReqHeader[t])?void 0:(this.tdemXhrReqHeader[t]=arguments[1],Rm.apply(this,arguments)))},window.XMLHttpRequest.prototype.send=function(){var e,t;if(!(null!=(t=null==(e=i.ignoreHackReg)?void 0:e.test)&&t.call(e,this.tdemUrl)||this.sendByTdem))for(var n=0;n<Pm.length;n++){var r=Pm[n];try{"function"==typeof r.send&&r.send(this,arguments[0],"function"==typeof r.getCurrentFrom?r.getCurrentFrom():undefined,window.location.href)}catch(S){}}return Em.apply(this,arguments)}))},publishSpeed:function(e){},publishNormalLog:function(e,t){var n,r,i,o,a,s,u,l;[jm.API_RESPONSE,jm.AJAX_ERROR,jm.RET_ERROR,jm.SLOW_NET_REQUEST].includes(e.level)&&(n=(n=null==(n=e.msg)?void 0:n.match(/(?:fetch req url|req url):\s*(.+?)(?:\n|$)/))?n[1].trim():"",r=(r=null==(r=e.msg)?void 0:r.match(/req method:\s*(.+?)(?:\n|$)/i))?r[1].trim().toUpperCase():"GET",s=(s=null==(s=e.msg)?void 0:s.match(/res status:\s*(\d+)/))?parseInt(s[1],10):0,i=(i=null==(i=e.msg)?void 0:i.match(/res duration:\s*([\d.]+)ms/))?parseFloat(i[1]):0,o=(o=null==(o=e.msg)?void 0:o.match(/=+\s*res data\s*=+\s*\n([\s\S]*?)(?:\n=+|$)/))?o[1].trim().slice(0,1e3):undefined,a={},e.trace&&(a.trace_id=e.trace),(l=(u={httpStatus:s,isTransportFailure:s<=0,isBusinessError:e.level===jm.RET_ERROR||!!e.isErr,businessCode:e.code}).aborted?{report:!1,eventType:null}:(l=Number(u.httpStatus),u.isTransportFailure||!Number.isFinite(l)||l<=0?{report:!0,eventType:"api_error",outcome:"transport_error"}:400<=l?{report:!0,eventType:"api_error",outcome:"http_error"}:u.isBusinessError?{report:!0,eventType:"api_error",outcome:"business_error",businessCode:ic(u.businessCode)||Tl}:{report:!0,eventType:"api_call",businessCode:ic(u.businessCode)})).report)&&l.eventType&&(u={http_method:r,http_status:String(s)},l.outcome&&(u.outcome=l.outcome),l.businessCode&&(u.business_code=l.businessCode),"api_error"===l.eventType?(s={event_id:xc(),event_type:P.API_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:e.from||(null==(r=t.getOriginFrom)?void 0:r.call(t))||window.location.href,data:{url:n,measurements:{duration:i},response_body:o,replay_id:_d(t),tags:0<Object.keys(a).length?a:undefined,event_properties:u}},null!=(r=t.reportTDEMEvent)&&r.call(t,s)):(s={event_id:xc(),event_type:P.API_CALL,event_category:Rc.NETWORK,timestamp:Date.now(),page_url:e.from||(null==(o=t.getOriginFrom)?void 0:o.call(t))||window.location.href,data:{url:n,measurements:{duration:i},replay_id:_d(t),tags:0<Object.keys(a).length?a:undefined,event_properties:u}},null!=(r=t.reportTDEMEvent)&&r.call(t,s)))},destroy:function(){var t,n,e;this.option.publishSpeed=function(){},this.option.publishNormalLog=function(){},this.option.hackXHROptions&&(n=this.option.hackXHROptions,-1!==(e=Pm.findIndex(function(e){return e.name===n.name})))&&Pm.splice(e,1),this.option.hackFetchOptions&&(t=this.option.hackFetchOptions,-1!==(e=Nm.findIndex(function(e){return e.name===t.name})))&&Nm.splice(e,1),this.option.override=!1}})),Vm={},Id=new s({name:"bridge",override:!1,onNewTdem:function(e){this.override||(this.override=!0,this.overrideBridge(e))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},publishSpeed:function(t,n){this.$walk(function(e){e===n&&e.speedLogPipeline(t)})},overrideBridge:function(l){var c=this,d=l.config,e="object"===T(d.bridge)?d.bridge:undefined,t=null==e?void 0:e.target,e=null==e?void 0:e.methods;t&&null!=e&&e.length&&e.forEach(function(e){var u=t[e];Vm[e]=u,t[e]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0],i=e[1],n=e[2],o=e[3],a=Date.now(),s=c.getFromParam(l);u(r,i,n,function(e){var t=hc(e,d.api),n=t.code,t=t.isErr,n={url:r+"-"+i,name:r+"-"+i,duration:Date.now()-a,type:"bridge",ret:n,isErr:+t,from:s};c.publishSpeed(n,l),o(e)})}})},unHackBridge:function(e){var e="object"===T(e.config.bridge)?e.config.bridge:undefined,t=null==e?void 0:e.target;Vm=(t&&Object.keys(Vm).forEach(function(e){Vm[e]&&(t[e]=Vm[e])}),{})},destroy:function(e){this.option.publishSpeed=function(){},this.option.unHackBridge(e),this.option.override=!1}}),Lt=((Fd=xm=xm||{})[Fd.unknown=100]="unknown",Fd[Fd.wifi=1]="wifi",Fd[Fd.net2g=2]="net2g",Fd[Fd.net3g=3]="net3g",Fd[Fd.net4g=4]="net4g",Fd[Fd.net5g=5]="net5g",Fd[Fd.net6g=6]="net6g",(zt=Tm=Tm||{})[zt.android=1]="android",zt[zt.ios=2]="ios",zt[zt.windows=3]="windows",zt[zt.macos=4]="macos",zt[zt.linux=5]="linux",zt[zt.other=100]="other",(Kd=Mm=Mm||{})[Kd.unknown=100]="unknown",Kd[Kd.normal=0]="normal",Kd[Kd.weak=1]="weak",Kd[Kd.disconnected=2]="disconnected",new s({name:"device",onNewTdem:function(e){e.extendBean("platform",this.getPlatform()),e.extendBean("netType",xm.unknown),this.getDpi(e),this.refreshNetworkTypeToBean(e),this.refreshNetworkStatusToBean(e)},getDpi:function(e){e.extendBean("vp",Math.round(window.innerWidth)+" * "+Math.round(window.innerHeight)),window.screen&&e.extendBean("sr",Math.round(window.screen.width)+" * "+Math.round(window.screen.height))},getPlatform:function(){var t={android:/\bAndroid\s*([^;]+)/,ios:/\b(iPad|iPhone|iPod)\b.*? OS ([\d_]+)/,windows:/\b(Windows NT)/,macos:/\b(Mac OS)/,linux:/\b(Linux)/i},e=Object.keys(t).find(function(e){return t[e].test(navigator.userAgent)});return e?Tm[e]:Tm.other},refreshNetworkTypeToBean:function(t){var n=this,e=t.config;e&&("function"==typeof e.getNetworkType?e.getNetworkType:Gm)(function(e){xm[e]||(e=xm.unknown),t.extendBean("netType",e),n.NetworkRefreshTimer=setTimeout(function(){n.refreshNetworkTypeToBean(t),clearTimeout(n.NetworkRefreshTimer)},1e4)})},refreshNetworkStatusToBean:function(t){var e,n=this,r=t.config;r&&null!=(e="function"==typeof r.getNetworkStatus?r.getNetworkStatus:e)&&e(function(e){Mm[e]===undefined&&(e=Mm.unknown),t.extendBean("netStatus",e),n.NetworkStatusRefreshTimer=setTimeout(function(){n.refreshNetworkStatusToBean(t),clearTimeout(n.NetworkStatusRefreshTimer)},1e4)})}})),Gm=function(e){var t="",n=navigator.userAgent.match(/NetType\/(\w+)/);n?t=n[1]:navigator.connection&&(t=navigator.connection.effectiveType||navigator.connection.type),e((n=t=t||Tl,0<=(n=String(n).toLowerCase()).indexOf("4g")?xm.net4g:0<=n.indexOf("wifi")?xm.wifi:0<=n.indexOf("5g")?xm.net5g:0<=n.indexOf("6g")?xm.net6g:0<=n.indexOf("3g")?xm.net3g:0<=n.indexOf("2g")?xm.net2g:xm.unknown))},Jm=window.WebSocket,$m=[],Zm={construct:function(e,t){var r=new e(t[0],t[1]);return r.originSend=r.send,r.addEventListener("error",function(e){var e=(null==e?void 0:e.currentTarget)||{},t=e.url,n=e.readyState;null!=$m&&$m.forEach(function(e){e=e.onErr;null!=e&&e({msg:"无法获知具体错误信息,需在浏览器控制台查看!",readyState:n,connectUrl:t})})}),Object.defineProperty(r,"send",{get:function(){return function(e){null!=(t=r.originSend)&&t.call(r,e);var t,e=r.readyState;if(e!==WebSocket.OPEN){var n={readyState:e,connectUrl:r.url};switch(e){case WebSocket.CLOSED:$m.forEach(function(e){e=e.sendErr;null!=e&&e(A({msg:"消息发送失败,连接已关闭!"},n))});break;case WebSocket.CONNECTING:$m.forEach(function(e){(0,e.sendErr)(A({msg:"消息发送失败,正在连接中!"},n))});break;case WebSocket.CLOSING:$m.forEach(function(e){(0,e.sendErr)(A({msg:"消息发送失败,连接正在关闭!"},n))})}}}}}),r}},Km=new s({name:"onError"}),Od=Km=new s({name:"onError",onNewTdem:function(e){this.startListen(e)},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},startListen:function(s){var e,t,n,u=this,l=window.onerror,r=(window.onerror=function(e,t,n,r,i){var o,a=gc(e);kd(a)||(a=[{type:(null==i?void 0:i.name)||"Error",value:String(e),mechanism_type:"onerror",mechanism_handled:0}],o=i?Tc(i):[{abs_path:t||"",colno:r||0,filename:(null==t?void 0:t.split("/").pop())||"","function":"(anonymous)",lineno:n||0,in_app:1,stack_level:0}],a={event_id:xc(),event_type:P.JS_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{exception_stacks:a,exception_frames:o,replay_id:_d(s),tags:{environment:s.config.env||"production",version:String(s.config.version||"")}}},null!=(o=s.reportTDEMEvent)&&o.call(s,a)),null!=l&&l.call(window,e,t,n,r,i)},function(e){var t,n=e&&gc(e.reason);n&&(t=[{type:(null==(t=e.reason)?void 0:t.name)||"PromiseRejection",value:(null==(t=e.reason)?void 0:t.message)||String(n),mechanism_type:"unhandledrejection",mechanism_handled:0}],n=e.reason instanceof Error?Tc(e.reason):[],e={event_id:xc(),event_type:P.PROMISE_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{exception_stacks:t,exception_frames:n,replay_id:_d(s),tags:{environment:s.config.env||"production"}}},null!=(t=s.reportTDEMEvent))&&t.call(s,e)}),i=(window.addEventListener("unhandledrejection",r),function(e){e=(null==e?void 0:e.target)||(null==e?void 0:e.srcElement);if(e){var t=e.src||e.href||"",n=e.tagName,n=(void 0===n?"script":n).toLowerCase(),r=["audio","video"].includes(n);if((!r||null!=e&&e.error)&&!(Ec(i=t,s.config.hostUrl)||-1<window.location.href.indexOf(i))){var i="other";if(/\.js$/.test(t)||"script"===n)i="script";else if(/\.css$/.test(t)||"link"===n)i="stylesheet";else if("img"===n)i="image";else{if(!r)return;i="media"}t={event_id:xc(),event_type:P.RESOURCE_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{url:t,resource_type:i,replay_id:_d(s),tags:A({environment:s.config.env||"production"},r&&null!=e&&e.error?{error_code:String(e.error.code),error_message:e.error.message||""}:{}),event_properties:{element_tag:n}}};null!=(i=s.reportTDEMEvent)&&i.call(s,t)}}}),o=(window.document.addEventListener("error",i,!0),s.lifeCycle.on("destroy",function(){0===Km.countInstance()&&(window.removeEventListener("unhandledrejection",r),window.document.removeEventListener("error",i,!0))}),s.config.websocket);(("object"===T(o)?!1!==o.enabled:o)||s.config.websocketHack)&&(o={key:s.config.id+"-"+this.name,onErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,s)},sendErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,s)}},this.hackWebsocketConfig=o,o=this.hackWebsocketConfig,window.Proxy)&&window.WebSocket&&(e=window.WebSocket,window&&!e.isHack&&(t=new Proxy(WebSocket,Zm),e.isHack=!0,window.WebSocket=t),n=o,$m.find(function(e){return e.key===n.key})||n&&$m.push(n))},publishWsErrorLog:function(e,n){var t=e.connectUrl,r=e.msg,e=e.readyState,i={event_id:xc(),event_type:P.JS_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:this.getFromParam(n),data:{exception_stacks:[{type:"WebSocketError",value:"WEBSOCKET_ERROR: connect: "+t+" readyState: "+e+" msg: "+r,mechanism_type:"websocket",mechanism_handled:0}],exception_frames:[],replay_id:_d(n),tags:{environment:n.config.env||"production",websocket_url:t||"",websocket_ready_state:String(null!=e?e:"")}}};this.$walk(function(e){var t;e===n&&null!=(t=e.reportTDEMEvent)&&t.call(e,i)})},destroy:function(){var t,e;this.option.hackWebsocketConfig&&(t=this.option.hackWebsocketConfig,window.WebSocket=Jm,-1!==(e=$m.findIndex(function(e){return e.key===t.key})))&&$m.splice(e,1)}}),Dr=yi.f,Ym=y(Dr),Xm=y([].push),Qm=f&&g(function(){var e=Object.create(null);return e[2]=2,!Ym(e,2)}),l=function(u){return function(e){for(var t,n=Be(e),r=ut(n),i=Qm&&null===cr(n),o=r.length,a=0,s=[];a<o;)t=r[a++],f&&!(i?t in n:Ym(n,t))||Xm(s,u?[t,n[t]]:n[t]);return s}},jd={entries:l(!0),values:l(!1)},eg=jd.entries,tg=(R({target:"Object",stat:!0},{entries:function(e){return eg(e)}}),new s({name:"click"}),function(e){if(""!==e.id&&e.id)return'id("'+e.id+'")';if(e===document.body)return e.tagName;if(e instanceof Document)return"document";var t=0;if(e.parentNode)for(var n=e.parentNode.childNodes,r=0;r<n.length;r+=1){var i=n[r];if(i===e)return tg(e.parentNode)+"/"+e.tagName+"["+(t+1)+"]";1===i.nodeType&&i.tagName===e.tagName&&(t+=1)}return 0}),ng=function(e){return e instanceof Array?new Map(e.map(function(e){return[e,!0]})):new Map},rg=function(e,t){return"string"==typeof e?e.split(t):[]},ig=function(e){if(3===e.nodeType||4===e.nodeType)return e.nodeValue||"";if(1!==e.nodeType)return"";if("string"==typeof e.textContent)return e.textContent;for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=ig(n);return t},r=new s({name:"click",listeners:[],onNewTdem:function(e){this.startListen(e)},startListen:function(a){for(var e=function(o){var e,t,n,r,i;s.listeners.push((e=document,t=o,n=function(e,t){var n,r,i;t&&!function(e,t){e="object"===T((e=e).click)?e.click:undefined,n=ng((null==e?void 0:e.ignoreClasses)||[])||new Map;for(var n,e={ignoreIds:ng((null==e?void 0:e.ignoreIds)||[])||new Map,ignoreClasses:n},r=e.ignoreClasses,i=e.ignoreIds,o=!(0===i.size&&0===r.size),a=t,s=(rg(t.getAttribute("id")||""," "),rg(t.getAttribute("class")||"",""),0),u=!1;a&&o&&a.getAttribute;){if(u)return!0;if(10<=s)break;for(var l=rg(a.getAttribute("id")||""," "),c=rg(a.getAttribute("class")||"",""),d=0,f=l;d<f.length;d++){var h=f[d];if(i.has(h)){u=!0;break}}for(var p=0,m=c;p<m.length;p++){var g=m[p];if(r.has(g)){u=!0;break}}s+=1,a=a.parentNode||a.parentElement}return!1}(a.config,t)&&(i=tg(t),n=function(e){e=function(e){var t="",n=e.nodeType;if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(var r=e.firstChild;r;r=r.nextSibling)t+=ig(e)}else if(3===n||4===n)return e.nodeValue;return t}(e);return e?e.replace(/^\s+|\s+$/g,""):""}(t),r=t.getBoundingClientRect&&t.getBoundingClientRect(),i={event_id:xc(),event_type:P.CLICK,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:window.location.href,data:{target_element:String(i),target_text:n.slice(0,127),click_position:r?{x:parseInt(String(r.left+window.scrollX),10)||0,y:parseInt(String(r.top+window.scrollY),10)||0}:undefined,replay_id:_d(a),tags:{environment:a.config.env||"production",event_op:o,node_name:(null==t?void 0:t.nodeName)||""},event_properties:{target_id:t.id||"",target_class:"string"==typeof t.className?t.className.slice(0,128):""}}},null!=(n=a.reportTDEMEvent))&&n.call(a,i)},void 0===(r=!0)&&(r=!0),i=function(e){var t=document.documentElement;t&&n.call(t,e,e.target)},e.addEventListener(t,i,r),{destroy:function(){e.removeEventListener(t,i,r)}}))},s=this,t=0,n=Object.entries({click:1,longpress:2});t<n.length;t++)e(n[t][0])},destroy:function(){this.listeners.forEach(function(e){return e.destroy()}),this.listeners=[]}}),og=(new s({name:"console"}),["log","error","warn","info","debug","trace"]),ag={log:console.log,error:console.error,warn:console.warn,info:console.info,debug:console.debug,trace:console.trace};var sg,ug,lg,cg,dg,fg,hg,pg,mg,gg,vg,Zd=new s({name:"console",onNewTdem:function(e){this.startListen(e)},startListen:function(e){var f,h;h="object"===T((f=e).config.console)?f.config.console:undefined,og.forEach(function(c){var d=ag[c];console[c]=function(){for(var e,t,n,r,i,o,a,s,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];try{d.apply(console,u),o=c,a=f.isWhiteList,("all"===(s=(null==(s=h)?void 0:s.level)||"error")||a||("error"===s?"error"===o:"warn"===s?"error"===o||"warn"===o:"info"===s?["error","warn","info"].includes(o):"log"===s?["error","warn","info","log"].includes(o):"error"===o))&&(r=u.map(function(e){if("object"===T(e)&&null!==e)try{return JSON.stringify(e)}catch(h){}return String(e)}).join(" "),i={event_id:xc(),event_type:P.LOG,event_category:Rc.LOG,timestamp:Date.now(),page_url:(null==(e=f.getOriginFrom)?void 0:e.call(f))||("undefined"!=typeof window?null==(t=window.location)?void 0:t.href:""),data:{log_level:"error"===c?"error":"warn"===c?"warn":"info",replay_id:_d(f),tags:{console_method:c},event_properties:{message:("console."+c+": "+r).slice(0,2048)}}},null!=(n=f.reportTDEMEvent)&&n.call(f,i))}catch(F){ag.error("Console hook error:",F)}}})},destroy:function(){Object.keys(ag).forEach(function(e){console[e]=ag[e]})}}),yg=(dg={passive:!0,capture:!0},fg=new Date,Fd=function(){cg=[],ug=-1,sg=null,gg(addEventListener)},hg=function(e,t){sg||(sg=t,ug=e,lg=new Date,gg(removeEventListener),pg())},pg=function(){var t;0<=ug&&ug<lg-fg&&(t={entryType:"first-input",name:sg.type,target:sg.target,cancelable:sg.cancelable,startTime:sg.timeStamp,processingStart:sg.timeStamp+ug},cg.forEach(function(e){e(t)}),cg=[])},mg=function(e){var t,n,r,i,o,a;e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){hg(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,dg),removeEventListener("pointercancel",o,dg)},addEventListener("pointerup",i,dg),addEventListener("pointercancel",o,dg)):hg(t,e))},gg=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,mg,dg)})},vg="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",function U(e){"hidden"===document.visibilityState&&(vg=e.timeStamp,removeEventListener("visibilitychange",U,!0))},!0),Fd(),self.webVitals={firstInputPolyfill:function(e){cg.push(e),pg()},resetFirstInputPolyfill:Fd,get firstHiddenTime(){return vg}},function(e,t){var n,r=function(t,n,r,i){var o=function(e){"visibilitychange"===t&&"hidden"!==document.visibilityState||(i?setTimeout(function(){return n(e)},i):n(e),r&&removeEventListener(t,o,!0))};addEventListener(t,o,!0)};r("visibilitychange",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.visibilitychange),r("pagehide",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.pagehide),r("beforeunload",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.beforeunload)});new s({name:"webVitals"});var wg,bg={FCP:-1,LCP:-1,FID:-1,CLS:-1,INP:-1,TTI:-1,from:undefined},kg=(new s({name:"pagePerformance"}),function(e,t,n,r){return void 0===n&&(n=15e3),void 0===r&&(r=0),(t=void 0===t?0:t)<=e&&e<=n?e:r}),Sg=new Map,zt=new s({name:"pagePerformance",performanceMap:{},onNewTdem:function(t){var e;Sd()&&(Sg.set(t,{isPagePerformanceReported:!1}),wg?this.publish(wg,t):this.startCalcPerformance(t),e=this.publishWhenObHidden.bind(this,t),yg(e,{once:!0}),t.lifeCycle.on("destroy",function(){var e=Sg.get(t);e&&(e.isPagePerformanceReported=!1)}))},publishWhenObHidden:function(e){var t,n=Sg.get(e);if(null==n||!n.isPagePerformanceReported){n=0;if(null!=(t=e.firstScreenInfo)&&t.timing)n=e.firstScreenInfo.timing;else if(-1<(null==(t=null==(t=window.PerformanceObserver)?void 0:t.supportedEntryTypes)?void 0:t.indexOf("paint")))try{var r,i=performance.getEntriesByName("first-contentful-paint");i&&0<i.length&&(r=i[0])&&0<r.startTime&&(n=r.startTime)}catch(w){}(wg=this.buildPerformanceLog(e,n,this.getPageUrl(e),window.location.href))&&this.publish(wg,e,!0)}},buildPerformanceLog:function(e,t,n,r){var i=performance.timing;return i?(n={from:n,originFrom:r,dnsLookup:kg(i.domainLookupEnd-i.domainLookupStart),tcp:kg(i.connectEnd-i.connectStart),ssl:kg(0===i.secureConnectionStart?0:i.requestStart-i.secureConnectionStart),ttfb:kg(i.responseStart-i.requestStart),contentDownload:kg(i.responseEnd-i.responseStart),domParse:kg(i.domInteractive-i.domLoading,0,15e3,1070),resourceDownload:kg(i.loadEventStart-i.domInteractive,0,15e3,1070),firstScreenTiming:kg(Math.floor(t),0,15e3,15e3)},(r=e.config).extraPerformanceData&&"{}"!==JSON.stringify(r.extraPerformanceData)&&(t=(i=r.extraPerformanceData).engineInit,e=i.bundleLoad,n=A(A({},n),{engineInit:kg(t,0,1e4),bundleLoad:kg(e,0,1e4)})),n):undefined},publish:function(r,i){this.$walk(function(e){var t,n;e===i&&(t=(n=performance.timing).navigationStart,n={event_id:xc(),event_type:P.PAGE_LOAD,event_category:Rc.PERFORMANCE,timestamp:Date.now(),page_url:r.originFrom||window.location.href,data:{measurements:{lcp:bg.lcp,fcp:bg.fcp,fid:bg.fid,cls:bg.cls,ttfb:bg.ttfb||r.ttfb,dns_time:r.dnsLookup,tcp_time:r.tcp,ssl_time:r.ssl,request_time:r.ttfb,response_time:r.contentDownload,dom_parse_time:r.domParse,dom_ready:n.domContentLoadedEventEnd-t,load_complete:n.loadEventEnd-t,first_screen_time:r.firstScreenTiming},replay_id:_d(e),tags:{environment:e.config.env||"production",version:String(e.config.version||"")}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),n=Sg.get(e))&&(n.isPagePerformanceReported=!0)})},getPageUrl:function(e){var t=this.$getConfig(e);if(null!=t&&t.urlHandler&&"function"==typeof(null==t?void 0:t.urlHandler)){t=null==t?void 0:t.urlHandler();if(t)return encodeURIComponent(t)}return e.getCurrentPageUrl()},startCalcPerformance:function(t){var n=this;try{var r=this.getPageUrl(t),i=t.getOriginFrom();this.getFirstScreenTiming(t,function(e){wg=n.buildPerformanceLog(t,e,r,i);e=Sg.get(t);!wg||null!=e&&e.isPagePerformanceReported||n.publish(wg,t)})}catch(b){}},getFirstScreenTiming:function(e,t){null!=t&&t(0)},setFirstScreenInfo:function(e,t,n,r){var i;e.config.id&&this.performanceMap[e.config.id]||(e.config.id&&(this.performanceMap[e.config.id]=!0),("object"!==T(null==(i=e.config)?void 0:i.pagePerformance)||null!=(i=e.config.pagePerformance)&&i.firstScreenInfo)&&(e.firstScreenInfo={element:n,timing:t,markDoms:r}))},isEleInArray:function(e,t){return!(!e||e===document.documentElement)&&(-1!==t.indexOf(e)||this.isEleInArray(e.parentElement,t))},isInFirstScreen:function(e){var t;return!(!e||"function"!=typeof e.getBoundingClientRect)&&(e=e.getBoundingClientRect(),t=window.innerHeight,0<=e.left)&&e.left<window.innerWidth&&0<=e.top&&e.top<t&&0<e.width&&0<e.height},walkAndCount:function(e){var t=0;if(e&&1===e.nodeType){t+=1;var n=e.children;if(null!=n&&n.length)for(var r=0;r<n.length;r++)1===n[r].nodeType&&(n[r].hasAttribute("TDEM-IGNORE-FIRST-SCREEN-TIMING")||n[r].hasAttribute("AEGIS-IGNORE-FIRST-SCREEN-TIMING"))||(t+=this.walkAndCount(n[r]))}return t},hasAncestorOrSelfWithAttribute:function(e,t){for(var n=t.replace(/^TDEM-/,"AEGIS-"),r=e;r&&r!==document.body;){if(r.hasAttribute(t)||n!==t&&r.hasAttribute(n))return!0;r=r.parentElement}return!1}}),_g=Math.min,Eg=[].lastIndexOf,Cg=!!Eg&&1/[1].lastIndexOf(1,-0)<0,Kd=Ue("lastIndexOf"),Rg=Cg||!Kd?function(e){if(Cg)return xe(Eg,this,arguments)||0;var t=Be(this),n=fe(t);if(0!==n){var r=n-1;for((r=1<arguments.length?_g(r,le(arguments[1])):r)<0&&(r=n+r);0<=r;r--)if(r in t&&t[r]===e)return r||0}return-1}:Eg,Og=(R({target:"Array",proto:!0,forced:Rg!==[].lastIndexOf},{lastIndexOf:Rg}),new s({name:"spa"}),["replaceState","pushState","popstate","hashchange"]),Dr=new s({name:"spa",originFireUrl:"",lastPageUrl:"",navigationStack:[],navigationIndex:-1,onNewTdem:function(n){var r=this,e=(history.pushState=this.wr("pushState")||history.pushState,history.replaceState=this.wr("replaceState")||history.replaceState,this.sendPv=this.sendPv.bind(this),location.href);this.navigationStack.length||(this.navigationStack=[e],this.navigationIndex=0),n.config.spa&&this.sendPv(n,"reload"),Og.forEach(function(e){var t=e;window.addEventListener(e,function(){return r.sendPv.call(r,n,t)})})},wr:function(n){var r=history[n],e="__"+n+"__hasWrittenByTamSpa";return"function"==typeof r&&!history[e]&&(Object.defineProperty(history,e,{value:!0,enumerable:!1}),function(){var e=r.apply(this,arguments),t=null;return"function"==typeof Event?t=new Event(n):(t=document.createEvent("HTMLEvents")).initEvent(n,!1,!0),window.dispatchEvent(t),e})},resolveNavigationType:function(e,t){var n;return"pushState"===e?(this.navigationIndex<this.navigationStack.length-1&&(this.navigationStack=this.navigationStack.slice(0,this.navigationIndex+1)),this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"push"):"replaceState"===e?(this.navigationIndex<0?(this.navigationStack=[t],this.navigationIndex=0):this.navigationStack[this.navigationIndex]=t,"replace"):"hashchange"===e?"hashchange":"popstate"===e?0<=(e=this.navigationStack.lastIndexOf(t))?(n=e<this.navigationIndex?"back":"forward",this.navigationIndex=e,n):(this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"forward"):"reload"},sendPv:function(s,e){var u=this;void 0===e&&(e="reload"),setTimeout(function(){s._customPageUrl=null;var r=location.pathname+location.hash+s.config.id,i=s.getOriginFrom(),o=u.lastPageUrl||undefined,a=u.resolveNavigationType(e,location.href);u.$walk(function(e){var t,n;e===s&&r&&r!==u.originFireUrl&&(n={event_id:xc(),event_type:P.PAGE_VIEW,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:i,data:{page_title:document.title||"",referrer:document.referrer||undefined,is_effective_action:!0,replay_id:_d(e),tags:{environment:e.config.env||"production",version:String(e.config.version||""),is_spa:"true"},event_properties:{navigation_type:a,from_page:(o||"").slice(0,512),to_page:(i||"").slice(0,512)}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),u.originFireUrl=r,u.lastPageUrl=i)})},0)},destroy:function(){this.option.sendPv=function(){}}}),xg="__MONITOR_SESSION_V1__";function Tg(e,t){"undefined"!=typeof document&&(e=[e+"="+encodeURIComponent(t),"path=/","SameSite=Lax"],"undefined"!=typeof location&&"https:"===location.protocol&&e.push("Secure"),document.cookie=e.join("; "))}function Mg(e,t,n){void 0===n&&(n=1);var r=Date.now();return{sessionId:e,createdAt:r,lastActivity:r,source:t,version:n}}function Ig(e,t){var n,r,i;return"undefined"==typeof window?Mg(t(),e):(r="undefined"!=typeof document&&(r="_tdem_s".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)")))?decodeURIComponent(r[1]):null,n=window[xg],r?(null==n?void 0:n.sessionId)===r?(n.lastActivity=Date.now(),n):(i=Mg(r,(null==n?void 0:n.source)||e,(null==n?void 0:n.version)||1),window[xg]=i):null!=n&&n.sessionId?(n.lastActivity=Date.now(),Tg("_tdem_s",n.sessionId),n):(i=Mg(t(),e),Tg("_tdem_s",(window[xg]=i).sessionId),i))}zg.prototype.request=function(o,a){var s=this;return void 0===a&&(a={}),o.sendBeacon||o.handoff?this.handoff(o,a):new Promise(function(n){var e,r,t,i=new XMLHttpRequest;i.sendByTdem=!0,i.addEventListener("readystatechange",function(){var e,t;4===i.readyState&&((e={ok:0<i.status&&i.status<400,status:i.status,statusText:i.statusText,body:i.response,request:o}).ok?(null!=(t=a.success)&&t.call(a,i.response),null!=(t=a["final"])&&t.call(a,e),n(e)):(t=A(A({},e),{error:i.response}),null!=(e=a.fail)&&e.call(a,i.response),null!=(e=a["final"])&&e.call(a,t),n(t)))}),"get"===(o.method||"GET").toLowerCase()?(i.open("get",(e=o.url,r=o.data,"string"!=typeof e?"":"object"===T(r)&&r?(t=Object.getOwnPropertyNames(r).map(function(e){var t=r[e];return e+"="+("string"==typeof t?encodeURIComponent(t):encodeURIComponent(JSON.stringify(t)))}).join("&").replace(/eval/gi,"evaI"),e+(-1===e.indexOf("?")?"?":"&")+t):e)),s.applyHeaders(i,o.headers),i.send()):(i.open("post",o.url),s.applyHeaders(i,o.headers),o.contentType&&i.setRequestHeader("Content-Type",o.contentType),t=o.body!==undefined?o.body:o.data,s.shouldSanitizeEvalKeyword(o,t)&&(t=t.replace(/eval/gi,"evaI")),i.send(t))})},zg.prototype.shouldSanitizeEvalKeyword=function(e,t){return"string"==typeof t&&!("replay"===e.kind||(e=null!=(t=null==(t=e.headers)?void 0:t["Content-Encoding"])?t:null==(t=e.headers)?void 0:t["content-encoding"])&&/gzip/i.test(e))},zg.prototype.handoff=function(e,t){void 0===t&&(t={});var n,r="undefined"!=typeof navigator?navigator:undefined;return r&&"function"==typeof r.sendBeacon?(n=e.body!==undefined?e.body:e.data,r={ok:n=r.sendBeacon(e.url,n),request:e,handoffAccepted:n,error:n?undefined:new Error("navigator.sendBeacon rejected the payload")},n?null!=(n=t.success)&&n.call(t,{accepted:!0}):null!=(n=t.fail)&&n.call(t,r.error),null!=(n=t["final"])&&n.call(t,r),Promise.resolve(r)):(n={ok:!1,request:e,error:new Error("navigator.sendBeacon is unavailable")},null!=(r=t.fail)&&r.call(t,n.error),null!=(e=t["final"])&&e.call(t,n),Promise.resolve(n))},zg.prototype.applyHeaders=function(t,n){n&&Object.keys(n).forEach(function(e){t.setRequestHeader(e,n[e])})};var Ag,Pg,Dg=zg,Lg=new Map,Ng=(wl(Pg=Ug,l=Ag=ld),Pg.prototype=null===l?Object.create(l):(jg.prototype=l.prototype,new jg),Ug.prototype._bootstrapInit=function(e){this.setConfig(e),this.config=El(this.config,e.hostUrl),this._prefetchConfigAndInit(e)},Ug.prototype._initImmediately=function(e){this.init(e),this._afterInit(e)},Ug.prototype._prefetchConfigAndInit=function(a){return bl(this,void 0,void 0,function(){var t,n,r,i,o;return kl(this,function(e){switch(e.label){case 0:if(t=this.config.id,n=this._buildPrefetchConfigUrl(),r=!1,i=null,!t||!n)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transportRequest({kind:"config",url:n,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:t})})];case 2:return(o=e.sent()).ok&&0===(o="string"==typeof o.body?JSON.parse(o.body):o.body).code&&o.data&&(r=!!o.data.enabled,i=o.data),[3,4];case 3:return e.sent(),(o=this._loadPrefetchDataFromCache(t))&&(r=!!o.enabled,i=o),[3,4];case 4:if(r){i&&(this._prefetchedConfigData=i);try{this._initAfterPreparedConfig(a)}catch(L){console.warn(L),console.log("%cThe above error occurred in the process of initializing TDEM, which will affect your normal use of TDEM.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),this.sendSDKError(L)}}else console.info("[TDEM] SDK disabled by remote config, skip initialization");return[2]}})})},Ug.prototype._buildPrefetchConfigUrl=function(){var e=(this.config.url||"").replace(/\/+$/,"");return e?e+"/api/v1/config":""},Ug.prototype._loadPrefetchDataFromCache=function(e){try{var t,n,r=localStorage.getItem("TDEM_SAMPLE_CONFIG");return r?!((t=JSON.parse(r)).projectKey!==e||6048e5<=Date.now()-t.timestamp)&&0<t.sampleRate?(n={enabled:t.remoteEnabled!==undefined?!!t.remoteEnabled:0<t.sampleRate,tdem_sample_rate:t.sampleRate},t.replaySampleRate!==undefined&&(n.replay_sample_rate=t.replaySampleRate),t.errorTraceback!==undefined&&(n.error_traceback=t.errorTraceback),t.errorSampleRate!==undefined&&(n.error_sample_rate=t.errorSampleRate),n):null:null}catch(k0){return null}},Ug.prototype._initAfterPreparedConfig=function(e){for(var t=0;t<ld.installedPlugins.length;t++)try{ld.installedPlugins[t].patch(this)}catch(S){this.sendSDKError(S)}this.lifeCycle.emit("onInited"),this._afterInit(e)},Ug.prototype._afterInit=function(e){var t,o,n=this;this._sdkInitialized=!0,this.extendBean("sessionId",Ug.sessionID),this.extendBean("from",this.getCurrentPageUrl()),"undefined"!=typeof document&&this.extendBean("referer",encodeURIComponent(document.referrer||"")),t=jl(Fl("tdem-web-retry-report-requests"),[]),(o=function(){var i;t.length&&(i=t.splice(0,1)[0],Ul("tdem-web-retry-report-requests",JSON.stringify(t)),n.$request(i,function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=Lg.get(null==(e=i.extraRetryOptions)?void 0:e.success))?void 0:t.apply(i,n)}finally{o()}},function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=Lg.get(null==(e=i.extraRetryOptions)?void 0:e.fail))?void 0:t.apply(i,n)}finally{o()}}))})()},Ug.prototype.getBean=function(t){var n=this;return void 0===t&&(t=[]),""+Object.getOwnPropertyNames(this.bean).filter(function(e){return-1===t.indexOf(e)}).map(function(e){return"from"===e?"from="+n.getCurrentPageUrl():e+"="+n.bean[e]}).join("&")},Ug.prototype.getCurrentPageUrl=function(){var e;return this._customPageUrl?encodeURIComponent(this._customPageUrl.slice(0,2048)):(e=this.config.pageUrl||location.href,e=(e="function"==typeof this.config.urlHandler?this.config.urlHandler()||location.href:e).slice(0,2048),encodeURIComponent(e))},Ug.prototype.getOriginFrom=function(){if(this._customPageUrl)return this._customPageUrl.slice(0,2048);try{return("undefined"!=typeof window&&window.location?window.location.href:"").slice(0,2048)}catch(Pe){return""}},Ug.prototype.ready=function(){var t=this,o=function(){var e,n,r,i;t.reportRequestQueue.length&&(e=t.reportRequestQueue.splice(0,1)[0],n=e.options,r=e.success,i=e.fail,t.$request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==r?void 0:r.apply(n,e)}finally{o()}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==i?void 0:i.apply(n,e)}finally{o()}}))};o(),this.isReportReady=!0},Ug.prototype.request=function(u,n,l){var c,d,f=this;this.config.reportImmediately||this.isReportReady?this.$request(u,c=function(e){var t=jl(Fl("tdem-web-retry-report-requests"),[]);null!=t&&t.length&&u.extraRetryOptions&&(t.splice(t.findIndex(function(e){return e.extraRetryOptions.requestId===u.extraRetryOptions.requestId}),1),Ul("tdem-web-retry-report-requests",JSON.stringify(t)),Lg["delete"](u.extraRetryOptions.success),Lg["delete"](u.extraRetryOptions.fail)),null!=n&&n(e)},d=function(e){if(!f.config.reportRetry)return null==l?void 0:l(e);var t,n="boolean"==typeof f.config.reportRetry?Um:A(A({},Um),f.config.reportRetry),r=n.maxRetryCount,i=void 0===r?Um.maxRetryCount:r,r=n.retryInterval,r=void 0===r?Um.retryInterval:r,n=n.whenRetryEndStillFail,o=void 0===n?Um.whenRetryEndStillFail:n,a=(u.extraRetryOptions||(u.extraRetryOptions={requestId:"",retriedCount:0,success:"",fail:""}),u.extraRetryOptions),s=(a.requestId=a.requestId||u.url+"-"+Date.now()+"-"+Math.random(),a.requestId),n=(a.retriedCount=a.retriedCount||0,a.success=a.success||s+"_successCallback",a.fail=a.fail||s+"_failCallback",jl(Fl("tdem-web-retry-report-requests"),[]));n.find(function(e){return e.extraRetryOptions.requestId===s})?(t=n.findIndex(function(e){return e.extraRetryOptions.requestId===s}),n[t]=u):n.push(u),Ul("tdem-web-retry-report-requests",JSON.stringify(n)),setTimeout(function(){var e;a.retriedCount<i?(u.extraRetryOptions.retriedCount+=1,f.$request(u,c,d)):("discard"===o&&((e=jl(Fl("tdem-web-retry-report-requests"),[]).filter(function(e){return(null==(e=e.extraRetryOptions)?void 0:e.requestId)!==s})).length?Ul("tdem-web-retry-report-requests",JSON.stringify(e)):function(e){try{localStorage.removeItem(e)}catch(k0){}}("tdem-web-retry-report-requests")),Lg["delete"](a.success),Lg["delete"](a.fail))},"function"==typeof r?r(u.extraRetryOptions.retriedCount):r),null!=l&&l(e),Lg.has(a.success)||Lg.set(a.success,c),Lg.has(a.fail)||Lg.set(a.fail,d)}):this.reportRequestQueue.push({options:u,success:n,fail:l})},Ug.prototype.$request=function(s,e,t){var n,r;if(s&&"string"==typeof s.url&&""!==s.url&&this.bean.id)return n=s.url,!1!==s.addBean&&(n=function(e,t){var n,r,i,o=e,a=s.beanFilter||[];for(n in t)-1===a.indexOf(n)&&((i=(r=new RegExp("([?&])"+n+"(=([^&]*))?(?=&|$)")).exec(o))?i[2]&&""!==i[3]&&"undefined"!==i[3]||(o=o.replace(r,"$1"+n+"="+t[n])):(i=-1<o.indexOf("?")?"&":"?",o+=i+n+"="+t[n]));return o}(n,A(A({},this.bean),{from:this.getCurrentPageUrl()}))),s.url=n,n=s.method||"get",r=this.config.onBeforeRequest,(s=r?r(s,this):s)?s.url?(r={success:e,fail:t},void((e={kind:s.type===oc.WHITE_LIST?"config":"events",url:s.url,method:n.toUpperCase(),contentType:s.contentType,data:s.data,body:s.data,sendBeacon:!!(null!=s&&s.sendBeacon||this.sendNow),source:s}).sendBeacon?this.transportHandoff(e,r):this.transportRequest(e,r))):console.warn("Please handle the parameters reasonably, options.url is necessary"):console.warn("Sending request blocked")},Ug.prototype.publishPluginsLogs=function(){var e=Ug.installedPlugins.find(function(e){return"assets"===e.name});null!=e&&e.option.collectNotReportedLog(this)},Ug.prototype.uploadLogs=function(e,t){var n;void 0===e&&(e={}),void 0===t&&(t={}),null!=(n=this.lifeCycle)&&n.emit("uploadLogs",e,t)},Ug.prototype.reportWebVitals=function(e){try{var t=Ug.installedPlugins.find(function(e){return"webVitals"===e.name});t&&this.config.webVitals&&this.config.webVitals.manualReport&&t.option.publish(this,e)}catch(Pe){}},Ug.sessionID=Ig("tdem",Vc).sessionId,Ug),Fd=(new s({name:"ie"}),new s({name:"ie",init:function(){this.overrideTdemSend()},onNewTdem:function(e){this.startListen(e)},startListen:function(o){var a=this,s=window.onerror;window.onerror=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r,i=gc(t[0]);kd(i)||(r={event_id:xc(),event_type:P.JS_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:("undefined"!=typeof window?null==(e=window.location)?void 0:e.href:"")||"",data:{exception_stacks:[{type:"Error",value:String(i||""),mechanism_type:"onerror",mechanism_handled:0}],exception_frames:[{abs_path:String(t[1]||""),colno:Number(t[3])||0,filename:String(t[1]||"").split("/").pop()||"","function":"(anonymous)",lineno:Number(t[2])||0,in_app:1,stack_level:0}]}},a.$walk(function(e){var t;e===o&&null!=(t=e.reportTDEMEvent)&&t.call(e,r)})),null!=s&&s.call.apply(s,Sl([window],t))}},overrideTdemSend:function(){Ng.prototype.request=function(e,t,n){var r,i,o=this;e&&"string"==typeof e.url&&""!==e.url&&this.bean.id&&(r=e.url,!1!==e.addBean&&(r=r+(-1===r.indexOf("?")?"?":"&")+this.getBean(e.beanFilter)),(i=new Image).onload=function(){o.request(e,t,n),null!=t&&t(null)},i.onerror=function(){o.request(e,t,n),null!=n&&n(null)},e.data?i.src=r+"&"+e.data:i.src=r)}},destroy:function(){}})),Kd=(new s({name:"onClose"}),new s({name:"onClose",onNewTdem:function(n){var r,i=this;c.desktop()?(r=window.onunload,window.onunload=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.publishNotReportedLog(n),null!=r&&r.call.apply(r,Sl([window],e))}):yg(this.publishNotReportedLog.bind(this,n),{once:!0})},publishNotReportedLog:function(t){var n=this;this.$walk(function(e){e===t&&(e.sendNow=!0,e.publishPluginsLogs(),n.publishThrottlePipeLogs(e))})},publishThrottlePipeLogs:function(e){null!=e&&e.speedLogPipeline([]),null!=e&&e.tdemEventPipeline([])}})),Fg=void 0;function Ug(e,t){var n,r,i,a,o,s,u,l,c,d,f=Ag.call(this,e,t=void 0===t?{}:t)||this;f.sendNow=!1,f.isReportReady=!1,f.reportRequestQueue=[],f._sdkInitialized=!1,f.speedLogPipeline=rd([(l=[],c=(o=f).config,o.lifeCycle.on("destroy",function(){l.length=0}),function(e,t){Array.isArray(e)?l=l.concat(e):l.push(e),s&&l.length>=s||o.sendNow&&0<l.length?(l=Dc(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length)),u&&clearTimeout(u)):(u&&clearTimeout(u),u=setTimeout(function(){u=null,l=Dc(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length))},c.delay))}),(a=f.config,function(e,t){var n,r,i,o="number"==typeof a.repeat?a.repeat:60;!a.speedSample||o<=0?t(e):(n=(null==a?void 0:a.id)||"0",r=Nc[n]||{},Array.isArray(e)?(i=e.filter(function(e){var t=!r[e.url]||r[e.url]<o;return t?(r[e.url]=1+~~r[e.url],Nc[n]=r):Lc[n]||Fc(n),t})).length&&t(i):!r[e.url]||r[e.url]<o?(r[e.url]=1+~~r[e.url],Nc[n]=r,t(e)):Lc[n]||Fc(n))}),(i=f,function(t,n){Gm(function(e){i.extendBean("netType",e),n(t)})}),function(e,t){null!=(n=f.lifeCycle)&&n.emit("beforeReportSpeed",e);var n,r=f.config.beforeReportSpeed;if((e="function"==typeof r?e.filter(function(e){return!1!==r(e)}):e).length)return t(e)},function(e,t){t(e.map(function(e){return"undefined"!=typeof e.payload&&delete e.payload,e}))},function(e){return f.sendPipeline([function(e,t){t({type:oc.SPEED,url:""+f.config.speedUrl,method:"post",data:Sc(e,A(A({},f.bean),{from:f.getCurrentPageUrl()})),log:e})}],oc.SPEED)(e)}]),f.getInternalTransport()||f.setInternalTransport(new Dg),e.asyncPlugin=!0;try{"undefined"!=typeof document&&(d=String(e.userId||e.uin||(null!=(n=document.cookie.match(/\buin=\D+(\d*)/))?n:[])[1]||(null!=(r=document.cookie.match(/\bilive_uin=\D*(\d+)/))?r:[])[1]||""),e.userId=d,e.uin=e.uin||d),f._bootstrapInit(e)}catch(Ie){console.warn(Ie),console.log("%cThe above error occurred in the process of initializing TDEM, which will affect your normal use of TDEM.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),f.sendSDKError(Ie)}return f}function jg(){this.constructor=Pg}function zg(){}R({target:"Math",stat:!0},{log1p:Fg});Math.log;var l=Math.acosh,Bg=Math.log,Wg=Math.sqrt,Hg=Math.LN2,l=!l||710!==Math.floor(l(Number.MAX_VALUE))||l(Infinity)!==Infinity,l=(R({target:"Math",stat:!0,forced:l},{acosh:function(e){e=+e;return e<1?NaN:94906265.62425156<e?Bg(e)+Hg:Fg(e-1+Wg(e-1)*Wg(1+e))}}),Math.asinh),qg=Math.log,Vg=Math.sqrt,Gg=Math.LN2,l=!(l&&0<1/l(0)),l=(R({target:"Math",stat:!0,forced:l},{asinh:function xO(e){e=+e;return isFinite(e)&&0!=e?e<0?-xO(-e):94906265.62425156<e?qg(e)+Gg:e<1e-8?e:Fg(e+e*e/(1+Vg(e*e+1))):e}}),Math.atanh),l=!(l&&1/l(-0)<0),Jg=(R({target:"Math",stat:!0,forced:l},{atanh:function(e){e=+e;return 0==e?e:Fg(2*e/(1-e))/2}}),void 0),l=(R({target:"Math",stat:!0,forced:Jg!==Math.expm1},{expm1:Jg}),Math.expm1),l=(!l||22025.465794806718<l(10)||l(10)<22025.465794806718||l(-2e-17),Math.cosh),$g=Math.abs,Zg=Math.E,l=!l||l(710)===Infinity,Kg=(R({target:"Math",stat:!0,forced:l},{cosh:function(e){e=Jg($g(e)-1)+1;return(e+1/(e*Zg*Zg))*(Zg/2)}}),Math.abs),Yg=Math.exp,Xg=Math.E,l=g(function(){return-2e-17!==Math.sinh(-2e-17)}),Qg=(R({target:"Math",stat:!0,forced:l},{sinh:function(e){e=+e;return Kg(e)<1?(Jg(e)-Jg(-e))/2:(Yg(e-1)-Yg(-e-1))*(Xg/2)}}),Math.exp),ev=(R({target:"Math",stat:!0},{tanh:function(e){var e=+e,t=Jg(e),n=Jg(-e);return t===Infinity?1:n===Infinity?-1:(t-n)/(Qg(e)+Qg(-e))}}),jd.values);R({target:"Object",stat:!0},{values:function(e){return ev(e)}});var tv,nv,rv,iv=Ft.enforce,ov=Ft.get,l=x.Int8Array,av=l&&l.prototype,jd=x.Uint8ClampedArray,jd=jd&&jd.prototype,sv=l&&cr(l),uv=av&&cr(av),l=Object.prototype,lv=x.TypeError,cv=Ke("toStringTag"),dv=Pt("TYPED_ARRAY_TAG"),fv=n,n=!1,hv={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},pv={BigInt64Array:8,BigUint64Array:8},mv=function(e){var t,e=cr(e);if(O(e))return(t=ov(e))&&I(t,"TypedArrayConstructor")?t.TypedArrayConstructor:mv(e)},gv=function(e){return!!O(e)&&(e=et(e),I(hv,e)||I(pv,e))};for(tv in hv)(rv=(nv=x[tv])&&nv.prototype)?iv(rv).TypedArrayConstructor=nv:fv=!1;for(tv in pv)(rv=(nv=x[tv])&&nv.prototype)&&(iv(rv).TypedArrayConstructor=nv);if((!fv||!_(sv)||sv===Function.prototype)&&(sv=function(){throw new lv("Incorrect invocation")},fv))for(tv in hv)x[tv]&&Cr(x[tv],sv);if((!fv||!uv||uv===l)&&(uv=sv.prototype,fv))for(tv in hv)x[tv]&&Cr(x[tv].prototype,uv);if(fv&&cr(jd)!==uv&&Cr(jd,uv),f&&!I(uv,cv))for(tv in jt(uv,cv,{configurable:n=!0,get:function(){return O(this)?this[dv]:undefined}}),hv)x[tv]&&ot(x[tv].prototype,dv,tv);var D={NATIVE_ARRAY_BUFFER_VIEWS:fv,TYPED_ARRAY_TAG:n&&dv,aTypedArray:function(e){if(gv(e))return e;throw new lv("Target is not a typed array")},aTypedArrayConstructor:function(e){if(!_(e)||Cr&&!_e(sv,e))throw new lv(Ce(e)+" is not a typed array constructor");return e},exportTypedArrayMethod:function(e,t,n,r){if(f){if(n)for(var i in hv){i=x[i];if(i&&I(i.prototype,e))try{delete i.prototype[e]}catch(X){try{i.prototype[e]=t}catch(w){}}}uv[e]&&!n||qt(uv,e,!n&&fv&&av[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(f){if(Cr){if(n)for(r in hv)if((i=x[r])&&I(i,e))try{delete i[e]}catch(X){}if(sv[e]&&!n)return;try{return qt(sv,e,!n&&fv&&sv[e]||t)}catch(X){}}for(r in hv)!(i=x[r])||i[e]&&!n||qt(i,e,t)}},getTypedArrayConstructor:mv,isView:function(e){return!!O(e)&&("DataView"===(e=et(e))||I(hv,e)||I(pv,e))},isTypedArray:gv,TypedArray:sv,TypedArrayPrototype:uv},vv=x.ArrayBuffer,yv=x.Int8Array,wv=!D.NATIVE_ARRAY_BUFFER_VIEWS||!g(function(){yv(1)})||!g(function(){new yv(-1)})||!Iu(function(e){new yv,new yv(null),new yv(1.5),new yv(e)},!0)||g(function(){return 1!==new yv(new vv(2),1,undefined).length}),bv=(R({target:"Number",stat:!0},{isInteger:void 0}),Math.floor,Number.isInteger,RangeError),kv=RangeError,Sv=function(t,e){var n=function(){var e=le(t);if(e<0)throw new bv("The argument can't be less than 0");return e}();if(n%e)throw new kv("Wrong offset");return n},_v=Math.floor,Ev=TypeError,Cv=function(e){e=_o(e,"number");if("number"==typeof e)throw new Ev("Can't convert number to bigint");return BigInt(e)},Rv=D.aTypedArrayConstructor,Ov=function(e){var t=fu(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&Oe(r);var o,a,s,u,l,c,d,f,h=se(e),e=Qr(h);if(e&&!Kr(e))for(f=(d=ti(h,e)).next,h=[];!(c=M(f,d)).done;)h.push(c.value);for(i&&2<n&&(r=Jr(r,arguments[2])),a=fe(h),u=function(e){e=et(e);return"BigInt64Array"===e||"BigUint64Array"===e}(s=new(Rv(t))(a)),o=0;o<a;o++)l=i?r(h[o],o):h[o],s[o]=u?Cv(l):+l;return s},xv=function(e,t,n){for(var r=0,i=2<arguments.length?n:fe(t),o=new e(i);r<i;)o[r]=t[r++];return o},l=He(function(e){var r=Yn.f,u=mi.forEach,h=Ft.get,p=Ft.set,m=Ft.enforce,g=it.f,n=or.f,v=x.RangeError,y=Jo.ArrayBuffer,t=y.prototype,w=Jo.DataView,b=D.NATIVE_ARRAY_BUFFER_VIEWS,k=D.TYPED_ARRAY_TAG,S=D.TypedArray,_=D.TypedArrayPrototype,E=D.isTypedArray,i=function(e,t){jt(e,t,{configurable:!0,get:function(){return h(this)[t]}})},C=function(e){return _e(t,e)||"ArrayBuffer"===(e=et(e))||"SharedArrayBuffer"===e},o=function(e,t){return E(e)&&!Zi(t)&&t in e&&(void 0)(+t)&&0<=t},a=function(e,t){return t=_i(t),o(e,t)?rt(2,e[t]):n(e,t)},s=function(e,t,n){return t=_i(t),!(o(e,t)&&O(n)&&I(n,"value"))||I(n,"get")||I(n,"set")||n.configurable||I(n,"writable")&&!n.writable||I(n,"enumerable")&&!n.enumerable?g(e,t,n):(e[t]=n.value,e)};f?(b||(or.f=a,it.f=s,i(_,"buffer"),i(_,"byteOffset"),i(_,"byteLength"),i(_,"length")),R({target:"Object",stat:!0,forced:!b},{getOwnPropertyDescriptor:a,defineProperty:s}),e.exports=function(e,t,i){var l=e.match(/\d+/)[0]/8,n=e+(i?"Clamped":"")+"Array",o="get"+e,a="set"+e,s=x[n],c=s,d=c&&c.prototype,e={},f=function(e,r){g(e,r,{get:function(){var e=this,t=r;return(e=h(e)).view[o](t*l+e.byteOffset,!0)},set:function(e){var t,n;t=r,e=e,(n=h(n=this)).view[a](t*l+n.byteOffset,i?(t=+e)!=t||t<=0?0:255<=t?255:!((n=_v(t))+.5<t)&&(t<n+.5||n%2==0)?n:n+1:e,!0)},enumerable:!0})},t=(b?wv&&(c=t(function(e,t,n,r){return lr(e,d),la(O(t)?C(t)?r!==undefined?new s(t,Sv(n,l),r):n!==undefined?new s(t,Sv(n,l)):new s(t):E(t)?xv(c,t):M(Ov,c,t):new s(ta(t)),e,c)}),Cr&&Cr(c,S),u(r(s),function(e){e in c||ot(c,e,s[e])}),c.prototype=d):(c=t(function(e,t,n,r){lr(e,d);var i,o,a=0,s=0;if(O(t)){if(!C(t))return E(t)?xv(c,t):M(Ov,c,t);var u=t,s=Sv(n,l),n=t.byteLength;if(r===undefined){if(n%l)throw new v("Wrong length");if((i=n-s)<0)throw new v("Wrong length")}else if((i=ta(r)*l)+s>n)throw new v("Wrong length");o=i/l}else o=ta(t),u=new y(i=o*l);for(p(e,{buffer:u,byteOffset:s,byteLength:i,length:o,view:new w(u)});a<o;)f(e,a++)}),Cr&&Cr(c,S),d=c.prototype=Et(_)),d.constructor!==c&&ot(d,"constructor",c),m(d).TypedArrayConstructor=c,k&&ot(d,k,n),c!==s);e[n]=c,R({global:!0,constructor:!0,forced:t,sham:!b},e),"BYTES_PER_ELEMENT"in c||ot(c,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in d||ot(d,"BYTES_PER_ELEMENT",l),Ma(n)}):e.exports=function(){}}),Tv=(l("Float32",function(r){return function(e,t,n){return r(this,e,t,n)}}),l("Uint8",function(r){return function(e,t,n){return r(this,e,t,n)}}),R({target:"Array",proto:!0},{copyWithin:void 0}),tr("copyWithin"),Math.min,y(void 0)),Mv=D.aTypedArray,Iv=((0,D.exportTypedArrayMethod)("copyWithin",function(e,t){return Tv(Mv(this),e,t,2<arguments.length?arguments[2]:undefined)}),Fr("every",TypeError)),Av=(R({target:"Iterator",proto:!0,real:!0,forced:Iv},{every:function(n){E(this);try{Oe(n)}catch(X){ni(this,"throw",X)}var e,r;return Iv?M(Iv,this,n):(e=si(this),!ai(e,function(e,t){if(!n(e,r++))return t()},{IS_RECORD:!(r=0),INTERRUPTED:!0}).stopped)}}),mi.every),jd=Ue("every"),Pv=(R({target:"Array",proto:!0,forced:!jd},{every:function(e){return Av(this,e,1<arguments.length?arguments[1]:undefined)}}),mi.every),Dv=D.aTypedArray,Lv=((0,D.exportTypedArrayMethod)("every",function(e){return Pv(Dv(this),e,1<arguments.length?arguments[1]:undefined)}),l("Int8",function(r){return function(e,t,n){return r(this,e,t,n)}}),D.getTypedArrayConstructor),Nv=function(e,t){return xv(Lv(e),t)},Fv=mi.filter,Uv=D.aTypedArray,jv=((0,D.exportTypedArrayMethod)("filter",function(e){e=Fv(Uv(this),e,1<arguments.length?arguments[1]:undefined);return Nv(this,e)}),mi.find),zv=D.aTypedArray,Bv=((0,D.exportTypedArrayMethod)("find",function(e){return jv(zv(this),e,1<arguments.length?arguments[1]:undefined)}),mi.findIndex),Wv=D.aTypedArray,Hv=((0,D.exportTypedArrayMethod)("findIndex",function(e){return Bv(Wv(this),e,1<arguments.length?arguments[1]:undefined)}),mi.forEach),qv=D.aTypedArray,Vv=((0,D.exportTypedArrayMethod)("forEach",function(e){Hv(qv(this),e,1<arguments.length?arguments[1]:undefined)}),t.includes),Gv=D.aTypedArray,Jv=((0,D.exportTypedArrayMethod)("includes",function(e){return Vv(Gv(this),e,1<arguments.length?arguments[1]:undefined)}),t.indexOf),$v=D.aTypedArray,Zv=((0,D.exportTypedArrayMethod)("indexOf",function(e){return Jv($v(this),e,1<arguments.length?arguments[1]:undefined)}),Ke("iterator")),cv=x.Uint8Array,Kv=y(yr.values),Yv=y(yr.keys),Xv=y(yr.entries),Qv=D.aTypedArray,n=D.exportTypedArrayMethod,ey=cv&&cv.prototype,tr=!g(function(){ey[Zv].call([1])}),Fr=!!ey&&ey.values&&ey[Zv]===ey.values&&"values"===ey.values.name,Ue=function(){return Kv(Qv(this))},ty=(n("entries",function(){return Xv(Qv(this))},tr),n("keys",function(){return Yv(Qv(this))},tr),n("values",Ue,tr||!Fr,{name:"values"}),n(Zv,Ue,tr||!Fr,{name:"values"}),D.aTypedArray),jd=D.exportTypedArrayMethod,ny=y([].join),ry=(jd("join",function(e){return ny(ty(this),e)}),D.aTypedArray),iy=((0,D.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return xe(Rg,ry(this),1<t?[e,arguments[1]]:[e])}),mi.map),oy=D.aTypedArray,ay=((0,D.exportTypedArrayMethod)("map",function(e){e=iy(oy(this),e,1<arguments.length?arguments[1]:undefined);return Nv(this,e)}),Te.left),sy=D.aTypedArray,uy=((0,D.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return ay(sy(this),e,t,1<t?arguments[1]:undefined)}),Te.right),ly=D.aTypedArray,cy=((0,D.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return uy(ly(this),e,t,1<t?arguments[1]:undefined)}),D.aTypedArray),t=D.exportTypedArrayMethod,dy=Math.floor,fy=(t("reverse",function(){for(var e,t=cy(this).length,n=dy(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this}),l("Uint8",function(r){return function(e,t,n){return r(this,e,t,n)}},!0),mi.some),hy=D.aTypedArray,py=((0,D.exportTypedArrayMethod)("some",function(e){return fy(hy(this),e,1<arguments.length?arguments[1]:undefined)}),D.aTypedArray),cv=D.exportTypedArrayMethod,my=x.Uint16Array,gy=my&&st(my.prototype.sort),Ue=!(!gy||g(function(){gy(new my(2),null)})&&g(function(){gy(new my(2),{})})),vy=!!gy&&!g(function(){if(qn)return qn<74;if(qf)return qf<67;if(Vf)return!0;if(Gf)return Gf<602;for(var e,t=new my(516),n=Array(516),r=0;r<516;r++)e=r%4,t[r]=515-r,n[r]=r-2*e+3;for(gy(t,function(e,t){return(e/4|0)-(t/4|0)}),r=0;r<516;r++)if(t[r]!==n[r])return!0}),yy=(cv("sort",function(e){return e!==undefined&&Oe(e),vy?gy(this,e):Hf(py(this),(n=e,function(e,t){return n!==undefined?+n(e,t)||0:t!=t?e!=e?0:-1:e!=e?1:0===e&&0===t?0<1/e?0<1/t?0:1:0<1/t?-1:0:t<e?1:e<t?-1:0}));var n},!vy||Ue),D.aTypedArray),wy=D.getTypedArrayConstructor,by=((0,D.exportTypedArrayMethod)("subarray",function(e,t){var n=yy(this),r=n.length,e=dt(e,r);return new(wy(n))(n.buffer,n.byteOffset+e*n.BYTES_PER_ELEMENT,de((t===undefined?r:dt(t,r))-e))}),x.Int8Array),ky=D.aTypedArray,tr=D.exportTypedArrayMethod,Sy=[].toLocaleString,_y=!!by&&g(function(){Sy.call(new by(1))}),Fr=(tr("toLocaleString",function(){return xe(Sy,_y?Jn(ky(this)):ky(this),Jn(arguments))},g(function(){return[1,2].toLocaleString()!==new by([1,2]).toLocaleString()})||!g(function(){by.prototype.toLocaleString.call([1,2])})),D.exportTypedArrayMethod),n=x.Uint8Array,jd=n&&n.prototype||{},Ey=[].toString,Cy=y([].join),Te=(g(function(){Ey.call({})})&&(Ey=function(){return Cy(this)}),jd.toString!==Ey),Ry=(Fr("toString",Ey,Te),D.aTypedArray),Oy=D.getTypedArrayConstructor,xy=((0,D.exportTypedArrayMethod)("slice",function(e,t){for(var n=Jn(Ry(this),e,t),e=Oy(this),r=0,i=n.length,o=new e(i);r<i;)o[r]=n[r++];return o},g(function(){new Int8Array(1).slice()})),x.RangeError),Ty=x.Int8Array,t=Ty&&Ty.prototype,My=t&&t.set,Iy=D.aTypedArray,Ue=D.exportTypedArrayMethod,Ay=!g(function(){var e=new Uint8ClampedArray(2);return M(My,e,{length:1,0:3},1),3!==e[1]}),cv=Ay&&D.NATIVE_ARRAY_BUFFER_VIEWS&&g(function(){var e=new Ty(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}),Py=(Ue("set",function(e){Iy(this);var t=Sv(1<arguments.length?arguments[1]:undefined,1),n=se(e);if(Ay)return M(My,this,n,t);var e=this.length,r=fe(n),i=0;if(e<r+t)throw new xy("Wrong length");for(;i<r;)this[t+i]=n[i++]},!Ay||cv),D.aTypedArray),tr=D.exportTypedArrayMethod,Dy=y("".slice);tr("fill",function(e){var t=arguments.length,e=(Py(this),"Big"===Dy(et(this),0,3)?Cv(e):+e);return M(ua,this,e,1<t?arguments[1]:undefined,2<t?arguments[2]:undefined)},g(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})),new s({name:"aid"});var n=or.f,Ly=st("".slice),Ny=Math.min,jd=qr("startsWith"),Fr=!(jd||!(Te=n(String.prototype,"startsWith"))||Te.writable);function Fy(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}R({target:"String",proto:!0,forced:!Fr&&!jd},{startsWith:function(e){var t=C(oe(this)),e=(eo(e),C(e)),n=de(Ny(1<arguments.length?arguments[1]:undefined,t.length));return Ly(t,n,n+e.length)===e}});By.generate=function(){return"rep_"+this.uuid32()},By.uuid32=function(){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/x/g,function(){return Math.floor(16*Math.random()).toString(16)})};var Uy=By,jy="[SessionReplay]",zy=!1;function By(){}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];zy&&console.log.apply(console,Sl([jy+"["+e+"]"],t))}function Wy(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];zy&&console.debug.apply(console,Sl([jy+"["+e+"]"],t))}function Hy(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];zy&&console.log.apply(console,Sl([jy+"["+e+"] WARN:"],t))}function qy(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];zy&&console.log.apply(console,Sl([jy+"["+e+"] ERROR:"],t))}Zy.prototype.setTdemInstance=function(e){this.tdemInstance=e},Zy.prototype.createSession=function(e){void 0===e&&(e="session");var t=null==(t=this.session)?void 0:t.replayId,n=Ig("tdem",Fy),n=A({id:n.sessionId,replayId:Uy.generate(),started:Date.now(),lastActivity:Date.now(),segmentId:0,sampled:e},t?{previousReplayId:t}:{});return this.session=n,this.syncSharedSession(n.id),h("SessionManager","Document replay session created:",n.id,n.replayId),n},Zy.prototype.restoreSession=function(){return this.session},Zy.prototype.saveSession=function(){},Zy.prototype.refreshSession=function(){var e=null!=(e=null==(e=this.session)?void 0:e.sampled)?e:"session";return this.createSession(e)},Zy.prototype.updateActivity=function(){this.session&&(this.session.lastActivity=Date.now())},Zy.prototype.incrementSegmentId=function(){var e;return this.session?(e=this.session.segmentId,this.session.segmentId+=1,e):0},Zy.prototype.shouldRefreshSession=function(){return!1},Zy.prototype.getSession=function(){return this.session},Zy.prototype.getSessionId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.id)?e:""},Zy.prototype.getReplayId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.replayId)?e:""},Zy.prototype.clearSession=function(){var e;this.session=null;try{null!=(e=window.sessionStorage)&&e.removeItem("tdem_session")}catch(m){}},Zy.prototype.syncSharedSession=function(e){var t,n,r;this.tdemInstance&&this.tdemInstance.extendBean("sessionId",e),e=e,"undefined"!=typeof window&&(t=Date.now(),(n=window[xg])?(r=n.sessionId!==e,n.sessionId=e,n.version=r?n.version+1:n.version,n.source="tdem",r&&(n.createdAt=t),n.lastActivity=t):window[xg]=Mg(e,"tdem"),Tg("_tdem_s",e),window.dispatchEvent(new CustomEvent("monitor-session-update",{detail:{sessionId:e,source:"tdem"}})))};var Vy=Zy,Gy=((t={})[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.Asset=7]="Asset",t),Jy=($y.prototype.ensureReady=function(){return bl(this,void 0,void 0,function(){return kl(this,function(e){return[2,this.ready]})})},$y.prototype.postMessage=function(n,r){var i=this,o=this.nextId++;return new Promise(function(e,t){i.pendingRequests.set(o,{resolve:e,reject:t}),i.worker.postMessage({id:o,method:n,arg:r})})},$y.prototype.destroy=function(){this.pendingRequests.forEach(function(e){return(0,e.reject)(new Error("Worker destroyed"))}),this.pendingRequests.clear(),this.worker.terminate()},$y);function $y(e){var o=this;this.nextId=0,this.pendingRequests=new Map,this.worker=e,this.worker.addEventListener("message",function(e){var e=e.data,t=e.id,n=e.success,r=e.response;"init"!==e.method&&(e=o.pendingRequests.get(t))&&(o.pendingRequests["delete"](t),n?e.resolve(r):e.reject(new Error(r||"Worker request failed")))}),this.ready=new Promise(function(t,n){var r=function(e){e=e.data;"init"===e.method&&e.success&&(o.worker.removeEventListener("message",r),clearTimeout(i),t())},i=(o.worker.addEventListener("message",r),o.worker.addEventListener("error",function(e){o.worker.removeEventListener("message",r),clearTimeout(i),n(new Error("Worker error: "+(e.message||"unknown")))}),setTimeout(function(){o.worker.removeEventListener("message",r),n(new Error("Worker init timeout (5s)"))},5e3))})}function Zy(e){this.session=null,this.tdemInstance=null}Yy.prototype.initWorker=function(){var t=this,e=function(){try{var e,t,n;return"undefined"==typeof Worker||"undefined"==typeof Blob||"undefined"==typeof URL?null:(e=new Blob(["\n(function() {\n var events = [];\n var totalSize = 0;\n\n function handleMessage(data) {\n var method = data.method;\n var id = data.id;\n\n switch (method) {\n case 'addEvent':\n events.push(data.arg);\n totalSize += data.arg.length;\n return { id: id, method: method, success: true, response: totalSize };\n\n case 'finish':\n var json = '[' + events.join(',') + ']';\n events = [];\n totalSize = 0;\n // 返回原始 JSON 字符串,压缩在主线程做(pako 不好内联到 worker)\n return { id: id, method: method, success: true, response: json };\n\n case 'clear':\n events = [];\n totalSize = 0;\n return { id: id, method: method, success: true, response: void 0 };\n\n default:\n return { id: id, method: method, success: false, response: 'Unknown method' };\n }\n }\n\n self.addEventListener('message', function(e) {\n try {\n var result = handleMessage(e.data);\n self.postMessage(result);\n } catch (err) {\n self.postMessage({\n id: e.data.id,\n method: e.data.method,\n success: false,\n response: err.message || 'Worker error'\n });\n }\n });\n\n // 就绪信号\n self.postMessage({ method: 'init', success: true });\n})();\n"],{type:"application/javascript"}),t=URL.createObjectURL(e),n=new Worker(t,{name:"tdem-replay-compressor"}),URL.revokeObjectURL(t),h("CompressionWorker","Worker created successfully"),new Jy(n))}catch(v){return Hy("CompressionWorker","Failed to create worker, will fallback to sync buffer:",v),null}}();e?(this.workerHandler=e,this.useWorker=!0,e.ensureReady().then(function(){t.workerReady=!0,h("EventBuffer","Worker ready, migrating buffered events"),t.migrateEventsToWorker()})["catch"](function(e){Hy("EventBuffer","Worker init failed, falling back to sync buffer:",e),t.useWorker=!1,t.workerHandler=null})):h("EventBuffer","Worker not available, using sync buffer")},Yy.prototype.migrateEventsToWorker=function(){if(this.workerHandler&&this.workerReady){var e=this.events;this.events=[];for(var t=0,n=e;t<n.length;t++){var r=n[t];this.addEventToWorker(r)}this.currentSize=0}},Yy.prototype.addEventToWorker=function(e){if(this.workerHandler)try{var t=JSON.stringify(e);this.workerHandler.postMessage("addEvent",t),this.workerEventCount++,this.workerSize+=t.length}catch(S){Hy("EventBuffer","Failed to send event to worker:",S)}},Yy.prototype.addEvent=function(e){var t;this.useWorker&&this.workerReady&&this.workerHandler?(t=this.estimateEventSize(e),this.workerSize+t>this.config.maxSize&&(Hy("EventBuffer","Worker buffer size limit exceeded, dropping old events"),this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0),this.addEventToWorker(e)):(t=this.estimateEventSize(e),this.currentSize+t>this.config.maxSize&&(Hy("EventBuffer","Size limit exceeded, removing old events"),this.trimOldEvents(t)),this.events.push(e),this.currentSize+=t)},Yy.prototype.getEvents=function(){return Sl(this.events)},Yy.prototype.getEventCount=function(){return this.useWorker&&this.workerReady?this.workerEventCount+this.events.length:this.events.length},Yy.prototype.getSize=function(){return this.useWorker&&this.workerReady?this.workerSize+this.currentSize:this.currentSize},Yy.prototype.isEmpty=function(){return!(this.useWorker&&this.workerReady&&0!==this.workerEventCount||0!==this.events.length)},Yy.prototype.finishAsync=function(){return bl(this,void 0,void 0,function(){var t,n,r;return kl(this,function(e){switch(e.label){case 0:if(!(this.useWorker&&this.workerReady&&this.workerHandler&&0<this.workerEventCount))return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.workerHandler.postMessage("finish")];case 2:return t=e.sent(),r=this.workerEventCount,n=this.workerSize,this.workerEventCount=0,this.workerSize=0,[2,{events:[],eventCount:r,uncompressedSize:n,eventsJson:t}];case 3:return Hy("EventBuffer","Worker finish failed, falling back to sync:",e.sent()),[3,4];case 4:return[2,{events:r=this.getEvents(),eventCount:r.length,uncompressedSize:this.currentSize}]}})})},Yy.prototype.finish=function(){var e=this.getEvents();return{events:e,eventCount:e.length,uncompressedSize:this.currentSize}},Yy.prototype.clear=function(){this.events=[],this.currentSize=0,this.useWorker&&this.workerHandler&&(this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0)},Yy.prototype.destroy=function(){this.clear(),this.workerHandler&&(this.workerHandler.destroy(),this.workerHandler=null),this.useWorker=!1,this.workerReady=!1},Yy.prototype.estimateEventSize=function(e){try{return JSON.stringify(e).length}catch(k0){return 1024}},Yy.prototype.trimOldEvents=function(e){for(var t=-1,n=this.events.length-1;0<=n;n--)if(this.events[n].type===Gy.FullSnapshot){t=n;break}var r=t;if(0<r)for(n=r-1;0<=n;n--)if(this.events[n].type===Gy.Meta){r=n;break}for(var i,o=0,a=Math.max(e,.2*this.config.maxSize),s=0;s<r&&o<a;)s++,(i=this.events.shift())&&(o+=this.estimateEventSize(i));if(r<0)for(;0<this.events.length&&o<a;)(i=this.events.shift())&&(o+=this.estimateEventSize(i));this.currentSize=Math.max(0,this.currentSize-o)},Yy.prototype.hasCheckout=function(){return this.events.some(function(e){return e.type===Gy.Meta||e.type===Gy.FullSnapshot})},Yy.prototype.getLastCheckoutTime=function(){for(var e=this.events.length-1;0<=e;e--){var t=this.events[e];if(t.type===Gy.FullSnapshot)return t.timestamp}return null},Yy.prototype.isUsingWorker=function(){return this.useWorker&&this.workerReady};var Ky=Yy;function Yy(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this.events=[],this.currentSize=0,this.workerHandler=null,this.useWorker=!1,this.workerReady=!1,this.workerEventCount=0,this.workerSize=0,this.config={maxSize:null!=(e=e.maxSize)?e:5242880},t&&this.initWorker()}Si("toStringTag"),vr(Se("Symbol"),"Symbol"),vr(x.JSON,"JSON",!0),vr(Math,"Math",!0),R({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Xy=i.trim,Qy=y("".charAt),e0=x.parseFloat,cv=x.Symbol,t0=cv&&cv.iterator,Ue=1/e0(Oo+"-0")!=-Infinity||t0&&!g(function(){e0(Object(t0))})?function(e){var e=Xy(C(e)),t=e0(e);return 0===t&&"-"===Qy(e,0)?-0:t}:e0,n0=(R({target:"Number",stat:!0,forced:Number.parseFloat!==Ue},{parseFloat:Ue}),Se("Reflect","construct")),r0=Object.prototype,i0=[].push,o0=g(function(){function e(){}return!(n0(function(){},[],e)instanceof e)}),a0=!g(function(){n0(function(){})}),tr=o0||a0,s0=(R({target:"Reflect",stat:!0,forced:tr,sham:tr},{construct:function(e,t){fu(e);var n=arguments.length<3?e:fu(arguments[2]);if(E(t),a0&&!o0)return n0(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return xe(i0,r,t),new(xe(Os,e,r))}r=n.prototype,n=Et(O(r)?r:r0),r=xe(e,n,t);return O(r)?r:n}}),function(e,t,n){var r,i;return E(e)===n?e[t]:(r=or.f(e,t))?(i=r)!==undefined&&(I(i,"value")||I(i,"writable"))?r.value:r.get===undefined?undefined:M(r.get,n):(i=cr(e),O(i)?s0(i,t,n):void 0)}),n=(R({target:"Reflect",stat:!0},{get:function(e,t){return s0(E(e),_i(t),arguments.length<3?e:arguments[2])}}),or.f),u0=st("".slice),l0=Math.min,Te=qr("endsWith"),jd=!(Te||!(Fr=n(String.prototype,"endsWith"))||Fr.writable),c0=(R({target:"String",proto:!0,forced:!jd&&!Te},{endsWith:function(e){var t=C(oe(this)),e=(eo(e),C(e)),n=1<arguments.length?arguments[1]:undefined,r=t.length,n=n===undefined?r:l0(de(n),r);return u0(t,n-e.length,n)===e}}),y("".replace),R({target:"String",proto:!0,forced:g(function(){var e="".bold('"');return e!==e.toLowerCase()||3<e.split('"').length})},{bold:function(){return 0,"<b"+">"+C(oe(this))+"</b>"}}),l("Float64",function(r){return function(e,t,n){return r(this,e,t,n)}}),l("Int16",function(r){return function(e,t,n){return r(this,e,t,n)}}),l("Int32",function(r){return function(e,t,n){return r(this,e,t,n)}}),l("Uint16",function(r){return function(e,t,n){return r(this,e,t,n)}}),l("Uint32",function(r){return function(e,t,n){return r(this,e,t,n)}}),Object.isFrozen),t=Ia||g(function(){c0(1)}),d0=(R({target:"Object",stat:!0,forced:t},{isFrozen:function(e){return!O(e)||!(!Ia||"ArrayBuffer"!==te(e))||!!c0&&c0(e)}}),Object.isSealed),i=Ia||g(function(){d0(1)}),f0=(R({target:"Object",stat:!0,forced:i},{isSealed:function(e){return!O(e)||!(!Ia||"ArrayBuffer"!==te(e))||!!d0&&d0(e)}}),Ua.onFreeze),h0=Object.seal,cv=g(function(){h0(1)});R({target:"Object",stat:!0,forced:cv,sham:!0},{seal:function(e){return h0&&O(e)?h0(f0(e)):e}});var p0,m0,g0,v0,y0=Ft.enforce,Ue=Object,w0=(Array.isArray,Ue.isExtensible),tr=!x.ActiveXObject&&"ActiveXObject"in x,st=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},qr=e("WeakMap",st,a),n=qr.prototype,b0=y(n.set);Me&&tr&&(p0=a.getConstructor(st,"WeakMap",!0),Ua.enable(),m0=y(n["delete"]),g0=y(n.has),v0=y(n.get),Qo(n,{"delete":function(e){var t;return O(e)&&!w0(e)?((t=y0(this)).frozen||(t.frozen=new p0),m0(this,e)||t.frozen["delete"](e)):m0(this,e)},has:function(e){var t;return O(e)&&!w0(e)?((t=y0(this)).frozen||(t.frozen=new p0),g0(this,e)||t.frozen.has(e)):g0(this,e)},get:function(e){var t;return!O(e)||w0(e)||((t=y0(this)).frozen||(t.frozen=new p0),g0(this,e))?v0(this,e):t.frozen.get(e)},set:function(e,t){var n;return!O(e)||w0(e)||((n=y0(this)).frozen||(n.frozen=new p0),g0(this,e))?b0(this,e,t):n.frozen.set(e,t),this}}));var k0,S0=["inputs"],_0=["inputId"],E0=["inputs"],C0=["inputId"],R0=["type"],O0=Object.defineProperty,p=function(e,t,n){return e=e,t="symbol"!==T(t)?t+"":t,n=n,t in e?O0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},x0=Object.defineProperty,T0=function(e,t,n){return e=e,t="symbol"!==T(t)?t+"":t,n=n,t in e?x0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},M0=((Fr=M0||{})[Fr.Document=0]="Document",Fr[Fr.DocumentType=1]="DocumentType",Fr[Fr.Element=2]="Element",Fr[Fr.Text=3]="Text",Fr[Fr.CDATA=4]="CDATA",Fr[Fr.Comment=5]="Comment",Fr),I0={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},A0={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},P0={},D0={};function L0(e){if(P0[e])return P0[e];var t=globalThis[e],n=t.prototype,r=e in I0?I0[e]:void 0,r=Boolean(r&&r.every(function(e){return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),i=e in A0?A0[e]:void 0,i=Boolean(i&&i.every(function(e){return"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))}));if(r&&i&&!globalThis.Zone)return P0[e]=t.prototype,t.prototype;try{var o,a,s=document.createElement("iframe"),u=(s.style.display="none",document.body.appendChild(s),s.contentWindow);return u?(o=u[e].prototype)?((a=navigator.userAgent).includes("Safari")&&!a.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),D0[e]=function(){return s.remove()}):s.remove(),P0[e]=o):(s.remove(),n):t.prototype}catch(F){return n}}var N0={};function F0(e,t,n){var r="".concat(e,".").concat(String(n));return N0[r]?N0[r].call(t):(e=L0(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(N0[r]=e).call(t):t[n])}var U0={};function j0(e,t,n){var r="".concat(e,".").concat(String(n));return U0[r]?U0[r].bind(t):"function"!=typeof(e=L0(e)[n])?t[n]:(U0[r]=e).bind(t)}var jd=Date.now,z0={ownerDocument:function(e){return F0("Node",e,"ownerDocument")},childNodes:function(e){return F0("Node",e,"childNodes")},parentNode:function(e){return F0("Node",e,"parentNode")},parentElement:function(e){return F0("Node",e,"parentElement")},textContent:function(e){return F0("Node",e,"textContent")},contains:function(e,t){return j0("Node",e,"contains")(t)},getRootNode:function(e){return j0("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?F0("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?F0("Element",e,"shadowRoot"):null},querySelector:function(e,t){return F0("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return F0("Element",e,"querySelectorAll")(t)},nowTimestamp:jd=/[1-9][0-9]{12}/.test(Date.now().toString())?jd:function(){return(new Date).getTime()},mutationObserverCtor:function(){var e;return[L0("MutationObserver").constructor,null!=(e=D0.MutationObserver)?e:function(){}]},patch:function(e,t,n){try{var r,i;return t in e?("function"==typeof(i=n(r=e[t]))&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}):function(){}}catch(De){return function(){}}}};function B0(e){return e.nodeType===e.ELEMENT_NODE}function W0(e){var t=e&&"host"in e&&"mode"in e&&z0.host(e)||null;return Boolean(t&&"shadowRoot"in t&&z0.shadowRoot(t)===e)}function H0(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function q0(e){try{var t,n=e.rules||e.cssRules;return n?(!(t=e.href)&&e.ownerNode&&(t=e.ownerNode.baseURI),r=(r=Array.from(n,function(e){return V0(e,t)}).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")?r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"):r):null}catch(X){return null}var r}function V0(e,t){if("styleSheet"in e){var n;try{n=q0(e.styleSheet)||((r=(i=e).cssText).split('"').length<3?r:(r=["@import","url(".concat(JSON.stringify(i.href),")")],""===i.layerName?r.push("layer"):i.layerName&&r.push("layer(".concat(i.layerName,")")),i.supportsText&&r.push("supports(".concat(i.supportsText,")")),i.media.length&&r.push(i.media.mediaText),r.join(" ")+";"))}catch(X){n=e.cssText}return e.styleSheet.href?tw(n,e.styleSheet.href):n}var r,i=e.cssText;return"selectorText"in e&&e.selectorText.includes(":")&&(i=i.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?tw(i,t):i}var G0=k(function u(){b(this,u),T0(this,"idNodeMap",new Map),T0(this,"nodeMetaMap",new WeakMap)},[{key:"getId",value:function(e){return e&&null!=(e=null==(e=this.getMeta(e))?void 0:e.id)?e:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap["delete"](n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);n&&(n=this.nodeMetaMap.get(n))&&this.nodeMetaMap.set(t,n),this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]);function J0(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.maskInputFn,e=e.value||"",i=i&&$0(i);return e=n[r.toLowerCase()]||i&&n[i]?o?o(e,t):"*".repeat(e.length):e}function $0(e){return e.toLowerCase()}function Z0(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?$0(t):null}function K0(e,t){var n;try{n=new URL(e,null!=t?t:window.location.href)}catch(Pe){return null}e=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(t=null==e?void 0:e[1])?t:null}var Y0=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,X0=/^(?:[a-z+]+:)?\/\//i,Q0=/^www\..*/i,ew=/^(data:)([^,]*),(.*)/i;function tw(e,c){return(e||"").replace(Y0,function(e,t,n,r,i,o){n=n||i||o,i=t||r||"";if(!n)return e;if(X0.test(n)||Q0.test(n))return"url(".concat(i).concat(n).concat(i,")");if(ew.test(n))return"url(".concat(i).concat(n).concat(i,")");if("/"===n[0])return"url(".concat(i).concat((-1<(o=c).indexOf("//")?o.split("/").slice(0,3).join("/"):o.split("/")[0]).split("?")[0]+n).concat(i,")");var t=n.split("#")[0],r=n.substring(t.length),a=c.split("#")[0].split("/"),e=t.split("/");a.pop();var s,u=Ie(e);try{for(u.s();!(s=u.n()).done;){var l=s.value;"."!==l&&(".."===l?a.pop():a.push(l))}}catch(Pe){u.e(Pe)}finally{u.f()}return"url(".concat(i).concat(a.join("/")).concat(r).concat(i,")")})}function nw(e,t){return 1<arguments.length&&t!==undefined&&t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}var rw,iw,ow=1,aw=new RegExp("[^a-z0-9-_:]");function sw(){return ow++}var uw=/^[^ \t\n\r\u000c]+/,lw=/^[, \t\n\r\u000c]+/,cw=new WeakMap;function dw(e,t){return t&&""!==t.trim()?fw(e,t):t}function fw(e,t){var n=cw.get(e);if(n||(n=e.createElement("a"),cw.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function hw(e,t,n,r){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&["table","td","th"].includes(t)?dw(e,r):"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var e=e.exec(t.substring(n));return e?(e=e[0],n+=e.length,e):""}for(var i=[];r(lw),!(n>=t.length);)if(","===(a=r(uw)).slice(-1))a=dw(e,a.substring(0,a.length-1)),i.push(a);else for(var o="",a=dw(e,a),s=!1;;){var u=t.charAt(n);if(""===u){i.push((a+o).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((a+o).trim());break}"("===u&&(s=!0)}o+=u,n+=1}return i.join(", ")}(e,r):"style"===n?tw(r,fw(e)):"object"===t&&"data"===n?dw(e,r):r)}function pw(e,t){return["video","audio"].includes(e)&&"autoplay"===t}function mw(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE)for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&mw(z0.parentNode(e),t,n)}function gw(e,t,n,r){var i;if(B0(e)){if(!z0.childNodes(i=e).length)return!1}else{if(null===z0.parentElement(e))return!1;i=z0.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest(".".concat(t)))return!0}else if(i.classList.contains(t))return!0}else if(mw(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(De){}return!1}function vw(e,t){var n=t.doc,r=t.blockClass,i=t.blockSelector,o=t.needsMask,a=t.inlineStylesheet,s=t.maskInputOptions,u=void 0===s?{}:s,l=t.maskTextFn,c=t.maskInputFn,s=t.dataURLOptions,d=void 0===s?{}:s,f=t.inlineImages,N=t.recordCanvas,F=t.keepIframeSrcFn,s=t.newlyAddedElement,U=void 0!==s&&s,s=t.cssCaptured,j=void 0!==s&&s,h=(s=n,!(t=t.mirror).hasNode(s)||1===(s=t.getId(s))?void 0:s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:M0.Document,childNodes:[],compatMode:e.compatMode}:{type:M0.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:M0.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:h};case e.ELEMENT_NODE:for(var p,m,g,v,y,w,b=e,k=(I={doc:n,blockClass:r,blockSelector:i,inlineStylesheet:a,maskInputOptions:u,maskInputFn:c,dataURLOptions:d,inlineImages:f,recordCanvas:N,keepIframeSrcFn:F,newlyAddedElement:U,rootId:h}).doc,S=I.blockSelector,_=I.inlineStylesheet,E=void 0===(E=I.maskInputOptions)?{}:E,C=I.maskInputFn,R=void 0===(O=I.dataURLOptions)?{}:O,O=I.inlineImages,x=I.recordCanvas,T=I.keepIframeSrcFn,M=void 0!==(M=I.newlyAddedElement)&&M,z=I.rootId,I=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(S){}return!1}(b,I.blockClass,S),A=(m=b)instanceof HTMLFormElement?"form":(m=$0(m.tagName),aw.test(m)?"div":m),P={},B=b.attributes.length,D=0;D<B;D++){var L=b.attributes[D];pw(A,L.name)||(P[L.name]=hw(k,A,$0(L.name),L.value))}"link"===A&&_&&(m=null,m=(_=Array.from(k.styleSheets).find(function(e){return e.href===b.href}))?q0(_):m)&&(delete P.rel,delete P.href,P._cssText=m),"style"===A&&b.sheet&&(_=q0(b.sheet))&&(1<b.childNodes.length&&(_=function(e,t,n){var r=2<arguments.length&&n!==undefined&&n,i=Array.from(t.childNodes),o=[],a=0;if(1<i.length&&e&&"string"==typeof e)for(var s=nw(e,r),u=s.length/e.length,l=1;l<i.length;l++)if(i[l].textContent&&"string"==typeof i[l].textContent){for(var c=nw(i[l].textContent,r),d=3;d<c.length&&(c[d].match(/[a-zA-Z0-9]/)||-1!==c.indexOf(c.substring(0,d),1));d++);for(;d<c.length;d++){var f,h=c.substring(0,d),p=s.split(h),m=-1;if(2===p.length)m=p[0].length;else if(2<p.length&&""===p[0]&&""!==i[l-1].textContent)m=s.indexOf(h,1);else if(1===p.length){if(h=h.substring(0,h.length-1),(p=s.split(h)).length<=1)return o.push(e),o;d=101}else d===c.length-1&&(m=s.indexOf(h));if(-1!==(m=2<=p.length&&100<d&&((f=i[l-1].textContent)&&"string"==typeof f&&(f=nw(f).length,m=s.indexOf(h,f)),-1===m)?p[0].length:m)){for(var g=Math.floor(m/u);0<g&&g<e.length;){if((a+=1)>50*i.length)return o.push(e),o;var v=nw(e.substring(0,g),r);if(v.length===m){o.push(e.substring(0,g)),e=e.substring(g),s=s.substring(m);break}v.length<m?g+=Math.max(1,Math.floor((m-v.length)/u)):g-=Math.max(1,Math.floor((v.length-m)*u))}break}}}return o.push(e),o}(_,b).join("/* rr_split */")),P._cssText=_),["input","textarea","select"].includes(A)&&(m=b.value,_=b.checked,"radio"!==P.type&&"checkbox"!==P.type&&"submit"!==P.type&&"button"!==P.type&&m?P.value=J0({element:b,type:Z0(b),tagName:A,value:m,maskInputOptions:E,maskInputFn:C}):_&&(P.checked=_)),"option"===A&&(b.selected&&!E.select?P.selected=!0:delete P.selected),"dialog"===A&&b.open&&(P.rr_open_mode=b.matches("dialog:modal")?"modal":"non-modal"),"canvas"===A&&x&&("2d"===b.__context?function(e){var t=e.getContext("2d");if(t)for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,i="__rrweb_original__"in i?i.__rrweb_original__:i;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(function(e){return 0!==e}))return}return 1}(b)||(P.rr_dataURL=b.toDataURL(R.type,R.quality)):"__context"in b||(m=b.toDataURL(R.type,R.quality),(C=k.createElement("canvas")).width=b.width,C.height=b.height,m!==C.toDataURL(R.type,R.quality)&&(P.rr_dataURL=m))),"img"===A&&O&&(rw||(rw=k.createElement("canvas"),iw=rw.getContext("2d")),v=(g=b).currentSrc||g.getAttribute("src")||"<unknown-src>",y=g.crossOrigin,w=function(){g.removeEventListener("load",w);try{rw.width=g.naturalWidth,rw.height=g.naturalHeight,iw.drawImage(g,0,0),P.rr_dataURL=rw.toDataURL(R.type,R.quality)}catch(Pe){if("anonymous"!==g.crossOrigin)return g.crossOrigin="anonymous",void(g.complete&&0!==g.naturalWidth?w():g.addEventListener("load",w));console.warn("Cannot inline img src=".concat(v,"! Error: ").concat(Pe))}"anonymous"===g.crossOrigin&&(y?P.crossOrigin=y:g.removeAttribute("crossorigin"))},g.complete&&0!==g.naturalWidth?w():g.addEventListener("load",w)),["audio","video"].includes(A)&&((_=P).rr_mediaState=b.paused?"paused":"played",_.rr_mediaCurrentTime=b.currentTime,_.rr_mediaPlaybackRate=b.playbackRate,_.rr_mediaMuted=b.muted,_.rr_mediaLoop=b.loop,_.rr_mediaVolume=b.volume),M||(b.scrollLeft&&(P.rr_scrollLeft=b.scrollLeft),b.scrollTop&&(P.rr_scrollTop=b.scrollTop)),I&&(x=(E=b.getBoundingClientRect()).width,C=E.height,P={"class":P["class"],rr_width:"".concat(x,"px"),rr_height:"".concat(C,"px")}),"iframe"!==A||T(P.src)||(b.contentDocument||(P.rr_src=P.src),delete P.src);try{customElements.get(A)&&(p=!0)}catch(ie){}return{type:M0.Element,tagName:A,attributes:P,childNodes:[],isSVG:Boolean("svg"===b.tagName||b.ownerSVGElement)||void 0,needBlock:I,rootId:z,isCustom:p};case e.TEXT_NODE:return m=e,_=(O={doc:n,needsMask:o,maskTextFn:l,rootId:h,cssCaptured:j}).needsMask,M=O.maskTextFn,E=O.rootId,x=O.cssCaptured,C=(C=z0.parentNode(m))&&C.tagName,T="",I="STYLE"===C||void 0,(C="SCRIPT"===C||void 0)?T="SCRIPT_PLACEHOLDER":x||(T=z0.textContent(m),I&&(T=T&&tw(T,fw(O.doc)))),!I&&!C&&T&&_&&(T=M?M(T,z0.parentElement(m)):T.replace(/[\S]/g,"*")),{type:M0.Text,textContent:T||"",rootId:E};case e.CDATA_SECTION_NODE:return{type:M0.CDATA,textContent:"",rootId:h};case e.COMMENT_NODE:return{type:M0.Comment,textContent:z0.textContent(e)||"",rootId:h};default:return!1}}function yw(e){return null==e?"":e.toLowerCase()}function ww(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function bw(t,e){var n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.maskTextClass,s=e.maskTextSelector,u=e.skipChild,u=void 0!==u&&u,l=e.inlineStylesheet,c=void 0===l||l,l=e.maskInputOptions,d=void 0===l?{}:l,f=e.maskTextFn,h=e.maskInputFn,p=e.slimDOMOptions,l=e.dataURLOptions,m=void 0===l?{}:l,l=e.inlineImages,g=void 0!==l&&l,l=e.recordCanvas,v=void 0!==l&&l,y=e.onSerialize,w=e.onIframeLoad,l=e.iframeLoadTimeout,b=void 0===l?5e3:l,k=e.onStylesheetLoad,l=e.stylesheetLoadTimeout,S=void 0===l?5e3:l,l=e.keepIframeSrcFn,_=void 0===l?function(){return!1}:l,l=e.newlyAddedElement,l=void 0!==l&&l,E=e.cssCaptured,E=void 0!==E&&E,C=e.needsMask,e=e.preserveWhiteSpace,R=void 0===e||e,C=C||gw(t,a,s,void 0===C),e=vw(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:_,newlyAddedElement:l,cssCaptured:E});if(!e)return console.warn(t,"not serialized"),null;var l=r.hasNode(t)?r.getId(t):function(e,t){if(t.comment&&e.type===M0.Comment)return 1;if(e.type===M0.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===K0(e.attributes.href)))return 1;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(yw(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===yw(e.attributes.name)||"icon"===yw(e.attributes.rel)||"apple-touch-icon"===yw(e.attributes.rel)||"shortcut icon"===yw(e.attributes.rel))))return 1;if("meta"===e.tagName){if(t.headMetaDescKeywords&&yw(e.attributes.name).match(/^description|keywords$/))return 1;if(t.headMetaSocial&&(yw(e.attributes.property).match(/^(og|twitter|fb):/)||yw(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===yw(e.attributes.name)))return 1;if(t.headMetaRobots&&("robots"===yw(e.attributes.name)||"googlebot"===yw(e.attributes.name)||"bingbot"===yw(e.attributes.name)))return 1;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return 1;if(t.headMetaAuthorship&&("author"===yw(e.attributes.name)||"generator"===yw(e.attributes.name)||"framework"===yw(e.attributes.name)||"publisher"===yw(e.attributes.name)||"progid"===yw(e.attributes.name)||yw(e.attributes.property).match(/^article:/)||yw(e.attributes.property).match(/^product:/)))return 1;if(t.headMetaVerification&&("google-site-verification"===yw(e.attributes.name)||"yandex-verification"===yw(e.attributes.name)||"csrf-token"===yw(e.attributes.name)||"p:domain_verify"===yw(e.attributes.name)||"verify-v1"===yw(e.attributes.name)||"verification"===yw(e.attributes.name)||"shopify-checkout-api-token"===yw(e.attributes.name)))return 1}}}(e,p)||!R&&e.type===M0.Text&&!e.textContent.replace(/^\s+|\s+$/gm,"").length?-2:ow++,O=Object.assign(e,{id:l});if(r.add(t,O),-2===l)return null;y&&y(t);E=!u;if(O.type===M0.Element&&(E=E&&!O.needBlock,delete O.needBlock,e=z0.shadowRoot(t))&&H0(e)&&(O.isShadowHost=!0),(O.type===M0.Document||O.type===M0.Element)&&E){p.headWhitespace&&O.type===M0.Element&&"head"===O.tagName&&(R=!1);var x={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_,cssCaptured:!1};if(O.type!==M0.Element||"textarea"!==O.tagName||void 0===O.attributes.value){O.type===M0.Element&&void 0!==O.attributes._cssText&&"string"==typeof O.attributes._cssText&&(x.cssCaptured=!0);for(var T=0,M=Array.from(z0.childNodes(t));T<M.length;T++){var I=bw(M[T],x);I&&O.childNodes.push(I)}}var A=null;if(B0(t)&&(A=z0.shadowRoot(t)))for(var P=0,D=Array.from(z0.childNodes(A));P<D.length;P++){var L=bw(D[P],x);L&&(H0(A)&&(L.isShadow=!0),O.childNodes.push(L))}}l=z0.parentNode(t);return l&&W0(l)&&H0(l)&&(O.isShadow=!0),O.type===M0.Element&&"iframe"===O.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(X){return}if("complete"===i){if("about:blank"!==r.location.href||"about:blank"===e.src||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()})}}}(t,function(){var e=t.contentDocument;e&&w&&(e=bw(e,{doc:e,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_}))&&w(t,e)},b),O.type===M0.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===K0(O.attributes.href))&&function(e,t,n){var r,i,o=!1;try{r=e.sheet}catch(X){return}r||(i=setTimeout(function(){o||(t(),o=!0)},n),e.addEventListener("load",function(){clearTimeout(i),o=!0,t()}))}(t,function(){var e;k&&(e=bw(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_}))&&k(t,e)},S),O}var kw,Sw={exports:{}};var _w,Ew,Cw,Rw,Ow,xw=(Cw=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?Cw:("function"==typeof(Rw=Cw["default"])?(Ow=function Cw(){return this instanceof Cw?Reflect.construct(Rw,arguments,this.constructor):Rw.apply(this,arguments)}).prototype=Rw.prototype:Ow={},Object.defineProperty(Ow,"__esModule",{value:!0}),Object.keys(Cw).forEach(function(e){var t=Object.getOwnPropertyDescriptor(Cw,e);Object.defineProperty(Ow,e,t.get?t:{enumerable:!0,get:function(){return Cw[e]}})}),Ow);function Tw(){var d,f,e,t,n;return Ew||(Ew=1,kw||(kw=1,t=String,Sw.exports=(n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}})(),Sw.exports.createColors=n),d=Sw.exports,f=xw,n=K(Error),U(s,n),e=k(s,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(e){var r=this;if(!this.source)return"";var t=this.source;null==e&&(e=d.isColorSupported);var n,i,o,a,s,t=(t=f&&e?f(t):t).split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,t.length),c=String(l).length;return e?(e=d.createColors(!0),n=e.bold,i=e.gray,o=e.red,a=function(e){return n(o(e))},s=function(e){return i(e)}):a=s=function(e){return e},t.slice(u,l).map(function(e,t){var t=u+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=s(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),a(">")+s(n)+e+"\n "+t+a("^")):" "+s(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(_w=e)["default"]=e),_w;function s(e,t,n,r,i,o){var a;return b(this,s),(a=v(this,s,[e])).name="CssSyntaxError",a.reason=e,i&&(a.file=i),r&&(a.source=r),o&&(a.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(a.line=t,a.column=n):(a.line=t.line,a.column=t.column,a.endLine=n.line,a.endColumn=n.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,s),a}}var Mw,Iw,Aw,Pw,Dw,Lw,Nw,Fw,Uw,jw,zw,Bw,Ww,Hw,qw,Vw,Gw,Jw,$w,Zw,Kw,Yw,Xw,Qw,eb,tb,nb,rb,ib,ob,ab,sb,ub,lb,cb,db,fb,hb,pb,mb,gb,vb,yb,wb,bb,kb,Sb,_b,Eb,Cb,Rb,Ob={};function xb(){return Mw||(Mw=1,Ob.isClean=Symbol("isClean"),Ob.my=Symbol("my")),Ob}function Tb(){var a,t;return Aw||(a={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!(Aw=1)},t=k(function t(e){b(this,t),this.builder=e},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}},{key:"beforeAfter",value:function(e,t){for(var n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n}},{key:"block",value:function(e,t){var n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),(t=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(t),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;0<t&&"comment"===e.nodes[t].type;)--t;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),n=e.prop+n+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(e,t,n){var r;if(t&&void 0!==(r=e.raws[t]))return r;var i,o=e.parent;if("before"===(n=n||t)){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}return o?((o=e.root()).rawCache||(o.rawCache={}),"undefined"!=typeof o.rawCache[n]?o.rawCache[n]:"before"===n||"after"===n?this.beforeAfter(e,n):(this[i="raw"+((i=n)[0].toUpperCase()+i.slice(1))]?r=this[i](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=a[n]),o.rawCache[n]=r)):a[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(t){var n;return t.walk(function(e){if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(n){return n.raws.indent||(n.walk(function(e){var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r);var r}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),(Iw=t)["default"]=t),Iw}function Mb(){var n;return Dw||(Dw=1,n=Tb(),(Pw=e)["default"]=e),Pw;function e(e,t){new n(t).stringify(e)}}function Ib(){var o,a,s,i,n,r,e;return Nw||(Nw=1,a=(o=xb()).isClean,s=o.my,i=Tw(),n=Tb(),r=Mb(),e=k(function o(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in b(this,o),this.raws={},this[a]=!1,this[s]=!0,t)if("nodes"===e){this.nodes=[];var n,r=Ie(t[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}catch(Pe){r.e(Pe)}finally{r.f()}}else this[e]=t[e]},[{key:"addToError",value:function(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))),e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in t)this[e]=t[e];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},n=function a(e,t){var n,r,i,o=new e.constructor;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n&&(i=T(r=e[n]),"parent"===n&&"object"===i?t&&(o[n]=t):"source"===n?o[n]=r:Array.isArray(r)?o[n]=r.map(function(e){return a(e,o)}):("object"===i&&null!==r&&(r=a(r)),o[n]=r));return o}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return this.source?(t=(n=this.rangeBy(r)).end,this.source.input.error(e,{column:(n=n.start).column,line:n.line},{column:t.column,line:t.line},r)):new i(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}},{key:"markDirty",value:function(){if(this[a]){this[a]=!1;for(var e=this;e=e.parent;)e[a]=!1}}},{key:"next",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}},{key:"positionBy",value:function(e,t){var n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?i+=r=1:r+=1;return{column:r,line:i}}},{key:"prev",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}},{key:"rangeBy",value:function(e){var t,n,r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};return e.word?-1!==(n=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(n,t),i=this.positionInside(n+e.word.length,t)):(e.start?r={column:e.start.column,line:e.start.line}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1))),{end:i=i.line<r.line||i.line===r.line&&i.column<=r.column?{column:r.column+1,line:r.line}:i,start:r}}},{key:"raw",value:function(e,t){return(new n).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){if(this.parent){for(var e=this,t=!1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s)}t||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n,r,i,o={},a=null==t,s=(t=t||new Map,0);for(n in this)Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n&&(r=this[n],Array.isArray(r)?o[n]=r.map(function(e){return"object"===T(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===T(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=s,t.set(r.input,s),s++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return a&&(o.inputs=Ne(t.keys()).map(function(e){return e.toJSON()})),o}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r,t=(e.stringify&&(e=e.stringify),"");return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}},{key:"proxyOf",get:function(){return this}}]),(Lw=e)["default"]=e),Lw}function Ab(){var e;return Uw||(Uw=1,e=Ib(),U(t,e),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(Fw=e)["default"]=e),Fw;function t(e){return b(this,t),e&&"undefined"!=typeof e.value&&"string"!=typeof e.value&&(e=Ae(Ae({},e),{},{value:String(e.value)})),(e=v(this,t,[e])).type="decl",e}}function Pb(){var r,i,t,n,o,a,s;return Ww||(Ww=1,r=xw.SourceMapConsumer,i=xw.SourceMapGenerator,t=xw.existsSync,n=xw.readFileSync,o=xw.dirname,a=xw.join,s=k(function s(e,t){b(this,s),!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=o(this.mapFile)),e)&&(this.text=e)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===T(e)&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}},{key:"loadFile",value:function(e){if(this.root=o(e),t(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(e,t){if(!1===t)return!1;if(!t)return this.inline?this.decodeInline(this.annotation):this.annotation?(n=this.annotation,e&&(n=a(o(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){e=this.loadFile(n);if(e)return e;throw new Error("Unable to load previous source map: "+n.toString())}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}}]),(Bw=s)["default"]=s),Bw}function Db(){var n,a,u,s,r,i,e,l,o,c,d,f,t;return qw||(qw=1,n=xw.SourceMapConsumer,t=xw.SourceMapGenerator,a=xw.fileURLToPath,u=xw.pathToFileURL,s=xw.isAbsolute,r=xw.resolve,i=(zw?jw:(zw=1,jw={nanoid:function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,e=xw,l=Tw(),o=Pb(),c=Symbol("fromOffsetCache"),d=Boolean(n&&t),f=Boolean(r&&s),t=k(function n(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};if(b(this,n),null==e||"object"===T(e)&&!e.toString)throw new Error("PostCSS received ".concat(e," instead of CSS string"));this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=r(t.from)),f&&d&&(e=new o(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,a=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{},s=(t&&"object"===T(t)?(s=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof s.offset?(r=(o=this.fromOffset(s.offset)).line,o.col):(r=s.line,s.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=s?new l(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,a.plugin):new l(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,a.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(u&&(o.input.url=u(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[c])n=this[c];else{for(var t=this.css.split("\n"),n=new Array(t.length),r=0,i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;this[c]=n}var a=0;if(e>=n[n.length-1])a=n.length-1;else for(var s,u=n.length-2;a<u;)if(e<n[s=a+(u-a>>1)])u=s-1;else{if(!(e>=n[s+1])){a=s;break}a=s+1}return{col:e-n[a]+1,line:a+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,n,r){if(!this.map)return!1;var i,o=this.map.consumer(),t=o.originalPositionFor({column:t,line:e});if(!t.source)return!1;"number"==typeof n&&(i=o.originalPositionFor({column:r,line:n}));e=s(t.source)?u(t.source):new URL(t.source,this.map.consumer().sourceRoot||u(this.map.mapFile)),r={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:e.toString()};if("file:"===e.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");r.file=a(e)}n=o.sourceContentFor(t.source);return n&&(r.source=n),r}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Ae({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),(Hw=t)["default"]=t,e&&e.registerInput&&e.registerInput(t)),Hw}function Lb(){if(Gw)return Vw;Gw=1;var a=xw.SourceMapConsumer,t=xw.SourceMapGenerator,s=xw.dirname,n=xw.relative,r=xw.resolve,i=xw.sep,o=xw.pathToFileURL,u=Db(),e=Boolean(a&&t),l=Boolean(s&&r&&n&&i);return Vw=k(function j(e,t,n,r){b(this,j),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map},[{key:"addAnnotation",value:function(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map",t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var e,t=Ie(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||s(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new a(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(Pe){t.e(Pe)}finally{t.f()}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){var t;return this.clearAnnotation(),l&&e&&this.isMap()?this.generateMap():(t="",this.stringify(this.root,function(e){t+=e}),[t])}},{key:"generateMap",value:function(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var r=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,a=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(e,t,n){r.css+=e,t&&"end"!==n&&(s.generated.line=o,s.generated.column=a-1,t.source&&t.source.start?(s.source=r.sourcePath(t),s.original.line=t.source.start.line,s.original.column=t.source.start.column-1):(s.source="<no source>",s.original.line=1,s.original.column=0),r.map.addMapping(s)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),a=e.length-i):a+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(s.source=r.sourcePath(t),s.original.line=t.source.end.line,s.original.column=t.source.end.column-1,s.generated.line=o,s.generated.column=a-2):(s.source="<no source>",s.original.line=1,s.original.column=0,s.generated.line=o,s.generated.column=a-1),r.map.addMapping(s))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){var t;return this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e)?e:this.memoizedPaths.get(e)||(t=this.opts.to?s(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=s(r(t,this.mapOpts.annotation))),t=n(t,e),this.memoizedPaths.set(e,t),t)}},{key:"previous",value:function(){var e,t=this;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(function(e){e.source&&e.source.input.map&&(e=e.source.input.map,t.previousMaps.includes(e)||t.previousMaps.push(e))}):(e=new u(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}},{key:"setSourcesContent",value:function(){var e,n=this,r={};this.root?this.root.walk(function(e){var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=n.usesFileUrls?n.toFileUrl(t):n.toUrl(n.path(t)),n.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(o)return t=o(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}])}function Nb(){var e;return $w||($w=1,e=Ib(),U(t,e),e=k(t),(Jw=e)["default"]=e),Jw;function t(e){return b(this,t),(e=v(this,t,[e])).type="comment",e}}function Fb(){var l,c,d,t,f,h,p,m,n,e;return Kw||(Kw=1,e=xb(),f=e.isClean,h=e.my,p=Ab(),m=Nb(),e=Ib(),U(g,e),(n=k(g,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o,a=i[r],a=this.normalize(a,this.last),s=Ie(a);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.proxyOf.nodes.push(u)}}catch(Pe){s.e(Pe)}finally{s.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(J(g,"cleanRaws",this,3)([e]),this.nodes){var t,n=Ie(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(Pe){n.e(Pe)}finally{n.f()}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(r,o){return"proxyOf"===o?r:r[o]&&("each"===o||"string"==typeof o&&o.startsWith("walk")?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r[o].apply(r,Ne(t.map(function(n){return"function"==typeof n?function(e,t){return n(e.toProxy(),t)}:n})))}:"every"===o||"some"===o?function(i){return r[o](function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.apply(void 0,[e.toProxy()].concat(n))})}:"root"===o?function(){return r.root().toProxy()}:"nodes"===o?r.nodes.map(function(e){return e.toProxy()}):"first"===o||"last"===o?r[o].toProxy():r[o])},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),s=Ie(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o+1,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),s=Ie(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function H(e){return e.map(function(e){return e.nodes&&(e.nodes=H(e.nodes)),delete e.source,e})}(l(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Ie(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(Pe){i.e(Pe)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var a,s=Ie(e=e.nodes.slice(0));try{for(s.s();!(a=s.n()).done;){var u=a.value;u.parent&&u.parent.removeChild(u,"ignore")}}catch(Pe){s.e(Pe)}finally{s.f()}}else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new p(e)]}else if(e.selector)e=[new c(e)];else if(e.name)e=[new d(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new m(e)]}return e.map(function(e){return e[h]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[f]&&function c(e){if(e[f]=!1,e.proxyOf.nodes){var t,n=Ie(e.proxyOf.nodes);try{for(n.s();!(t=n.n()).done;)c(t.value)}catch(Pe){n.e(Pe)}finally{n.f()}}}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e})}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Ie(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,a,s=r.value,u=this.normalize(s,this.first,"prepend").reverse(),l=Ie(u);try{for(l.s();!(o=l.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(a in this.indexes)this.indexes[a]=this.indexes[a]+u.length}}catch(Pe){i.e(Pe)}finally{i.f()}return this.markDirty(),this}},{key:"push",value:function(e){return(e.parent=this).proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e,t=Ie(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(Pe){t.e(Pe)}finally{t.f()}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,n,r){return r||(r=n,n={}),this.walkDecls(function(e){n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(r){return this.each(function(e,t){var n;try{n=r(e,t)}catch(b){throw e.addToError(b)}return n=!1!==n&&e.walk?e.walk(r):n})}},{key:"walkAtRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk(function(e,t){if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("atrule"===e.type)return r(e,t)}))}},{key:"walkComments",value:function(n){return this.walk(function(e,t){if("comment"===e.type)return n(e,t)})}},{key:"walkDecls",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk(function(e,t){if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("decl"===e.type)return r(e,t)}))}},{key:"walkRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk(function(e,t){if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("rule"===e.type)return r(e,t)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}])).registerParse=function(e){l=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){d=e},n.registerRoot=function(e){t=e},((Zw=n)["default"]=n).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,d.prototype):"rule"===e.type?Object.setPrototypeOf(e,c.prototype):"decl"===e.type?Object.setPrototypeOf(e,p.prototype):"comment"===e.type?Object.setPrototypeOf(e,m.prototype):"root"===e.type&&Object.setPrototypeOf(e,t.prototype),e[h]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),Zw;function g(){return b(this,g),v(this,g,arguments)}}function Ub(){var t,n,e;return Xw||(Xw=1,e=Fb(),U(r,e),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(Yw=e)["default"]=e),Yw;function r(e){return b(this,r),(e=v(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function jb(){if(eb)return Qw;eb=1;var t={};return Qw=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function zb(){var r;return nb||(nb=1,r=k(function r(e){var t,n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};for(t in b(this,r),this.type="warning",this.text=e,n.node&&n.node.source&&(e=n.node.rangeBy(n),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),n)this[t]=n[t]},[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),(tb=r)["default"]=r),tb}function Bb(){var n,r;return ib||(ib=1,n=zb(),r=k(function r(e,t,n){b(this,r),this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0},[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new n(e,t));return this.messages.push(e),e}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),(rb=r)["default"]=r),rb}function Wb(){var e,t;return ub||(ub=1,e=Fb(),U(r,e),t=k(r,[{key:"append",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return J(r,"append",this,3)(t)}},{key:"prepend",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return J(r,"prepend",this,3)(t)}}]),(sb=t)["default"]=t,e.registerAtRule(t)),sb;function r(e){return b(this,r),(e=v(this,r,[e])).type="atrule",e}}function Hb(){var t,n,e,r;return cb||(cb=1,e=Fb(),U(o,e),(r=k(o,[{key:"normalize",value:function(e,t,n){e=J(o,"normalize",this,3)([e]);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var r,i=Ie(e);try{for(i.s();!(r=i.n()).done;)r.value.raws.before=t.raws.before}catch(Pe){i.e(Pe)}finally{i.f()}}return e}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),J(o,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},lb=r,e.registerRoot(r["default"]=r)),lb;function o(e){return b(this,o),(e=v(this,o,[e])).type="root",e.nodes||(e.nodes=[]),e}}function qb(){var t;return fb||(fb=1,(db=t={comma:function(e){return t.split(e,[","],!0)},space:function(e){return t.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",a=!1,s=0,u=!1,l="",c=!1,d=Ie(e);try{for(d.s();!(r=d.n()).done;){var f=r.value;c?c=!1:"\\"===f?c=!0:u?f===l&&(u=!1):'"'===f||"'"===f?(u=!0,l=f):"("===f?s+=1:")"===f?0<s&&--s:0===s&&t.includes(f)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=f}}catch(Pe){d.e(Pe)}finally{d.f()}return!n&&""===o||i.push(o.trim()),i}})["default"]=t),db}function Vb(){var e,t,n;return pb||(pb=1,e=Fb(),t=qb(),U(r,e),n=k(r,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}}]),(hb=n)["default"]=n,e.registerRule(n)),hb;function r(e){return b(this,r),(e=v(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function Gb(){if(gb)return mb;gb=1;var p=Ab(),e=function(){if(ab)return ob;ab=1;var w="'".charCodeAt(0),b='"'.charCodeAt(0),k="\\".charCodeAt(0),S="/".charCodeAt(0),_="\n".charCodeAt(0),E=" ".charCodeAt(0),C="\f".charCodeAt(0),R="\t".charCodeAt(0),O="\r".charCodeAt(0),x="[".charCodeAt(0),T="]".charCodeAt(0),M="(".charCodeAt(0),I=")".charCodeAt(0),A="{".charCodeAt(0),P="}".charCodeAt(0),D=";".charCodeAt(0),L="*".charCodeAt(0),N=":".charCodeAt(0),F="@".charCodeAt(0),U=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,z=/.[\r\n"'(/\\]/,B=/[\da-f]/i;return ob=function(t){var r,i,o,a,s,u,l,c,d,e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},f=t.css.valueOf(),h=e.ignoreErrors,p=f.length,m=0,g=[],v=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&p<=m},nextToken:function(e){if(v.length)return v.pop();if(!(p<=m)){var t=!!e&&e.ignoreUnclosed;switch(r=f.charCodeAt(m)){case _:case E:case R:case O:case C:for(i=m;i+=1,(r=f.charCodeAt(i))===E||r===_||r===R||r===O||r===C;);d=["space",f.slice(m,i)],m=i-1;break;case x:case T:case A:case P:case N:case D:case I:var n=String.fromCharCode(r);d=[n,n,m];break;case M:if(l=g.length?g.pop()[1]:"",c=f.charCodeAt(m+1),"url"===l&&c!==w&&c!==b&&c!==E&&c!==_&&c!==R&&c!==C&&c!==O){i=m;do{if(s=!1,-1===(i=f.indexOf(")",i+1))){if(h||t){i=m;break}y("bracket")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["brackets",f.slice(m,i+1),m,i],m=i}else i=f.indexOf(")",m+1),l=f.slice(m,i+1),-1===i||z.test(l)?d=["(","(",m]:(d=["brackets",l,m,i],m=i);break;case w:case b:o=r===w?"'":'"',i=m;do{if(s=!1,-1===(i=f.indexOf(o,i+1))){if(h||t){i=m+1;break}y("string")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["string",f.slice(m,i+1),m,i],m=i;break;case F:U.lastIndex=m+1,U.test(f),i=0===U.lastIndex?f.length-1:U.lastIndex-2,d=["at-word",f.slice(m,i+1),m,i],m=i;break;case k:for(i=m,a=!0;f.charCodeAt(i+1)===k;)i+=1,a=!a;if(r=f.charCodeAt(i+1),a&&r!==S&&r!==E&&r!==_&&r!==R&&r!==O&&r!==C&&(i+=1,B.test(f.charAt(i)))){for(;B.test(f.charAt(i+1));)i+=1;f.charCodeAt(i+1)===E&&(i+=1)}d=["word",f.slice(m,i+1),m,i],m=i;break;default:m=(r===S&&f.charCodeAt(m+1)===L?(0===(i=f.indexOf("*/",m+2)+1)&&(h||t?i=f.length:y("comment")),d=["comment",f.slice(m,i+1),m,i]):(j.lastIndex=m+1,j.test(f),i=0===j.lastIndex?f.length-1:j.lastIndex-2,d=["word",f.slice(m,i+1),m,i],g.push(d)),i)}return m++,d}},position:function(){return m}}}}(),n=Nb(),l=Wb(),t=Hb(),r=Vb(),f={empty:!0,space:!0};return mb=k(function N(e){b(this,N),this.input=e,this.root=new t,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new l;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&0<u.length?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(0<s.length){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(s.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;0<=i&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i,o=0,a=Ie(e.entries());try{for(a.s();!(i=a.n()).done;){var s=Le(i.value,2),u=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return u}this.doubleColon(t)}r=t}}catch(Pe){a.e(Pe)}finally{a.f()}return!1}},{key:"comment",value:function(e){var t=new n,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}},{key:"createTokenizer",value:function(){this.tokenizer=e(this.input)}},{key:"decl",value:function(e,t){var n=new p;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;0<=t;t--){var n=e[t],n=n[3]||n[2];if(n)return n}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var u=e.length-1;0<=u;u--){if("!important"===(r=e[u])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,u);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),d="",f=u;0<f;f--){var h=c[f][0];if(0===d.trim().indexOf("!")&&"space"!==h)break;d=c.pop()[1]+d}0===d.trim().indexOf("!")&&(n.important=!0,n.raws.important=d,e=c)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new r;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t,n=!1,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],u=e;u;){if(t=u[0],s.push(u),"("===t||"["===t)i=i||u,o.push("("===t?")":"]");else if(a&&r&&"{"===t)i=i||u,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(s,a);break}if("{"===t)return void this.rule(s);if("}"===t){this.tokenizer.back(s.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,s,u=n.length,l="",c=!0,d=0;d<u;d+=1)"space"===(a=(i=n[d])[0])&&d===u-1&&!r||"comment"===a&&(a=n[d-1]?n[d-1][0]:"empty",o=n[d+1]?n[d+1][0]:"empty",f[a]||f[o]||","===l.slice(-1))?c=!1:l+=i[1];c||(s=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:s,value:l}),e[t]=l}},{key:"rule",value:function(e){e.pop();var t=new r;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}])}function Jb(){var e,n,r;return yb||(yb=1,e=Fb(),n=Gb(),r=Db(),vb=t,e.registerParse(t["default"]=t)),vb;function t(e,t){e=new r(e,t),e=new n(e);try{e.parse()}catch(w){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===w.name&&t&&t.from&&(/\.scss$/i.test(t.from)?w.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?w.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(w.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),w}return e.root}}function $b(){var d,a,n,r,u,s,i,c,l,e,o,f,h,p,t,m;return bb||(bb=1,t=xb(),d=t.isClean,a=t.my,n=Lb(),r=Mb(),u=Fb(),s=Ub(),i=jb(),c=Bb(),l=Jb(),e=Hb(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0},p={},(t=k(function s(e,t,n){var r,i=this;if(b(this,s),this.stringified=!1,this.processed=!1,"object"!==T(t)||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof s||t instanceof c)r=w(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var o=l;n.syntax&&(o=n.syntax.parse),(o=n.parser?n.parser:o).parse&&(o=o.parse);try{r=o(t,n)}catch(X){this.processed=!0,this.error=X}r&&!r[a]&&u.rebuild(r)}else r=w(t);this.result=new c(e,r,n),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===T(e)&&e.prepare?Ae(Ae({},e),e.prepare(i.result)):e})},[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n,r,i,o,a,s=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?s.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=s.postcssPlugin,r=s.postcssVersion,i=this.result.processor.version,o=r.split("."),a=i.split("."),o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=s.postcssPlugin,e.setMessage())}catch(Pe){console&&console.error&&console.error(Pe)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};var e,t=function(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])},n=Ie(this.plugins);try{for(n.s();!(e=n.n()).done;){var i=e.value;if("object"===T(i))for(var o in i){if(!f[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event ".concat(o," in ").concat(i.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[o])if("object"===T(i[o]))for(var a in i[o])t(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&t(i,o,i[o])}}}catch(Pe){n.e(Pe)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(m=S(W().m(function e(){var t,i,n,r,o,a,s,u,l,c=this;return W().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(s=this.plugins[t],g(s=this.runOnRoot(s)))return e.p=2,e.n=3,s;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,s=e.v,this.handleError(s);case 5:t++,e.n=1;break;case 6:if(this.prepareVisitors(),!this.hasListener){e.n=21;break}i=this.result.root;case 7:if(i[d]){e.n=14;break}i[d]=!0,n=[y(i)];case 8:if(0<n.length){if(g(u=this.visitTick(n)))return e.p=9,e.n=10,u;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,u=e.v,l=n[n.length-1].node,this.handleError(u,l);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Ie(this.listeners.OnceExit),e.p=15,a=W().m(function f(){var t,n,r;return W().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=Le(o.value,2),r=n[0],t=n[1],c.result.lastPlugin=r,e.p=1,"document"===i.type)return n=i.nodes.map(function(e){return t(e,c.helpers)}),e.n=2,Promise.all(n);e.n=3;break;case 2:e.n=4;break;case 3:return e.n=4,t(i,c.helpers);case 4:e.n=6;break;case 5:throw e.p=5,r=e.v,c.handleError(r);case 6:return e.a(2)}},f,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(q(a()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,l=e.v,r.e(l);case 20:return e.p=20,r.f(),e.f(20);case 21:return this.processed=!0,e.a(2,this.stringify())}},e,this,[[15,19,20,21],[9,11],[2,4]])})),function(){return m.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===T(t)&&t.Once?"document"===this.result.root.type?g((e=this.result.root.nodes.map(function(e){return t.Once(e,n.helpers)}))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(X){throw this.handleError(X)}}},{key:"stringify",value:function(){if(this.error)throw this.error;var e,t;return this.stringified||(this.stringified=!0,this.sync(),t=this.result.opts,e=r,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new n(e,this.result.root,this.result.opts).generate(),this.result.css=t[0],this.result.map=t[1]),this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();var e,t=Ie(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(g(this.runOnRoot(n)))throw this.getAsyncError()}}catch(Pe){t.e(Pe)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[d];)r[d]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Ie(r.nodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}}catch(Pe){o.e(Pe)}finally{o.f()}}else this.visitSync(this.listeners.OnceExit,r)}}return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n,r=Ie(e);try{for(r.s();!(n=r.n()).done;){var i=Le(n.value,2),o=i[0],a=i[1],s=(this.result.lastPlugin=o,void 0);try{s=a(t,this.helpers)}catch(u){throw this.handleError(u,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(s))throw this.getAsyncError()}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"visitTick",value:function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var i=Le(r[t.visitorIndex],2),o=i[0],i=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return i(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(0!==t.iterator){for(var a,s=t.iterator;a=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!a[d])return a[d]=!0,void e.push(y(a));t.iterator=0,delete n.indexes[s]}for(var u=t.events;t.eventIndex<u.length;){var l=u[t.eventIndex];if(t.eventIndex+=1,0===l)return void(n.nodes&&n.nodes.length&&(n[d]=!0,t.iterator=n.getIterator()));if(this.listeners[l])return void(t.visitors=this.listeners[l])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[d]=!0;var n,r=Ie(v(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[d]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}])).registerPostcss=function(e){p=e},wb=t,e.registerLazyResult(t["default"]=t),s.registerLazyResult(t)),wb;function g(e){return"object"===T(e)&&"function"==typeof e.then}function v(e){var t=!1,n=o[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[d]=!1,e.nodes&&e.nodes.forEach(w),e}}function Zb(){var n,r,t,e,i,o,a,s,u,l,c;return Eb||(Eb=1,Sb||(Sb=1,o=Lb(),a=Mb(),s=jb(),u=Jb(),l=Bb(),c=k(function c(e,t,n){b(this,c),t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var e=a,r=(this.result=new l(this._processor,void 0,this._opts),this.result.css=t,this),n=(Object.defineProperty(this.result,"root",{get:function(){return r.root}}),new o(e,void 0,this._opts,t));n.isMap()?(t=(e=Le(n.generate(),2))[0],e=e[1],t&&(this.result.css=t),e&&(this.result.map=e)):(n.clearAnnotation(),this.result.css=n.css)},[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this._opts||s("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=u;try{e=t(this._css,this._opts)}catch(X){this.error=X}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(kb=c)["default"]=c),n=kb,r=$b(),t=Ub(),e=Hb(),i=k(function t(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:[];b(this,t),this.version="8.4.38",this.plugins=this.normalize(e)},[{key:"normalize",value:function(e){var t,n=[],r=Ie(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===T(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===T(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==T(i)||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(Pe){r.e(Pe)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?r:n)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(_b=i)["default"]=i,e.registerProcessor(i),t.registerProcessor(i)),_b}OE||(OE=1,Te=Tw(),Kb=Ab(),l=$b(),t=Fb(),Yb=Zb(),i=Mb(),XR||(XR=1,r1=Ab(),i1=Pb(),o1=Nb(),a1=Wb(),s1=Db(),u1=Hb(),l1=Vb(),(Cb=c1)["default"]=c1),cv=Cb,Xb=Ub(),Ue=zb(),Qb=Nb(),e1=Wb(),e=Bb(),qr=Db(),Me=Jb(),tr=qb(),t1=Vb(),n1=Hb(),st=Ib(),d1.plugin=function(t,n){var e,r=!1;function i(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");var e=n.apply(void 0,arguments);return e.postcssPlugin=t,e.postcssVersion=(new Yb).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return d1([i(n)]).process(e,t)},i},d1.stringify=i,d1.parse=Me,d1.fromJSON=cv,d1.list=tr,d1.comment=function(e){return new Qb(e)},d1.atRule=function(e){return new e1(e)},d1.decl=function(e){return new Kb(e)},d1.rule=function(e){return new t1(e)},d1.root=function(e){return new n1(e)},d1.document=function(e){return new Xb(e)},d1.CssSyntaxError=Te,d1.Declaration=Kb,d1.Container=t,d1.Processor=Yb,d1.Document=Xb,d1.Comment=Qb,d1.Warning=Ue,d1.AtRule=e1,d1.Result=e,d1.Input=qr,d1.Rule=t1,d1.Root=n1,d1.Node=st,l.registerPostcss(d1),(Rb=d1)["default"]=d1);var Kb,Yb,Xb,Qb,e1,t1,n1,r1,i1,o1,a1,s1,u1,l1,n=(a=Rb)&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a["default"]:a;function c1(e,t){if(Array.isArray(e))return e.map(function(e){return c1(e)});var n,r=e.inputs,i=B(e,S0);if(r){t=[];var o,a=Ie(r);try{for(a.s();!(o=a.n()).done;){var s=Ae(Ae({},o.value),{},{__proto__:s1.prototype});s.map&&(s.map=Ae(Ae({},s.map),{},{__proto__:i1.prototype})),t.push(s)}}catch(Pe){a.e(Pe)}finally{a.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return c1(e,t)})),i.source&&(n=(r=i.source).inputId,r=B(r,_0),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new u1(i);if("decl"===i.type)return new r1(i);if("rule"===i.type)return new l1(i);if("comment"===i.type)return new o1(i);if("atrule"===i.type)return new a1(i);throw new Error("Unknown node type: "+e.type)}function d1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new Yb(t)}n.stringify;var f1=Object.defineProperty,h1=function(e,t,n){return e=e,t="symbol"!==T(t)?t+"":t,n=n,t in e?f1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n};Date.now().toString();var p1,m1={exports:{}};var g1,v1,y1,w1,b1,k1=(y1=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?y1:("function"==typeof(w1=y1["default"])?(b1=function y1(){return this instanceof y1?Reflect.construct(w1,arguments,this.constructor):w1.apply(this,arguments)}).prototype=w1.prototype:b1={},Object.defineProperty(b1,"__esModule",{value:!0}),Object.keys(y1).forEach(function(e){var t=Object.getOwnPropertyDescriptor(y1,e);Object.defineProperty(b1,e,t.get?t:{enumerable:!0,get:function(){return y1[e]}})}),b1);function S1(){var d,f,e,t,n;return v1||(v1=1,p1||(p1=1,t=String,m1.exports=(n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}})(),m1.exports.createColors=n),d=m1.exports,f=k1,n=K(Error),U(s,n),e=k(s,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(e){var r=this;if(!this.source)return"";var t=this.source;null==e&&(e=d.isColorSupported);var n,i,o,a,s,t=(t=f&&e?f(t):t).split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,t.length),c=String(l).length;return e?(e=d.createColors(!0),n=e.bold,i=e.gray,o=e.red,a=function(e){return n(o(e))},s=function(e){return i(e)}):a=s=function(e){return e},t.slice(u,l).map(function(e,t){var t=u+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=s(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),a(">")+s(n)+e+"\n "+t+a("^")):" "+s(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(g1=e)["default"]=e),g1;function s(e,t,n,r,i,o){var a;return b(this,s),(a=v(this,s,[e])).name="CssSyntaxError",a.reason=e,i&&(a.file=i),r&&(a.source=r),o&&(a.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(a.line=t,a.column=n):(a.line=t.line,a.column=t.column,a.endLine=n.line,a.endColumn=n.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,s),a}}var _1,E1,C1,R1,O1,x1,T1,M1,I1,A1,P1,D1,L1,N1,F1,U1,j1,z1,B1,W1,H1,q1,V1,G1,J1,$1,Z1,K1,Y1,X1,Q1,ek,tk,nk,rk,ik,ok,ak,sk,uk,lk,ck,dk,fk,hk,pk,mk,gk,vk,yk,wk,bk={};function kk(){return _1||(_1=1,bk.isClean=Symbol("isClean"),bk.my=Symbol("my")),bk}function Sk(){var a,t;return C1||(a={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!(C1=1)},t=k(function t(e){b(this,t),this.builder=e},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}},{key:"beforeAfter",value:function(e,t){for(var n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n}},{key:"block",value:function(e,t){var n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),(t=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(t),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;0<t&&"comment"===e.nodes[t].type;)--t;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),n=e.prop+n+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(e,t,n){var r;if(t&&void 0!==(r=e.raws[t]))return r;var i,o=e.parent;if("before"===(n=n||t)){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}return o?((o=e.root()).rawCache||(o.rawCache={}),"undefined"!=typeof o.rawCache[n]?o.rawCache[n]:"before"===n||"after"===n?this.beforeAfter(e,n):(this[i="raw"+((i=n)[0].toUpperCase()+i.slice(1))]?r=this[i](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=a[n]),o.rawCache[n]=r)):a[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(t){var n;return t.walk(function(e){if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(n){return n.raws.indent||(n.walk(function(e){var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r);var r}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),(E1=t)["default"]=t),E1}function _k(){var n;return O1||(O1=1,n=Sk(),(R1=e)["default"]=e),R1;function e(e,t){new n(t).stringify(e)}}function Ek(){var o,a,s,i,n,r,e;return T1||(T1=1,a=(o=kk()).isClean,s=o.my,i=S1(),n=Sk(),r=_k(),e=k(function o(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in b(this,o),this.raws={},this[a]=!1,this[s]=!0,t)if("nodes"===e){this.nodes=[];var n,r=Ie(t[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}catch(Pe){r.e(Pe)}finally{r.f()}}else this[e]=t[e]},[{key:"addToError",value:function(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))),e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in t)this[e]=t[e];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},n=function a(e,t){var n,r,i,o=new e.constructor;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n&&(i=T(r=e[n]),"parent"===n&&"object"===i?t&&(o[n]=t):"source"===n?o[n]=r:Array.isArray(r)?o[n]=r.map(function(e){return a(e,o)}):("object"===i&&null!==r&&(r=a(r)),o[n]=r));return o}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return this.source?(t=(n=this.rangeBy(r)).end,this.source.input.error(e,{column:(n=n.start).column,line:n.line},{column:t.column,line:t.line},r)):new i(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}},{key:"markDirty",value:function(){if(this[a]){this[a]=!1;for(var e=this;e=e.parent;)e[a]=!1}}},{key:"next",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}},{key:"positionBy",value:function(e,t){var n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?i+=r=1:r+=1;return{column:r,line:i}}},{key:"prev",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}},{key:"rangeBy",value:function(e){var t,n,r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};return e.word?-1!==(n=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(n,t),i=this.positionInside(n+e.word.length,t)):(e.start?r={column:e.start.column,line:e.start.line}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1))),{end:i=i.line<r.line||i.line===r.line&&i.column<=r.column?{column:r.column+1,line:r.line}:i,start:r}}},{key:"raw",value:function(e,t){return(new n).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){if(this.parent){for(var e=this,t=!1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s)}t||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n,r,i,o={},a=null==t,s=(t=t||new Map,0);for(n in this)Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n&&(r=this[n],Array.isArray(r)?o[n]=r.map(function(e){return"object"===T(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===T(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=s,t.set(r.input,s),s++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return a&&(o.inputs=Ne(t.keys()).map(function(e){return e.toJSON()})),o}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r,t=(e.stringify&&(e=e.stringify),"");return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}},{key:"proxyOf",get:function(){return this}}]),(x1=e)["default"]=e),x1}function Ck(){var e;return I1||(I1=1,e=Ek(),U(t,e),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(M1=e)["default"]=e),M1;function t(e){return b(this,t),e&&"undefined"!=typeof e.value&&"string"!=typeof e.value&&(e=Ae(Ae({},e),{},{value:String(e.value)})),(e=v(this,t,[e])).type="decl",e}}function Rk(){var r,i,t,n,o,a,s;return L1||(L1=1,r=k1.SourceMapConsumer,i=k1.SourceMapGenerator,t=k1.existsSync,n=k1.readFileSync,o=k1.dirname,a=k1.join,s=k(function s(e,t){b(this,s),!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=o(this.mapFile)),e)&&(this.text=e)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===T(e)&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}},{key:"loadFile",value:function(e){if(this.root=o(e),t(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(e,t){if(!1===t)return!1;if(!t)return this.inline?this.decodeInline(this.annotation):this.annotation?(n=this.annotation,e&&(n=a(o(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){e=this.loadFile(n);if(e)return e;throw new Error("Unable to load previous source map: "+n.toString())}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}}]),(D1=s)["default"]=s),D1}function Ok(){var n,a,u,s,r,i,e,l,o,c,d,f,t;return F1||(F1=1,n=k1.SourceMapConsumer,t=k1.SourceMapGenerator,a=k1.fileURLToPath,u=k1.pathToFileURL,s=k1.isAbsolute,r=k1.resolve,i=(P1?A1:(P1=1,A1={nanoid:function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,e=k1,l=S1(),o=Rk(),c=Symbol("fromOffsetCache"),d=Boolean(n&&t),f=Boolean(r&&s),t=k(function n(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};if(b(this,n),null==e||"object"===T(e)&&!e.toString)throw new Error("PostCSS received ".concat(e," instead of CSS string"));this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=r(t.from)),f&&d&&(e=new o(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,a=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{},s=(t&&"object"===T(t)?(s=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof s.offset?(r=(o=this.fromOffset(s.offset)).line,o.col):(r=s.line,s.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=s?new l(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,a.plugin):new l(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,a.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(u&&(o.input.url=u(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[c])n=this[c];else{for(var t=this.css.split("\n"),n=new Array(t.length),r=0,i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;this[c]=n}var a=0;if(e>=n[n.length-1])a=n.length-1;else for(var s,u=n.length-2;a<u;)if(e<n[s=a+(u-a>>1)])u=s-1;else{if(!(e>=n[s+1])){a=s;break}a=s+1}return{col:e-n[a]+1,line:a+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,n,r){if(!this.map)return!1;var i,o=this.map.consumer(),t=o.originalPositionFor({column:t,line:e});if(!t.source)return!1;"number"==typeof n&&(i=o.originalPositionFor({column:r,line:n}));e=s(t.source)?u(t.source):new URL(t.source,this.map.consumer().sourceRoot||u(this.map.mapFile)),r={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:e.toString()};if("file:"===e.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");r.file=a(e)}n=o.sourceContentFor(t.source);return n&&(r.source=n),r}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Ae({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),(N1=t)["default"]=t,e&&e.registerInput&&e.registerInput(t)),N1}function xk(){if(j1)return U1;j1=1;var a=k1.SourceMapConsumer,t=k1.SourceMapGenerator,s=k1.dirname,n=k1.relative,r=k1.resolve,i=k1.sep,o=k1.pathToFileURL,u=Ok(),e=Boolean(a&&t),l=Boolean(s&&r&&n&&i);return U1=k(function j(e,t,n,r){b(this,j),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map},[{key:"addAnnotation",value:function(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map",t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var e,t=Ie(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||s(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new a(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(Pe){t.e(Pe)}finally{t.f()}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){var t;return this.clearAnnotation(),l&&e&&this.isMap()?this.generateMap():(t="",this.stringify(this.root,function(e){t+=e}),[t])}},{key:"generateMap",value:function(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var r=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,a=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(e,t,n){r.css+=e,t&&"end"!==n&&(s.generated.line=o,s.generated.column=a-1,t.source&&t.source.start?(s.source=r.sourcePath(t),s.original.line=t.source.start.line,s.original.column=t.source.start.column-1):(s.source="<no source>",s.original.line=1,s.original.column=0),r.map.addMapping(s)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),a=e.length-i):a+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(s.source=r.sourcePath(t),s.original.line=t.source.end.line,s.original.column=t.source.end.column-1,s.generated.line=o,s.generated.column=a-2):(s.source="<no source>",s.original.line=1,s.original.column=0,s.generated.line=o,s.generated.column=a-1),r.map.addMapping(s))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){var t;return this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e)?e:this.memoizedPaths.get(e)||(t=this.opts.to?s(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=s(r(t,this.mapOpts.annotation))),t=n(t,e),this.memoizedPaths.set(e,t),t)}},{key:"previous",value:function(){var e,t=this;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(function(e){e.source&&e.source.input.map&&(e=e.source.input.map,t.previousMaps.includes(e)||t.previousMaps.push(e))}):(e=new u(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}},{key:"setSourcesContent",value:function(){var e,n=this,r={};this.root?this.root.walk(function(e){var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=n.usesFileUrls?n.toFileUrl(t):n.toUrl(n.path(t)),n.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(o)return t=o(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}])}function Tk(){var e;return B1||(B1=1,e=Ek(),U(t,e),e=k(t),(z1=e)["default"]=e),z1;function t(e){return b(this,t),(e=v(this,t,[e])).type="comment",e}}function Mk(){var l,c,d,t,f,h,p,m,n,e;return H1||(H1=1,e=kk(),f=e.isClean,h=e.my,p=Ck(),m=Tk(),e=Ek(),U(g,e),(n=k(g,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o,a=i[r],a=this.normalize(a,this.last),s=Ie(a);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.proxyOf.nodes.push(u)}}catch(Pe){s.e(Pe)}finally{s.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(J(g,"cleanRaws",this,3)([e]),this.nodes){var t,n=Ie(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(Pe){n.e(Pe)}finally{n.f()}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(r,o){return"proxyOf"===o?r:r[o]&&("each"===o||"string"==typeof o&&o.startsWith("walk")?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r[o].apply(r,Ne(t.map(function(n){return"function"==typeof n?function(e,t){return n(e.toProxy(),t)}:n})))}:"every"===o||"some"===o?function(i){return r[o](function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.apply(void 0,[e.toProxy()].concat(n))})}:"root"===o?function(){return r.root().toProxy()}:"nodes"===o?r.nodes.map(function(e){return e.toProxy()}):"first"===o||"last"===o?r[o].toProxy():r[o])},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),s=Ie(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o+1,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),s=Ie(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function H(e){return e.map(function(e){return e.nodes&&(e.nodes=H(e.nodes)),delete e.source,e})}(l(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Ie(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(Pe){i.e(Pe)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var a,s=Ie(e=e.nodes.slice(0));try{for(s.s();!(a=s.n()).done;){var u=a.value;u.parent&&u.parent.removeChild(u,"ignore")}}catch(Pe){s.e(Pe)}finally{s.f()}}else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new p(e)]}else if(e.selector)e=[new c(e)];else if(e.name)e=[new d(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new m(e)]}return e.map(function(e){return e[h]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[f]&&function c(e){if(e[f]=!1,e.proxyOf.nodes){var t,n=Ie(e.proxyOf.nodes);try{for(n.s();!(t=n.n()).done;)c(t.value)}catch(Pe){n.e(Pe)}finally{n.f()}}}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e})}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Ie(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,a,s=r.value,u=this.normalize(s,this.first,"prepend").reverse(),l=Ie(u);try{for(l.s();!(o=l.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(a in this.indexes)this.indexes[a]=this.indexes[a]+u.length}}catch(Pe){i.e(Pe)}finally{i.f()}return this.markDirty(),this}},{key:"push",value:function(e){return(e.parent=this).proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e,t=Ie(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(Pe){t.e(Pe)}finally{t.f()}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,n,r){return r||(r=n,n={}),this.walkDecls(function(e){n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(r){return this.each(function(e,t){var n;try{n=r(e,t)}catch(b){throw e.addToError(b)}return n=!1!==n&&e.walk?e.walk(r):n})}},{key:"walkAtRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk(function(e,t){if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("atrule"===e.type)return r(e,t)}))}},{key:"walkComments",value:function(n){return this.walk(function(e,t){if("comment"===e.type)return n(e,t)})}},{key:"walkDecls",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk(function(e,t){if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("decl"===e.type)return r(e,t)}))}},{key:"walkRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk(function(e,t){if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("rule"===e.type)return r(e,t)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}])).registerParse=function(e){l=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){d=e},n.registerRoot=function(e){t=e},((W1=n)["default"]=n).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,d.prototype):"rule"===e.type?Object.setPrototypeOf(e,c.prototype):"decl"===e.type?Object.setPrototypeOf(e,p.prototype):"comment"===e.type?Object.setPrototypeOf(e,m.prototype):"root"===e.type&&Object.setPrototypeOf(e,t.prototype),e[h]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),W1;function g(){return b(this,g),v(this,g,arguments)}}function Ik(){var t,n,e;return V1||(V1=1,e=Mk(),U(r,e),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(q1=e)["default"]=e),q1;function r(e){return b(this,r),(e=v(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function Ak(){if(J1)return G1;J1=1;var t={};return G1=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Pk(){var r;return Z1||(Z1=1,r=k(function r(e){var t,n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};for(t in b(this,r),this.type="warning",this.text=e,n.node&&n.node.source&&(e=n.node.rangeBy(n),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),n)this[t]=n[t]},[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),($1=r)["default"]=r),$1}function Dk(){var n,r;return Y1||(Y1=1,n=Pk(),r=k(function r(e,t,n){b(this,r),this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0},[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new n(e,t));return this.messages.push(e),e}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),(K1=r)["default"]=r),K1}function Lk(){var e,t;return tk||(tk=1,e=Mk(),U(r,e),t=k(r,[{key:"append",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return J(r,"append",this,3)(t)}},{key:"prepend",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return J(r,"prepend",this,3)(t)}}]),(ek=t)["default"]=t,e.registerAtRule(t)),ek;function r(e){return b(this,r),(e=v(this,r,[e])).type="atrule",e}}function Nk(){var t,n,e,r;return rk||(rk=1,e=Mk(),U(o,e),(r=k(o,[{key:"normalize",value:function(e,t,n){e=J(o,"normalize",this,3)([e]);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var r,i=Ie(e);try{for(i.s();!(r=i.n()).done;)r.value.raws.before=t.raws.before}catch(Pe){i.e(Pe)}finally{i.f()}}return e}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),J(o,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},nk=r,e.registerRoot(r["default"]=r)),nk;function o(e){return b(this,o),(e=v(this,o,[e])).type="root",e.nodes||(e.nodes=[]),e}}function Fk(){var t;return ok||(ok=1,(ik=t={comma:function(e){return t.split(e,[","],!0)},space:function(e){return t.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",a=!1,s=0,u=!1,l="",c=!1,d=Ie(e);try{for(d.s();!(r=d.n()).done;){var f=r.value;c?c=!1:"\\"===f?c=!0:u?f===l&&(u=!1):'"'===f||"'"===f?(u=!0,l=f):"("===f?s+=1:")"===f?0<s&&--s:0===s&&t.includes(f)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=f}}catch(Pe){d.e(Pe)}finally{d.f()}return!n&&""===o||i.push(o.trim()),i}})["default"]=t),ik}function Uk(){var e,t,n;return sk||(sk=1,e=Mk(),t=Fk(),U(r,e),n=k(r,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}}]),(ak=n)["default"]=n,e.registerRule(n)),ak;function r(e){return b(this,r),(e=v(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function jk(){if(lk)return uk;lk=1;var p=Ck(),e=function(){if(Q1)return X1;Q1=1;var w="'".charCodeAt(0),b='"'.charCodeAt(0),k="\\".charCodeAt(0),S="/".charCodeAt(0),_="\n".charCodeAt(0),E=" ".charCodeAt(0),C="\f".charCodeAt(0),R="\t".charCodeAt(0),O="\r".charCodeAt(0),x="[".charCodeAt(0),T="]".charCodeAt(0),M="(".charCodeAt(0),I=")".charCodeAt(0),A="{".charCodeAt(0),P="}".charCodeAt(0),D=";".charCodeAt(0),L="*".charCodeAt(0),N=":".charCodeAt(0),F="@".charCodeAt(0),U=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,z=/.[\r\n"'(/\\]/,B=/[\da-f]/i;return X1=function(t){var r,i,o,a,s,u,l,c,d,e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},f=t.css.valueOf(),h=e.ignoreErrors,p=f.length,m=0,g=[],v=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&p<=m},nextToken:function(e){if(v.length)return v.pop();if(!(p<=m)){var t=!!e&&e.ignoreUnclosed;switch(r=f.charCodeAt(m)){case _:case E:case R:case O:case C:for(i=m;i+=1,(r=f.charCodeAt(i))===E||r===_||r===R||r===O||r===C;);d=["space",f.slice(m,i)],m=i-1;break;case x:case T:case A:case P:case N:case D:case I:var n=String.fromCharCode(r);d=[n,n,m];break;case M:if(l=g.length?g.pop()[1]:"",c=f.charCodeAt(m+1),"url"===l&&c!==w&&c!==b&&c!==E&&c!==_&&c!==R&&c!==C&&c!==O){i=m;do{if(s=!1,-1===(i=f.indexOf(")",i+1))){if(h||t){i=m;break}y("bracket")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["brackets",f.slice(m,i+1),m,i],m=i}else i=f.indexOf(")",m+1),l=f.slice(m,i+1),-1===i||z.test(l)?d=["(","(",m]:(d=["brackets",l,m,i],m=i);break;case w:case b:o=r===w?"'":'"',i=m;do{if(s=!1,-1===(i=f.indexOf(o,i+1))){if(h||t){i=m+1;break}y("string")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["string",f.slice(m,i+1),m,i],m=i;break;case F:U.lastIndex=m+1,U.test(f),i=0===U.lastIndex?f.length-1:U.lastIndex-2,d=["at-word",f.slice(m,i+1),m,i],m=i;break;case k:for(i=m,a=!0;f.charCodeAt(i+1)===k;)i+=1,a=!a;if(r=f.charCodeAt(i+1),a&&r!==S&&r!==E&&r!==_&&r!==R&&r!==O&&r!==C&&(i+=1,B.test(f.charAt(i)))){for(;B.test(f.charAt(i+1));)i+=1;f.charCodeAt(i+1)===E&&(i+=1)}d=["word",f.slice(m,i+1),m,i],m=i;break;default:m=(r===S&&f.charCodeAt(m+1)===L?(0===(i=f.indexOf("*/",m+2)+1)&&(h||t?i=f.length:y("comment")),d=["comment",f.slice(m,i+1),m,i]):(j.lastIndex=m+1,j.test(f),i=0===j.lastIndex?f.length-1:j.lastIndex-2,d=["word",f.slice(m,i+1),m,i],g.push(d)),i)}return m++,d}},position:function(){return m}}}}(),n=Tk(),l=Lk(),t=Nk(),r=Uk(),f={empty:!0,space:!0};return uk=k(function N(e){b(this,N),this.input=e,this.root=new t,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new l;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&0<u.length?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(0<s.length){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(s.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;0<=i&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i,o=0,a=Ie(e.entries());try{for(a.s();!(i=a.n()).done;){var s=Le(i.value,2),u=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return u}this.doubleColon(t)}r=t}}catch(Pe){a.e(Pe)}finally{a.f()}return!1}},{key:"comment",value:function(e){var t=new n,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}},{key:"createTokenizer",value:function(){this.tokenizer=e(this.input)}},{key:"decl",value:function(e,t){var n=new p;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;0<=t;t--){var n=e[t],n=n[3]||n[2];if(n)return n}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var u=e.length-1;0<=u;u--){if("!important"===(r=e[u])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,u);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),d="",f=u;0<f;f--){var h=c[f][0];if(0===d.trim().indexOf("!")&&"space"!==h)break;d=c.pop()[1]+d}0===d.trim().indexOf("!")&&(n.important=!0,n.raws.important=d,e=c)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new r;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t,n=!1,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],u=e;u;){if(t=u[0],s.push(u),"("===t||"["===t)i=i||u,o.push("("===t?")":"]");else if(a&&r&&"{"===t)i=i||u,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(s,a);break}if("{"===t)return void this.rule(s);if("}"===t){this.tokenizer.back(s.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,s,u=n.length,l="",c=!0,d=0;d<u;d+=1)"space"===(a=(i=n[d])[0])&&d===u-1&&!r||"comment"===a&&(a=n[d-1]?n[d-1][0]:"empty",o=n[d+1]?n[d+1][0]:"empty",f[a]||f[o]||","===l.slice(-1))?c=!1:l+=i[1];c||(s=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:s,value:l}),e[t]=l}},{key:"rule",value:function(e){e.pop();var t=new r;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}])}function zk(){var e,n,r;return dk||(dk=1,e=Mk(),n=jk(),r=Ok(),ck=t,e.registerParse(t["default"]=t)),ck;function t(e,t){e=new r(e,t),e=new n(e);try{e.parse()}catch(w){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===w.name&&t&&t.from&&(/\.scss$/i.test(t.from)?w.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?w.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(w.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),w}return e.root}}function Bk(){var d,a,n,r,u,s,i,c,l,e,o,f,h,p,t,m;return hk||(hk=1,t=kk(),d=t.isClean,a=t.my,n=xk(),r=_k(),u=Mk(),s=Ik(),i=Ak(),c=Dk(),l=zk(),e=Nk(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0},p={},(t=k(function s(e,t,n){var r,i=this;if(b(this,s),this.stringified=!1,this.processed=!1,"object"!==T(t)||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof s||t instanceof c)r=w(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var o=l;n.syntax&&(o=n.syntax.parse),(o=n.parser?n.parser:o).parse&&(o=o.parse);try{r=o(t,n)}catch(X){this.processed=!0,this.error=X}r&&!r[a]&&u.rebuild(r)}else r=w(t);this.result=new c(e,r,n),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===T(e)&&e.prepare?Ae(Ae({},e),e.prepare(i.result)):e})},[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n,r,i,o,a,s=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?s.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=s.postcssPlugin,r=s.postcssVersion,i=this.result.processor.version,o=r.split("."),a=i.split("."),o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=s.postcssPlugin,e.setMessage())}catch(Pe){console&&console.error&&console.error(Pe)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};var e,t=function(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])},n=Ie(this.plugins);try{for(n.s();!(e=n.n()).done;){var i=e.value;if("object"===T(i))for(var o in i){if(!f[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event ".concat(o," in ").concat(i.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[o])if("object"===T(i[o]))for(var a in i[o])t(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&t(i,o,i[o])}}}catch(Pe){n.e(Pe)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(m=S(W().m(function e(){var t,i,n,r,o,a,s,u,l,c=this;return W().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(s=this.plugins[t],g(s=this.runOnRoot(s)))return e.p=2,e.n=3,s;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,s=e.v,this.handleError(s);case 5:t++,e.n=1;break;case 6:if(this.prepareVisitors(),!this.hasListener){e.n=21;break}i=this.result.root;case 7:if(i[d]){e.n=14;break}i[d]=!0,n=[y(i)];case 8:if(0<n.length){if(g(u=this.visitTick(n)))return e.p=9,e.n=10,u;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,u=e.v,l=n[n.length-1].node,this.handleError(u,l);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Ie(this.listeners.OnceExit),e.p=15,a=W().m(function f(){var t,n,r;return W().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=Le(o.value,2),r=n[0],t=n[1],c.result.lastPlugin=r,e.p=1,"document"===i.type)return n=i.nodes.map(function(e){return t(e,c.helpers)}),e.n=2,Promise.all(n);e.n=3;break;case 2:e.n=4;break;case 3:return e.n=4,t(i,c.helpers);case 4:e.n=6;break;case 5:throw e.p=5,r=e.v,c.handleError(r);case 6:return e.a(2)}},f,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(q(a()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,l=e.v,r.e(l);case 20:return e.p=20,r.f(),e.f(20);case 21:return this.processed=!0,e.a(2,this.stringify())}},e,this,[[15,19,20,21],[9,11],[2,4]])})),function(){return m.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===T(t)&&t.Once?"document"===this.result.root.type?g((e=this.result.root.nodes.map(function(e){return t.Once(e,n.helpers)}))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(X){throw this.handleError(X)}}},{key:"stringify",value:function(){if(this.error)throw this.error;var e,t;return this.stringified||(this.stringified=!0,this.sync(),t=this.result.opts,e=r,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new n(e,this.result.root,this.result.opts).generate(),this.result.css=t[0],this.result.map=t[1]),this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();var e,t=Ie(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(g(this.runOnRoot(n)))throw this.getAsyncError()}}catch(Pe){t.e(Pe)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[d];)r[d]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Ie(r.nodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}}catch(Pe){o.e(Pe)}finally{o.f()}}else this.visitSync(this.listeners.OnceExit,r)}}return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n,r=Ie(e);try{for(r.s();!(n=r.n()).done;){var i=Le(n.value,2),o=i[0],a=i[1],s=(this.result.lastPlugin=o,void 0);try{s=a(t,this.helpers)}catch(u){throw this.handleError(u,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(s))throw this.getAsyncError()}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"visitTick",value:function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var i=Le(r[t.visitorIndex],2),o=i[0],i=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return i(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(0!==t.iterator){for(var a,s=t.iterator;a=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!a[d])return a[d]=!0,void e.push(y(a));t.iterator=0,delete n.indexes[s]}for(var u=t.events;t.eventIndex<u.length;){var l=u[t.eventIndex];if(t.eventIndex+=1,0===l)return void(n.nodes&&n.nodes.length&&(n[d]=!0,t.iterator=n.getIterator()));if(this.listeners[l])return void(t.visitors=this.listeners[l])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[d]=!0;var n,r=Ie(v(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[d]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}])).registerPostcss=function(e){p=e},fk=t,e.registerLazyResult(t["default"]=t),s.registerLazyResult(t)),fk;function g(e){return"object"===T(e)&&"function"==typeof e.then}function v(e){var t=!1,n=o[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[d]=!1,e.nodes&&e.nodes.forEach(w),e}}function Wk(){var n,r,t,e,i,o,a,s,u,l,c;return vk||(vk=1,mk||(mk=1,o=xk(),a=_k(),s=Ak(),u=zk(),l=Dk(),c=k(function c(e,t,n){b(this,c),t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var e=a,r=(this.result=new l(this._processor,void 0,this._opts),this.result.css=t,this),n=(Object.defineProperty(this.result,"root",{get:function(){return r.root}}),new o(e,void 0,this._opts,t));n.isMap()?(t=(e=Le(n.generate(),2))[0],e=e[1],t&&(this.result.css=t),e&&(this.result.map=e)):(n.clearAnnotation(),this.result.css=n.css)},[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this._opts||s("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=u;try{e=t(this._css,this._opts)}catch(X){this.error=X}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(pk=c)["default"]=c),n=pk,r=Bk(),t=Ik(),e=Nk(),i=k(function t(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:[];b(this,t),this.version="8.4.38",this.plugins=this.normalize(e)},[{key:"normalize",value:function(e){var t,n=[],r=Ie(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===T(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===T(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==T(i)||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(Pe){r.e(Pe)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?r:n)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(gk=i)["default"]=i,e.registerProcessor(i),t.registerProcessor(i)),gk}LR||(LR=1,Fr=S1(),Hk=Ck(),jd=Bk(),OE=Mk(),qk=Wk(),XR=_k(),$R||($R=1,Kk=Ck(),Yk=Rk(),Xk=Tk(),Qk=Lk(),eS=Ok(),tS=Nk(),nS=Uk(),(yk=rS)["default"]=rS),i=yk,Vk=Ik(),Me=Pk(),Gk=Tk(),Jk=Lk(),cv=Dk(),Te=Ok(),t=zk(),Ue=Fk(),$k=Uk(),Zk=Nk(),e=Ek(),iS.plugin=function(t,n){var e,r=!1;function i(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");var e=n.apply(void 0,arguments);return e.postcssPlugin=t,e.postcssVersion=(new qk).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return iS([i(n)]).process(e,t)},i},iS.stringify=XR,iS.parse=t,iS.fromJSON=i,iS.list=Ue,iS.comment=function(e){return new Gk(e)},iS.atRule=function(e){return new Jk(e)},iS.decl=function(e){return new Hk(e)},iS.rule=function(e){return new $k(e)},iS.root=function(e){return new Zk(e)},iS.document=function(e){return new Vk(e)},iS.CssSyntaxError=Fr,iS.Declaration=Hk,iS.Container=OE,iS.Processor=qk,iS.Document=Vk,iS.Comment=Gk,iS.Warning=Me,iS.AtRule=Jk,iS.Result=cv,iS.Input=Te,iS.Rule=$k,iS.Root=Zk,iS.Node=e,jd.registerPostcss(iS),(wk=iS)["default"]=iS);var Hk,qk,Vk,Gk,Jk,$k,Zk,Kk,Yk,Xk,Qk,eS,tS,nS,st=(qr=wk)&&qr.__esModule&&Object.prototype.hasOwnProperty.call(qr,"default")?qr["default"]:qr;function rS(e,t){if(Array.isArray(e))return e.map(function(e){return rS(e)});var n,r=e.inputs,i=B(e,E0);if(r){t=[];var o,a=Ie(r);try{for(a.s();!(o=a.n()).done;){var s=Ae(Ae({},o.value),{},{__proto__:eS.prototype});s.map&&(s.map=Ae(Ae({},s.map),{},{__proto__:Yk.prototype})),t.push(s)}}catch(Pe){a.e(Pe)}finally{a.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return rS(e,t)})),i.source&&(n=(r=i.source).inputId,r=B(r,C0),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new tS(i);if("decl"===i.type)return new Kk(i);if("rule"===i.type)return new nS(i);if("comment"===i.type)return new Xk(i);if("atrule"===i.type)return new Qk(i);throw new Error("Unknown node type: "+e.type)}function iS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new qk(t)}st.stringify;var oS=k(cS,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(e){if(e instanceof cS&&e.ownerDocument===this.ownerDocument){if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),aS={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},sS={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},uS={},lS={};function cS(){b(this,cS),h1(this,"parentElement",null),h1(this,"parentNode",null),h1(this,"ownerDocument"),h1(this,"firstChild",null),h1(this,"lastChild",null),h1(this,"previousSibling",null),h1(this,"nextSibling",null),h1(this,"ELEMENT_NODE",1),h1(this,"TEXT_NODE",3),h1(this,"nodeType"),h1(this,"nodeName"),h1(this,"RRNodeType")}function dS(e){if(uS[e])return uS[e];var t=globalThis[e],n=t.prototype,r=e in aS?aS[e]:void 0,r=Boolean(r&&r.every(function(e){return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),i=e in sS?sS[e]:void 0,i=Boolean(i&&i.every(function(e){return"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))}));if(r&&i&&!globalThis.Zone)return uS[e]=t.prototype,t.prototype;try{var o,a,s=document.createElement("iframe"),u=(s.style.display="none",document.body.appendChild(s),s.contentWindow);return u?(o=u[e].prototype)?((a=navigator.userAgent).includes("Safari")&&!a.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),lS[e]=function(){return s.remove()}):s.remove(),uS[e]=o):(s.remove(),n):t.prototype}catch(F){return n}}var fS={};function hS(e,t,n){var r="".concat(e,".").concat(String(n));return fS[r]?fS[r].call(t):(e=dS(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(fS[r]=e).call(t):t[n])}var pS={};function mS(e,t,n){var r="".concat(e,".").concat(String(n));return pS[r]?pS[r].bind(t):"function"!=typeof(e=dS(e)[n])?t[n]:(pS[r]=e).bind(t)}function gS(){var e;return[dS("MutationObserver").constructor,null!=(e=lS.MutationObserver)?e:function(){}]}var vS=Date.now;function yS(e,t,n){try{var r,i;return t in e?("function"==typeof(i=n(r=e[t]))&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}):function(){}}catch(De){return function(){}}}var wS={ownerDocument:function(e){return hS("Node",e,"ownerDocument")},childNodes:function(e){return hS("Node",e,"childNodes")},parentNode:function(e){return hS("Node",e,"parentNode")},parentElement:function(e){return hS("Node",e,"parentElement")},textContent:function(e){return hS("Node",e,"textContent")},contains:function(e,t){return mS("Node",e,"contains")(t)},getRootNode:function(e){return mS("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?hS("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?hS("Element",e,"shadowRoot"):null},querySelector:function(e,t){return hS("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return hS("Element",e,"querySelectorAll")(t)},nowTimestamp:vS=/[1-9][0-9]{12}/.test(Date.now().toString())?vS:function(){return(new Date).getTime()},mutationObserverCtor:gS,patch:yS};function bS(e,t,n){var r=2<arguments.length&&n!==undefined?n:document,i={capture:!0,passive:!0};return r.addEventListener(e,t,i),function(){return r.removeEventListener(e,t,i)}}var kS="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",l={map:{},getId:function(){return console.error(kS),-1},getNode:function(){return console.error(kS),null},removeNodeFromMap:function(){console.error(kS)},has:function(){return console.error(kS),!1},reset:function(){console.error(kS)}};function SS(a,s,e){var u=2<arguments.length&&e!==undefined?e:{},l=null,c=0;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Date.now(),i=(c||!1!==u.leading||(c=r),s-(r-c)),o=this;i<=0||s<i?(l&&(clearTimeout(l),l=null),c=r,a.apply(o,t)):l||!1===u.trailing||(l=setTimeout(function(){c=!1===u.leading?0:Date.now(),l=null,a.apply(o,t)},i))}}function _S(e,t,n,r,i){var i=4<arguments.length&&i!==undefined?i:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return _S(e,t,o||{},!0)}}function ES(e){var t,n=e.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:n.documentElement.scrollLeft||(null==n?void 0:n.body)&&(null==(t=wS.parentElement(n.body))?void 0:t.scrollLeft)||(null==(t=null==n?void 0:n.body)?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==n?void 0:n.documentElement.scrollTop)||(null==n?void 0:n.body)&&(null==(t=wS.parentElement(n.body))?void 0:t.scrollTop)||(null==(e=null==n?void 0:n.body)?void 0:e.scrollTop)||0}}function CS(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function RS(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function OS(e){return e?e.nodeType===e.ELEMENT_NODE?e:wS.parentElement(e):null}function xS(e,t,n,r){if(e){e=OS(e);if(e){try{if("string"==typeof t){if(e.classList.contains(t))return 1;if(r&&null!==e.closest("."+t))return 1}else if(mw(e,t,r))return 1}catch(De){}if(n){if(e.matches(n))return 1;if(r&&null!==e.closest(n))return 1}}}}function TS(e,t,n){return"TITLE"===e.tagName&&n.headTitleMutations||-2===t.getId(e)}function MS(e){return Boolean(e.changedTouches)}function IS(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function AS(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function PS(e){return e&&(e instanceof oS&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(wS.shadowRoot(e)))}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(l,{get:function(e,t,n){return"map"===t&&console.error(kS),Reflect.get(e,t,n)}});var DS=k(function u(){b(this,u),p(this,"id",1),p(this,"styleIDMap",new WeakMap),p(this,"idStyleMap",new Map)},[{key:"getId",value:function(e){return null!=(e=this.styleIDMap.get(e))?e:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(t=void 0===t?this.id++:t,this.styleIDMap.set(e,t),this.idStyleMap.set(t,e),t)}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]);function LS(e){var t,n=null;return n="getRootNode"in e&&(null==(t=wS.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&wS.host(wS.getRootNode(e))?wS.host(wS.getRootNode(e)):n}function NS(e){var n,t=wS.ownerDocument(e);return t&&(wS.contains(t,e)||(n=e,!!(t=wS.ownerDocument(n))&&(e=function(){for(var e,t=n;e=LS(t);)t=e;return t}(),wS.contains(t,e))))}(a={})[a.DomContentLoaded=0]="DomContentLoaded",a[a.Load=1]="Load",a[a.FullSnapshot=2]="FullSnapshot",a[a.IncrementalSnapshot=3]="IncrementalSnapshot",a[a.Meta=4]="Meta",a[a.Custom=5]="Custom",a[a.Plugin=6]="Plugin",a[a.Asset=7]="Asset";var FS=a,US=((n=US||{})[n.Mutation=0]="Mutation",n[n.MouseMove=1]="MouseMove",n[n.MouseInteraction=2]="MouseInteraction",n[n.Scroll=3]="Scroll",n[n.ViewportResize=4]="ViewportResize",n[n.Input=5]="Input",n[n.TouchMove=6]="TouchMove",n[n.MediaInteraction=7]="MediaInteraction",n[n.StyleSheetRule=8]="StyleSheetRule",n[n.CanvasMutation=9]="CanvasMutation",n[n.Font=10]="Font",n[n.Log=11]="Log",n[n.Drag=12]="Drag",n[n.StyleDeclaration=13]="StyleDeclaration",n[n.Selection=14]="Selection",n[n.AdoptedStyleSheet=15]="AdoptedStyleSheet",n[n.CustomElement=16]="CustomElement",n),jS=((LR=jS||{})[LR.MouseUp=0]="MouseUp",LR[LR.MouseDown=1]="MouseDown",LR[LR.Click=2]="Click",LR[LR.ContextMenu=3]="ContextMenu",LR[LR.DblClick=4]="DblClick",LR[LR.Focus=5]="Focus",LR[LR.Blur=6]="Blur",LR[LR.TouchStart=7]="TouchStart",LR[LR.TouchMove_Departed=8]="TouchMove_Departed",LR[LR.TouchEnd=9]="TouchEnd",LR[LR.TouchCancel=10]="TouchCancel",LR),zS=(($R=zS||{})[$R.Mouse=0]="Mouse",$R[$R.Pen=1]="Pen",$R[$R.Touch=2]="Touch",$R),BS=((XR={})[XR["2D"]=0]="2D",XR[XR.WebGL=1]="WebGL",XR[XR.WebGL2=2]="WebGL2",XR),WS=((t=WS||{})[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t),HS=((i={})[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i);function qS(e){return"__ln"in e}var VS,GS=k(function u(){b(this,u),p(this,"length",0),p(this,"head",null),p(this,"tail",null)},[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t,n={value:e,previous:null,next:null};e.__ln=n,e.previousSibling&&qS(e.previousSibling)?(t=e.previousSibling.__ln.next,n.next=t,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,t&&(t.previous=n)):e.nextSibling&&qS(e.nextSibling)&&e.nextSibling.__ln.previous?(t=e.nextSibling.__ln.previous,n.previous=t,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,t&&(t.next=n)):(this.head&&(this.head.previous=n),n.next=this.head,this.head=n),null===n.next&&(this.tail=n),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),JS=function(e,t){return"".concat(e,"@").concat(t)},$S=k(function u(){var w=this;b(this,u),p(this,"frozen",!1),p(this,"locked",!1),p(this,"texts",[]),p(this,"attributes",[]),p(this,"attributeMap",new WeakMap),p(this,"removes",[]),p(this,"mapRemoves",[]),p(this,"movedMap",{}),p(this,"addedSet",new Set),p(this,"movedSet",new Set),p(this,"droppedSet",new Set),p(this,"removesSubTreeCache",new Set),p(this,"mutationCb"),p(this,"blockClass"),p(this,"blockSelector"),p(this,"maskTextClass"),p(this,"maskTextSelector"),p(this,"inlineStylesheet"),p(this,"maskInputOptions"),p(this,"maskTextFn"),p(this,"maskInputFn"),p(this,"keepIframeSrcFn"),p(this,"recordCanvas"),p(this,"inlineImages"),p(this,"slimDOMOptions"),p(this,"dataURLOptions"),p(this,"doc"),p(this,"mirror"),p(this,"iframeManager"),p(this,"stylesheetManager"),p(this,"shadowDomManager"),p(this,"canvasManager"),p(this,"processedNodeManager"),p(this,"unattachedDoc"),p(this,"processMutations",function(e){e.forEach(w.processMutation),w.emit()}),p(this,"emit",function(){if(!w.frozen&&!w.locked){for(var i=[],o=new Set,a=new GS,s=function(e){for(var t=e,n=-2;-2===n;)n=(t=t&&t.nextSibling)&&w.mirror.getId(t);return n},e=function(t){var e=wS.parentNode(t);if(e&&NS(t)){var n=!1;if(t.nodeType===Node.TEXT_NODE){var r=e.tagName;if("TEXTAREA"===r)return;"STYLE"===r&&w.addedSet.has(e)&&(n=!0)}r=W0(e)?w.mirror.getId(LS(t)):w.mirror.getId(e),e=s(t);if(-1===r||-1===e)return a.addNode(t);n=bw(t,{doc:w.doc,mirror:w.mirror,blockClass:w.blockClass,blockSelector:w.blockSelector,maskTextClass:w.maskTextClass,maskTextSelector:w.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:w.inlineStylesheet,maskInputOptions:w.maskInputOptions,maskTextFn:w.maskTextFn,maskInputFn:w.maskInputFn,slimDOMOptions:w.slimDOMOptions,dataURLOptions:w.dataURLOptions,recordCanvas:w.recordCanvas,inlineImages:w.inlineImages,onSerialize:function(e){IS(e,w.mirror)&&w.iframeManager.addIframe(e),AS(e,w.mirror)&&w.stylesheetManager.trackLinkElement(e),PS(t)&&w.shadowDomManager.addShadowRoot(wS.shadowRoot(t),w.doc)},onIframeLoad:function(e,t){w.iframeManager.attachIframe(e,t),w.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,t){w.stylesheetManager.attachLinkElement(e,t)},cssCaptured:n});n&&(i.push({parentId:r,nextId:e,node:n}),o.add(n.id))}};w.mapRemoves.length;)w.mirror.removeNodeFromMap(w.mapRemoves.shift());var t,n=Ie(w.movedSet);try{for(n.s();!(t=n.n()).done;){var r=t.value;KS(w.removesSubTreeCache,r,w.mirror)&&!w.movedSet.has(wS.parentNode(r))||e(r)}}catch(Pe){n.e(Pe)}finally{n.f()}var u,l=Ie(w.addedSet);try{for(l.s();!(u=l.n()).done;){var c=u.value;!YS(w.droppedSet,c)&&!KS(w.removesSubTreeCache,c,w.mirror)||YS(w.movedSet,c)?e(c):w.droppedSet.add(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(var d=null;a.length;){var f,h,p=null;if(!(p=d&&(f=w.mirror.getId(wS.parentNode(d.value)),h=s(d.value),-1!==f)&&-1!==h?d:p))for(var m=a.tail;m;){var g=m,m=m.previous;if(g){var v=w.mirror.getId(wS.parentNode(g.value));if(-1!==s(g.value)){if(-1!==v){p=g;break}v=g.value,v=wS.parentNode(v);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){v=wS.host(v);if(-1!==w.mirror.getId(v)){p=g;break}}}}}if(!p){for(;a.head;)a.removeNode(a.head.value);break}d=p.previous,a.removeNode(p.value),e(p.value)}var y={texts:w.texts.map(function(e){var t=e.node,n=wS.parentNode(t);return n&&"TEXTAREA"===n.tagName&&w.genTextAreaValueMutation(n),{id:w.mirror.getId(t),value:e.value}}).filter(function(e){return!o.has(e.id)}).filter(function(e){return w.mirror.has(e.id)}),attributes:w.attributes.map(function(e){var t,n,r=e.attributes;return"string"==typeof r.style&&(t=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles),t.length<r.style.length)&&(t+n).split("var(").length===r.style.split("var(").length&&(r.style=e.styleDiff),{id:w.mirror.getId(e.node),attributes:r}}).filter(function(e){return!o.has(e.id)}).filter(function(e){return w.mirror.has(e.id)}),removes:w.removes,adds:i};(y.texts.length||y.attributes.length||y.removes.length||y.adds.length)&&(w.texts=[],w.attributes=[],w.attributeMap=new WeakMap,w.removes=[],w.addedSet=new Set,w.movedSet=new Set,w.droppedSet=new Set,w.removesSubTreeCache=new Set,w.movedMap={},w.mutationCb(y))}}),p(this,"genTextAreaValueMutation",function(e){var t=w.attributeMap.get(e),n=(t||(w.attributes.push(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}}),w.attributeMap.set(e,t)),Array.from(wS.childNodes(e),function(e){return wS.textContent(e)||""}).join(""));t.attributes.value=J0({element:e,maskInputOptions:w.maskInputOptions,tagName:e.tagName,type:Z0(e),value:n,maskInputFn:w.maskInputFn})}),p(this,"processMutation",function(a){if(!TS(a.target,w.mirror,w.slimDOMOptions))switch(a.type){case"characterData":var e=wS.textContent(a.target);xS(a.target,w.blockClass,w.blockSelector,!1)||e===a.oldValue||w.texts.push({value:gw(a.target,w.maskTextClass,w.maskTextSelector,!0)&&e?w.maskTextFn?w.maskTextFn(e,OS(a.target)):e.replace(/[\S]/g,"*"):e,node:a.target});break;case"attributes":var t,n=a.target,e=a.attributeName,s=a.target.getAttribute(e);if("value"===e&&(t=Z0(n),s=J0({element:n,maskInputOptions:w.maskInputOptions,tagName:n.tagName,type:t,value:s,maskInputFn:w.maskInputFn})),!xS(a.target,w.blockClass,w.blockSelector,!1)&&s!==a.oldValue){var r=w.attributeMap.get(a.target);if("IFRAME"===n.tagName&&"src"===e&&!w.keepIframeSrcFn(s)){if(n.contentDocument)return;e="rr_src"}if(r||(r={node:a.target,attributes:{},styleDiff:{},_unchangedStyles:{}},w.attributes.push(r),w.attributeMap.set(a.target,r)),"type"===e&&"INPUT"===n.tagName&&"password"===(a.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!pw(n.tagName,e))if(r.attributes[e]=hw(w.doc,$0(n.tagName),$0(e),s),"style"===e){if(!w.unattachedDoc)try{w.unattachedDoc=document.implementation.createHTMLDocument()}catch(W){w.unattachedDoc=w.doc}var i=w.unattachedDoc.createElement("span");a.oldValue&&i.setAttribute("style",a.oldValue);for(var o=0,u=Array.from(n.style);o<u.length;o++){var l=u[o],c=n.style.getPropertyValue(l),d=n.style.getPropertyPriority(l);c!==i.style.getPropertyValue(l)||d!==i.style.getPropertyPriority(l)?r.styleDiff[l]=""===d?c:[c,d]:r._unchangedStyles[l]=[c,d]}for(var f=0,h=Array.from(i.style);f<h.length;f++){var p=h[f];""===n.style.getPropertyValue(p)&&(r.styleDiff[p]=!1)}}else"open"===e&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal")}break;case"childList":return xS(a.target,w.blockClass,w.blockSelector,!0)?void 0:"TEXTAREA"===a.target.tagName?void w.genTextAreaValueMutation(a.target):(a.addedNodes.forEach(function(e){return w.genAdds(e,a.target)}),void a.removedNodes.forEach(function(e){var t=w.mirror.getId(e),n=W0(a.target)?w.mirror.getId(wS.host(a.target)):w.mirror.getId(a.target);if(!xS(a.target,w.blockClass,w.blockSelector,!1)&&!TS(e,w.mirror,w.slimDOMOptions)&&-1!==w.mirror.getId(e)){if(w.addedSet.has(e))ZS(w.addedSet,e),w.droppedSet.add(e);else if(!(w.addedSet.has(a.target)&&-1===t||function s(e,t){var n;return!W0(e)&&(n=t.getId(e),!t.has(n)||(!(n=wS.parentNode(e))||n.nodeType!==e.DOCUMENT_NODE)&&(!n||s(n,t)))}(a.target,w.mirror)))if(w.movedSet.has(e)&&w.movedMap[JS(t,n)])ZS(w.movedSet,e);else{w.removes.push({parentId:n,id:t,isShadow:!(!W0(a.target)||!H0(a.target))||void 0});for(var r=w.removesSubTreeCache,i=[e];i.length;){var o=i.pop();r.has(o)||(r.add(o),wS.childNodes(o).forEach(function(e){return i.push(e)}))}}w.mapRemoves.push(e)}}))}}),p(this,"genAdds",function(t,e){if(!w.processedNodeManager.inOtherBuffer(t,w)&&!w.addedSet.has(t)&&!w.movedSet.has(t)){if(w.mirror.hasNode(t)){if(TS(t,w.mirror,w.slimDOMOptions))return;w.movedSet.add(t);var n=null;(n=e&&w.mirror.hasNode(e)?w.mirror.getId(e):n)&&-1!==n&&(w.movedMap[JS(w.mirror.getId(t),n)]=!0)}else w.addedSet.add(t),w.droppedSet["delete"](t);xS(t,w.blockClass,w.blockSelector,!1)||(wS.childNodes(t).forEach(function(e){return w.genAdds(e)}),PS(t)&&wS.childNodes(wS.shadowRoot(t)).forEach(function(e){w.processedNodeManager.add(e,w),w.genAdds(e,t)}))}})},[{key:"init",value:function(t){var n=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(e){n[e]=t[e]})}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]);function ZS(t,e){t["delete"](e),wS.childNodes(e).forEach(function(e){return ZS(t,e)})}function KS(e,t){return 0!==e.size&&(e=e,t=wS.parentNode(t))&&e.has(t)}function YS(e,t){return 0!==e.size&&function S(e,t){t=wS.parentNode(t);return!!t&&(!!e.has(t)||S(e,t))}(e,t)}var XS=function(e){return VS?function(){try{return e.apply(void 0,arguments)}catch(X){if(!VS||!0!==VS(X))throw X}}:e},QS=[];function e_(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(S){}return e&&e.target}function t_(e,t){var n=new $S,e=(QS.push(n),n.init(e),Le(gS(),2)),r=e[0],e=e[1],n=new r(XS(n.processMutations.bind(n)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[n,e]}function n_(e){var t,r,a,s=e.mouseInteractionCb,i=e.doc,u=e.mirror,l=e.blockClass,c=e.blockSelector,e=e.sampling;return!1===e.mouseInteraction?function(){}:(t=!0===e.mouseInteraction||void 0===e.mouseInteraction?{}:e.mouseInteraction,r=[],a=null,Object.keys(jS).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==t[e]}).forEach(function(e){var o,t=$0(e),n=(o=e,function(e){var t=e_(e);if(!xS(t,l,c,!0)){var n=null,r=o;if("pointerType"in e){switch(e.pointerType){case"mouse":n=zS.Mouse;break;case"touch":n=zS.Touch;break;case"pen":n=zS.Pen}n===zS.Touch?jS[o]===jS.MouseDown?r="TouchStart":jS[o]===jS.MouseUp&&(r="TouchEnd"):zS.Pen}else MS(e)&&(n=zS.Touch);null!==n?(a=n,(r.startsWith("Touch")&&n===zS.Touch||r.startsWith("Mouse")&&n===zS.Mouse)&&(n=null)):jS[o]===jS.Click&&(n=a,a=null);var i,e=MS(e)?e.changedTouches[0]:e;e&&(t=u.getId(t),i=e.clientX,e=e.clientY,XS(s)(Ae({type:jS[r],id:t,x:i,y:e},null!==n&&{pointerType:n})))}});if(window.PointerEvent)switch(jS[e]){case jS.MouseDown:case jS.MouseUp:t=t.replace("mouse","pointer");break;case jS.TouchStart:case jS.TouchEnd:return}r.push(bS(t,n,i))}),XS(function(){r.forEach(function(e){return e()})}))}function r_(e){var r=e.scrollCb,i=e.doc,o=e.mirror,a=e.blockClass,s=e.blockSelector,e=e.sampling;return bS("scroll",XS(SS(XS(function(e){var t,n,e=e_(e);e&&!xS(e,a,s,!0)&&(t=o.getId(e),e===i&&i.defaultView?(n=ES(i.defaultView),r({id:t,x:n.left,y:n.top})):r({id:t,x:e.scrollLeft,y:e.scrollTop}))}),e.scroll||100)),i)}var i_=["INPUT","TEXTAREA","SELECT"],o_=new WeakMap;function a_(e){return function m(e,t){var n;return c_("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||c_("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||c_("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||c_("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?(n=Array.from(e.parentRule.cssRules).indexOf(e),t.unshift(n),m(e.parentRule,t)):(e.parentStyleSheet&&(n=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(n)),t)}(e,[])}function s_(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function u_(e,t){var n,r=e.mirror,i=e.stylesheetManager,o="#document"===t.nodeName?r.getId(t):r.getId(wS.host(t)),e="#document"===t.nodeName?null==(e=t.defaultView)?void 0:e.Document:null==(r=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:r.ShadowRoot,a=null!=e&&e.prototype?Object.getOwnPropertyDescriptor(null==e?void 0:e.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&e&&a?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:function(){var e;return null==(e=a.get)?void 0:e.call(this)},set:function(e){var t=null==(t=a.set)?void 0:t.call(this,e);if(null!==o&&-1!==o)try{i.adoptStyleSheets(e,o)}catch(n){}return t}}),XS(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})})):function(){}}function l_(e){var t,n,L,N,F,U,j,z,B,W,H,q,V,G,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},i=e.doc.defaultView;if(!i)return function(){};t=r,n=(r=e).mutationCb,L=r.mousemoveCb,N=r.mouseInteractionCb,F=r.scrollCb,U=r.viewportResizeCb,j=r.inputCb,z=r.mediaInteractionCb,B=r.styleSheetRuleCb,W=r.styleDeclarationCb,H=r.canvasMutationCb,q=r.fontCb,V=r.selectionCb,G=r.customElementCb,r.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},r.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),L.apply(void 0,arguments)},r.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),N.apply(void 0,arguments)},r.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),F.apply(void 0,arguments)},r.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),U.apply(void 0,arguments)},r.inputCb=function(){t.input&&t.input.apply(t,arguments),j.apply(void 0,arguments)},r.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),z.apply(void 0,arguments)},r.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),B.apply(void 0,arguments)},r.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),W.apply(void 0,arguments)},r.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),H.apply(void 0,arguments)},r.fontCb=function(){t.font&&t.font.apply(t,arguments),q.apply(void 0,arguments)},r.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),V.apply(void 0,arguments)},r.customElementCb=function(){t.customElement&&t.customElement.apply(t,arguments),G.apply(void 0,arguments)};var o,J,$,Z,K,Y,X,Q,a,ee,te,ne,re,s,u,ie,l,c,d,oe,f,h,p,m,ae,se,ue,le,g,v,y,ce,w,b,k,S,_,E,C,R,de=function(){},fe=(e.recordDOM&&(r=t_(e,e.doc),r=Le(r,2),o=r[0],de=r[1]),ue=(r=e).mousemoveCb,x=r.doc,le=r.mirror,!1===(O=r.sampling).mousemove?function(){}:(r="number"==typeof O.mousemove?O.mousemove:50,O="number"==typeof O.mousemoveCallback?O.mousemoveCallback:500,m=[],ae=SS(XS(function(e){var t=Date.now()-p;ue(m.map(function(e){return e.timeOffset-=t,e}),e),m=[],p=null}),O),O=XS(SS(XS(function(e){var t=e_(e),n=MS(e)?e.changedTouches[0]:e,r=n.clientX,n=n.clientY;p=p||vS(),m.push({x:r,y:n,id:le.getId(t),timeOffset:vS()-p}),ae("undefined"!=typeof DragEvent&&e instanceof DragEvent?US.Drag:e instanceof MouseEvent?US.MouseMove:US.TouchMove)}),r,{trailing:!1})),se=[bS("mousemove",O,x),bS("touchmove",O,x),bS("drag",O,x)],XS(function(){se.forEach(function(e){return e()})}))),he=n_(e),pe=r_(e),me=(r={win:i},oe=(O=e).viewportResizeCb,O=r.win,h=f=-1,bS("resize",XS(SS(XS(function(){var e=CS(),t=RS();f===e&&h===t||(oe({width:Number(t),height:Number(e)}),f=e,h=t)}),200)),O)),ge=(Q=(x=e).inputCb,a=x.doc,ee=x.mirror,te=x.blockClass,ne=x.blockSelector,re=x.ignoreClass,s=x.ignoreSelector,u=x.maskInputOptions,ie=x.maskInputFn,l=x.userTriggeredOnInput,c=("last"===x.sampling.input?["change"]:["input","change"]).map(function(e){return bS(e,XS(Se),a)}),(d=a.defaultView)?(x=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),r=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]],x&&x.set&&c.push.apply(c,Ne(r.map(function(e){return _S(e[0],e[1],{set:function(){XS(Se)({target:this,isTrusted:!1})}},!1,d)}))),XS(function(){c.forEach(function(e){return e()})})):function(){c.forEach(function(e){return e()})}),ve=(J=(O=e).mediaInteractionCb,$=O.blockClass,Z=O.blockSelector,K=O.mirror,Y=O.sampling,O=O.doc,x=XS(function(a){return SS(XS(function(e){var t,n,r,i,o,e=e_(e);e&&!xS(e,$,Z,!0)&&(t=e.currentTime,n=e.volume,r=e.muted,i=e.playbackRate,o=e.loop,J({type:a,id:K.getId(e),currentTime:t,volume:n,muted:r,playbackRate:i,loop:o}))}),Y.media||500)}),X=[bS("play",x(WS.Play),O),bS("pause",x(WS.Pause),O),bS("seeked",x(WS.Seeked),O),bS("volumechange",x(WS.VolumeChange),O),bS("ratechange",x(WS.RateChange),O)],XS(function(){X.forEach(function(e){return e()})})),ye=function(){},we=function(){},be=function(){},ke=function(){};function Se(e){var t,n,r,i=e_(e),e=e.isTrusted,o=i&&i.tagName;!(i=i&&"OPTION"===o?wS.parentElement(i):i)||!o||i_.indexOf(o)<0||xS(i,te,ne,!0)||i.classList.contains(re)||s&&i.matches(s)||(t=i.value,n=!1,"radio"===(r=Z0(i)||"")||"checkbox"===r?n=i.checked:(u[o.toLowerCase()]||u[r])&&(t=J0({element:i,maskInputOptions:u,tagName:o,type:r,value:t,maskInputFn:ie})),_e(i,l?{text:t,isChecked:n,userTriggered:e}:{text:t,isChecked:n}),o=i.name,"radio"===r&&o&&n&&a.querySelectorAll('input[type="radio"][name="'.concat(o,'"]')).forEach(function(e){var t;e!==i&&(t=e.value,_e(e,l?{text:t,isChecked:!n,userTriggered:!1}:{text:t,isChecked:!n}))}))}function _e(e,t){var n=o_.get(e);n&&n.text===t.text&&n.isChecked===t.isChecked||(o_.set(e,t),n=ee.getId(e),XS(Q)(Ae(Ae({},t),{},{id:n})))}e.recordDOM&&(ye=function(e,t){var s=e.styleSheetRuleCb,u=e.mirror,l=e.stylesheetManager,r=t.win;if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return function(){};var n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:XS(function(e,t,n){var r=Le(n,2),i=r[0],r=r[1],o=s_(t,u,l.styleMirror),a=o.id,o=o.styleId;return(a&&-1!==a||o&&-1!==o)&&s({id:a,styleId:o,adds:[{rule:i,index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.addRule=function(e,t){var n=2<arguments.length&&arguments[2]!==undefined?arguments[2]:this.cssRules.length,e="".concat(e," { ").concat(t," }");return r.CSSStyleSheet.prototype.insertRule.apply(this,[e,n])};var i,o,a=r.CSSStyleSheet.prototype.deleteRule,c=(r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:XS(function(e,t,n){var r=Le(n,1)[0],i=s_(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,removes:[{index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:XS(function(e,t,n){var r=Le(n,1)[0],i=s_(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,replace:r}),e.apply(t,n)})})),r.CSSStyleSheet.prototype.replaceSync&&(o=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:XS(function(e,t,n){var r=Le(n,1)[0],i=s_(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,replaceSync:r}),e.apply(t,n)})})),{}),d=(d_("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(d_("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),d_("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),d_("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule)),{});return Object.entries(c).forEach(function(e){var e=Le(e,2),t=e[0],e=e[1];d[t]={insertRule:e.prototype.insertRule,deleteRule:e.prototype.deleteRule},e.prototype.insertRule=new Proxy(d[t].insertRule,{apply:XS(function(e,t,n){var r=Le(n,2),i=r[0],r=r[1],o=s_(t.parentStyleSheet,u,l.styleMirror),a=o.id,o=o.styleId;return(a&&-1!==a||o&&-1!==o)&&s({id:a,styleId:o,adds:[{rule:i,index:[].concat(Ne(a_(t)),[r||0])}]}),e.apply(t,n)})}),e.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:XS(function(e,t,n){var r=Le(n,1)[0],i=s_(t.parentStyleSheet,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,removes:[{index:[].concat(Ne(a_(t)),[r])}]}),e.apply(t,n)})})}),XS(function(){r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=a,i&&(r.CSSStyleSheet.prototype.replace=i),o&&(r.CSSStyleSheet.prototype.replaceSync=o),Object.entries(c).forEach(function(e){var e=Le(e,2),t=e[0],e=e[1];e.prototype.insertRule=d[t].insertRule,e.prototype.deleteRule=d[t].deleteRule})})}(e,{win:i}),we=u_(e,e.doc),r={win:i},b=(x=e).styleDeclarationCb,k=x.mirror,S=x.ignoreCSSAttributes,_=x.stylesheetManager,E=r.win,C=E.CSSStyleDeclaration.prototype.setProperty,E.CSSStyleDeclaration.prototype.setProperty=new Proxy(C,{apply:XS(function(e,t,n){var r,i,o=Le(n,3),a=o[0],s=o[1],o=o[2];return S.has(a)?C.apply(t,[a,s,o]):(r=(i=s_(null==(i=t.parentRule)?void 0:i.parentStyleSheet,k,_.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&b({id:r,styleId:i,set:{property:a,value:s,priority:o},index:a_(t.parentRule)}),e.apply(t,n))})}),R=E.CSSStyleDeclaration.prototype.removeProperty,E.CSSStyleDeclaration.prototype.removeProperty=new Proxy(R,{apply:XS(function(e,t,n){var r,i,o=Le(n,1)[0];return S.has(o)?R.apply(t,[o]):(r=(i=s_(null==(i=t.parentRule)?void 0:i.parentStyleSheet,k,_.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&b({id:r,styleId:i,remove:{property:o},index:a_(t.parentRule)}),e.apply(t,n))})}),be=XS(function(){E.CSSStyleDeclaration.prototype.setProperty=C,E.CSSStyleDeclaration.prototype.removeProperty=R}),e.collectFonts)&&(ce=(O=e).fontCb,w=(O=O.doc).defaultView,ke=w?(g=[],v=new WeakMap,y=w.FontFace,w.FontFace=function(e,t,n){var r=new y(e,t,n);return v.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r},O=yS(O.fonts,"add",function(e){return function(t){return setTimeout(XS(function(){var e=v.get(t);e&&(ce(e),v["delete"](t))}),0),e.apply(this,[t])}}),g.push(function(){w.FontFace=y}),g.push(O),XS(function(){g.forEach(function(e){return e()})})):function(){});Re=(x=e).doc,T=x.mirror,M=x.blockClass,I=x.blockSelector,Oe=x.selectionCb,A=!0,(x=XS(function(){var e=Re.getSelection();if(!(!e||A&&null!=e&&e.isCollapsed)){A=e.isCollapsed||!1;for(var t=[],n=e.rangeCount||0,r=0;r<n;r++){var i=e.getRangeAt(r),o=i.startContainer,a=i.startOffset,s=i.endContainer,i=i.endOffset;xS(o,M,I,!0)||xS(s,M,I,!0)||t.push({start:T.getId(o),startOffset:a,end:T.getId(s),endOffset:i})}Oe({ranges:t})}}))();var Ee,O,Ce,x,Re,T,M,I,Oe,A,xe=bS("selectionchange",x),Te=(O=(r=e).doc,Ce=r.customElementCb,(r=O.defaultView)&&r.customElements?yS(r.customElements,"define",function(r){return function(e,t,n){try{Ce({define:{name:e}})}catch(De){console.warn("Custom element callback failed for ".concat(e))}return r.apply(this,[e,t,n])}}):function(){}),Me=[],P=Ie(e.plugins);try{for(P.s();!(Ee=P.n()).done;){var D=Ee.value;Me.push(D.observer(D.callback,i,D.options))}}catch(Pe){P.e(Pe)}finally{P.f()}return XS(function(){QS.forEach(function(e){return e.reset()}),null!=o&&o.disconnect(),de(),fe(),he(),pe(),me(),ge(),ve(),ye(),we(),be(),ke(),xe(),Te(),Me.forEach(function(e){return e()})})}function c_(e){return"undefined"!=typeof window[e]}function d_(e){return Boolean("undefined"!=typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var f_=k(function u(e){b(this,u),p(this,"iframeIdToRemoteIdMap",new WeakMap),p(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e},[{key:"getId",value:function(e,t,n,r){n=n||this.getIdToRemoteIdMap(e),r=r||this.getRemoteIdToIdMap(e),e=n.get(t);return e||(e=this.generateIdFn(),n.set(t,e),r.set(e,t)),e}},{key:"getIds",value:function(t,e){var n=this,r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map(function(e){return n.getId(t,e,r,i)})}},{key:"getRemoteId",value:function(e,t,n){n=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:n.get(t)||-1}},{key:"getRemoteIds",value:function(t,e){var n=this,r=this.getRemoteIdToIdMap(t);return e.map(function(e){return n.getRemoteId(t,e,r)})}},{key:"reset",value:function(e){e?(this.iframeIdToRemoteIdMap["delete"](e),this.iframeRemoteIdToIdMap["delete"](e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),h_=k(function u(e){b(this,u),p(this,"iframes",new WeakMap),p(this,"crossOriginIframeMap",new WeakMap),p(this,"crossOriginIframeMirror",new f_(sw)),p(this,"crossOriginIframeStyleMirror"),p(this,"crossOriginIframeRootIdMap",new WeakMap),p(this,"mirror"),p(this,"mutationCb"),p(this,"wrappedEmit"),p(this,"loadListener"),p(this,"stylesheetManager"),p(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new f_(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))},[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(t=e.contentWindow)&&t.addEventListener("message",this.handleMessage.bind(this)),null!=(t=this.loadListener)&&t.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&0<e.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;"rrweb"===t.data.type&&t.origin===t.data.origin&&e.source&&(e=this.crossOriginIframeMap.get(e.source))&&(e=this.transformCrossOriginEvent(e,t.data.event))&&this.wrappedEmit(e,t.data.isCheckout)}},{key:"transformCrossOriginEvent",value:function(n,e){var t,r=this;switch(e.type){case FS.FullSnapshot:this.crossOriginIframeMirror.reset(n),this.crossOriginIframeStyleMirror.reset(n),this.replaceIdOnNode(e.data.node,n);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(n,i),this.patchRootIdOnNode(e.data.node,i),{timestamp:e.timestamp,type:FS.IncrementalSnapshot,data:{source:US.Mutation,adds:[{parentId:this.mirror.getId(n),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case FS.Meta:case FS.Load:case FS.DomContentLoaded:return!1;case FS.Plugin:return e;case FS.Custom:return this.replaceIds(e.data.payload,n,["id","parentId","previousId","nextId"]),e;case FS.IncrementalSnapshot:switch(e.data.source){case US.Mutation:return e.data.adds.forEach(function(e){r.replaceIds(e,n,["parentId","nextId","previousId"]),r.replaceIdOnNode(e.node,n);var t=r.crossOriginIframeRootIdMap.get(n);t&&r.patchRootIdOnNode(e.node,t)}),e.data.removes.forEach(function(e){r.replaceIds(e,n,["parentId","id"])}),e.data.attributes.forEach(function(e){r.replaceIds(e,n,["id"])}),e.data.texts.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case US.Drag:case US.TouchMove:case US.MouseMove:return e.data.positions.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case US.ViewportResize:return!1;case US.MediaInteraction:case US.MouseInteraction:case US.Scroll:case US.CanvasMutation:case US.Input:return this.replaceIds(e.data,n,["id"]),e;case US.StyleSheetRule:case US.StyleDeclaration:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleId"]),e;case US.Font:return e;case US.Selection:return e.data.ranges.forEach(function(e){r.replaceIds(e,n,["start","end"])}),e;case US.AdoptedStyleSheet:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleIds"]),null!=(t=e.data.styles)&&t.forEach(function(e){r.replaceStyleIds(e,n,["styleId"])}),e}}return!1}},{key:"replace",value:function(e,t,n,r){var i,o=Ie(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;!Array.isArray(t[a])&&"number"!=typeof t[a]||(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]))}}catch(Pe){o.e(Pe)}finally{o.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===HS.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})}}]),p_=k(function u(e){b(this,u),p(this,"shadowDoms",new WeakSet),p(this,"mutationCb"),p(this,"scrollCb"),p(this,"bypassOptions"),p(this,"mirror"),p(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()},[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n,r=this;H0(e)&&!this.shadowDoms.has(e)&&(this.shadowDoms.add(e),n=Le(t_(Ae(Ae({},this.bypassOptions),{},{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),1)[0],this.restoreHandlers.push(function(){return n.disconnect()}),this.restoreHandlers.push(r_(Ae(Ae({},this.bypassOptions),{},{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&0<e.adoptedStyleSheets.length&&r.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,r.mirror.getId(wS.host(e))),r.restoreHandlers.push(u_({mirror:r.mirror,stylesheetManager:r.bypassOptions.stylesheetManager},e))},0))}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,r){var i=this;this.restoreHandlers.push(yS(e.prototype,"attachShadow",function(n){return function(e){var e=n.call(this,e),t=wS.shadowRoot(this);return t&&NS(this)&&i.addShadowRoot(t,r),e}}))}},{key:"reset",value:function(){this.restoreHandlers.forEach(function(e){try{e()}catch(m){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),m_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g_="undefined"==typeof Uint8Array?[]:new Uint8Array(256),v_=0;v_<m_.length;v_++)g_[m_.charCodeAt(v_)]=v_;var y_=new Map,w_=function(e,t,n){var r;if(e&&(k_(e,t)||"object"===T(e)))return t=n,n=e.constructor.name,(r=y_.get(t))||(r=new Map,y_.set(t,r)),r.has(n)||r.set(n,[]),-1===(n=(t=r.get(n)).indexOf(e))&&(n=t.length,t.push(e)),n};var b_=function(e,t,n){return e.map(function(e){return function r(i,t,n){return i instanceof Array?i.map(function(e){return r(e,t,n)}):null===i?i:i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray?{rr_type:i.constructor.name,args:[Object.values(i)]}:i instanceof ArrayBuffer?{rr_type:i.constructor.name,base64:function(){for(var e=new Uint8Array(i),t=e.length,n="",r=0;r<t;r+=3)n=(n=(n=(n+=m_[e[r]>>2])+m_[(3&e[r])<<4|e[r+1]>>4])+m_[(15&e[r+1])<<2|e[r+2]>>6])+m_[63&e[r+2]];return t%3==2?n=n.substring(0,n.length-1)+"=":t%3==1&&(n=n.substring(0,n.length-2)+"=="),n}()}:i instanceof DataView?{rr_type:i.constructor.name,args:[r(i.buffer,t,n),i.byteOffset,i.byteLength]}:i instanceof HTMLImageElement?{rr_type:i.constructor.name,src:i.src}:i instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:i.toDataURL()}:i instanceof ImageData?{rr_type:i.constructor.name,args:[r(i.data,t,n),i.width,i.height]}:k_(i,t)||"object"===T(i)?{rr_type:i.constructor.name,index:w_(i,t,n)}:i}(e,t,n)})},k_=function(t,n){var e=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof n[e]});return Boolean(e.find(function(e){return t instanceof n[e]}))};function S_(e,a,s,u){var t=[];try{var n=yS(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(e){for(var t,n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return xS(this,a,s,!0)||(t="experimental-webgl"===(t=e)?"webgl":t,"__context"in this||(this.__context=t),u&&["webgl","webgl2"].includes(t)&&(r[0]&&"object"===T(r[0])?(t=r[0]).preserveDrawingBuffer||(t.preserveDrawingBuffer=!0):r.splice(0,1,{preserveDrawingBuffer:!0}))),o.apply(this,[e].concat(r))}});t.push(n)}catch(w){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){t.forEach(function(e){return e()})}}function __(t,s,u,l,c,d){var n,r=[],e=Ie(Object.getOwnPropertyNames(t));try{for(e.s();!(n=e.n()).done;)!function(){var a=n.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))return;try{if("function"!=typeof t[a])return;var e=yS(t,a,function(o){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=o.apply(this,t);return w_(i,d,this),"tagName"in this.canvas&&!xS(this.canvas,l,c,!0)&&(r=b_(t,d,this),u(this.canvas,{type:s,property:a,args:r})),i}});r.push(e)}catch(F){e=_S(t,a,{set:function(e){u(this.canvas,{type:s,property:a,args:[e],setter:!0})}});r.push(e)}}()}catch(Pe){e.e(Pe)}finally{e.f()}return r}var E_='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n',C_="undefined"!=typeof self&&self.Blob&&new Blob([E_],{type:"text/javascript;charset=utf-8"});function R_(e){var t,n;try{if(t=C_&&(self.URL||self.webkitURL).createObjectURL(C_))return(n=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",function(){(self.URL||self.webkitURL).revokeObjectURL(t)}),n;throw""}catch(v){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(E_),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var O_,x_,T_,M_=k(function u(e){var n=this,t=(b(this,u),p(this,"pendingCanvasMutations",new Map),p(this,"rafStamps",{latestId:0,invokeId:null}),p(this,"mirror"),p(this,"mutationCb"),p(this,"resetObservers"),p(this,"frozen",!1),p(this,"locked",!1),p(this,"processMutation",function(e,t){(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId||!n.rafStamps.invokeId)&&(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)}),e.sampling),t=void 0===t?"all":t,r=e.win,i=e.blockClass,o=e.blockSelector,a=e.recordCanvas,s=e.dataURLOptions;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===t&&this.initCanvasMutationObserver(r,i,o),a&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:s})},[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,o,r,i,a){var s=this,t=S_(o,r,i,!0),u=new Map,l=new R_;l.onmessage=function(e){var t,n=e.data.id;u.set(n,!1),"base64"in e.data&&(t=(e=e.data).base64,s.mutationCb({id:n,type:BS["2D"],commands:[{property:"clearRect",args:[0,0,e.width,e.height]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:t}],type:e.type}]},0,0]}]}))};var c=1e3/e,d=0,f=function(e){var t,n;h=(d&&e-d<c||(d=e,t=[],o.document.querySelectorAll("canvas").forEach(function(e){xS(e,r,i,!0)||t.push(e)}),t.forEach((n=S(W().m(function o(t){var n,r,i;return W().w(function(e){for(;;)switch(e.n){case 0:if(n=s.mirror.getId(t),u.get(n))return e.a(2);e.n=1;break;case 1:if(0===t.width||0===t.height)return e.a(2);e.n=2;break;case 2:return u.set(n,!0),["webgl","webgl2"].includes(t.__context)&&(r=t.getContext(t.__context),!1===(null==(i=null==r?void 0:r.getContextAttributes())?void 0:i.preserveDrawingBuffer))&&r.clear(r.COLOR_BUFFER_BIT),e.n=3,createImageBitmap(t);case 3:i=e.v,l.postMessage({id:n,bitmap:i,width:t.width,height:t.height,dataURLOptions:a.dataURLOptions},[i]);case 4:return e.a(2)}},o)})),function(e){return n.apply(this,arguments)}))),requestAnimationFrame(f))},h=requestAnimationFrame(f);this.resetObservers=function(){t(),cancelAnimationFrame(h)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r,i,o=S_(e,t,n,!1),a=function(a,s,u,l){var t,n=[],e=Ie(Object.getOwnPropertyNames(s.CanvasRenderingContext2D.prototype));try{for(e.s();!(t=e.n()).done;)!function(){var o=t.value;try{if("function"!=typeof s.CanvasRenderingContext2D.prototype[o])return;var e=yS(s.CanvasRenderingContext2D.prototype,o,function(i){return function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return xS(this.canvas,u,l,!0)||setTimeout(function(){var e=b_(n,s,t);a(t.canvas,{type:BS["2D"],property:o,args:e})},0),i.apply(this,n)}});n.push(e)}catch(L){e=_S(s.CanvasRenderingContext2D.prototype,o,{set:function(e){a(this.canvas,{type:BS["2D"],property:o,args:[e],setter:!0})}});n.push(e)}}()}catch(Pe){e.e(Pe)}finally{e.f()}return function(){n.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n),s=(r=this.processMutation.bind(this),t=t,n=n,i=[],"undefined"!=typeof(e=e).WebGLRenderingContext&&i.push.apply(i,Ne(__(e.WebGLRenderingContext.prototype,BS.WebGL,r,t,n,e))),"undefined"!=typeof e.WebGL2RenderingContext&&i.push.apply(i,Ne(__(e.WebGL2RenderingContext.prototype,BS.WebGL2,r,t,n,e))),function(){i.forEach(function(e){return e()})});this.resetObservers=function(){o(),a(),s()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})}},{key:"startRAFTimestamping",value:function(){var t=this,n=function(e){t.rafStamps.latestId=e,requestAnimationFrame(n)};requestAnimationFrame(n)}},{key:"flushPendingCanvasMutations",value:function(){var r=this;this.pendingCanvasMutations.forEach(function(e,t){var n=r.mirror.getId(t);r.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(function(){return r.flushPendingCanvasMutations()})}},{key:"flushPendingCanvasMutationFor",value:function(e,t){var n,r;this.frozen||this.locked||(r=this.pendingCanvasMutations.get(e))&&-1!==t&&(n=r.map(function(e){return e.type,B(e,R0)}),r=r[0].type,this.mutationCb({id:t,type:r,commands:n}),this.pendingCanvasMutations["delete"](e))}}]),I_=k(function u(e){b(this,u),p(this,"trackedLinkElements",new WeakSet),p(this,"mutationCb"),p(this,"adoptedStyleSheetCb"),p(this,"styleMirror",new DS),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb},[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){var r=this;if(0!==e.length){var i,o={id:t,styleIds:[]},a=[],n=Ie(e);try{for(n.s();!(i=n.n()).done;)!function(){var e,n=i.value;r.styleMirror.has(n)?e=r.styleMirror.getId(n):(e=r.styleMirror.add(n),a.push({styleId:e,rules:Array.from(n.rules||CSSRule,function(e,t){return{rule:V0(e,n.href),index:t}})})),o.styleIds.push(e)}()}catch(Pe){n.e(Pe)}finally{n.f()}0<a.length&&(o.styles=a),this.adoptedStyleSheetCb(o)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),A_=k(function u(){b(this,u),p(this,"nodeMap",new WeakMap),p(this,"active",!1)},[{key:"inOtherBuffer",value:function(e,t){e=this.nodeMap.get(e);return e&&Array.from(e).some(function(e){return e!==t})}},{key:"add",value:function(e,t){var n=this;this.active||(this.active=!0,requestAnimationFrame(function(){n.nodeMap=new WeakMap,n.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"destroy",value:function(){}}]),P_=!1;try{2!==Array.from([1],function(e){return 2*e})[0]&&(kO=document.createElement("iframe"),document.body.appendChild(kO),Array.from=(null==(k0=kO.contentWindow)?void 0:k0.Array.from)||Array.from,document.body.removeChild(kO))}catch(Pe){console.debug("Unable to override Array.from",Pe)}var D_,L_=new G0;function N_(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},r=e.emit,i=e.checkoutEveryNms,o=e.checkoutEveryNth,t=e.blockClass,u=void 0===t?"rr-block":t,t=e.blockSelector,l=void 0===t?null:t,t=e.ignoreClass,L=void 0===t?"rr-ignore":t,t=e.ignoreSelector,N=void 0===t?null:t,t=e.maskTextClass,c=void 0===t?"rr-mask":t,t=e.maskTextSelector,d=void 0===t?null:t,t=e.inlineStylesheet,f=void 0===t||t,t=e.maskAllInputs,n=e.maskInputOptions,F=e.slimDOMOptions,h=e.maskInputFn,p=e.maskTextFn,U=e.hooks,j=e.packFn,a=e.sampling,s=void 0===a?{}:a,a=e.dataURLOptions,m=void 0===a?{}:a,a=e.mousemoveWait,g=e.recordDOM,z=void 0===g||g,g=e.recordCanvas,v=void 0!==g&&g,g=e.recordCrossOriginIframes,g=void 0!==g&&g,y=e.recordAfter,B=void 0===y?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":y,y=e.userTriggeredOnInput,W=void 0!==y&&y,y=e.collectFonts,H=void 0!==y&&y,y=e.inlineImages,w=void 0!==y&&y,b=e.plugins,y=e.keepIframeSrcFn,k=void 0===y?function(){return!1}:y,y=e.ignoreCSSAttributes,q=void 0===y?new Set([]):y,S=(VS=e.errorHandler,!g||window.parent===window),_=!1;if(!S)try{window.parent.document&&(_=!1)}catch(Re){_=!0}if(S&&!r)throw new Error("emit function is required");if(!S&&!_)return function(){};void 0!==a&&void 0===s.mousemove&&(s.mousemove=a),L_.reset();var V,E=!0===t?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==n?n:{password:!0},C=ww(F),R=(!function(e){"NodeList"in(e=0<arguments.length&&e!==undefined?e:window)&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}(),0),G=function(e){var t,n=Ie(b||[]);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}}catch(Pe){n.e(Pe)}finally{n.f()}return e=j&&!_?j(e):e};O_=function(e,t){var n;e.timestamp=vS(),null==(n=QS[0])||!n.isFrozen()||e.type===FS.FullSnapshot||e.type===FS.IncrementalSnapshot&&e.data.source===US.Mutation||QS.forEach(function(e){return e.unfreeze()}),S?null!=r&&r(G(e),t):_&&(n={type:"rrweb",event:G(e),origin:window.location.origin,isCheckout:t},window.parent.postMessage(n,"*")),e.type===FS.FullSnapshot?(V=e,R=0):e.type!==FS.IncrementalSnapshot||e.data.source===US.Mutation&&e.data.isAttachIframe||(R++,t=o&&o<=R,n=i&&e.timestamp-V.timestamp>i,(t||n)&&x_(!0))};var J,O=function(e){O_({type:FS.IncrementalSnapshot,data:Ae({source:US.Mutation},e)})},$=function(e){return O_({type:FS.IncrementalSnapshot,data:Ae({source:US.Scroll},e)})},Z=function(e){return O_({type:FS.IncrementalSnapshot,data:Ae({source:US.CanvasMutation},e)})},x=new I_({mutationCb:O,adoptedStyleSheetCb:function(e){return O_({type:FS.IncrementalSnapshot,data:Ae({source:US.AdoptedStyleSheet},e)})}}),T=new h_({mirror:L_,mutationCb:O,stylesheetManager:x,recordCrossOriginIframes:g,wrappedEmit:O_}),M=Ie(b||[]);try{for(M.s();!(J=M.n()).done;){var K=J.value;K.getMirror&&K.getMirror({nodeMirror:L_,crossOriginIframeMirror:T.crossOriginIframeMirror,crossOriginIframeStyleMirror:T.crossOriginIframeStyleMirror})}}catch(Pe){M.e(Pe)}finally{M.f()}var I=new A_,A=(T_=new M_({recordCanvas:v,mutationCb:Z,win:window,blockClass:u,blockSelector:l,mirror:L_,sampling:s.canvas,dataURLOptions:m}),new p_({mutationCb:O,scrollCb:$,bypassOptions:{blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,inlineStylesheet:f,maskInputOptions:E,dataURLOptions:m,maskTextFn:p,maskInputFn:h,recordCanvas:v,inlineImages:w,sampling:s,slimDOMOptions:C,iframeManager:T,stylesheetManager:x,canvasManager:T_,keepIframeSrcFn:k,processedNodeManager:I},mirror:L_}));x_=function(){var e,t,n,r,i,o,a=0<arguments.length&&arguments[0]!==undefined&&arguments[0];if(z){O_({type:FS.Meta,data:{href:window.location.href,width:RS(),height:CS()}},a),x.reset(),A.init(),QS.forEach(function(e){return e.lock()});s=document,r=void 0===(r=(e={mirror:L_,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,inlineStylesheet:f,maskAllInputs:E,maskTextFn:p,maskInputFn:h,slimDOM:C,dataURLOptions:m,recordCanvas:v,inlineImages:w,onSerialize:function(e){IS(e,L_)&&T.addIframe(e),AS(e,L_)&&x.trackLinkElement(e),PS(e)&&A.addShadowRoot(wS.shadowRoot(e),document)},onIframeLoad:function(e,t){T.attachIframe(e,t),A.observeAttachShadow(e)},onStylesheetLoad:function(e,t){x.attachLinkElement(e,t)},keepIframeSrcFn:k}).mirror)?new G0:r,t=e.inlineImages,n=e.recordCanvas,i=e.slimDOM,o=e.keepIframeSrcFn;var s=bw(s,{doc:s,mirror:r,blockClass:void 0===(s=e.blockClass)?"rr-block":s,blockSelector:void 0===(r=e.blockSelector)?null:r,maskTextClass:void 0===(s=e.maskTextClass)?"rr-mask":s,maskTextSelector:void 0===(r=e.maskTextSelector)?null:r,skipChild:!1,inlineStylesheet:void 0===(s=e.inlineStylesheet)||s,maskInputOptions:!0===(r=void 0!==(r=e.maskAllInputs)&&r)?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===r?{password:!0}:r,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:ww(void 0!==i&&i),dataURLOptions:e.dataURLOptions,inlineImages:void 0!==t&&t,recordCanvas:void 0!==n&&n,preserveWhiteSpace:e.preserveWhiteSpace,onSerialize:e.onSerialize,onIframeLoad:e.onIframeLoad,iframeLoadTimeout:e.iframeLoadTimeout,onStylesheetLoad:e.onStylesheetLoad,stylesheetLoadTimeout:e.stylesheetLoadTimeout,keepIframeSrcFn:void 0===o?function(){return!1}:o,newlyAddedElement:!1});if(!s)return console.warn("Failed to snapshot the document");O_({type:FS.FullSnapshot,data:{node:s,initialOffset:ES(window)}},a),QS.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&x.adoptStyleSheets(document.adoptedStyleSheets,L_.getId(document))}};try{var P=[],Y=function(e){return XS(l_)({mutationCb:O,mousemoveCb:function(e,t){return O_({type:FS.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return O_({type:FS.IncrementalSnapshot,data:Ae({source:US.MouseInteraction},e)})},scrollCb:$,viewportResizeCb:function(e){return O_({type:FS.IncrementalSnapshot,data:Ae({source:US.ViewportResize},e)})},inputCb:function(e){return O_({type:FS.IncrementalSnapshot,data:Ae({source:US.Input},e)})},mediaInteractionCb:function(e){return O_({type:FS.IncrementalSnapshot,data:Ae({source:US.MediaInteraction},e)})},styleSheetRuleCb:function(e){return O_({type:FS.IncrementalSnapshot,data:Ae({source:US.StyleSheetRule},e)})},styleDeclarationCb:function(e){return O_({type:FS.IncrementalSnapshot,data:Ae({source:US.StyleDeclaration},e)})},canvasMutationCb:Z,fontCb:function(e){return O_({type:FS.IncrementalSnapshot,data:Ae({source:US.Font},e)})},selectionCb:function(e){O_({type:FS.IncrementalSnapshot,data:Ae({source:US.Selection},e)})},customElementCb:function(e){O_({type:FS.IncrementalSnapshot,data:Ae({source:US.CustomElement},e)})},blockClass:u,ignoreClass:L,ignoreSelector:N,maskTextClass:c,maskTextSelector:d,maskInputOptions:E,inlineStylesheet:f,sampling:s,recordDOM:z,recordCanvas:v,inlineImages:w,userTriggeredOnInput:W,collectFonts:H,doc:e,maskInputFn:h,maskTextFn:p,keepIframeSrcFn:k,blockSelector:l,slimDOMOptions:C,dataURLOptions:m,mirror:L_,iframeManager:T,stylesheetManager:x,shadowDomManager:A,processedNodeManager:I,canvasManager:T_,ignoreCSSAttributes:q,plugins:(null==(e=null==b?void 0:b.filter(function(e){return e.observer}))?void 0:e.map(function(t){return{observer:t.observer,options:t.options,callback:function(e){return O_({type:FS.Plugin,data:{plugin:t.name,payload:e}})}}}))||[]},U)},D=(T.addLoadListener(function(e){try{P.push(Y(e.contentDocument))}catch(X){console.warn(X)}}),function(){x_(),P.push(Y(document)),P_=!0});return["interactive","complete"].includes(document.readyState)?D():(P.push(bS("DOMContentLoaded",function(){O_({type:FS.DomContentLoaded,data:{}}),"DOMContentLoaded"===B&&D()})),P.push(bS("load",function(){O_({type:FS.Load,data:{}}),"load"===B&&D()},window))),function(){P.forEach(function(e){try{e()}catch(X){String(X).toLowerCase().includes("cross-origin")||console.warn(X)}}),I.destroy(),P_=!1,VS=void 0}}catch(X){console.warn(X)}}N_.addCustomEvent=function(e,t){if(!P_)throw new Error("please add custom event after start recording");O_({type:FS.Custom,data:{tag:e,payload:t}})},N_.freezePage=function(){QS.forEach(function(e){return e.freeze()})},N_.takeFullSnapshot=function(e){if(!P_)throw new Error("please take full snapshot after start recording");x_(e)},N_.mirror=L_,(Ue=D_=D_||{})[Ue.NotStarted=0]="NotStarted",Ue[Ue.Running=1]="Running",Ue[Ue.Stopped=2]="Stopped";var F_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',U_={maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,autoDetectSensitiveData:!0,mask:[".tdem-mask","[data-tdem-mask]","[data-sensitive]",".sensitive",".private"],block:[".tdem-block","[data-tdem-block]",".secret","[data-secret]","iframe[srcdoc]:not([src])",".replayer-wrapper"],ignore:[".tdem-ignore","[data-tdem-ignore]",'input[type="file"]','input[type="password"]'],maskInputOptions:{password:!0,email:!0,tel:!0,text:!1}},j_=(z_.maskPhone=function(e){return e.replace(this.phoneRegex,function(e){var t=e.replace(/[^\d]/g,"");return 11===t.length?e.substring(0,3)+"****"+e.substring(7):13===t.length?e.substring(0,6)+"****"+e.substring(10):e.substring(0,3)+"****"+e.substring(e.length-4)})},z_.maskIdCard=function(e){return e.replace(this.idCardRegex,function(e){return 18===e.length?e.substring(0,6)+"********"+e.substring(14):15===e.length?e.substring(0,6)+"******"+e.substring(12):e})},z_.maskEmail=function(e){return e.replace(this.emailRegex,function(e){var t,n=e.indexOf("@");return n<=1?"*"+e.substring(1):(t=e.substring(0,n),n=e.substring(n),t.charAt(0)+"***"+t.charAt(t.length-1)+n)})},z_.maskBankCard=function(e){return e.replace(this.bankCardRegex,function(e){var t=e.replace(/[^\d]/g,"");return t.length<13?e:t.substring(0,4)+" **** **** "+t.substring(t.length-4)})},z_.maskIP=function(e){return e.replace(this.ipv4Regex,function(e){e=e.split(".");return e[0]+".*.*."+e[3]})},z_.autoMask=function(e){var t;return e&&"string"==typeof e?(t=this.maskPhone(t=e),t=this.maskIdCard(t),t=this.maskEmail(t),this.maskBankCard(t)):e},z_.hasSensitiveData=function(e){return!(!e||"string"!=typeof e)&&(this.phoneRegex.test(e)||this.idCardRegex.test(e)||this.emailRegex.test(e)||this.bankCardRegex.test(e))},z_.phoneRegex=/1[3-9]\d{9}|(?:\+?86)?1[3-9]\d{9}/g,z_.idCardRegex=/[1-9]\d{5}(?:19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dXx]|[1-9]\d{7}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}/g,z_.emailRegex=/[\w.-]+@[\w.-]+\.\w{2,}/g,z_.bankCardRegex=/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{1,7}\b/g,z_.ipv4Regex=/\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\b/g,z_);function z_(){}function B_(e,t){return void 0===e&&(e={}),A(A(A({},t=void 0===t?U_:t),e),{mask:W_(t.mask,e.mask),block:W_(t.block,e.block),ignore:W_(t.ignore,e.ignore),maskInputOptions:A(A({},t.maskInputOptions),e.maskInputOptions)})}function W_(e,t){e=new Set(Sl(e||[],t||[]));return Array.from(e)}$_.prototype.push=function(e,t){if(this.emitFn=t,3===e.type&&this.isMutationEvent(e)){var n=e.data;if(this.buffer){if(this.enableRepeatDetection&&this.isRepeatPattern(n)){if(this.repeatCount++,3<this.repeatCount)return this.buffer=this.cloneEvent(e),void this.droppedByRepeat++}else this.repeatCount=0;this.mergeInto(n,e.timestamp),this.mergedCount++,(null!=(n=null==(n=this.buffer.data.adds)?void 0:n.length)?n:0)>=this.maxAddsPerMerge&&this.flush()}else this.buffer=this.cloneEvent(e),this.scheduleFlush()}else this.flush(),t(e)},$_.prototype.flush=function(){this.clearTimer(),this.buffer&&this.emitFn&&(this.emitFn(this.buffer),this.buffer=null,this.repeatCount=0)},$_.prototype.destroy=function(){this.flush(),this.clearTimer(),this.emitFn=null},$_.prototype.getStats=function(){return{mergedCount:this.mergedCount,droppedByRepeat:this.droppedByRepeat,cancelledByOffset:this.cancelledByOffset}},$_.prototype.isMutationEvent=function(e){return 0===(null==(e=e.data)?void 0:e.source)},$_.prototype.isRepeatPattern=function(e){var t;return!!this.buffer&&(t=null!=(t=this.buffer.data.adds)?t:[],e=null!=(e=e.adds)?e:[],0!==t.length)&&0!==e.length&&t.length===e.length&&(null==(t=t[0])?void 0:t.parentId)===(null==(t=e[0])?void 0:t.parentId)},$_.prototype.mergeInto=function(e,t){var n,r,i,o;if(this.buffer){var a=this.buffer.data;this.buffer.timestamp=Math.max(this.buffer.timestamp,t);for(var s=this,u=0,l=null!=(t=e.removes)?t:[];u<l.length;u++)!function(t){var e=(null!=(n=a.adds)?n:[]).findIndex(function(e){return(null==(e=e.node)?void 0:e.id)===t.id});0<=e?(a.adds.splice(e,1),s.cancelledByOffset++):(a.removes=null!=(n=a.removes)?n:[],a.removes.push(t))}(l[u]);for(var c=0,d=null!=(t=e.adds)?t:[];c<d.length;c++){var f=d[c];a.adds=null!=(r=a.adds)?r:[],a.adds.push(f)}for(var h=0,p=null!=(t=e.attributes)?t:[];h<p.length;h++)!function(t){a.attributes=null!=(i=a.attributes)?i:[];var e=a.attributes.findIndex(function(e){return e.id===t.id});0<=e?a.attributes[e]=t:a.attributes.push(t)}(p[h]);for(var m=0,g=null!=(t=e.texts)?t:[];m<g.length;m++)!function(t){a.texts=null!=(o=a.texts)?o:[];var e=a.texts.findIndex(function(e){return e.id===t.id});0<=e?a.texts[e]=t:a.texts.push(t)}(g[m])}},$_.prototype.cloneEvent=function(e){var t=e.data;return{type:e.type,timestamp:e.timestamp,data:{source:0,adds:Sl(null!=(e=t.adds)?e:[]),removes:Sl(null!=(e=t.removes)?e:[]),attributes:Sl(null!=(e=t.attributes)?e:[]),texts:Sl(null!=(e=t.texts)?e:[])}}},$_.prototype.scheduleFlush=function(){var e=this;this.clearTimer(),this.flushTimer=setTimeout(function(){e.flushTimer=null,e.flush()},this.windowMs)},$_.prototype.clearTimer=function(){null!==this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=null)};var H_=$_,q_=(J_.prototype.startRecording=function(e){var r,i,n=this;if(void 0===e&&(e={}),"recording"!==this.state){this.mutationLimitReached=!1,this.throttleCount=0,this.throttleWindowStart=Date.now(),this.throttleNotified=!1,this.mutationAddsInWindow=0;var t="buffer"===this.options.mode?12e4:3e5,t="number"==typeof e.checkoutEveryNms&&0<e.checkoutEveryNms?e.checkoutEveryNms:t,o="number"==typeof e.checkoutEveryNth&&0<e.checkoutEveryNth?e.checkoutEveryNth:undefined,a=B_(e.privacy||{},U_),s=A(A(A(A({emit:function(e,t){n.handleEvent(e,t)},checkoutEveryNms:t},o?{checkoutEveryNth:o}:{}),{sampling:{scroll:150,mousemove:!c.ios()&&50,mouseInteraction:!0,input:"last"},slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:!0}}),(t={},(o=a).maskAllInputs!==undefined&&(t.maskAllInputs=o.maskAllInputs),o.maskInputOptions&&(t.maskInputOptions=o.maskInputOptions),null!=(s=o.mask)&&s.length&&(t.maskTextSelector=o.mask.join(",")),null!=(s=o.block)&&s.length&&(t.blockSelector=o.block.join(",")),o.blockAllMedia&&(t.blockSelector=t.blockSelector?t.blockSelector+","+F_:F_,t.ignoreCSSAttributes=new Set(["background-image"])),null!=(s=o.ignore)&&s.length&&(t.ignoreSelector=o.ignore.join(",")),!o.maskTextFn&&!1===o.autoDetectSensitiveData||(t.maskTextFn=(r=o.maskTextFn,i=!1!==o.autoDetectSensitiveData,function(e,t){var n;return e&&(n=e,i&&(n=j_.autoMask(n)),r?r(n,t):n)})),t)),e.rrwebConfig);try{this.hookMutationObserver(),this.stopRecordingFn=N_(s),this.state="recording",this.lastCheckoutTime=Date.now(),this.startCheckpointTimer(),h("RecorderManager","Recording started with config:",{maskAllText:a.maskAllText,maskAllInputs:a.maskAllInputs,autoDetectSensitiveData:a.autoDetectSensitiveData,mutationLimit:this.mutationLimit,checkpointIntervalMs:12e4})}catch(X){qy("RecorderManager","Failed to start recording:",X),this.state="stopped"}}else Hy("RecorderManager","Already recording")},J_.prototype.stopRecording=function(){var e;this.stopCheckpointTimer(),null!=(e=this.mutationMerger)&&e.destroy(),this.unhookMutationObserver(),this.stopRecordingFn&&(this.stopRecordingFn(),this.stopRecordingFn=undefined),this.state="stopped",h("RecorderManager","Recording stopped")},J_.prototype.pauseRecording=function(){"recording"===this.state&&(this.stopRecording(),this.state="paused",h("RecorderManager","Recording paused"))},J_.prototype.resumeRecording=function(e){void 0===e&&(e={}),"paused"===this.state&&(this.startRecording(e),h("RecorderManager","Recording resumed"))},J_.prototype.hookMutationObserver=function(){try{var r,e,t=window.MutationObserver;t&&(r=this,(e=function(n){return new t(function(e,t){r.unhookMutationObserver(),r.onMutationHandler(e)&&n(e,t)})}).prototype=t.prototype,window.MutationObserver=e,this.restoreMutationObserver=function(){window.MutationObserver=t},Wy("RecorderManager","MutationObserver hooked"))}catch(Pe){Hy("RecorderManager","Failed to hook MutationObserver:",Pe)}},J_.prototype.unhookMutationObserver=function(){this.restoreMutationObserver&&(this.restoreMutationObserver(),this.restoreMutationObserver=null,Wy("RecorderManager","MutationObserver restored"))},J_.prototype.onMutationHandler=function(e){var t,n=this;return!this.mutationLimitReached&&(t=(e=e.length)>this.mutationLimit,(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(this.mutationLimitReached=!0,qy("RecorderManager","Mutation limit reached: "+e+" > "+this.mutationLimit+". Stopping."),setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1))},J_.prototype.checkMutationLimit=function(e){var n=this;if(this.mutationLimitReached)return!1;if(3!==e.type)return!0;e=e.data;if(0!==(null==e?void 0:e.source))return!0;e=Array.isArray(e.adds)?e.adds.length:0;if(0===e)return!0;this.mutationAddsInWindow+=e;var t=e>this.mutationLimit||this.mutationAddsInWindow>2*this.mutationLimit;return(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(qy("RecorderManager","Mutation limit: "+e+" adds (window: "+this.mutationAddsInWindow+"). Stopping."),this.mutationLimitReached=!0,setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1)},J_.prototype.emitMutationBreadcrumb=function(e,t){var n;try{null!=(n=N_.addCustomEvent)&&n.call(N_,"replay.mutations",{count:e,limit:t,timestamp:Date.now()})}catch(b){}},J_.prototype.handleEvent=function(e,t){var n=this,r=(t&&(null!=(r=(i=this.options).onCheckout)&&r.call(i),this.lastCheckoutTime=Date.now(),null!=(i=this.mutationMerger))&&i.flush(),e.type);if(t||2===r||4===r||r<=1||this.checkEventThrottle()){if(3===r&&!this.mutationLimitReached){var i=Date.now();if(12e4<=i-this.lastCheckoutTime){this.lastCheckoutTime=i;try{var o=N_.takeFullSnapshot;"function"==typeof o&&(o(!0),Wy("RecorderManager","Inline checkpoint: forced FullSnapshot"))}catch(Pe){Hy("RecorderManager","Inline checkpoint failed:",Pe)}}}this.checkMutationLimit(e)&&(this.mutationMerger?this.mutationMerger.push(e,function(e){n.options.onRecordingEvent(e)}):this.options.onRecordingEvent(e))}},J_.prototype.checkEventThrottle=function(){var e,t=Date.now();if(5e3<t-this.throttleWindowStart&&(this.throttleCount=0,this.throttleWindowStart=t,this.throttleNotified=!1,this.mutationAddsInWindow=0),this.throttleCount++,300<this.throttleCount){if(!this.throttleNotified){this.throttleNotified=!0,Hy("RecorderManager","Event throttled: "+this.throttleCount+" events in 5000ms window");try{null!=(e=N_.addCustomEvent)&&e.call(N_,"replay.throttled",{count:this.throttleCount,window:5e3})}catch(v){}}return!1}return!0},J_.prototype.startCheckpointTimer=function(){var t=this;this.stopCheckpointTimer(),this.checkpointTimer=setInterval(function(){if("recording"===t.state&&!t.mutationLimitReached)try{var e=N_.takeFullSnapshot;"function"==typeof e&&(e(!0),t.lastCheckoutTime=Date.now(),Wy("RecorderManager","Checkpoint: forced FullSnapshot"))}catch(Pe){Hy("RecorderManager","Checkpoint FullSnapshot failed:",Pe)}},12e4)},J_.prototype.stopCheckpointTimer=function(){null!==this.checkpointTimer&&(clearInterval(this.checkpointTimer),this.checkpointTimer=null)},J_.prototype.getState=function(){return this.state},J_.prototype.isRecording=function(){return"recording"===this.state},J_.prototype.getLastCheckoutTime=function(){return this.lastCheckoutTime},J_.prototype.takeFullSnapshot=function(){var e,t;"recording"===this.state&&this.stopRecordingFn&&(null!=(t=null==(e=this.stopRecordingFn)?void 0:e.takeFullSnapshot)&&t.call(e),this.lastCheckoutTime=Date.now())},J_.prototype.isMutationLimitReached=function(){return this.mutationLimitReached},J_),V_=(G_.prototype.initializeSampling=function(){return null!==this.samplingDecision?{mode:this.currentMode,shouldRecord:!1!==this.currentMode}:Math.random()<this.config.sessionSampleRate?(this.currentMode="session",this.samplingDecision=!0,h("SamplerManager","Sampled: session mode"),{mode:"session",shouldRecord:!0}):0<this.config.errorSampleRate?(this.currentMode="buffer",this.samplingDecision=!0,h("SamplerManager","Sampled: buffer mode"),{mode:"buffer",shouldRecord:!0}):(this.currentMode=!1,this.samplingDecision=!1,h("SamplerManager","Not sampled"),{mode:!1,shouldRecord:!1})},G_.prototype.decideSamplingMode=function(){return this.initializeSampling().mode},G_.prototype.onErrorOccurred=function(e){return"buffer"===this.currentMode&&!this.hasUpgraded&&!!(Math.random()<this.config.errorSampleRate)&&(this.switchMode("session"),this.hasUpgraded=!0)},G_.prototype.switchMode=function(e){var t=this.currentMode;this.currentMode=e,this.samplingDecision=!1!==e,h("SamplerManager","Mode switched: "+t+" -> "+e)},G_.prototype.getCurrentMode=function(){return this.currentMode},G_.prototype.isSampled=function(){return!0===this.samplingDecision},G_.prototype.isSessionMode=function(){return"session"===this.currentMode},G_.prototype.isBufferMode=function(){return"buffer"===this.currentMode},G_.prototype.upgradeToSessionMode=function(){return"buffer"===this.currentMode&&Math.random()<this.config.errorSampleRate&&(this.currentMode="session",h("SamplerManager","Upgraded to session mode due to error"),!0)},G_.prototype.updateRates=function(e,t){"number"==typeof e&&(this.config.sessionSampleRate=e),"number"==typeof t&&(this.config.errorSampleRate=t)},G_.prototype.forceMode=function(e){this.currentMode=e,this.samplingDecision=!1!==e},G_.prototype.reset=function(){this.currentMode=!1,this.samplingDecision=null},G_.prototype.getConfig=function(){return A({},this.config)},G_);function G_(e){var t;void 0===e&&(e={}),this.currentMode=!1,this.samplingDecision=null,this.hasUpgraded=!1,this.config={sessionSampleRate:null!=(t=e.sessionSampleRate)?t:.1,errorSampleRate:null!=(t=e.errorSampleRate)?t:1}}function J_(e,t){this.state="stopped",this.lastCheckoutTime=0,this.checkpointTimer=null,this.mutationLimitReached=!1,this.mutationMerger=null,this.mutationBreadcrumbLimit=750,this.mutationLimit=1e4,this.restoreMutationObserver=null,this.throttleCount=0,this.throttleWindowStart=0,this.throttleNotified=!1,this.mutationAddsInWindow=0,this.options=e,this.mutationBreadcrumbLimit=null!=(e=null==t?void 0:t.mutationBreadcrumbLimit)?e:750,this.mutationLimit=null!=(e=null==t?void 0:t.mutationLimit)?e:1e4,null!=t&&t.enableMutationMerge&&(this.mutationMerger=new H_({windowMs:null!=(e=null==t?void 0:t.mutationMergeWindowMs)?e:200,maxAddsPerMerge:500,enableRepeatDetection:!0}))}function $_(e){var t;this.buffer=null,this.flushTimer=null,this.repeatCount=0,this.emitFn=null,this.mergedCount=0,this.droppedByRepeat=0,this.cancelledByOffset=0,this.windowMs=null!=(t=null==e?void 0:e.windowMs)?t:200,this.maxAddsPerMerge=null!=(t=null==e?void 0:e.maxAddsPerMerge)?t:500,this.enableRepeatDetection=null==(t=null==e?void 0:e.enableRepeatDetection)||t}function Z_(e){for(var t=e.length;0<=--t;)e[t]=0}var K_=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]),Y_=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]),X_=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Q_=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),eE=new Array(576),tE=(Z_(eE),new Array(60)),nE=(Z_(tE),new Array(512)),rE=(Z_(nE),new Array(256)),iE=(Z_(rE),new Array(29));Z_(iE);var oE,aE,sE,uE=new Array(30);function lE(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function cE(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}Z_(uE);var dE=function(e){return e<256?nE[e]:nE[256+(e>>>7)]},fE=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},hE=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,fE(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},pE=function(e,t,n){hE(e,n[2*t],n[2*t+1])},mE=function(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1},gE=function(e,t,n){for(var r,i=new Array(16),o=0,a=1;a<=15;a++)o=o+n[a-1]<<1,i[a]=o;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=mE(i[s]++,s))}},vE=function(e){for(var t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},yE=function(e){8<e.bi_valid?fE(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},wE=function(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},bE=function(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&wE(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!wE(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},kE=function(e,t,n){var r,i,o,a,s=0;if(0!==e.sym_next)for(;r=255&e.pending_buf[e.sym_buf+s++],r+=(255&e.pending_buf[e.sym_buf+s++])<<8,i=e.pending_buf[e.sym_buf+s++],0==r?pE(e,i,t):(o=rE[i],pE(e,o+256+1,t),0!==(a=K_[o])&&(i-=iE[o],hE(e,i,a)),o=dE(--r),pE(e,o,n),0!==(a=Y_[o])&&(r-=uE[o],hE(e,r,a))),s<e.sym_next;);pE(e,256,t)},SE=function(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;1<=n;n--)bE(e,o,n);for(i=u;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],bE(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,bE(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1];for(var c,d,f,h,p,m=e,g=t.dyn_tree,v=t.max_code,y=t.stat_desc.static_tree,w=t.stat_desc.has_stree,b=t.stat_desc.extra_bits,k=t.stat_desc.extra_base,S=t.stat_desc.max_length,_=0,E=0;E<=15;E++)m.bl_count[E]=0;for(g[2*m.heap[m.heap_max]+1]=0,c=m.heap_max+1;c<573;c++)(E=g[2*g[2*(d=m.heap[c])+1]+1]+1)>S&&(E=S,_++),g[2*d+1]=E,v<d||(m.bl_count[E]++,h=0,k<=d&&(h=b[d-k]),p=g[2*d],m.opt_len+=p*(E+h),w&&(m.static_len+=p*(y[2*d+1]+h)));if(0!==_){do{for(E=S-1;0===m.bl_count[E];)E--}while(m.bl_count[E]--,m.bl_count[E+1]+=2,m.bl_count[S]--,0<(_-=2));for(E=S;0!==E;E--)for(d=m.bl_count[E];0!==d;)(f=m.heap[--c])>v||(g[2*f+1]!==E&&(m.opt_len+=(E-g[2*f+1])*g[2*f],g[2*f+1]=E),d--)}gE(o,l,e.bl_count)},_E=function(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<l?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=i,l=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4))},EE=function(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<l)for(;pE(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==o&&(pE(e,i,e.bl_tree),s--),pE(e,16,e.bl_tree),hE(e,s-3,2)):s<=10?(pE(e,17,e.bl_tree),hE(e,s-3,3)):(pE(e,18,e.bl_tree),hE(e,s-11,7));o=i,l=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4)}},CE=!1,RE=function(e,t,n,r){hE(e,0+(r?1:0),3),yE(e),fE(e,n),fE(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},Fr=function(e){if(!CE){for(var t,n,r,i=new Array(16),o=0,a=0;a<28;a++)for(iE[a]=o,t=0;t<1<<K_[a];t++)rE[o++]=a;for(rE[o-1]=a,a=r=0;a<16;a++)for(uE[a]=r,t=0;t<1<<Y_[a];t++)nE[r++]=a;for(r>>=7;a<30;a++)for(uE[a]=r<<7,t=0;t<1<<Y_[a]-7;t++)nE[256+r++]=a;for(n=0;n<=15;n++)i[n]=0;for(t=0;t<=143;)eE[2*t+1]=8,t++,i[8]++;for(;t<=255;)eE[2*t+1]=9,t++,i[9]++;for(;t<=279;)eE[2*t+1]=7,t++,i[7]++;for(;t<=287;)eE[2*t+1]=8,t++,i[8]++;for(gE(eE,287,i),t=0;t<30;t++)tE[2*t+1]=5,tE[2*t]=mE(t,5);oE=new lE(eE,K_,257,286,15),aE=new lE(tE,Y_,0,30,15),sE=new lE(new Array(0),X_,0,19,7),CE=!0}e.l_desc=new cE(e.dyn_ltree,oE),e.d_desc=new cE(e.dyn_dtree,aE),e.bl_desc=new cE(e.bl_tree,sE),e.bi_buf=0,e.bi_valid=0,vE(e)},OE=RE,Me=function(e,t,n,r){var i,o,a,s=0;if(0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){for(var t=4093624447,n=0;n<=31;n++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*n])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(n=32;n<256;n++)if(0!==e.dyn_ltree[2*n])return 1;return 0}(e)),SE(e,e.l_desc),SE(e,e.d_desc),s=function(e){var t;for(_E(e,e.dyn_ltree,e.l_desc.max_code),_E(e,e.dyn_dtree,e.d_desc.max_code),SE(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*Q_[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),(o=e.static_len+3+7>>>3)<=(i=e.opt_len+3+7>>>3)&&(i=o)):i=o=n+5,n+4<=i&&-1!==t)RE(e,t,n,r);else if(4===e.strategy||o===i)hE(e,2+(r?1:0),3),kE(e,eE,tE);else{hE(e,4+(r?1:0),3);var u=e,l=(t=e.l_desc.max_code+1,n=e.d_desc.max_code+1,s+1);for(hE(u,t-257,5),hE(u,n-1,5),hE(u,l-4,4),a=0;a<l;a++)hE(u,u.bl_tree[2*Q_[a]+1],3);EE(u,u.dyn_ltree,t-1),EE(u,u.dyn_dtree,n-1),kE(e,e.dyn_ltree,e.dyn_dtree)}vE(e),r&&yE(e)},cv=function(e,t,n){return e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(rE[n]+256+1)]++,e.dyn_dtree[2*dE(t)]++),e.sym_next===e.sym_end},Te=function(e){hE(e,2,3),pE(e,256,eE),16===(e=e).bi_valid?(fE(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)},xE=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3<n?2e3:n;o=o+(i=i+t[r++]|0)|0,--a;);i%=65521,o%=65521}return i|o<<16|0},TE=new Uint32Array(function(){for(var e=[],t=0;t<256;t++){for(var n=t,r=0;r<8;r++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}()),ME=function(e,t,n,r){var i=TE,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e},IE={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"},e={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},AE=Fr,PE=OE,DE=Me,LE=cv,NE=Te,FE=e.Z_NO_FLUSH,UE=e.Z_PARTIAL_FLUSH,jE=e.Z_FULL_FLUSH,zE=e.Z_FINISH,BE=e.Z_BLOCK,WE=e.Z_OK,HE=e.Z_STREAM_END,qE=e.Z_STREAM_ERROR,VE=e.Z_DATA_ERROR,GE=e.Z_BUF_ERROR,JE=e.Z_DEFAULT_COMPRESSION,$E=e.Z_FILTERED,ZE=e.Z_HUFFMAN_ONLY,KE=e.Z_RLE,YE=e.Z_FIXED,XE=e.Z_UNKNOWN,QE=e.Z_DEFLATED,Pe=function(e,t){return e.msg=IE[t],t},eC=function(e){return 2*e-(4<e?9:0)},tC=function(e){for(var t=e.length;0<=--t;)e[t]=0},nC=function(e){for(var t,n,r=e.w_size,i=t=e.hash_size;n=e.head[--i],e.head[i]=r<=n?n-r:0,--t;);for(i=t=r;n=e.prev[--i],e.prev[i]=r<=n?n-r:0,--t;);},rC=function(e,t,n){return(t<<e.hash_shift^n)&e.hash_mask},iC=function(e,t){n=e.legacy_hash?e.ins_h=rC(e,e.ins_h,e.window[t+3-1]):(n=(n=e.window)[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24,e.ins_h=Math.imul(n,66521)+66521>>>16&e.hash_mask);var n,r=e.prev[t&e.w_mask]=e.head[n];return e.head[n]=t,r},oC=function(e){var t=e.state,n=t.pending;0!==(n=e.avail_out<n?e.avail_out:n)&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending)&&(t.pending_out=0)},aC=function(e,t){DE(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,oC(e.strm)},sC=function(e,t){e.pending_buf[e.pending++]=t},uC=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},lC=function(e,t,n,r){var i=e.avail_in;return 0===(i=r<i?r:i)?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=xE(e.adler,t,i,n):2===e.state.wrap&&(e.adler=ME(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},cC=function(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.w_size-262<e.strstart?e.strstart-(e.w_size-262):0,l=e.window,c=e.w_mask,d=e.prev,f=e.strstart+258,h=l[o+a-1],p=l[o+a];e.good_match<=e.prev_length&&(i>>=2),e.lookahead<s&&(s=e.lookahead);do{if(l[(n=t)+a]===p&&l[n+a-1]===h&&l[n]===l[o]&&l[++n]===l[o+1]){for(o+=2,n++;l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<f;);if(r=258-(f-o),o=f-258,a<r){if(e.match_start=t,s<=(a=r))break;h=l[o+a-1],p=l[o+a]}}}while((t=d[t&c])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead},dC=function(e){var t,n,r=e.w_size;do{if(t=e.window_size-e.lookahead-e.strstart,r+(r-262)<=e.strstart&&(e.window.set(e.window.subarray(r,r+r-t),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.strstart<e.insert&&(e.insert=e.strstart),nC(e),t+=r),0===e.strm.avail_in)break;if(t=lC(e.strm,e.window,e.strstart+e.lookahead,t),e.lookahead+=t,e.legacy_hash){if(3<=e.lookahead+e.insert)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=rC(e,e.ins_h,e.window[n+1]);e.insert&&(iC(e,n),n++,e.insert--,!(e.lookahead+e.insert<3)););}else if(3<e.lookahead+e.insert)for(n=e.strstart-e.insert;e.insert&&(iC(e,n),n++,e.insert--,!(e.lookahead+e.insert<=3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},fC=function(e,t){for(var n,r,i,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,s=e.strm.avail_in;n=65535,i=e.bi_valid+42>>3,!(e.strm.avail_out<i||(n=(i=e.strm.avail_out-i)<(n=n>(r=e.strstart-e.block_start)+e.strm.avail_in?r+e.strm.avail_in:n)?i:n)<o&&(0===n&&t!==zE||t===FE||n!==r+e.strm.avail_in)||(a=t===zE&&n===r+e.strm.avail_in?1:0,PE(e,0,0,a),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,oC(e.strm),r&&(n<r&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(lC(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n),0!==a)););return(s-=e.strm.avail_in)&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.strstart<e.insert)&&(e.insert=e.strstart),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=e.w_size-e.insert<s?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?4:t!==FE&&t!==zE&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(i=e.window_size-e.strstart,e.strm.avail_in>i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.strstart<e.insert)&&(e.insert=e.strstart),(i=i>e.strm.avail_in?e.strm.avail_in:i)&&(lC(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=e.w_size-e.insert<i?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),o=(i=65535<e.pending_buf_size-(i=e.bi_valid+42>>3)?65535:e.pending_buf_size-i)>e.w_size?e.w_size:i,((r=e.strstart-e.block_start)>=o||(r||t===zE)&&t!==FE&&0===e.strm.avail_in&&r<=i)&&(n=i<r?i:r,a=t===zE&&0===e.strm.avail_in&&n===r?1:0,PE(e,e.block_start,n,a),e.block_start+=n,oC(e.strm)),a?3:1)},qr=function(e,t){for(var n,r;;){if(e.lookahead<262){if(dC(e),e.lookahead<262&&t===FE)return 1;if(0===e.lookahead)break}if((n=0)!==(n=3<=e.lookahead?iC(e,e.strstart):n)&&e.strstart-n<=e.w_size-262&&(e.match_length=cC(e,n)),3<=e.match_length)if(r=LE(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&3<=e.lookahead){for(e.match_length--;e.strstart++,n=iC(e,e.strstart),0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=rC(e,e.ins_h,e.window[e.strstart+1]));else r=LE(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(aC(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===zE?(aC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aC(e,!1),0===e.strm.avail_out)?1:2},st=function(e,t){for(var n,r,i;;){if(e.lookahead<262){if(dC(e),e.lookahead<262&&t===FE)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(n=iC(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=cC(e,n),e.match_length<=5)&&(e.strategy===$E||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2),3<=e.prev_length&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,r=LE(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(n=iC(e,e.strstart)),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(aC(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=LE(e,0,e.window[e.strstart-1]))&&aC(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=LE(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===zE?(aC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aC(e,!1),0===e.strm.avail_out)?1:2};function hC(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var pC=[new hC(0,0,0,0,fC),new hC(4,4,8,4,qr),new hC(4,5,16,8,qr),new hC(4,6,32,32,qr),new hC(4,4,16,16,st),new hC(8,16,32,32,st),new hC(8,16,128,128,st),new hC(8,32,128,256,st),new hC(32,128,258,1024,st),new hC(32,258,258,4096,st)];function mC(){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=QE,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.legacy_hash=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),tC(this.dyn_ltree),tC(this.dyn_dtree),tC(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),tC(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),tC(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var gC=function(e){var t;return!e||!(t=e.state)||t.strm!==e||42!==t.status&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&113!==t.status&&666!==t.status?1:0},vC=function(e){if(gC(e))return Pe(e,qE);e.total_in=e.total_out=0,e.data_type=XE;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=-2,AE(t),WE},yC=function(e){var t=vC(e);return t===WE&&((e=e.state).window_size=2*e.w_size,tC(e.head),e.max_lazy_match=pC[e.level].max_lazy,e.good_match=pC[e.level].good_length,e.nice_match=pC[e.level].nice_length,e.max_chain_length=pC[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),t},l=function(e,t,n,r,i,o,a){if(!e)return qE;var s=1;if(t===JE&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),i<1||9<i||n!==QE||r<8||15<r||t<0||9<t||o<0||YE<o||8===r&&1!==s)return Pe(e,qE);8===r&&(r=9);var u=new mC;return(e.state=u).strm=e,u.status=42,u.wrap=s,u.gzhead=null,u.w_bits=r,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.legacy_hash=a?1:0,u.hash_bits=i+7,!u.legacy_hash&&u.hash_bits<15&&(u.hash_bits=15),u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new Uint8Array(2*u.w_size),u.head=new Uint16Array(u.hash_size),u.prev=new Uint16Array(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new Uint8Array(u.pending_buf_size),u.sym_buf=u.lit_bufsize,u.sym_end=3*(u.lit_bufsize-1),u.level=t,u.strategy=o,u.method=n,yC(e)},wC=l,bC=function(e,t){return gC(e)||2!==e.state.wrap?qE:(e.state.gzhead=t,WE)},kC=function(e,t){if(gC(e)||BE<t||t<0)return e?Pe(e,qE):qE;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==zE)return Pe(e,0===e.avail_out?GE:qE);var r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(oC(e),0===e.avail_out)return n.last_flush=-1,WE}else if(0===e.avail_in&&eC(t)<=eC(r)&&t!==zE)return Pe(e,GE);if(666===n.status&&0!==e.avail_in)return Pe(e,GE);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){r=QE+(n.w_bits-8<<4)<<8;if(r|=(n.strategy>=ZE||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(r|=32),uC(n,r+=31-r%31),0!==n.strstart&&(uC(n,e.adler>>>16),uC(n,65535&e.adler)),e.adler=1,n.status=113,oC(e),0!==n.pending)return n.last_flush=-1,WE}if(57===n.status)if(e.adler=0,sC(n,31),sC(n,139),sC(n,8),n.gzhead)sC(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),sC(n,255&n.gzhead.time),sC(n,n.gzhead.time>>8&255),sC(n,n.gzhead.time>>16&255),sC(n,n.gzhead.time>>24&255),sC(n,9===n.level?2:n.strategy>=ZE||n.level<2?4:0),sC(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(sC(n,255&n.gzhead.extra.length),sC(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=ME(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(sC(n,0),sC(n,0),sC(n,0),sC(n,0),sC(n,0),sC(n,9===n.level?2:n.strategy>=ZE||n.level<2?4:0),sC(n,3),n.status=113,oC(e),0!==n.pending)return n.last_flush=-1,WE;if(69===n.status){if(n.gzhead.extra){for(var i=n.pending,o=(65535&n.gzhead.extra.length)-n.gzindex;n.pending+o>n.pending_buf_size;){var a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=ME(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=a,oC(e),0!==n.pending)return n.last_flush=-1,WE;i=0,o-=a}r=new Uint8Array(n.gzhead.extra);n.pending_buf.set(r.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=ME(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var s,u=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>u&&(e.adler=ME(e.adler,n.pending_buf,n.pending-u,u)),oC(e),0!==n.pending)return n.last_flush=-1,WE;u=0}}while(s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,sC(n,s),0!=s);n.gzhead.hcrc&&n.pending>u&&(e.adler=ME(e.adler,n.pending_buf,n.pending-u,u)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var l,c=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>c&&(e.adler=ME(e.adler,n.pending_buf,n.pending-c,c)),oC(e),0!==n.pending)return n.last_flush=-1,WE;c=0}}while(l=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,sC(n,l),0!=l);n.gzhead.hcrc&&n.pending>c&&(e.adler=ME(e.adler,n.pending_buf,n.pending-c,c))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(oC(e),0!==n.pending))return n.last_flush=-1,WE;sC(n,255&e.adler),sC(n,e.adler>>8&255),e.adler=0}if(n.status=113,oC(e),0!==n.pending)return n.last_flush=-1,WE}if(0!==e.avail_in||0!==n.lookahead||t!==FE&&666!==n.status){r=0===n.level?fC(n,t):n.strategy===ZE?function(e,t){for(var n;;){if(0===e.lookahead&&(dC(e),0===e.lookahead)){if(t===FE)return 1;break}if(e.match_length=0,n=LE(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(aC(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===zE?(aC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aC(e,!1),0===e.strm.avail_out)?1:2}(n,t):n.strategy===KE?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=258){if(dC(e),e.lookahead<=258&&t===FE)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0<e.strstart&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){for(o=e.strstart+258;r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o;);e.match_length=258-(o-i),e.lookahead<e.match_length&&(e.match_length=e.lookahead)}if(3<=e.match_length?(n=LE(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=LE(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(aC(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===zE?(aC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aC(e,!1),0===e.strm.avail_out)?1:2}(n,t):pC[n.level].func(n,t);if(3!==r&&4!==r||(n.status=666),1===r||3===r)return 0===e.avail_out&&(n.last_flush=-1),WE;if(2===r&&(t===UE?NE(n):t!==BE&&(PE(n,0,0,!1),t===jE)&&(tC(n.head),0===n.lookahead)&&(n.strstart=0,n.block_start=0,n.insert=0),oC(e),0===e.avail_out))return n.last_flush=-1,WE}return t!==zE||!(n.wrap<=0)&&(2===n.wrap?(sC(n,255&e.adler),sC(n,e.adler>>8&255),sC(n,e.adler>>16&255),sC(n,e.adler>>24&255),sC(n,255&e.total_in),sC(n,e.total_in>>8&255),sC(n,e.total_in>>16&255),sC(n,e.total_in>>24&255)):(uC(n,e.adler>>>16),uC(n,65535&e.adler)),oC(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending)?WE:HE},SC=function(e){var t;return gC(e)?qE:(t=e.state.status,e.state=null,113===t?Pe(e,VE):WE)},_C=function(e,t){var n=t.length;if(gC(e))return qE;var r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return qE;1===i&&(e.adler=xE(e.adler,t,n,0)),r.wrap=0,r.w_size<=n&&(0===i&&(tC(r.head),r.strstart=0,r.block_start=0,r.insert=0),(o=new Uint8Array(r.w_size)).set(t.subarray(n-r.w_size,n),0),t=o,n=r.w_size);var o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,dC(r);3<=r.lookahead;){for(var u=r.strstart,l=r.lookahead-2;iC(r,u),u++,--l;);r.strstart=u,r.lookahead=2,dC(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,WE},EC=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},CC=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==T(n))throw new TypeError(n+"must be non-object");for(var r in n)EC(n,r)&&(e[r]=n[r])}}return e},RC=function(e){for(var t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;for(var i=new Uint8Array(t),o=0,a=0,s=e.length;o<s;o++){var u=e[o];i.set(u,a),a+=u.length}return i},OC=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(TO){OC=!1}for(var xC=new Uint8Array(256),TC=0;TC<256;TC++)xC[TC]=252<=TC?6:248<=TC?5:240<=TC?4:224<=TC?3:192<=TC?2:1;xC[254]=xC[255]=1;var MC=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);for(var t,n,r,i,o=e.length,a=0,s=0;s<o;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),s=i=0;i<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),n<128?t[i++]=n:(n<2048?t[i++]=192|n>>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t},IC=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},AC=Object.prototype.toString,PC=e.Z_NO_FLUSH,DC=e.Z_SYNC_FLUSH,LC=e.Z_FULL_FLUSH,NC=e.Z_FINISH,FC=e.Z_OK,UC=e.Z_STREAM_END,jC={level:e.Z_DEFAULT_COMPRESSION,method:e.Z_DEFLATED,chunkSize:16384,windowBits:15,memLevel:8,strategy:e.Z_DEFAULT_STRATEGY,legacyHash:!0};function zC(e){this.options=CC({},jC,e||{});var e=this.options,t=(e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new IC,this.strm.avail_out=0,wC(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy,e.legacyHash));if(t!==FC)throw new Error(IE[t]);if(e.header&&bC(this.strm,e.header),e.dictionary){e="string"==typeof e.dictionary?MC(e.dictionary):"[object ArrayBuffer]"===AC.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary;if((t=_C(this.strm,e))!==FC)throw new Error(IE[t]);this._dict_set=!0}}function BC(e,t){t=new zC(t);if(t.push(e,!0),t.err)throw t.msg||IE[t.err];return t.result}zC.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;for(r=t===~~t?t:!0===t?NC:PC,"string"==typeof e?i.input=MC(e):"[object ArrayBuffer]"===AC.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(r===DC||r===LC)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(kC(i,r)===UC)return 0<i.next_out&&this.onData(i.output.subarray(0,i.next_out)),n=SC(this.strm),this.onEnd(n),this.ended=!0,n===FC;if(0!==i.avail_out){if(0<r&&0<i.next_out)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},zC.prototype.onData=function(e){this.chunks.push(e)},zC.prototype.onEnd=function(e){e===FC&&(this.result=RC(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var a={Deflate:zC,deflate:BC,deflateRaw:function(e,t){return(t=t||{}).raw=!0,BC(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,BC(e,t)},constants:e},WC=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),HC=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),qC=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),VC=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),GC=function(e,t,n,r,i,o,a,s){for(var u,l,c,d,f,h,p,m,g,v=s.bits,y=0,w=0,b=0,k=0,S=0,_=0,E=0,C=0,R=0,O=0,x=null,T=new Uint16Array(16),M=new Uint16Array(16),I=null,y=0;y<=15;y++)T[y]=0;for(w=0;w<r;w++)T[t[n+w]]++;for(S=v,k=15;1<=k&&0===T[k];k--);if(k<S&&(S=k),0===k)i[o++]=20971520,i[o++]=20971520,s.bits=1;else{for(b=1;b<k&&0===T[b];b++);for(S<b&&(S=b),y=C=1;y<=15;y++)if((C=(C<<1)-T[y])<0)return-1;if(0<C&&(0===e||1!==k))return-1;for(M[1]=0,y=1;y<15;y++)M[y+1]=M[y]+T[y];for(w=0;w<r;w++)0!==t[n+w]&&(a[M[t[n+w]]++]=w);if(h=0===e?(x=I=a,20):1===e?(x=WC,I=HC,257):(x=qC,I=VC,0),y=b,f=o,E=w=O=0,c=-1,d=(R=1<<(_=S))-1,1===e&&852<R||2===e&&592<R)return 1;for(;;){for(g=a[w]+1<h?(m=0,a[w]):a[w]>=h?(m=I[a[w]-h],x[a[w]-h]):(m=96,0),u=1<<(p=y-E),b=l=1<<_;i[f+(O>>E)+(l-=u)]=p<<24|m<<16|g|0,0!==l;);for(u=1<<y-1;O&u;)u>>=1;if(0!==u?O=(O&u-1)+u:O=0,w++,0==--T[y]){if(y===k)break;y=t[n+a[w]]}if(S<y&&(O&d)!==c){for(f+=b,C=1<<(_=y-(E=0===E?S:E));_+E<k&&!((C-=T[_+E])<=0);)_++,C<<=1;if(R+=1<<_,1===e&&852<R||2===e&&592<R)return 1;i[c=O&d]=S<<24|_<<16|f-o|0}}0!==O&&(i[f+O]=y-E<<24|64<<16|0),s.bits=S}return 0},JC=e.Z_FINISH,$C=e.Z_BLOCK,ZC=e.Z_TREES,KC=e.Z_OK,YC=e.Z_STREAM_END,XC=e.Z_NEED_DICT,QC=e.Z_STREAM_ERROR,eR=e.Z_DATA_ERROR,tR=e.Z_MEM_ERROR,nR=e.Z_BUF_ERROR,rR=e.Z_DEFLATED,iR=16209,oR=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function aR(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var sR,uR,lR=function(e){var t;return!e||!(t=e.state)||t.strm!==e||t.mode<16180||16211<t.mode?1:0},cR=function(e){var t;return lR(e)?QC:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=16180,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,KC)},dR=function(e){var t;return lR(e)?QC:((t=e.state).wsize=0,t.whave=0,t.wnext=0,cR(e))},fR=function(e,t){var n,r;return lR(e)||(r=e.state,t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?QC:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,dR(e))},n=function(e,t){var n;return e?(n=new aR,(e.state=n).strm=e,n.window=null,n.mode=16180,(n=fR(e,t))!==KC&&(e.state=null),n):QC},hR=!0,pR=function(e,t,n,r){var i,e=e.state;return null===e.window&&(e.window=new Uint8Array(1<<e.wbits)),0===e.wsize&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0),e.wsize<=r?(e.window.set(t.subarray(n-e.wsize,n),0),e.wnext=0,e.whave=e.wsize):((i=e.wsize-e.wnext)>r&&(i=r),e.window.set(t.subarray(n-r,n-r+i),e.wnext),(r-=i)?(e.window.set(t.subarray(n-r,n),0),e.wnext=r,e.whave=e.wsize):(e.wnext+=i,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=i))),0},mR=dR,gR=n,vR=function(e,t){var n,r,i,o,a,s,u,l,c,d,f,h,p,m,g,v,y,w,b,k,S,_,E,C,R=0,O=new Uint8Array(4),x=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(lR(e)||!e.output||!e.input&&0!==e.avail_in)return QC;16191===(n=e.state).mode&&(n.mode=16192),a=e.next_out,i=e.output,o=e.next_in,r=e.input,l=n.hold,c=n.bits,d=s=e.avail_in,f=u=e.avail_out,_=KC;e:for(;;)switch(n.mode){case 16180:if(0===n.wrap)n.mode=16192;else{for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}2&n.wrap&&35615===l?(0===n.wbits&&(n.wbits=15),O[n.check=0]=255&l,O[1]=l>>>8&255,n.check=ME(n.check,O,2,0),c=l=0,n.mode=16181):(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31?(e.msg="incorrect header check",n.mode=iR):(15&l)!==rR?(e.msg="unknown compression method",n.mode=iR):(c-=4,S=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=S),15<S||S>n.wbits?(e.msg="invalid window size",n.mode=iR):(n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&l?16189:16191,c=l=0)))}break;case 16181:for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(n.flags=l,(255&n.flags)!==rR){e.msg="unknown compression method",n.mode=iR;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=iR;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,n.check=ME(n.check,O,2,0)),c=l=0,n.mode=16182;case 16182:for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.time=l),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,O[2]=l>>>16&255,O[3]=l>>>24&255,n.check=ME(n.check,O,4,0)),c=l=0,n.mode=16183;case 16183:for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,n.check=ME(n.check,O,2,0)),c=l=0,n.mode=16184;case 16184:if(1024&n.flags){for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,n.check=ME(n.check,O,2,0)),c=l=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&((h=(h=n.length)>s?s:h)&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+h),S)),512&n.flags&&4&n.wrap&&(n.check=ME(n.check,r,h,o)),s-=h,o+=h,n.length-=h),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===s)break e;for(h=0;S=r[o+h++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S)),S&&h<s;);if(512&n.flags&&4&n.wrap&&(n.check=ME(n.check,r,h,o)),s-=h,o+=h,S)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===s)break e;for(h=0;S=r[o+h++],n.head&&S&&n.length<65536&&(n.head.comment+=String.fromCharCode(S)),S&&h<s;);if(512&n.flags&&4&n.wrap&&(n.check=ME(n.check,r,h,o)),s-=h,o+=h,S)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=iR;break}c=l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=16191;break;case 16189:for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}e.adler=n.check=oR(l),c=l=0,n.mode=16190;case 16190:if(0===n.havedict)return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,XC;e.adler=n.check=1,n.mode=16191;case 16191:if(t===$C||t===ZC)break e;case 16192:if(n.last)l>>>=7&c,c-=7&c,n.mode=16206;else{for(;c<3;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}switch(n.last=1&l,--c,3&(l>>>=1)){case 0:n.mode=16193;break;case 1:if(function(e){if(hR){sR=new Int32Array(512),uR=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(GC(1,e.lens,0,288,sR,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;GC(2,e.lens,0,32,uR,0,e.work,{bits:5}),hR=!1}e.lencode=sR,e.lenbits=9,e.distcode=uR,e.distbits=5}(n),n.mode=16199,t!==ZC)break;l>>>=2,c-=2;break e;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=iR}l>>>=2,c-=2}break;case 16193:for(l>>>=7&c,c-=7&c;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=iR;break}if(n.length=65535&l,c=l=0,n.mode=16194,t===ZC)break e;case 16194:n.mode=16195;case 16195:if(h=n.length){if(0===(h=u<(h=s<h?s:h)?u:h))break e;i.set(r.subarray(o,o+h),a),s-=h,o+=h,u-=h,a+=h,n.length-=h}else n.mode=16191;break;case 16196:for(;c<14;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(n.nlen=257+(31&l),l>>>=5,c-=5,n.ndist=1+(31&l),l>>>=5,c-=5,n.ncode=4+(15&l),l>>>=4,c-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=iR;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;c<3;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.lens[x[n.have++]]=7&l,l>>>=3,c-=3}for(;n.have<19;)n.lens[x[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},_=GC(0,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,_){e.msg="invalid code lengths set",n.mode=iR;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;v=(R=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&R,!((g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(y<16)l>>>=g,c-=g,n.lens[n.have++]=y;else{if(16===y){for(C=g+2;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(l>>>=g,c-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=iR;break}S=n.lens[n.have-1],h=3+(3&l),l>>>=2,c-=2}else if(17===y){for(C=g+3;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}S=0,h=3+(7&(l>>>=g)),l>>>=3,c=c-g-3}else{for(C=g+7;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}S=0,h=11+(127&(l>>>=g)),l>>>=7,c=c-g-7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=iR;break}for(;h--;)n.lens[n.have++]=S}}if(n.mode===iR)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=iR;break}if(n.lenbits=9,E={bits:n.lenbits},_=GC(1,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,_){e.msg="invalid literal/lengths set",n.mode=iR;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},_=GC(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,_){e.msg="invalid distances set",n.mode=iR;break}if(n.mode=16199,t===ZC)break e;case 16199:n.mode=16200;case 16200:if(6<=s&&258<=u){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,function(e,t){var n,r,i,o,a,s,u=e.state,l=e.next_in,c=e.input,d=l+(e.avail_in-5),f=e.next_out,h=e.output,p=f-(t-e.avail_out),m=f+(e.avail_out-257),g=u.dmax,v=u.wsize,y=u.whave,w=u.wnext,b=u.window,k=u.hold,S=u.bits,_=u.lencode,E=u.distcode,C=(1<<u.lenbits)-1,R=(1<<u.distbits)-1;t:do{for(S<15&&(k+=c[l++]<<S,S+=8,k+=c[l++]<<S,S+=8),n=_[k&C];;){if(k>>>=r=n>>>24,S-=r,0==(r=n>>>16&255))h[f++]=65535&n;else{if(!(16&r)){if(0==(64&r)){n=_[(65535&n)+(k&(1<<r)-1)];continue}if(32&r){u.mode=16191;break t}e.msg="invalid literal/length code",u.mode=16209;break t}for(i=65535&n,(r&=15)&&(S<r&&(k+=c[l++]<<S,S+=8),i+=k&(1<<r)-1,k>>>=r,S-=r),S<15&&(k+=c[l++]<<S,S+=8,k+=c[l++]<<S,S+=8),n=E[k&R];;){if(k>>>=r=n>>>24,S-=r,!(16&(r=n>>>16&255))){if(0==(64&r)){n=E[(65535&n)+(k&(1<<r)-1)];continue}e.msg="invalid distance code",u.mode=16209;break t}if(o=65535&n,S<(r&=15)&&(k+=c[l++]<<S,(S+=8)<r)&&(k+=c[l++]<<S,S+=8),(o+=k&(1<<r)-1)>g){e.msg="invalid distance too far back",u.mode=16209;break t}if(k>>>=r,S-=r,o>(r=f-p)){if((r=o-r)>y&&u.sane){e.msg="invalid distance too far back",u.mode=16209;break t}if(s=b,(a=0)===w){if(a+=v-r,r<i){for(i-=r;h[f++]=b[a++],--r;);a=f-o,s=h}}else if(w<r){if(a+=v+w-r,(r-=w)<i){for(i-=r;h[f++]=b[a++],--r;);if(a=0,w<i){for(i-=r=w;h[f++]=b[a++],--r;);a=f-o,s=h}}}else if(a+=w-r,r<i){for(i-=r;h[f++]=b[a++],--r;);a=f-o,s=h}for(;2<i;)h[f++]=s[a++],h[f++]=s[a++],h[f++]=s[a++],i-=3;i&&(h[f++]=s[a++],1<i)&&(h[f++]=s[a++])}else{for(a=f-o;h[f++]=h[a++],h[f++]=h[a++],h[f++]=h[a++],2<(i-=3););i&&(h[f++]=h[a++],1<i)&&(h[f++]=h[a++])}break}}break}}while(l<d&&f<m);l-=i=S>>3,k&=(1<<(S-=i<<3))-1,e.next_in=l,e.next_out=f,e.avail_in=l<d?d-l+5:5-(l-d),e.avail_out=f<m?m-f+257:257-(f-m),u.hold=k,u.bits=S}(e,f),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,16191===n.mode&&(n.back=-1);break}for(n.back=0;v=(R=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&R,!((g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(v&&0==(240&v)){for(w=g,b=v,k=y;v=(R=n.lencode[k+((l&(1<<w+b)-1)>>w)])>>>16&255,y=65535&R,!(w+(g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,n.back+=w}if(l>>>=g,c-=g,n.back+=g,n.length=y,0===v){n.mode=16205;break}if(32&v){n.back=-1,n.mode=16191;break}if(64&v){e.msg="invalid literal/length code",n.mode=iR;break}n.extra=15&v,n.mode=16201;case 16201:if(n.extra){for(C=n.extra;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;v=(R=n.distcode[l&(1<<n.distbits)-1])>>>16&255,y=65535&R,!((g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(0==(240&v)){for(w=g,b=v,k=y;v=(R=n.distcode[k+((l&(1<<w+b)-1)>>w)])>>>16&255,y=65535&R,!(w+(g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,n.back+=w}if(l>>>=g,c-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=iR;break}n.offset=y,n.extra=15&v,n.mode=16203;case 16203:if(n.extra){for(C=n.extra;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=iR;break}n.mode=16204;case 16204:if(0===u)break e;if(n.offset>(h=f-u)){if((h=n.offset-h)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=iR;break}p=h>n.wnext?(h-=n.wnext,n.wsize-h):n.wnext-h,h>n.length&&(h=n.length),m=n.window}else m=i,p=a-n.offset,h=n.length;for(u-=h=u<h?u:h,n.length-=h;i[a++]=m[p++],--h;);0===n.length&&(n.mode=16200);break;case 16205:if(0===u)break e;i[a++]=n.length,u--,n.mode=16200;break;case 16206:if(n.wrap){for(;c<32;){if(0===s)break e;s--,l|=r[o++]<<c,c+=8}if(f-=u,e.total_out+=f,n.total+=f,4&n.wrap&&f&&(e.adler=n.check=(n.flags?ME:xE)(n.check,i,f,a-f)),f=u,4&n.wrap&&(n.flags?l:oR(l))!==n.check){e.msg="incorrect data check",n.mode=iR;break}c=l=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=iR;break}c=l=0}n.mode=16208;case 16208:_=YC;break e;case iR:_=eR;break e;case 16210:return tR;default:return QC}return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,(n.wsize||f!==e.avail_out&&n.mode<iR&&(n.mode<16206||t!==JC))&&pR(e,e.output,e.next_out,f-e.avail_out),f-=e.avail_out,e.total_in+=d-=e.avail_in,e.total_out+=f,n.total+=f,4&n.wrap&&f&&(e.adler=n.check=(n.flags?ME:xE)(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(16191===n.mode?128:0)+(16199===n.mode||16194===n.mode?256:0),_=(0==d&&0===f||t===JC)&&_===KC?nR:_},yR=function(e){var t;return lR(e)?QC:((t=e.state).window&&(t.window=null),e.state=null,KC)},wR=function(e,t){return lR(e)||0==(2&(e=e.state).wrap)?QC:((e.head=t).done=!1,KC)},bR=function(e,t){var n,r=t.length;return lR(e)||0!==(n=e.state).wrap&&16190!==n.mode?QC:16190===n.mode&&xE(1,t,r,0)!==n.check?eR:pR(e,t,r,r)?(n.mode=16210,tR):(n.havedict=1,KC)},kR=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},SR=Object.prototype.toString,_R=e.Z_NO_FLUSH,ER=e.Z_FINISH,CR=e.Z_OK,RR=e.Z_STREAM_END,OR=e.Z_NEED_DICT,xR=e.Z_STREAM_ERROR,TR=e.Z_DATA_ERROR,MR=e.Z_MEM_ERROR,IR=e.Z_BUF_ERROR,AR={chunkSize:65536,windowBits:15,to:""};function PR(e){this.options=CC({},AR,e||{});var t=this.options,e=(t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits)&&(t.windowBits=-15),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new IC,this.strm.avail_out=0,gR(this.strm,t.windowBits));if(e!==CR)throw new Error(IE[e]);if(this.header=new kR,wR(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=MC(t.dictionary):"[object ArrayBuffer]"===SR.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=bR(this.strm,t.dictionary))!==CR)throw new Error(IE[e])}function DR(e,t){t=new PR(t);if(t.push(e,!0),t.err)throw t.msg||IE[t.err];return t.result}PR.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize,a=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?ER:_R,"[object ArrayBuffer]"===SR.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(n=vR(i,r))===OR&&a&&((n=bR(i,a))===CR?n=vR(i,r):n===TR&&(n=OR));0<i.avail_in&&n===RR&&2&i.state.wrap&&0!==i.state.flags&&0!==i.input[i.next_in];)mR(i),n=vR(i,r);switch(n){case xR:case TR:case OR:case MR:return this.onEnd(n),!(this.ended=!0)}var s,u,l,c=i.avail_out;if(i.next_out&&(0===i.avail_out||n===RR||0<r)&&("string"===this.options.to?(s=function(e,t){for(var n=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+xC[e[n]]>t?n:t}(i.output,i.next_out),u=i.next_out-s,l=function(e,t){var n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));for(var r=new Array(2*n),i=0,o=0;o<n;){var a=e[o++];if(a<128)r[i++]=a;else{var s=xC[a];if(4<s)r[i++]=65533,o+=s-1;else{for(a&=2===s?31:3===s?15:7;1<s&&o<n;)a=a<<6|63&e[o++],s--;1<s?r[i++]=65533:a<65536?r[i++]=a:(a-=65536,r[i++]=55296|a>>10&1023,r[i++]=56320|1023&a)}}}var u=r,l=i;if(l<65534&&u.subarray&&OC)return String.fromCharCode.apply(null,u.length===l?u:u.subarray(0,l));for(var c="",d=0;d<l;d++)c+=String.fromCharCode(u[d]);return c}(i.output,s),i.next_out=u,i.avail_out=o-u,u&&i.output.set(i.output.subarray(s,s+u),0),this.onData(l)):(this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out)),i.avail_out=0,i.next_out=0)),n!==CR&&n!==IR||0!==c){if(n===RR)return n=yR(this.strm),this.onEnd(n),this.ended=!0;if(0===i.avail_in){if(r===ER)return n=yR(this.strm),this.onEnd(n===CR?IR:n),!(this.ended=!0);break}}}return!0},PR.prototype.onData=function(e){this.chunks.push(e)},PR.prototype.onEnd=function(e){e===CR&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=RC(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var LR={Inflate:PR,inflate:DR,inflateRaw:function(e,t){return(t=t||{}).raw=!0,DR(e,t)},ungzip:DR,constants:e},NR={Deflate:a.Deflate,deflate:a.deflate,deflateRaw:a.deflateRaw,gzip:a.gzip,Inflate:LR.Inflate,inflate:LR.inflate,inflateRaw:LR.inflateRaw,ungzip:LR.ungzip,constants:e},FR=(BR.prototype.uploadReplay=function(n){return bl(this,void 0,void 0,function(){var t;return kl(this,function(e){switch(e.label){case 0:if(this.isUploading)return Hy("Uploader","Upload in progress, skipping"),[2,!1];this.isUploading=!0,e.label=1;case 1:return e.trys.push([1,3,4,5]),(t=this.config.beforeSend(n))?[4,this.doUploadWithRetry(t,0)]:(h("Uploader","Upload cancelled by beforeSend"),[2,!1]);case 2:return e.sent(),h("Uploader","Upload success:",{replay_id:n.replay_id,segment_id:n.segment_id}),[2,!0];case 3:return qy("Uploader","Upload failed:",t=e.sent()),this.config.onError(t),[2,!1];case 4:return this.isUploading=!1,[7];case 5:return[2]}})})},BR.prototype.doUploadWithRetry=function(r,i){return bl(this,void 0,void 0,function(){var t,n;return kl(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,5]),[4,this.doUpload(r)];case 1:return e.sent(),[3,5];case 2:return t=e.sent(),i<this.config.maxRetries?(h("Uploader","Retrying in "+(n=1e3*Math.pow(2,i))+"ms (attempt "+(i+1)+"/"+this.config.maxRetries+")"),[4,this.sleep(n)]):[3,4];case 3:return e.sent(),[2,this.doUploadWithRetry(r,i+1)];case 4:throw t;case 5:return[2]}})})},BR.prototype.prepareUploadPayload=function(e){var t=e.replay_format||"rrweb",n=e.events_encoding||"plain_json";if("rrweb"!==t)return e;if(!this.config.eventsCompression||"gzip_base64"===n)return A(A({},e),{replay_format:t,platform:e.platform||"web",events_encoding:n});try{var r=NR.gzip(e.events),i=this.uint8ArrayToBase64(r),o=e.events.length,a=r.length,s=i.length;return h("Uploader","Events compressed: "+Math.round(o/1024)+"KB -> gzip "+Math.round(a/1024)+"KB -> base64 "+Math.round(s/1024)+"KB"),A(A({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"gzip_base64",events:i})}catch(X){return Hy("Uploader","Events compression failed, fallback to plain_json:",X),A(A({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"plain_json"})}},BR.prototype.uint8ArrayToBase64=function(e){for(var t="",n=0;n<e.length;n+=32768){for(var r=e.subarray(n,n+32768),i="",o=0;o<r.length;o++)i+=String.fromCharCode(r[o]);t+=i}if("function"==typeof btoa)return btoa(t);if("undefined"!=typeof Buffer)return Buffer.from(e).toString("base64");throw new Error("base64 encode is not supported")},BR.prototype.doUpload=function(i){return bl(this,void 0,void 0,function(){var t,n,r;return kl(this,function(e){switch(e.label){case 0:if(t=this.prepareUploadPayload(i),r=JSON.stringify(t),n={"Content-Type":"application/json","X-App-ID":this.config.appId},h("Uploader","Sending replay payload: "+Math.round(r.length/1024)+"KB, events_encoding="+(t.events_encoding||"plain_json")),r.length<65536||h("Uploader","Data size "+Math.round(r.length/1024)+"KB exceeds keepalive limit, using normal fetch"),this.config.transport)return[4,this.config.transport.request({kind:"replay",url:this.config.uploadUrl,method:"POST",headers:n,body:r})];throw new Error("Replay Transport is not configured");case 1:if(t=e.sent(),!(n=t||{ok:!1,status:0,statusText:"Transport failed"}).ok)throw new Error("HTTP "+(n.status||0)+": "+(n.statusText||"Transport failed"));if(0!==(r="string"==typeof n.body?JSON.parse(n.body):n.body).code)throw new Error("Server error (code "+r.code+"): "+r.message);return[2]}})})},BR.prototype.sendBeacon=function(e){var t;try{var n=this.prepareUploadPayload(e),r=JSON.stringify(n);return!(null==(t=this.config.transport)||!t.handoff||(this.config.transport.handoff({kind:"replay",url:this.config.uploadUrl,method:"POST",contentType:"application/json",body:r,sendBeacon:!0}),0))}catch(X){return qy("Uploader","sendBeacon failed:",X),!1}},BR.prototype.isUploadInProgress=function(){return this.isUploading},BR.prototype.sleep=function(t){return new Promise(function(e){return setTimeout(e,t)})},BR),UR=["a","button",'input[type="button"]','input[type="submit"]','[role="button"]',"[onclick]","[ng-click]","[v-on\\:click]"].join(","),jR=(zR.prototype.start=function(){this.isRunning||(document.addEventListener("pointerdown",this.handlePointerDown,!0),document.addEventListener("click",this.handleClick,!0),this.isRunning=!0,h("ClickDetector","Started"))},zR.prototype.stop=function(){this.isRunning&&(document.removeEventListener("pointerdown",this.handlePointerDown,!0),document.removeEventListener("click",this.handleClick,!0),this.cleanupSlowClick(),this.isRunning=!1,h("ClickDetector","Stopped"))},zR.prototype.handlePointerDown=function(e){var t,n,r=this,i=e.target;i&&i instanceof Element&&(i=this.getClickableElement(i))&&(this.cleanupSlowClick(),this.clickStartTime=Date.now(),this.clickNode=i,t=this.getNodeInfo(i),n=this.getExternalNavigationReason(e,i),this.options.onClickStart({node:t,timestamp:this.clickStartTime,target:i,event:e,effectiveActionReason:n||undefined}),n?this.markEffectiveAction(n):(this.slowClickTimeoutId=setTimeout(function(){r.handleSlowClick("timeout")},this.options.slowClickTimeout),this.startMutationObserver()))},zR.prototype.handleClick=function(e){var t=this,n=e.target,r=Date.now();this.rageActiveTarget&&r-this.rageLastClickTime>=this.options.rageClickWindow&&(this.rageActiveTarget=null,this.rageLastClickTime=0),this.rageActiveTarget&&this.isSameTarget(this.rageActiveTarget,n)?this.rageLastClickTime=r:(this.clickHistory.push({time:r,target:n}),this.clickHistory=this.clickHistory.filter(function(e){return r-e.time<t.options.rageClickWindow}),(e=this.clickHistory.filter(function(e){return t.isSameTarget(e.target,n)})).length>=this.options.rageClickCount&&(this.options.onRageClick({node:this.getNodeInfo(n),clickCount:e.length,timeWindowMs:this.options.rageClickWindow,timestamp:r}),this.rageActiveTarget=n,this.rageLastClickTime=r))},zR.prototype.startMutationObserver=function(){var t=this;this.clickNode&&document.body&&"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver(function(e){t.hasSignificantMutation(e)&&(t.emitEffectiveAction("dom_mutation"),t.handleSlowClick("mutation"))}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","style","hidden","disabled","aria-hidden","aria-disabled","aria-busy"],characterData:!0}))},zR.prototype.hasSignificantMutation=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if("characterData"===r.type)return!0;if("childList"===r.type&&(0<r.addedNodes.length||0<r.removedNodes.length)&&Array.from(r.addedNodes).concat(Array.from(r.removedNodes)).some(function(e){return e.nodeType===Node.ELEMENT_NODE&&!["SCRIPT","STYLE","LINK"].includes(e.tagName)}))return!0;if("attributes"===r.type){r=r.attributeName;if(["class","style","hidden","disabled","aria-hidden","aria-disabled","aria-busy"].includes(r||""))return!0}}return!1},zR.prototype.handleSlowClick=function(e){var t;this.clickNode&&this.clickStartTime&&((t=Date.now()-this.clickStartTime)>=this.options.slowClickThreshold&&this.options.onSlowClick({node:this.getNodeInfo(this.clickNode),timeAfterClickMs:t,endReason:e,timestamp:this.clickStartTime}),this.cleanupSlowClick())},zR.prototype.cleanupSlowClick=function(){this.slowClickTimeoutId&&(clearTimeout(this.slowClickTimeoutId),this.slowClickTimeoutId=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.clickStartTime=0,this.clickNode=null},zR.prototype.isSameTarget=function(e,t){return e===t||e.contains(t)||t.contains(e)},zR.prototype.markEffectiveAction=function(e){this.clickNode&&this.clickStartTime&&(this.emitEffectiveAction(e),this.cleanupSlowClick())},zR.prototype.emitEffectiveAction=function(e){this.clickNode&&this.options.onEffectiveAction({reason:e,timestamp:Date.now(),node:this.getNodeInfo(this.clickNode)})},zR.prototype.getClickableElement=function(e){return e.matches(UR)?e:e.closest(UR)},zR.prototype.getExternalNavigationReason=function(e,t){var n=t.closest("a");if(n){if(n.download)return"download";var r=(n.getAttribute("target")||"").toLowerCase();if(r&&"_self"!==r)return"external_navigation";if(n.href&&(1===e.button||e.metaKey||e.ctrlKey||e.shiftKey))return"external_navigation"}r=t.closest("form"),n=((null==r?void 0:r.getAttribute("target"))||"").toLowerCase();return n&&"_self"!==n?"external_navigation":t.hasAttribute("data-tdem-ignore-dead-click")||t.closest("[data-tdem-ignore-dead-click]")||t.hasAttribute("data-tdem-effective-action")||t.closest("[data-tdem-effective-action]")?"custom":null},zR.prototype.getNodeInfo=function(e){var t;return{id:(null==(t=e.__sn)?void 0:t.id)||0,tagName:e.tagName.toLowerCase(),textContent:(e.textContent||"").trim().substring(0,100),selector:this.getSelector(e)}},zR.prototype.getSelector=function(e){for(var t=[],n=e;n&&n!==document.body&&t.length<5;){var r,i=n.tagName.toLowerCase();if(n.id){i+="#"+n.id,t.unshift(i);break}n.className&&"string"==typeof n.className&&0<(r=n.className.trim().split(/\s+/).slice(0,2)).length&&(i+="."+r.join(".")),t.unshift(i),n=n.parentElement}return t.join(" > ")},zR.prototype.isActive=function(){return this.isRunning},zR);function zR(e){var t;void 0===e&&(e={}),this.isRunning=!1,this.clickStartTime=0,this.clickNode=null,this.slowClickTimeoutId=null,this.mutationObserver=null,this.clickHistory=[],this.rageActiveTarget=null,this.rageLastClickTime=0,this.options={slowClickTimeout:null!=(t=e.slowClickTimeout)?t:7e3,slowClickThreshold:null!=(t=e.slowClickThreshold)?t:3e3,rageClickCount:null!=(t=e.rageClickCount)?t:5,rageClickWindow:null!=(t=e.rageClickWindow)?t:1e3,onSlowClick:e.onSlowClick||function(){},onRageClick:e.onRageClick||function(){},onClickStart:e.onClickStart||function(){},onEffectiveAction:e.onEffectiveAction||function(){},onDeadClick:e.onDeadClick||function(){}},this.handleClick=this.handleClick.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this)}function BR(e){var t;this.isUploading=!1,this.useCompression=!1,this.config={uploadUrl:e.uploadUrl||"/api/v1/collect/replay",appId:e.appId,maxRetries:null!=(t=e.maxRetries)?t:3,beforeSend:e.beforeSend||function(e){return e},onError:e.onError||function(){},eventsCompression:null==(t=e.eventsCompression)||t,transport:e.transport}}function WR(e){return Number.isNaN(e)?0:Math.max(0,Math.min(1,e))}function HR(e){return WR((e=e,(Number.isNaN(e)?0:Math.max(0,Math.min(100,e)))/100))}function qR(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function VR(e,t){var e=!1===(e=e)||e===undefined?{enabled:!1,sessionSampleRate:.1,errorSampleRate:1,errorTraceback:!0}:!0===e?{enabled:!0,sessionSampleRate:.1,errorSampleRate:1,errorTraceback:!0}:{enabled:!1!==e.enabled,sessionSampleRate:"number"==typeof e.sessionSampleRate?WR(e.sessionSampleRate):.1,errorSampleRate:"number"==typeof e.errorSampleRate?WR(e.errorSampleRate):1,errorTraceback:e.errorTraceback===undefined||!!e.errorTraceback},t=t&&"object"===T(t)?t:null,n=e.enabled,r=(t&&qR(t,"enabled")&&(n=e.enabled&&!!t.enabled),e.sessionSampleRate),i=e.errorSampleRate,e=e.errorTraceback;return n&&t&&(qR(t,"replay_sample_rate")&&t.replay_sample_rate!==undefined&&null!==t.replay_sample_rate&&(r=HR(Number(t.replay_sample_rate))),qR(t,"error_traceback")&&t.error_traceback!==undefined&&null!==t.error_traceback&&(e=!!t.error_traceback),qR(t,"error_sample_rate"))&&t.error_sample_rate!==undefined&&null!==t.error_sample_rate&&(i=HR(Number(t.error_sample_rate))),{enabled:n,sessionSampleRate:r,errorSampleRate:e?i:0,errorTraceback:e}}function GR(e,t){return A(A({},e),{enabled:t.enabled,sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,errorTraceback:t.errorTraceback})}function JR(e){var t=null==(t=e)?void 0:t._tdemSampleGate;if(!t)return 1;if(t.isDecided&&t.isSampled)return(!(t=e._effectiveReplayPolicy)||t.enabled)&&!1!==e._replaySampled}new s({name:"sessionReplay"});var $R=new s({name:"sessionReplay",sessionManager:null,eventBuffer:null,recorderManager:null,samplerManager:null,uploader:null,clickDetector:null,flushTimer:null,replayConfig:null,isInitialized:!1,errorTraceback:!0,_tdemRef:null,_isCheckoutFlushing:!1,_lastLifecycleSnapshotAt:0,init:function(e){},applyEffectivePolicy:function(e){var t,n;if(this.errorTraceback=e.errorTraceback,this.replayConfig&&(this.replayConfig=GR(this.replayConfig,e)),this.samplerManager&&this.samplerManager.updateRates(e.sessionSampleRate,e.errorSampleRate),this.isInitialized){if(e.enabled)return(n=this.samplerManager)?0<e.sessionSampleRate||e.errorTraceback&&0<e.errorSampleRate?!e.errorTraceback&&n.isBufferMode()?(h("Plugin","Error traceback off while in buffer, stopping replay"),this.stopReplay(),null!=(t=this.eventBuffer)&&t.clear(),void n.forceMode(!1)):void(e.errorTraceback&&e.sessionSampleRate<=0&&0<e.errorSampleRate&&n.isSessionMode()&&(h("Plugin","Remote SSR=0 with traceback on: demote session→buffer"),n.forceMode("buffer"),this.flushTimer)&&(clearInterval(this.flushTimer),this.flushTimer=null)):(h("Plugin","Effective policy no longer allows recording, stopping"),this.stopReplay(),null!=(t=this.eventBuffer)&&t.clear(),void n.forceMode(!1)):void 0;h("Plugin","Effective policy disabled, stopping replay"),this.stopReplay(),null!=(e=this.eventBuffer)&&e.clear()}},shouldSkipBufferFlush:function(){var e;return!0===(null==(e=this.samplerManager)?void 0:e.isBufferMode())},onNewTdem:function(e,t){var n,r,t=this.parseConfig(t),i=null!=(i=t.debug)&&i,i=(zy=i,e._effectiveReplayPolicy);i||(i=VR(t,(n=e._prefetchedConfigData)&&"object"===T(n)&&("replay_sample_rate"in n||"error_traceback"in n||"error_sample_rate"in n||"tdem_sample_rate"in n||"enabled"in n)?(r={},Object.prototype.hasOwnProperty.call(n,"enabled")&&(r.enabled=!!n.enabled),Object.prototype.hasOwnProperty.call(n,"replay_sample_rate")&&(r.replay_sample_rate=Number(n.replay_sample_rate)),Object.prototype.hasOwnProperty.call(n,"error_traceback")&&(r.error_traceback=!!n.error_traceback),Object.prototype.hasOwnProperty.call(n,"error_sample_rate")&&(r.error_sample_rate=Number(n.error_sample_rate)),r):null),e._effectiveReplayPolicy=i,e._replaySampled=i.enabled),i.enabled?(n=GR(A(A({},t),{enabled:!0}),i),this.replayConfig=n,this.errorTraceback=i.errorTraceback,this._tdemRef=e,this.initializeModules(e,n),(r=this.samplerManager.initializeSampling()).shouldRecord?(this.startReplay(e,n,r.mode),this.registerReplaySamplingCheck(e,n),this.listenForErrors(e,n),this.listenForPerformance(e),this.listenForLifecycle(e,n),this.listenForUnload(e),this.isInitialized=!0):h("Plugin","Not sampled by sampler, skipping")):h("Plugin","disabled by effective policy")},registerReplaySamplingCheck:function(t,e){var n=this,r=function(e){clearInterval(i),e?(h("Plugin","Session/policy rejected, stopping replay and clearing buffer"),n.stopReplay(),n.eventBuffer&&n.eventBuffer.clear()):h("Plugin","Session sampled, replay continues")},i=setInterval(function(){var e=null==(e=t)?void 0:e._tdemSampleGate;e&&e.isDecided&&(e.isSampled&&(!(e=t._effectiveReplayPolicy)||e.enabled)?r(!1):r(!0))},50);t.lifeCycle.on("destroy",function(){clearInterval(i)})},parseConfig:function(e){return!0===e?{enabled:!0}:"object"===T(e)?A(A({},e),{enabled:!1!==e.enabled}):{enabled:!1}},initializeModules:function(t,e){var n=this,r=(this.sessionManager=new Vy({stickySession:null==(r=e.stickySession)||r}),this.sessionManager.setTdemInstance(t),t.sessionManager=this.sessionManager,this.eventBuffer=new Ky({},null!=(r=e.useCompression)&&r),this.samplerManager=new V_({sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate}),this.recorderManager=new q_({onRecordingEvent:function(e){n.handleRecordingEvent(e,t)},onCheckout:function(){if(!n._isCheckoutFlushing){n._isCheckoutFlushing=!0;try{var e,t;n.shouldSkipBufferFlush()?h("SessionReplay","Checkout in buffer mode (error traceback), skip flush"):(e=n._tdemRef,t=n.replayConfig,e&&t&&n.eventBuffer&&!n.eventBuffer.isEmpty()&&(h("SessionReplay","Checkout triggered, flushing current buffer"),n.flushReplayData(e,t,!0)))}finally{n._isCheckoutFlushing=!1}}},mode:"session"},e),(t.config.url||t.config.hostUrl||"").replace(/\/+$/,""));this.uploader=new FR({uploadUrl:e.uploadUrl||r+"/api/v1/collect/replay",appId:String(t.config.id||""),beforeSend:e.beforeSend,onError:e.onError,eventsCompression:null==(r=e.eventsCompression)||r,transport:null==(r=t.getInternalTransport)?void 0:r.call(t)}),this.clickDetector=new jR({slowClickTimeout:e.slowClickTimeout,slowClickThreshold:e.slowClickThreshold,rageClickCount:e.rageClickCount,rageClickWindow:e.rageClickWindow,onSlowClick:function(e){n.handleSlowClick(e,t)},onRageClick:function(e){n.handleRageClick(e,t)}}),h("Plugin","Modules initialized")},startReplay:function(e,t,n){var r;this.sessionManager&&this.recorderManager&&this.eventBuffer?(h("Plugin","Session started:",(this.sessionManager.restoreSession()||this.sessionManager.createSession(n)).id,"mode:",n),this.recorderManager.options.mode=n,r=B_(A({maskAllText:!1!==t.maskAllInputs,maskAllInputs:t.maskAllInputs,maskTextSelector:t.maskTextSelector,blockSelector:t.blockSelector,ignoreSelector:t.ignoreSelector},t.privacy)),this.recorderManager.startRecording({privacy:r}),this.clickDetector&&this.clickDetector.start(),"session"===n?this.startFlushTimer(e,t):h("Plugin","Buffer mode - flush on error only")):qy("Plugin","Modules not initialized")},handleRecordingEvent:function(e,t){this.eventBuffer&&this.sessionManager&&(this.sanitizeDataURLs(e),this.eventBuffer.addEvent(e),this.sessionManager.updateActivity())},sanitizeDataURLs:function(e){var t=e.type;if(2===t){var n=null==(n=e.data)?void 0:n.node;n&&this.sanitizeNodeTree(n,1024)}else if(3===t){n=e.data;if(0===(null==n?void 0:n.source)&&Array.isArray(n.adds)){for(var r=0,i=n.adds;r<i.length;r++){var o=i[r];null!=o&&o.node&&this.sanitizeNodeTree(o.node,1024)}if(Array.isArray(n.attributes))for(var a=0,s=n.attributes;a<s.length;a++){var u=s[a];if(null!=u&&u.attributes)for(var l=0,c=Object.entries(u.attributes);l<c.length;l++){var d=c[l],f=d[0],d=d[1];"string"==typeof d&&1024<d.length&&d.startsWith("data:")&&(u.attributes[f]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}}}}},sanitizeNodeTree:function(e,t){if(e){if(e.attributes)for(var n=e.attributes,r=0,i=Object.keys(n);r<i.length;r++){var o=i[r],a=n[o];"string"==typeof a&&a.length>t&&a.startsWith("data:")&&(n[o]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}if(Array.isArray(e.childNodes))for(var s=0,u=e.childNodes;s<u.length;s++){var l=u[s];this.sanitizeNodeTree(l,t)}}},handleSlowClick:function(e,t){h("ClickDetector","Slow click detected:",e.timeAfterClickMs,"ms"),this.addCustomEvent({category:"ui.slowClickDetected",message:"Slow click: "+e.timeAfterClickMs+"ms on "+e.node.tagName,data:{node:e.node,timeAfterClickMs:e.timeAfterClickMs,endReason:e.endReason}},t)},handleRageClick:function(e,t){h("ClickDetector","Rage click detected:",e.clickCount,"clicks"),this.addCustomEvent({category:"ui.multiClick",message:"Rage click: "+e.clickCount+" clicks on "+e.node.tagName,data:{node:e.node,clickCount:e.clickCount,timeWindowMs:e.timeWindowMs}},t)},addCustomEvent:function(e,t){this.eventBuffer&&(e={type:5,data:{tag:e.category,payload:A({message:e.message},e.data)},timestamp:Date.now()},this.eventBuffer.addEvent(e))},startFlushTimer:function(e,t){var n=this;this.flushTimer&&clearInterval(this.flushTimer),this.flushTimer=setInterval(function(){n.flushReplayData(e,t)},2e4)},flushReplayData:function(c,d,f){return void 0===f&&(f=!1),bl(this,void 0,void 0,function(){var t,n,r,i,o,a,s,u,l;return kl(this,function(e){switch(e.label){case 0:return this.sessionManager&&this.eventBuffer&&this.uploader&&JR(c)&&(t=this.sessionManager.getSession())?this.sessionManager.shouldRefreshSession()?(h("Plugin","Session expired, refreshing"),this.stopReplay(),i=this.sessionManager.refreshSession(),c.lifeCycle.emit("sessionRefreshed"),n=c._replaySampled,i.sampled&&!1!==n&&this.startReplay(c,d,i.sampled),[2]):this.eventBuffer.isEmpty()?[2]:(n=this.eventBuffer.getEventCount(),!f&&n<10?(h("Flush","Skipping flush, only "+n+" events (min: 10)"),[2]):(0!==t.segmentId||this.eventBuffer.hasCheckout()||(Hy("Flush","First segment missing FullSnapshot, triggering manual checkout"),this.recorderManager&&this.recorderManager.takeFullSnapshot()),[4,this.eventBuffer.finishAsync()])):[2];case 1:if(0===(r=e.sent()).eventCount)return[2];if(0===(i=r.events).length&&r.eventsJson)try{i=JSON.parse(r.eventsJson)}catch(q){return qy("Flush","Failed to parse eventsJson from worker:",q),[2]}s=this.splitEventsIntoChunks(i),h("Flush","Flushing "+r.eventCount+" events in "+s.length+" chunk(s), total size: "+Math.round(r.uncompressedSize/1024)+"KB"),o=!0,a=0,s=s,e.label=2;case 2:return a<s.length?(u=s[a],u=JSON.stringify(u),u={project_key:String(c.config.id||""),session_id:t.id,replay_id:t.replayId,segment_id:this.sessionManager.incrementSegmentId(),timestamp:Date.now(),replay_start_timestamp:t.started,replay_format:"rrweb",platform:"web",events_encoding:"plain_json",events:u},[4,this.uploader.uploadReplay(u)]):[3,5];case 3:if(!e.sent())return o=!1,[3,5];e.label=4;case 4:return a++,[3,2];case 5:return u=this.eventBuffer.isUsingWorker(),l=u?"(worker)":"(sync)",h("Flush","Flushing "+r.eventCount+" events, size: "+Math.round(r.uncompressedSize/1024)+"KB "+l),o&&(this.eventBuffer.clear(),this.sessionManager.saveSession()),[2]}})})},splitEventsIntoChunks:function(e,t,n){if(void 0===t&&(t=3145728),void 0===n&&(n=5242880),0===e.length)return[];var r=JSON.stringify(e);if(r.length<=t)return[e];Hy("Split","Events size "+Math.round(r.length/1024)+"KB exceeds limit "+Math.round(t/1024)+"KB, splitting");for(var i=[],o=[],a=2,s=0,u=e;s<u.length;s++){var l,c,d=u[s],f=JSON.stringify(d).length+1;0<o.length&&t<a+f&&(i.push(o),o=[],a=2),n<f?((c=2===(l=d.type)||4===l)?qy:Hy)("Split","Single event too large ("+Math.round(f/1024)+"KB), type="+l+(c?" (baseline snapshot, replay may become unplayable)":"")+", skipping"):(o.push(d),a+=f)}return 0<o.length&&i.push(o),i},stopReplay:function(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),h("Plugin","Recording stopped")},listenForErrors:function(t,n){var r=this;t.lifeCycle.on("errorOccurred",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){e&&r.handleError(e,t,n)})}),t.lifeCycle.on("tdemEventCreated",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){r.isErrorTDEMEvent(e)&&r.handleError(e,t,n)})})},isErrorTDEMEvent:function(e){return!!e&&("error"===String(e.event_category||"").toLowerCase()||(e=String(e.event_type||"").toLowerCase(),["js_error","promise_error","resource_error","api_error"].includes(e)))},handleError:function(e,t,n){this.samplerManager&&(this.samplerManager.isBufferMode()&&this.samplerManager.onErrorOccurred(e)&&(h("Plugin","Converting to session mode due to error"),this.flushReplayData(t,n,!0),this.startFlushTimer(t,n)),this.addCustomEvent({category:"error",message:(null==e?void 0:e.msg)||(null==e?void 0:e.message)||"Unknown error",data:{type:(null==e?void 0:e.type)||"error",stack:null==e?void 0:e.stack}},t))},listenForPerformance:function(n){var r=this;if(n.lifeCycle.on("afterReportWebVitals",function(e){r.handlePerformanceEvent("webVitals",e,n)}),n.lifeCycle.on("afterReportPagePerformance",function(e){r.handlePerformanceEvent("pageLoad",e,n)}),"undefined"!=typeof PerformanceObserver)try{var e=new PerformanceObserver(function(e){var t,e=e.getEntries(),e=e[e.length-1];e&&r.addCustomEvent({category:"performance.lcp",message:"LCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime,element:(null==(t=e.element)?void 0:t.tagName)||"unknown",size:e.size}},n)}),t=(e.observe({type:"largest-contentful-paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){"first-contentful-paint"===e.name&&r.addCustomEvent({category:"performance.fcp",message:"FCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime}},n)})})),i=(t.observe({type:"paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){100<e.duration&&r.addCustomEvent({category:"performance.longTask",message:"Long Task: "+Math.round(e.duration)+"ms",data:{duration:e.duration,startTime:e.startTime}},n)})}));i.observe({type:"longtask",buffered:!0}),n.lifeCycle.on("destroy",function(){e.disconnect(),t.disconnect(),i.disconnect()})}catch(De){}},handlePerformanceEvent:function(e,n,r){var i=this;n&&("webVitals"===e?["LCP","FCP","FID","CLS","TTFB","TTI","INP"].forEach(function(e){var t=n[e];t!==undefined&&-1!==t&&0<t&&i.addCustomEvent({category:"performance."+e.toLowerCase(),message:e+": "+("number"==typeof t?Math.round(t):t)+("CLS"===e?"":"ms"),data:{metric:e,value:t}},r)}):"pageLoad"===e&&this.addCustomEvent({category:"performance.pageLoad",message:"Page Load: "+(n.firstScreenTiming?Math.round(n.firstScreenTiming):"N/A")+"ms",data:{dnsLookup:n.dnsLookup,tcp:n.tcp,ssl:n.ssl,ttfb:n.ttfb,contentDownload:n.contentDownload,domParse:n.domParse,resourceDownload:n.resourceDownload,firstScreenTiming:n.firstScreenTiming}},r))},listenForLifecycle:function(o,t){var n,e,a=this;"undefined"!=typeof document&&(n=function(e){var t,n=null==(n=a.sessionManager)?void 0:n.getSession(),n=(null==n?void 0:n.replayId)||"",r=(null==(i=null==(r=o)?void 0:r.getOriginFrom)?void 0:i.call(r))||("undefined"!=typeof location?location.href:""),i="undefined"!=typeof document&&document.title||"";null!=(t=o.reportTDEMEvent)&&t.call(o,{event_id:xc(),event_type:e,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:r,data:{page_title:i,replay_id:n,is_effective_action:!1,tags:{environment:o.config.env||"production",version:String(o.config.version||"")},event_properties:{visibility_state:"undefined"!=typeof document?document.visibilityState:"",lifecycle_type:e}}})},document.addEventListener("visibilitychange",e=function(){var e;if("undefined"!=typeof document){if("hidden"===document.visibilityState)return n(P.TAB_HIDDEN),a.shouldSkipBufferFlush()?void h("Lifecycle","Buffer mode (error traceback), skip flush on hidden"):void a.flushReplayData(o,t,!0);"visible"===document.visibilityState&&(n(P.TAB_VISIBLE),(e=Date.now())-a._lastLifecycleSnapshotAt<5e3||(a._lastLifecycleSnapshotAt=e,null!=(e=a.recorderManager)&&e.takeFullSnapshot(),a.shouldSkipBufferFlush()?h("Lifecycle","Buffer mode (error traceback), skip flush on visible"):a.flushReplayData(o,t,!0)))}}),o.lifeCycle.on("destroy",function(){document.removeEventListener("visibilitychange",e)}))},listenForUnload:function(e){var t=this,n=function(){t.flushOnUnload(e)};window.addEventListener("beforeunload",n),window.addEventListener("pagehide",n),e.lifeCycle.on("destroy",function(){window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)})},flushOnUnload:function(e){if(this.sessionManager&&this.eventBuffer&&this.uploader&&JR(e))if(this.shouldSkipBufferFlush())h("Unload","Buffer mode (error traceback), skip flush on unload");else{var t=this.sessionManager.getSession();if(t&&(this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),!this.eventBuffer.isEmpty())){var n=this.eventBuffer.finish();if(0!==n.eventCount){for(var n=this.splitEventsIntoChunks(n.events,51200,51200),r=0,i=0,o=0,a=n;o<a.length;o++){var s=a[o],s={project_key:String(e.config.id||""),session_id:t.id,replay_id:t.replayId,segment_id:this.sessionManager.incrementSegmentId(),timestamp:Date.now(),replay_start_timestamp:t.started,replay_format:"rrweb",platform:"web",events_encoding:"plain_json",events:JSON.stringify(s)};this.uploader.sendBeacon(s)?r++:(i++,Hy("Unload","sendBeacon rejected chunk (segment_id="+s.segment_id+"), likely exceeds 64KB browser limit or queue full"))}h("SessionReplay","sendBeacon on unload: "+r+"/"+n.length+" chunk(s) queued, "+i+" rejected")}}}},destroy:function(){this.stopReplay(),this.sessionManager&&this.sessionManager.saveSession(),this.sessionManager=null,this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,this.recorderManager=null,this.samplerManager=null,this.uploader=null,this.clickDetector=null,this.replayConfig=null,this._tdemRef=null,this._isCheckoutFlushing=!1,this._lastLifecycleSnapshotAt=0,this.isInitialized=!1,h("Plugin","destroyed")}}),ZR={enabled:!0,ruleVersion:"1.0.0",payloadAllowlist:[],click:{enabled:!0,deadClickWindowMs:3e3,rageClickWindowMs:1e3,rageClickCount:5,errorClickWindowMs:3e3,resolveOnDomMutation:!0,resolveOnSpaNavigation:!0,resolveOnExternalNavigation:!0,resolveOnWindowOpen:!0,resolveOnPageUnload:!0,resolveOnFormAction:!0,resolveOnApiSuccess:!0,ignoreDeadClickSelectors:[],effectiveActionSelectors:[]},performance:{enabled:!0,slowPageLcpThreshold:4e3,slowPageInpThreshold:500},form:{enabled:!0,fieldIdAttr:"data-field-id",formIdAttr:"data-form-id",longFocusThresholdMs:2e4,incompleteMinFieldRatio:.3,zigzagMinCount:2},navigation:{enabled:!0,backForwardAsStruggle:!0},custom:{enabled:!0,detector:undefined}},KR=new Set([P.JS_ERROR,P.PROMISE_ERROR,P.RESOURCE_ERROR,P.API_ERROR]),YR=new Set([P.FORM_CHANGE,P.FORM_SUBMIT,P.FORM_SUBMIT_RESULT]),XR=(new s({name:"struggleMonitor"}),new s({name:"struggleMonitor",instanceStates:new Map,originalWindowOpen:null,windowOpenHooked:!1,onNewTdem:function(t){var n,r=this,e=!0===(e=this.$getConfig(t))?A({},ZR):e&&"object"===T(e)?A(A(A({},ZR),e),{click:A(A({},ZR.click),e.click||{}),performance:A(A({},ZR.performance),e.performance||{}),form:A(A({},ZR.form),e.form||{}),navigation:A(A({},ZR.navigation),e.navigation||{}),custom:A(A({},ZR.custom),e.custom||{}),payloadAllowlist:(Array.isArray(e.payloadAllowlist)?e:ZR).payloadAllowlist,enabled:!1!==e.enabled}):A(A({},ZR),{enabled:!1});e.enabled&&(n={config:e,clickDetector:null,recentClicks:[],pendingDeadClicks:new Map,focusStartMap:new Map,formStateMap:new Map,removeDomListeners:[],onEventCreated:null,onDestroy:null},this.instanceStates.set(t,n),this.initClickDetector(t,n),this.initFormListeners(t,n),n.onEventCreated=function(e){r.handleEventCreated(t,n,e||[])},t.lifeCycle.on("tdemEventCreated",n.onEventCreated),n.onDestroy=function(){return r.cleanupInstance(t)},t.lifeCycle.on("destroy",n.onDestroy))},initClickDetector:function(t,n){var e,r=this;"undefined"!=typeof window&&"undefined"!=typeof document&&(n.clickDetector=new jR({slowClickTimeout:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,slowClickThreshold:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,rageClickCount:null!=(e=null==(e=n.config.click)?void 0:e.rageClickCount)?e:5,rageClickWindow:null!=(e=null==(e=n.config.click)?void 0:e.rageClickWindowMs)?e:1e3,onRageClick:function(e){r.onRageClick(t,n,e)},onClickStart:function(e){r.onClickStart(t,n,e)},onEffectiveAction:function(e){r.onEffectiveAction(n,e)},onSlowClick:function(e){r.onSlowClick(t,n,e)}}),n.clickDetector.start(),this.initClickEffectiveActionListeners(n),this.initWindowOpenHook())},initClickEffectiveActionListeners:function(n){var e,t=this;"undefined"!=typeof window&&((e=function(e,t){window.addEventListener(e,t),n.removeDomListeners.push(function(){window.removeEventListener(e,t)})})("pagehide",function(){var e;!1!==(null==(e=n.config.click)?void 0:e.resolveOnPageUnload)&&(t.resolvePendingDeadClicks(n,"page_unload"),null!=(e=n.clickDetector))&&e.markEffectiveAction("page_unload")}),e("beforeunload",function(){var e;!1!==(null==(e=n.config.click)?void 0:e.resolveOnPageUnload)&&(t.resolvePendingDeadClicks(n,"page_unload"),null!=(e=n.clickDetector))&&e.markEffectiveAction("page_unload")}))},initWindowOpenHook:function(){var r,i;"undefined"==typeof window||this.windowOpenHooked||(r=window.open,this.originalWindowOpen=r,this.windowOpenHooked=!0,i=this,window.open=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=r.apply(window,e);return i.resolveWindowOpenActions(),n})},resolveWindowOpenActions:function(){var n=this,r=Date.now();this.instanceStates.forEach(function(e){var t;!1!==(null==(t=e.config.click)?void 0:t.resolveOnWindowOpen)&&(null!=(t=e.clickDetector)&&t.markEffectiveAction("window_open"),n.resolvePendingDeadClicks(e,"window_open",r,n.getCurrentPageUrl()))})},restoreWindowOpenHook:function(){"undefined"!=typeof window&&this.windowOpenHooked&&this.originalWindowOpen&&(window.open=this.originalWindowOpen,this.originalWindowOpen=null,this.windowOpenHooked=!1)},initFormListeners:function(r,i){var e,t,o=this;null!=(t=i.config.form)&&t.enabled&&"undefined"!=typeof document&&((t=function(e,t,n){void 0===n&&(n=!0),document.addEventListener(e,t,n),i.removeDomListeners.push(function(){document.removeEventListener(e,t,n)})})("focusin",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,P.FORM_FOCUS,e,e.form||undefined)}),t("focusout",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,P.FORM_BLUR,e,e.form||undefined)}),t("change",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,P.FORM_CHANGE,e,e.form||undefined)}),t("submit",function(e){e=e.target;e instanceof HTMLFormElement&&o.reportFormEvent(r,i,P.FORM_SUBMIT,null,e)}),t("invalid",function(e){var t,n,e=o.getTrackableField(e.target);e&&(n=e.form||undefined,n=o.buildFormBaseData(r,i,e,n),n={event_id:xc(),event_type:P.FORM_SUBMIT_RESULT,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:"undefined"!=typeof window?window.location.href:(null==(t=r.getOriginFrom)?void 0:t.call(r))||"",data:A(A({},n),{event_name:"form_submit_fail",is_effective_action:!0,validation_message:e.validationMessage||undefined,event_properties:A(A({},n.event_properties||{}),{status:"fail",validation_code:!1===(null==(t=e.validity)?void 0:t.valid)?"invalid":"validation_error"})})},null!=(e=r.reportTDEMEvent))&&e.call(r,n)}),e=function(){o.reportPendingUncompletedForms(r,i,"pagehide")},"undefined"!=typeof window)&&(window.addEventListener("pagehide",e),i.removeDomListeners.push(function(){window.removeEventListener("pagehide",e)}))},getTrackableField:function(e){return!(e&&e instanceof Element)||!(e=e.closest("input, textarea, select"))||e instanceof HTMLInputElement&&["button","submit","reset","image","hidden"].includes(e.type)?null:e},buildFormBaseData:function(e,t,n,r){var n=n||null,r=r||(null==n?void 0:n.form)||undefined,i=(null==(i=t.config.form)?void 0:i.fieldIdAttr)||"data-field-id",t=(null==(t=t.config.form)?void 0:t.formIdAttr)||"data-form-id",i=n?n.getAttribute(i)||n.id||n.name||n.tagName.toLowerCase()+"_"+(n.type||"field"):undefined,t=r&&(r.getAttribute(t)||r.id||r.getAttribute("name")||r.getAttribute("action"))||undefined,o="string"==typeof(null==(o=n)?void 0:o.value)?n.value.length:0,o=0===o?"0":o<=10?"1_10":o<=50?"11_50":"51_plus";return{replay_id:_d(e),is_effective_action:!0,form_id:t,field_id:i,tags:{},event_properties:{field_name:(null==n?void 0:n.name)||"",field_type:(null==n?void 0:n.type)||(null==(e=null==n?void 0:n.tagName)?void 0:e.toLowerCase())||"",form_name:(null==r?void 0:r.getAttribute("name"))||"",is_required:String(!(null==n||!n.required)),value_length_bucket:String(o)}}},reportFormEvent:function(e,t,n,r,i){var t=this.buildFormBaseData(e,t,r,i),i="undefined"!=typeof window?window.location.href:(null==(r=e.getOriginFrom)?void 0:r.call(e))||"",r={event_id:xc(),timestamp:Date.now(),page_url:i};n!==P.FORM_FOCUS?n!==P.FORM_BLUR?n!==P.FORM_CHANGE?(i=A(A({},r),{event_type:P.FORM_SUBMIT,event_category:Rc.BEHAVIOR,data:A(A({},t),{submit_method:"native_submit"})}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=A(A({},r),{event_type:P.FORM_CHANGE,event_category:Rc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=A(A({},r),{event_type:P.FORM_BLUR,event_category:Rc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=A(A({},r),{event_type:P.FORM_FOCUS,event_category:Rc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i))},onClickStart:function(e,t,n){var r,i=t.config.click||ZR.click;!1!==i.enabled&&(r=n.node.selector||n.node.tagName||"unknown",this.shouldIgnoreDeadClick(n.target,i)?this.resolvePendingDeadClicks(t,"custom",n.timestamp,this.getCurrentPageUrl()):this.scheduleDeadClick(e,t,{pendingId:"pending_"+n.timestamp+"_"+Math.random().toString(16).slice(2),timestamp:n.timestamp,pageUrl:this.getCurrentPageUrl(),ownerKey:r,node:n.node}))},onEffectiveAction:function(e,t){this.shouldResolveByReason(e,t.reason)&&this.resolvePendingDeadClicks(e,t.reason,t.timestamp,this.getCurrentPageUrl())},scheduleDeadClick:function(t,n,r){var i=this,o=null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,e=setTimeout(function(){var e=n.pendingDeadClicks.get(r.pendingId);e&&(n.pendingDeadClicks["delete"](r.pendingId),i.emitDeadClick(t,n,e,o))},o);n.pendingDeadClicks.set(r.pendingId,A(A({},r),{timeout:e}))},emitDeadClick:function(e,t,n,r){var i,o=n.clickEventId?[n.clickEventId]:undefined;null!=(i=e.reportStruggle)&&i.call(e,{type:"dead_click",ownerType:"element",ownerKey:n.ownerKey,pageUrl:n.pageUrl,triggerEventId:n.clickEventId,relatedEventIds:o,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{timeout_ms:r,selector:n.node.selector||""}})},resolvePendingDeadClicks:function(r,i,o,a){void 0===o&&(o=Date.now());var e,s=null!=(e=null==(e=r.config.click)?void 0:e.deadClickWindowMs)?e:3e3;r.pendingDeadClicks.forEach(function(e,t){var n=o-e.timestamp;n<0||s<n||"spa_navigation"!==i&&"page_unload"!==i&&a&&e.pageUrl&&a!==e.pageUrl||(clearTimeout(e.timeout),r.pendingDeadClicks["delete"](t))})},linkPendingDeadClickToClickEvent:function(e,n,r){var i=n.timestamp||Date.now(),o=this.getEventPageUrl(n);e.pendingDeadClicks.forEach(function(e){var t;e.clickEventId||(t=i-e.timestamp)<0||1e3<t||o&&e.pageUrl&&o!==e.pageUrl||(e.clickEventId=n.event_id,r&&"unknown"!==r&&(e.ownerKey=r))})},shouldResolveByReason:function(e,t){e=e.config.click||ZR.click;return!1!==e.enabled&&("dom_mutation"===t?!1!==e.resolveOnDomMutation:"spa_navigation"===t?!1!==e.resolveOnSpaNavigation:"external_navigation"===t||"download"===t?!1!==e.resolveOnExternalNavigation:"window_open"===t?!1!==e.resolveOnWindowOpen:"page_unload"===t?!1!==e.resolveOnPageUnload:"form_change"===t||"form_submit"===t?!1!==e.resolveOnFormAction:"api_success"!==t||!1!==e.resolveOnApiSuccess)},shouldIgnoreDeadClick:function(t,e){return Sl(e.ignoreDeadClickSelectors||[],e.effectiveActionSelectors||[]).some(function(e){try{return!!e&&!!t.closest(e)}catch(Pe){return!1}})},getCurrentPageUrl:function(){return"undefined"==typeof window?"":window.location.href},getEventPageUrl:function(e){return(null==e?void 0:e.page_url)||(null==(e=null==e?void 0:e.data)?void 0:e.page_url)||""},onRageClick:function(e,t,n){var r=n.node.selector||n.node.tagName||"unknown",i=null!=(o=null==(o=t.config.click)?void 0:o.rageClickWindowMs)?o:1e3,o=t.recentClicks.filter(function(e){return n.timestamp-e.timestamp<=i}).map(function(e){return e.eventId}).filter(Boolean).slice(-10),r={type:"rage_click",ownerType:"element",ownerKey:r,pageUrl:window.location.href,triggerEventId:o[0],relatedEventIds:o.length?o:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{clickCount:n.clickCount,timeWindowMs:n.timeWindowMs,selector:n.node.selector||""}};null!=(o=e.reportStruggle)&&o.call(e,r)},onSlowClick:function(e,t,n){},handleEventCreated:function(i,o,e){var t,a=this,s=Date.now(),n=o.config.click||ZR.click,r=Math.max(null!=(t=n.errorClickWindowMs)?t:3e3,null!=(t=n.rageClickWindowMs)?t:1e3,null!=(t=n.deadClickWindowMs)?t:3e3);o.recentClicks=o.recentClicks.filter(function(e){return s-e.timestamp<=r}),e.forEach(function(e){var t,n,r;e&&e.event_type!==P.STRUGGLE&&(t=e.timestamp||s,n=a.getEventPageUrl(e),e.event_type===P.CLICK?(r=(null==(r=e.data)?void 0:r.target_element)||(null==(r=e.data)?void 0:r.target_id)||(null==(r=e.data)?void 0:r.target_class)||"unknown",o.recentClicks.push({eventId:e.event_id,timestamp:t,pageUrl:n,ownerKey:r}),a.linkPendingDeadClickToClickEvent(o,e,r)):(a.isEffectiveActionEvent(o,e)&&(a.resolvePendingDeadClicks(o,a.getEffectiveActionReason(e),t,n),null!=(r=o.clickDetector)&&r.markEffectiveAction(a.getEffectiveActionReason(e))),KR.has(e.event_type)?a.tryReportErrorClick(i,o,e):e.event_type===P.PAGE_LOAD||e.event_type===P["true"]?a.tryReportSlowPage(i,o,e):e.event_type===P.FORM_FOCUS?(a.trackFormFocus(o,e),a.trackFormChangeAndZigzag(i,o,e)):e.event_type===P.FORM_CHANGE?a.trackFormChangeAndZigzag(i,o,e):e.event_type===P.FORM_BLUR?a.tryReportLongFocusTime(i,o,e):e.event_type===P.FORM_SUBMIT?a.trackFormSubmitResult(o,e):e.event_type===P.FORM_SUBMIT_RESULT?(a.trackFormSubmitResult(o,e),a.tryReportFormValidationError(i,o,e)):e.event_type===P.PAGE_VIEW&&null!=(n=null==(t=e.data)?void 0:t.event_properties)&&n.navigation_type&&a.tryReportBackForward(i,o,e)),a.tryReportCustomStruggle(i,o,e))})},isEffectiveActionEvent:function(e,t){var n;return!1!==(null==(n=e.config.click)?void 0:n.enabled)&&(t.event_type===P.API_CALL?!1!==(null==(n=e.config.click)?void 0:n.resolveOnApiSuccess):t.event_type===P.PAGE_VIEW&&null!=(n=null==(n=t.data)?void 0:n.event_properties)&&n.navigation_type?!1!==(null==(n=e.config.click)?void 0:n.resolveOnSpaNavigation):YR.has(t.event_type)?!1!==(null==(n=e.config.click)?void 0:n.resolveOnFormAction):!0===(null==(e=t.data)?void 0:e.is_effective_action))},getEffectiveActionReason:function(e){return e.event_type===P.API_CALL?"api_success":e.event_type===P.PAGE_VIEW?"spa_navigation":e.event_type===P.FORM_CHANGE?"form_change":e.event_type===P.FORM_SUBMIT||e.event_type===P.FORM_SUBMIT_RESULT?"form_submit":"custom"},getFormStateKey:function(e,t){return e||t||"unknown_form"},ensureFormState:function(e,t,n){var r=this.getFormStateKey(t,n);return e.formStateMap.has(r)||e.formStateMap.set(r,{formId:t||r,pageUrl:n||"",touchedFieldIds:new Set,requiredFieldIds:new Set,changedFieldIds:new Set,focusPath:[],zigzagHits:0,hasSuccessSubmit:!1,reportedZigzag:!1,reportedUncompleted:!1}),e.formStateMap.get(r)},recordFormTouch:function(e,t){var n,e=this.ensureFormState(e,null==(e=null==t?void 0:t.data)?void 0:e.form_id,null==t?void 0:t.page_url),r=String((null==(r=null==t?void 0:t.data)?void 0:r.field_id)||"");return r&&(e.touchedFieldIds.add(r),!0===(null==(n=t.data)?void 0:n.is_required)&&e.requiredFieldIds.add(r),t.event_type===P.FORM_CHANGE)&&e.changedFieldIds.add(r),null!=t&&t.page_url&&(e.pageUrl=t.page_url),e},trackFormFocus:function(e,t){var n,r=t,i=String((null==(i=null==r?void 0:r.data)?void 0:i.field_id)||"");i&&((n=this.recordFormTouch(e,r)).focusPath.push(i),12<n.focusPath.length&&n.focusPath.shift(),e.focusStartMap.set(i,{timestamp:t.timestamp||Date.now(),eventId:t.event_id,formId:null==(n=null==r?void 0:r.data)?void 0:n.form_id,pageUrl:null==r?void 0:r.page_url}))},trackFormChangeAndZigzag:function(e,t,n){var r,i,o,a,s;n.event_type!==P.FORM_CHANGE?n.event_type!==P.FORM_FOCUS||(s=(i=this.recordFormTouch(t,r=n)).focusPath).length<4||i.reportedZigzag||(o=(s=s.slice(-4))[0],a=s[1],!o)||!a||o===a||o!==s[2]||a!==s[3]||i.changedFieldIds.size<2||(i.zigzagHits+=1,s=null!=(a=null==(o=t.config.form)?void 0:o.zigzagMinCount)?a:2,i.zigzagHits<s)||(i.reportedZigzag=!0,null==(o=e.reportStruggle))||o.call(e,{type:"form_zigzag",ownerType:"form",ownerKey:i.formId,pageUrl:i.pageUrl,formId:i.formId,fieldId:String((null==(a=null==r?void 0:r.data)?void 0:a.field_id)||""),triggerEventId:r.event_id,relatedEventIds:[r.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{zigzag_hits:i.zigzagHits,changed_field_count:i.changedFieldIds.size}}):this.recordFormTouch(t,n)},trackFormSubmitResult:function(e,t){t.event_type!==P.FORM_SUBMIT&&t.event_type!==P.FORM_SUBMIT_RESULT||((e=this.recordFormTouch(e,t)).lastSubmitEventId=t.event_id,t.event_type!==P.FORM_SUBMIT_RESULT)||"success"===(null==(t=null==(t=t.data)?void 0:t.event_properties)?void 0:t.status)&&(e.hasSuccessSubmit=!0)},reportPendingUncompletedForms:function(t,n,r){var i=this;n.formStateMap.forEach(function(e){i.tryReportUncompletedForm(t,n,e,r)})},tryReportUncompletedForm:function(e,t,n,r){var i,o,a,s;n.reportedUncompleted||n.hasSuccessSubmit||0===n.touchedFieldIds.size||(a=0<(o=n.requiredFieldIds.size)?o:n.touchedFieldIds.size)<=0||(a=n.changedFieldIds.size/a)<(s=null!=(s=null==(s=t.config.form)?void 0:s.incompleteMinFieldRatio)?s:.3)||(n.reportedUncompleted=!0,null==(i=e.reportStruggle))||i.call(e,{type:"uncompleted_form",ownerType:"form",ownerKey:n.formId,pageUrl:n.pageUrl,formId:n.formId,triggerEventId:n.lastSubmitEventId,relatedEventIds:n.lastSubmitEventId?[n.lastSubmitEventId]:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{touched_field_count:n.touchedFieldIds.size,changed_field_count:n.changedFieldIds.size,required_field_count:o,changed_ratio:Number(a.toFixed(4)),threshold_ratio:s}})},tryReportLongFocusTime:function(e,t,n){var r,i,o,a,s=String((null==(s=null==n?void 0:n.data)?void 0:s.field_id)||"");s&&(i=t.focusStartMap.get(s))&&(t.focusStartMap["delete"](s),o=null!=(o=null==(o=t.config.form)?void 0:o.longFocusThresholdMs)?o:2e4,(a=Math.max((n.timestamp||Date.now())-i.timestamp,0))<o||null==(r=e.reportStruggle)||r.call(e,{type:"long_focus_time",ownerType:"field",ownerKey:s,pageUrl:(null==n?void 0:n.page_url)||i.pageUrl,formId:(null==(e=null==n?void 0:n.data)?void 0:e.form_id)||i.formId,fieldId:s,triggerEventId:n.event_id,relatedEventIds:[i.eventId||"",n.event_id].filter(Boolean),detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{focus_duration_ms:a,threshold_ms:o}}))},tryReportErrorClick:function(e,t,n){var r,i,o;t.recentClicks.length&&(i=null!=(o=(t.config.click||ZR.click).errorClickWindowMs)?o:3e3,o=Sl(t.recentClicks).reverse().find(function(e){return 0<=n.timestamp-e.timestamp&&n.timestamp-e.timestamp<=i}))&&null!=(r=e.reportStruggle)&&r.call(e,{type:"error_click",ownerType:"element",ownerKey:o.ownerKey,pageUrl:o.pageUrl||n.page_url,triggerEventId:o.eventId,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{errorEventType:n.event_type}})},tryReportSlowPage:function(e,t,n){var r,i,o,a=t.config.performance||ZR.performance;a.enabled&&(i=(null==(i=n.data)?void 0:i.measurements)||{},r=Number(i.lcp||0),i=Number(i.inp||0),o=null!=(o=a.slowPageLcpThreshold)?o:4e3,a=null!=(a=a.slowPageInpThreshold)?a:500,o<=r||a<=i)&&null!=(o=e.reportStruggle)&&o.call(e,{type:"slow_page",ownerType:"page",ownerKey:n.page_url||("undefined"!=typeof window?window.location.href:""),pageUrl:n.page_url,triggerEventId:n.event_id,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{lcp:r,inp:i,sourceEventType:n.event_type}})},tryReportFormValidationError:function(e,t,n){var r,i,o,a,s=(null==(s=null==n?void 0:n.data)?void 0:s.event_properties)||{},u=(null==n?void 0:n.data)||{};"fail"===String((null==s?void 0:s.status)||(null===(i=u)?void 0:i.status)||"")&&(i=String((null==s?void 0:s.field_id)||(null===(i=u)?void 0:i.field_id)||""),o=String((null==s?void 0:s.form_id)||(null===(o=u)?void 0:o.form_id)||""),a=i||o||(null==n?void 0:n.page_url)||"unknown",null!=(r=e.reportStruggle))&&r.call(e,{type:"form_validation_error",ownerType:i?"field":"form",ownerKey:a,pageUrl:null==n?void 0:n.page_url,formId:o,fieldId:i,triggerEventId:n.event_id,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{validation_code:(null==s?void 0:s.validation_code)||(null===(e=u)?void 0:e.validation_code),validation_message:null==(a=null==n?void 0:n.data)?void 0:a.validation_message,sourceEventType:n.event_type}})},tryReportBackForward:function(e,t,n){var r,i,o=t.config.navigation||ZR.navigation;o.enabled&&o.backForwardAsStruggle&&(n=null==(n=null==(o=n)?void 0:o.data)?void 0:n.event_properties,"back"!==(i=String((null==n?void 0:n.navigation_type)||""))&&"forward"!==i||null==(r=e.reportStruggle)||r.call(e,{type:"back_forward",ownerType:"page",ownerKey:String((null==n?void 0:n.to_page)||"")||(null==o?void 0:o.page_url)||"unknown",pageUrl:null==o?void 0:o.page_url,triggerEventId:o.event_id,relatedEventIds:[o.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{navigation_type:i,from_page:null==n?void 0:n.from_page,to_page:null==n?void 0:n.to_page}}))},tryReportCustomStruggle:function(n,r,i){var e=r.config.custom||ZR.custom;e.enabled&&"function"==typeof e.detector&&(e=e.detector({event:i,tdem:n}),(Array.isArray(e)?e:e?[e]:[]).forEach(function(e){var t,e=A(A({},e),{type:(null==e?void 0:e.type)||"custom_struggle",ownerType:(null==e?void 0:e.ownerType)||"app",ownerKey:(null==e?void 0:e.ownerKey)||i.page_url||"custom",ruleVersion:(null==e?void 0:e.ruleVersion)||r.config.ruleVersion,payloadAllowlist:(null==e?void 0:e.payloadAllowlist)||r.config.payloadAllowlist,detectionSource:(null==e?void 0:e.detectionSource)||"custom"});null!=(t=n.reportStruggle)&&t.call(n,e)}))},cleanupInstance:function(e){var t=this.instanceStates.get(e);t&&(t.onEventCreated&&e.lifeCycle.remove("tdemEventCreated",t.onEventCreated),t.onDestroy&&e.lifeCycle.remove("destroy",t.onDestroy),t.clickDetector&&t.clickDetector.stop(),t.pendingDeadClicks.forEach(function(e){clearTimeout(e.timeout)}),t.pendingDeadClicks.clear(),this.reportPendingUncompletedForms(e,t,"destroy"),t.focusStartMap.clear(),t.formStateMap.clear(),t.removeDomListeners.forEach(function(e){return e()}),t.removeDomListeners=[],this.instanceStates["delete"](e),0===this.instanceStates.size)&&this.restoreWindowOpenHook()},destroy:function(){var n=this;this.instanceStates.forEach(function(e,t){n.cleanupInstance(t)}),this.instanceStates.clear(),this.restoreWindowOpenHook()}})),QR=function(e,t){return void 0===t&&(t=2),"number"==typeof e&&Number.isFinite(e)?(t=Math.pow(10,Math.max(0,Math.min(12,Math.floor(t)))),Math.round(e*t)/t):0},eO=function(e,t){return void 0===t&&(t=2048),"string"==typeof e&&e.trim()?e.trim().slice(0,Math.max(1,Math.floor(t))):"unknown"},tO={enabled:!0,threshold:2e3,noResponseThreshold:5e3,sampleRate:1},nO=new Map,rO=function(e){var t,n=nO.get(e);if(n){n.destroyed=!0;try{null!=(t=n.observer)&&t.disconnect()}catch(v){}n.observer=null,n.lagRecords.length=0,e.lifeCycle.remove("destroy",n.onDestroy),nO["delete"](e)}},t=new s({name:"lagMonitor",onNewTdem:function(o,e){e=e,void 0===(r=null!=(n=o.config)&&n.debug?function(e,t){"undefined"!=typeof console&&console.warn&&console.warn("[TDEM] "+e+": "+t+", fallback applied")}:function(){return undefined})&&(r=function(){return undefined});var r,t,n,a=!1===e?A(A({},tO),{enabled:!1}):!0===e||e===undefined?A({},tO):!e||"object"!==T(e)||Array.isArray(e)?(r("lagMonitor","invalid_type"),A({},tO)):(n=A({},tO),e.enabled!==undefined&&("boolean"==typeof e.enabled?n.enabled=e.enabled:r("lagMonitor.enabled","invalid_type")),n.threshold=(t=function(e,t,n){return e===undefined?n:"number"!=typeof e?(r(t,"invalid_type"),n):Number.isFinite(e)?e<=0?(r(t,"out_of_range"),n):e:(r(t,"invalid_number"),n)})(e.threshold,"lagMonitor.threshold",tO.threshold),n.noResponseThreshold=t(e.noResponseThreshold,"lagMonitor.noResponseThreshold",tO.noResponseThreshold),e.sampleRate!==undefined&&("number"!=typeof e.sampleRate?r("lagMonitor.sampleRate","invalid_type"):Number.isFinite(e.sampleRate)?e.sampleRate<0||1<e.sampleRate?r("lagMonitor.sampleRate","out_of_range"):n.sampleRate=e.sampleRate:r("lagMonitor.sampleRate","invalid_number")),n.noResponseThreshold<=n.threshold&&(n.noResponseThreshold=Math.max(5e3,n.threshold+1),r("lagMonitor.noResponseThreshold","relation_conflict")),n);if(a.enabled&&"undefined"!=typeof PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")&&(i=a.sampleRate,Math.random()<i)){var i,s=[],u={observer:null,lagRecords:s,sampled:!0,destroyed:!1,onDestroy:function(){return rO(o)}};nO.set(o,u),o.lifeCycle.on("destroy",u.onDestroy);try{u.observer=new PerformanceObserver(function(e){if(!u.destroyed)try{e.getEntries().forEach(function(e){var t,n,r,i;u.destroyed||e.duration<=a.threshold||(t=null==(t=e.scripts)?void 0:t[0],e={name:e.name,timestamp:Date.now(),entryType:e.entryType,startTime:e.startTime,duration:e.duration,invoker:null==t?void 0:t.invoker,sourceURL:null==t?void 0:t.sourceURL},s.push(e),100<s.length&&s.shift(),t=o,r=(e=e).duration>=(n=a).noResponseThreshold,i=_d(t),e={event_id:xc(),event_type:r?P.NO_RESPONSE:P.LAG_DETECTED,event_category:r?Rc.ERROR:Rc.PERFORMANCE,timestamp:Date.now(),page_url:(null==(r=t.getOriginFrom)?void 0:r.call(t))||window.location.href,data:A(A({measurements:{duration:QR(e.duration),start_time_ms:QR(e.startTime),lag_threshold_ms:n.threshold,no_response_threshold_ms:n.noResponseThreshold},event_properties:{entry_type:e.entryType||"long-animation-frame",source_url:eO(e.sourceURL,2048),invoker:eO(e.invoker,256)}},i?{replay_id:i}:{}),{tags:{environment:(null==(r=t.config)?void 0:r.env)||"production",version:String((null==(n=t.config)?void 0:n.version)||"")}})},t.reportTDEMEvent(e))})}catch(i){}}),u.observer.observe({type:"long-animation-frame",buffered:!1})}catch(w){rO(o)}}},getLagRecords:function(e){return Sl((null==(e=nO.get(e))?void 0:e.lagRecords)||[])},destroy:function(){Array.from(nO.keys()).forEach(rO)}}),iO={enabled:!0,containers:["body","html","#app","#root"],ignoreContainers:[],containerMatchers:{tagName:["body","html"],id:["app","root"],className:[]},ignoreMatchers:{tagName:[],id:[],className:[]},detectStartPosition:{x:0,y:0},emptyElementsPercent:70,sameElementsPercent:70,debounceDuration:2e3,everySideSampleNumber:9,disableSameElementsCheck:!0,ignoreElesWhenDomChange:[],reDetectInterval:2e3,samePointDepth:5,customBlankScreenDector:null},oO=["canvas","img","svg","iframe"],aO=(0,function(e){var t=e.nodeName.toLowerCase(),n=e.id||"",e="string"==typeof(e=e).className?e.className:e.getAttribute("class")||"",r=e.split(" ").filter(Boolean).map(function(e){return"."+e}).join("");return{tagName:t,id:n,className:e,selector:t+(n?"#"+n:"")+r}}),sO=function(t,e){var n;if(null!=(n=null==e?void 0:e.tagName)&&n.some(function(e){return t.tagName===e.toLowerCase().trim()}))return!0;if(t.id&&null!=(n=null==e?void 0:e.id)&&n.some(function(e){return t.id===e.trim()}))return!0;if(t.className&&null!=(n=null==e?void 0:e.className)&&n.length){var r=t.className.split(" ").map(function(e){return e.trim()}).filter(Boolean);if(e.className.some(function(e){return r.includes(e.trim())}))return!0}return!1},uO=function(t,e){return e.some(function(e){return t.selector.includes(e)})},lO=function(e){return{tagName:Sl(e.tagName||[]),id:Sl(e.id||[]),className:Sl(e.className||[])}},cO=function(){return A(A({},iO),{containers:Sl(iO.containers),ignoreContainers:Sl(iO.ignoreContainers),containerMatchers:lO(iO.containerMatchers),ignoreMatchers:lO(iO.ignoreMatchers),detectStartPosition:A({},iO.detectStartPosition),ignoreElesWhenDomChange:Sl(iO.ignoreElesWhenDomChange)})},dO=function(e,t){void 0===t&&(t=2);t=Math.pow(10,t);return Math.round(e*t)/t},fO=new Map,hO=function(e){var t,n=fO.get(e);n&&(n.destroyed=!0,n.detectTimer&&clearTimeout(n.detectTimer),n.bodyWaitTimer&&clearTimeout(n.bodyWaitTimer),null!==n.idleCallbackId&&"function"==typeof window.cancelIdleCallback&&(window.cancelIdleCallback(n.idleCallbackId),n.idleCallbackId=null),null!==n.bodyWaitFrame&&(window.cancelAnimationFrame||clearTimeout)(n.bodyWaitFrame),null!=(t=n.observer)&&t.disconnect(),e.lifeCycle.remove("errorOccurred",n.onErrorOccurred),e.lifeCycle.remove("destroy",n.onDestroy),window.removeEventListener("pagehide",n.handlePageHide),window.removeEventListener("beforeunload",n.handleBeforeUnload),document.removeEventListener("visibilitychange",n.handleVisibilityChange),fO["delete"](e))},i=new s({name:"blankScreen",onNewTdem:function(S,e){var _,E,C,R,O,t,x,n,r,i,o,a,s,u,l,c,d,f,h,p,m,g=this;"undefined"!=typeof document&&document.elementsFromPoint&&(e=e,void 0===(s=null!=(m=S.config)&&m.debug?function(e,t){"undefined"!=typeof console&&console.warn&&console.warn("[TDEM] "+e+": "+t+", fallback applied")}:function(){return undefined})&&(s=function(){return undefined}),m=cO(),(_=!1===e?A(A({},m),{enabled:!1}):!0===e||e===undefined?m:!e||"object"!==T(e)||Array.isArray(e)?(s("blankScreen","invalid_type"),m):(u="containerMatchers"in(e=e)||"ignoreMatchers"in e,p="containers"in e||"ignoreContainers"in e,l=function(e,t,n,r){return e===undefined?Sl(t):Array.isArray(e)&&e.length<=100&&e.every(function(e){return"string"==typeof e&&0<e.trim().length&&e.trim().length<=r})?e.map(function(e){return e.trim()}):(s(n,"invalid_array"),Sl(t))},h=function(e,t,n){return e===undefined?lO(t):!e||"object"!==T(e)||Array.isArray(e)?(s(n,"invalid_type"),lO(t)):{tagName:l((e=e).tagName,t.tagName||[],n+".tagName",128),id:l(e.id,t.id||[],n+".id",128),className:l(e.className,t.className||[],n+".className",128)}},c=function(e,t,n,r){return e===undefined?t:"number"!=typeof e?(s(n,"invalid_type"),t):Number.isFinite(e)?r(e)?e:(s(n,"out_of_range"),t):(s(n,"invalid_number"),t)},d=function(e,t,n,r,i){return c(e,t,n,function(e){return Number.isInteger(e)&&r<=e&&e<=i})},f=cO(),e.enabled!==undefined&&("boolean"==typeof e.enabled?f.enabled=e.enabled:s("blankScreen.enabled","invalid_type")),f.containers=l(e.containers,m.containers,"blankScreen.containers",256),f.ignoreContainers=l(e.ignoreContainers,m.ignoreContainers,"blankScreen.ignoreContainers",256),f.containerMatchers=h(e.containerMatchers,m.containerMatchers,"blankScreen.containerMatchers"),f.ignoreMatchers=h(e.ignoreMatchers,m.ignoreMatchers,"blankScreen.ignoreMatchers"),p&&!u&&(f.containerMatchers={tagName:[],id:[],className:[]},f.ignoreMatchers={tagName:[],id:[],className:[]}),(h=e.detectStartPosition)===undefined||h&&"object"===T(h)&&!Array.isArray(h)?f.detectStartPosition={x:c((p=h||{}).x,m.detectStartPosition.x,"blankScreen.detectStartPosition.x",function(e){return 0<=e}),y:c(p.y,m.detectStartPosition.y,"blankScreen.detectStartPosition.y",function(e){return 0<=e})}:s("blankScreen.detectStartPosition","invalid_type"),f.emptyElementsPercent=c(e.emptyElementsPercent,m.emptyElementsPercent,"blankScreen.emptyElementsPercent",function(e){return 0<e&&e<=100}),f.sameElementsPercent=c(e.sameElementsPercent,m.sameElementsPercent,"blankScreen.sameElementsPercent",function(e){return 0<e&&e<=100}),f.debounceDuration=c(e.debounceDuration,m.debounceDuration,"blankScreen.debounceDuration",function(e){return 0<=e}),f.reDetectInterval=c(e.reDetectInterval,m.reDetectInterval,"blankScreen.reDetectInterval",function(e){return 0<e}),f.everySideSampleNumber=d(e.everySideSampleNumber,m.everySideSampleNumber,"blankScreen.everySideSampleNumber",2,50),f.samePointDepth=d(e.samePointDepth,m.samePointDepth,"blankScreen.samePointDepth",1,20),e.disableSameElementsCheck!==undefined&&("boolean"==typeof e.disableSameElementsCheck?f.disableSameElementsCheck=e.disableSameElementsCheck:s("blankScreen.disableSameElementsCheck","invalid_type")),f.ignoreElesWhenDomChange=l(e.ignoreElesWhenDomChange,m.ignoreElesWhenDomChange,"blankScreen.ignoreElesWhenDomChange",256),e.customBlankScreenDector!==undefined&&(null===e.customBlankScreenDector||"function"==typeof e.customBlankScreenDector?f.customBlankScreenDector=e.customBlankScreenDector:s("blankScreen.customBlankScreenDector","invalid_type")),f)).enabled)&&(u=function(e,t,n){e=4*e-3;return{totalSamplePoints:e,whitePointThreshold:Math.floor(e*t/100),samePointThreshold:Math.floor(e*n/100)}}(_.everySideSampleNumber,_.emptyElementsPercent,_.sameElementsPercent),E=u.totalSamplePoints,C=u.whitePointThreshold,R=u.samePointThreshold,O={observer:null,detectTimer:null,bodyWaitTimer:null,bodyWaitFrame:null,idleCallbackId:null,destroyed:!1,initialDetectionPending:!0,incidentStatus:"healthy",preDetectResult:null,triggerType:"dom_change",onErrorOccurred:function(){return undefined},onDestroy:function(){return hO(S)},handlePageHide:function(){return undefined},handleBeforeUnload:function(){return undefined},handleVisibilityChange:function(){return undefined}},fO.set(S,O),t=function(){return bl(g,void 0,void 0,function(){var l,c,d,f,h,p,m,g,v,y,w,b,k;return kl(this,function(e){var t,n,r,i,o,a,s,u;if(!O.destroyed)try{if("initial_load"===O.triggerType&&(O.initialDetectionPending=!1),l=window.innerHeight,c=window.innerWidth,d=_.detectStartPosition,f=d.x,h=d.y,c<=f||l<=h)return[2];if(p=[],g=m=0,function(e,t,n,r){for(var i=r.x,o=r.y,a=i+(e-i)/2,s=o+(t-o)/2,u=n+1,l=[],c=1;c<u;c+=1){var d=i+(e-i)*c/u,f=o+(t-o)*c/u;l.push({x:d,y:s}),c!==u/2&&l.push({x:a,y:f},{x:d,y:f},{x:d,y:t-f})}return l}(c,l,_.everySideSampleNumber,_.detectStartPosition).forEach(function(e){a=e.x,s=e.y,e=document.elementsFromPoint(a,s),e=(u=function(e){var t=e[0];if(t&&null!==t.shadowRoot){t=(null==(t=t.shadowRoot)?void 0:t.elementsFromPoint(a,s))||[];if(t.length>e.length)return u(t)}return e})(e),t=_.containers,n=_.ignoreContainers,r=_.containerMatchers,l=_.ignoreMatchers,e=e.map(aO),o=e.map(function(e){return e.selector});var t,n,r,i,o,a,s,u,l=(e=e[0])?(r=(i=!(!r||!(null!=(i=r.tagName)&&i.length||null!=(i=r.id)&&i.length||null!=(i=r.className)&&i.length)))?sO(e,r):uO(e,t),t=i?sO(e,l):uO(e,n),{isWhitePoint:r&&!t,selectorPointers:o}):{isWhitePoint:!1,selectorPointers:o};l.isWhitePoint&&(m+=1),p.push(l.selectorPointers)}),v=C<=m,y=!1,_.disableSameElementsCheck||(w=p.map(function(e){return e.slice(0,_.samePointDepth)}),o={},w.map(function(e){return e.join(" < ")}).forEach(function(e){o[e]=o[e]?o[e]+1:1}),a=Object.keys(o).map(function(e){return[e,o[e]]}).sort(function(e,t){return t[1]-e[1]})[0]||["",0],s=a[0],b={samePointerMap:o,maximumSamePointerClass:s,maximumSamePointerCounter:a[1]},y=R<=(g=b.maximumSamePointerCounter)&&(u=b.maximumSamePointerClass,!oO.some(function(e){return u.startsWith(e)}))),k=!1,_.customBlankScreenDector)try{k=!0===_.customBlankScreenDector()}catch(G){k=!1}if(!(v||y||k))return O.incidentStatus="healthy",O.preDetectResult=null,[2];if("reported"===O.incidentStatus)return[2];if("suspect"===O.incidentStatus&&O.preDetectResult)return t=O.preDetectResult,r=t.customTriggered?"custom":t.whitePointTriggered&&t.sameElementTriggered?"both":t.whitePointTriggered?"white_point":"same_element",i=_d(S),t={event_id:xc(),event_type:P.BLANK_SCREEN,event_category:Rc.ERROR,timestamp:Date.now(),page_url:(null==(n=S.getOriginFrom)?void 0:n.call(S))||window.location.href,data:A(A({measurements:{white_point_count:t.whitePointCount,same_point_count:t.samePointCount,total_sample_points:E,white_point_threshold:C,same_point_threshold:R,white_point_ratio:dO(t.whitePointCount/E,6),same_point_ratio:dO(t.samePointCount/E,6),viewport_width_px:Math.max(0,Math.round(window.innerWidth)),viewport_height_px:Math.max(0,Math.round(window.innerHeight))},event_properties:{trigger_reason:r,trigger_type:t.triggerType,detection_method:t.customTriggered?"custom_detector":"viewport_sampling",same_elements_check_enabled:String(!_.disableSameElementsCheck)}},i?{replay_id:i}:{}),{tags:{environment:(null==(n=S.config)?void 0:n.env)||"production",version:String((null==(r=S.config)?void 0:r.version)||"")}})},S.reportTDEMEvent(t),O.incidentStatus="reported",O.preDetectResult=null,[2];O.preDetectResult={whitePointCount:m,samePointCount:g,whitePointTriggered:v,sameElementTriggered:y,customTriggered:k,triggerType:O.triggerType},O.incidentStatus="suspect",O.detectTimer=setTimeout(function(){O.detectTimer=null,x()},_.reDetectInterval)}catch(G){}return[2]})})},x=function(){return bl(g,void 0,void 0,function(){return kl(this,function(e){switch(e.label){case 0:if(O.destroyed)return[2];if("function"!=typeof window.requestIdleCallback)return[3,5];e.label=1;case 1:return e.trys.push([1,2,,4]),O.idleCallbackId=window.requestIdleCallback(function(e){O.idleCallbackId=null,O.destroyed||(0<e.timeRemaining()?t():O.detectTimer=setTimeout(function(){O.detectTimer=null,t()},0))}),[3,4];case 2:return e.sent(),[4,t()];case 3:return e.sent(),[3,4];case 4:return[3,7];case 5:return[4,t()];case 6:e.sent(),e.label=7;case 7:return[2]}})})},n=function(e){void 0===e&&(e="dom_change"),O.destroyed||"suspect"===O.incidentStatus||"initial_load"!==e&&O.initialDetectionPending||(O.triggerType=e,O.detectTimer&&clearTimeout(O.detectTimer),O.detectTimer=setTimeout(function(){O.detectTimer=null,x()},_.debounceDuration))},O.onErrorOccurred=function(){return n("error")},S.lifeCycle.on("errorOccurred",O.onErrorOccurred),S.lifeCycle.on("destroy",O.onDestroy),r=function(){!O.destroyed&&document.body&&(O.observer=new MutationObserver(function(e){var t=null==(t=e[0])?void 0:t.target;if(1===e.length&&t instanceof Element){e=aO(t).selector;if(_.ignoreElesWhenDomChange.includes(e))return}n("dom_change")}),O.observer.observe(document.body,{childList:!0,subtree:!0}))},document.body?r():(i=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},o=function(){document.body?(O.bodyWaitTimer&&clearTimeout(O.bodyWaitTimer),r()):O.bodyWaitFrame=i(o)},O.bodyWaitFrame=i(o),O.bodyWaitTimer=setTimeout(function(){null!==O.bodyWaitFrame&&((window.cancelAnimationFrame||clearTimeout)(O.bodyWaitFrame),O.bodyWaitFrame=null)},1e4)),O.handlePageHide=a=function(){O.destroyed||(O.detectTimer&&clearTimeout(O.detectTimer),O.triggerType="page_state",O.preDetectResult&&(O.preDetectResult.triggerType="page_state"),t())},O.handleBeforeUnload=a,O.handleVisibilityChange=function(){"hidden"===document.visibilityState&&a()},window.addEventListener("pagehide",O.handlePageHide),window.addEventListener("beforeunload",O.handleBeforeUnload),document.addEventListener("visibilitychange",O.handleVisibilityChange),n("initial_load"))},destroy:function(){Array.from(fO.keys()).forEach(hO)}}),pO={enabled:!0,enableMemoryReport:!0,enableOOMReport:!0,oomThreshold:100,memoryReportInterval:6e4,oomCheckInterval:1e4,monitorPages:[],sampleRate:1},mO=new Map,gO=function(e,t,n){null!=(e=null==e?void 0:e.config)&&e.debug&&"undefined"!=typeof console&&console.warn("[TDEM] "+t+": "+n+", fallback applied")},vO=function(e){return"number"==typeof e&&Number.isFinite(e)},yO=function(){var e;try{var t=null==(e=window.performance)?void 0:e.memory;return!t||!vO(t.usedJSHeapSize)||!vO(t.totalJSHeapSize)||!vO(t.jsHeapSizeLimit)||t.usedJSHeapSize<0||t.totalJSHeapSize<0||t.jsHeapSizeLimit<0?null:{used:t.usedJSHeapSize,total:t.totalJSHeapSize,limit:t.jsHeapSizeLimit,ratio:0<t.jsHeapSizeLimit?Math.min(1,t.usedJSHeapSize/t.jsHeapSizeLimit):0}}catch(S){return null}},wO=function(e){var t=mO.get(e);t&&(t.destroyed=!0,t.reportTimer&&clearInterval(t.reportTimer),t.oomCheckTimer&&clearInterval(t.oomCheckTimer),t.records.length=0,e.lifeCycle.remove("destroy",t.onDestroy),"undefined"!=typeof window&&(window.removeEventListener("pagehide",t.onPageExit),window.removeEventListener("beforeunload",t.onPageExit)),mO["delete"](e))},bO=function(e,t,n){var r,i,o;t.destroyed||(i=yO())&&(t.records.push(i),50<t.records.length&&t.records.shift(),o=_d(e),n={event_id:xc(),event_type:n,event_category:Rc.PERFORMANCE,timestamp:Date.now(),page_url:(null==(r=e.getOriginFrom)?void 0:r.call(e))||window.location.href,data:A(A({measurements:A({used_js_heap_size_bytes:i.used,total_js_heap_size_bytes:i.total,js_heap_size_limit_bytes:i.limit,usage_ratio:i.ratio},n===P.MEMORY_OOM?{oom_threshold_mb:t.config.oomThreshold}:{}),event_properties:{detection_source:"performance_memory"}},o?{replay_id:o}:{}),{tags:{environment:(null==(r=e.config)?void 0:r.env)||"production",version:String((null==(i=e.config)?void 0:i.version)||"")}})},e.reportTDEMEvent(n))},kO=new s({name:"memoryMonitor",onNewTdem:function(n,t){r=n;var r,i,o,a,e,s,u=!1===(e=t)?A(A({},pO),{enabled:!1}):(i=e&&"object"===T(e)?e:{},e===undefined||!0===e||e&&"object"===T(e)&&!Array.isArray(e)||gO(r,"memoryMonitor","invalid_type"),o=A(A({},pO),{oomThreshold:0<(e=(null==(e=yO())?void 0:e.limit)||0)?Math.round(e/1024/1024*.9):100}),["enabled","enableMemoryReport","enableOOMReport"].forEach(function(e){i[e]!==undefined&&("boolean"==typeof i[e]?o[e]=i[e]:gO(r,"memoryMonitor."+e,"invalid_type"))}),["oomThreshold","memoryReportInterval","oomCheckInterval"].forEach(function(e){var t=i[e];t!==undefined&&(vO(t)&&0<t?o[e]=t:gO(r,"memoryMonitor."+e,vO(t)?"out_of_range":"invalid_number"))}),i.sampleRate!==undefined&&(vO(i.sampleRate)&&0<=i.sampleRate&&i.sampleRate<=1?o.sampleRate=i.sampleRate:gO(r,"memoryMonitor.sampleRate","out_of_range")),i.monitorPages!==undefined&&(Array.isArray(i.monitorPages)&&i.monitorPages.length<=100&&i.monitorPages.every(function(e){return"string"==typeof e&&!!e||e instanceof RegExp})?o.monitorPages=Sl(i.monitorPages):gO(r,"memoryMonitor.monitorPages","invalid_value")),o);!u.enabled||!function(){var e;try{return"undefined"!=typeof window&&null!=(e=window.performance)&&e.memory}catch(t){}}()||Math.random()>=u.sampleRate||(e=u.monitorPages).length&&(s="undefined"==typeof window?"":window.location.href,!e.some(function(e){return"string"==typeof e?s.includes(e):(e.lastIndex=0,e.test(s))}))||(a={config:u,reportTimer:null,oomCheckTimer:null,lastOOMTime:0,records:[],destroyed:!1,onDestroy:function(){return wO(n)},onPageExit:function(){return wO(n)}},mO.set(n,a),n.lifeCycle.on("destroy",a.onDestroy),"undefined"!=typeof window&&(window.addEventListener("pagehide",a.onPageExit),window.addEventListener("beforeunload",a.onPageExit)),u.enableMemoryReport&&(a.reportTimer=setInterval(function(){return bO(n,a,P.MEMORY_USAGE)},u.memoryReportInterval)),u.enableOOMReport&&(a.oomCheckTimer=setInterval(function(){var e=yO(),t=Date.now();e&&e.used/1024/1024>u.oomThreshold&&3e5<t-a.lastOOMTime&&(a.lastOOMTime=t,bO(n,a,P.MEMORY_OOM))},u.oomCheckInterval)))},destroy:function(){Array.from(mO.keys()).forEach(wO)}});function SO(e,t,n){try{var r={projectKey:e,sampleRate:t,replaySampleRate:n.replay_sample_rate!==undefined?Number(n.replay_sample_rate):1,errorTraceback:n.error_traceback,errorSampleRate:n.error_sample_rate,remoteEnabled:n.enabled,timestamp:Date.now()};localStorage.setItem("TDEM_SAMPLE_CONFIG",JSON.stringify(r))}catch(k0){}}function _O(e){return e._tdemSampleGate||null}function EO(e,t,n){e=_O(e);e?!n||t<=0?e.decide(!1):100<=t?e.decide(!0):(n=100*Math.random(),e.decide(n<t)):console.warn("[TDEM] Sample gate not found")}function CO(e,t){var t=VR(e.config.sessionReplay,t),e=(e._effectiveReplayPolicy=t,e._replaySampled=t.enabled,null==(n=null==(e=e.constructor.installedPlugins)?void 0:e.find)?void 0:n.call(e,function(e){return e&&"sessionReplay"===e.name})),n=null==(n=null==e?void 0:e.option)?void 0:n.applyEffectivePolicy;"function"==typeof n&&n.call(e.option,t)}function RO(e){var t={};return e&&"object"===T(e)&&(Object.prototype.hasOwnProperty.call(e,"enabled")&&(t.enabled=!!e.enabled),Object.prototype.hasOwnProperty.call(e,"replay_sample_rate")&&(t.replay_sample_rate=Number(e.replay_sample_rate)),Object.prototype.hasOwnProperty.call(e,"error_traceback")&&(t.error_traceback=!!e.error_traceback),Object.prototype.hasOwnProperty.call(e,"error_sample_rate"))&&(t.error_sample_rate=Number(e.error_sample_rate)),t}function OO(e,t,n){var r,i=_O(e);i&&((t=t?function(e){try{var t,n=localStorage.getItem("TDEM_SAMPLE_CONFIG");return n?(t=JSON.parse(n)).projectKey===e&&Date.now()-t.timestamp<6048e5?t:null:null}catch(k0){return null}}(t):null)?(console.info("[TDEM] Using cached config, sampleRate:",t.sampleRate),n._cachedSampleRate=t.sampleRate,r={},t.remoteEnabled!==undefined&&(r.enabled=t.remoteEnabled),t.replaySampleRate!==undefined&&(r.replay_sample_rate=t.replaySampleRate),t.errorTraceback!==undefined&&(r.error_traceback=t.errorTraceback),t.errorSampleRate!==undefined&&(r.error_sample_rate=t.errorSampleRate),n._cachedRemote=r,n=t.remoteEnabled!==undefined?!!t.remoteEnabled:0<t.sampleRate,EO(e,t.sampleRate,n),CO(e,r)):(console.warn("[TDEM] No cached config, default to not report"),i.decide(!1),CO(e,null)))}Ue=new s({name:"tdemConfig",_cachedSampleRate:null,_cachedRemote:null,onNewTdem:function(e){var t=this,n=e._prefetchedConfigData;CO(e,n?RO(n):null),function(u,l){bl(this,void 0,void 0,function(){var n,r,i,o,a,s;return kl(this,function(e){switch(e.label){case 0:if(!(n=u.config.id))return OO(u,n,l),[2];if(r=u._prefetchedConfigData)return delete u._prefetchedConfigData,i=r.tdem_sample_rate,o=r.enabled,a=RO(r),SO(n,i,a),l._cachedSampleRate=i,l._cachedRemote=a,EO(u,i,o),CO(u,a),[2];if(t=(u.config.url||"").replace(/\/+$/,""),!(r=t?t+"/api/v1/config":""))return OO(u,n,l),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,u.transportRequest({kind:"config",url:r,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:n})})];case 2:if(!(s=e.sent()).ok)throw new Error("HTTP "+s.status);if(0===(s="string"==typeof s.body?JSON.parse(s.body):s.body).code&&s.data)return i=s.data.tdem_sample_rate,o=s.data.enabled,a=RO(s.data),SO(n,i,a),l._cachedSampleRate=i,l._cachedRemote=a,EO(u,i,o),CO(u,a),[3,4];throw new Error("API error: code="+s.code);case 3:return s=e.sent(),console.warn("[TDEM] Failed to fetch remote config:",s),OO(u,n,l),[3,4];case 4:return[2]}var t})})}(e,this),e.lifeCycle.on("sessionRefreshed",function(){t.onSessionRefreshed(e)})},onSessionRefreshed:function(e){var t,n=_O(e);n&&n.isDecided&&null!==(t=this._cachedSampleRate)&&t!==undefined&&(t=n.reDecide(t),n=e._effectiveReplayPolicy,e._replaySampled=t&&(!n||n.enabled),console.info("[TDEM] Session refreshed, session="+t+", replayPolicyEnabled="+(null==n?void 0:n.enabled)))}});return Ng.use(Od),Ng.use(Hn),Ng.use(Vr),Ng.use(zt),Ng.use(o),Ng.use(Lt),Ng.use(Dr),Ng.use(Fd),Ng.use(Kd),Ng.use(r),Ng.use(Zd),Ng.use(Id),Ng.use(Ue),Ng.use($R),Ng.use(XR),Ng.use(t),Ng.use(i),Ng.use(kO),Ng});
|