@runflow-ai/cli 0.2.22 → 0.2.23

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.
@@ -0,0 +1,59 @@
1
+ var e=Object.defineProperty,t=(t,n,r)=>((t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r)(t,"symbol"!=typeof n?n+"":n,r);function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var r={exports:{}},i={},o={exports:{}},a={},s=Symbol.for("react.element"),l=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,x={};function _(e,t,n){this.props=e,this.context=t,this.refs=x,this.updater=n||b}function k(){}function S(e,t,n){this.props=e,this.context=t,this.refs=x,this.updater=n||b}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=_.prototype;var C=S.prototype=new k;C.constructor=S,w(C,_.prototype),C.isPureReactComponent=!0;var E=Array.isArray,I=Object.prototype.hasOwnProperty,N={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,i={},o=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)I.call(t,r)&&!O.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:s,type:e,key:o,ref:a,props:i,_owner:N.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===s}var j=/\/+/g;function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function A(e,t,n,r,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case s:case l:a=!0}}if(a)return i=i(a=e),e=""===r?"."+M(a,0):r,E(i)?(n="",null!=e&&(n=e.replace(j,"$&/")+"/"),A(i,t,n,"",function(e){return e})):null!=i&&(R(i)&&(i=function(e,t){return{$$typeof:s,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(j,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=""===r?".":r+":",E(e))for(var c=0;c<e.length;c++){var u=r+M(o=e[c],c);a+=A(o,t,n,u,i)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=y&&e[y]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(o=e.next()).done;)a+=A(o=o.value,t,n,u=r+M(o,c++),i);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function P(e,t,n){if(null==e)return e;var r=[],i=0;return A(e,r,"","",function(e){return t.call(n,e,i++)}),r}function L(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var D={current:null},F={transition:null},z={ReactCurrentDispatcher:D,ReactCurrentBatchConfig:F,ReactCurrentOwner:N};function U(){throw Error("act(...) is not supported in production builds of React.")}a.Children={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!R(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},a.Component=_,a.Fragment=c,a.Profiler=d,a.PureComponent=S,a.StrictMode=u,a.Suspense=m,a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,a.act=U,a.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=w({},e.props),i=e.key,o=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,a=N.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)I.call(t,c)&&!O.hasOwnProperty(c)&&(r[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:s,type:e.type,key:i,ref:o,props:r,_owner:a}},a.createContext=function(e){return(e={$$typeof:h,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:p,_context:e},e.Consumer=e},a.createElement=T,a.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},a.createRef=function(){return{current:null}},a.forwardRef=function(e){return{$$typeof:f,render:e}},a.isValidElement=R,a.lazy=function(e){return{$$typeof:v,_payload:{_status:-1,_result:e},_init:L}},a.memo=function(e,t){return{$$typeof:g,type:e,compare:void 0===t?null:t}},a.startTransition=function(e){var t=F.transition;F.transition={};try{e()}finally{F.transition=t}},a.unstable_act=U,a.useCallback=function(e,t){return D.current.useCallback(e,t)},a.useContext=function(e){return D.current.useContext(e)},a.useDebugValue=function(){},a.useDeferredValue=function(e){return D.current.useDeferredValue(e)},a.useEffect=function(e,t){return D.current.useEffect(e,t)},a.useId=function(){return D.current.useId()},a.useImperativeHandle=function(e,t,n){return D.current.useImperativeHandle(e,t,n)},a.useInsertionEffect=function(e,t){return D.current.useInsertionEffect(e,t)},a.useLayoutEffect=function(e,t){return D.current.useLayoutEffect(e,t)},a.useMemo=function(e,t){return D.current.useMemo(e,t)},a.useReducer=function(e,t,n){return D.current.useReducer(e,t,n)},a.useRef=function(e){return D.current.useRef(e)},a.useState=function(e){return D.current.useState(e)},a.useSyncExternalStore=function(e,t,n){return D.current.useSyncExternalStore(e,t,n)},a.useTransition=function(){return D.current.useTransition()},a.version="18.3.1",o.exports=a;var B=o.exports;const $=n(B);
2
+ /**
3
+ * @license React
4
+ * react-jsx-runtime.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var V=B,W=Symbol.for("react.element"),q=Symbol.for("react.fragment"),H=Object.prototype.hasOwnProperty,K=V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,G={key:!0,ref:!0,__self:!0,__source:!0};function Z(e,t,n){var r,i={},o=null,a=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(a=t.ref),t)H.call(t,r)&&!G.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:W,type:e,key:o,ref:a,props:i,_owner:K.current}}i.Fragment=q,i.jsx=Z,i.jsxs=Z,r.exports=i;var J=r.exports,Y={},X={exports:{}},Q={},ee={exports:{}},te={};
11
+ /**
12
+ * @license React
13
+ * scheduler.production.min.js
14
+ *
15
+ * Copyright (c) Facebook, Inc. and its affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */
20
+ !function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,p=3,h=!1,f=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(l,i)}i=n(c)}}function w(e){if(m=!1,b(e),!f)if(null!==n(l))f=!0,j(x);else{var t=n(c);null!==t&&M(w,t.startTime-e)}}function x(t,i){f=!1,m&&(m=!1,v(C),C=-1),h=!0;var o=p;try{for(b(i),d=n(l);null!==d&&(!(d.expirationTime>i)||t&&!N());){var a=d.callback;if("function"==typeof a){d.callback=null,p=d.priorityLevel;var s=a(d.expirationTime<=i);i=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(i)}else r(l);d=n(l)}if(null!==d)var u=!0;else{var g=n(c);null!==g&&M(w,g.startTime-i),u=!1}return u}finally{d=null,p=o,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,k=!1,S=null,C=-1,E=5,I=-1;function N(){return!(e.unstable_now()-I<E)}function O(){if(null!==S){var t=e.unstable_now();I=t;var n=!0;try{n=S(!0,t)}finally{n?_():(k=!1,S=null)}}else k=!1}if("function"==typeof y)_=function(){y(O)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,R=T.port2;T.port1.onmessage=O,_=function(){R.postMessage(null)}}else _=function(){g(O,0)};function j(e){S=e,k||(k=!0,_())}function M(t,n){C=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){f||h||(f=!0,j(x))},e.unstable_forceFrameRate=function(e){0>e||125<e||(E=0<e?Math.floor(1e3/e):5)},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},e.unstable_scheduleCallback=function(r,i,o){var a=e.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?a+o:a:o=a,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:u++,callback:i,priorityLevel:r,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(r.sortIndex=o,t(c,r),null===n(l)&&r===n(c)&&(m?(v(C),C=-1):m=!0,M(w,o-a))):(r.sortIndex=s,t(l,r),f||h||(f=!0,j(x))),r},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}(te),ee.exports=te;var ne=ee.exports,re=B,ie=ne;
21
+ /**
22
+ * @license React
23
+ * react-dom.production.min.js
24
+ *
25
+ * Copyright (c) Facebook, Inc. and its affiliates.
26
+ *
27
+ * This source code is licensed under the MIT license found in the
28
+ * LICENSE file in the root directory of this source tree.
29
+ */function oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ae=new Set,se={};function le(e,t){ce(e,t),ce(e+"Capture",t)}function ce(e,t){for(se[e]=t,e=0;e<t.length;e++)ae.add(t[e])}var ue=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),de=Object.prototype.hasOwnProperty,pe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,he={},fe={};function me(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ge[e]=new me(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ge[t]=new me(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ge[e]=new me(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ge[e]=new me(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ge[e]=new me(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){ge[e]=new me(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){ge[e]=new me(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){ge[e]=new me(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){ge[e]=new me(e,5,!1,e.toLowerCase(),null,!1,!1)});var ve=/[\-:]([a-z])/g;function ye(e){return e[1].toUpperCase()}function be(e,t,n,r){var i=ge.hasOwnProperty(t)?ge[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!de.call(fe,e)||!de.call(he,e)&&(pe.test(e)?fe[e]=!0:(he[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ve,ye);ge[t]=new me(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ve,ye);ge[t]=new me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ve,ye);ge[t]=new me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){ge[e]=new me(e,1,!1,e.toLowerCase(),null,!1,!1)}),ge.xlinkHref=new me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){ge[e]=new me(e,1,!1,e.toLowerCase(),null,!0,!0)});var we=re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,xe=Symbol.for("react.element"),_e=Symbol.for("react.portal"),ke=Symbol.for("react.fragment"),Se=Symbol.for("react.strict_mode"),Ce=Symbol.for("react.profiler"),Ee=Symbol.for("react.provider"),Ie=Symbol.for("react.context"),Ne=Symbol.for("react.forward_ref"),Oe=Symbol.for("react.suspense"),Te=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),je=Symbol.for("react.lazy"),Me=Symbol.for("react.offscreen"),Ae=Symbol.iterator;function Pe(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Ae&&e[Ae]||e["@@iterator"])?e:null}var Le,De=Object.assign;function Fe(e){if(void 0===Le)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Le=t&&t[1]||""}return"\n"+Le+e}var ze=!1;function Ue(e,t){if(!e||ze)return"";ze=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var i=c.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{ze=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fe(e):""}function Be(e){switch(e.tag){case 5:return Fe(e.type);case 16:return Fe("Lazy");case 13:return Fe("Suspense");case 19:return Fe("SuspenseList");case 0:case 2:case 15:return e=Ue(e.type,!1);case 11:return e=Ue(e.type.render,!1);case 1:return e=Ue(e.type,!0);default:return""}}function $e(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ke:return"Fragment";case _e:return"Portal";case Ce:return"Profiler";case Se:return"StrictMode";case Oe:return"Suspense";case Te:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Ie:return(e.displayName||"Context")+".Consumer";case Ee:return(e._context.displayName||"Context")+".Provider";case Ne:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Re:return null!==(t=e.displayName||null)?t:$e(e.type)||"Memo";case je:t=e._payload,e=e._init;try{return $e(e(t))}catch(n){}}return null}function Ve(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $e(t);case 8:return t===Se?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function We(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function qe(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function He(e){e._valueTracker||(e._valueTracker=function(e){var t=qe(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ke(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qe(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ge(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Ze(e,t){var n=t.checked;return De({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Je(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=We(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Ye(e,t){null!=(t=t.checked)&&be(e,"checked",t,!1)}function Xe(e,t){Ye(e,t);var n=We(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?et(e,t.type,n):t.hasOwnProperty("defaultValue")&&et(e,t.type,We(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Qe(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function et(e,t,n){"number"===t&&Ge(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var tt=Array.isArray;function nt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+We(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function rt(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(oe(91));return De({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function it(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(oe(92));if(tt(n)){if(1<n.length)throw Error(oe(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:We(n)}}function ot(e,t){var n=We(t.value),r=We(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function at(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function st(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function lt(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?st(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ct,ut,dt=(ut=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ct=ct||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ct.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return ut(e,t)})}:ut);function pt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ht={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ft=["Webkit","ms","Moz","O"];function mt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ht.hasOwnProperty(e)&&ht[e]?(""+t).trim():t+"px"}function gt(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=mt(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(ht).forEach(function(e){ft.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ht[t]=ht[e]})});var vt=De({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yt(e,t){if(t){if(vt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(oe(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(oe(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(oe(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(oe(62))}}function bt(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wt=null;function xt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var _t=null,kt=null,St=null;function Ct(e){if(e=wo(e)){if("function"!=typeof _t)throw Error(oe(280));var t=e.stateNode;t&&(t=_o(t),_t(e.stateNode,e.type,t))}}function Et(e){kt?St?St.push(e):St=[e]:kt=e}function It(){if(kt){var e=kt,t=St;if(St=kt=null,Ct(e),t)for(e=0;e<t.length;e++)Ct(t[e])}}function Nt(e,t){return e(t)}function Ot(){}var Tt=!1;function Rt(e,t,n){if(Tt)return e(t,n);Tt=!0;try{return Nt(e,t,n)}finally{Tt=!1,(null!==kt||null!==St)&&(Ot(),It())}}function jt(e,t){var n=e.stateNode;if(null===n)return null;var r=_o(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(oe(231,t,typeof n));return n}var Mt=!1;if(ue)try{var At={};Object.defineProperty(At,"passive",{get:function(){Mt=!0}}),window.addEventListener("test",At,At),window.removeEventListener("test",At,At)}catch(ut){Mt=!1}function Pt(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Lt=!1,Dt=null,Ft=!1,zt=null,Ut={onError:function(e){Lt=!0,Dt=e}};function Bt(e,t,n,r,i,o,a,s,l){Lt=!1,Dt=null,Pt.apply(Ut,arguments)}function $t(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Vt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Wt(e){if($t(e)!==e)throw Error(oe(188))}function qt(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=$t(e)))throw Error(oe(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Wt(i),e;if(o===r)return Wt(i),t;o=o.sibling}throw Error(oe(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(oe(189))}}if(n.alternate!==r)throw Error(oe(190))}if(3!==n.tag)throw Error(oe(188));return n.stateNode.current===n?e:t}(e))?Ht(e):null}function Ht(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ht(e);if(null!==t)return t;e=e.sibling}return null}var Kt=ie.unstable_scheduleCallback,Gt=ie.unstable_cancelCallback,Zt=ie.unstable_shouldYield,Jt=ie.unstable_requestPaint,Yt=ie.unstable_now,Xt=ie.unstable_getCurrentPriorityLevel,Qt=ie.unstable_ImmediatePriority,en=ie.unstable_UserBlockingPriority,tn=ie.unstable_NormalPriority,nn=ie.unstable_LowPriority,rn=ie.unstable_IdlePriority,on=null,an=null;var sn=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(ln(e)/cn|0)|0},ln=Math.log,cn=Math.LN2;var un=64,dn=4194304;function pn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hn(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=pn(s):0!==(o&=a)&&(r=pn(o))}else 0!==(a=n&~i)?r=pn(a):0!==o&&(r=pn(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-sn(t)),r|=e[n],t&=~i;return r}function fn(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mn(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gn(){var e=un;return!(4194240&(un<<=1))&&(un=64),e}function vn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-sn(t)]=n}function bn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-sn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var wn=0;function xn(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var _n,kn,Sn,Cn,En,In=!1,Nn=[],On=null,Tn=null,Rn=null,jn=new Map,Mn=new Map,An=[],Pn="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ln(e,t){switch(e){case"focusin":case"focusout":On=null;break;case"dragenter":case"dragleave":Tn=null;break;case"mouseover":case"mouseout":Rn=null;break;case"pointerover":case"pointerout":jn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mn.delete(t.pointerId)}}function Dn(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=wo(t))&&kn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Fn(e){var t=bo(e.target);if(null!==t){var n=$t(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Vt(n)))return e.blockedOn=t,void En(e.priority,function(){Sn(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function zn(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=wo(n))&&kn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);wt=r,n.target.dispatchEvent(r),wt=null,t.shift()}return!0}function Un(e,t,n){zn(e)&&n.delete(t)}function Bn(){In=!1,null!==On&&zn(On)&&(On=null),null!==Tn&&zn(Tn)&&(Tn=null),null!==Rn&&zn(Rn)&&(Rn=null),jn.forEach(Un),Mn.forEach(Un)}function $n(e,t){e.blockedOn===t&&(e.blockedOn=null,In||(In=!0,ie.unstable_scheduleCallback(ie.unstable_NormalPriority,Bn)))}function Vn(e){function t(t){return $n(t,e)}if(0<Nn.length){$n(Nn[0],e);for(var n=1;n<Nn.length;n++){var r=Nn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==On&&$n(On,e),null!==Tn&&$n(Tn,e),null!==Rn&&$n(Rn,e),jn.forEach(t),Mn.forEach(t),n=0;n<An.length;n++)(r=An[n]).blockedOn===e&&(r.blockedOn=null);for(;0<An.length&&null===(n=An[0]).blockedOn;)Fn(n),null===n.blockedOn&&An.shift()}var Wn=we.ReactCurrentBatchConfig,qn=!0;function Hn(e,t,n,r){var i=wn,o=Wn.transition;Wn.transition=null;try{wn=1,Gn(e,t,n,r)}finally{wn=i,Wn.transition=o}}function Kn(e,t,n,r){var i=wn,o=Wn.transition;Wn.transition=null;try{wn=4,Gn(e,t,n,r)}finally{wn=i,Wn.transition=o}}function Gn(e,t,n,r){if(qn){var i=Jn(e,t,n,r);if(null===i)Wi(e,t,r,Zn,n),Ln(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return On=Dn(On,e,t,n,r,i),!0;case"dragenter":return Tn=Dn(Tn,e,t,n,r,i),!0;case"mouseover":return Rn=Dn(Rn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return jn.set(o,Dn(jn.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Mn.set(o,Dn(Mn.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Ln(e,r),4&t&&-1<Pn.indexOf(e)){for(;null!==i;){var o=wo(i);if(null!==o&&_n(o),null===(o=Jn(e,t,n,r))&&Wi(e,t,r,Zn,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Wi(e,t,r,null,n)}}var Zn=null;function Jn(e,t,n,r){if(Zn=null,null!==(e=bo(e=xt(r))))if(null===(t=$t(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Vt(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Zn=e,null}function Yn(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xt()){case Qt:return 1;case en:return 4;case tn:case nn:return 16;case rn:return 536870912;default:return 16}default:return 16}}var Xn=null,Qn=null,er=null;function tr(){if(er)return er;var e,t,n=Qn,r=n.length,i="value"in Xn?Xn.value:Xn.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return er=i.slice(e,1<t?1-t:void 0)}function nr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rr(){return!0}function ir(){return!1}function or(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?rr:ir,this.isPropagationStopped=ir,this}return De(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var ar,sr,lr,cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ur=or(cr),dr=De({},cr,{view:0,detail:0}),pr=or(dr),hr=De({},dr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==lr&&(lr&&"mousemove"===e.type?(ar=e.screenX-lr.screenX,sr=e.screenY-lr.screenY):sr=ar=0,lr=e),ar)},movementY:function(e){return"movementY"in e?e.movementY:sr}}),fr=or(hr),mr=or(De({},hr,{dataTransfer:0})),gr=or(De({},dr,{relatedTarget:0})),vr=or(De({},cr,{animationName:0,elapsedTime:0,pseudoElement:0})),yr=De({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),br=or(yr),wr=or(De({},cr,{data:0})),xr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_r={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=kr[e])&&!!t[e]}function Cr(){return Sr}var Er=De({},dr,{key:function(e){if(e.key){var t=xr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_r[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cr,charCode:function(e){return"keypress"===e.type?nr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Ir=or(Er),Nr=or(De({},hr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Or=or(De({},dr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cr})),Tr=or(De({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rr=De({},hr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),jr=or(Rr),Mr=[9,13,27,32],Ar=ue&&"CompositionEvent"in window,Pr=null;ue&&"documentMode"in document&&(Pr=document.documentMode);var Lr=ue&&"TextEvent"in window&&!Pr,Dr=ue&&(!Ar||Pr&&8<Pr&&11>=Pr),Fr=String.fromCharCode(32),zr=!1;function Ur(e,t){switch(e){case"keyup":return-1!==Mr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Br(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var $r=!1;var Vr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vr[e.type]:"textarea"===t}function qr(e,t,n,r){Et(r),0<(t=Hi(t,"onChange")).length&&(n=new ur("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Hr=null,Kr=null;function Gr(e){Fi(e,0)}function Zr(e){if(Ke(xo(e)))return e}function Jr(e,t){if("change"===e)return t}var Yr=!1;if(ue){var Xr;if(ue){var Qr="oninput"in document;if(!Qr){var ei=document.createElement("div");ei.setAttribute("oninput","return;"),Qr="function"==typeof ei.oninput}Xr=Qr}else Xr=!1;Yr=Xr&&(!document.documentMode||9<document.documentMode)}function ti(){Hr&&(Hr.detachEvent("onpropertychange",ni),Kr=Hr=null)}function ni(e){if("value"===e.propertyName&&Zr(Kr)){var t=[];qr(t,Kr,e,xt(e)),Rt(Gr,t)}}function ri(e,t,n){"focusin"===e?(ti(),Kr=n,(Hr=t).attachEvent("onpropertychange",ni)):"focusout"===e&&ti()}function ii(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zr(Kr)}function oi(e,t){if("click"===e)return Zr(t)}function ai(e,t){if("input"===e||"change"===e)return Zr(t)}var si="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function li(e,t){if(si(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!de.call(t,i)||!si(e[i],t[i]))return!1}return!0}function ci(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ui(e,t){var n,r=ci(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ci(r)}}function di(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?di(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pi(){for(var e=window,t=Ge();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Ge((e=t.contentWindow).document)}return t}function hi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fi(e){var t=pi(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&di(n.ownerDocument.documentElement,n)){if(null!==r&&hi(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ui(n,o);var a=ui(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mi=ue&&"documentMode"in document&&11>=document.documentMode,gi=null,vi=null,yi=null,bi=!1;function wi(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;bi||null==gi||gi!==Ge(r)||("selectionStart"in(r=gi)&&hi(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yi&&li(yi,r)||(yi=r,0<(r=Hi(vi,"onSelect")).length&&(t=new ur("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gi)))}function xi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _i={animationend:xi("Animation","AnimationEnd"),animationiteration:xi("Animation","AnimationIteration"),animationstart:xi("Animation","AnimationStart"),transitionend:xi("Transition","TransitionEnd")},ki={},Si={};function Ci(e){if(ki[e])return ki[e];if(!_i[e])return e;var t,n=_i[e];for(t in n)if(n.hasOwnProperty(t)&&t in Si)return ki[e]=n[t];return e}ue&&(Si=document.createElement("div").style,"AnimationEvent"in window||(delete _i.animationend.animation,delete _i.animationiteration.animation,delete _i.animationstart.animation),"TransitionEvent"in window||delete _i.transitionend.transition);var Ei=Ci("animationend"),Ii=Ci("animationiteration"),Ni=Ci("animationstart"),Oi=Ci("transitionend"),Ti=new Map,Ri="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ji(e,t){Ti.set(e,t),le(t,[e])}for(var Mi=0;Mi<Ri.length;Mi++){var Ai=Ri[Mi];ji(Ai.toLowerCase(),"on"+(Ai[0].toUpperCase()+Ai.slice(1)))}ji(Ei,"onAnimationEnd"),ji(Ii,"onAnimationIteration"),ji(Ni,"onAnimationStart"),ji("dblclick","onDoubleClick"),ji("focusin","onFocus"),ji("focusout","onBlur"),ji(Oi,"onTransitionEnd"),ce("onMouseEnter",["mouseout","mouseover"]),ce("onMouseLeave",["mouseout","mouseover"]),ce("onPointerEnter",["pointerout","pointerover"]),ce("onPointerLeave",["pointerout","pointerover"]),le("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),le("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),le("onBeforeInput",["compositionend","keypress","textInput","paste"]),le("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),le("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),le("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Li=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pi));function Di(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,l){if(Bt.apply(this,arguments),Lt){if(!Lt)throw Error(oe(198));var c=Dt;Lt=!1,Dt=null,Ft||(Ft=!0,zt=c)}}(r,t,void 0,e),e.currentTarget=null}function Fi(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Di(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Di(i,s,c),o=l}}}if(Ft)throw e=zt,Ft=!1,zt=null,e}function zi(e,t){var n=t[go];void 0===n&&(n=t[go]=new Set);var r=e+"__bubble";n.has(r)||(Vi(t,e,2,!1),n.add(r))}function Ui(e,t,n){var r=0;t&&(r|=4),Vi(n,e,r,t)}var Bi="_reactListening"+Math.random().toString(36).slice(2);function $i(e){if(!e[Bi]){e[Bi]=!0,ae.forEach(function(t){"selectionchange"!==t&&(Li.has(t)||Ui(t,!1,e),Ui(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Bi]||(t[Bi]=!0,Ui("selectionchange",!1,t))}}function Vi(e,t,n,r){switch(Yn(t)){case 1:var i=Hn;break;case 4:i=Kn;break;default:i=Gn}n=i.bind(null,t,n,e),i=void 0,!Mt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Wi(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=bo(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Rt(function(){var r=o,i=xt(n),a=[];e:{var s=Ti.get(e);if(void 0!==s){var l=ur,c=e;switch(e){case"keypress":if(0===nr(n))break e;case"keydown":case"keyup":l=Ir;break;case"focusin":c="focus",l=gr;break;case"focusout":c="blur",l=gr;break;case"beforeblur":case"afterblur":l=gr;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=fr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Or;break;case Ei:case Ii:case Ni:l=vr;break;case Oi:l=Tr;break;case"scroll":l=pr;break;case"wheel":l=jr;break;case"copy":case"cut":case"paste":l=br;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Nr}var u=!!(4&t),d=!u&&"scroll"===e,p=u?null!==s?s+"Capture":null:s;u=[];for(var h,f=r;null!==f;){var m=(h=f).stateNode;if(5===h.tag&&null!==m&&(h=m,null!==p&&(null!=(m=jt(f,p))&&u.push(qi(f,m,h)))),d)break;f=f.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===wt||!(c=n.relatedTarget||n.fromElement)||!bo(c)&&!c[mo])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?bo(c):null)&&(c!==(d=$t(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=fr,m="onMouseLeave",p="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=Nr,m="onPointerLeave",p="onPointerEnter",f="pointer"),d=null==l?s:xo(l),h=null==c?s:xo(c),(s=new u(m,f+"leave",l,n,i)).target=d,s.relatedTarget=h,m=null,bo(i)===r&&((u=new u(p,f+"enter",c,n,i)).target=h,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(p=c,f=0,h=u=l;h;h=Ki(h))f++;for(h=0,m=p;m;m=Ki(m))h++;for(;0<f-h;)u=Ki(u),f--;for(;0<h-f;)p=Ki(p),h--;for(;f--;){if(u===p||null!==p&&u===p.alternate)break e;u=Ki(u),p=Ki(p)}u=null}else u=null;null!==l&&Gi(a,s,l,u,!1),null!==c&&null!==d&&Gi(a,d,c,u,!0)}if("select"===(l=(s=r?xo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Jr;else if(Wr(s))if(Yr)g=ai;else{g=ii;var v=ri}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=oi);switch(g&&(g=g(e,r))?qr(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&et(s,"number",s.value)),v=r?xo(r):window,e){case"focusin":(Wr(v)||"true"===v.contentEditable)&&(gi=v,vi=r,yi=null);break;case"focusout":yi=vi=gi=null;break;case"mousedown":bi=!0;break;case"contextmenu":case"mouseup":case"dragend":bi=!1,wi(a,n,i);break;case"selectionchange":if(mi)break;case"keydown":case"keyup":wi(a,n,i)}var y;if(Ar)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else $r?Ur(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Dr&&"ko"!==n.locale&&($r||"onCompositionStart"!==b?"onCompositionEnd"===b&&$r&&(y=tr()):(Qn="value"in(Xn=i)?Xn.value:Xn.textContent,$r=!0)),0<(v=Hi(r,b)).length&&(b=new wr(b,e,null,n,i),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=Br(n))&&(b.data=y))),(y=Lr?function(e,t){switch(e){case"compositionend":return Br(t);case"keypress":return 32!==t.which?null:(zr=!0,Fr);case"textInput":return(e=t.data)===Fr&&zr?null:e;default:return null}}(e,n):function(e,t){if($r)return"compositionend"===e||!Ar&&Ur(e,t)?(e=tr(),er=Qn=Xn=null,$r=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dr&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Hi(r,"onBeforeInput")).length&&(i=new wr("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Fi(a,t)})}function qi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Hi(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=jt(e,n))&&r.unshift(qi(e,o,i)),null!=(o=jt(e,t))&&r.push(qi(e,o,i))),e=e.return}return r}function Ki(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gi(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=jt(n,o))&&a.unshift(qi(n,l,s)):i||null!=(l=jt(n,o))&&a.push(qi(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Zi=/\r\n?/g,Ji=/\u0000|\uFFFD/g;function Yi(e){return("string"==typeof e?e:""+e).replace(Zi,"\n").replace(Ji,"")}function Xi(e,t,n){if(t=Yi(t),Yi(e)!==t&&n)throw Error(oe(425))}function Qi(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"==typeof setTimeout?setTimeout:void 0,io="function"==typeof clearTimeout?clearTimeout:void 0,oo="function"==typeof Promise?Promise:void 0,ao="function"==typeof queueMicrotask?queueMicrotask:void 0!==oo?function(e){return oo.resolve(null).then(e).catch(so)}:ro;function so(e){setTimeout(function(){throw e})}function lo(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Vn(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Vn(t)}function co(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var po=Math.random().toString(36).slice(2),ho="__reactFiber$"+po,fo="__reactProps$"+po,mo="__reactContainer$"+po,go="__reactEvents$"+po,vo="__reactListeners$"+po,yo="__reactHandles$"+po;function bo(e){var t=e[ho];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mo]||n[ho]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=uo(e);null!==e;){if(n=e[ho])return n;e=uo(e)}return t}n=(e=n).parentNode}return null}function wo(e){return!(e=e[ho]||e[mo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function xo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(oe(33))}function _o(e){return e[fo]||null}var ko=[],So=-1;function Co(e){return{current:e}}function Eo(e){0>So||(e.current=ko[So],ko[So]=null,So--)}function Io(e,t){So++,ko[So]=e.current,e.current=t}var No={},Oo=Co(No),To=Co(!1),Ro=No;function jo(e,t){var n=e.type.contextTypes;if(!n)return No;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Mo(e){return null!=(e=e.childContextTypes)}function Ao(){Eo(To),Eo(Oo)}function Po(e,t,n){if(Oo.current!==No)throw Error(oe(168));Io(Oo,t),Io(To,n)}function Lo(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(oe(108,Ve(e)||"Unknown",i));return De({},n,r)}function Do(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||No,Ro=Oo.current,Io(Oo,e),Io(To,To.current),!0}function Fo(e,t,n){var r=e.stateNode;if(!r)throw Error(oe(169));n?(e=Lo(e,t,Ro),r.__reactInternalMemoizedMergedChildContext=e,Eo(To),Eo(Oo),Io(Oo,e)):Eo(To),Io(To,n)}var zo=null,Uo=!1,Bo=!1;function $o(e){null===zo?zo=[e]:zo.push(e)}function Vo(){if(!Bo&&null!==zo){Bo=!0;var e=0,t=wn;try{var n=zo;for(wn=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}zo=null,Uo=!1}catch(tf){throw null!==zo&&(zo=zo.slice(e+1)),Kt(Qt,Vo),tf}finally{wn=t,Bo=!1}}return null}var Wo=[],qo=0,Ho=null,Ko=0,Go=[],Zo=0,Jo=null,Yo=1,Xo="";function Qo(e,t){Wo[qo++]=Ko,Wo[qo++]=Ho,Ho=e,Ko=t}function ea(e,t,n){Go[Zo++]=Yo,Go[Zo++]=Xo,Go[Zo++]=Jo,Jo=e;var r=Yo;e=Xo;var i=32-sn(r)-1;r&=~(1<<i),n+=1;var o=32-sn(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Yo=1<<32-sn(t)+i|n<<i|r,Xo=o+e}else Yo=1<<o|n<<i|r,Xo=e}function ta(e){null!==e.return&&(Qo(e,1),ea(e,1,0))}function na(e){for(;e===Ho;)Ho=Wo[--qo],Wo[qo]=null,Ko=Wo[--qo],Wo[qo]=null;for(;e===Jo;)Jo=Go[--Zo],Go[Zo]=null,Xo=Go[--Zo],Go[Zo]=null,Yo=Go[--Zo],Go[Zo]=null}var ra=null,ia=null,oa=!1,aa=null;function sa(e,t){var n=Tu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function la(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ra=e,ia=co(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ra=e,ia=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Jo?{id:Yo,overflow:Xo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Tu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ra=e,ia=null,!0);default:return!1}}function ca(e){return!(!(1&e.mode)||128&e.flags)}function ua(e){if(oa){var t=ia;if(t){var n=t;if(!la(e,t)){if(ca(e))throw Error(oe(418));t=co(n.nextSibling);var r=ra;t&&la(e,t)?sa(r,n):(e.flags=-4097&e.flags|2,oa=!1,ra=e)}}else{if(ca(e))throw Error(oe(418));e.flags=-4097&e.flags|2,oa=!1,ra=e}}}function da(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ra=e}function pa(e){if(e!==ra)return!1;if(!oa)return da(e),oa=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=ia)){if(ca(e))throw ha(),Error(oe(418));for(;t;)sa(e,t),t=co(t.nextSibling)}if(da(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(oe(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ia=co(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ia=null}}else ia=ra?co(e.stateNode.nextSibling):null;return!0}function ha(){for(var e=ia;e;)e=co(e.nextSibling)}function fa(){ia=ra=null,oa=!1}function ma(e){null===aa?aa=[e]:aa.push(e)}var ga=we.ReactCurrentBatchConfig;function va(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(oe(309));var r=n.stateNode}if(!r)throw Error(oe(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=i.refs;null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!=typeof e)throw Error(oe(284));if(!n._owner)throw Error(oe(290,e))}return e}function ya(e,t){throw e=Object.prototype.toString.call(t),Error(oe(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ba(e){return(0,e._init)(e._payload)}function wa(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=ju(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Lu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===ke?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===je&&ba(o)===t.type)?((r=i(t,n.props)).ref=va(e,t,n),r.return=e,r):((r=Mu(n.type,n.key,n.props,null,e.mode,r)).ref=va(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Du(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=Au(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Lu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case xe:return(n=Mu(t.type,t.key,t.props,null,e.mode,n)).ref=va(e,null,t),n.return=e,n;case _e:return(t=Du(t,e.mode,n)).return=e,t;case je:return d(e,(0,t._init)(t._payload),n)}if(tt(t)||Pe(t))return(t=Au(t,e.mode,n,null)).return=e,t;ya(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case xe:return n.key===i?l(e,t,n,r):null;case _e:return n.key===i?c(e,t,n,r):null;case je:return p(e,t,(i=n._init)(n._payload),r)}if(tt(n)||Pe(n))return null!==i?null:u(e,t,n,r,null);ya(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case xe:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case _e:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case je:return h(e,t,n,(0,r._init)(r._payload),i)}if(tt(r)||Pe(r))return u(t,e=e.get(n)||null,r,i,null);ya(t,r)}return null}return function s(l,c,u,f){if("object"==typeof u&&null!==u&&u.type===ke&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case xe:e:{for(var m=u.key,g=c;null!==g;){if(g.key===m){if((m=u.type)===ke){if(7===g.tag){n(l,g.sibling),(c=i(g,u.props.children)).return=l,l=c;break e}}else if(g.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===je&&ba(m)===g.type){n(l,g.sibling),(c=i(g,u.props)).ref=va(l,g,u),c.return=l,l=c;break e}n(l,g);break}t(l,g),g=g.sibling}u.type===ke?((c=Au(u.props.children,l.mode,f,u.key)).return=l,l=c):((f=Mu(u.type,u.key,u.props,null,l.mode,f)).ref=va(l,c,u),f.return=l,l=f)}return a(l);case _e:e:{for(g=u.key;null!==c;){if(c.key===g){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(c=i(c,u.children||[])).return=l,l=c;break e}n(l,c);break}t(l,c),c=c.sibling}(c=Du(u,l.mode,f)).return=l,l=c}return a(l);case je:return s(l,c,(g=u._init)(u._payload),f)}if(tt(u))return function(i,a,s,l){for(var c=null,u=null,f=a,m=a=0,g=null;null!==f&&m<s.length;m++){f.index>m?(g=f,f=null):g=f.sibling;var v=p(i,f,s[m],l);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&t(i,f),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,f=g}if(m===s.length)return n(i,f),oa&&Qo(i,m),c;if(null===f){for(;m<s.length;m++)null!==(f=d(i,s[m],l))&&(a=o(f,a,m),null===u?c=f:u.sibling=f,u=f);return oa&&Qo(i,m),c}for(f=r(i,f);m<s.length;m++)null!==(g=h(f,i,m,s[m],l))&&(e&&null!==g.alternate&&f.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&f.forEach(function(e){return t(i,e)}),oa&&Qo(i,m),c}(l,c,u,f);if(Pe(u))return function(i,a,s,l){var c=Pe(s);if("function"!=typeof c)throw Error(oe(150));if(null==(s=c.call(s)))throw Error(oe(151));for(var u=c=null,f=a,m=a=0,g=null,v=s.next();null!==f&&!v.done;m++,v=s.next()){f.index>m?(g=f,f=null):g=f.sibling;var y=p(i,f,v.value,l);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(i,f),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y,f=g}if(v.done)return n(i,f),oa&&Qo(i,m),c;if(null===f){for(;!v.done;m++,v=s.next())null!==(v=d(i,v.value,l))&&(a=o(v,a,m),null===u?c=v:u.sibling=v,u=v);return oa&&Qo(i,m),c}for(f=r(i,f);!v.done;m++,v=s.next())null!==(v=h(f,i,m,v.value,l))&&(e&&null!==v.alternate&&f.delete(null===v.key?m:v.key),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v);return e&&f.forEach(function(e){return t(i,e)}),oa&&Qo(i,m),c}(l,c,u,f);ya(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(c=i(c,u)).return=l,l=c):(n(l,c),(c=Lu(u,l.mode,f)).return=l,l=c),a(l)):n(l,c)}}var xa=wa(!0),_a=wa(!1),ka=Co(null),Sa=null,Ca=null,Ea=null;function Ia(){Ea=Ca=Sa=null}function Na(e){var t=ka.current;Eo(ka),e._currentValue=t}function Oa(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ta(e,t){Sa=e,Ea=Ca=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(yl=!0),e.firstContext=null)}function Ra(e){var t=e._currentValue;if(Ea!==e)if(e={context:e,memoizedValue:t,next:null},null===Ca){if(null===Sa)throw Error(oe(308));Ca=e,Sa.dependencies={lanes:0,firstContext:e}}else Ca=Ca.next=e;return t}var ja=null;function Ma(e){null===ja?ja=[e]:ja.push(e)}function Aa(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ma(t)):(n.next=i.next,i.next=n),t.interleaved=n,Pa(e,r)}function Pa(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var La=!1;function Da(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function za(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Ic){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Pa(e,n)}return null===(i=r.interleaved)?(t.next=t,Ma(r)):(t.next=i.next,i.next=t),r.interleaved=t,Pa(e,n)}function Ba(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bn(e,n)}}function $a(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Va(e,t,n,r){var i=e.updateQueue;La=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var p=s.lane,h=s.eventTime;if((r&p)===p){null!==u&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,m=s;switch(p=t,h=n,m.tag){case 1:if("function"==typeof(f=m.payload)){d=f.call(h,d,p);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(p="function"==typeof(f=m.payload)?f.call(h,d,p):f))break e;d=De({},d,p);break e;case 2:La=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(p=i.effects)?i.effects=[s]:p.push(s))}else h={eventTime:h,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=h,l=d):u=u.next=h,a|=p;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(p=s).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Pc|=a,e.lanes=a,e.memoizedState=d}}function Wa(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(oe(191,i));i.call(r)}}}var qa={},Ha=Co(qa),Ka=Co(qa),Ga=Co(qa);function Za(e){if(e===qa)throw Error(oe(174));return e}function Ja(e,t){switch(Io(Ga,t),Io(Ka,e),Io(Ha,qa),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:lt(null,"");break;default:t=lt(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Eo(Ha),Io(Ha,t)}function Ya(){Eo(Ha),Eo(Ka),Eo(Ga)}function Xa(e){Za(Ga.current);var t=Za(Ha.current),n=lt(t,e.type);t!==n&&(Io(Ka,e),Io(Ha,n))}function Qa(e){Ka.current===e&&(Eo(Ha),Eo(Ka))}var es=Co(0);function ts(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ns=[];function rs(){for(var e=0;e<ns.length;e++)ns[e]._workInProgressVersionPrimary=null;ns.length=0}var is=we.ReactCurrentDispatcher,os=we.ReactCurrentBatchConfig,as=0,ss=null,ls=null,cs=null,us=!1,ds=!1,ps=0,hs=0;function fs(){throw Error(oe(321))}function ms(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!si(e[n],t[n]))return!1;return!0}function gs(e,t,n,r,i,o){if(as=o,ss=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,is.current=null===e||null===e.memoizedState?Qs:el,e=n(r,i),ds){o=0;do{if(ds=!1,ps=0,25<=o)throw Error(oe(301));o+=1,cs=ls=null,t.updateQueue=null,is.current=tl,e=n(r,i)}while(ds)}if(is.current=Xs,t=null!==ls&&null!==ls.next,as=0,cs=ls=ss=null,us=!1,t)throw Error(oe(300));return e}function vs(){var e=0!==ps;return ps=0,e}function ys(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===cs?ss.memoizedState=cs=e:cs=cs.next=e,cs}function bs(){if(null===ls){var e=ss.alternate;e=null!==e?e.memoizedState:null}else e=ls.next;var t=null===cs?ss.memoizedState:cs.next;if(null!==t)cs=t,ls=e;else{if(null===e)throw Error(oe(310));e={memoizedState:(ls=e).memoizedState,baseState:ls.baseState,baseQueue:ls.baseQueue,queue:ls.queue,next:null},null===cs?ss.memoizedState=cs=e:cs=cs.next=e}return cs}function ws(e,t){return"function"==typeof t?t(e):t}function xs(e){var t=bs(),n=t.queue;if(null===n)throw Error(oe(311));n.lastRenderedReducer=e;var r=ls,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=a=null,l=null,c=o;do{var u=c.lane;if((as&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,ss.lanes|=u,Pc|=u}c=c.next}while(null!==c&&c!==o);null===l?a=r:l.next=s,si(r,t.memoizedState)||(yl=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,ss.lanes|=o,Pc|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _s(e){var t=bs(),n=t.queue;if(null===n)throw Error(oe(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);si(o,t.memoizedState)||(yl=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ks(){}function Ss(e,t){var n=ss,r=bs(),i=t(),o=!si(r.memoizedState,i);if(o&&(r.memoizedState=i,yl=!0),r=r.queue,Ls(Is.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==cs&&1&cs.memoizedState.tag){if(n.flags|=2048,Rs(9,Es.bind(null,n,r,i,t),void 0,null),null===Nc)throw Error(oe(349));30&as||Cs(n,t,i)}return i}function Cs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ss.updateQueue)?(t={lastEffect:null,stores:null},ss.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Es(e,t,n,r){t.value=n,t.getSnapshot=r,Ns(t)&&Os(e)}function Is(e,t,n){return n(function(){Ns(t)&&Os(e)})}function Ns(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!si(e,n)}catch(r){return!0}}function Os(e){var t=Pa(e,1);null!==t&&tu(t,e,1,-1)}function Ts(e){var t=ys();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:e},t.queue=e,e=e.dispatch=Gs.bind(null,ss,e),[t.memoizedState,e]}function Rs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ss.updateQueue)?(t={lastEffect:null,stores:null},ss.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function js(){return bs().memoizedState}function Ms(e,t,n,r){var i=ys();ss.flags|=e,i.memoizedState=Rs(1|t,n,void 0,void 0===r?null:r)}function As(e,t,n,r){var i=bs();r=void 0===r?null:r;var o=void 0;if(null!==ls){var a=ls.memoizedState;if(o=a.destroy,null!==r&&ms(r,a.deps))return void(i.memoizedState=Rs(t,n,o,r))}ss.flags|=e,i.memoizedState=Rs(1|t,n,o,r)}function Ps(e,t){return Ms(8390656,8,e,t)}function Ls(e,t){return As(2048,8,e,t)}function Ds(e,t){return As(4,2,e,t)}function Fs(e,t){return As(4,4,e,t)}function zs(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Us(e,t,n){return n=null!=n?n.concat([e]):null,As(4,4,zs.bind(null,t,e),n)}function Bs(){}function $s(e,t){var n=bs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ms(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Vs(e,t){var n=bs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ms(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ws(e,t,n){return 21&as?(si(n,t)||(n=gn(),ss.lanes|=n,Pc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,yl=!0),e.memoizedState=n)}function qs(e,t){var n=wn;wn=0!==n&&4>n?n:4,e(!0);var r=os.transition;os.transition={};try{e(!1),t()}finally{wn=n,os.transition=r}}function Hs(){return bs().memoizedState}function Ks(e,t,n){var r=eu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Zs(e))Js(t,n);else if(null!==(n=Aa(e,t,n,r))){tu(n,e,r,Qc()),Ys(n,t,r)}}function Gs(e,t,n){var r=eu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zs(e))Js(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,si(s,a)){var l=t.interleaved;return null===l?(i.next=i,Ma(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Aa(e,t,i,r))&&(tu(n,e,r,i=Qc()),Ys(n,t,r))}}function Zs(e){var t=e.alternate;return e===ss||null!==t&&t===ss}function Js(e,t){ds=us=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ys(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bn(e,n)}}var Xs={readContext:Ra,useCallback:fs,useContext:fs,useEffect:fs,useImperativeHandle:fs,useInsertionEffect:fs,useLayoutEffect:fs,useMemo:fs,useReducer:fs,useRef:fs,useState:fs,useDebugValue:fs,useDeferredValue:fs,useTransition:fs,useMutableSource:fs,useSyncExternalStore:fs,useId:fs,unstable_isNewReconciler:!1},Qs={readContext:Ra,useCallback:function(e,t){return ys().memoizedState=[e,void 0===t?null:t],e},useContext:Ra,useEffect:Ps,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ms(4194308,4,zs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ms(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ms(4,2,e,t)},useMemo:function(e,t){var n=ys();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ys();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ks.bind(null,ss,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ys().memoizedState=e},useState:Ts,useDebugValue:Bs,useDeferredValue:function(e){return ys().memoizedState=e},useTransition:function(){var e=Ts(!1),t=e[0];return e=qs.bind(null,e[1]),ys().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ss,i=ys();if(oa){if(void 0===n)throw Error(oe(407));n=n()}else{if(n=t(),null===Nc)throw Error(oe(349));30&as||Cs(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ps(Is.bind(null,r,o,e),[e]),r.flags|=2048,Rs(9,Es.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ys(),t=Nc.identifierPrefix;if(oa){var n=Xo;t=":"+t+"R"+(n=(Yo&~(1<<32-sn(Yo)-1)).toString(32)+n),0<(n=ps++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=hs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},el={readContext:Ra,useCallback:$s,useContext:Ra,useEffect:Ls,useImperativeHandle:Us,useInsertionEffect:Ds,useLayoutEffect:Fs,useMemo:Vs,useReducer:xs,useRef:js,useState:function(){return xs(ws)},useDebugValue:Bs,useDeferredValue:function(e){return Ws(bs(),ls.memoizedState,e)},useTransition:function(){return[xs(ws)[0],bs().memoizedState]},useMutableSource:ks,useSyncExternalStore:Ss,useId:Hs,unstable_isNewReconciler:!1},tl={readContext:Ra,useCallback:$s,useContext:Ra,useEffect:Ls,useImperativeHandle:Us,useInsertionEffect:Ds,useLayoutEffect:Fs,useMemo:Vs,useReducer:_s,useRef:js,useState:function(){return _s(ws)},useDebugValue:Bs,useDeferredValue:function(e){var t=bs();return null===ls?t.memoizedState=e:Ws(t,ls.memoizedState,e)},useTransition:function(){return[_s(ws)[0],bs().memoizedState]},useMutableSource:ks,useSyncExternalStore:Ss,useId:Hs,unstable_isNewReconciler:!1};function nl(e,t){if(e&&e.defaultProps){for(var n in t=De({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rl(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:De({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var il={isMounted:function(e){return!!(e=e._reactInternals)&&$t(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Qc(),i=eu(e),o=za(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Ua(e,o,i))&&(tu(t,e,i,r),Ba(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Qc(),i=eu(e),o=za(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Ua(e,o,i))&&(tu(t,e,i,r),Ba(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qc(),r=eu(e),i=za(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Ua(e,i,r))&&(tu(t,e,r,n),Ba(t,e,r))}};function ol(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!li(n,r)||!li(i,o))}function al(e,t,n){var r=!1,i=No,o=t.contextType;return"object"==typeof o&&null!==o?o=Ra(o):(i=Mo(t)?Ro:Oo.current,o=(r=null!=(r=t.contextTypes))?jo(e,i):No),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=il,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function sl(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&il.enqueueReplaceState(t,t.state,null)}function ll(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Da(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Ra(o):(o=Mo(t)?Ro:Oo.current,i.context=jo(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(rl(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&il.enqueueReplaceState(i,i.state,null),Va(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function cl(e,t){try{var n="",r=t;do{n+=Be(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function ul(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}var dl="function"==typeof WeakMap?WeakMap:Map;function pl(e,t,n){(n=za(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vc||(Vc=!0,Wc=r)},n}function hl(e,t,n){(n=za(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===qc?qc=new Set([this]):qc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function fl(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new dl;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Su.bind(null,e,t,n),t.then(e,e))}function ml(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function gl(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=za(-1,1)).tag=2,Ua(n,t,1))),n.lanes|=1),e)}var vl=we.ReactCurrentOwner,yl=!1;function bl(e,t,n,r){t.child=null===e?_a(t,null,n,r):xa(t,e.child,n,r)}function wl(e,t,n,r,i){n=n.render;var o=t.ref;return Ta(t,i),r=gs(e,t,n,r,o,i),n=vs(),null===e||yl?(oa&&n&&ta(t),t.flags|=1,bl(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vl(e,t,i))}function xl(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Ru(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Mu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,_l(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:li)(a,r)&&e.ref===t.ref)return Vl(e,t,i)}return t.flags|=1,(e=ju(o,r)).ref=t.ref,e.return=t,t.child=e}function _l(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(li(o,r)&&e.ref===t.ref){if(yl=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,Vl(e,t,i);131072&e.flags&&(yl=!0)}}return Cl(e,t,n,r,i)}function kl(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Io(jc,Rc),Rc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Io(jc,Rc),Rc|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Io(jc,Rc),Rc|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Io(jc,Rc),Rc|=r;return bl(e,t,i,n),t.child}function Sl(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Cl(e,t,n,r,i){var o=Mo(n)?Ro:Oo.current;return o=jo(t,o),Ta(t,i),n=gs(e,t,n,r,o,i),r=vs(),null===e||yl?(oa&&r&&ta(t),t.flags|=1,bl(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vl(e,t,i))}function El(e,t,n,r,i){if(Mo(n)){var o=!0;Do(t)}else o=!1;if(Ta(t,i),null===t.stateNode)$l(e,t),al(t,n,r),ll(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=Ra(c):c=jo(t,c=Mo(n)?Ro:Oo.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&sl(t,a,r,c),La=!1;var p=t.memoizedState;a.state=p,Va(t,r,a,i),l=t.memoizedState,s!==r||p!==l||To.current||La?("function"==typeof u&&(rl(t,n,u,r),l=t.memoizedState),(s=La||ol(t,n,s,r,p,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Fa(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:nl(t.type,s),a.props=c,d=t.pendingProps,p=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ra(l):l=jo(t,l=Mo(n)?Ro:Oo.current);var h=n.getDerivedStateFromProps;(u="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||p!==l)&&sl(t,a,r,l),La=!1,p=t.memoizedState,a.state=p,Va(t,r,a,i);var f=t.memoizedState;s!==d||p!==f||To.current||La?("function"==typeof h&&(rl(t,n,h,r),f=t.memoizedState),(c=La||ol(t,n,c,r,p,f,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Il(e,t,n,r,o,i)}function Il(e,t,n,r,i,o){Sl(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&Fo(t,n,!1),Vl(e,t,o);r=t.stateNode,vl.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=xa(t,e.child,null,o),t.child=xa(t,null,s,o)):bl(e,t,s,o),t.memoizedState=r.state,i&&Fo(t,n,!0),t.child}function Nl(e){var t=e.stateNode;t.pendingContext?Po(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Po(0,t.context,!1),Ja(e,t.containerInfo)}function Ol(e,t,n,r,i){return fa(),ma(i),t.flags|=256,bl(e,t,n,r),t.child}var Tl,Rl,jl,Ml,Al={dehydrated:null,treeContext:null,retryLane:0};function Pl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ll(e,t,n){var r,i=t.pendingProps,o=es.current,a=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Io(es,1&o),null===e)return ua(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=i.children,e=i.fallback,a?(i=t.mode,a=t.child,s={mode:"hidden",children:s},1&i||null===a?a=Pu(s,i,0,null):(a.childLanes=0,a.pendingProps=s),e=Au(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Pl(n),t.memoizedState=Al,e):Dl(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,a){if(n)return 256&t.flags?(t.flags&=-257,Fl(e,t,a,r=ul(Error(oe(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Pu({mode:"visible",children:r.children},i,0,null),(o=Au(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&xa(t,e.child,null,a),t.child.memoizedState=Pl(a),t.memoizedState=Al,o);if(!(1&t.mode))return Fl(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,Fl(e,t,a,r=ul(o=Error(oe(419)),r,void 0))}if(s=0!==(a&e.childLanes),yl||s){if(null!==(r=Nc)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|a))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Pa(e,i),tu(r,e,i,-1))}return fu(),Fl(e,t,a,r=ul(Error(oe(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Eu.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ia=co(i.nextSibling),ra=t,oa=!0,aa=null,null!==e&&(Go[Zo++]=Yo,Go[Zo++]=Xo,Go[Zo++]=Jo,Yo=e.id,Xo=e.overflow,Jo=t),t=Dl(t,r.children),t.flags|=4096,t)}(e,t,s,i,r,o,n);if(a){a=i.fallback,s=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 1&s||t.child===o?(i=ju(o,l)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null),null!==r?a=ju(r,a):(a=Au(a,s,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,s=null===(s=e.child.memoizedState)?Pl(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Al,i}return e=(a=e.child).sibling,i=ju(a,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Dl(e,t){return(t=Pu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fl(e,t,n,r){return null!==r&&ma(r),xa(t,e.child,null,n),(e=Dl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function zl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Oa(e.return,t,n)}function Ul(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Bl(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(bl(e,t,r.children,n),2&(r=es.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&zl(e,n,t);else if(19===e.tag)zl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Io(es,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ts(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ul(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ts(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ul(t,!0,n,null,o);break;case"together":Ul(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function $l(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Pc|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(oe(153));if(null!==t.child){for(n=ju(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ju(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Wl(e,t){if(!oa)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ql(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Hl(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ql(t),null;case 1:case 17:return Mo(t.type)&&Ao(),ql(t),null;case 3:return r=t.stateNode,Ya(),Eo(To),Eo(Oo),rs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(pa(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==aa&&(ou(aa),aa=null))),Rl(e,t),ql(t),null;case 5:Qa(t);var i=Za(Ga.current);if(n=t.type,null!==e&&null!=t.stateNode)jl(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(oe(166));return ql(t),null}if(e=Za(Ha.current),pa(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ho]=t,r[fo]=o,e=!!(1&t.mode),n){case"dialog":zi("cancel",r),zi("close",r);break;case"iframe":case"object":case"embed":zi("load",r);break;case"video":case"audio":for(i=0;i<Pi.length;i++)zi(Pi[i],r);break;case"source":zi("error",r);break;case"img":case"image":case"link":zi("error",r),zi("load",r);break;case"details":zi("toggle",r);break;case"input":Je(r,o),zi("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},zi("invalid",r);break;case"textarea":it(r,o),zi("invalid",r)}for(var a in yt(n,o),i=null,o)if(o.hasOwnProperty(a)){var s=o[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==o.suppressHydrationWarning&&Xi(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&Xi(r.textContent,s,e),i=["children",""+s]):se.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&zi("scroll",r)}switch(n){case"input":He(r),Qe(r,o,!0);break;case"textarea":He(r),at(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Qi)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=st(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ho]=t,e[fo]=r,Tl(e,t,!1,!1),t.stateNode=e;e:{switch(a=bt(n,r),n){case"dialog":zi("cancel",e),zi("close",e),i=r;break;case"iframe":case"object":case"embed":zi("load",e),i=r;break;case"video":case"audio":for(i=0;i<Pi.length;i++)zi(Pi[i],e);i=r;break;case"source":zi("error",e),i=r;break;case"img":case"image":case"link":zi("error",e),zi("load",e),i=r;break;case"details":zi("toggle",e),i=r;break;case"input":Je(e,r),i=Ze(e,r),zi("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=De({},r,{value:void 0}),zi("invalid",e);break;case"textarea":it(e,r),i=rt(e,r),zi("invalid",e)}for(o in yt(n,i),s=i)if(s.hasOwnProperty(o)){var l=s[o];"style"===o?gt(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&dt(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&pt(e,l):"number"==typeof l&&pt(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(se.hasOwnProperty(o)?null!=l&&"onScroll"===o&&zi("scroll",e):null!=l&&be(e,o,l,a))}switch(n){case"input":He(e),Qe(e,r,!1);break;case"textarea":He(e),at(e);break;case"option":null!=r.value&&e.setAttribute("value",""+We(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?nt(e,!!r.multiple,o,!1):null!=r.defaultValue&&nt(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Qi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return ql(t),null;case 6:if(e&&null!=t.stateNode)Ml(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(oe(166));if(n=Za(Ga.current),Za(Ha.current),pa(t)){if(r=t.stateNode,n=t.memoizedProps,r[ho]=t,(o=r.nodeValue!==n)&&null!==(e=ra))switch(e.tag){case 3:Xi(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xi(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ho]=t,t.stateNode=r}return ql(t),null;case 13:if(Eo(es),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(oa&&null!==ia&&1&t.mode&&!(128&t.flags))ha(),fa(),t.flags|=98560,o=!1;else if(o=pa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(oe(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(oe(317));o[ho]=t}else fa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;ql(t),o=!1}else null!==aa&&(ou(aa),aa=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&es.current?0===Mc&&(Mc=3):fu())),null!==t.updateQueue&&(t.flags|=4),ql(t),null);case 4:return Ya(),Rl(e,t),null===e&&$i(t.stateNode.containerInfo),ql(t),null;case 10:return Na(t.type._context),ql(t),null;case 19:if(Eo(es),null===(o=t.memoizedState))return ql(t),null;if(r=!!(128&t.flags),null===(a=o.rendering))if(r)Wl(o,!1);else{if(0!==Mc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=ts(e))){for(t.flags|=128,Wl(o,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(a=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Io(es,1&es.current|2),t.child}e=e.sibling}null!==o.tail&&Yt()>Bc&&(t.flags|=128,r=!0,Wl(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ts(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Wl(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!oa)return ql(t),null}else 2*Yt()-o.renderingStartTime>Bc&&1073741824!==n&&(t.flags|=128,r=!0,Wl(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=o.last)?n.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Yt(),t.sibling=null,n=es.current,Io(es,r?1&n|2:1&n),t):(ql(t),null);case 22:case 23:return uu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Rc)&&(ql(t),6&t.subtreeFlags&&(t.flags|=8192)):ql(t),null;case 24:case 25:return null}throw Error(oe(156,t.tag))}function Kl(e,t){switch(na(t),t.tag){case 1:return Mo(t.type)&&Ao(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ya(),Eo(To),Eo(Oo),rs(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Qa(t),null;case 13:if(Eo(es),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(oe(340));fa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Eo(es),null;case 4:return Ya(),null;case 10:return Na(t.type._context),null;case 22:case 23:return uu(),null;default:return null}}Tl=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Rl=function(){},jl=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Za(Ha.current);var o,a=null;switch(n){case"input":i=Ze(e,i),r=Ze(e,r),a=[];break;case"select":i=De({},i,{value:void 0}),r=De({},r,{value:void 0}),a=[];break;case"textarea":i=rt(e,i),r=rt(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Qi)}for(c in yt(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(se.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(se.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&zi("scroll",e),a||s===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Ml=function(e,t,n,r){n!==r&&(t.flags|=4)};var Gl=!1,Zl=!1,Jl="function"==typeof WeakSet?WeakSet:Set,Yl=null;function Xl(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){ku(e,t,r)}else n.current=null}function Ql(e,t,n){try{n()}catch(r){ku(e,t,r)}}var ec=!1;function tc(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Ql(t,n,o)}i=i.next}while(i!==r)}}function nc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rc(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ic(e){var t=e.alternate;null!==t&&(e.alternate=null,ic(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ho],delete t[fo],delete t[go],delete t[vo],delete t[yo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function oc(e){return 5===e.tag||3===e.tag||4===e.tag}function ac(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||oc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function sc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Qi));else if(4!==r&&null!==(e=e.child))for(sc(e,t,n),e=e.sibling;null!==e;)sc(e,t,n),e=e.sibling}function lc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(lc(e,t,n),e=e.sibling;null!==e;)lc(e,t,n),e=e.sibling}var cc=null,uc=!1;function dc(e,t,n){for(n=n.child;null!==n;)pc(e,t,n),n=n.sibling}function pc(e,t,n){if(an&&"function"==typeof an.onCommitFiberUnmount)try{an.onCommitFiberUnmount(on,n)}catch(s){}switch(n.tag){case 5:Zl||Xl(n,t);case 6:var r=cc,i=uc;cc=null,dc(e,t,n),uc=i,null!==(cc=r)&&(uc?(e=cc,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cc.removeChild(n.stateNode));break;case 18:null!==cc&&(uc?(e=cc,n=n.stateNode,8===e.nodeType?lo(e.parentNode,n):1===e.nodeType&&lo(e,n),Vn(e)):lo(cc,n.stateNode));break;case 4:r=cc,i=uc,cc=n.stateNode.containerInfo,uc=!0,dc(e,t,n),cc=r,uc=i;break;case 0:case 11:case 14:case 15:if(!Zl&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&Ql(n,t,a),i=i.next}while(i!==r)}dc(e,t,n);break;case 1:if(!Zl&&(Xl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){ku(n,t,s)}dc(e,t,n);break;case 21:dc(e,t,n);break;case 22:1&n.mode?(Zl=(r=Zl)||null!==n.memoizedState,dc(e,t,n),Zl=r):dc(e,t,n);break;default:dc(e,t,n)}}function hc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Jl),t.forEach(function(t){var r=Iu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function fc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:cc=s.stateNode,uc=!1;break e;case 3:case 4:cc=s.stateNode.containerInfo,uc=!0;break e}s=s.return}if(null===cc)throw Error(oe(160));pc(o,a,i),cc=null,uc=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(c){ku(i,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)mc(t,e),t=t.sibling}function mc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fc(t,e),gc(e),4&r){try{tc(3,e,e.return),nc(3,e)}catch(RC){ku(e,e.return,RC)}try{tc(5,e,e.return)}catch(RC){ku(e,e.return,RC)}}break;case 1:fc(t,e),gc(e),512&r&&null!==n&&Xl(n,n.return);break;case 5:if(fc(t,e),gc(e),512&r&&null!==n&&Xl(n,n.return),32&e.flags){var i=e.stateNode;try{pt(i,"")}catch(RC){ku(e,e.return,RC)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===o.type&&null!=o.name&&Ye(i,o),bt(s,a);var c=bt(s,o);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];"style"===u?gt(i,d):"dangerouslySetInnerHTML"===u?dt(i,d):"children"===u?pt(i,d):be(i,u,d,c)}switch(s){case"input":Xe(i,o);break;case"textarea":ot(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;null!=h?nt(i,!!o.multiple,h,!1):p!==!!o.multiple&&(null!=o.defaultValue?nt(i,!!o.multiple,o.defaultValue,!0):nt(i,!!o.multiple,o.multiple?[]:"",!1))}i[fo]=o}catch(RC){ku(e,e.return,RC)}}break;case 6:if(fc(t,e),gc(e),4&r){if(null===e.stateNode)throw Error(oe(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(RC){ku(e,e.return,RC)}}break;case 3:if(fc(t,e),gc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Vn(t.containerInfo)}catch(RC){ku(e,e.return,RC)}break;case 4:default:fc(t,e),gc(e);break;case 13:fc(t,e),gc(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Uc=Yt())),4&r&&hc(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(Zl=(c=Zl)||u,fc(t,e),Zl=c):fc(t,e),gc(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(Yl=e,u=e.child;null!==u;){for(d=Yl=u;null!==Yl;){switch(h=(p=Yl).child,p.tag){case 0:case 11:case 14:case 15:tc(4,p,p.return);break;case 1:Xl(p,p.return);var f=p.stateNode;if("function"==typeof f.componentWillUnmount){r=p,n=p.return;try{t=r,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(RC){ku(r,n,RC)}}break;case 5:Xl(p,p.return);break;case 22:if(null!==p.memoizedState){wc(d);continue}}null!==h?(h.return=p,Yl=h):wc(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{i=d.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=mt("display",a))}catch(RC){ku(e,e.return,RC)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(RC){ku(e,e.return,RC)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:fc(t,e),gc(e),4&r&&hc(e);case 21:}}function gc(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(oc(n)){var r=n;break e}n=n.return}throw Error(oe(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(pt(i,""),r.flags&=-33),lc(e,ac(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;sc(e,ac(e),o);break;default:throw Error(oe(161))}}catch(a){ku(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vc(e,t,n){Yl=e,yc(e)}function yc(e,t,n){for(var r=!!(1&e.mode);null!==Yl;){var i=Yl,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Gl;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Zl;s=Gl;var c=Zl;if(Gl=a,(Zl=l)&&!c)for(Yl=i;null!==Yl;)l=(a=Yl).child,22===a.tag&&null!==a.memoizedState?xc(i):null!==l?(l.return=a,Yl=l):xc(i);for(;null!==o;)Yl=o,yc(o),o=o.sibling;Yl=i,Gl=s,Zl=c}bc(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,Yl=o):bc(e)}}function bc(e){for(;null!==Yl;){var t=Yl;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Zl||nc(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Zl)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:nl(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Wa(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Wa(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&Vn(d)}}}break;default:throw Error(oe(163))}Zl||512&t.flags&&rc(t)}catch(p){ku(t,t.return,p)}}if(t===e){Yl=null;break}if(null!==(n=t.sibling)){n.return=t.return,Yl=n;break}Yl=t.return}}function wc(e){for(;null!==Yl;){var t=Yl;if(t===e){Yl=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Yl=n;break}Yl=t.return}}function xc(e){for(;null!==Yl;){var t=Yl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{nc(4,t)}catch(l){ku(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){ku(t,i,l)}}var o=t.return;try{rc(t)}catch(l){ku(t,o,l)}break;case 5:var a=t.return;try{rc(t)}catch(l){ku(t,a,l)}}}catch(l){ku(t,t.return,l)}if(t===e){Yl=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Yl=s;break}Yl=t.return}}var _c,kc=Math.ceil,Sc=we.ReactCurrentDispatcher,Cc=we.ReactCurrentOwner,Ec=we.ReactCurrentBatchConfig,Ic=0,Nc=null,Oc=null,Tc=0,Rc=0,jc=Co(0),Mc=0,Ac=null,Pc=0,Lc=0,Dc=0,Fc=null,zc=null,Uc=0,Bc=1/0,$c=null,Vc=!1,Wc=null,qc=null,Hc=!1,Kc=null,Gc=0,Zc=0,Jc=null,Yc=-1,Xc=0;function Qc(){return 6&Ic?Yt():-1!==Yc?Yc:Yc=Yt()}function eu(e){return 1&e.mode?2&Ic&&0!==Tc?Tc&-Tc:null!==ga.transition?(0===Xc&&(Xc=gn()),Xc):0!==(e=wn)?e:e=void 0===(e=window.event)?16:Yn(e.type):1}function tu(e,t,n,r){if(50<Zc)throw Zc=0,Jc=null,Error(oe(185));yn(e,n,r),2&Ic&&e===Nc||(e===Nc&&(!(2&Ic)&&(Lc|=n),4===Mc&&au(e,Tc)),nu(e,r),1===n&&0===Ic&&!(1&t.mode)&&(Bc=Yt()+500,Uo&&Vo()))}function nu(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-sn(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=fn(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=hn(e,e===Nc?Tc:0);if(0===r)null!==n&&Gt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Gt(n),1===t)0===e.tag?function(e){Uo=!0,$o(e)}(su.bind(null,e)):$o(su.bind(null,e)),ao(function(){!(6&Ic)&&Vo()}),n=null;else{switch(xn(r)){case 1:n=Qt;break;case 4:n=en;break;case 16:default:n=tn;break;case 536870912:n=rn}n=Nu(n,ru.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ru(e,t){if(Yc=-1,Xc=0,6&Ic)throw Error(oe(327));var n=e.callbackNode;if(xu()&&e.callbackNode!==n)return null;var r=hn(e,e===Nc?Tc:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=mu(e,r);else{t=r;var i=Ic;Ic|=2;var o=hu();for(Nc===e&&Tc===t||($c=null,Bc=Yt()+500,du(e,t));;)try{vu();break}catch(s){pu(e,s)}Ia(),Sc.current=o,Ic=i,null!==Oc?t=0:(Nc=null,Tc=0,t=Mc)}if(0!==t){if(2===t&&(0!==(i=mn(e))&&(r=i,t=iu(e,i))),1===t)throw n=Ac,du(e,0),au(e,r),nu(e,Yt()),n;if(6===t)au(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!si(o(),i))return!1}catch(a){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=mu(e,r),2===t&&(o=mn(e),0!==o&&(r=o,t=iu(e,o))),1!==t)))throw n=Ac,du(e,0),au(e,r),nu(e,Yt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(oe(345));case 2:case 5:wu(e,zc,$c);break;case 3:if(au(e,r),(130023424&r)===r&&10<(t=Uc+500-Yt())){if(0!==hn(e,0))break;if(((i=e.suspendedLanes)&r)!==r){Qc(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ro(wu.bind(null,e,zc,$c),t);break}wu(e,zc,$c);break;case 4:if(au(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-sn(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=Yt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kc(r/1960))-r)){e.timeoutHandle=ro(wu.bind(null,e,zc,$c),r);break}wu(e,zc,$c);break;default:throw Error(oe(329))}}}return nu(e,Yt()),e.callbackNode===n?ru.bind(null,e):null}function iu(e,t){var n=Fc;return e.current.memoizedState.isDehydrated&&(du(e,t).flags|=256),2!==(e=mu(e,t))&&(t=zc,zc=n,null!==t&&ou(t)),e}function ou(e){null===zc?zc=e:zc.push.apply(zc,e)}function au(e,t){for(t&=~Dc,t&=~Lc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-sn(t),r=1<<n;e[n]=-1,t&=~r}}function su(e){if(6&Ic)throw Error(oe(327));xu();var t=hn(e,0);if(!(1&t))return nu(e,Yt()),null;var n=mu(e,t);if(0!==e.tag&&2===n){var r=mn(e);0!==r&&(t=r,n=iu(e,r))}if(1===n)throw n=Ac,du(e,0),au(e,t),nu(e,Yt()),n;if(6===n)throw Error(oe(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wu(e,zc,$c),nu(e,Yt()),null}function lu(e,t){var n=Ic;Ic|=1;try{return e(t)}finally{0===(Ic=n)&&(Bc=Yt()+500,Uo&&Vo())}}function cu(e){null!==Kc&&0===Kc.tag&&!(6&Ic)&&xu();var t=Ic;Ic|=1;var n=Ec.transition,r=wn;try{if(Ec.transition=null,wn=1,e)return e()}finally{wn=r,Ec.transition=n,!(6&(Ic=t))&&Vo()}}function uu(){Rc=jc.current,Eo(jc)}function du(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,io(n)),null!==Oc)for(n=Oc.return;null!==n;){var r=n;switch(na(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ao();break;case 3:Ya(),Eo(To),Eo(Oo),rs();break;case 5:Qa(r);break;case 4:Ya();break;case 13:case 19:Eo(es);break;case 10:Na(r.type._context);break;case 22:case 23:uu()}n=n.return}if(Nc=e,Oc=e=ju(e.current,null),Tc=Rc=t,Mc=0,Ac=null,Dc=Lc=Pc=0,zc=Fc=null,null!==ja){for(t=0;t<ja.length;t++)if(null!==(r=(n=ja[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}ja=null}return e}function pu(e,t){for(;;){var n=Oc;try{if(Ia(),is.current=Xs,us){for(var r=ss.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}us=!1}if(as=0,cs=ls=ss=null,ds=!1,ps=0,Cc.current=null,null===n||null===n.return){Mc=1,Ac=t,Oc=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Tc,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=s,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=ml(a);if(null!==h){h.flags&=-257,gl(h,a,s,0,t),1&h.mode&&fl(o,c,t),l=c;var f=(t=h).updateQueue;if(null===f){var m=new Set;m.add(l),t.updateQueue=m}else f.add(l);break e}if(!(1&t)){fl(o,c,t),fu();break e}l=Error(oe(426))}else if(oa&&1&s.mode){var g=ml(a);if(null!==g){!(65536&g.flags)&&(g.flags|=256),gl(g,a,s,0,t),ma(cl(l,s));break e}}o=l=cl(l,s),4!==Mc&&(Mc=2),null===Fc?Fc=[o]:Fc.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,$a(o,pl(0,l,t));break e;case 1:s=l;var v=o.type,y=o.stateNode;if(!(128&o.flags||"function"!=typeof v.getDerivedStateFromError&&(null===y||"function"!=typeof y.componentDidCatch||null!==qc&&qc.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t,$a(o,hl(o,s,t));break e}}o=o.return}while(null!==o)}bu(n)}catch(b){t=b,Oc===n&&null!==n&&(Oc=n=n.return);continue}break}}function hu(){var e=Sc.current;return Sc.current=Xs,null===e?Xs:e}function fu(){0!==Mc&&3!==Mc&&2!==Mc||(Mc=4),null===Nc||!(268435455&Pc)&&!(268435455&Lc)||au(Nc,Tc)}function mu(e,t){var n=Ic;Ic|=2;var r=hu();for(Nc===e&&Tc===t||($c=null,du(e,t));;)try{gu();break}catch(tf){pu(e,tf)}if(Ia(),Ic=n,Sc.current=r,null!==Oc)throw Error(oe(261));return Nc=null,Tc=0,Mc}function gu(){for(;null!==Oc;)yu(Oc)}function vu(){for(;null!==Oc&&!Zt();)yu(Oc)}function yu(e){var t=_c(e.alternate,e,Rc);e.memoizedProps=e.pendingProps,null===t?bu(e):Oc=t,Cc.current=null}function bu(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Kl(n,t)))return n.flags&=32767,void(Oc=n);if(null===e)return Mc=6,void(Oc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Hl(n,t,Rc)))return void(Oc=n);if(null!==(t=t.sibling))return void(Oc=t);Oc=t=e}while(null!==t);0===Mc&&(Mc=5)}function wu(e,t,n){var r=wn,i=Ec.transition;try{Ec.transition=null,wn=1,function(e,t,n,r){do{xu()}while(null!==Kc);if(6&Ic)throw Error(oe(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(oe(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-sn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===Nc&&(Oc=Nc=null,Tc=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Hc||(Hc=!0,Nu(tn,function(){return xu(),null})),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=Ec.transition,Ec.transition=null;var a=wn;wn=1;var s=Ic;Ic|=4,Cc.current=null,function(e,t){if(eo=qn,hi(e=pi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(w){n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var h;d!==n||0!==i&&3!==d.nodeType||(s=a+i),d!==o||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(h=d.firstChild);)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++c===i&&(s=a),p===o&&++u===r&&(l=a),null!==(h=d.nextSibling))break;p=(d=p).parentNode}d=h}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},qn=!1,Yl=t;null!==Yl;)if(e=(t=Yl).child,1028&t.subtreeFlags&&null!==e)e.return=t,Yl=e;else for(;null!==Yl;){t=Yl;try{var f=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==f){var m=f.memoizedProps,g=f.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:nl(t.type,m),g);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(oe(163))}}catch(w){ku(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Yl=e;break}Yl=t.return}f=ec,ec=!1}(e,n),mc(n,e),fi(to),qn=!!eo,to=eo=null,e.current=n,vc(n),Jt(),Ic=s,wn=a,Ec.transition=o}else e.current=n;if(Hc&&(Hc=!1,Kc=e,Gc=i),o=e.pendingLanes,0===o&&(qc=null),function(e){if(an&&"function"==typeof an.onCommitFiberRoot)try{an.onCommitFiberRoot(on,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),nu(e,Yt()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Vc)throw Vc=!1,e=Wc,Wc=null,e;!!(1&Gc)&&0!==e.tag&&xu(),o=e.pendingLanes,1&o?e===Jc?Zc++:(Zc=0,Jc=e):Zc=0,Vo()}(e,t,n,r)}finally{Ec.transition=i,wn=r}return null}function xu(){if(null!==Kc){var e=xn(Gc),t=Ec.transition,n=wn;try{if(Ec.transition=null,wn=16>e?16:e,null===Kc)var r=!1;else{if(e=Kc,Kc=null,Gc=0,6&Ic)throw Error(oe(331));var i=Ic;for(Ic|=4,Yl=e.current;null!==Yl;){var o=Yl,a=o.child;if(16&Yl.flags){var s=o.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(Yl=c;null!==Yl;){var u=Yl;switch(u.tag){case 0:case 11:case 15:tc(8,u,o)}var d=u.child;if(null!==d)d.return=u,Yl=d;else for(;null!==Yl;){var p=(u=Yl).sibling,h=u.return;if(ic(u),u===c){Yl=null;break}if(null!==p){p.return=h,Yl=p;break}Yl=h}}}var f=o.alternate;if(null!==f){var m=f.child;if(null!==m){f.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}Yl=o}}if(2064&o.subtreeFlags&&null!==a)a.return=o,Yl=a;else e:for(;null!==Yl;){if(2048&(o=Yl).flags)switch(o.tag){case 0:case 11:case 15:tc(9,o,o.return)}var v=o.sibling;if(null!==v){v.return=o.return,Yl=v;break e}Yl=o.return}}var y=e.current;for(Yl=y;null!==Yl;){var b=(a=Yl).child;if(2064&a.subtreeFlags&&null!==b)b.return=a,Yl=b;else e:for(a=y;null!==Yl;){if(2048&(s=Yl).flags)try{switch(s.tag){case 0:case 11:case 15:nc(9,s)}}catch(x){ku(s,s.return,x)}if(s===a){Yl=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,Yl=w;break e}Yl=s.return}}if(Ic=i,Vo(),an&&"function"==typeof an.onPostCommitFiberRoot)try{an.onPostCommitFiberRoot(on,e)}catch(x){}r=!0}return r}finally{wn=n,Ec.transition=t}}return!1}function _u(e,t,n){e=Ua(e,t=pl(0,t=cl(n,t),1),1),t=Qc(),null!==e&&(yn(e,1,t),nu(e,t))}function ku(e,t,n){if(3===e.tag)_u(e,e,n);else for(;null!==t;){if(3===t.tag){_u(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===qc||!qc.has(r))){t=Ua(t,e=hl(t,e=cl(n,e),1),1),e=Qc(),null!==t&&(yn(t,1,e),nu(t,e));break}}t=t.return}}function Su(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Qc(),e.pingedLanes|=e.suspendedLanes&n,Nc===e&&(Tc&n)===n&&(4===Mc||3===Mc&&(130023424&Tc)===Tc&&500>Yt()-Uc?du(e,0):Dc|=n),nu(e,t)}function Cu(e,t){0===t&&(1&e.mode?(t=dn,!(130023424&(dn<<=1))&&(dn=4194304)):t=1);var n=Qc();null!==(e=Pa(e,t))&&(yn(e,t,n),nu(e,n))}function Eu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cu(e,n)}function Iu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(oe(314))}null!==r&&r.delete(t),Cu(e,n)}function Nu(e,t){return Kt(e,t)}function Ou(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tu(e,t,n,r){return new Ou(e,t,n,r)}function Ru(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ju(e,t){var n=e.alternate;return null===n?((n=Tu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Mu(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)Ru(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case ke:return Au(n.children,i,o,t);case Se:a=8,i|=8;break;case Ce:return(e=Tu(12,n,t,2|i)).elementType=Ce,e.lanes=o,e;case Oe:return(e=Tu(13,n,t,i)).elementType=Oe,e.lanes=o,e;case Te:return(e=Tu(19,n,t,i)).elementType=Te,e.lanes=o,e;case Me:return Pu(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Ee:a=10;break e;case Ie:a=9;break e;case Ne:a=11;break e;case Re:a=14;break e;case je:a=16,r=null;break e}throw Error(oe(130,null==e?e:typeof e,""))}return(t=Tu(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Au(e,t,n,r){return(e=Tu(7,e,r,t)).lanes=n,e}function Pu(e,t,n,r){return(e=Tu(22,e,r,t)).elementType=Me,e.lanes=n,e.stateNode={isHidden:!1},e}function Lu(e,t,n){return(e=Tu(6,e,null,t)).lanes=n,e}function Du(e,t,n){return(t=Tu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vn(0),this.expirationTimes=vn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vn(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function zu(e,t,n,r,i,o,a,s,l){return e=new Fu(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Tu(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Da(o),e}function Uu(e){if(!e)return No;e:{if($t(e=e._reactInternals)!==e||1!==e.tag)throw Error(oe(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Mo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(oe(171))}if(1===e.tag){var n=e.type;if(Mo(n))return Lo(e,n,t)}return t}function Bu(e,t,n,r,i,o,a,s,l){return(e=zu(n,r,!0,e,0,o,0,s,l)).context=Uu(null),n=e.current,(o=za(r=Qc(),i=eu(n))).callback=null!=t?t:null,Ua(n,o,i),e.current.lanes=i,yn(e,i,r),nu(e,r),e}function $u(e,t,n,r){var i=t.current,o=Qc(),a=eu(i);return n=Uu(n),null===t.context?t.context=n:t.pendingContext=n,(t=za(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ua(i,t,a))&&(tu(e,i,a,o),Ba(e,i,a)),a}function Vu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Wu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qu(e,t){Wu(e,t),(e=e.alternate)&&Wu(e,t)}_c=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||To.current)yl=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return yl=!1,function(e,t,n){switch(t.tag){case 3:Nl(t),fa();break;case 5:Xa(t);break;case 1:Mo(t.type)&&Do(t);break;case 4:Ja(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Io(ka,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Io(es,1&es.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Ll(e,t,n):(Io(es,1&es.current),null!==(e=Vl(e,t,n))?e.sibling:null);Io(es,1&es.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Bl(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Io(es,es.current),r)break;return null;case 22:case 23:return t.lanes=0,kl(e,t,n)}return Vl(e,t,n)}(e,t,n);yl=!!(131072&e.flags)}else yl=!1,oa&&1048576&t.flags&&ea(t,Ko,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$l(e,t),e=t.pendingProps;var i=jo(t,Oo.current);Ta(t,n),i=gs(null,t,r,e,i,n);var o=vs();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mo(r)?(o=!0,Do(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Da(t),i.updater=il,t.stateNode=i,i._reactInternals=t,ll(t,r,e,n),t=Il(null,t,r,!0,o,n)):(t.tag=0,oa&&o&&ta(t),bl(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch($l(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Ru(e)?1:0;if(null!=e){if((e=e.$$typeof)===Ne)return 11;if(e===Re)return 14}return 2}(r),e=nl(r,e),i){case 0:t=Cl(null,t,r,e,n);break e;case 1:t=El(null,t,r,e,n);break e;case 11:t=wl(null,t,r,e,n);break e;case 14:t=xl(null,t,r,nl(r.type,e),n);break e}throw Error(oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Cl(e,t,r,i=t.elementType===r?i:nl(r,i),n);case 1:return r=t.type,i=t.pendingProps,El(e,t,r,i=t.elementType===r?i:nl(r,i),n);case 3:e:{if(Nl(t),null===e)throw Error(oe(387));r=t.pendingProps,i=(o=t.memoizedState).element,Fa(e,t),Va(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Ol(e,t,r,n,i=cl(Error(oe(423)),t));break e}if(r!==i){t=Ol(e,t,r,n,i=cl(Error(oe(424)),t));break e}for(ia=co(t.stateNode.containerInfo.firstChild),ra=t,oa=!0,aa=null,n=_a(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fa(),r===i){t=Vl(e,t,n);break e}bl(e,t,r,n)}t=t.child}return t;case 5:return Xa(t),null===e&&ua(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,no(r,i)?a=null:null!==o&&no(r,o)&&(t.flags|=32),Sl(e,t),bl(e,t,a,n),t.child;case 6:return null===e&&ua(t),null;case 13:return Ll(e,t,n);case 4:return Ja(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=xa(t,null,r,n):bl(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,wl(e,t,r,i=t.elementType===r?i:nl(r,i),n);case 7:return bl(e,t,t.pendingProps,n),t.child;case 8:case 12:return bl(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Io(ka,r._currentValue),r._currentValue=a,null!==o)if(si(o.value,a)){if(o.children===i.children&&!To.current){t=Vl(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){a=o.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=za(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Oa(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(oe(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),Oa(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}bl(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ta(t,n),r=r(i=Ra(i)),t.flags|=1,bl(e,t,r,n),t.child;case 14:return i=nl(r=t.type,t.pendingProps),xl(e,t,r,i=nl(r.type,i),n);case 15:return _l(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:nl(r,i),$l(e,t),t.tag=1,Mo(r)?(e=!0,Do(t)):e=!1,Ta(t,n),al(t,r,i),ll(t,r,i,n),Il(null,t,r,!0,e,n);case 19:return Bl(e,t,n);case 22:return kl(e,t,n)}throw Error(oe(156,t.tag))};var Hu="function"==typeof reportError?reportError:function(e){};function Ku(e){this._internalRoot=e}function Gu(e){this._internalRoot=e}function Zu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Yu(){}function Xu(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Vu(a);s.call(e)}}$u(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Vu(a);o.call(e)}}var a=Bu(t,r,e,0,null,!1,0,"",Yu);return e._reactRootContainer=a,e[mo]=a.current,$i(8===e.nodeType?e.parentNode:e),cu(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Vu(l);s.call(e)}}var l=zu(e,0,!1,null,0,!1,0,"",Yu);return e._reactRootContainer=l,e[mo]=l.current,$i(8===e.nodeType?e.parentNode:e),cu(function(){$u(t,l,n,r)}),l}(n,t,e,i,r);return Vu(a)}Gu.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(oe(409));$u(e,t,null,null)},Gu.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cu(function(){$u(null,e,null,null)}),t[mo]=null}},Gu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Cn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<An.length&&0!==t&&t<An[n].priority;n++);An.splice(n,0,e),0===n&&Fn(e)}},_n=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=pn(t.pendingLanes);0!==n&&(bn(t,1|n),nu(t,Yt()),!(6&Ic)&&(Bc=Yt()+500,Vo()))}break;case 13:cu(function(){var t=Pa(e,1);if(null!==t){var n=Qc();tu(t,e,1,n)}}),qu(e,1)}},kn=function(e){if(13===e.tag){var t=Pa(e,134217728);if(null!==t)tu(t,e,134217728,Qc());qu(e,134217728)}},Sn=function(e){if(13===e.tag){var t=eu(e),n=Pa(e,t);if(null!==n)tu(n,e,t,Qc());qu(e,t)}},Cn=function(){return wn},En=function(e,t){var n=wn;try{return wn=e,t()}finally{wn=n}},_t=function(e,t,n){switch(t){case"input":if(Xe(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=_o(r);if(!i)throw Error(oe(90));Ke(r),Xe(r,i)}}}break;case"textarea":ot(e,n);break;case"select":null!=(t=n.value)&&nt(e,!!n.multiple,t,!1)}},Nt=lu,Ot=cu;var Qu={usingClientEntryPoint:!1,Events:[wo,xo,_o,Et,It,lu]},ed={findFiberByHostInstance:bo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},td={bundleType:ed.bundleType,version:ed.version,rendererPackageName:ed.rendererPackageName,rendererConfig:ed.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:we.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qt(e))?null:e.stateNode},findFiberByHostInstance:ed.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var nd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nd.isDisabled&&nd.supportsFiber)try{on=nd.inject(td),an=nd}catch(ut){}}Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qu,Q.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Zu(t))throw Error(oe(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:_e,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},Q.createRoot=function(e,t){if(!Zu(e))throw Error(oe(299));var n=!1,r="",i=Hu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=zu(e,1,!1,null,0,n,0,r,i),e[mo]=t.current,$i(8===e.nodeType?e.parentNode:e),new Ku(t)},Q.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(oe(188));throw e=Object.keys(e).join(","),Error(oe(268,e))}return e=null===(e=qt(t))?null:e.stateNode},Q.flushSync=function(e){return cu(e)},Q.hydrate=function(e,t,n){if(!Ju(t))throw Error(oe(200));return Xu(null,e,t,!0,n)},Q.hydrateRoot=function(e,t,n){if(!Zu(e))throw Error(oe(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=Hu;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=Bu(t,null,e,1,null!=n?n:null,i,0,o,a),e[mo]=t.current,$i(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Gu(t)},Q.render=function(e,t,n){if(!Ju(t))throw Error(oe(200));return Xu(null,e,t,!1,n)},Q.unmountComponentAtNode=function(e){if(!Ju(e))throw Error(oe(40));return!!e._reactRootContainer&&(cu(function(){Xu(null,null,e,!1,function(){e._reactRootContainer=null,e[mo]=null})}),!0)},Q.unstable_batchedUpdates=lu,Q.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ju(n))throw Error(oe(200));if(null==e||void 0===e._reactInternals)throw Error(oe(38));return Xu(e,t,n,!1,r)},Q.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){}}(),X.exports=Q;var rd=X.exports;Y.createRoot=rd.createRoot,Y.hydrateRoot=rd.hydrateRoot;
30
+ /**
31
+ * react-router v7.10.1
32
+ *
33
+ * Copyright (c) Remix Software Inc.
34
+ *
35
+ * This source code is licensed under the MIT license found in the
36
+ * LICENSE.md file in the root directory of this source tree.
37
+ *
38
+ * @license MIT
39
+ */
40
+ var id="popstate";function od(e={}){return function(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s="POP",l=null,c=u();null==c&&(c=0,a.replaceState({...a.state,idx:c},""));function u(){return(a.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:m.location,delta:t})}function p(e,t){s="PUSH";let n=cd(m.location,e,t);c=u()+1;let r=ld(n,c),d=m.createHref(n);try{a.pushState(r,"",d)}catch(gE){if(gE instanceof DOMException&&"DataCloneError"===gE.name)throw gE;i.location.assign(d)}o&&l&&l({action:s,location:m.location,delta:1})}function h(e,t){s="REPLACE";let n=cd(m.location,e,t);c=u();let r=ld(n,c),i=m.createHref(n);a.replaceState(r,"",i),o&&l&&l({action:s,location:m.location,delta:0})}function f(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href);ad(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:ud(e);r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r);return new URL(r,n)}(e)}let m={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(id,d),l=e,()=>{i.removeEventListener(id,d),l=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:p,replace:h,go:e=>a.go(e)};return m}(function(e,t){let{pathname:n,search:r,hash:i}=e.location;return cd("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:ud(t)},0,e)}function ad(e,t){if(!1===e||null==e)throw new Error(t)}function sd(e,t){if(!e)try{throw new Error(t)}catch(tf){}}function ld(e,t){return{usr:e.state,key:e.key,idx:t}}function cd(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?dd(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function ud({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function dd(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function pd(e,t,n="/"){return function(e,t,n,r){let i="string"==typeof t?dd(t):t,o=Ed(i.pathname||"/",n);if(null==o)return null;let a=hd(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let s=null;for(let l=0;null==s&&l<a.length;++l){let e=Cd(o);s=kd(a[l],e,r)}return s}(e,t,n,!1)}function hd(e,t=[],n=[],r="",i=!1){let o=(e,o,a=i,s)=>{let l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&a)return;ad(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length)}let c=Md([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(ad(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),hd(e.children,t,u,c,a)),(null!=e.path||e.index)&&t.push({path:c,score:_d(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{var n;if(""!==e.path&&(null==(n=e.path)?void 0:n.includes("?")))for(let r of fd(e.path))o(e,t,!0,r);else o(e,t)}),t}function fd(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=fd(r.join("/")),s=[];return s.push(...a.map(e=>""===e?o:[o,e].join("/"))),i&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var md=/^:[\w-]+$/,gd=3,vd=2,yd=1,bd=10,wd=-2,xd=e=>"*"===e;function _d(e,t){let n=e.split("/"),r=n.length;return n.some(xd)&&(r+=wd),t&&(r+=vd),n.filter(e=>!xd(e)).reduce((e,t)=>e+(md.test(t)?gd:""===t?yd:bd),r)}function kd(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===o?t:t.slice(o.length)||"/",u=Sd({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=Sd({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(i,u.params),a.push({params:i,pathname:Md([o,u.pathname]),pathnameBase:Ad(Md([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=Md([o,u.pathnameBase]))}return a}function Sd(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){sd("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const i=s[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:a,pattern:e}}function Cd(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(gE){return sd(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${gE}).`),e}}function Ed(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var Id=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Nd(e,t="/"){let n,{pathname:r,search:i="",hash:o=""}="string"==typeof e?dd(e):e;if(r)if(a=r,Id.test(a))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),sd(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${r}`)}n=r.startsWith("/")?Od(r.substring(1),"/"):Od(r,t)}else n=t;var a;return{pathname:n,search:Pd(i),hash:Ld(o)}}function Od(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function Td(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Rd(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function jd(e,t,n,r=!1){let i;"string"==typeof e?i=dd(e):(i={...e},ad(!i.pathname||!i.pathname.includes("?"),Td("?","pathname","search",i)),ad(!i.pathname||!i.pathname.includes("#"),Td("#","pathname","hash",i)),ad(!i.search||!i.search.includes("#"),Td("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=Nd(i,o),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var Md=e=>e.join("/").replace(/\/\/+/g,"/"),Ad=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Pd=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Ld=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function Dd(e){return e.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Fd=["POST","PUT","PATCH","DELETE"];new Set(Fd);var zd=["GET",...Fd];new Set(zd);var Ud=B.createContext(null);Ud.displayName="DataRouter";var Bd=B.createContext(null);Bd.displayName="DataRouterState",B.createContext(!1);var $d=B.createContext({isTransitioning:!1});$d.displayName="ViewTransition",B.createContext(new Map).displayName="Fetchers",B.createContext(null).displayName="Await";var Vd=B.createContext(null);Vd.displayName="Navigation";var Wd=B.createContext(null);Wd.displayName="Location";var qd=B.createContext({outlet:null,matches:[],isDataRoute:!1});qd.displayName="Route";var Hd=B.createContext(null);function Kd(){return null!=B.useContext(Wd)}function Gd(){return ad(Kd(),"useLocation() may be used only in the context of a <Router> component."),B.useContext(Wd).location}Hd.displayName="RouteError";var Zd="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jd(e){B.useContext(Vd).static||B.useLayoutEffect(e)}function Yd(){let{isDataRoute:e}=B.useContext(qd);return e?function(){let{router:e}=function(e){let t=B.useContext(Ud);return ad(t,ip(e)),t}("useNavigate"),t=op("useNavigate"),n=B.useRef(!1);return Jd(()=>{n.current=!0}),B.useCallback(async(r,i={})=>{sd(n.current,Zd),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}():function(){ad(Kd(),"useNavigate() may be used only in the context of a <Router> component.");let e=B.useContext(Ud),{basename:t,navigator:n}=B.useContext(Vd),{matches:r}=B.useContext(qd),{pathname:i}=Gd(),o=JSON.stringify(Rd(r)),a=B.useRef(!1);return Jd(()=>{a.current=!0}),B.useCallback((r,s={})=>{if(sd(a.current,Zd),!a.current)return;if("number"==typeof r)return void n.go(r);let l=jd(r,JSON.parse(o),i,"path"===s.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Md([t,l.pathname])),(s.replace?n.replace:n.push)(l,s.state,s)},[t,n,o,i,e])}()}function Xd(e,{relative:t}={}){let{matches:n}=B.useContext(qd),{pathname:r}=Gd(),i=JSON.stringify(Rd(n));return B.useMemo(()=>jd(e,JSON.parse(i),r,"path"===t),[e,i,r,t])}function Qd(e,t,n,r,i){var o;ad(Kd(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=B.useContext(Vd),{matches:s}=B.useContext(qd),l=s[s.length-1],c=l?l.params:{},u=l?l.pathname:"/",d=l?l.pathnameBase:"/",p=l&&l.route;{let e=p&&p.path||"";sp(u,!p||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h,f=Gd();if(t){let e="string"==typeof t?dd(t):t;ad("/"===d||(null==(o=e.pathname)?void 0:o.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${e.pathname}" was given in the \`location\` prop.`),h=e}else h=f;let m=h.pathname||"/",g=m;if("/"!==d){let e=d.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=pd(e,{pathname:g});sd(p||null!=v,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),sd(null==v||void 0!==v[v.length-1].route.element||void 0!==v[v.length-1].route.Component||void 0!==v[v.length-1].route.lazy,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=function(e,t=[],n=null,r=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let i=e,o=null==n?void 0:n.errors;if(null!=o){let e=i.findIndex(e=>e.route.id&&void 0!==(null==o?void 0:o[e.route.id]));ad(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,e+1))}let a=!1,s=-1;if(n)for(let c=0;c<i.length;c++){let e=i[c];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(s=c),e.route.id){let{loaderData:t,errors:r}=n,o=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!r||void 0===r[e.route.id]);if(e.route.lazy||o){a=!0,i=s>=0?i.slice(0,s+1):[i[0]];break}}}let l=n&&r?(e,t)=>{var i,o;r(e,{location:n.location,params:(null==(o=null==(i=n.matches)?void 0:i[0])?void 0:o.params)??{},unstable_pattern:Dd(n.matches),errorInfo:t})}:void 0;return i.reduceRight((e,r,c)=>{let u,d=!1,p=null,h=null;n&&(u=o&&r.route.id?o[r.route.id]:void 0,p=r.route.errorElement||tp,a&&(s<0&&0===c?(sp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,h=null):s===c&&(d=!0,h=r.route.hydrateFallbackElement||null)));let f=t.concat(i.slice(0,c+1)),m=()=>{let t;return t=u?p:d?h:r.route.Component?B.createElement(r.route.Component,null):r.route.element?r.route.element:e,B.createElement(rp,{match:r,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===c)?B.createElement(np,{location:n.location,revalidation:n.revalidation,component:p,error:u,children:m(),routeContext:{outlet:null,matches:f,isDataRoute:!0},onError:l}):m()},null)}(v&&v.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:Md([d,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:Md([d,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),s,n,r,i);return t&&y?B.createElement(Wd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},y):y}function ep(){let e=function(){var e;let t=B.useContext(Hd),n=function(e){let t=B.useContext(Bd);return ad(t,ip(e)),t}("useRouteError"),r=op("useRouteError");if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},a=null;return a=B.createElement(B.Fragment,null,B.createElement("p",null,"💿 Hey developer 👋"),B.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",B.createElement("code",{style:o},"ErrorBoundary")," or"," ",B.createElement("code",{style:o},"errorElement")," prop on your route.")),B.createElement(B.Fragment,null,B.createElement("h2",null,"Unexpected Application Error!"),B.createElement("h3",{style:{fontStyle:"italic"}},t),n?B.createElement("pre",{style:i},n):null,a)}B.createContext(null);var tp=B.createElement(ep,null),np=class extends B.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){return void 0!==this.state.error?B.createElement(qd.Provider,{value:this.props.routeContext},B.createElement(Hd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function rp({routeContext:e,match:t,children:n}){let r=B.useContext(Ud);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),B.createElement(qd.Provider,{value:e},n)}function ip(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function op(e){let t=function(e){let t=B.useContext(qd);return ad(t,ip(e)),t}(e),n=t.matches[t.matches.length-1];return ad(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var ap={};function sp(e,t,n){t||ap[e]||(ap[e]=!0,sd(!1,n))}function lp(e){ad(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function cp({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1,unstable_useTransitions:a}){ad(!Kd(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=B.useMemo(()=>({basename:s,navigator:i,static:o,unstable_useTransitions:a,future:{}}),[s,i,o,a]);"string"==typeof n&&(n=dd(n));let{pathname:c="/",search:u="",hash:d="",state:p=null,key:h="default"}=n,f=B.useMemo(()=>{let e=Ed(c,s);return null==e?null:{location:{pathname:e,search:u,hash:d,state:p,key:h},navigationType:r}},[s,c,u,d,p,h,r]);return sd(null!=f,`<Router basename="${s}"> is not able to match the URL "${c}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),null==f?null:B.createElement(Vd.Provider,{value:l},B.createElement(Wd.Provider,{children:t,value:f}))}function up({children:e,location:t}){return Qd(dp(e),t)}function dp(e,t=[]){let n=[];return B.Children.forEach(e,(e,r)=>{if(!B.isValidElement(e))return;let i=[...t,r];if(e.type===B.Fragment)return void n.push.apply(n,dp(e.props.children,i));ad(e.type===lp,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ad(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=dp(e.props.children,i)),n.push(o)}),n}B.memo(function({routes:e,future:t,state:n,unstable_onError:r}){return Qd(e,void 0,n,r,t)});var pp="get",hp="application/x-www-form-urlencoded";function fp(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function mp(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}var gp=null;var vp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yp(e){return null==e||vp.has(e)?e:(sd(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${hp}"`),null)}function bp(e,t){let n,r,i,o,a;if(fp(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?Ed(a,t):null,n=e.getAttribute("method")||pp,i=yp(e.getAttribute("enctype"))||hp,o=new FormData(e)}else if(function(e){return fp(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return fp(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?Ed(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||pp,i=yp(e.getAttribute("formenctype"))||yp(a.getAttribute("enctype"))||hp,o=new FormData(a,e),!function(){if(null===gp)try{new FormData(document.createElement("form"),0),gp=!1}catch(tf){gp=!0}return gp}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,r)}}else{if(fp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=pp,r=null,i=hp,a=e}var s;return o&&"text/plain"===i&&(a=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:a}}function wp(e,t){if(!1===e||null==e)throw new Error(t)}function xp(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function _p(e,t,n){return function(e,t){let n=new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(gE){return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(xp).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function kp(e,t,n,r,i,o){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>{var r;return n[t].pathname!==e.pathname||(null==(r=n[t].route.path)?void 0:r.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===o?t.filter((e,t)=>a(e,t)||s(e,t)):"data"===o?t.filter((t,o)=>{var l;let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null==(l=n[0])?void 0:l.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function Sp(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function Cp(){let e=B.useContext(Ud);return wp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ep=B.createContext(void 0);function Ip(){let e=B.useContext(Ep);return wp(e,"You must render this element inside a <HydratedRouter> element"),e}function Np(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Op({page:e,...t}){let{router:n}=Cp(),r=B.useMemo(()=>pd(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?B.createElement(Tp,{page:e,matches:r,...t}):null}function Tp({page:e,matches:t,...n}){let r=Gd(),{manifest:i,routeModules:o}=Ip(),{basename:a}=Cp(),{loaderData:s,matches:l}=function(){let e=B.useContext(Bd);return wp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),c=B.useMemo(()=>kp(e,t,l,i,r,"data"),[e,t,l,i,r]),u=B.useMemo(()=>kp(e,t,l,i,r,"assets"),[e,t,l,i,r]),d=B.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{var t;let r=i.routes[e.route.id];r&&r.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&(null==(t=o[e.route.id])?void 0:t.shouldRevalidate)||r.hasClientLoader?l=!0:n.add(e.route.id))}),0===n.size)return[];let u=function(e,t,n){let r="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===r.pathname?r.pathname=`_root.${n}`:t&&"/"===Ed(r.pathname,t)?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}(e,a,"data");return l&&n.size>0&&u.searchParams.set("_routes",t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[a,s,r,i,c,t,e,o]),p=B.useMemo(()=>Sp(u,i),[u,i]),h=function(e){let{manifest:t,routeModules:n}=Ip(),[r,i]=B.useState([]);return B.useEffect(()=>{let r=!1;return _p(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}(u);return B.createElement(B.Fragment,null,d.map(e=>B.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})),p.map(e=>B.createElement("link",{key:e,rel:"modulepreload",href:e,...n})),h.map(({key:e,link:t})=>B.createElement("link",{key:e,nonce:n.nonce,...t})))}function Rp(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}Ep.displayName="FrameworkContext";var jp="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{jp&&(window.__reactRouterVersion="7.10.1")}catch(tf){}function Mp({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=B.useRef();null==i.current&&(i.current=od({window:r,v5Compat:!0}));let o=i.current,[a,s]=B.useState({action:o.action,location:o.location}),l=B.useCallback(e=>{!1===n?s(e):B.startTransition(()=>s(e))},[n]);return B.useLayoutEffect(()=>o.listen(l),[o,l]),B.createElement(cp,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:o,unstable_useTransitions:!0===n})}var Ap=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pp=B.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:i,replace:o,state:a,target:s,to:l,preventScrollReset:c,viewTransition:u,...d},p){let h,{basename:f,unstable_useTransitions:m}=B.useContext(Vd),g="string"==typeof l&&Ap.test(l),v=!1;if("string"==typeof l&&g&&(h=l,jp))try{let e=new URL(window.location.href),t=l.startsWith("//")?new URL(e.protocol+l):new URL(l),n=Ed(t.pathname,f);t.origin===e.origin&&null!=n?l=n+t.search+t.hash:v=!0}catch(tf){sd(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let y=function(e,{relative:t}={}){ad(Kd(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=B.useContext(Vd),{hash:i,pathname:o,search:a}=Xd(e,{relative:t}),s=o;return"/"!==n&&(s="/"===o?n:Md([n,o])),r.createHref({pathname:s,search:a,hash:i})}(l,{relative:r}),[b,w,x]=function(e,t){let n=B.useContext(Ep),[r,i]=B.useState(!1),[o,a]=B.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:d}=t,p=B.useRef(null);B.useEffect(()=>{if("render"===e&&a(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{a(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),B.useEffect(()=>{if(r){let e=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(e)}}},[r]);let h=()=>{i(!0)},f=()=>{i(!1),a(!1)};return n?"intent"!==e?[o,p,{}]:[o,p,{onFocus:Np(s,h),onBlur:Np(l,f),onMouseEnter:Np(c,h),onMouseLeave:Np(u,f),onTouchStart:Np(d,h)}]:[!1,p,{}]}(n,d),_=function(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:a,unstable_useTransitions:s}={}){let l=Yd(),c=Gd(),u=Xd(e,{relative:o});return B.useCallback(d=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(d,t)){d.preventDefault();let t=void 0!==n?n:ud(c)===ud(u),p=()=>l(e,{replace:t,state:r,preventScrollReset:i,relative:o,viewTransition:a});s?B.startTransition(()=>p()):p()}},[c,l,u,n,r,t,e,i,o,a,s])}(l,{replace:o,state:a,target:s,preventScrollReset:c,relative:r,viewTransition:u,unstable_useTransitions:m});let k=B.createElement("a",{...d,...x,href:h||y,onClick:v||i?e:function(t){e&&e(t),t.defaultPrevented||_(t)},ref:Rp(p,w),target:s,"data-discover":g||"render"!==t?void 0:"true"});return b&&!g?B.createElement(B.Fragment,null,k,B.createElement(Op,{page:y})):k});function Lp(e){let t=B.useContext(Ud);return ad(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}function Dp(e){sd("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=B.useRef(mp(e)),n=B.useRef(!1),r=Gd(),i=B.useMemo(()=>function(e,t){let n=mp(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}(r.search,n.current?null:t.current),[r.search]),o=Yd(),a=B.useCallback((e,t)=>{const r=mp("function"==typeof e?e(new URLSearchParams(i)):e);n.current=!0,o("?"+r,t)},[o,i]);return[i,a]}Pp.displayName="Link",B.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:i,to:o,viewTransition:a,children:s,...l},c){let u=Xd(o,{relative:l.relative}),d=Gd(),p=B.useContext(Bd),{navigator:h,basename:f}=B.useContext(Vd),m=null!=p&&function(e,{relative:t}={}){let n=B.useContext($d);ad(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Lp("useViewTransitionState"),i=Xd(e,{relative:t});if(!n.isTransitioning)return!1;let o=Ed(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Ed(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=Sd(i.pathname,a)||null!=Sd(i.pathname,o)}(u)&&!0===a,g=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&f&&(y=Ed(y,f)||y);const b="/"!==g&&g.endsWith("/")?g.length-1:g.length;let w,x=v===g||!r&&v.startsWith(g)&&"/"===v.charAt(b),_=null!=y&&(y===g||!r&&y.startsWith(g)&&"/"===y.charAt(g.length)),k={isActive:x,isPending:_,isTransitioning:m},S=x?e:void 0;w="function"==typeof n?n(k):[n,x?"active":null,_?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof i?i(k):i;return B.createElement(Pp,{...l,"aria-current":S,className:w,ref:c,style:C,to:o,viewTransition:a},"function"==typeof s?s(k):s)}).displayName="NavLink",B.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:a=pp,action:s,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:d,...p},h)=>{let{unstable_useTransitions:f}=B.useContext(Vd),m=function(){let{router:e}=Lp("useSubmit"),{basename:t}=B.useContext(Vd),n=op("useRouteId"),r=e.fetch,i=e.navigate;return B.useCallback(async(e,o={})=>{let{action:a,method:s,encType:l,formData:c,body:u}=bp(e,t);if(!1===o.navigate){let e=o.fetcherKey||zp();await r(e,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:c,body:u,formMethod:o.method||s,formEncType:o.encType||l,flushSync:o.flushSync})}else await i(o.action||a,{preventScrollReset:o.preventScrollReset,formData:c,body:u,formMethod:o.method||s,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,t,n])}(),g=function(e,{relative:t}={}){let{basename:n}=B.useContext(Vd),r=B.useContext(qd);ad(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...Xd(e||".",{relative:t})},a=Gd();if(null==e){o.search=a.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();o.search=n?`?${n}`:""}}e&&"."!==e||!i.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(o.pathname="/"===o.pathname?n:Md([n,o.pathname]));return ud(o)}(s,{relative:c}),v="get"===a.toLowerCase()?"get":"post",y="string"==typeof s&&Ap.test(s);return B.createElement("form",{ref:h,method:v,action:g,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=(null==r?void 0:r.getAttribute("formmethod"))||a,p=()=>m(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:o,relative:c,preventScrollReset:u,viewTransition:d});f&&!1!==n?B.startTransition(()=>p()):p()},...p,"data-discover":y||"render"!==e?void 0:"true"})}).displayName="Form";var Fp=0,zp=()=>`__${String(++Fp)}__`;var Up=function(e,t){return(Up=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)};var Bp=function(){return Bp=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},Bp.apply(this,arguments)};function $p(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function Vp(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(tf){o(tf)}}function s(e){try{l(r.throw(e))}catch(tf){o(tf)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function Wp(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(tf){s=[6,tf],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function qp(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}"function"==typeof SuppressedError&&SuppressedError,"function"==typeof SuppressedError&&SuppressedError;var Hp="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Kp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gp(e,t){return e(t={exports:{}},t.exports),t.exports}var Zp=Gp(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,n){var r=e.locked.get(t);void 0===r?void 0===n?e.locked.set(t,[]):e.locked.set(t,[n]):void 0!==n&&(r.unshift(n),e.locked.set(t,r))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise(function(n,r){e.isLocked(t)?e.addToLocked(t,n):(e.addToLocked(t),n())})},this.unlock=function(t){var n=e.locked.get(t);if(void 0!==n&&0!==n.length){var r=n.pop();e.locked.set(t,n),void 0!==r&&setTimeout(r,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();t.default=function(){return n.getInstance()}});Kp(Zp);var Jp=Kp(Gp(function(e,t){var n=Hp&&Hp.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}l((r=r.apply(e,t||[])).next())})},r=Hp&&Hp.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},i=Hp;Object.defineProperty(t,"__esModule",{value:!0});var o="browser-tabs-lock-key",a={key:function(e){return n(i,void 0,void 0,function(){return r(this,function(e){throw new Error("Unsupported")})})},getItem:function(e){return n(i,void 0,void 0,function(){return r(this,function(e){throw new Error("Unsupported")})})},clear:function(){return n(i,void 0,void 0,function(){return r(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return n(i,void 0,void 0,function(){return r(this,function(e){throw new Error("Unsupported")})})},setItem:function(e,t){return n(i,void 0,void 0,function(){return r(this,function(e){throw new Error("Unsupported")})})},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function s(e){return new Promise(function(t){return setTimeout(t,e)})}function l(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",r=0;r<e;r++)n+=t[Math.floor(61*Math.random())];return n}var c=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+l(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,i){return void 0===i&&(i=5e3),n(this,void 0,void 0,function(){var n,c,u,d,p,h,f;return r(this,function(r){switch(r.label){case 0:n=Date.now()+l(4),c=Date.now()+i,u=o+"-"+t,d=void 0===this.storageHandler?a:this.storageHandler,r.label=1;case 1:return Date.now()<c?[4,s(30)]:[3,8];case 2:return r.sent(),null!==d.getItemSync(u)?[3,5]:(p=this.id+"-"+t+"-"+n,[4,s(Math.floor(25*Math.random()))]);case 3:return r.sent(),d.setItemSync(u,JSON.stringify({id:this.id,iat:n,timeoutKey:p,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return r.sent(),null!==(h=d.getItemSync(u))&&(f=JSON.parse(h)).id===this.id&&f.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(u,n),[2,!0]):[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?a:this.storageHandler),[4,this.waitForSomethingToChange(c)];case 6:r.sent(),r.label=7;case 7:return n=Date.now()+l(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return n(this,void 0,void 0,function(){var i=this;return r(this,function(o){return setTimeout(function(){return n(i,void 0,void 0,function(){var n,i,o;return r(this,function(r){switch(r.label){case 0:return[4,Zp.default().lock(t)];case 1:return r.sent(),this.acquiredIatSet.has(t)?(n=void 0===this.storageHandler?a:this.storageHandler,null===(i=n.getItemSync(e))?(Zp.default().unlock(t),[2]):((o=JSON.parse(i)).timeRefreshed=Date.now(),n.setItemSync(e,JSON.stringify(o)),Zp.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(Zp.default().unlock(t),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return n(this,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,new Promise(function(n){var r=!1,i=Date.now(),o=!1;function a(){if(o||(window.removeEventListener("storage",a),e.removeFromWaiting(a),clearTimeout(s),o=!0),!r){r=!0;var t=50-(Date.now()-i);t>0?setTimeout(n,t):n(null)}}window.addEventListener("storage",a),e.addToWaiting(a);var s=setTimeout(a,Math.max(0,t-Date.now()))})];case 1:return n.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter(function(e){return e!==t}))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach(function(e){return e()})},e.prototype.releaseLock=function(e){return n(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}})})},e.prototype.releaseLock__private__=function(t){return n(this,void 0,void 0,function(){var n,i,s,l;return r(this,function(r){switch(r.label){case 0:return n=void 0===this.storageHandler?a:this.storageHandler,i=o+"-"+t,null===(s=n.getItemSync(i))?[2]:(l=JSON.parse(s)).id!==this.id?[3,2]:[4,Zp.default().lock(l.iat)];case 1:r.sent(),this.acquiredIatSet.delete(l.iat),n.removeItemSync(i),Zp.default().unlock(l.iat),e.notifyWaiters(),r.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var n=Date.now()-5e3,r=t,i=[],a=0;;){var s=r.keySync(a);if(null===s)break;i.push(s),a++}for(var l=!1,c=0;c<i.length;c++){var u=i[c];if(u.includes(o)){var d=r.getItemSync(u);if(null!==d){var p=JSON.parse(d);(void 0===p.timeRefreshed&&p.timeAcquired<n||void 0!==p.timeRefreshed&&p.timeRefreshed<n)&&(r.removeItemSync(u),l=!0)}}}l&&e.notifyWaiters()},e.waiters=void 0,e}();t.default=c}));const Yp={timeoutInSeconds:60},Xp={name:"auth0-spa-js",version:"2.11.0"},Qp=()=>Date.now();class eh extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,eh.prototype)}static fromPayload({error:e,error_description:t}){return new eh(e,t)}}class th extends eh{constructor(e,t,n,r=null){super(e,t),this.state=n,this.appState=r,Object.setPrototypeOf(this,th.prototype)}}let nh=class e extends eh{constructor(t,n,r,i,o=null){super(t,n),this.connection=r,this.state=i,this.appState=o,Object.setPrototypeOf(this,e.prototype)}},rh=class e extends eh{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,e.prototype)}};class ih extends rh{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,ih.prototype)}}class oh extends eh{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,oh.prototype)}}class ah extends eh{constructor(){super("popup_open","Unable to open a popup for loginWithPopup - window.open returned `null`"),Object.setPrototypeOf(this,ah.prototype)}}class sh extends eh{constructor(e,t,n){super(e,t),this.mfa_token=n,Object.setPrototypeOf(this,sh.prototype)}}class lh extends eh{constructor(e,t){super("missing_refresh_token",`Missing Refresh Token (audience: '${dh(e,["default"])}', scope: '${dh(t)}')`),this.audience=e,this.scope=t,Object.setPrototypeOf(this,lh.prototype)}}class ch extends eh{constructor(e,t){super("missing_scopes",`Missing requested scopes after refresh (audience: '${dh(e,["default"])}', missing scope: '${dh(t)}')`),this.audience=e,this.scope=t,Object.setPrototypeOf(this,ch.prototype)}}class uh extends eh{constructor(e){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=e,Object.setPrototypeOf(this,uh.prototype)}}function dh(e,t=[]){return e&&!t.includes(e)?e:""}const ph=()=>window.crypto,hh=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(ph().getRandomValues(new Uint8Array(43))).forEach(n=>t+=e[n%66]),t},fh=e=>btoa(e),mh=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],gh=e=>{var t,{clientId:n}=e,r=qp(e,["clientId"]);return new URLSearchParams((t=Object.assign({client_id:n},r),Object.keys(t).filter(e=>void 0!==t[e]).reduce((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]}),{}))).toString()},vh=async e=>{const t=ph().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t},yh=e=>{return t=e.replace(/_/g,"/").replace(/-/g,"+"),decodeURIComponent(atob(t).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join(""));var t},bh=e=>{const t=new Uint8Array(e);return(e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,e=>t[e])})(window.btoa(String.fromCharCode(...Array.from(t))))},wh=new TextEncoder,xh=new TextDecoder;function _h(e){return"string"==typeof e?wh.encode(e):xh.decode(e)}function kh(e){if("number"!=typeof e.modulusLength||e.modulusLength<2048)throw new Ih(`${e.name} modulusLength must be at least 2048 bits`)}let Sh;if(Uint8Array.prototype.toBase64)Sh=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;Sh=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const n=[];for(let r=0;r<t.byteLength;r+=e)n.push(String.fromCharCode.apply(null,t.subarray(r,r+e)));return btoa(n.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}function Ch(e){return Sh(e)}class Eh extends Error{constructor(e){var t;super(null!=e?e:"operation not supported"),this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}}class Ih extends Error{constructor(e){var t;super(e),this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}}function Nh(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){if("SHA-256"===e.algorithm.hash.name)return"PS256";throw new Eh("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"RSASSA-PKCS1-v1_5":return function(e){if("SHA-256"===e.algorithm.hash.name)return"RS256";throw new Eh("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"ECDSA":return function(e){if("P-256"===e.algorithm.namedCurve)return"ES256";throw new Eh("unsupported EcKeyAlgorithm namedCurve")}(e);case"Ed25519":return"Ed25519";default:throw new Eh("unsupported CryptoKey algorithm name")}}function Oh(e){return e instanceof CryptoKey}function Th(e){return Oh(e)&&"public"===e.type}async function Rh(e,t,n,r,i,o){const a=null==e?void 0:e.privateKey,s=null==e?void 0:e.publicKey;if(!Oh(l=a)||"private"!==l.type)throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var l;if(!Th(s))throw new TypeError('"keypair.publicKey" must be a public CryptoKey');if(!0!==s.extractable)throw new TypeError('"keypair.publicKey.extractable" must be true');if("string"!=typeof t)throw new TypeError('"htu" must be a string');if("string"!=typeof n)throw new TypeError('"htm" must be a string');if(void 0!==r&&"string"!=typeof r)throw new TypeError('"nonce" must be a string or undefined');if(void 0!==i&&"string"!=typeof i)throw new TypeError('"accessToken" must be a string or undefined');return async function(e,t,n){if(!1===n.usages.includes("sign"))throw new TypeError('private CryptoKey instances used for signing assertions must include "sign" in their "usages"');const r=`${Ch(_h(JSON.stringify(e)))}.${Ch(_h(JSON.stringify(t)))}`;return`${r}.${Ch(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return kh(e.algorithm),{name:e.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return kh(e.algorithm),{name:e.algorithm.name};case"Ed25519":return{name:e.algorithm.name}}throw new Eh}(n),n,_h(r)))}`}({alg:Nh(a),typ:"dpop+jwt",jwk:await jh(s)},Object.assign(Object.assign({},o),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:n,nonce:r,htu:t,ath:i?Ch(await crypto.subtle.digest("SHA-256",_h(i))):void 0}),a)}async function jh(e){const{kty:t,e:n,n:r,x:i,y:o,crv:a}=await crypto.subtle.exportKey("jwk",e);return{kty:t,crv:a,e:n,n:r,x:i,y:o}}const Mh=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:token-exchange"];const Ah=async(e,t)=>{const n=await fetch(e,t);return{ok:n.ok,json:await n.json(),headers:(r=n.headers,[...r].reduce((e,[t,n])=>(e[t]=n,e),{}))};var r},Ph=async(e,t,n,r,i,o,a=1e4,s)=>i?(async(e,t,n,r,i,o,a,s)=>{return l={auth:{audience:t,scope:n},timeout:i,fetchUrl:e,fetchOptions:r,useFormData:a,useMrrt:s},c=o,new Promise(function(e,t){const n=new MessageChannel;n.port1.onmessage=function(r){r.data.error?t(new Error(r.data.error)):e(r.data),n.port1.close()},c.postMessage(l,[n.port2])});var l,c})(e,t,n,r,a,i,o,s):(async(e,t,n)=>{const r=new AbortController;let i;return t.signal=r.signal,Promise.race([Ah(e,t),new Promise((e,t)=>{i=setTimeout(()=>{r.abort(),t(new Error("Timeout when executing 'fetch'"))},n)})]).finally(()=>{clearTimeout(i)})})(e,r,a);async function Lh(e,t,n,r,i,o,a,s,l,c){if(l){const t=await l.generateProof({url:e,method:i.method||"GET",nonce:await l.getNonce()});i.headers=Object.assign(Object.assign({},i.headers),{dpop:t})}let u,d=null;for(let w=0;w<3;w++)try{u=await Ph(e,n,r,i,o,a,t,s),d=null;break}catch(b){d=b}if(d)throw d;const p=u.json,{error:h,error_description:f}=p,m=qp(p,["error","error_description"]),{headers:g,ok:v}=u;let y;if(l&&(y=g["dpop-nonce"],y&&await l.setNonce(y)),!v){const u=f||`HTTP error. Unable to fetch ${e}`;if("mfa_required"===h)throw new sh(h,u,m.mfa_token);if("missing_refresh_token"===h)throw new lh(n,r);if("use_dpop_nonce"===h){if(!l||!y||c)throw new uh(y);return Lh(e,t,n,r,i,o,a,s,l,!0)}throw new eh(h||"request_error",u)}return m}async function Dh(e,t){var{baseUrl:n,timeout:r,audience:i,scope:o,auth0Client:a,useFormData:s,useMrrt:l,dpop:c}=e,u=qp(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const d="urn:ietf:params:oauth:grant-type:token-exchange"===u.grant_type,p="refresh_token"===u.grant_type&&l,h=Object.assign(Object.assign(Object.assign(Object.assign({},u),d&&i&&{audience:i}),d&&o&&{scope:o}),p&&{audience:i,scope:o}),f=s?gh(h):JSON.stringify(h),m=(g=u.grant_type,Mh.includes(g));var g,v;return await Lh(`${n}/oauth/token`,r,i||"default",o,{method:"POST",body:f,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify((v=a||Xp,Object.keys(v).reduce((e,t)=>{const n=mh.find(e=>e.key===t);return n&&n.type.includes(typeof v[t])&&(e[t]=v[t]),e},{}))))}},t,s,l,m?c:void 0)}const Fh=(...e)=>{return(t=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(t))).join(" ");var t},zh=(e,t,n)=>{let r;return n&&(r=e[n]),r||(r=e.default),Fh(r,t)};class Uh{constructor(e,t="@@auth0spajs@@",n){this.prefix=t,this.suffix=n,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[t,n,r,i]=e.split("::");return new Uh({clientId:n,scope:i,audience:r},t)}static fromCacheEntry(e){const{scope:t,audience:n,client_id:r}=e;return new Uh({scope:t,audience:n,clientId:r})}}class Bh{set(e,t){localStorage.setItem(e,JSON.stringify(t))}get(e){const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(n){return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter(e=>e.startsWith("@@auth0spajs@@"))}}let $h=class{constructor(){this.enclosedCache=function(){let e={};return{set(t,n){e[t]=n},get(t){const n=e[t];if(n)return n},remove(t){delete e[t]},allKeys:()=>Object.keys(e)}}()}};class Vh{constructor(e,t,n){this.cache=e,this.keyManifest=t,this.nowProvider=n||Qp}async setIdToken(e,t,n){var r;const i=this.getIdTokenCacheKey(e);await this.cache.set(i,{id_token:t,decodedToken:n}),await(null===(r=this.keyManifest)||void 0===r?void 0:r.add(i))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const t=await this.get(e);if(!t)return;if(!t.id_token||!t.decodedToken)return;return{id_token:t.id_token,decodedToken:t.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e,t=0,n=!1,r){var i;let o=await this.cache.get(e.toKey());if(!o){const t=await this.getCacheKeys();if(!t)return;const i=this.matchExistingCacheKey(e,t);if(i&&(o=await this.cache.get(i)),!i&&n&&"cache-only"!==r)return this.getEntryWithRefreshToken(e,t)}if(!o)return;const a=await this.nowProvider(),s=Math.floor(a/1e3);return o.expiresAt-t<s?o.body.refresh_token?this.modifiedCachedEntry(o,e):(await this.cache.remove(e.toKey()),void(await(null===(i=this.keyManifest)||void 0===i?void 0:i.remove(e.toKey())))):o.body}async modifiedCachedEntry(e,t){return e.body={refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope},await this.cache.set(t.toKey(),e),{refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope}}async set(e){var t;const n=new Uh({clientId:e.client_id,scope:e.scope,audience:e.audience}),r=await this.wrapCacheEntry(e);await this.cache.set(n.toKey(),r),await(null===(t=this.keyManifest)||void 0===t?void 0:t.add(n.toKey()))}async remove(e,t,n){const r=new Uh({clientId:e,scope:n,audience:t});await this.cache.remove(r.toKey())}async clear(e){var t;const n=await this.getCacheKeys();n&&(await n.filter(t=>!e||t.includes(e)).reduce(async(e,t)=>{await e,await this.cache.remove(t)},Promise.resolve()),await(null===(t=this.keyManifest)||void 0===t?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?null===(e=await this.keyManifest.get())||void 0===e?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new Uh({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(e,t){return t.filter(t=>{var n;const r=Uh.fromKey(t),i=new Set(r.scope&&r.scope.split(" ")),o=(null===(n=e.scope)||void 0===n?void 0:n.split(" "))||[],a=r.scope&&o.reduce((e,t)=>e&&i.has(t),!0);return"@@auth0spajs@@"===r.prefix&&r.clientId===e.clientId&&r.audience===e.audience&&a})[0]}async getEntryWithRefreshToken(e,t){var n;for(const r of t){const t=Uh.fromKey(r);if("@@auth0spajs@@"===t.prefix&&t.clientId===e.clientId){const t=await this.cache.get(r);if(null===(n=null==t?void 0:t.body)||void 0===n?void 0:n.refresh_token)return this.modifiedCachedEntry(t,e)}}}async updateEntry(e,t){var n;const r=await this.getCacheKeys();if(r)for(const i of r){const r=await this.cache.get(i);if((null===(n=null==r?void 0:r.body)||void 0===n?void 0:n.refresh_token)===e){const e=Object.assign(Object.assign({},r.body),{refresh_token:t});await this.set(e)}}}}let Wh=class{constructor(e,t,n){this.storage=e,this.clientId=t,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const qh=e=>"number"==typeof e,Hh=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"];var Kh=Gp(function(e,t){var n=Hp&&Hp.__assign||function(){return n=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},n.apply(this,arguments)};function r(e,t){if(!t)return"";var n="; "+e;return!0===t?n:n+"="+t}function i(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return r("Expires",e.expires?e.expires.toUTCString():"")+r("Domain",e.domain)+r("Path",e.path)+r("Secure",e.secure)+r("SameSite",e.sameSite)}(n)}function o(e){for(var t={},n=e?e.split("; "):[],r=/(%[\dA-F]{2})+/gi,i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");'"'===a.charAt(0)&&(a=a.slice(1,-1));try{t[o[0].replace(r,decodeURIComponent)]=a.replace(r,decodeURIComponent)}catch(s){}}return t}function a(){return o(document.cookie)}function s(e,t,r){document.cookie=i(e,t,n({path:"/"},r))}t.__esModule=!0,t.encode=i,t.parse=o,t.getAll=a,t.get=function(e){return a()[e]},t.set=s,t.remove=function(e,t){s(e,"",n(n({},t),{expires:-1}))}});Kp(Kh),Kh.encode,Kh.parse,Kh.getAll;var Gh=Kh.get,Zh=Kh.set,Jh=Kh.remove;const Yh={get(e){const t=Gh(e);if(void 0!==t)return JSON.parse(t)},save(e,t,n){let r={};"https:"===window.location.protocol&&(r={secure:!0,sameSite:"none"}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),Zh(e,JSON.stringify(t),r)},remove(e,t){let n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),Jh(e,n)}},Xh={get:e=>Yh.get(e)||Yh.get(`_legacy_${e}`),save(e,t,n){let r={};"https:"===window.location.protocol&&(r={secure:!0}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),Zh(`_legacy_${e}`,JSON.stringify(t),r),Yh.save(e,t,n)},remove(e,t){let n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),Jh(e,n),Yh.remove(e,t),Yh.remove(`_legacy_${e}`,t)}},Qh={get(e){if("undefined"==typeof sessionStorage)return;const t=sessionStorage.getItem(e);return null!=t?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};var ef,tf;(tf=ef||(ef={})).Code="code",tf.ConnectCode="connect_code";var nf,rf=function(e){return nf=nf||function(e,t,n){var r=void 0===t?null:t,i=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),i=0,o=n.length;i<o;++i)r[i]=n.charCodeAt(i);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),o=i.indexOf("\n",10)+1,a=i.substring(o)+(r?"//# sourceMappingURL="+r:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YSx1c2VNcnJ0OmZ9LHBvcnRzOltwXX0pPT57bGV0IGgsdSxsPXt9O2NvbnN0e2F1ZGllbmNlOmQsc2NvcGU6eX09cnx8e307dHJ5e2NvbnN0IHI9YT8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShjLmJvZHkpOkpTT04ucGFyc2UoYy5ib2R5KTtpZighci5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1yLmdyYW50X3R5cGUpe2lmKHU9KChlLHQpPT5vW24oZSx0KV0pKGQseSksIXUmJmYpe2NvbnN0IGU9by5sYXRlc3RfcmVmcmVzaF90b2tlbix0PSgoZSx0KT0+e2NvbnN0IHI9T2JqZWN0LmtleXMobykuZmluZCgocj0+e2lmKCJsYXRlc3RfcmVmcmVzaF90b2tlbiIhPT1yKXtjb25zdCBzPSgoZSx0KT0+dC5zdGFydHNXaXRoKGAke2V9fGApKSh0LHIpLG89ci5zcGxpdCgifCIpWzFdLnNwbGl0KCIgIiksbj1lLnNwbGl0KCIgIikuZXZlcnkoKGU9Pm8uaW5jbHVkZXMoZSkpKTtyZXR1cm4gcyYmbn19KSk7cmV0dXJuISFyfSkoeSxkKTtlJiYhdCYmKHU9ZSl9aWYoIXUpdGhyb3cgbmV3IHQoZCx5KTtjLmJvZHk9YT9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjp1fSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjp1fSkpfWxldCBqLGs7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGo9bmV3IEFib3J0Q29udHJvbGxlcixjLnNpZ25hbD1qLnNpZ25hbCk7dHJ5e2s9YXdhaXQgUHJvbWlzZS5yYWNlKFsoXz1lLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsXykpKSksZmV0Y2goaSxPYmplY3QuYXNzaWduKHt9LGMpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIHAucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFrKXJldHVybiBqJiZqLmFib3J0KCksdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO2c9ay5oZWFkZXJzLGw9Wy4uLmddLnJlZHVjZSgoKGUsW3Qscl0pPT4oZVt0XT1yLGUpKSx7fSksaD1hd2FpdCBrLmpzb24oKSxoLnJlZnJlc2hfdG9rZW4/KGYmJihvLmxhdGVzdF9yZWZyZXNoX3Rva2VuPWgucmVmcmVzaF90b2tlbixPPXUsYj1oLnJlZnJlc2hfdG9rZW4sT2JqZWN0LmVudHJpZXMobykuZm9yRWFjaCgoKFtlLHRdKT0+e3Q9PT1PJiYob1tlXT1iKX0pKSksKChlLHQscik9PntvW24odCxyKV09ZX0pKGgucmVmcmVzaF90b2tlbixkLHkpLGRlbGV0ZSBoLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KShkLHkpLHAucG9zdE1lc3NhZ2Uoe29rOmsub2ssanNvbjpoLGhlYWRlcnM6bH0pfWNhdGNoKGUpe3AucG9zdE1lc3NhZ2Uoe29rOiExLGpzb246e2Vycm9yOmUuZXJyb3IsZXJyb3JfZGVzY3JpcHRpb246ZS5tZXNzYWdlfSxoZWFkZXJzOmx9KX12YXIgTyxiLGcsX30pKX0oKTsKCg==",null,false),new Worker(nf,e)};const of={};class af{constructor(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(e){var t;const n=new Set((null===(t=await this.cache.get(this.manifestKey))||void 0===t?void 0:t.keys)||[]);n.add(e),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(e){const t=await this.cache.get(this.manifestKey);if(t){const n=new Set(t.keys);return n.delete(e),n.size>0?await this.cache.set(this.manifestKey,{keys:[...n]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(e){return`@@auth0spajs@@::${e}`}}const sf={memory:()=>(new $h).enclosedCache,localstorage:()=>new Bh},lf=e=>sf[e],cf=e=>{const{openUrl:t,onRedirect:n}=e,r=qp(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},r),{openUrl:!1===t||t?t:n})},uf=(e,t)=>{const n=(null==t?void 0:t.split(" "))||[];return((null==e?void 0:e.split(" "))||[]).every(e=>n.includes(e))},df={NONCE:"nonce",KEYPAIR:"keypair"};class pf{constructor(e){this.clientId=e}getVersion(){return 1}createDbHandle(){const e=window.indexedDB.open("auth0-spa-js",this.getVersion());return new Promise((t,n)=>{e.onupgradeneeded=()=>Object.values(df).forEach(t=>e.result.createObjectStore(t)),e.onerror=()=>n(e.error),e.onsuccess=()=>t(e.result)})}async getDbHandle(){return this.dbHandle||(this.dbHandle=await this.createDbHandle()),this.dbHandle}async executeDbRequest(e,t,n){const r=n((await this.getDbHandle()).transaction(e,t).objectStore(e));return new Promise((e,t)=>{r.onsuccess=()=>e(r.result),r.onerror=()=>t(r.error)})}buildKey(e){const t=e?`_${e}`:"auth0";return`${this.clientId}::${t}`}setNonce(e,t){return this.save(df.NONCE,this.buildKey(t),e)}setKeyPair(e){return this.save(df.KEYPAIR,this.buildKey(),e)}async save(e,t,n){await this.executeDbRequest(e,"readwrite",e=>e.put(n,t))}findNonce(e){return this.find(df.NONCE,this.buildKey(e))}findKeyPair(){return this.find(df.KEYPAIR,this.buildKey())}find(e,t){return this.executeDbRequest(e,"readonly",e=>e.get(t))}async deleteBy(e,t){const n=await this.executeDbRequest(e,"readonly",e=>e.getAllKeys());null==n||n.filter(t).map(t=>this.executeDbRequest(e,"readwrite",e=>e.delete(t)))}deleteByClientId(e,t){return this.deleteBy(e,e=>"string"==typeof e&&e.startsWith(`${t}::`))}clearNonces(){return this.deleteByClientId(df.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(df.KEYPAIR,this.clientId)}}let hf=class{constructor(e){this.storage=new pf(e)}getNonce(e){return this.storage.findNonce(e)}setNonce(e,t){return this.storage.setNonce(e,t)}async getOrGenerateKeyPair(){let e=await this.storage.findKeyPair();return e||(e=await async function(e,t){var n;let r;return r={name:"ECDSA",namedCurve:"P-256"},crypto.subtle.generateKey(r,null!==(n=null==t?void 0:t.extractable)&&void 0!==n&&n,["sign","verify"])}(0,{extractable:!1}),await this.storage.setKeyPair(e)),e}async generateProof(e){const t=await this.getOrGenerateKeyPair();return function({keyPair:e,url:t,method:n,nonce:r,accessToken:i}){return Rh(e,function(e){const t=new URL(e);return t.search="",t.hash="",t.href}(t),n,r,i)}(Object.assign({keyPair:t},e))}async calculateThumbprint(){return function(e){return async function(e){if(!Th(e))throw new TypeError('"publicKey" must be a public CryptoKey');if(!0!==e.extractable)throw new TypeError('"publicKey.extractable" must be true');const t=await jh(e);let n;switch(t.kty){case"EC":n={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case"OKP":n={crv:t.crv,kty:t.kty,x:t.x};break;case"RSA":n={e:t.e,kty:t.kty,n:t.n};break;default:throw new Eh("unsupported JWK kty")}return Ch(await crypto.subtle.digest({name:"SHA-256"},_h(JSON.stringify(n))))}(e.publicKey)}(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}};var ff;!function(e){e.Bearer="Bearer",e.DPoP="DPoP"}(ff||(ff={}));class mf{constructor(e,t){this.hooks=t,this.config=Object.assign(Object.assign({},e),{fetch:e.fetch||("undefined"==typeof window?fetch:window.fetch.bind(window))})}isAbsoluteUrl(e){return/^(https?:)?\/\//i.test(e)}buildUrl(e,t){if(t){if(this.isAbsoluteUrl(t))return t;if(e)return`${e.replace(/\/?\/$/,"")}/${t.replace(/^\/+/,"")}`}throw new TypeError("`url` must be absolute or `baseUrl` non-empty.")}getAccessToken(e){return this.config.getAccessToken?this.config.getAccessToken(e):this.hooks.getAccessToken(e)}extractUrl(e){return"string"==typeof e?e:e instanceof URL?e.href:e.url}buildBaseRequest(e,t){if(!this.config.baseUrl)return new Request(e,t);const n=this.buildUrl(this.config.baseUrl,this.extractUrl(e)),r=e instanceof Request?new Request(n,e):n;return new Request(r,t)}setAuthorizationHeader(e,t,n=ff.Bearer){e.headers.set("authorization",`${n} ${t}`)}async setDpopProofHeader(e,t){if(!this.config.dpopNonceId)return;const n=await this.hooks.getDpopNonce(),r=await this.hooks.generateDpopProof({accessToken:t,method:e.method,nonce:n,url:e.url});e.headers.set("dpop",r)}async prepareRequest(e,t){const n=await this.getAccessToken(t);let r,i;"string"==typeof n?(r=this.config.dpopNonceId?ff.DPoP:ff.Bearer,i=n):(r=n.token_type,i=n.access_token),this.setAuthorizationHeader(e,i,r),r===ff.DPoP&&await this.setDpopProofHeader(e,i)}getHeader(e,t){return Array.isArray(e)?new Headers(e).get(t)||"":"function"==typeof e.get?e.get(t)||"":e[t]||""}hasUseDpopNonceError(e){if(401!==e.status)return!1;const t=this.getHeader(e.headers,"www-authenticate");return t.includes("invalid_dpop_nonce")||t.includes("use_dpop_nonce")}async handleResponse(e,t){const n=this.getHeader(e.headers,"dpop-nonce");if(n&&await this.hooks.setDpopNonce(n),!this.hasUseDpopNonceError(e))return e;if(!n||!t.onUseDpopNonceError)throw new uh(n);return t.onUseDpopNonceError()}async internalFetchWithAuth(e,t,n,r){const i=this.buildBaseRequest(e,t);await this.prepareRequest(i,r);const o=await this.config.fetch(i);return this.handleResponse(o,n)}fetchWithAuth(e,t,n){const r={onUseDpopNonceError:()=>this.internalFetchWithAuth(e,t,Object.assign(Object.assign({},r),{onUseDpopNonceError:void 0}),n)};return this.internalFetchWithAuth(e,t,r,n)}}let gf=class{constructor(e,t){this.myAccountFetcher=e,this.apiBase=t}async connectAccount(e){const t=await this.myAccountFetcher.fetchWithAuth(`${this.apiBase}v1/connected-accounts/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(t)}async completeAccount(e){const t=await this.myAccountFetcher.fetchWithAuth(`${this.apiBase}v1/connected-accounts/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(t)}async _handleResponse(e){let t;try{t=await e.text(),t=JSON.parse(t)}catch(n){throw new vf({type:"invalid_json",status:e.status,title:"Invalid JSON response",detail:t||String(n)})}if(e.ok)return t;throw new vf(t)}};class vf extends Error{constructor({type:e,status:t,title:n,detail:r,validation_errors:i}){super(r),this.name="MyAccountApiError",this.type=e,this.status=t,this.title=n,this.detail=r,this.validation_errors=i,Object.setPrototypeOf(this,vf.prototype)}}const yf=new Jp;class bf{constructor(e){let t,n;if(this.userCache=(new $h).enclosedCache,this.activeLockKeys=new Set,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{const e=Array.from(this.activeLockKeys);for(const t of e)await yf.releaseLock(t);this.activeLockKeys.clear(),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),"undefined"!=typeof window&&(()=>{if(!ph())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===ph().subtle)throw new Error("\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n ")})(),e.cache&&e.cacheLocation,e.cache)n=e.cache;else{if(t=e.cacheLocation||"memory",!lf(t))throw new Error(`Invalid cache location "${t}"`);n=lf(t)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?Yh:Xh,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(()=>`auth0.${this.options.clientId}.is.authenticated`)(),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const r=e.useCookiesForTransactions?this.cookieStorage:Qh;var i,o,a;this.scope=((e,t,...n)=>{if("object"!=typeof e)return{default:Fh(t,e,...n)};let r={default:Fh(t,...n)};return Object.keys(e).forEach(i=>{const o=e[i];r[i]=Fh(t,o,...n)}),r})(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new Wh(r,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||Qp,this.cacheManager=new Vh(n,n.allKeys?void 0:new af(n,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new hf(this.options.clientId):void 0,this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=(o=this.options.issuer,a=this.domainUrl,o?o.startsWith("https://")?o:`https://${o}/`:`${a}/`);const s=`${this.domainUrl}/me/`,l=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:s},detailedResponse:!0})}));this.myAccountApi=new gf(l,s),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===t&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new rf)}_url(e){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Xp)));return`${this.domainUrl}${e}&auth0Client=${t}`}_authorizeUrl(e){return this._url(`/authorize?${gh(e)}`)}async _verifyIdToken(e,t,n){const r=await this.nowProvider();return(e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(e=>{const t=e.split("."),[n,r,i]=t;if(3!==t.length||!n||!r||!i)throw new Error("ID token could not be decoded");const o=JSON.parse(yh(r)),a={__raw:e},s={};return Object.keys(o).forEach(e=>{a[e]=o[e],Hh.includes(e)||(s[e]=o[e])}),{encoded:{header:n,payload:r,signature:i},header:JSON.parse(yh(n)),claims:a,user:s}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${e.iss}", found "${t.claims.iss}"`);if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error(`Signature algorithm of "${t.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but was not one of "${t.claims.aud.join(", ")}"`);if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${e.aud}", found "${t.claims.azp}"`)}}else if(t.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but found "${t.claims.aud}"`);if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${t.claims.nonce}"`)}if(e.max_age&&!qh(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(null==t.claims.exp||!qh(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!qh(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const n=e.leeway||60,r=new Date(e.now||Date.now()),i=new Date(0);if(i.setUTCSeconds(t.claims.exp+n),r>i)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${r}) is after expiration time (${i})`);if(null!=t.claims.nbf&&qh(t.claims.nbf)){const e=new Date(0);if(e.setUTCSeconds(t.claims.nbf-n),r<e)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${r}) is before ${e}`)}if(null!=t.claims.auth_time&&qh(t.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+n),r>i)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${r}) is after last auth at ${i}`)}if(e.organization){const n=e.organization.trim();if(n.startsWith("org_")){const e=n;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e!==t.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${e}", found "${t.claims.org_id}"`)}else{const e=n.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(e!==t.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${e}", found "${t.claims.org_name}"`)}}return t})({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:t,organization:n,leeway:this.options.leeway,max_age:(i=this.options.authorizationParams.max_age,"string"!=typeof i?i:parseInt(i,10)||void 0),now:r});var i}_processOrgHint(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(e,t,n){var r;const i=fh(hh()),o=fh(hh()),a=hh(),s=await vh(a),l=bh(s),c=await(null===(r=this.dpop)||void 0===r?void 0:r.calculateThumbprint()),u=(p=this.options,h=this.scope,f=e,m=i,g=o,v=l,y=e.redirect_uri||this.options.authorizationParams.redirect_uri||n,b=null==t?void 0:t.response_mode,w=c,Object.assign(Object.assign(Object.assign({client_id:p.clientId},p.authorizationParams),f),{scope:zh(h,f.scope,f.audience),response_type:"code",response_mode:b||"query",state:m,nonce:g,redirect_uri:y||p.authorizationParams.redirect_uri,code_challenge:v,code_challenge_method:"S256",dpop_jkt:w})),d=this._authorizeUrl(u);var p,h,f,m,g,v,y,b,w;return{nonce:o,code_verifier:a,scope:u.scope,audience:u.audience||"default",redirect_uri:u.redirect_uri,state:i,url:d}}async loginWithPopup(e,t){var n;if(e=e||{},!(t=t||{}).popup&&(t.popup=(()=>{const e=window.screenX+(window.innerWidth-400)/2,t=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup",`left=${e},top=${t},width=400,height=600,resizable,scrollbars=yes,status=1`)})(),!t.popup))throw new ah;const r=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=r.url;const i=await(o=Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}),new Promise((e,t)=>{let n;const r=setInterval(()=>{o.popup&&o.popup.closed&&(clearInterval(r),clearTimeout(i),window.removeEventListener("message",n,!1),t(new oh(o.popup)))},1e3),i=setTimeout(()=>{clearInterval(r),t(new ih(o.popup)),window.removeEventListener("message",n,!1)},1e3*(o.timeoutInSeconds||60));n=function(a){if(a.data&&"authorization_response"===a.data.type){if(clearTimeout(i),clearInterval(r),window.removeEventListener("message",n,!1),o.popup.close(),a.data.response.error)return t(eh.fromPayload(a.data.response));e(a.data.response)}},window.addEventListener("message",n)}));var o;if(r.state!==i.state)throw new eh("state_mismatch","Invalid state");const a=(null===(n=e.authorizationParams)||void 0===n?void 0:n.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:i.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:a})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(e={}){var t;const n=cf(e),{openUrl:r,fragment:i,appState:o}=n,a=qp(n,["openUrl","fragment","appState"]),s=(null===(t=a.authorizationParams)||void 0===t?void 0:t.organization)||this.options.authorizationParams.organization,l=await this._prepareAuthorizeUrl(a.authorizationParams||{}),{url:c}=l,u=qp(l,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},u),{appState:o,response_type:ef.Code}),s&&{organization:s}));const d=i?`${c}#${i}`:c;r?await r(d):window.location.assign(d)}async handleRedirectCallback(e=window.location.href){const t=e.split("?").slice(1);if(0===t.length)throw new Error("There are no query params available for parsing.");const n=this.transactionManager.get();if(!n)throw new eh("missing_transaction","Invalid state");this.transactionManager.remove();const r=(e=>{e.indexOf("#")>-1&&(e=e.substring(0,e.indexOf("#")));const t=new URLSearchParams(e);return{state:t.get("state"),code:t.get("code")||void 0,connect_code:t.get("connect_code")||void 0,error:t.get("error")||void 0,error_description:t.get("error_description")||void 0}})(t.join(""));return n.response_type===ef.ConnectCode?this._handleConnectAccountRedirectCallback(r,n):this._handleLoginRedirectCallback(r,n)}async _handleLoginRedirectCallback(e,t){const{code:n,state:r,error:i,error_description:o}=e;if(i)throw new th(i,o||i,r,t.appState);if(!t.code_verifier||t.state&&t.state!==r)throw new eh("state_mismatch","Invalid state");const a=t.organization,s=t.nonce,l=t.redirect_uri;return await this._requestToken(Object.assign({audience:t.audience,scope:t.scope,code_verifier:t.code_verifier,grant_type:"authorization_code",code:n},l?{redirect_uri:l}:{}),{nonceIn:s,organization:a}),{appState:t.appState,response_type:ef.Code}}async _handleConnectAccountRedirectCallback(e,t){const{connect_code:n,state:r,error:i,error_description:o}=e;if(i)throw new nh(i,o||i,t.connection,r,t.appState);if(!n)throw new eh("missing_connect_code","Missing connect code");if(!(t.code_verifier&&t.state&&t.auth_session&&t.redirect_uri&&t.state===r))throw new eh("state_mismatch","Invalid state");const a=await this.myAccountApi.completeAccount({auth_session:t.auth_session,connect_code:n,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier});return Object.assign(Object.assign({},a),{appState:t.appState,response_type:ef.ConnectCode})}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(e)}catch(t){}}async getTokenSilently(e={}){var t,n;const r=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:zh(this.scope,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope,(null===(n=e.authorizationParams)||void 0===n?void 0:n.audience)||this.options.authorizationParams.audience)})}),i=await((e,t)=>{let n=of[t];return n||(n=e().finally(()=>{delete of[t],n=null}),of[t]=n),n})(()=>this._getTokenSilently(r),`${this.options.clientId}::${r.authorizationParams.audience}::${r.authorizationParams.scope}`);return e.detailedResponse?i:null==i?void 0:i.access_token}async _getTokenSilently(e){const{cacheMode:t}=e,n=qp(e,["cacheMode"]);if("off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId,cacheMode:t});if(e)return e}if("cache-only"===t)return;const r=`auth0.lock.getTokenSilently.${this.options.clientId}.${n.authorizationParams.audience||"default"}`;if(!(await(async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1})(()=>yf.acquireLock(r,5e3),10)))throw new rh;this.activeLockKeys.add(r),1===this.activeLockKeys.size&&window.addEventListener("pagehide",this._releaseLockOnPageHide);try{if("off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(e)return e}const e=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:r,token_type:i,access_token:o,oauthTokenScope:a,expires_in:s}=e;return Object.assign(Object.assign({id_token:r,token_type:i,access_token:o},a?{scope:a}:null),{expires_in:s})}finally{await yf.releaseLock(r),this.activeLockKeys.delete(r),0===this.activeLockKeys.size&&window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}async getTokenWithPopup(e={},t={}){var n,r;const i=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:zh(this.scope,null===(n=e.authorizationParams)||void 0===n?void 0:n.scope,(null===(r=e.authorizationParams)||void 0===r?void 0:r.audience)||this.options.authorizationParams.audience)})});return t=Object.assign(Object.assign({},Yp),t),await this.loginWithPopup(i,t),(await this.cacheManager.get(new Uh({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt)).access_token}async isAuthenticated(){return!!(await this.getUser())}_buildLogoutUrl(e){null!==e.clientId?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const t=e.logoutParams||{},{federated:n}=t,r=qp(t,["federated"]),i=n?"&federated":"";return this._url(`/v2/logout?${gh(Object.assign({clientId:e.clientId},r))}`)+i}async logout(e={}){var t;const n=cf(e),{openUrl:r}=n,i=qp(n,["openUrl"]);null===e.clientId?await this.cacheManager.clear():await this.cacheManager.clear(e.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@"),await(null===(t=this.dpop)||void 0===t?void 0:t.clear());const o=this._buildLogoutUrl(i);r?await r(o):!1!==r&&window.location.assign(o)}async _getTokenFromIFrame(e){const t=Object.assign(Object.assign({},e.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!t.organization&&(t.organization=n);const{url:r,state:i,nonce:o,code_verifier:a,redirect_uri:s,scope:l,audience:c}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new eh("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const n=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let d;try{d=new URL(this.domainUrl).origin}catch(u){d=this.domainUrl}const p=await((e,t,n=60)=>new Promise((r,i)=>{const o=window.document.createElement("iframe");o.setAttribute("width","0"),o.setAttribute("height","0"),o.style.display="none";const a=()=>{window.document.body.contains(o)&&(window.document.body.removeChild(o),window.removeEventListener("message",s,!1))};let s;const l=setTimeout(()=>{i(new rh),a()},1e3*n);s=function(e){if(e.origin!=t)return;if(!e.data||"authorization_response"!==e.data.type)return;const n=e.source;n&&n.close(),e.data.response.error?i(eh.fromPayload(e.data.response)):r(e.data.response),clearTimeout(l),window.removeEventListener("message",s,!1),setTimeout(a,2e3)},window.addEventListener("message",s,!1),window.document.body.appendChild(o),o.setAttribute("src",e)}))(r,d,n);if(i!==p.state)throw new eh("state_mismatch","Invalid state");const h=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:a,code:p.code,grant_type:"authorization_code",redirect_uri:s,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return Object.assign(Object.assign({},h),{scope:l,oauthTokenScope:h.scope,audience:c})}catch(u){throw"login_required"===u.error&&this.logout({openUrl:!1}),u}}async _getTokenUsingRefreshToken(e){const t=await this.cacheManager.get(new Uh({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new lh(e.authorizationParams.audience||"default",e.authorizationParams.scope)}const n=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,r="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,i=((e,t,n,r)=>{var i;if(e&&n&&r){if(t.audience!==n)return t.scope;const e=r.split(" "),o=(null===(i=t.scope)||void 0===i?void 0:i.split(" "))||[],a=o.every(t=>e.includes(t));return e.length>=o.length&&a?r:t.scope}return t.scope})(this.options.useMrrt,e.authorizationParams,null==t?void 0:t.audience,null==t?void 0:t.scope);try{const c=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:n}),r&&{timeout:r}),{scopesToRequest:i});if(c.refresh_token&&this.options.useMrrt&&(null==t?void 0:t.refresh_token)&&await this.cacheManager.updateEntry(t.refresh_token,c.refresh_token),this.options.useMrrt&&!(o=null==t?void 0:t.audience,a=null==t?void 0:t.scope,s=e.authorizationParams.audience,l=e.authorizationParams.scope,o===s&&uf(l,a)||uf(i,c.scope))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);await this.cacheManager.remove(this.options.clientId,e.authorizationParams.audience,e.authorizationParams.scope);const t=((e,t)=>{const n=(null==e?void 0:e.split(" "))||[],r=(null==t?void 0:t.split(" "))||[];return n.filter(e=>-1==r.indexOf(e)).join(",")})(i,c.scope);throw new ch(e.authorizationParams.audience||"default",t)}return Object.assign(Object.assign({},c),{scope:e.authorizationParams.scope,oauthTokenScope:c.scope,audience:e.authorizationParams.audience||"default"})}catch(c){if((c.message.indexOf("Missing Refresh Token")>-1||c.message&&c.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw c}var o,a,s,l}async _saveEntryInCache(e){const{id_token:t,decodedToken:n}=e,r=qp(e,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:t,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,e.id_token,e.decodedToken),await this.cacheManager.set(r)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||"default",t=this.scope[e],n=await this.cacheManager.getIdToken(new Uh({clientId:this.options.clientId,audience:e,scope:t})),r=this.userCache.get("@@user@@");return n&&n.id_token===(null==r?void 0:r.id_token)?r:(this.userCache.set("@@user@@",n),n)}async _getEntryFromCache({scope:e,audience:t,clientId:n,cacheMode:r}){const i=await this.cacheManager.get(new Uh({scope:e,audience:t,clientId:n}),60,this.options.useMrrt,r);if(i&&i.access_token){const{token_type:e,access_token:t,oauthTokenScope:n,expires_in:r}=i,o=await this._getIdTokenFromCache();return o&&Object.assign(Object.assign({id_token:o.id_token,token_type:e||"Bearer",access_token:t},n?{scope:n}:null),{expires_in:r})}}async _requestToken(e,t){const{nonceIn:n,organization:r,scopesToRequest:i}=t||{},o=await Dh(Object.assign(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs,useMrrt:this.options.useMrrt,dpop:this.dpop},e),{scope:i||e.scope}),this.worker),a=await this._verifyIdToken(o.id_token,n,r);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},o),{decodedToken:a,scope:e.scope,audience:e.audience||"default"}),o.scope?{oauthTokenScope:o.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(r||a.claims.org_id),Object.assign(Object.assign({},o),{decodedToken:a})}async exchangeToken(e){return this._requestToken({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:e.subject_token,subject_token_type:e.subject_token_type,scope:zh(this.scope,e.scope,e.audience||this.options.authorizationParams.audience),audience:e.audience||this.options.authorizationParams.audience,organization:e.organization||this.options.authorizationParams.organization})}_assertDpop(e){if(!e)throw new Error("`useDpop` option must be enabled before using DPoP.")}getDpopNonce(e){return this._assertDpop(this.dpop),this.dpop.getNonce(e)}setDpopNonce(e,t){return this._assertDpop(this.dpop),this.dpop.setNonce(e,t)}generateDpopProof(e){return this._assertDpop(this.dpop),this.dpop.generateProof(e)}createFetcher(e={}){return new mf(e,{isDpopEnabled:()=>!!this.options.useDpop,getAccessToken:e=>{var t;return this.getTokenSilently({authorizationParams:{scope:null===(t=null==e?void 0:e.scope)||void 0===t?void 0:t.join(" "),audience:null==e?void 0:e.audience},detailedResponse:!0})},getDpopNonce:()=>this.getDpopNonce(e.dpopNonceId),setDpopNonce:t=>this.setDpopNonce(t,e.dpopNonceId),generateDpopProof:e=>this.generateDpopProof(e)})}async connectAccountWithRedirect(e){const{openUrl:t,appState:n,connection:r,scopes:i,authorization_params:o,redirectUri:a=this.options.authorizationParams.redirect_uri||window.location.origin}=e;if(!r)throw new Error("connection is required");const s=fh(hh()),l=hh(),c=await vh(l),u=bh(c),{connect_uri:d,connect_params:p,auth_session:h}=await this.myAccountApi.connectAccount({connection:r,scopes:i,redirect_uri:a,state:s,code_challenge:u,code_challenge_method:"S256",authorization_params:o});this.transactionManager.create({state:s,code_verifier:l,auth_session:h,redirect_uri:a,appState:n,connection:r,response_type:ef.ConnectCode});const f=new URL(d);f.searchParams.set("ticket",p.ticket),t?await t(f.toString()):window.location.assign(f)}}var wf={isAuthenticated:!1,isLoading:!0,error:void 0,user:void 0},xf=function(){throw new Error("You forgot to wrap your component in <Auth0Provider>.")},_f=Bp(Bp({},wf),{buildAuthorizeUrl:xf,buildLogoutUrl:xf,getAccessTokenSilently:xf,getAccessTokenWithPopup:xf,getIdTokenClaims:xf,exchangeToken:xf,loginWithRedirect:xf,loginWithPopup:xf,connectAccountWithRedirect:xf,logout:xf,handleRedirectCallback:xf,getDpopNonce:xf,setDpopNonce:xf,generateDpopProof:xf,createFetcher:xf}),kf=B.createContext(_f),Sf=function(e){function t(n,r){var i=e.call(this,null!=r?r:n)||this;return i.error=n,i.error_description=r,Object.setPrototypeOf(i,t.prototype),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Up(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),Cf=/[?&](?:connect_)?code=[^&]+/,Ef=/[?&]state=[^&]+/,If=/[?&]error=[^&]+/,Nf=function(e){return function(t){if(t instanceof Error)return t;if(null!==t&&"object"==typeof t&&"error"in t&&"string"==typeof t.error){if("error_description"in t&&"string"==typeof t.error_description){var n=t;return new Sf(n.error,n.error_description)}return new Sf(t.error)}return new Error(e)}},Of=Nf("Login failed"),Tf=Nf("Get access token failed"),Rf=function(e){var t,n;(null==e?void 0:e.redirectUri)&&(e.authorizationParams=null!==(t=e.authorizationParams)&&void 0!==t?t:{},e.authorizationParams.redirect_uri=e.redirectUri,delete e.redirectUri),(null===(n=null==e?void 0:e.authorizationParams)||void 0===n?void 0:n.redirectUri)&&(e.authorizationParams.redirect_uri=e.authorizationParams.redirectUri,delete e.authorizationParams.redirectUri)},jf=function(e,t){switch(t.type){case"LOGIN_POPUP_STARTED":return Bp(Bp({},e),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return Bp(Bp({},e),{isAuthenticated:!!t.user,user:t.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return e.user===t.user?e:Bp(Bp({},e),{isAuthenticated:!!t.user,user:t.user});case"LOGOUT":return Bp(Bp({},e),{isAuthenticated:!1,user:void 0});case"ERROR":return Bp(Bp({},e),{isLoading:!1,error:t.error})}},Mf=function(e){var t;window.history.replaceState({},document.title,null!==(t=e.returnTo)&&void 0!==t?t:window.location.pathname)},Af=function(e){var t=e.children,n=e.skipRedirectCallback,r=e.onRedirectCallback,i=void 0===r?Mf:r,o=e.context,a=void 0===o?kf:o,s=$p(e,["children","skipRedirectCallback","onRedirectCallback","context"]),l=B.useState(function(){return new bf(function(e){return Rf(e),Bp(Bp({},e),{auth0Client:{name:"auth0-react",version:"2.11.0"}})}(s))})[0],c=B.useReducer(jf,wf),u=c[0],d=c[1],p=B.useRef(!1),h=B.useCallback(function(e){return d({type:"ERROR",error:e}),e},[]);B.useEffect(function(){p.current||(p.current=!0,Vp(void 0,void 0,void 0,function(){var e,t,r,o,a,s,c;return Wp(this,function(u){switch(u.label){case 0:return u.trys.push([0,7,,8]),e=void 0,void 0===p&&(p=window.location.search),!Cf.test(p)&&!If.test(p)||!Ef.test(p)||n?[3,3]:[4,l.handleRedirectCallback()];case 1:return t=u.sent(),r=t.appState,o=void 0===r?{}:r,a=t.response_type,s=$p(t,["appState","response_type"]),[4,l.getUser()];case 2:return e=u.sent(),o.response_type=a,a===ef.ConnectCode&&(o.connectedAccount=s),i(o,e),[3,6];case 3:return[4,l.checkSession()];case 4:return u.sent(),[4,l.getUser()];case 5:e=u.sent(),u.label=6;case 6:return d({type:"INITIALISED",user:e}),[3,8];case 7:return c=u.sent(),h(Of(c)),[3,8];case 8:return[2]}var p})}))},[l,i,n,h]);var f=B.useCallback(function(e){return Rf(e),l.loginWithRedirect(e)},[l]),m=B.useCallback(function(e,t){return Vp(void 0,void 0,void 0,function(){var n,r;return Wp(this,function(i){switch(i.label){case 0:d({type:"LOGIN_POPUP_STARTED"}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,l.loginWithPopup(e,t)];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),h(Of(n)),[2];case 4:return[4,l.getUser()];case 5:return r=i.sent(),d({type:"LOGIN_POPUP_COMPLETE",user:r}),[2]}})})},[l,h]),g=B.useCallback(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vp(void 0,function(e,t){for(var n,r=0,i=t.length;r<i;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}([],e),void 0,function(e){return void 0===e&&(e={}),Wp(this,function(t){switch(t.label){case 0:return[4,l.logout(e)];case 1:return t.sent(),(e.openUrl||!1===e.openUrl)&&d({type:"LOGOUT"}),[2]}})})},[l]),v=B.useCallback(function(e){return Vp(void 0,void 0,void 0,function(){var t,n,r,i;return Wp(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,3,5]),[4,l.getTokenSilently(e)];case 1:return t=o.sent(),[3,5];case 2:throw n=o.sent(),Tf(n);case 3:return r=d,i={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,l.getUser()];case 4:return r.apply(void 0,[(i.user=o.sent(),i)]),[7];case 5:return[2,t]}})})},[l]),y=B.useCallback(function(e,t){return Vp(void 0,void 0,void 0,function(){var n,r,i,o;return Wp(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,3,5]),[4,l.getTokenWithPopup(e,t)];case 1:return n=a.sent(),[3,5];case 2:throw r=a.sent(),Tf(r);case 3:return i=d,o={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,l.getUser()];case 4:return i.apply(void 0,[(o.user=a.sent(),o)]),[7];case 5:return[2,n]}})})},[l]),b=B.useCallback(function(e){return l.connectAccountWithRedirect(e)},[l]),w=B.useCallback(function(){return l.getIdTokenClaims()},[l]),x=B.useCallback(function(e){return Vp(void 0,void 0,void 0,function(){var t,n,r,i;return Wp(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,3,5]),[4,l.exchangeToken(e)];case 1:return t=o.sent(),[3,5];case 2:throw n=o.sent(),Tf(n);case 3:return r=d,i={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,l.getUser()];case 4:return r.apply(void 0,[(i.user=o.sent(),i)]),[7];case 5:return[2,t]}})})},[l]),_=B.useCallback(function(e){return Vp(void 0,void 0,void 0,function(){var t,n,r;return Wp(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,3,5]),[4,l.handleRedirectCallback(e)];case 1:return[2,i.sent()];case 2:throw t=i.sent(),Tf(t);case 3:return n=d,r={type:"HANDLE_REDIRECT_COMPLETE"},[4,l.getUser()];case 4:return n.apply(void 0,[(r.user=i.sent(),r)]),[7];case 5:return[2]}})})},[l]),k=B.useCallback(function(e){return l.getDpopNonce(e)},[l]),S=B.useCallback(function(e,t){return l.setDpopNonce(e,t)},[l]),C=B.useCallback(function(e){return l.generateDpopProof(e)},[l]),E=B.useCallback(function(e){return l.createFetcher(e)},[l]),I=B.useMemo(function(){return Bp(Bp({},u),{getAccessTokenSilently:v,getAccessTokenWithPopup:y,getIdTokenClaims:w,exchangeToken:x,loginWithRedirect:f,loginWithPopup:m,connectAccountWithRedirect:b,logout:g,handleRedirectCallback:_,getDpopNonce:k,setDpopNonce:S,generateDpopProof:C,createFetcher:E})},[u,v,y,w,x,f,m,b,g,_,k,S,C,E]);return $.createElement(a.Provider,{value:I},t)};const Pf={},Lf=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},Df=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),Ff=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
41
+ /**
42
+ * @license lucide-react v0.561.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */
47
+ var zf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
48
+ /**
49
+ * @license lucide-react v0.561.0 - ISC
50
+ *
51
+ * This source code is licensed under the ISC license.
52
+ * See the LICENSE file in the root directory of this source tree.
53
+ */const Uf=B.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},l)=>B.createElement("svg",{ref:l,...zf,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Df("lucide",i),...!o&&!Ff(s)&&{"aria-hidden":"true"},...s},[...a.map(([e,t])=>B.createElement(e,t)),...Array.isArray(o)?o:[o]])),Bf=(e,t)=>{const n=B.forwardRef(({className:n,...r},i)=>{return B.createElement(Uf,{ref:i,iconNode:t,className:Df(`lucide-${o=Lf(e),o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var o});return n.displayName=Lf(e),n},$f=Bf("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),Vf=Bf("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Wf=Bf("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),qf=Bf("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),Hf=Bf("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Kf=Bf("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Gf=Bf("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),Zf=Bf("circle-arrow-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]]),Jf=Bf("circle-arrow-up",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]),Yf=Bf("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),Xf=Bf("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Qf=Bf("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]),em=Bf("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),tm=Bf("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),nm=Bf("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),rm=Bf("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),im=Bf("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),om=Bf("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]),am=Bf("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]),sm=Bf("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),lm=Bf("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),cm=Bf("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),um=Bf("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),dm=Bf("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),pm=Bf("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),hm=Bf("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),fm=Bf("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),mm=Bf("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);
54
+ /**
55
+ * @license lucide-react v0.561.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */var gm,vm={};if("undefined"==typeof window){var ym={hostname:""};gm={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:ym,referrer:""},screen:{width:0,height:0},location:ym,addEventListener:function(){},removeEventListener:function(){}}}else gm=window;function bm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wm(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(gE){return void n(gE)}s.done?t(l):Promise.resolve(l).then(r,i)}function xm(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){wm(o,r,i,a,s,"next",e)}function s(e){wm(o,r,i,a,s,"throw",e)}a(void 0)})}}function _m(e,t,n){return _m=jm()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Om(i,n.prototype),i},_m.apply(null,arguments)}function km(e,t,n){return t&&function(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)}}(e.prototype,t),e}function Sm(){return Sm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sm.apply(this,arguments)}function Cm(e){return(Cm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Em(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}}),t&&Om(e,t)}function Im(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Nm(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Om(e,t){return(Om=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tm(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function Rm(e){var t="function"==typeof Map?new Map:void 0;return Rm=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _m(e,arguments,Cm(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Om(r,e)},Rm(e)}function jm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(jm=function(){return!!e})()}function Mm(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return bm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bm(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}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 Am(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(tf){o=[6,tf],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function Pm(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var Lm,Dm=Object.defineProperty,Fm=function(e,t,n){return function(e,t,n){return t in e?Dm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":Tm(t))?t+"":t,n)},zm=Object.defineProperty,Um=function(e,t,n){return function(e,t,n){return t in e?zm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":Tm(t))?t+"":t,n)},Bm=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(Bm||{}),$m={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Vm={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Wm={};function qm(e){if(Wm[e])return Wm[e];var t=globalThis[e],n=t.prototype,r=e in $m?$m[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in Vm?Vm[e]:void 0,a=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&a&&!globalThis.Zone)return Wm[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?Wm[e]=c:n}catch(tf){return n}}var Hm={};function Km(e,t,n){var r,i=e+"."+String(n);if(Hm[i])return Hm[i].call(t);var o=qm(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(Hm[i]=a,a.call(t)):t[n]}var Gm={};function Zm(e,t,n){var r=e+"."+String(n);if(Gm[r])return Gm[r].bind(t);var i=qm(e)[n];return"function"!=typeof i?t[n]:(Gm[r]=i,i.bind(t))}var Jm={childNodes:function(e){return Km("Node",e,"childNodes")},parentNode:function(e){return Km("Node",e,"parentNode")},parentElement:function(e){return Km("Node",e,"parentElement")},textContent:function(e){return Km("Node",e,"textContent")},contains:function(e,t){return Zm("Node",e,"contains")(t)},getRootNode:function(e){return Zm("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Km("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Km("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Km("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Km("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return qm("MutationObserver").constructor},patch:function(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(tf){return function(){}}}};function Ym(e){return e.nodeType===e.ELEMENT_NODE}function Xm(e){var t=e&&"host"in e&&"mode"in e&&Jm.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Jm.shadowRoot(t)===e)}function Qm(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function eg(e){try{var t=e.rules||e.cssRules;if(!t)return null;var n=e.href;!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href);var r=Array.from(t,function(e){return tg(e,n)}).join("");return(i=r).includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}catch(gE){return null}var i}function tg(e,t){if(function(e){return"styleSheet"in e}(e)){var n;try{n=eg(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var n=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer("+e.layerName+")"),e.supportsText&&n.push("supports("+e.supportsText+")"),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(gE){n=e.cssText}return e.styleSheet.href?pg(n,e.styleSheet.href):n}var r,i=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,i=i.replace(r,"$1\\$2")),t?pg(i,t):i}var ng=function(){function e(){Um(this,"idNodeMap",new Map),Um(this,"nodeMetaMap",new WeakMap)}var t=e.prototype;return t.getId=function(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-1},t.getNode=function(e){return this.idNodeMap.get(e)||null},t.getIds=function(){return Array.from(this.idNodeMap.keys())},t.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})},t.has=function(e){return this.idNodeMap.has(e)},t.hasNode=function(e){return this.nodeMetaMap.has(e)},t.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},t.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},t.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function rg(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.value,a=e.maskInputFn,s=o||"",l=i&&ig(i);return(n[r.toLowerCase()]||l&&n[l])&&(s=a?a(s,t):"*".repeat(s.length)),s}function ig(e){return e.toLowerCase()}var og="__rrweb_original__";function ag(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ig(t):null}function sg(e,t){var n;try{n=new URL(e,null!=t?t:window.location.href)}catch(o){return null}var r,i=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(r=null==i?void 0:i[1])?r:null}var lg=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,cg=/^(?:[a-z+]+:)?\/\//i,ug=/^www\..*/i,dg=/^(data:)([^,]*),(.*)/i;function pg(e,t){return(e||"").replace(lg,function(e,n,r,i,o,a){var s,l=r||o||a,c=n||i||"";if(!l)return e;if(cg.test(l)||ug.test(l))return"url("+c+l+c+")";if(dg.test(l))return"url("+c+l+c+")";if("/"===l[0])return"url("+c+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+l)+c+")";var u=t.split("/"),d=l.split("/");u.pop();for(var p,h=Mm(d);!(p=h()).done;){var f=p.value;"."!==f&&(".."===f?u.pop():u.push(f))}return"url("+c+u.join("/")+c+")"})}function hg(e,t){return void 0===t&&(t=!1),t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function fg(e,t){return function(e,t,n){void 0===n&&(n=!1);var r=Array.from(t.childNodes),i=[],o=0;if(r.length>1&&e&&"string"==typeof e)for(var a=hg(e,n),s=a.length/e.length,l=1;l<r.length;l++)if(r[l].textContent&&"string"==typeof r[l].textContent){for(var c=hg(r[l].textContent,n),u=3;u<c.length&&(c[u].match(/[a-zA-Z0-9]/)||-1!==c.indexOf(c.substring(0,u),1));u++);for(;u<c.length;u++){var d=c.substring(0,u),p=a.split(d),h=-1;if(2===p.length)h=p[0].length;else if(p.length>2&&""===p[0]&&""!==r[l-1].textContent)h=a.indexOf(d,1);else if(1===p.length){if(d=d.substring(0,d.length-1),(p=a.split(d)).length<=1)return i.push(e),i;u=101}else u===c.length-1&&(h=a.indexOf(d));if(p.length>=2&&u>100){var f=r[l-1].textContent;if(f&&"string"==typeof f){var m=hg(f).length;h=a.indexOf(d,m)}-1===h&&(h=p[0].length)}if(-1!==h){for(var g=Math.floor(h/s);g>0&&g<e.length;){if((o+=1)>50*r.length)return i.push(e),i;var v=hg(e.substring(0,g),n);if(v.length===h){i.push(e.substring(0,g)),e=e.substring(g),a=a.substring(h);break}v.length<h?g+=Math.max(1,Math.floor((h-v.length)/s)):g-=Math.max(1,Math.floor((v.length-h)*s))}break}}}return i.push(e),i}(e,t).join("/* rr_split */")}var mg,gg,vg=1,yg=new RegExp("[^a-z0-9-_:]");function bg(){return vg++}var wg=/^[^ \t\n\r\u000c]+/,xg=/^[, \t\n\r\u000c]+/;var _g=new WeakMap;function kg(e,t){return t&&""!==t.trim()?Cg(e,t):t}function Sg(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Cg(e,t){var n=_g.get(e);if(n||(n=e.createElement("a"),_g.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Eg(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?kg(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(xg),!(n>=t.length);){var o=r(wg);if(","===o.slice(-1))o=kg(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=kg(e,o);for(var s=!1;;){var l=t.charAt(n);if(""===l){i.push((o+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){n+=1,i.push((o+a).trim());break}"("===l&&(s=!0)}a+=l,n+=1}}}return i.join(", ")}(e,r):"style"===n?pg(r,Cg(e)):"object"===t&&"data"===n?kg(e,r):r:kg(e,r):r}function Ig(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Ng(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Ng(Jm.parentNode(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&Ng(Jm.parentNode(e),t,n)}function Og(e,t,n,r){var i;if(Ym(e)){if(i=e,!Jm.childNodes(i).length)return!1}else{if(null===Jm.parentElement(e))return!1;i=Jm.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(Ng(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(tf){}return!1}function Tg(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,a=t.needsMask,s=t.inlineStylesheet,l=t.maskInputOptions,c=void 0===l?{}:l,u=t.maskTextFn,d=t.maskInputFn,p=t.dataURLOptions,h=void 0===p?{}:p,f=t.inlineImages,m=t.recordCanvas,g=t.keepIframeSrcFn,v=t.newlyAddedElement,y=void 0!==v&&v,b=t.cssCaptured,w=void 0!==b&&b,x=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Bm.Document,childNodes:[],compatMode:e.compatMode}:{type:Bm.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Bm.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return function(e,t){for(var n,r=t.doc,i=t.blockClass,o=t.blockSelector,a=t.inlineStylesheet,s=t.maskInputOptions,l=void 0===s?{}:s,c=t.maskInputFn,u=t.dataURLOptions,d=void 0===u?{}:u,p=t.inlineImages,h=t.recordCanvas,f=t.keepIframeSrcFn,m=t.newlyAddedElement,g=void 0!==m&&m,v=t.rootId,y=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(tf){}return!1}(e,i,o),b=function(e){if(Im(e,HTMLFormElement))return"form";var t=ig(e.tagName);return yg.test(t)?"div":t}(e),w={},x=e.attributes.length,_=0;_<x;_++){var k=e.attributes[_];Ig(b,k.name,k.value)||(w[k.name]=Eg(r,b,ig(k.name),k.value))}if("link"===b&&a){var S=Array.from(r.styleSheets).find(function(t){return t.href===e.href}),C=null;S&&(C=eg(S)),C&&(delete w.rel,delete w.href,w._cssText=C)}if("style"===b&&e.sheet){var E=eg(e.sheet);E&&(e.childNodes.length>1&&(E=fg(E,e)),w._cssText=E)}if("input"===b||"textarea"===b||"select"===b){var I=e.value,N=e.checked;"radio"!==w.type&&"checkbox"!==w.type&&"submit"!==w.type&&"button"!==w.type&&I?w.value=rg({element:e,type:ag(e),tagName:b,value:I,maskInputOptions:l,maskInputFn:c}):N&&(w.checked=N)}"option"===b&&(e.selected&&!l.select?w.selected=!0:delete w.selected);"dialog"===b&&e.open&&(w.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===b&&h)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=og in i?i[og]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(function(e){return 0!==e}))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var O=e.toDataURL(d.type,d.quality),T=r.createElement("canvas");T.width=e.width,T.height=e.height,O!==T.toDataURL(d.type,d.quality)&&(w.rr_dataURL=O)}if("img"===b&&p){mg||(mg=r.createElement("canvas"),gg=mg.getContext("2d"));var R=e,j=(R.currentSrc||R.getAttribute("src"),R.crossOrigin),M=function(){R.removeEventListener("load",M);try{mg.width=R.naturalWidth,mg.height=R.naturalHeight,gg.drawImage(R,0,0),w.rr_dataURL=mg.toDataURL(d.type,d.quality)}catch(e){if("anonymous"!==R.crossOrigin)return R.crossOrigin="anonymous",void(R.complete&&0!==R.naturalWidth?M():R.addEventListener("load",M))}"anonymous"===R.crossOrigin&&(j?w.crossOrigin=j:R.removeAttribute("crossorigin"))};R.complete&&0!==R.naturalWidth?M():R.addEventListener("load",M)}if("audio"===b||"video"===b){var A=w;A.rr_mediaState=e.paused?"paused":"played",A.rr_mediaCurrentTime=e.currentTime,A.rr_mediaPlaybackRate=e.playbackRate,A.rr_mediaMuted=e.muted,A.rr_mediaLoop=e.loop,A.rr_mediaVolume=e.volume}g||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop));if(y){var P=e.getBoundingClientRect(),L=P.width,D=P.height;w={class:w.class,rr_width:L+"px",rr_height:D+"px"}}"iframe"!==b||f(w.src)||(e.contentDocument||(w.rr_src=w.src),delete w.src);try{customElements.get(b)&&(n=!0)}catch(tf){}return{type:Bm.Element,tagName:b,attributes:w,childNodes:[],isSVG:Sg(e)||void 0,needBlock:y,rootId:v,isCustom:n}}(e,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:s,maskInputOptions:c,maskInputFn:d,dataURLOptions:h,inlineImages:f,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y,rootId:x});case e.TEXT_NODE:return function(e,t){var n=t.needsMask,r=t.maskTextFn,i=t.rootId,o=t.cssCaptured,a=Jm.parentNode(e),s=a&&a.tagName,l="",c="STYLE"===s||void 0,u="SCRIPT"===s||void 0;u?l="SCRIPT_PLACEHOLDER":o||(l=Jm.textContent(e),c&&l&&(l=pg(l,Cg(t.doc))));!c&&!u&&l&&n&&(l=r?r(l,Jm.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:Bm.Text,textContent:l||"",rootId:i}}(e,{doc:n,needsMask:a,maskTextFn:u,rootId:x,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:Bm.CDATA,textContent:"",rootId:x};case e.COMMENT_NODE:return{type:Bm.Comment,textContent:Jm.textContent(e)||"",rootId:x};default:return!1}}function Rg(e){return null==e?"":e.toLowerCase()}function jg(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,l=t.skipChild,c=void 0!==l&&l,u=t.inlineStylesheet,d=void 0===u||u,p=t.maskInputOptions,h=void 0===p?{}:p,f=t.maskTextFn,m=t.maskInputFn,g=t.slimDOMOptions,v=t.dataURLOptions,y=void 0===v?{}:v,b=t.inlineImages,w=void 0!==b&&b,x=t.recordCanvas,_=void 0!==x&&x,k=t.onSerialize,S=t.onIframeLoad,C=t.iframeLoadTimeout,E=void 0===C?5e3:C,I=t.onStylesheetLoad,N=t.stylesheetLoadTimeout,O=void 0===N?5e3:N,T=t.keepIframeSrcFn,R=void 0===T?function(){return!1}:T,j=t.newlyAddedElement,M=void 0!==j&&j,A=t.cssCaptured,P=void 0!==A&&A,L=t.needsMask,D=t.preserveWhiteSpace,F=void 0===D||D;L||(L=Og(e,a,s,void 0===L));var z,U=Tg(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:L,inlineStylesheet:d,maskInputOptions:h,maskTextFn:f,maskInputFn:m,dataURLOptions:y,inlineImages:w,recordCanvas:_,keepIframeSrcFn:R,newlyAddedElement:M,cssCaptured:P});if(!U)return null;z=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===Bm.Comment)return!0;if(e.type===Bm.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"===sg(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Rg(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Rg(e.attributes.name)||"icon"===Rg(e.attributes.rel)||"apple-touch-icon"===Rg(e.attributes.rel)||"shortcut icon"===Rg(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Rg(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Rg(e.attributes.property).match(/^(og|twitter|fb):/)||Rg(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Rg(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Rg(e.attributes.name)||"googlebot"===Rg(e.attributes.name)||"bingbot"===Rg(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Rg(e.attributes.name)||"generator"===Rg(e.attributes.name)||"framework"===Rg(e.attributes.name)||"publisher"===Rg(e.attributes.name)||"progid"===Rg(e.attributes.name)||Rg(e.attributes.property).match(/^article:/)||Rg(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Rg(e.attributes.name)||"yandex-verification"===Rg(e.attributes.name)||"csrf-token"===Rg(e.attributes.name)||"p:domain_verify"===Rg(e.attributes.name)||"verify-v1"===Rg(e.attributes.name)||"verification"===Rg(e.attributes.name)||"shopify-checkout-api-token"===Rg(e.attributes.name)))return!0}}return!1}(U,g)||!F&&U.type===Bm.Text&&!U.textContent.replace(/^\s+|\s+$/gm,"").length?-2:bg();var B=Object.assign(U,{id:z});if(r.add(e,B),-2===z)return null;k&&k(e);var $=!c;if(B.type===Bm.Element){$=$&&!B.needBlock,delete B.needBlock;var V=Jm.shadowRoot(e);V&&Qm(V)&&(B.isShadowHost=!0)}if((B.type===Bm.Document||B.type===Bm.Element)&&$){g.headWhitespace&&B.type===Bm.Element&&"head"===B.tagName&&(F=!1);var W={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:L,maskTextClass:a,maskTextSelector:s,skipChild:c,inlineStylesheet:d,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:w,recordCanvas:_,preserveWhiteSpace:F,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:O,keepIframeSrcFn:R,cssCaptured:!1};if(B.type===Bm.Element&&"textarea"===B.tagName&&void 0!==B.attributes.value);else{B.type===Bm.Element&&void 0!==B.attributes._cssText&&"string"==typeof B.attributes._cssText&&(W.cssCaptured=!0);for(var q,H=Mm(Array.from(Jm.childNodes(e)));!(q=H()).done;){var K=jg(q.value,W);K&&B.childNodes.push(K)}}var G=null;if(Ym(e)&&(G=Jm.shadowRoot(e)))for(var Z,J=Mm(Array.from(Jm.childNodes(G)));!(Z=J()).done;){var Y=jg(Z.value,W);Y&&(Qm(G)&&(Y.isShadow=!0),B.childNodes.push(Y))}}var X=Jm.parentNode(e);return X&&Xm(X)&&Qm(X)&&(B.isShadow=!0),B.type===Bm.Element&&"iframe"===B.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(gE){return}if("complete"===i){var a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(s),o=!0,t()})}}}(e,function(){var t=e.contentDocument;if(t&&S){var n=jg(t,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:L,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:w,recordCanvas:_,preserveWhiteSpace:F,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:O,keepIframeSrcFn:R});n&&S(e,n)}},E),B.type===Bm.Element&&"link"===B.tagName&&"string"==typeof B.attributes.rel&&("stylesheet"===B.attributes.rel||"preload"===B.attributes.rel&&"string"==typeof B.attributes.href&&"css"===sg(B.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(gE){return}if(!r){var o=setTimeout(function(){i||(t(),i=!0)},n);e.addEventListener("load",function(){clearTimeout(o),i=!0,t()})}}(e,function(){if(I){var t=jg(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:L,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:w,recordCanvas:_,preserveWhiteSpace:F,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:O,keepIframeSrcFn:R});t&&I(e,t)}},O),B}function Mg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ag(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return Im(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Pg={exports:{}},Lg=String,Dg=function(){return{isColorSupported:!1,reset:Lg,bold:Lg,dim:Lg,italic:Lg,underline:Lg,inverse:Lg,hidden:Lg,strikethrough:Lg,black:Lg,red:Lg,green:Lg,yellow:Lg,blue:Lg,magenta:Lg,cyan:Lg,white:Lg,gray:Lg,bgBlack:Lg,bgRed:Lg,bgGreen:Lg,bgYellow:Lg,bgBlue:Lg,bgMagenta:Lg,bgCyan:Lg,bgWhite:Lg}};Pg.exports=Dg(),Pg.exports.createColors=Dg;var Fg=Pg.exports,zg=Ag(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),Ug=Fg,Bg=zg,$g=function(e){function t(n,r,i,o,a,s){var l;return(l=e.call(this,n)||this).name="CssSyntaxError",l.reason=n,a&&(l.file=a),o&&(l.source=o),s&&(l.plugin=s),void 0!==r&&void 0!==i&&("number"==typeof r?(l.line=r,l.column=i):(l.line=r.line,l.column=r.column,l.endLine=i.line,l.endColumn=i.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,t),l}Em(t,e);var n=t.prototype;return n.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},n.showSourceCode=function(e){var t=this;if(!this.source)return"";var n=this.source;null==e&&(e=Ug.isColorSupported),Bg&&e&&(n=Bg(n));var r,i,o=n.split(/\r?\n/),a=Math.max(this.line-3,0),s=Math.min(this.line+2,o.length),l=String(s).length;if(e){var c=Ug.createColors(!0),u=c.bold,d=c.gray,p=c.red;r=function(e){return u(p(e))},i=function(e){return d(e)}}else r=i=function(e){return e};return o.slice(a,s).map(function(e,n){var o=a+1+n,s=" "+(" "+o).slice(-l)+" | ";if(o===t.line){var c=i(s.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return r(">")+i(s)+e+"\n "+c+r("^")}return" "+i(s)+e}).join("\n")},n.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},t}(Rm(Error)),Vg=$g;$g.default=$g;var Wg={};Wg.isClean=Symbol("isClean"),Wg.my=Symbol("my");var qg={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var Hg=function(){function e(e){this.builder=e}var t=e.prototype;return t.atrule=function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}},t.beforeAfter=function(e,t){var n;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");for(var 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},t.block=function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")},t.body=function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;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)}},t.comment=function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)},t.decl=function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)},t.document=function(e){this.body(e)},t.raw=function(e,t,n){var r;if(n||(n=t),t&&void 0!==(r=e.raws[t]))return r;var i=e.parent;if("before"===n){if(!i||"root"===i.type&&i.first===e)return"";if(i&&"document"===i.type)return""}if(!i)return qg[n];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[n])return o.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);var a,s="raw"+((a=n)[0].toUpperCase()+a.slice(1));return this[s]?r=this[s](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=qg[n]),o.rawCache[n]=r,r},t.rawBeforeClose=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawBeforeComment=function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeDecl=function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},t.rawEmptyBody=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},t.rawIndent=function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t},t.rawSemicolon=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},t.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},t.stringify=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)},e}(),Kg=Hg;Hg.default=Hg;var Gg=Kg;function Zg(e,t){new Gg(t).stringify(e)}var Jg=Zg;Zg.default=Zg;var Yg=Wg.isClean,Xg=Wg.my,Qg=Vg,ev=Kg,tv=Jg;function nv(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":Tm(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return nv(e,n)}):("object"===o&&null!==i&&(i=nv(i)),n[r]=i)}return n}var rv=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},this[Yg]=!1,this[Xg]=!0,e)if("nodes"===t){this.nodes=[];for(var n,r=Mm(e[t]);!(n=r()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){void 0===e&&(e={});var t=nv(this);for(var n in e)t[n]=e[n];return t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(void 0===t&&(t={}),this.source){var n=this.rangeBy(t),r=n.end,i=n.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Qg(e)},t.getProxyProcessor=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}}},t.markDirty=function(){if(this[Yg]){this[Yg]=!1;for(var e=this;e=e.parent;)e[Yg]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n},t.positionInside=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]?(r=1,i+=1):r+=1;return{column:r,line:i}},t.prev=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}},t.rangeBy=function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}},t.raw=function(e,t){return(new ev).raw(this,e,t)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){for(var r,i=this,o=!1,a=Mm(t);!(r=a()).done;){var s=r.value;s===this?o=!0:o?(this.parent.insertAfter(i,s),i=s):this.parent.insertBefore(i,s)}o||this.remove()}return this},t.root=function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e},t.toJSON=function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var a=this[o];if(Array.isArray(a))n[o]=a.map(function(e){return"object"===(void 0===e?"undefined":Tm(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===a?"undefined":Tm(a))&&a.toJSON)n[o]=a.toJSON(null,t);else if("source"===o){var s=t.get(a.input);null==s&&(s=i,t.set(a.input,i),i++),n[o]={end:a.end,inputId:s,start:a.start}}else n[o]=a}return r&&(n.inputs=[].concat(t.keys()).map(function(e){return e.toJSON()})),n},t.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},t.toString=function(e){void 0===e&&(e=tv),e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t},t.warn=function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)},km(e,[{key:"proxyOf",get:function(){return this}}]),e}(),iv=rv;rv.default=rv;var ov=function(e){function t(t){var n;return t&&void 0!==t.value&&"string"!=typeof t.value&&(t=Sm({},t,{value:String(t.value)})),(n=e.call(this,t)||this).type="decl",n}return Em(t,e),km(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(iv),av=ov;ov.default=ov;var sv=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},lv=zg.SourceMapConsumer,cv=zg.SourceMapGenerator,uv=zg.existsSync,dv=zg.readFileSync,pv=zg.dirname,hv=zg.join;var fv=function(){function e(e,t){if(!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=pv(this.mapFile)),r&&(this.text=r)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||(this.consumerCache=new lv(this.text)),this.consumerCache},t.decodeInline=function(e){var t;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 n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)},t.getAnnotationURL=function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},t.isMap=function(e){return"object"===(void 0===e?"undefined":Tm(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))},t.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}},t.loadFile=function(e){if(this.root=pv(e),uv(e))return this.mapFile=e,dv(e,"utf-8").toString().trim()},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(Im(t,lv))return cv.fromSourceMap(t).toString();if(Im(t,cv))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){var r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var i=this.annotation;return e&&(i=hv(pv(e),i)),this.loadFile(i)}}},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),mv=fv;fv.default=fv;var gv=zg.SourceMapConsumer,vv=zg.SourceMapGenerator,yv=zg.fileURLToPath,bv=zg.pathToFileURL,wv=zg.isAbsolute,xv=zg.resolve,_v=sv,kv=zg,Sv=Vg,Cv=mv,Ev=Symbol("fromOffsetCache"),Iv=Boolean(gv&&vv),Nv=Boolean(xv&&wv),Ov=function(){function e(e,t){if(void 0===t&&(t={}),null==e||"object"===(void 0===e?"undefined":Tm(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(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&&(!Nv||/^\w+:\/\//.test(t.from)||wv(t.from)?this.file=t.from:this.file=xv(t.from)),Nv&&Iv){var n=new Cv(this.css,t);if(n.text){this.map=n;var r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+_v(6)+">"),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,n,r){var i,o,a;if(void 0===r&&(r={}),t&&"object"===(void 0===t?"undefined":Tm(t))){var s=t,l=n;if("number"==typeof s.offset){var c=this.fromOffset(s.offset);t=c.line,n=c.col}else t=s.line,n=s.column;if("number"==typeof l.offset){var u=this.fromOffset(l.offset);o=u.line,a=u.col}else o=l.line,a=l.column}else if(!n){var d=this.fromOffset(t);t=d.line,n=d.col}var p=this.origin(t,n,o,a);return(i=p?new Sv(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,r.plugin):new Sv(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:a,line:o},this.css,this.file,r.plugin)).input={column:n,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(bv&&(i.input.url=bv(this.file).toString()),i.input.file=this.file),i},t.fromOffset=function(e){var t;if(this[Ev])t=this[Ev];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[Ev]=t}var a=0;if(e>=t[t.length-1])a=t.length-1;else for(var s,l=t.length-2;a<l;)if(e<t[s=a+(l-a>>1)])l=s-1;else{if(!(e>=t[s+1])){a=s;break}a=s+1}return{col:e-t[a]+1,line:a+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:xv(this.map.consumer().sourceRoot||this.map.root||".",e)},t.origin=function(e,t,n,r){if(!this.map)return!1;var i,o,a=this.map.consumer(),s=a.originalPositionFor({column:t,line:e});if(!s.source)return!1;"number"==typeof n&&(i=a.originalPositionFor({column:r,line:n})),o=wv(s.source)?bv(s.source):new URL(s.source,this.map.consumer().sourceRoot||bv(this.map.mapFile));var l={column:s.column,endColumn:i&&i.column,endLine:i&&i.line,line:s.line,url:o.toString()};if("file:"===o.protocol){if(!yv)throw new Error("file: protocol is not available in this PostCSS build");l.file=yv(o)}var c=a.sourceContentFor(s.source);return c&&(l.source=c),l},t.toJSON=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=Sm({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e},km(e,[{key:"from",get:function(){return this.file||this.id}}]),e}(),Tv=Ov;Ov.default=Ov,kv&&kv.registerInput&&kv.registerInput(Ov);var Rv=zg.SourceMapConsumer,jv=zg.SourceMapGenerator,Mv=zg.dirname,Av=zg.relative,Pv=zg.resolve,Lv=zg.sep,Dv=zg.pathToFileURL,Fv=Tv,zv=Boolean(Rv&&jv),Uv=Boolean(Mv&&Pv&&Av&&Lv),Bv=function(){function e(e,t,n,r){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}var t=e.prototype;return t.addAnnotation=function(){var e;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";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"},t.applyPrevMaps=function(){for(var e,t=Mm(this.previous());!(e=t()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||Mv(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new Rv(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}},t.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;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,""))},t.generate=function(){if(this.clearAnnotation(),Uv&&zv&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=jv.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new jv({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>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css="",this.map=new jv({file:this.outputFile(),ignoreInvalidMapping:!0});var t,n,r=1,i=1,o="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(s,l,c){if(e.css+=s,l&&"end"!==c&&(a.generated.line=r,a.generated.column=i-1,l.source&&l.source.start?(a.source=e.sourcePath(l),a.original.line=l.source.start.line,a.original.column=l.source.start.column-1,e.map.addMapping(a)):(a.source=o,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(t=s.match(/\n/g))?(r+=t.length,n=s.lastIndexOf("\n"),i=s.length-n):i+=s.length,l&&"start"!==c){var u=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===u.last&&!u.raws.semicolon||(l.source&&l.source.end?(a.source=e.sourcePath(l),a.original.line=l.source.end.line,a.original.column=l.source.end.column-1,a.generated.line=r,a.generated.column=i-2,e.map.addMapping(a)):(a.source=o,a.original.line=1,a.original.column=0,a.generated.line=r,a.generated.column=i-1,e.map.addMapping(a)))}})},t.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},t.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},t.isMap=function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},t.path=function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var n=this.opts.to?Mv(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=Mv(Pv(n,this.mapOpts.annotation)));var r=Av(n,e);return this.memoizedPaths.set(e,r),r},t.previous=function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new Fv(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}},t.sourcePath=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))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(Dv){var n=Dv(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===Lv&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n},e}(),$v=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="comment",n}return Em(t,e),t}(iv),Vv=$v;$v.default=$v;var Wv,qv,Hv,Kv,Gv=Wg.isClean,Zv=Wg.my,Jv=av,Yv=Vv;function Xv(e){return e.map(function(e){return e.nodes&&(e.nodes=Xv(e.nodes)),delete e.source,e})}function Qv(e){if(e[Gv]=!1,e.proxyOf.nodes)for(var t,n=Mm(e.proxyOf.nodes);!(t=n()).done;){Qv(t.value)}}var ey=function(e){function t(){return e.apply(this,arguments)||this}Em(t,e);var n=t.prototype;return n.append=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r,i=Mm(t);!(r=i()).done;)for(var o,a=r.value,s=Mm(this.normalize(a,this.last));!(o=s()).done;){var l=o.value;this.proxyOf.nodes.push(l)}return this.markDirty(),this},n.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes)for(var n,r=Mm(this.nodes);!(n=r()).done;){n.value.cleanRaws(t)}},n.each=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}},n.every=function(e){return this.nodes.every(e)},n.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e},n.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,[].concat(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[].concat([e.toProxy()],r))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}},n.index=function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))},n.insertAfter=function(e,t){var n,r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(var o,a=Mm(i);!(o=a()).done;){var s=o.value;this.proxyOf.nodes.splice(r+1,0,s)}for(var l in this.indexes)r<(n=this.indexes[l])&&(this.indexes[l]=n+i.length);return this.markDirty(),this},n.insertBefore=function(e,t){var n,r=this.index(e),i=0===r&&"prepend",o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(var a,s=Mm(o);!(a=s()).done;){var l=a.value;this.proxyOf.nodes.splice(r,0,l)}for(var c in this.indexes)r<=(n=this.indexes[c])&&(this.indexes[c]=n+o.length);return this.markDirty(),this},n.normalize=function(e,n){var r=this;if("string"==typeof e)e=Xv(Wv(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var i,o=Mm(e=e.slice(0));!(i=o()).done;){var a=i.value;a.parent&&a.parent.removeChild(a,"ignore")}else if("root"===e.type&&"document"!==this.type)for(var s,l=Mm(e=e.nodes.slice(0));!(s=l()).done;){var c=s.value;c.parent&&c.parent.removeChild(c,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Jv(e)]}else if(e.selector)e=[new qv(e)];else if(e.name)e=[new Hv(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Yv(e)]}return e.map(function(e){return e[Zv]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Gv]&&Qv(e),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.raws.before.replace(/\S/g,"")),e.parent=r.proxyOf,e})},n.prepend=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r,i=Mm(t=t.reverse());!(r=i()).done;){for(var o,a=r.value,s=this.normalize(a,this.first,"prepend").reverse(),l=Mm(s);!(o=l()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}for(var u in this.indexes)this.indexes[u]=this.indexes[u]+s.length}return this.markDirty(),this},n.push=function(e){return e.parent=this,this.proxyOf.nodes.push(e),this},n.removeAll=function(){for(var e,t=Mm(this.proxyOf.nodes);!(e=t()).done;){e.value.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},n.removeChild=function(e){var t;for(var 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},n.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this},n.some=function(e){return this.nodes.some(e)},n.walk=function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(tf){throw t.addToError(tf)}return!1!==r&&t.walk&&(r=t.walk(e)),r})},n.walkAtRules=function(e,t){return t?Im(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))},n.walkComments=function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})},n.walkDecls=function(e,t){return t?Im(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))},n.walkRules=function(e,t){return t?Im(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))},km(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]}}]),t}(iv);ey.registerParse=function(e){Wv=e},ey.registerRule=function(e){qv=e},ey.registerAtRule=function(e){Hv=e},ey.registerRoot=function(e){Kv=e};var ty=ey;ey.default=ey,ey.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,Hv.prototype):"rule"===e.type?Object.setPrototypeOf(e,qv.prototype):"decl"===e.type?Object.setPrototypeOf(e,Jv.prototype):"comment"===e.type?Object.setPrototypeOf(e,Yv.prototype):"root"===e.type&&Object.setPrototypeOf(e,Kv.prototype),e[Zv]=!0,e.nodes&&e.nodes.forEach(function(e){ey.rebuild(e)})};var ny,ry,iy=function(e){function t(t){var n;return(n=e.call(this,Sm({type:"document"},t))||this).nodes||(n.nodes=[]),n}return Em(t,e),t.prototype.toResult=function(e){return void 0===e&&(e={}),new ny(new ry,this,e).stringify()},t}(ty);iy.registerLazyResult=function(e){ny=e},iy.registerProcessor=function(e){ry=e};var oy=iy;iy.default=iy;var ay=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var r in t)this[r]=t[r]}return e.prototype.toString=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},e}(),sy=ay;ay.default=ay;var ly=sy,cy=function(){function e(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new ly(e,t);return this.messages.push(n),n},t.warnings=function(){return this.messages.filter(function(e){return"warning"===e.type})},km(e,[{key:"content",get:function(){return this.css}}]),e}(),uy=cy;cy.default=cy;var dy="'".charCodeAt(0),py='"'.charCodeAt(0),hy="\\".charCodeAt(0),fy="/".charCodeAt(0),my="\n".charCodeAt(0),gy=" ".charCodeAt(0),vy="\f".charCodeAt(0),yy="\t".charCodeAt(0),by="\r".charCodeAt(0),wy="[".charCodeAt(0),xy="]".charCodeAt(0),_y="(".charCodeAt(0),ky=")".charCodeAt(0),Sy="{".charCodeAt(0),Cy="}".charCodeAt(0),Ey=";".charCodeAt(0),Iy="*".charCodeAt(0),Ny=":".charCodeAt(0),Oy="@".charCodeAt(0),Ty=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ry=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,jy=/.[\r\n"'(/\\]/,My=/[\da-f]/i,Ay=ty,Py=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="atrule",n}Em(t,e);var n=t.prototype;return n.append=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=e.prototype.append).call.apply(i,[].concat([this],n))},n.prepend=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=e.prototype.prepend).call.apply(i,[].concat([this],n))},t}(Ay),Ly=Py;Py.default=Py,Ay.registerAtRule(Py);var Dy,Fy,zy=ty,Uy=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="root",n.nodes||(n.nodes=[]),n}Em(t,e);var n=t.prototype;return n.normalize=function(t,n,r){var i=e.prototype.normalize.call(this,t);if(n)if("prepend"===r)this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var o,a=Mm(i);!(o=a()).done;){o.value.raws.before=n.raws.before}return i},n.removeChild=function(t,n){var r=this.index(t);return!n&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},n.toResult=function(e){return void 0===e&&(e={}),new Dy(new Fy,this,e).stringify()},t}(zy);Uy.registerLazyResult=function(e){Dy=e},Uy.registerProcessor=function(e){Fy=e};var By=Uy;Uy.default=Uy,zy.registerRoot(Uy);var $y={comma:function(e){return $y.split(e,[","],!0)},space:function(e){return $y.split(e,[" ","\n","\t"])},split:function(e,t,n){for(var r,i=[],o="",a=!1,s=0,l=!1,c="",u=!1,d=Mm(e);!(r=d()).done;){var p=r.value;u?u=!1:"\\"===p?u=!0:l?p===c&&(l=!1):'"'===p||"'"===p?(l=!0,c=p):"("===p?s+=1:")"===p?s>0&&(s-=1):0===s&&t.includes(p)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=p}return(n||""!==o)&&i.push(o.trim()),i}},Vy=$y;$y.default=$y;var Wy=ty,qy=Vy,Hy=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="rule",n.nodes||(n.nodes=[]),n}return Em(t,e),km(t,[{key:"selectors",get:function(){return qy.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),t}(Wy),Ky=Hy;Hy.default=Hy,Wy.registerRule(Hy);var Gy=av,Zy=function(e,t){void 0===t&&(t={});var n,r,i,o,a,s,l,c,u,d,p=e.css.valueOf(),h=t.ignoreErrors,f=p.length,m=0,g=[],v=[];function y(t){throw e.error("Unclosed "+t,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&m>=f},nextToken:function(e){if(v.length)return v.pop();if(!(m>=f)){var t=!!e&&e.ignoreUnclosed;switch(n=p.charCodeAt(m)){case my:case gy:case yy:case by:case vy:r=m;do{r+=1,n=p.charCodeAt(r)}while(n===gy||n===my||n===yy||n===by||n===vy);d=["space",p.slice(m,r)],m=r-1;break;case wy:case xy:case Sy:case Cy:case Ny:case Ey:case ky:var b=String.fromCharCode(n);d=[b,b,m];break;case _y:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==dy&&u!==py&&u!==gy&&u!==my&&u!==yy&&u!==vy&&u!==by){r=m;do{if(s=!1,-1===(r=p.indexOf(")",r+1))){if(h||t){r=m;break}y("bracket")}for(l=r;p.charCodeAt(l-1)===hy;)l-=1,s=!s}while(s);d=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),o=p.slice(m,r+1),-1===r||jy.test(o)?d=["(","(",m]:(d=["brackets",o,m,r],m=r);break;case dy:case py:i=n===dy?"'":'"',r=m;do{if(s=!1,-1===(r=p.indexOf(i,r+1))){if(h||t){r=m+1;break}y("string")}for(l=r;p.charCodeAt(l-1)===hy;)l-=1,s=!s}while(s);d=["string",p.slice(m,r+1),m,r],m=r;break;case Oy:Ty.lastIndex=m+1,Ty.test(p),r=0===Ty.lastIndex?p.length-1:Ty.lastIndex-2,d=["at-word",p.slice(m,r+1),m,r],m=r;break;case hy:for(r=m,a=!0;p.charCodeAt(r+1)===hy;)r+=1,a=!a;if(n=p.charCodeAt(r+1),a&&n!==fy&&n!==gy&&n!==my&&n!==yy&&n!==by&&n!==vy&&(r+=1,My.test(p.charAt(r)))){for(;My.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===gy&&(r+=1)}d=["word",p.slice(m,r+1),m,r],m=r;break;default:n===fy&&p.charCodeAt(m+1)===Iy?(0===(r=p.indexOf("*/",m+2)+1)&&(h||t?r=p.length:y("comment")),d=["comment",p.slice(m,r+1),m,r],m=r):(Ry.lastIndex=m+1,Ry.test(p),r=0===Ry.lastIndex?p.length-1:Ry.lastIndex-2,d=["word",p.slice(m,r+1),m,r],g.push(d),m=r)}return m++,d}},position:function(){return m}}},Jy=Vv,Yy=Ly,Xy=By,Qy=Ky,eb={empty:!0,space:!0};var tb=function(){function e(e){this.input=e,this.root=new Xy,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t,n,r,i=new Yy;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.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(s.length>0){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}s.push(e)}else s.push(e);if(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)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}},t.colon=function(e){for(var t,n,r,i,o=0,a=Mm(e.entries());!(i=a()).done;){var s=i.value,l=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return l}this.doubleColon(t)}r=t}return!1},t.comment=function(e){var t=new Jy;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{var r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}},t.createTokenizer=function(){this.tokenizer=Zy(this.input)},t.decl=function(e,t){var n=new Gy;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;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(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 l=e.length-1;l>=0;l--){if("!important"===(r=e[l])[1].toLowerCase()){n.important=!0;var c=this.stringFrom(e,l);" !important"!==(c=this.spacesFromEnd(e)+c)&&(n.raws.important=c);break}if("important"===r[1].toLowerCase()){for(var u=e.slice(0),d="",p=l;p>0;p--){var h=u[p][0];if(0===d.trim().indexOf("!")&&"space"!==h)break;d=u.pop()[1]+d}0===d.trim().indexOf("!")&&(n.important=!0,n.raws.important=d,e=u)}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)},t.doubleColon=function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new Qy;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},t.end=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)},t.endFile=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())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=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)},t.other=function(e){for(var t=!1,n=null,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],l=e;l;){if(n=l[0],s.push(l),"("===n||"["===n)i||(i=l),o.push("("===n?")":"]");else if(a&&r&&"{"===n)i||(i=l),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!a)for(;s.length&&("space"===(l=s[s.length-1][0])||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)},t.parse=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()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,n,r){for(var i,o,a,s,l=n.length,c="",u=!0,d=0;d<l;d+=1)"space"!==(o=(i=n[d])[0])||d!==l-1||r?"comment"===o?(s=n[d-1]?n[d-1][0]:"empty",a=n[d+1]?n[d+1][0]:"empty",eb[s]||eb[a]||","===c.slice(-1)?u=!1:c+=i[1]):c+=i[1]:u=!1;if(!u){var p=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:p,value:c}}e[t]=c},t.rule=function(e){e.pop();var t=new Qy;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t},t.spacesAndCommentsFromEnd=function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n},t.spacesAndCommentsFromStart=function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n},t.spacesFromEnd=function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t},t.stringFrom=function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n},t.unclosedBlock=function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)},t.unclosedBracket=function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})},t.unexpectedClose=function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})},t.unknownWord=function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})},t.unnamedAtrule=function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})},e}(),nb=ty,rb=tb,ib=Tv;function ob(e,t){var n=new ib(e,t),r=new rb(n);try{r.parse()}catch(tf){throw tf}return r.root}var ab=ob;ob.default=ob,nb.registerParse(ob);var sb=Wg.isClean,lb=Wg.my,cb=Bv,ub=Jg,db=ty,pb=oy,hb=uy,fb=ab,mb=By,gb={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vb={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},yb={Once:!0,postcssPlugin:!0,prepare:!0};function bb(e){return"object"===(void 0===e?"undefined":Tm(e))&&"function"==typeof e.then}function wb(e){var t=!1,n=gb[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 xb(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:wb(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function _b(e){return e[sb]=!1,e.nodes&&e.nodes.forEach(function(e){return _b(e)}),e}var kb={},Sb=function(){function e(t,n,r){var i,o=this;if(this.stringified=!1,this.processed=!1,"object"!==(void 0===n?"undefined":Tm(n))||null===n||"root"!==n.type&&"document"!==n.type)if(Im(n,e)||Im(n,hb))i=_b(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var a=fb;r.syntax&&(a=r.syntax.parse),r.parser&&(a=r.parser),a.parse&&(a=a.parse);try{i=a(n,r)}catch(gE){this.processed=!0,this.error=gE}i&&!i[lb]&&db.rebuild(i)}else i=_b(n);this.result=new hb(t,i,r),this.helpers=Sm({},kb,{postcss:kb,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":Tm(e))&&e.prepare?Sm({},e,e.prepare(o.result)):e})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},t.handleError=function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion){0}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(r){console&&console.error}return e},t.prepareVisitors=function(){var e=this;this.listeners={};for(var t,n=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},r=Mm(this.plugins);!(t=r()).done;){var i=t.value;if("object"===(void 0===i?"undefined":Tm(i)))for(var o in i){if(!vb[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event "+o+" in "+i.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!yb[o])if("object"===Tm(i[o]))for(var a in i[o])n(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&n(i,o,i[o])}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var e=this;return xm(function(){var t,n,r,i,o,a,s,l,c,u,d,p;return Am(this,function(h){switch(h.label){case 0:e.plugin=0,t=0,h.label=1;case 1:if(!(t<e.plugins.length))return[3,6];if(n=e.plugins[t],!bb(r=e.runOnRoot(n)))return[3,5];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,r];case 3:return h.sent(),[3,5];case 4:throw i=h.sent(),e.handleError(i);case 5:return t++,[3,1];case 6:if(e.prepareVisitors(),!e.hasListener)return[3,18];o=e.result.root,h.label=7;case 7:if(o[sb])return[3,14];o[sb]=!0,a=[xb(o)],h.label=8;case 8:if(!(a.length>0))return[3,13];if(!bb(s=e.visitTick(a)))return[3,12];h.label=9;case 9:return h.trys.push([9,11,,12]),[4,s];case 10:return h.sent(),[3,12];case 11:throw l=h.sent(),c=a[a.length-1].node,e.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];u=function(){var t,n,r,i,a;return Am(this,function(s){switch(s.label){case 0:t=p.value,n=t[0],r=t[1],e.result.lastPlugin=n,s.label=1;case 1:return s.trys.push([1,6,,7]),"document"!==o.type?[3,3]:(i=o.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return s.sent(),[3,5];case 3:return[4,r(o,e.helpers)];case 4:s.sent(),s.label=5;case 5:return[3,7];case 6:throw a=s.sent(),e.handleError(a);case 7:return[2]}})},d=Mm(e.listeners.OnceExit),h.label=15;case 15:return(p=d()).done?[3,18]:[5,Pm(u())];case 16:h.sent(),h.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":Tm(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return bb(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(gE){throw this.handleError(gE)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=ub;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new cb(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=Mm(this.plugins);!(e=t()).done;){var n=e.value;if(bb(this.runOnRoot(n)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[sb];)r[sb]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type)for(var i,o=Mm(r.nodes);!(i=o()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}else this.visitSync(this.listeners.OnceExit,r)}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var n,r=Mm(e);!(n=r()).done;){var i=n.value,o=i[0],a=i[1];this.result.lastPlugin=o;var s=void 0;try{s=a(t,this.helpers)}catch(tf){throw this.handleError(tf,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(bb(s))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(r.length>0&&t.visitorIndex<r.length){var i=r[t.visitorIndex],o=i[0],a=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(n.toProxy(),this.helpers)}catch(tf){throw this.handleError(tf,n)}}if(0!==t.iterator){for(var s,l=t.iterator;s=n.nodes[n.indexes[l]];)if(n.indexes[l]+=1,!s[sb])return s[sb]=!0,void e.push(xb(s));t.iterator=0,delete n.indexes[l]}for(var c=t.events;t.eventIndex<c.length;){var u=c[t.eventIndex];if(t.eventIndex+=1,0===u)return void(n.nodes&&n.nodes.length&&(n[sb]=!0,t.iterator=n.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}e.pop()}else e.pop()},t.walkSync=function(e){var t=this;e[sb]=!0;for(var n,r=Mm(wb(e));!(n=r()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[sb]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()},km(e,[{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"}}]),e}();Sb.registerPostcss=function(e){kb=e};var Cb=Sb;Sb.default=Sb,mb.registerLazyResult(Sb),pb.registerLazyResult(Sb);var Eb=Bv,Ib=Jg,Nb=ab,Ob=uy,Tb=function(){function e(e,t,n){var r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var i=Ib;this.result=new Ob(this._processor,r,this._opts),this.result.css=t;var o=this;Object.defineProperty(this.result,"root",{get:function(){return o.root}});var a=new Eb(i,r,this._opts,t);if(a.isMap()){var s=a.generate(),l=s[0],c=s[1];l&&(this.result.css=l),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this._css},t.warnings=function(){return[]},km(e,[{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=Nb;try{e=t(this._css,this._opts)}catch(gE){this.error=gE}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e}(),Rb=Tb;Tb.default=Tb;var jb=Rb,Mb=Cb,Ab=oy,Pb=By,Lb=function(){function e(e){void 0===e&&(e=[]),this.version="8.4.38",this.plugins=this.normalize(e)}var t=e.prototype;return t.normalize=function(e){for(var t,n=[],r=Mm(e);!(t=r()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===(void 0===i?"undefined":Tm(i))&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===(void 0===i?"undefined":Tm(i))&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else if("object"!==(void 0===i?"undefined":Tm(i))||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin")}return n},t.process=function(e,t){return void 0===t&&(t={}),this.plugins.length||t.parser||t.stringifier||t.syntax?new Mb(this,e,t):new jb(this,e,t)},t.use=function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this},e}(),Db=Lb;Lb.default=Lb,Pb.registerProcessor(Lb),Ab.registerProcessor(Lb);var Fb=av,zb=mv,Ub=Vv,Bb=Ly,$b=Tv,Vb=By,Wb=Ky;function qb(e,t){if(Array.isArray(e))return e.map(function(e){return qb(e)});var n=e.inputs,r=Nm(e,["inputs"]);if(n){t=[];for(var i,o=Mm(n);!(i=o()).done;){var a=Sm({},i.value,{__proto__:$b.prototype});a.map&&(a.map=Sm({},a.map,{__proto__:zb.prototype})),t.push(a)}}if(r.nodes&&(r.nodes=e.nodes.map(function(e){return qb(e,t)})),r.source){var s=r.source,l=s.inputId,c=Nm(s,["inputId"]);r.source=c,null!=l&&(r.source.input=t[l])}if("root"===r.type)return new Vb(r);if("decl"===r.type)return new Fb(r);if("rule"===r.type)return new Wb(r);if("comment"===r.type)return new Ub(r);if("atrule"===r.type)return new Bb(r);throw new Error("Unknown node type: "+e.type)}var Hb=qb;qb.default=qb;var Kb=Vg,Gb=av,Zb=Cb,Jb=ty,Yb=Db,Xb=Jg,Qb=Hb,ew=oy,tw=sy,nw=Vv,rw=Ly,iw=uy,ow=Tv,aw=ab,sw=Vy,lw=Ky,cw=By,uw=iv;function dw(){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)}dw.plugin=function(e,t){var n,r=!1;function i(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];console&&console.warn&&!r&&(r=!0,vm.LANG&&vm.LANG.startsWith("cn"));var a=t.apply(void 0,[].concat(i));return a.postcssPlugin=e,a.postcssVersion=(new Yb).version,a}return Object.defineProperty(i,"postcss",{get:function(){return n||(n=i()),n}}),i.process=function(e,t,n){return dw([i(n)]).process(e,t)},i},dw.stringify=Xb,dw.parse=aw,dw.fromJSON=Qb,dw.list=sw,dw.comment=function(e){return new nw(e)},dw.atRule=function(e){return new rw(e)},dw.decl=function(e){return new Gb(e)},dw.rule=function(e){return new lw(e)},dw.root=function(e){return new cw(e)},dw.document=function(e){return new ew(e)},dw.CssSyntaxError=Kb,dw.Declaration=Gb,dw.Container=Jb,dw.Processor=Yb,dw.Document=ew,dw.Comment=nw,dw.Warning=tw,dw.AtRule=rw,dw.Result=iw,dw.Input=ow,dw.Rule=lw,dw.Root=cw,dw.Node=uw,Zb.registerPostcss(dw);var pw=dw;dw.default=dw;var hw=Mg(pw);hw.stringify,hw.fromJSON,hw.plugin,hw.parse,hw.list,hw.document,hw.comment,hw.atRule,hw.rule,hw.decl,hw.root,hw.CssSyntaxError,hw.Declaration,hw.Container,hw.Processor,hw.Document,hw.Comment,hw.Warning,hw.AtRule,hw.Result,hw.Input,hw.Rule,hw.Root,hw.Node;var fw=Object.defineProperty,mw=function(e,t,n){return function(e,t,n){return t in e?fw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":Tm(t))?t+"":t,n)};function gw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vw(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return Im(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var yw={exports:{}},bw=String,ww=function(){return{isColorSupported:!1,reset:bw,bold:bw,dim:bw,italic:bw,underline:bw,inverse:bw,hidden:bw,strikethrough:bw,black:bw,red:bw,green:bw,yellow:bw,blue:bw,magenta:bw,cyan:bw,white:bw,gray:bw,bgBlack:bw,bgRed:bw,bgGreen:bw,bgYellow:bw,bgBlue:bw,bgMagenta:bw,bgCyan:bw,bgWhite:bw}};yw.exports=ww(),yw.exports.createColors=ww;var xw=yw.exports,_w=vw(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),kw=xw,Sw=_w,Cw=function(e){function t(n,r,i,o,a,s){var l;return(l=e.call(this,n)||this).name="CssSyntaxError",l.reason=n,a&&(l.file=a),o&&(l.source=o),s&&(l.plugin=s),void 0!==r&&void 0!==i&&("number"==typeof r?(l.line=r,l.column=i):(l.line=r.line,l.column=r.column,l.endLine=i.line,l.endColumn=i.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,t),l}Em(t,e);var n=t.prototype;return n.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},n.showSourceCode=function(e){var t=this;if(!this.source)return"";var n=this.source;null==e&&(e=kw.isColorSupported),Sw&&e&&(n=Sw(n));var r,i,o=n.split(/\r?\n/),a=Math.max(this.line-3,0),s=Math.min(this.line+2,o.length),l=String(s).length;if(e){var c=kw.createColors(!0),u=c.bold,d=c.gray,p=c.red;r=function(e){return u(p(e))},i=function(e){return d(e)}}else r=i=function(e){return e};return o.slice(a,s).map(function(e,n){var o=a+1+n,s=" "+(" "+o).slice(-l)+" | ";if(o===t.line){var c=i(s.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return r(">")+i(s)+e+"\n "+c+r("^")}return" "+i(s)+e}).join("\n")},n.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},t}(Rm(Error)),Ew=Cw;Cw.default=Cw;var Iw={};Iw.isClean=Symbol("isClean"),Iw.my=Symbol("my");var Nw={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var Ow=function(){function e(e){this.builder=e}var t=e.prototype;return t.atrule=function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}},t.beforeAfter=function(e,t){var n;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");for(var 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},t.block=function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")},t.body=function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;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)}},t.comment=function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)},t.decl=function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)},t.document=function(e){this.body(e)},t.raw=function(e,t,n){var r;if(n||(n=t),t&&void 0!==(r=e.raws[t]))return r;var i=e.parent;if("before"===n){if(!i||"root"===i.type&&i.first===e)return"";if(i&&"document"===i.type)return""}if(!i)return Nw[n];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[n])return o.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);var a,s="raw"+((a=n)[0].toUpperCase()+a.slice(1));return this[s]?r=this[s](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=Nw[n]),o.rawCache[n]=r,r},t.rawBeforeClose=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawBeforeComment=function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeDecl=function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},t.rawEmptyBody=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},t.rawIndent=function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t},t.rawSemicolon=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},t.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},t.stringify=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)},e}(),Tw=Ow;Ow.default=Ow;var Rw=Tw;function jw(e,t){new Rw(t).stringify(e)}var Mw=jw;jw.default=jw;var Aw=Iw.isClean,Pw=Iw.my,Lw=Ew,Dw=Tw,Fw=Mw;function zw(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":Tm(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return zw(e,n)}):("object"===o&&null!==i&&(i=zw(i)),n[r]=i)}return n}var Uw=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},this[Aw]=!1,this[Pw]=!0,e)if("nodes"===t){this.nodes=[];for(var n,r=Mm(e[t]);!(n=r()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){void 0===e&&(e={});var t=zw(this);for(var n in e)t[n]=e[n];return t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(void 0===t&&(t={}),this.source){var n=this.rangeBy(t),r=n.end,i=n.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Lw(e)},t.getProxyProcessor=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}}},t.markDirty=function(){if(this[Aw]){this[Aw]=!1;for(var e=this;e=e.parent;)e[Aw]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n},t.positionInside=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]?(r=1,i+=1):r+=1;return{column:r,line:i}},t.prev=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}},t.rangeBy=function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}},t.raw=function(e,t){return(new Dw).raw(this,e,t)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){for(var r,i=this,o=!1,a=Mm(t);!(r=a()).done;){var s=r.value;s===this?o=!0:o?(this.parent.insertAfter(i,s),i=s):this.parent.insertBefore(i,s)}o||this.remove()}return this},t.root=function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e},t.toJSON=function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var a=this[o];if(Array.isArray(a))n[o]=a.map(function(e){return"object"===(void 0===e?"undefined":Tm(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===a?"undefined":Tm(a))&&a.toJSON)n[o]=a.toJSON(null,t);else if("source"===o){var s=t.get(a.input);null==s&&(s=i,t.set(a.input,i),i++),n[o]={end:a.end,inputId:s,start:a.start}}else n[o]=a}return r&&(n.inputs=[].concat(t.keys()).map(function(e){return e.toJSON()})),n},t.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},t.toString=function(e){void 0===e&&(e=Fw),e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t},t.warn=function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)},km(e,[{key:"proxyOf",get:function(){return this}}]),e}(),Bw=Uw;Uw.default=Uw;var $w=function(e){function t(t){var n;return t&&void 0!==t.value&&"string"!=typeof t.value&&(t=Sm({},t,{value:String(t.value)})),(n=e.call(this,t)||this).type="decl",n}return Em(t,e),km(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(Bw),Vw=$w;$w.default=$w;var Ww=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},qw=_w.SourceMapConsumer,Hw=_w.SourceMapGenerator,Kw=_w.existsSync,Gw=_w.readFileSync,Zw=_w.dirname,Jw=_w.join;var Yw=function(){function e(e,t){if(!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Zw(this.mapFile)),r&&(this.text=r)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||(this.consumerCache=new qw(this.text)),this.consumerCache},t.decodeInline=function(e){var t;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 n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)},t.getAnnotationURL=function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},t.isMap=function(e){return"object"===(void 0===e?"undefined":Tm(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))},t.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}},t.loadFile=function(e){if(this.root=Zw(e),Kw(e))return this.mapFile=e,Gw(e,"utf-8").toString().trim()},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(Im(t,qw))return Hw.fromSourceMap(t).toString();if(Im(t,Hw))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){var r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var i=this.annotation;return e&&(i=Jw(Zw(e),i)),this.loadFile(i)}}},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),Xw=Yw;Yw.default=Yw;var Qw=_w.SourceMapConsumer,ex=_w.SourceMapGenerator,tx=_w.fileURLToPath,nx=_w.pathToFileURL,rx=_w.isAbsolute,ix=_w.resolve,ox=Ww,ax=_w,sx=Ew,lx=Xw,cx=Symbol("fromOffsetCache"),ux=Boolean(Qw&&ex),dx=Boolean(ix&&rx),px=function(){function e(e,t){if(void 0===t&&(t={}),null==e||"object"===(void 0===e?"undefined":Tm(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(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&&(!dx||/^\w+:\/\//.test(t.from)||rx(t.from)?this.file=t.from:this.file=ix(t.from)),dx&&ux){var n=new lx(this.css,t);if(n.text){this.map=n;var r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+ox(6)+">"),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,n,r){var i,o,a;if(void 0===r&&(r={}),t&&"object"===(void 0===t?"undefined":Tm(t))){var s=t,l=n;if("number"==typeof s.offset){var c=this.fromOffset(s.offset);t=c.line,n=c.col}else t=s.line,n=s.column;if("number"==typeof l.offset){var u=this.fromOffset(l.offset);o=u.line,a=u.col}else o=l.line,a=l.column}else if(!n){var d=this.fromOffset(t);t=d.line,n=d.col}var p=this.origin(t,n,o,a);return(i=p?new sx(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,r.plugin):new sx(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:a,line:o},this.css,this.file,r.plugin)).input={column:n,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(nx&&(i.input.url=nx(this.file).toString()),i.input.file=this.file),i},t.fromOffset=function(e){var t;if(this[cx])t=this[cx];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[cx]=t}var a=0;if(e>=t[t.length-1])a=t.length-1;else for(var s,l=t.length-2;a<l;)if(e<t[s=a+(l-a>>1)])l=s-1;else{if(!(e>=t[s+1])){a=s;break}a=s+1}return{col:e-t[a]+1,line:a+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:ix(this.map.consumer().sourceRoot||this.map.root||".",e)},t.origin=function(e,t,n,r){if(!this.map)return!1;var i,o,a=this.map.consumer(),s=a.originalPositionFor({column:t,line:e});if(!s.source)return!1;"number"==typeof n&&(i=a.originalPositionFor({column:r,line:n})),o=rx(s.source)?nx(s.source):new URL(s.source,this.map.consumer().sourceRoot||nx(this.map.mapFile));var l={column:s.column,endColumn:i&&i.column,endLine:i&&i.line,line:s.line,url:o.toString()};if("file:"===o.protocol){if(!tx)throw new Error("file: protocol is not available in this PostCSS build");l.file=tx(o)}var c=a.sourceContentFor(s.source);return c&&(l.source=c),l},t.toJSON=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=Sm({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e},km(e,[{key:"from",get:function(){return this.file||this.id}}]),e}(),hx=px;px.default=px,ax&&ax.registerInput&&ax.registerInput(px);var fx=_w.SourceMapConsumer,mx=_w.SourceMapGenerator,gx=_w.dirname,vx=_w.relative,yx=_w.resolve,bx=_w.sep,wx=_w.pathToFileURL,xx=hx,_x=Boolean(fx&&mx),kx=Boolean(gx&&yx&&vx&&bx),Sx=function(){function e(e,t,n,r){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}var t=e.prototype;return t.addAnnotation=function(){var e;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";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"},t.applyPrevMaps=function(){for(var e,t=Mm(this.previous());!(e=t()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||gx(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new fx(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}},t.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;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,""))},t.generate=function(){if(this.clearAnnotation(),kx&&_x&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=mx.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new mx({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>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css="",this.map=new mx({file:this.outputFile(),ignoreInvalidMapping:!0});var t,n,r=1,i=1,o="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(s,l,c){if(e.css+=s,l&&"end"!==c&&(a.generated.line=r,a.generated.column=i-1,l.source&&l.source.start?(a.source=e.sourcePath(l),a.original.line=l.source.start.line,a.original.column=l.source.start.column-1,e.map.addMapping(a)):(a.source=o,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(t=s.match(/\n/g))?(r+=t.length,n=s.lastIndexOf("\n"),i=s.length-n):i+=s.length,l&&"start"!==c){var u=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===u.last&&!u.raws.semicolon||(l.source&&l.source.end?(a.source=e.sourcePath(l),a.original.line=l.source.end.line,a.original.column=l.source.end.column-1,a.generated.line=r,a.generated.column=i-2,e.map.addMapping(a)):(a.source=o,a.original.line=1,a.original.column=0,a.generated.line=r,a.generated.column=i-1,e.map.addMapping(a)))}})},t.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},t.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},t.isMap=function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},t.path=function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var n=this.opts.to?gx(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=gx(yx(n,this.mapOpts.annotation)));var r=vx(n,e);return this.memoizedPaths.set(e,r),r},t.previous=function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new xx(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}},t.sourcePath=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))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(wx){var n=wx(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===bx&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n},e}(),Cx=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="comment",n}return Em(t,e),t}(Bw),Ex=Cx;Cx.default=Cx;var Ix,Nx,Ox,Tx,Rx=Iw.isClean,jx=Iw.my,Mx=Vw,Ax=Ex;function Px(e){return e.map(function(e){return e.nodes&&(e.nodes=Px(e.nodes)),delete e.source,e})}function Lx(e){if(e[Rx]=!1,e.proxyOf.nodes)for(var t,n=Mm(e.proxyOf.nodes);!(t=n()).done;){Lx(t.value)}}var Dx=function(e){function t(){return e.apply(this,arguments)||this}Em(t,e);var n=t.prototype;return n.append=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r,i=Mm(t);!(r=i()).done;)for(var o,a=r.value,s=Mm(this.normalize(a,this.last));!(o=s()).done;){var l=o.value;this.proxyOf.nodes.push(l)}return this.markDirty(),this},n.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes)for(var n,r=Mm(this.nodes);!(n=r()).done;){n.value.cleanRaws(t)}},n.each=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}},n.every=function(e){return this.nodes.every(e)},n.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e},n.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,[].concat(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[].concat([e.toProxy()],r))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}},n.index=function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))},n.insertAfter=function(e,t){var n,r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(var o,a=Mm(i);!(o=a()).done;){var s=o.value;this.proxyOf.nodes.splice(r+1,0,s)}for(var l in this.indexes)r<(n=this.indexes[l])&&(this.indexes[l]=n+i.length);return this.markDirty(),this},n.insertBefore=function(e,t){var n,r=this.index(e),i=0===r&&"prepend",o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(var a,s=Mm(o);!(a=s()).done;){var l=a.value;this.proxyOf.nodes.splice(r,0,l)}for(var c in this.indexes)r<=(n=this.indexes[c])&&(this.indexes[c]=n+o.length);return this.markDirty(),this},n.normalize=function(e,n){var r=this;if("string"==typeof e)e=Px(Ix(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var i,o=Mm(e=e.slice(0));!(i=o()).done;){var a=i.value;a.parent&&a.parent.removeChild(a,"ignore")}else if("root"===e.type&&"document"!==this.type)for(var s,l=Mm(e=e.nodes.slice(0));!(s=l()).done;){var c=s.value;c.parent&&c.parent.removeChild(c,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Mx(e)]}else if(e.selector)e=[new Nx(e)];else if(e.name)e=[new Ox(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Ax(e)]}return e.map(function(e){return e[jx]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Rx]&&Lx(e),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.raws.before.replace(/\S/g,"")),e.parent=r.proxyOf,e})},n.prepend=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r,i=Mm(t=t.reverse());!(r=i()).done;){for(var o,a=r.value,s=this.normalize(a,this.first,"prepend").reverse(),l=Mm(s);!(o=l()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}for(var u in this.indexes)this.indexes[u]=this.indexes[u]+s.length}return this.markDirty(),this},n.push=function(e){return e.parent=this,this.proxyOf.nodes.push(e),this},n.removeAll=function(){for(var e,t=Mm(this.proxyOf.nodes);!(e=t()).done;){e.value.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},n.removeChild=function(e){var t;for(var 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},n.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this},n.some=function(e){return this.nodes.some(e)},n.walk=function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(tf){throw t.addToError(tf)}return!1!==r&&t.walk&&(r=t.walk(e)),r})},n.walkAtRules=function(e,t){return t?Im(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))},n.walkComments=function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})},n.walkDecls=function(e,t){return t?Im(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))},n.walkRules=function(e,t){return t?Im(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))},km(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]}}]),t}(Bw);Dx.registerParse=function(e){Ix=e},Dx.registerRule=function(e){Nx=e},Dx.registerAtRule=function(e){Ox=e},Dx.registerRoot=function(e){Tx=e};var Fx=Dx;Dx.default=Dx,Dx.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,Ox.prototype):"rule"===e.type?Object.setPrototypeOf(e,Nx.prototype):"decl"===e.type?Object.setPrototypeOf(e,Mx.prototype):"comment"===e.type?Object.setPrototypeOf(e,Ax.prototype):"root"===e.type&&Object.setPrototypeOf(e,Tx.prototype),e[jx]=!0,e.nodes&&e.nodes.forEach(function(e){Dx.rebuild(e)})};var zx,Ux,Bx=function(e){function t(t){var n;return(n=e.call(this,Sm({type:"document"},t))||this).nodes||(n.nodes=[]),n}return Em(t,e),t.prototype.toResult=function(e){return void 0===e&&(e={}),new zx(new Ux,this,e).stringify()},t}(Fx);Bx.registerLazyResult=function(e){zx=e},Bx.registerProcessor=function(e){Ux=e};var $x=Bx;Bx.default=Bx;var Vx=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var r in t)this[r]=t[r]}return e.prototype.toString=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},e}(),Wx=Vx;Vx.default=Vx;var qx=Wx,Hx=function(){function e(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new qx(e,t);return this.messages.push(n),n},t.warnings=function(){return this.messages.filter(function(e){return"warning"===e.type})},km(e,[{key:"content",get:function(){return this.css}}]),e}(),Kx=Hx;Hx.default=Hx;var Gx="'".charCodeAt(0),Zx='"'.charCodeAt(0),Jx="\\".charCodeAt(0),Yx="/".charCodeAt(0),Xx="\n".charCodeAt(0),Qx=" ".charCodeAt(0),e_="\f".charCodeAt(0),t_="\t".charCodeAt(0),n_="\r".charCodeAt(0),r_="[".charCodeAt(0),i_="]".charCodeAt(0),o_="(".charCodeAt(0),a_=")".charCodeAt(0),s_="{".charCodeAt(0),l_="}".charCodeAt(0),c_=";".charCodeAt(0),u_="*".charCodeAt(0),d_=":".charCodeAt(0),p_="@".charCodeAt(0),h_=/[\t\n\f\r "#'()/;[\\\]{}]/g,f_=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,m_=/.[\r\n"'(/\\]/,g_=/[\da-f]/i,v_=Fx,y_=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="atrule",n}Em(t,e);var n=t.prototype;return n.append=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=e.prototype.append).call.apply(i,[].concat([this],n))},n.prepend=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=e.prototype.prepend).call.apply(i,[].concat([this],n))},t}(v_),b_=y_;y_.default=y_,v_.registerAtRule(y_);var w_,x_,__=Fx,k_=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="root",n.nodes||(n.nodes=[]),n}Em(t,e);var n=t.prototype;return n.normalize=function(t,n,r){var i=e.prototype.normalize.call(this,t);if(n)if("prepend"===r)this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var o,a=Mm(i);!(o=a()).done;){o.value.raws.before=n.raws.before}return i},n.removeChild=function(t,n){var r=this.index(t);return!n&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},n.toResult=function(e){return void 0===e&&(e={}),new w_(new x_,this,e).stringify()},t}(__);k_.registerLazyResult=function(e){w_=e},k_.registerProcessor=function(e){x_=e};var S_=k_;k_.default=k_,__.registerRoot(k_);var C_={comma:function(e){return C_.split(e,[","],!0)},space:function(e){return C_.split(e,[" ","\n","\t"])},split:function(e,t,n){for(var r,i=[],o="",a=!1,s=0,l=!1,c="",u=!1,d=Mm(e);!(r=d()).done;){var p=r.value;u?u=!1:"\\"===p?u=!0:l?p===c&&(l=!1):'"'===p||"'"===p?(l=!0,c=p):"("===p?s+=1:")"===p?s>0&&(s-=1):0===s&&t.includes(p)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=p}return(n||""!==o)&&i.push(o.trim()),i}},E_=C_;C_.default=C_;var I_=Fx,N_=E_,O_=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="rule",n.nodes||(n.nodes=[]),n}return Em(t,e),km(t,[{key:"selectors",get:function(){return N_.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),t}(I_),T_=O_;O_.default=O_,I_.registerRule(O_);var R_=Vw,j_=function(e,t){void 0===t&&(t={});var n,r,i,o,a,s,l,c,u,d,p=e.css.valueOf(),h=t.ignoreErrors,f=p.length,m=0,g=[],v=[];function y(t){throw e.error("Unclosed "+t,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&m>=f},nextToken:function(e){if(v.length)return v.pop();if(!(m>=f)){var t=!!e&&e.ignoreUnclosed;switch(n=p.charCodeAt(m)){case Xx:case Qx:case t_:case n_:case e_:r=m;do{r+=1,n=p.charCodeAt(r)}while(n===Qx||n===Xx||n===t_||n===n_||n===e_);d=["space",p.slice(m,r)],m=r-1;break;case r_:case i_:case s_:case l_:case d_:case c_:case a_:var b=String.fromCharCode(n);d=[b,b,m];break;case o_:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==Gx&&u!==Zx&&u!==Qx&&u!==Xx&&u!==t_&&u!==e_&&u!==n_){r=m;do{if(s=!1,-1===(r=p.indexOf(")",r+1))){if(h||t){r=m;break}y("bracket")}for(l=r;p.charCodeAt(l-1)===Jx;)l-=1,s=!s}while(s);d=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),o=p.slice(m,r+1),-1===r||m_.test(o)?d=["(","(",m]:(d=["brackets",o,m,r],m=r);break;case Gx:case Zx:i=n===Gx?"'":'"',r=m;do{if(s=!1,-1===(r=p.indexOf(i,r+1))){if(h||t){r=m+1;break}y("string")}for(l=r;p.charCodeAt(l-1)===Jx;)l-=1,s=!s}while(s);d=["string",p.slice(m,r+1),m,r],m=r;break;case p_:h_.lastIndex=m+1,h_.test(p),r=0===h_.lastIndex?p.length-1:h_.lastIndex-2,d=["at-word",p.slice(m,r+1),m,r],m=r;break;case Jx:for(r=m,a=!0;p.charCodeAt(r+1)===Jx;)r+=1,a=!a;if(n=p.charCodeAt(r+1),a&&n!==Yx&&n!==Qx&&n!==Xx&&n!==t_&&n!==n_&&n!==e_&&(r+=1,g_.test(p.charAt(r)))){for(;g_.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===Qx&&(r+=1)}d=["word",p.slice(m,r+1),m,r],m=r;break;default:n===Yx&&p.charCodeAt(m+1)===u_?(0===(r=p.indexOf("*/",m+2)+1)&&(h||t?r=p.length:y("comment")),d=["comment",p.slice(m,r+1),m,r],m=r):(f_.lastIndex=m+1,f_.test(p),r=0===f_.lastIndex?p.length-1:f_.lastIndex-2,d=["word",p.slice(m,r+1),m,r],g.push(d),m=r)}return m++,d}},position:function(){return m}}},M_=Ex,A_=b_,P_=S_,L_=T_,D_={empty:!0,space:!0};var F_=function(){function e(e){this.input=e,this.root=new P_,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t,n,r,i=new A_;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.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(s.length>0){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}s.push(e)}else s.push(e);if(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)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}},t.colon=function(e){for(var t,n,r,i,o=0,a=Mm(e.entries());!(i=a()).done;){var s=i.value,l=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return l}this.doubleColon(t)}r=t}return!1},t.comment=function(e){var t=new M_;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{var r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}},t.createTokenizer=function(){this.tokenizer=j_(this.input)},t.decl=function(e,t){var n=new R_;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;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(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 l=e.length-1;l>=0;l--){if("!important"===(r=e[l])[1].toLowerCase()){n.important=!0;var c=this.stringFrom(e,l);" !important"!==(c=this.spacesFromEnd(e)+c)&&(n.raws.important=c);break}if("important"===r[1].toLowerCase()){for(var u=e.slice(0),d="",p=l;p>0;p--){var h=u[p][0];if(0===d.trim().indexOf("!")&&"space"!==h)break;d=u.pop()[1]+d}0===d.trim().indexOf("!")&&(n.important=!0,n.raws.important=d,e=u)}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)},t.doubleColon=function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new L_;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},t.end=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)},t.endFile=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())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=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)},t.other=function(e){for(var t=!1,n=null,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],l=e;l;){if(n=l[0],s.push(l),"("===n||"["===n)i||(i=l),o.push("("===n?")":"]");else if(a&&r&&"{"===n)i||(i=l),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!a)for(;s.length&&("space"===(l=s[s.length-1][0])||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)},t.parse=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()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,n,r){for(var i,o,a,s,l=n.length,c="",u=!0,d=0;d<l;d+=1)"space"!==(o=(i=n[d])[0])||d!==l-1||r?"comment"===o?(s=n[d-1]?n[d-1][0]:"empty",a=n[d+1]?n[d+1][0]:"empty",D_[s]||D_[a]||","===c.slice(-1)?u=!1:c+=i[1]):c+=i[1]:u=!1;if(!u){var p=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:p,value:c}}e[t]=c},t.rule=function(e){e.pop();var t=new L_;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t},t.spacesAndCommentsFromEnd=function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n},t.spacesAndCommentsFromStart=function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n},t.spacesFromEnd=function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t},t.stringFrom=function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n},t.unclosedBlock=function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)},t.unclosedBracket=function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})},t.unexpectedClose=function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})},t.unknownWord=function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})},t.unnamedAtrule=function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})},e}(),z_=Fx,U_=F_,B_=hx;function $_(e,t){var n=new B_(e,t),r=new U_(n);try{r.parse()}catch(tf){throw tf}return r.root}var V_=$_;$_.default=$_,z_.registerParse($_);var W_=Iw.isClean,q_=Iw.my,H_=Sx,K_=Mw,G_=Fx,Z_=$x,J_=Kx,Y_=V_,X_=S_,Q_={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ek={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},tk={Once:!0,postcssPlugin:!0,prepare:!0};function nk(e){return"object"===(void 0===e?"undefined":Tm(e))&&"function"==typeof e.then}function rk(e){var t=!1,n=Q_[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 ik(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:rk(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function ok(e){return e[W_]=!1,e.nodes&&e.nodes.forEach(function(e){return ok(e)}),e}var ak={},sk=function(){function e(t,n,r){var i,o=this;if(this.stringified=!1,this.processed=!1,"object"!==(void 0===n?"undefined":Tm(n))||null===n||"root"!==n.type&&"document"!==n.type)if(Im(n,e)||Im(n,J_))i=ok(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var a=Y_;r.syntax&&(a=r.syntax.parse),r.parser&&(a=r.parser),a.parse&&(a=a.parse);try{i=a(n,r)}catch(gE){this.processed=!0,this.error=gE}i&&!i[q_]&&G_.rebuild(i)}else i=ok(n);this.result=new J_(t,i,r),this.helpers=Sm({},ak,{postcss:ak,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":Tm(e))&&e.prepare?Sm({},e,e.prepare(o.result)):e})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},t.handleError=function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion){0}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(r){console&&console.error}return e},t.prepareVisitors=function(){var e=this;this.listeners={};for(var t,n=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},r=Mm(this.plugins);!(t=r()).done;){var i=t.value;if("object"===(void 0===i?"undefined":Tm(i)))for(var o in i){if(!ek[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event "+o+" in "+i.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!tk[o])if("object"===Tm(i[o]))for(var a in i[o])n(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&n(i,o,i[o])}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var e=this;return xm(function(){var t,n,r,i,o,a,s,l,c,u,d,p;return Am(this,function(h){switch(h.label){case 0:e.plugin=0,t=0,h.label=1;case 1:if(!(t<e.plugins.length))return[3,6];if(n=e.plugins[t],!nk(r=e.runOnRoot(n)))return[3,5];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,r];case 3:return h.sent(),[3,5];case 4:throw i=h.sent(),e.handleError(i);case 5:return t++,[3,1];case 6:if(e.prepareVisitors(),!e.hasListener)return[3,18];o=e.result.root,h.label=7;case 7:if(o[W_])return[3,14];o[W_]=!0,a=[ik(o)],h.label=8;case 8:if(!(a.length>0))return[3,13];if(!nk(s=e.visitTick(a)))return[3,12];h.label=9;case 9:return h.trys.push([9,11,,12]),[4,s];case 10:return h.sent(),[3,12];case 11:throw l=h.sent(),c=a[a.length-1].node,e.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];u=function(){var t,n,r,i,a;return Am(this,function(s){switch(s.label){case 0:t=p.value,n=t[0],r=t[1],e.result.lastPlugin=n,s.label=1;case 1:return s.trys.push([1,6,,7]),"document"!==o.type?[3,3]:(i=o.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return s.sent(),[3,5];case 3:return[4,r(o,e.helpers)];case 4:s.sent(),s.label=5;case 5:return[3,7];case 6:throw a=s.sent(),e.handleError(a);case 7:return[2]}})},d=Mm(e.listeners.OnceExit),h.label=15;case 15:return(p=d()).done?[3,18]:[5,Pm(u())];case 16:h.sent(),h.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":Tm(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return nk(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(gE){throw this.handleError(gE)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=K_;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new H_(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=Mm(this.plugins);!(e=t()).done;){var n=e.value;if(nk(this.runOnRoot(n)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[W_];)r[W_]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type)for(var i,o=Mm(r.nodes);!(i=o()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}else this.visitSync(this.listeners.OnceExit,r)}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var n,r=Mm(e);!(n=r()).done;){var i=n.value,o=i[0],a=i[1];this.result.lastPlugin=o;var s=void 0;try{s=a(t,this.helpers)}catch(tf){throw this.handleError(tf,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(nk(s))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(r.length>0&&t.visitorIndex<r.length){var i=r[t.visitorIndex],o=i[0],a=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(n.toProxy(),this.helpers)}catch(tf){throw this.handleError(tf,n)}}if(0!==t.iterator){for(var s,l=t.iterator;s=n.nodes[n.indexes[l]];)if(n.indexes[l]+=1,!s[W_])return s[W_]=!0,void e.push(ik(s));t.iterator=0,delete n.indexes[l]}for(var c=t.events;t.eventIndex<c.length;){var u=c[t.eventIndex];if(t.eventIndex+=1,0===u)return void(n.nodes&&n.nodes.length&&(n[W_]=!0,t.iterator=n.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}e.pop()}else e.pop()},t.walkSync=function(e){var t=this;e[W_]=!0;for(var n,r=Mm(rk(e));!(n=r()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[W_]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()},km(e,[{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"}}]),e}();sk.registerPostcss=function(e){ak=e};var lk=sk;sk.default=sk,X_.registerLazyResult(sk),Z_.registerLazyResult(sk);var ck=Sx,uk=Mw,dk=V_,pk=Kx,hk=function(){function e(e,t,n){var r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var i=uk;this.result=new pk(this._processor,r,this._opts),this.result.css=t;var o=this;Object.defineProperty(this.result,"root",{get:function(){return o.root}});var a=new ck(i,r,this._opts,t);if(a.isMap()){var s=a.generate(),l=s[0],c=s[1];l&&(this.result.css=l),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this._css},t.warnings=function(){return[]},km(e,[{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=dk;try{e=t(this._css,this._opts)}catch(gE){this.error=gE}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e}(),fk=hk;hk.default=hk;var mk=fk,gk=lk,vk=$x,yk=S_,bk=function(){function e(e){void 0===e&&(e=[]),this.version="8.4.38",this.plugins=this.normalize(e)}var t=e.prototype;return t.normalize=function(e){for(var t,n=[],r=Mm(e);!(t=r()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===(void 0===i?"undefined":Tm(i))&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===(void 0===i?"undefined":Tm(i))&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else if("object"!==(void 0===i?"undefined":Tm(i))||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin")}return n},t.process=function(e,t){return void 0===t&&(t={}),this.plugins.length||t.parser||t.stringifier||t.syntax?new gk(this,e,t):new mk(this,e,t)},t.use=function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this},e}(),wk=bk;bk.default=bk,yk.registerProcessor(bk),vk.registerProcessor(bk);var xk=Vw,_k=Xw,kk=Ex,Sk=b_,Ck=hx,Ek=S_,Ik=T_;function Nk(e,t){if(Array.isArray(e))return e.map(function(e){return Nk(e)});var n=e.inputs,r=Nm(e,["inputs"]);if(n){t=[];for(var i,o=Mm(n);!(i=o()).done;){var a=Sm({},i.value,{__proto__:Ck.prototype});a.map&&(a.map=Sm({},a.map,{__proto__:_k.prototype})),t.push(a)}}if(r.nodes&&(r.nodes=e.nodes.map(function(e){return Nk(e,t)})),r.source){var s=r.source,l=s.inputId,c=Nm(s,["inputId"]);r.source=c,null!=l&&(r.source.input=t[l])}if("root"===r.type)return new Ek(r);if("decl"===r.type)return new xk(r);if("rule"===r.type)return new Ik(r);if("comment"===r.type)return new kk(r);if("atrule"===r.type)return new Sk(r);throw new Error("Unknown node type: "+e.type)}var Ok=Nk;Nk.default=Nk;var Tk=Ew,Rk=Vw,jk=lk,Mk=Fx,Ak=wk,Pk=Mw,Lk=Ok,Dk=$x,Fk=Wx,zk=Ex,Uk=b_,Bk=Kx,$k=hx,Vk=V_,Wk=E_,qk=T_,Hk=S_,Kk=Bw;function Gk(){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 Ak(t)}Gk.plugin=function(e,t){var n,r=!1;function i(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];console&&console.warn&&!r&&(r=!0,vm.LANG&&vm.LANG.startsWith("cn"));var a=t.apply(void 0,[].concat(i));return a.postcssPlugin=e,a.postcssVersion=(new Ak).version,a}return Object.defineProperty(i,"postcss",{get:function(){return n||(n=i()),n}}),i.process=function(e,t,n){return Gk([i(n)]).process(e,t)},i},Gk.stringify=Pk,Gk.parse=Vk,Gk.fromJSON=Lk,Gk.list=Wk,Gk.comment=function(e){return new zk(e)},Gk.atRule=function(e){return new Uk(e)},Gk.decl=function(e){return new Rk(e)},Gk.rule=function(e){return new qk(e)},Gk.root=function(e){return new Hk(e)},Gk.document=function(e){return new Dk(e)},Gk.CssSyntaxError=Tk,Gk.Declaration=Rk,Gk.Container=Mk,Gk.Processor=Ak,Gk.Document=Dk,Gk.Comment=zk,Gk.Warning=Fk,Gk.AtRule=Uk,Gk.Result=Bk,Gk.Input=$k,Gk.Rule=qk,Gk.Root=Hk,Gk.Node=Kk,jk.registerPostcss(Gk);var Zk=Gk;Gk.default=Gk;var Jk=gw(Zk);Jk.stringify,Jk.fromJSON,Jk.plugin,Jk.parse,Jk.list,Jk.document,Jk.comment,Jk.atRule,Jk.rule,Jk.decl,Jk.root,Jk.CssSyntaxError,Jk.Declaration,Jk.Container,Jk.Processor,Jk.Document,Jk.Comment,Jk.Warning,Jk.AtRule,Jk.Result,Jk.Input,Jk.Rule,Jk.Root,Jk.Node;var Yk=function(){function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];mw(this,"parentElement",null),mw(this,"parentNode",null),mw(this,"ownerDocument"),mw(this,"firstChild",null),mw(this,"lastChild",null),mw(this,"previousSibling",null),mw(this,"nextSibling",null),mw(this,"ELEMENT_NODE",1),mw(this,"TEXT_NODE",3),mw(this,"nodeType"),mw(this,"nodeName"),mw(this,"RRNodeType")}var t=e.prototype;return t.contains=function(t){if(!Im(t,e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1},t.appendChild=function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")},t.insertBefore=function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")},t.removeChild=function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")},t.toString=function(){return"RRNode"},km(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}}]),e}(),Xk={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Qk={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},eS={};function tS(e){if(eS[e])return eS[e];var t=globalThis[e],n=t.prototype,r=e in Xk?Xk[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in Qk?Qk[e]:void 0,a=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&a&&!globalThis.Zone)return eS[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?eS[e]=c:n}catch(tf){return n}}var nS={};function rS(e,t,n){var r,i=e+"."+String(n);if(nS[i])return nS[i].call(t);var o=tS(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(nS[i]=a,a.call(t)):t[n]}var iS={};function oS(e,t,n){var r=e+"."+String(n);if(iS[r])return iS[r].bind(t);var i=tS(e)[n];return"function"!=typeof i?t[n]:(iS[r]=i,i.bind(t))}function aS(){return tS("MutationObserver").constructor}function sS(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(tf){return function(){}}}var lS={childNodes:function(e){return rS("Node",e,"childNodes")},parentNode:function(e){return rS("Node",e,"parentNode")},parentElement:function(e){return rS("Node",e,"parentElement")},textContent:function(e){return rS("Node",e,"textContent")},contains:function(e,t){return oS("Node",e,"contains")(t)},getRootNode:function(e){return oS("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?rS("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?rS("Element",e,"shadowRoot"):null},querySelector:function(e,t){return rS("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return rS("Element",e,"querySelectorAll")(t)},mutationObserver:aS,patch:sS};function cS(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var uS={map:{},getId:function(){return-1},getNode:function(){return null},removeNodeFromMap:function(){},has:function(){return!1},reset:function(){}};function dS(e,t,n){void 0===n&&(n={});var r=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var l=Date.now();i||!1!==n.leading||(i=l);var c=t-(l-i),u=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),i=l,e.apply(u,a)):r||!1===n.trailing||(r=setTimeout(function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(u,a)},c))}}function pS(e,t,n,r,i){void 0===i&&(i=window);var 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 pS(e,t,o||{},!0)}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(uS=new Proxy(uS,{get:function(e,t,n){return Reflect.get(e,t,n)}}));var hS=Date.now;function fS(e){var t,n,r,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=lS.parentElement(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(r=lS.parentElement(o.body))?void 0:r.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}}function mS(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function gS(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function vS(e){return e?e.nodeType===e.ELEMENT_NODE?e:lS.parentElement(e):null}function yS(e,t,n,r){if(!e)return!1;var i=vS(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(Ng(i,t,r))return!0}catch(tf){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function bS(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||-2===t.getId(e)}function wS(e,t){if(Xm(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=lS.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||wS(r,t))}function xS(e){return Boolean(e.changedTouches)}function _S(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function kS(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function SS(e){return!!e&&(Im(e,Yk)&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(lS.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(hS=function(){return(new Date).getTime()});var CS=function(){function e(){Fm(this,"id",1),Fm(this,"styleIDMap",new WeakMap),Fm(this,"idStyleMap",new Map)}var t=e.prototype;return t.getId=function(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1},t.has=function(e){return this.styleIDMap.has(e)},t.add=function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n},t.getStyle=function(e){return this.idStyleMap.get(e)||null},t.reset=function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1},t.generateId=function(){return this.id++},e}();function ES(e){var t,n=null;return"getRootNode"in e&&(null==(t=lS.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&lS.host(lS.getRootNode(e))&&(n=lS.host(lS.getRootNode(e))),n}function IS(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=ES(n);)n=t;return n}(e);return lS.contains(t,n)}function NS(e){var t=e.ownerDocument;return!!t&&(lS.contains(t,e)||IS(e))}var OS=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(OS||{}),TS=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(TS||{}),RS=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(RS||{}),jS=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(jS||{}),MS=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(MS||{}),AS=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(AS||{}),PS=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(PS||{});function LS(e){return"__ln"in e}var DS,FS=function(){function e(){Fm(this,"length",0),Fm(this,"head",null),Fm(this,"tail",null)}var t=e.prototype;return t.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},t.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&LS(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&LS(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++},t.removeNode=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--)},e}(),zS=function(e,t){return e+"@"+t},US=function(){function e(){var e=this;Fm(this,"frozen",!1),Fm(this,"locked",!1),Fm(this,"texts",[]),Fm(this,"attributes",[]),Fm(this,"attributeMap",new WeakMap),Fm(this,"removes",[]),Fm(this,"mapRemoves",[]),Fm(this,"movedMap",{}),Fm(this,"addedSet",new Set),Fm(this,"movedSet",new Set),Fm(this,"droppedSet",new Set),Fm(this,"removesSubTreeCache",new Set),Fm(this,"mutationCb"),Fm(this,"blockClass"),Fm(this,"blockSelector"),Fm(this,"maskTextClass"),Fm(this,"maskTextSelector"),Fm(this,"inlineStylesheet"),Fm(this,"maskInputOptions"),Fm(this,"maskTextFn"),Fm(this,"maskInputFn"),Fm(this,"keepIframeSrcFn"),Fm(this,"recordCanvas"),Fm(this,"inlineImages"),Fm(this,"slimDOMOptions"),Fm(this,"dataURLOptions"),Fm(this,"doc"),Fm(this,"mirror"),Fm(this,"iframeManager"),Fm(this,"stylesheetManager"),Fm(this,"shadowDomManager"),Fm(this,"canvasManager"),Fm(this,"processedNodeManager"),Fm(this,"unattachedDoc"),Fm(this,"processMutations",function(t){t.forEach(e.processMutation),e.emit()}),Fm(this,"emit",function(){if(!e.frozen&&!e.locked){for(var t=[],n=new Set,r=new FS,i=function(t){for(var n=t,r=-2;-2===r;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return r},o=function(o){var a=lS.parentNode(o);if(a&&NS(o)){var s=!1;if(o.nodeType===Node.TEXT_NODE){var l=a.tagName;if("TEXTAREA"===l)return;"STYLE"===l&&e.addedSet.has(a)&&(s=!0)}var c=Xm(a)?e.mirror.getId(ES(o)):e.mirror.getId(a),u=i(o);if(-1===c||-1===u)return r.addNode(o);var d=jg(o,{doc:e.doc,mirror:e.mirror,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,dataURLOptions:e.dataURLOptions,recordCanvas:e.recordCanvas,inlineImages:e.inlineImages,onSerialize:function(t){_S(t,e.mirror)&&e.iframeManager.addIframe(t),kS(t,e.mirror)&&e.stylesheetManager.trackLinkElement(t),SS(o)&&e.shadowDomManager.addShadowRoot(lS.shadowRoot(o),e.doc)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n),e.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:function(t,n){e.stylesheetManager.attachLinkElement(t,n)},cssCaptured:s});d&&(t.push({parentId:c,nextId:u,node:d}),n.add(d.id))}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());for(var a,s=Mm(e.movedSet);!(a=s()).done;){var l=a.value;$S(e.removesSubTreeCache,l,e.mirror)&&!e.movedSet.has(lS.parentNode(l))||o(l)}for(var c,u=Mm(e.addedSet);!(c=u()).done;){var d=c.value;VS(e.droppedSet,d)||$S(e.removesSubTreeCache,d,e.mirror)?VS(e.movedSet,d)?o(d):e.droppedSet.add(d):o(d)}for(var p=null;r.length;){var h=null;if(p){var f=e.mirror.getId(lS.parentNode(p.value)),m=i(p.value);-1!==f&&-1!==m&&(h=p)}if(!h)for(var g=r.tail;g;){var v=g;if(g=g.previous,v){var y=e.mirror.getId(lS.parentNode(v.value));if(-1===i(v.value))continue;if(-1!==y){h=v;break}var b=v.value,w=lS.parentNode(b);if(w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var x=lS.host(w);if(-1!==e.mirror.getId(x)){h=v;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}p=h.previous,r.removeNode(h.value),o(h.value)}var _={texts:e.texts.map(function(t){var n=t.node,r=lS.parentNode(n);return r&&"TEXTAREA"===r.tagName&&e.genTextAreaValueMutation(r),{id:e.mirror.getId(n),value:t.value}}).filter(function(e){return!n.has(e.id)}).filter(function(t){return e.mirror.has(t.id)}),attributes:e.attributes.map(function(t){var n=t.attributes;if("string"==typeof n.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);r.length<n.style.length&&(r+i).split("var(").length===n.style.split("var(").length&&(n.style=t.styleDiff)}return{id:e.mirror.getId(t.node),attributes:n}}).filter(function(e){return!n.has(e.id)}).filter(function(t){return e.mirror.has(t.id)}),removes:e.removes,adds:t};(_.texts.length||_.attributes.length||_.removes.length||_.adds.length)&&(e.texts=[],e.attributes=[],e.attributeMap=new WeakMap,e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.removesSubTreeCache=new Set,e.movedMap={},e.mutationCb(_))}}),Fm(this,"genTextAreaValueMutation",function(t){var n=e.attributeMap.get(t);n||(n={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},e.attributes.push(n),e.attributeMap.set(t,n));var r=Array.from(lS.childNodes(t),function(e){return lS.textContent(e)||""}).join("");n.attributes.value=rg({element:t,maskInputOptions:e.maskInputOptions,tagName:t.tagName,type:ag(t),value:r,maskInputFn:e.maskInputFn})}),Fm(this,"processMutation",function(t){if(!bS(t.target,e.mirror,e.slimDOMOptions))switch(t.type){case"characterData":var n=lS.textContent(t.target);yS(t.target,e.blockClass,e.blockSelector,!1)||n===t.oldValue||e.texts.push({value:Og(t.target,e.maskTextClass,e.maskTextSelector,!0)&&n?e.maskTextFn?e.maskTextFn(n,vS(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,o=t.target.getAttribute(i);if("value"===i){var a=ag(r);o=rg({element:r,maskInputOptions:e.maskInputOptions,tagName:r.tagName,type:a,value:o,maskInputFn:e.maskInputFn})}if(yS(t.target,e.blockClass,e.blockSelector,!1)||o===t.oldValue)return;var s=e.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!e.keepIframeSrcFn(o)){if(r.contentDocument)return;i="rr_src"}if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},e.attributes.push(s),e.attributeMap.set(t.target,s)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!Ig(r.tagName,i))if(s.attributes[i]=Eg(e.doc,ig(r.tagName),ig(i),o),"style"===i){if(!e.unattachedDoc)try{e.unattachedDoc=document.implementation.createHTMLDocument()}catch(tf){e.unattachedDoc=e.doc}var l=e.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(var c,u=Mm(Array.from(r.style));!(c=u()).done;){var d=c.value,p=r.style.getPropertyValue(d),h=r.style.getPropertyPriority(d);p!==l.style.getPropertyValue(d)||h!==l.style.getPropertyPriority(d)?s.styleDiff[d]=""===h?p:[p,h]:s._unchangedStyles[d]=[p,h]}for(var f,m=Mm(Array.from(l.style));!(f=m()).done;){var g=f.value;""===r.style.getPropertyValue(g)&&(s.styleDiff[g]=!1)}}else"open"===i&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal");break;case"childList":if(yS(t.target,e.blockClass,e.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void e.genTextAreaValueMutation(t.target);t.addedNodes.forEach(function(n){return e.genAdds(n,t.target)}),t.removedNodes.forEach(function(n){var r=e.mirror.getId(n),i=Xm(t.target)?e.mirror.getId(lS.host(t.target)):e.mirror.getId(t.target);yS(t.target,e.blockClass,e.blockSelector,!1)||bS(n,e.mirror,e.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(n,e.mirror)||(e.addedSet.has(n)?(BS(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||wS(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[zS(r,i)]?BS(e.movedSet,n):(e.removes.push({parentId:i,id:r,isShadow:!(!Xm(t.target)||!Qm(t.target))||void 0}),function(e,t){var n=[e];for(;n.length;){var r=n.pop();t.has(r)||(t.add(r),lS.childNodes(r).forEach(function(e){return n.push(e)}))}}(n,e.removesSubTreeCache))),e.mapRemoves.push(n))})}}),Fm(this,"genAdds",function(t,n){if(!e.processedNodeManager.inOtherBuffer(t,e)&&!e.addedSet.has(t)&&!e.movedSet.has(t)){if(e.mirror.hasNode(t)){if(bS(t,e.mirror,e.slimDOMOptions))return;e.movedSet.add(t);var r=null;n&&e.mirror.hasNode(n)&&(r=e.mirror.getId(n)),r&&-1!==r&&(e.movedMap[zS(e.mirror.getId(t),r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);yS(t,e.blockClass,e.blockSelector,!1)||(lS.childNodes(t).forEach(function(t){return e.genAdds(t)}),SS(t)&&lS.childNodes(lS.shadowRoot(t)).forEach(function(n){e.processedNodeManager.add(n,e),e.genAdds(n,t)}))}})}var t=e.prototype;return t.init=function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(n){t[n]=e[n]})},t.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},t.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},t.isFrozen=function(){return this.frozen},t.lock=function(){this.locked=!0,this.canvasManager.lock()},t.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},t.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},e}();function BS(e,t){e.delete(t),lS.childNodes(t).forEach(function(t){return BS(e,t)})}function $S(e,t,n){return 0!==e.size&&function(e,t){var n=lS.parentNode(t);return!!n&&e.has(n)}(e,t)}function VS(e,t){return 0!==e.size&&WS(e,t)}function WS(e,t){var n=lS.parentNode(t);return!!n&&(!!e.has(n)||WS(e,n))}var qS=function(e){if(!DS)return e;return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];try{return e.apply(void 0,[].concat(n))}catch(gE){if(DS&&!0===DS(gE))return;throw gE}}},HS=[];function KS(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(tf){}return e&&e.target}function GS(e,t){var n=new US;HS.push(n),n.init(e);var r=new(aS())(qS(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function ZS(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,l=[],c=null;return Object.keys(RS).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]}).forEach(function(e){var a=ig(e),s=function(e){return function(n){var a=KS(n);if(!yS(a,i,o,!0)){var s=null,l=e;if("pointerType"in n){switch(n.pointerType){case"mouse":s=jS.Mouse;break;case"touch":s=jS.Touch;break;case"pen":s=jS.Pen}s===jS.Touch?RS[e]===RS.MouseDown?l="TouchStart":RS[e]===RS.MouseUp&&(l="TouchEnd"):jS.Pen}else xS(n)&&(s=jS.Touch);null!==s?(c=s,(l.startsWith("Touch")&&s===jS.Touch||l.startsWith("Mouse")&&s===jS.Mouse)&&(s=null)):RS[e]===RS.Click&&(s=c,c=null);var u=xS(n)?n.changedTouches[0]:n;if(u){var d=r.getId(a),p=u.clientX,h=u.clientY;qS(t)(Sm({type:RS[l],id:d,x:p,y:h},null!==s&&{pointerType:s}))}}}}(e);if(window.PointerEvent)switch(RS[e]){case RS.MouseDown:case RS.MouseUp:a=a.replace("mouse","pointer");break;case RS.TouchStart:case RS.TouchEnd:return}l.push(cS(a,s,n))}),qS(function(){l.forEach(function(e){return e()})})}function JS(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling;return cS("scroll",qS(dS(qS(function(e){var a=KS(e);if(a&&!yS(a,i,o,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var l=fS(n.defaultView);t({id:s,x:l.left,y:l.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}}),a.scroll||100)),n)}var YS=["INPUT","TEXTAREA","SELECT"],XS=new WeakMap;function QS(e){return function(e,t){if(rC("CSSGroupingRule")&&Im(e.parentRule,CSSGroupingRule)||rC("CSSMediaRule")&&Im(e.parentRule,CSSMediaRule)||rC("CSSSupportsRule")&&Im(e.parentRule,CSSSupportsRule)||rC("CSSConditionRule")&&Im(e.parentRule,CSSConditionRule)){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function eC(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function tC(e,t){var n,r,i,o=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(lS.host(t));var l="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.ShadowRoot,c=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null==(e=c.get)?void 0:e.call(this)},set:function(e){var t,n=null==(t=c.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(tf){}return n}}),qS(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})})):function(){}}function nC(e,t){void 0===t&&(t={});var n,r=e.doc.defaultView;if(!r)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,u=e.styleDeclarationCb,d=e.canvasMutationCb,p=e.fontCb,h=e.selectionCb,f=e.customElementCb;e.mutationCb=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o;t.mutation&&(o=t).mutation.apply(o,[].concat(r)),n.apply(void 0,[].concat(r))},e.mousemoveCb=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var o;t.mousemove&&(o=t).mousemove.apply(o,[].concat(n)),r.apply(void 0,[].concat(n))},e.mouseInteractionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o;t.mouseInteraction&&(o=t).mouseInteraction.apply(o,[].concat(n)),i.apply(void 0,[].concat(n))},e.scrollCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.scroll&&(i=t).scroll.apply(i,[].concat(n)),o.apply(void 0,[].concat(n))},e.viewportResizeCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.viewportResize&&(i=t).viewportResize.apply(i,[].concat(n)),a.apply(void 0,[].concat(n))},e.inputCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.input&&(i=t).input.apply(i,[].concat(n)),s.apply(void 0,[].concat(n))},e.mediaInteractionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.mediaInteaction&&(i=t).mediaInteaction.apply(i,[].concat(n)),l.apply(void 0,[].concat(n))},e.styleSheetRuleCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.styleSheetRule&&(i=t).styleSheetRule.apply(i,[].concat(n)),c.apply(void 0,[].concat(n))},e.styleDeclarationCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.styleDeclaration&&(i=t).styleDeclaration.apply(i,[].concat(n)),u.apply(void 0,[].concat(n))},e.canvasMutationCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.canvasMutation&&(i=t).canvasMutation.apply(i,[].concat(n)),d.apply(void 0,[].concat(n))},e.fontCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.font&&(i=t).font.apply(i,[].concat(n)),p.apply(void 0,[].concat(n))},e.selectionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.selection&&(i=t).selection.apply(i,[].concat(n)),h.apply(void 0,[].concat(n))},e.customElementCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.customElement&&(i=t).customElement.apply(i,[].concat(n)),f.apply(void 0,[].concat(n))}}(e,t),e.recordDOM&&(n=GS(e,e.doc));var i,o,a,s,l,c=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,l=[],c=dS(qS(function(e){var n=Date.now()-o;t(l.map(function(e){return e.timeOffset-=n,e}),e),l=[],o=null}),s),u=qS(dS(qS(function(e){var t=KS(e),n=xS(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;o||(o=hS()),l.push({x:r,y:a,id:i.getId(t),timeOffset:hS()-o}),c("undefined"!=typeof DragEvent&&Im(e,DragEvent)?TS.Drag:Im(e,MouseEvent)?TS.MouseMove:TS.TouchMove)}),a,{trailing:!1})),d=[cS("mousemove",u,r),cS("touchmove",u,r),cS("drag",u,r)];return qS(function(){d.forEach(function(e){return e()})})}(e),u=ZS(e),d=JS(e),p=(i={win:r},o=e.viewportResizeCb,a=i.win,s=-1,l=-1,cS("resize",qS(dS(qS(function(){var e=mS(),t=gS();s===e&&l===t||(o({width:Number(t),height:Number(e)}),s=e,l=t)}),200)),a)),h=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.ignoreClass,s=e.ignoreSelector,l=e.maskInputOptions,c=e.maskInputFn,u=e.sampling,d=e.userTriggeredOnInput;function p(e){var t=KS(e),r=e.isTrusted,u=t&&t.tagName;if(t&&"OPTION"===u&&(t=lS.parentElement(t)),t&&u&&!(YS.indexOf(u)<0)&&!yS(t,i,o,!0)&&!(t.classList.contains(a)||s&&t.matches(s))){var p=t.value,f=!1,m=ag(t)||"";"radio"===m||"checkbox"===m?f=t.checked:(l[u.toLowerCase()]||l[m])&&(p=rg({element:t,maskInputOptions:l,tagName:u,type:m,value:p,maskInputFn:c})),h(t,d?{text:p,isChecked:f,userTriggered:r}:{text:p,isChecked:f});var g=t.name;"radio"===m&&g&&f&&n.querySelectorAll('input[type="radio"][name="'+g+'"]').forEach(function(e){if(e!==t){var n=e.value;h(e,d?{text:n,isChecked:!f,userTriggered:!1}:{text:n,isChecked:!f})}})}}function h(e,n){var i=XS.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){XS.set(e,n);var o=r.getId(e);qS(t)(Sm({},n,{id:o}))}}var f=("last"===u.input?["change"]:["input","change"]).map(function(e){return cS(e,qS(p),n)}),m=n.defaultView;if(!m)return function(){f.forEach(function(e){return e()})};var g,v=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&(g=f).push.apply(g,[].concat(y.map(function(e){return pS(e[0],e[1],{set:function(){qS(p)({target:this,isTrusted:!1})}},!1,m)}))),qS(function(){f.forEach(function(e){return e()})})}(e),f=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,o=e.sampling,a=e.doc,s=qS(function(e){return dS(qS(function(o){var a=KS(o);if(a&&!yS(a,n,r,!0)){var s=a.currentTime,l=a.volume,c=a.muted,u=a.playbackRate,d=a.loop;t({type:e,id:i.getId(a),currentTime:s,volume:l,muted:c,playbackRate:u,loop:d})}}),o.media||500)}),l=[cS("play",s(AS.Play),a),cS("pause",s(AS.Pause),a),cS("seeked",s(AS.Seeked),a),cS("volumechange",s(AS.VolumeChange),a),cS("ratechange",s(AS.RateChange),a)];return qS(function(){l.forEach(function(e){return e()})})}(e),m=function(){},g=function(){},v=function(){},y=function(){};e.recordDOM&&(m=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,o=t.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:qS(function(e,t,o){var a=o[0],s=o[1],l=eC(t,r,i.styleMirror),c=l.id,u=l.styleId;return(c&&-1!==c||u&&-1!==u)&&n({id:c,styleId:u,adds:[{rule:a,index:s}]}),e.apply(t,o)})}),o.CSSStyleSheet.prototype.addRule=function(e,t,n){void 0===n&&(n=this.cssRules.length);var r=e+" { "+t+" }";return o.CSSStyleSheet.prototype.insertRule.apply(this,[r,n])};var s,l,c=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:qS(function(e,t,o){var a=o[0],s=eC(t,r,i.styleMirror),l=s.id,c=s.styleId;return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,removes:[{index:a}]}),e.apply(t,o)})}),o.CSSStyleSheet.prototype.removeRule=function(e){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(s=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:qS(function(e,t,o){var a=o[0],s=eC(t,r,i.styleMirror),l=s.id,c=s.styleId;return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,replace:a}),e.apply(t,o)})})),o.CSSStyleSheet.prototype.replaceSync&&(l=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:qS(function(e,t,o){var a=o[0],s=eC(t,r,i.styleMirror),l=s.id,c=s.styleId;return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,replaceSync:a}),e.apply(t,o)})}));var u={};iC("CSSGroupingRule")?u.CSSGroupingRule=o.CSSGroupingRule:(iC("CSSMediaRule")&&(u.CSSMediaRule=o.CSSMediaRule),iC("CSSConditionRule")&&(u.CSSConditionRule=o.CSSConditionRule),iC("CSSSupportsRule")&&(u.CSSSupportsRule=o.CSSSupportsRule));var d={};return Object.entries(u).forEach(function(e){var t=e[0],o=e[1];d[t]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(d[t].insertRule,{apply:qS(function(e,t,o){var a=o[0],s=o[1],l=eC(t.parentStyleSheet,r,i.styleMirror),c=l.id,u=l.styleId;return(c&&-1!==c||u&&-1!==u)&&n({id:c,styleId:u,adds:[{rule:a,index:[].concat(QS(t),[s||0])}]}),e.apply(t,o)})}),o.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:qS(function(e,t,o){var a=o[0],s=eC(t.parentStyleSheet,r,i.styleMirror),l=s.id,c=s.styleId;return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,removes:[{index:[].concat(QS(t),[a])}]}),e.apply(t,o)})})}),qS(function(){o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=c,s&&(o.CSSStyleSheet.prototype.replace=s),l&&(o.CSSStyleSheet.prototype.replaceSync=l),Object.entries(u).forEach(function(e){var t=e[0],n=e[1];n.prototype.insertRule=d[t].insertRule,n.prototype.deleteRule=d[t].deleteRule})})}(e,{win:r}),g=tC(e,e.doc),v=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,o=e.stylesheetManager,a=t.win,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:qS(function(e,t,a){var l,c=a[0],u=a[1],d=a[2];if(i.has(c))return s.apply(t,[c,u,d]);var p=eC(null==(l=t.parentRule)?void 0:l.parentStyleSheet,r,o.styleMirror),h=p.id,f=p.styleId;return(h&&-1!==h||f&&-1!==f)&&n({id:h,styleId:f,set:{property:c,value:u,priority:d},index:QS(t.parentRule)}),e.apply(t,a)})});var l=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:qS(function(e,t,a){var s,c=a[0];if(i.has(c))return l.apply(t,[c]);var u=eC(null==(s=t.parentRule)?void 0:s.parentStyleSheet,r,o.styleMirror),d=u.id,p=u.styleId;return(d&&-1!==d||p&&-1!==p)&&n({id:d,styleId:p,remove:{property:c},index:QS(t.parentRule)}),e.apply(t,a)})}),qS(function(){a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=l})}(e,{win:r}),e.collectFonts&&(y=function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=sS(n.fonts,"add",function(e){return function(n){return setTimeout(qS(function(){var e=o.get(n);e&&(t(e),o.delete(n))}),0),e.apply(this,[n])}});return i.push(function(){r.FontFace=a}),i.push(s),qS(function(){i.forEach(function(e){return e()})})}(e)));for(var b,w=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,o=e.selectionCb,a=!0,s=qS(function(){var e=t.getSelection();if(!(!e||a&&(null==e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],l=e.rangeCount||0,c=0;c<l;c++){var u=e.getRangeAt(c),d=u.startContainer,p=u.startOffset,h=u.endContainer,f=u.endOffset;yS(d,r,i,!0)||yS(h,r,i,!0)||s.push({start:n.getId(d),startOffset:p,end:n.getId(h),endOffset:f})}o({ranges:s})}});return s(),cS("selectionchange",s)}(e),x=function(e){var t=e.doc,n=e.customElementCb,r=t.defaultView;return r&&r.customElements?sS(r.customElements,"define",function(e){return function(t,r,i){try{n({define:{name:t}})}catch(tf){}return e.apply(this,[t,r,i])}}):function(){}}(e),_=[],k=Mm(e.plugins);!(b=k()).done;){var S=b.value;_.push(S.observer(S.callback,r,S.options))}return qS(function(){HS.forEach(function(e){return e.reset()}),null==n||n.disconnect(),c(),u(),d(),p(),h(),f(),m(),g(),v(),y(),w(),x(),_.forEach(function(e){return e()})})}function rC(e){return void 0!==window[e]}function iC(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var oC=function(){function e(e){Fm(this,"iframeIdToRemoteIdMap",new WeakMap),Fm(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}var t=e.prototype;return t.getId=function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a},t.getIds=function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(function(t){return n.getId(e,t,r,i)})},t.getRemoteId=function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var i=r.get(t);return i||-1},t.getRemoteIds=function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map(function(t){return n.getRemoteId(e,t,r)})},t.reset=function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)},t.getIdToRemoteIdMap=function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t},t.getRemoteIdToIdMap=function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t},e}(),aC=function(){function e(e){Fm(this,"iframes",new WeakMap),Fm(this,"crossOriginIframeMap",new WeakMap),Fm(this,"crossOriginIframeMirror",new oC(bg)),Fm(this,"crossOriginIframeStyleMirror"),Fm(this,"crossOriginIframeRootIdMap",new WeakMap),Fm(this,"mirror"),Fm(this,"mutationCb"),Fm(this,"wrappedEmit"),Fm(this,"loadListener"),Fm(this,"stylesheetManager"),Fm(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new oC(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}var t=e.prototype;return t.addIframe=function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)},t.addLoadListener=function(e){this.loadListener=e},t.attachIframe=function(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))},t.handleMessage=function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}},t.transformCrossOriginEvent=function(e,t){var n,r=this;switch(t.type){case OS.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:OS.IncrementalSnapshot,data:{source:TS.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case OS.Meta:case OS.Load:case OS.DomContentLoaded:return!1;case OS.Plugin:return t;case OS.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case OS.IncrementalSnapshot:switch(t.data.source){case TS.Mutation:return t.data.adds.forEach(function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(function(t){r.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(function(t){r.replaceIds(t,e,["id"])}),t.data.texts.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case TS.Drag:case TS.TouchMove:case TS.MouseMove:return t.data.positions.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case TS.ViewportResize:return!1;case TS.MediaInteraction:case TS.MouseInteraction:case TS.Scroll:case TS.CanvasMutation:case TS.Input:return this.replaceIds(t.data,e,["id"]),t;case TS.StyleSheetRule:case TS.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case TS.Font:return t;case TS.Selection:return t.data.ranges.forEach(function(t){r.replaceIds(t,e,["start","end"])}),t;case TS.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach(function(t){r.replaceStyleIds(t,e,["styleId"])}),t}}return!1},t.replace=function(e,t,n,r){for(var i,o=Mm(r);!(i=o()).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]))}return t},t.replaceIds=function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)},t.replaceStyleIds=function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)},t.replaceIdOnNode=function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})},t.patchRootIdOnNode=function(e,t){var n=this;e.type===PS.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})},e}(),sC=function(){function e(e){Fm(this,"shadowDoms",new WeakSet),Fm(this,"mutationCb"),Fm(this,"scrollCb"),Fm(this,"bypassOptions"),Fm(this,"mirror"),Fm(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}var t=e.prototype;return t.init=function(){this.reset(),this.patchAttachShadow(Element,document)},t.addShadowRoot=function(e,t){var n=this;if(Qm(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=GS(Sm({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(function(){return r.disconnect()}),this.restoreHandlers.push(JS(Sm({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(lS.host(e))),n.restoreHandlers.push(tC({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))},0)}},t.observeAttachShadow=function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)},t.patchAttachShadow=function(e,t){var n=this;this.restoreHandlers.push(sS(e.prototype,"attachShadow",function(e){return function(r){var i=e.call(this,r),o=lS.shadowRoot(this);return o&&NS(this)&&n.addShadowRoot(o,t),i}}))},t.reset=function(){this.restoreHandlers.forEach(function(e){try{e()}catch(tf){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet},e}(),lC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cC="undefined"==typeof Uint8Array?[]:new Uint8Array(256),uC=0;uC<64;uC++)cC[lC.charCodeAt(uC)]=uC;var dC=new Map;var pC=function(e,t,n){if(e&&(mC(e,t)||"object"===(void 0===e?"undefined":Tm(e)))){var r=function(e,t){var n=dC.get(e);return n||(n=new Map,dC.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function hC(e,t,n){if(Im(e,Array))return e.map(function(e){return hC(e,t,n)});if(null===e)return e;if(Im(e,Float32Array)||Im(e,Float64Array)||Im(e,Int32Array)||Im(e,Uint32Array)||Im(e,Uint8Array)||Im(e,Uint16Array)||Im(e,Int16Array)||Im(e,Int8Array)||Im(e,Uint8ClampedArray))return{rr_type:e.constructor.name,args:[Object.values(e)]};if(Im(e,ArrayBuffer))return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=lC[n[t]>>2],i+=lC[(3&n[t])<<4|n[t+1]>>4],i+=lC[(15&n[t+1])<<2|n[t+2]>>6],i+=lC[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e)};if(Im(e,DataView))return{rr_type:e.constructor.name,args:[hC(e.buffer,t,n),e.byteOffset,e.byteLength]};if(Im(e,HTMLImageElement))return{rr_type:e.constructor.name,src:e.src};if(Im(e,HTMLCanvasElement)){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return Im(e,ImageData)?{rr_type:e.constructor.name,args:[hC(e.data,t,n),e.width,e.height]}:mC(e,t)||"object"===(void 0===e?"undefined":Tm(e))?{rr_type:e.constructor.name,index:pC(e,t,n)}:e}var fC=function(e,t,n){return e.map(function(e){return hC(e,t,n)})},mC=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof t[e]});return Boolean(n.find(function(n){return Im(e,t[n])}))};function gC(e,t,n,r){var i=[];try{var o=sS(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if(!yS(this,t,n,!0)){var l=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=l),r&&["webgl","webgl2"].includes(l))if(a[0]&&"object"===Tm(a[0])){var c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[].concat([i],a))}});i.push(o)}catch(tf){}return function(){i.forEach(function(e){return e()})}}function vC(e,t,n,r,i,o){for(var a,s=function(){var s=a.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return"continue";try{if("function"!=typeof e[s])return"continue";var c=sS(e,s,function(e){return function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];var u=e.apply(this,l);if(pC(u,o,this),"tagName"in this.canvas&&!yS(this.canvas,r,i,!0)){var d=fC(l,o,this),p={type:t,property:s,args:d};n(this.canvas,p)}return u}});l.push(c)}catch(tf){var u=pS(e,s,{set:function(e){n(this.canvas,{type:t,property:s,args:[e],setter:!0})}});l.push(u)}},l=[],c=Mm(Object.getOwnPropertyNames(e));!(a=c()).done;)s();return l}var yC,bC="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",wC="undefined"!=typeof window&&window.Blob&&new Blob([(yC=bC,Uint8Array.from(atob(yC),function(e){return e.charCodeAt(0)}))],{type:"text/javascript;charset=utf-8"});function xC(e){var t;try{if(!(t=wC&&(window.URL||window.webkitURL).createObjectURL(wC)))throw"";var n=new Worker(t,{name:null==e?void 0:e.name});return n.addEventListener("error",function(){(window.URL||window.webkitURL).revokeObjectURL(t)}),n}catch(tf){return new Worker("data:text/javascript;base64,"+bC,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}var _C,kC,SC,CC=function(){function e(e){var t=this;Fm(this,"pendingCanvasMutations",new Map),Fm(this,"rafStamps",{latestId:0,invokeId:null}),Fm(this,"mirror"),Fm(this,"mutationCb"),Fm(this,"resetObservers"),Fm(this,"frozen",!1),Fm(this,"locked",!1),Fm(this,"processMutation",function(e,n){!(t.rafStamps.invokeId&&t.rafStamps.latestId!==t.rafStamps.invokeId)&&t.rafStamps.invokeId||(t.rafStamps.invokeId=t.rafStamps.latestId),t.pendingCanvasMutations.has(e)||t.pendingCanvasMutations.set(e,[]),t.pendingCanvasMutations.get(e).push(n)});var n=e.sampling,r=void 0===n?"all":n,i=e.win,o=e.blockClass,a=e.blockSelector,s=e.recordCanvas,l=e.dataURLOptions;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&"all"===r&&this.initCanvasMutationObserver(i,o,a),s&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,o,a,{dataURLOptions:l})}var t=e.prototype;return t.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},t.freeze=function(){this.frozen=!0},t.unfreeze=function(){this.frozen=!1},t.lock=function(){this.locked=!0},t.unlock=function(){this.locked=!1},t.initCanvasFPSObserver=function(e,t,n,r,i){var o=this,a=gC(t,n,r,!0),s=new Map,l=new xC;l.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,a=n.width,l=n.height;o.mutationCb({id:t,type:MS["2D"],commands:[{property:"clearRect",args:[0,0,a,l]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var c,u=1e3/e,d=0,p=function(e){if(d&&e-d<u)c=requestAnimationFrame(p);else{d=e;var a,h=o;(a=[],t.document.querySelectorAll("canvas").forEach(function(e){yS(e,n,r,!0)||a.push(e)}),a).forEach(xm(function(e){var t,n,r,o;return Am(this,function(a){switch(a.label){case 0:return n=h.mirror.getId(e),s.get(n)?[2]:0===e.width||0===e.height?[2]:(s.set(n,!0),["webgl","webgl2"].includes(e.__context)&&(r=e.getContext(e.__context),!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)),[4,createImageBitmap(e)]);case 1:return o=a.sent(),l.postMessage({id:n,bitmap:o,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[o]),[2]}})})),c=requestAnimationFrame(p)}};c=requestAnimationFrame(p),this.resetObservers=function(){a(),cancelAnimationFrame(c)}},t.initCanvasMutationObserver=function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=gC(e,t,n,!1),i=function(e,t,n,r){for(var i,o=function(){var o=i.value;try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return"continue";var s=sS(t.CanvasRenderingContext2D.prototype,o,function(i){return function(){for(var a=this,s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return yS(this.canvas,n,r,!0)||setTimeout(function(){var n=fC(l,t,a);e(a.canvas,{type:MS["2D"],property:o,args:n})},0),i.apply(this,l)}});a.push(s)}catch(tf){var l=pS(t.CanvasRenderingContext2D.prototype,o,{set:function(t){e(this.canvas,{type:MS["2D"],property:o,args:[t],setter:!0})}});a.push(l)}},a=[],s=Mm(Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype));!(i=s()).done;)o();return function(){a.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n),o=function(e,t,n,r){var i,o,a=[];return(i=a).push.apply(i,[].concat(vC(t.WebGLRenderingContext.prototype,MS.WebGL,e,n,r,t))),void 0!==t.WebGL2RenderingContext&&(o=a).push.apply(o,[].concat(vC(t.WebGL2RenderingContext.prototype,MS.WebGL2,e,n,r,t))),function(){a.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n);this.resetObservers=function(){r(),i(),o()}},t.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})},t.startRAFTimestamping=function(){var e=this,t=function(n){e.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)},t.flushPendingCanvasMutations=function(){var e=this;this.pendingCanvasMutations.forEach(function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})},t.flushPendingCanvasMutationFor=function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map(function(e){return e.type,Nm(e,["type"])}),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}},e}(),EC=function(){function e(e){Fm(this,"trackedLinkElements",new WeakSet),Fm(this,"mutationCb"),Fm(this,"adoptedStyleSheetCb"),Fm(this,"styleMirror",new CS),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}var t=e.prototype;return t.attachLinkElement=function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)},t.trackLinkElement=function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))},t.adoptStyleSheets=function(e,t){var n,r=function(){var e=i.value,t=void 0;n.styleMirror.has(e)?t=n.styleMirror.getId(e):(t=n.styleMirror.add(e),a.push({styleId:t,rules:Array.from(e.rules||CSSRule,function(t,n){return{rule:tg(t,e.href),index:n}})})),o.styleIds.push(t)};if(0!==e.length){for(var i,o={id:t,styleIds:[]},a=[],s=Mm(e);!(i=s()).done;)n=this,r();a.length>0&&(o.styles=a),this.adoptedStyleSheetCb(o)}},t.reset=function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet},t.trackStylesheetInLinkElement=function(e){},e}(),IC=function(){function e(){Fm(this,"nodeMap",new WeakMap),Fm(this,"active",!1)}var t=e.prototype;return t.inOtherBuffer=function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some(function(e){return e!==t})},t.add=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))},t.destroy=function(){},e}(),NC=!1;try{if(2!==Array.from([1],function(e){return 2*e})[0]){var OC=document.createElement("iframe");document.body.appendChild(OC),Array.from=(null==(Lm=OC.contentWindow)?void 0:Lm.Array.from)||Array.from,document.body.removeChild(OC)}}catch(xR){}var TC,RC,jC=new ng;function MC(e){void 0===e&&(e={});var t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,i=e.blockClass,o=void 0===i?"rr-block":i,a=e.blockSelector,s=void 0===a?null:a,l=e.ignoreClass,c=void 0===l?"rr-ignore":l,u=e.ignoreSelector,d=void 0===u?null:u,p=e.maskTextClass,h=void 0===p?"rr-mask":p,f=e.maskTextSelector,m=void 0===f?null:f,g=e.inlineStylesheet,v=void 0===g||g,y=e.maskAllInputs,b=e.maskInputOptions,w=e.slimDOMOptions,x=e.maskInputFn,_=e.maskTextFn,k=e.hooks,S=e.packFn,C=e.sampling,E=void 0===C?{}:C,I=e.dataURLOptions,N=void 0===I?{}:I,O=e.mousemoveWait,T=e.recordDOM,R=void 0===T||T,j=e.recordCanvas,M=void 0!==j&&j,A=e.recordCrossOriginIframes,P=void 0!==A&&A,L=e.recordAfter,D=void 0===L?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":L,F=e.userTriggeredOnInput,z=void 0!==F&&F,U=e.collectFonts,B=void 0!==U&&U,$=e.inlineImages,V=void 0!==$&&$,W=e.plugins,q=e.keepIframeSrcFn,H=void 0===q?function(){return!1}:q,K=e.ignoreCSSAttributes,G=void 0===K?new Set([]):K,Z=e.errorHandler;DS=Z;var J=!P||window.parent===window,Y=!1;if(!J)try{window.parent.document&&(Y=!1)}catch(tf){Y=!0}if(J&&!t)throw new Error("emit function is required");if(!J&&!Y)return function(){};void 0!==O&&void 0===E.mousemove&&(E.mousemove=O),jC.reset();var X,Q,ee=!0===y?{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,hidden:!0}:void 0!==b?b:{password:!0},te=!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===w,headMetaDescKeywords:"all"===w,headTitleMutations:"all"===w}:w||{};void 0===X&&(X=window),"NodeList"in X&&!X.NodeList.prototype.forEach&&(X.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in X&&!X.DOMTokenList.prototype.forEach&&(X.DOMTokenList.prototype.forEach=Array.prototype.forEach);var ne=0,re=function(e){for(var t,n=Mm(W||[]);!(t=n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}return S&&!Y&&(e=S(e)),e};_C=function(e,i){var o,a=e;if(a.timestamp=hS(),!(null==(o=HS[0])?void 0:o.isFrozen())||a.type===OS.FullSnapshot||a.type===OS.IncrementalSnapshot&&a.data.source===TS.Mutation||HS.forEach(function(e){return e.unfreeze()}),J)null==t||t(re(a),i);else if(Y){var s={type:"rrweb",event:re(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(s,"*")}if(a.type===OS.FullSnapshot)Q=a,ne=0;else if(a.type===OS.IncrementalSnapshot){if(a.data.source===TS.Mutation&&a.data.isAttachIframe)return;ne++;var l=r&&ne>=r,c=n&&a.timestamp-Q.timestamp>n;(l||c)&&kC(!0)}};for(var ie,oe=function(e){_C({type:OS.IncrementalSnapshot,data:Sm({source:TS.Mutation},e)})},ae=function(e){return _C({type:OS.IncrementalSnapshot,data:Sm({source:TS.Scroll},e)})},se=function(e){return _C({type:OS.IncrementalSnapshot,data:Sm({source:TS.CanvasMutation},e)})},le=new EC({mutationCb:oe,adoptedStyleSheetCb:function(e){return _C({type:OS.IncrementalSnapshot,data:Sm({source:TS.AdoptedStyleSheet},e)})}}),ce=new aC({mirror:jC,mutationCb:oe,stylesheetManager:le,recordCrossOriginIframes:P,wrappedEmit:_C}),ue=Mm(W||[]);!(ie=ue()).done;){var de=ie.value;de.getMirror&&de.getMirror({nodeMirror:jC,crossOriginIframeMirror:ce.crossOriginIframeMirror,crossOriginIframeStyleMirror:ce.crossOriginIframeStyleMirror})}var pe=new IC;SC=new CC({recordCanvas:M,mutationCb:se,win:window,blockClass:o,blockSelector:s,mirror:jC,sampling:E.canvas,dataURLOptions:N});var he=new sC({mutationCb:oe,scrollCb:ae,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:h,maskTextSelector:m,inlineStylesheet:v,maskInputOptions:ee,dataURLOptions:N,maskTextFn:_,maskInputFn:x,recordCanvas:M,inlineImages:V,sampling:E,slimDOMOptions:te,iframeManager:ce,stylesheetManager:le,canvasManager:SC,keepIframeSrcFn:H,processedNodeManager:pe},mirror:jC});kC=function(e){if(void 0===e&&(e=!1),R){_C({type:OS.Meta,data:{href:window.location.href,width:gS(),height:mS()}},e),le.reset(),he.init(),HS.forEach(function(e){return e.lock()});var t=function(e,t){var n=t||{},r=n.mirror,i=void 0===r?new ng:r,o=n.blockClass,a=void 0===o?"rr-block":o,s=n.blockSelector,l=void 0===s?null:s,c=n.maskTextClass,u=void 0===c?"rr-mask":c,d=n.maskTextSelector,p=void 0===d?null:d,h=n.inlineStylesheet,f=void 0===h||h,m=n.inlineImages,g=void 0!==m&&m,v=n.recordCanvas,y=void 0!==v&&v,b=n.maskAllInputs,w=void 0!==b&&b,x=n.maskTextFn,_=n.maskInputFn,k=n.slimDOM,S=void 0!==k&&k,C=n.dataURLOptions,E=n.preserveWhiteSpace,I=n.onSerialize,N=n.onIframeLoad,O=n.iframeLoadTimeout,T=n.onStylesheetLoad,R=n.stylesheetLoadTimeout,j=n.keepIframeSrcFn;return jg(e,{doc:e,mirror:i,blockClass:a,blockSelector:l,maskTextClass:u,maskTextSelector:p,skipChild:!1,inlineStylesheet:f,maskInputOptions:!0===w?{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,hidden:!0}:!1===w?{password:!0}:w,maskTextFn:x,maskInputFn:_,slimDOMOptions:!0===S||"all"===S?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===S,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===S?{}:S,dataURLOptions:C,inlineImages:g,recordCanvas:y,preserveWhiteSpace:E,onSerialize:I,onIframeLoad:N,iframeLoadTimeout:O,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:void 0===j?function(){return!1}:j,newlyAddedElement:!1})}(document,{mirror:jC,blockClass:o,blockSelector:s,maskTextClass:h,maskTextSelector:m,inlineStylesheet:v,maskAllInputs:ee,maskTextFn:_,maskInputFn:x,slimDOM:te,dataURLOptions:N,recordCanvas:M,inlineImages:V,onSerialize:function(e){_S(e,jC)&&ce.addIframe(e),kS(e,jC)&&le.trackLinkElement(e),SS(e)&&he.addShadowRoot(lS.shadowRoot(e),document)},onIframeLoad:function(e,t){ce.attachIframe(e,t),he.observeAttachShadow(e)},onStylesheetLoad:function(e,t){le.attachLinkElement(e,t)},keepIframeSrcFn:H});t&&(_C({type:OS.FullSnapshot,data:{node:t,initialOffset:fS(window)}},e),HS.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,jC.getId(document)))}};try{var fe=[],me=function(e){var t;return qS(nC)({mutationCb:oe,mousemoveCb:function(e,t){return _C({type:OS.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return _C({type:OS.IncrementalSnapshot,data:Sm({source:TS.MouseInteraction},e)})},scrollCb:ae,viewportResizeCb:function(e){return _C({type:OS.IncrementalSnapshot,data:Sm({source:TS.ViewportResize},e)})},inputCb:function(e){return _C({type:OS.IncrementalSnapshot,data:Sm({source:TS.Input},e)})},mediaInteractionCb:function(e){return _C({type:OS.IncrementalSnapshot,data:Sm({source:TS.MediaInteraction},e)})},styleSheetRuleCb:function(e){return _C({type:OS.IncrementalSnapshot,data:Sm({source:TS.StyleSheetRule},e)})},styleDeclarationCb:function(e){return _C({type:OS.IncrementalSnapshot,data:Sm({source:TS.StyleDeclaration},e)})},canvasMutationCb:se,fontCb:function(e){return _C({type:OS.IncrementalSnapshot,data:Sm({source:TS.Font},e)})},selectionCb:function(e){_C({type:OS.IncrementalSnapshot,data:Sm({source:TS.Selection},e)})},customElementCb:function(e){_C({type:OS.IncrementalSnapshot,data:Sm({source:TS.CustomElement},e)})},blockClass:o,ignoreClass:c,ignoreSelector:d,maskTextClass:h,maskTextSelector:m,maskInputOptions:ee,inlineStylesheet:v,sampling:E,recordDOM:R,recordCanvas:M,inlineImages:V,userTriggeredOnInput:z,collectFonts:B,doc:e,maskInputFn:x,maskTextFn:_,keepIframeSrcFn:H,blockSelector:s,slimDOMOptions:te,dataURLOptions:N,mirror:jC,iframeManager:ce,stylesheetManager:le,shadowDomManager:he,processedNodeManager:pe,canvasManager:SC,ignoreCSSAttributes:G,plugins:(null==(t=null==W?void 0:W.filter(function(e){return e.observer}))?void 0:t.map(function(e){return{observer:e.observer,options:e.options,callback:function(t){return _C({type:OS.Plugin,data:{plugin:e.name,payload:t}})}}}))||[]},k)};ce.addLoadListener(function(e){try{fe.push(me(e.contentDocument))}catch(gE){}});var ge=function(){kC(),fe.push(me(document)),NC=!0};return"interactive"===document.readyState||"complete"===document.readyState?ge():(fe.push(cS("DOMContentLoaded",function(){_C({type:OS.DomContentLoaded,data:{}}),"DOMContentLoaded"===D&&ge()})),fe.push(cS("load",function(){_C({type:OS.Load,data:{}}),"load"===D&&ge()},window))),function(){fe.forEach(function(e){try{e()}catch(gE){String(gE).toLowerCase().includes("cross-origin")}}),pe.destroy(),NC=!1,DS=void 0}}catch(gE){}}MC.addCustomEvent=function(e,t){if(!NC)throw new Error("please add custom event after start recording");_C({type:OS.Custom,data:{tag:e,payload:t}})},MC.freezePage=function(){HS.forEach(function(e){return e.freeze()})},MC.takeFullSnapshot=function(e){if(!NC)throw new Error("please take full snapshot after start recording");kC(e)},MC.mirror=jC,(RC=TC||(TC={}))[RC.NotStarted=0]="NotStarted",RC[RC.Running=1]="Running",RC[RC.Stopped=2]="Stopped",MC.addCustomEvent,MC.freezePage,MC.takeFullSnapshot;var AC=Object.defineProperty,PC=function(e,t,n){return function(e,t,n){return t in e?AC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":Tm(t))?t+"":t,n)};var LC=function(){function e(e){PC(this,"fileName"),PC(this,"functionName"),PC(this,"lineNumber"),PC(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}return e.prototype.toString=function(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t},e}(),DC=/(^|@)\S+:\d+/,FC=/^\s*at .*(\S+:\d+|\(native\))/m,zC=/^(eval@)?(\[native code])?$/,UC={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(FC)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):[]:[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(FC)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:r.pop()),o=r.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new LC({functionName:o,fileName:a,lineNumber:i[1],columnNumber:i[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(zC)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new LC({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,""));return new LC({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),r=[],i=2,o=n.length;i<o;i+=2){var a=t.exec(n[i]);a&&r.push(new LC({fileName:a[2],lineNumber:parseFloat(a[1])}))}return r},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),r=[],i=0,o=n.length;i<o;i+=2){var a=t.exec(n[i]);a&&r.push(new LC({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(DC)&&!e.match(/^Error created at/)},this).map(function(e){var t=e.split("@"),n=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new LC({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})},this)}};function BC(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(var o=0;o<r.children.length;o++){var a=r.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&i.push(a)}i.length>1&&(n+=":eq("+i.indexOf(e)+")"),t=n+(t?">"+t:""),e=r}return t}function $C(e){return"[object Object]"===Object.prototype.toString.call(e)}function VC(e,t){if(0===t)return!0;for(var n,r=Mm(Object.keys(e));!(n=r()).done;){var i=n.value;if($C(e[i])&&VC(e[i],t-1))return!0}return!1}function WC(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],i=[];return JSON.stringify(e,function(e,t){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?i.splice(o,1/0,e):i.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if($C(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if($C(e)&&VC(e,n.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t=t.slice(0,n.stringLengthLimit)+"...");return t}(t);if("bigint"===(void 0===t?"undefined":Tm(t)))return t.toString()+"n";if(Im(t,Event)){var a={};for(var s in t){var l=t[s];Array.isArray(l)?a[s]=BC(l.length?l[0]:null):a[s]=l}return a}return Im(t,Node)?Im(t,HTMLElement)?t?t.outerHTML:"":t.nodeName:Im(t,Error)?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}var qC={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function HC(e,t,n){var r,i=n?Object.assign({},qC,n):qC,o=i.logger;if(!o)return function(){};r="string"==typeof o?t[o]:o;var a=0,s=!1,l=[];if(i.level.includes("error")){var c=function(t){var n=t.message,r=t.error,o=UC.parse(r).map(function(e){return e.toString()}),a=[WC(n,i.stringifyOptions)];e({level:"error",trace:o,payload:a})};t.addEventListener("error",c),l.push(function(){t.removeEventListener("error",c)});var u=function(t){var n,r;Im(t.reason,Error)?r=[WC("Uncaught (in promise) "+(n=t.reason).name+": "+n.message,i.stringifyOptions)]:(n=new Error,r=[WC("Uncaught (in promise)",i.stringifyOptions),WC(t.reason,i.stringifyOptions)]);var o=UC.parse(n).map(function(e){return e.toString()});e({level:"error",trace:o,payload:r})};t.addEventListener("unhandledrejection",u),l.push(function(){t.removeEventListener("unhandledrejection",u)})}for(var d,p=Mm(i.level);!(d=p()).done;){var h=d.value;l.push(f(r,h))}return function(){l.forEach(function(e){return e()})};function f(t,n){var r=this;return t[n]?function(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(tf){return function(){}}}(t,n,function(t){var o=r;return function(){for(var r=arguments.length,l=new Array(r),c=0;c<r;c++)l[c]=arguments[c];if(t.apply(o,l),!("assert"===n&&l[0]||s)){s=!0;try{var u=UC.parse(new Error).map(function(e){return e.toString()}).splice(1),d=("assert"===n?l.slice(1):l).map(function(e){return WC(e,i.stringifyOptions)});++a<i.lengthThreshold?e({level:n,trace:u,payload:d}):a===i.lengthThreshold&&e({level:"warn",trace:[],payload:[WC("The number of log records reached the threshold.")]})}catch(gE){t.apply(void 0,[].concat(["rrweb logger error:",gE],l))}finally{s=!1}}}}):function(){}}}var KC,GC,ZC,JC=gm.setImmediate,YC=Object.prototype.toString,XC=void 0!==JC?function(e){return JC(e)}:setTimeout;try{Object.defineProperty({},"x",{}),KC=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(xR){KC=function(e,t,n){return e[t]=n,e}}function QC(e,t){ZC.add(e,t),GC||(GC=XC(ZC.drain))}function eE(e){var t,n=typeof e;return null===e||"object"!==n&&"function"!==n||(t=e.then),"function"==typeof t&&t}function tE(){for(var e=0;e<this.chain.length;e++)nE(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function nE(e,t,n){var r,i;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(i=eE(r))?i.call(r,n.resolve,n.reject):n.resolve(r)}catch(xR){n.reject(xR)}}function rE(e){var t,n=this;if(!n.triggered){n.triggered=!0,n.def&&(n=n.def);try{(t=eE(e))?QC(function(){var r=new aE(n);try{t.call(e,function(){rE.apply(r,arguments)},function(){iE.apply(r,arguments)})}catch(xR){iE.call(r,xR)}}):(n.msg=e,n.state=1,n.chain.length>0&&QC(tE,n))}catch(xR){iE.call(new aE(n),xR)}}}function iE(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&QC(tE,t))}function oE(e,t,n,r){for(var i=0;i<t.length;i++)(function(i){e.resolve(t[i]).then(function(e){n(i,e)},r)})(i)}function aE(e){this.def=e,this.triggered=!1}function sE(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function lE(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new sE(this);this.then=function(e,n){var r={success:"function"!=typeof e||e,failure:"function"==typeof n&&n};return r.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");r.resolve=e,r.reject=t}),t.chain.push(r),0!==t.state&&QC(tE,t),r.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){rE.call(t,e)},function(e){iE.call(t,e)})}catch(xR){iE.call(t,xR)}}ZC=function(){var e,t,n;function r(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(i,o){n=new r(i,o),t?t.next=n:e=n,t=n,n=void 0},drain:function(){var n=e;for(e=t=GC=void 0;n;)n.fn.call(n.self),n=n.next}}}();var cE,uE=KC({},"constructor",lE,!1);lE.prototype=uE,KC(uE,"__NPO__",0,!1),KC(lE,"resolve",function(e){return e&&"object"==typeof e&&1===e.__NPO__?e:new this(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)})}),KC(lE,"reject",function(e){return new this(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)})}),KC(lE,"all",function(e){var t=this;return"[object Array]"!==YC.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var i=e.length,o=Array(i),a=0;oE(t,e,function(e,t){o[e]=t,++a===i&&n(o)},r)})}),KC(lE,"race",function(e){var t=this;return"[object Array]"!==YC.call(e)?t.reject(TypeError("Not an array")):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");oE(t,e,function(e,t){n(t)},r)})}),cE="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?Promise:lE;var dE,pE,hE,fE,mE,gE,vE,yE,bE,wE,xE={DEBUG:!1,LIB_VERSION:"2.72.0"},_E=864e5,kE=8e3,SE=Array.prototype,CE=Function.prototype,EE=Object.prototype,IE=SE.slice,NE=EE.toString,OE=EE.hasOwnProperty,TE=gm.console,RE=gm.navigator,jE=gm.document,ME=gm.opera,AE=gm.screen,PE=RE.userAgent,LE=CE.bind,DE=SE.forEach,FE=SE.indexOf,zE=SE.map,UE=Array.isArray,BE={},$E={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},VE={log:function(){if(xE.DEBUG&&!$E.isUndefined(TE)&&TE)try{TE.log.apply(TE,arguments)}catch(xR){$E.each(arguments,function(e){TE.log(e)})}},warn:function(){if(xE.DEBUG&&!$E.isUndefined(TE)&&TE){var e=["Mixpanel warning:"].concat($E.toArray(arguments));try{TE.warn.apply(TE,e)}catch(xR){$E.each(e,function(e){TE.warn(e)})}}},error:function(){if(xE.DEBUG&&!$E.isUndefined(TE)&&TE){var e=["Mixpanel error:"].concat($E.toArray(arguments));try{TE.error.apply(TE,e)}catch(xR){$E.each(e,function(e){TE.error(e)})}}},critical:function(){if(!$E.isUndefined(TE)&&TE){var e=["Mixpanel error:"].concat($E.toArray(arguments));try{TE.error.apply(TE,e)}catch(xR){$E.each(e,function(e){TE.error(e)})}}}},WE=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(VE,arguments)}},qE=function(e){return{log:WE(VE.log,e),error:WE(VE.error,e),critical:WE(VE.critical,e)}},HE=function(e){return function(){try{return e.apply(this,arguments)}catch(tf){VE.critical("Implementation error. Please turn on debug and contact support@mixpanel.com."),xE.DEBUG&&VE.critical(tf)}}},KE=function(e){var t=e.prototype;for(var n in t)"function"==typeof t[n]&&(t[n]=HE(t[n]))};$E.bind=function(e,t){var n,r;if(LE&&e.bind===LE)return LE.apply(e,IE.call(arguments,1));if(!$E.isFunction(e))throw new TypeError;return n=IE.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(IE.call(arguments)));var i={};i.prototype=e.prototype;var o=new i;i.prototype=null;var a=e.apply(o,n.concat(IE.call(arguments)));return Object(a)===a?a:o},r},$E.each=function(e,t,n){if(null!=e)if(DE&&e.forEach===DE)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r,e)===BE)return}else for(var o in e)if(OE.call(e,o)&&t.call(n,e[o],o,e)===BE)return},$E.extend=function(e){return $E.each(IE.call(arguments,1),function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])}),e},$E.isArray=UE||function(e){return"[object Array]"===NE.call(e)},$E.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(t){return!1}},$E.isArguments=function(e){return!(!e||!OE.call(e,"callee"))},$E.toArray=function(e){return e?e.toArray?e.toArray():$E.isArray(e)||$E.isArguments(e)?IE.call(e):$E.values(e):[]},$E.map=function(e,t,n){if(zE&&e.map===zE)return e.map(t,n);var r=[];return $E.each(e,function(e){r.push(t.call(n,e))}),r},$E.keys=function(e){var t=[];return null===e||$E.each(e,function(e,n){t[t.length]=n}),t},$E.values=function(e){var t=[];return null===e||$E.each(e,function(e){t[t.length]=e}),t},$E.include=function(e,t){var n=!1;return null===e?n:FE&&e.indexOf===FE?-1!=e.indexOf(t):($E.each(e,function(e){if(n||(n=e===t))return BE}),n)},$E.includes=function(e,t){return-1!==e.indexOf(t)},$E.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},$E.isObject=function(e){return e===Object(e)&&!$E.isArray(e)},$E.isEmptyObject=function(e){if($E.isObject(e)){for(var t in e)if(OE.call(e,t))return!1;return!0}return!1},$E.isUndefined=function(e){return void 0===e},$E.isString=function(e){return"[object String]"==NE.call(e)},$E.isDate=function(e){return"[object Date]"==NE.call(e)},$E.isNumber=function(e){return"[object Number]"==NE.call(e)},$E.isElement=function(e){return!(!e||1!==e.nodeType)},$E.encodeDates=function(e){return $E.each(e,function(t,n){$E.isDate(t)?e[n]=$E.formatDate(t):$E.isObject(t)&&(e[n]=$E.encodeDates(t))}),e},$E.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},$E.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},$E.strip_empty_properties=function(e){var t={};return $E.each(e,function(e,n){$E.isString(e)&&e.length>0&&(t[n]=e)}),t},$E.truncate=function(e,t){var n;return"string"==typeof e?n=e.slice(0,t):$E.isArray(e)?(n=[],$E.each(e,function(e){n.push($E.truncate(e,t))})):$E.isObject(e)?(n={},$E.each(e,function(e,r){n[r]=$E.truncate(e,t)})):n=e,n},$E.JSONEncode=function(){return function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,function(e){var t=n[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'},n=function(e,r){var i="",o=0,a="",s="",l=0,c=i,u=[],d=r[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),typeof d){case"string":return t(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(i+=" ",u=[],"[object Array]"===NE.apply(d)){for(l=d.length,o=0;o<l;o+=1)u[o]=n(o,d)||"null";return s=0===u.length?"[]":i?"[\n"+i+u.join(",\n"+i)+"\n"+c+"]":"["+u.join(",")+"]",i=c,s}for(a in d)OE.call(d,a)&&(s=n(a,d))&&u.push(t(a)+(i?": ":":")+s);return s=0===u.length?"{}":i?"{"+u.join(",")+c+"}":"{"+u.join(",")+"}",i=c,s}};return n("",{"":e})}}(),$E.JSONDecode=(mE={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},gE=function(e){var t=new SyntaxError(e);throw t.at=dE,t.text=hE,t},vE=function(e){return e&&e!==pE&&gE("Expected '"+e+"' instead of '"+pE+"'"),pE=hE.charAt(dE),dE+=1,pE},yE=function(){var e,t="";for("-"===pE&&(t="-",vE("-"));pE>="0"&&pE<="9";)t+=pE,vE();if("."===pE)for(t+=".";vE()&&pE>="0"&&pE<="9";)t+=pE;if("e"===pE||"E"===pE)for(t+=pE,vE(),"-"!==pE&&"+"!==pE||(t+=pE,vE());pE>="0"&&pE<="9";)t+=pE,vE();if(e=+t,isFinite(e))return e;gE("Bad number")},bE=function(){var e,t,n,r="";if('"'===pE)for(;vE();){if('"'===pE)return vE(),r;if("\\"===pE)if(vE(),"u"===pE){for(n=0,t=0;t<4&&(e=parseInt(vE(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof mE[pE])break;r+=mE[pE]}else r+=pE}gE("Bad string")},wE=function(){for(;pE&&pE<=" ";)vE()},fE=function(){switch(wE(),pE){case"{":return function(){var e,t={};if("{"===pE){if(vE("{"),wE(),"}"===pE)return vE("}"),t;for(;pE;){if(e=bE(),wE(),vE(":"),Object.hasOwnProperty.call(t,e)&&gE('Duplicate key "'+e+'"'),t[e]=fE(),wE(),"}"===pE)return vE("}"),t;vE(","),wE()}}gE("Bad object")}();case"[":return function(){var e=[];if("["===pE){if(vE("["),wE(),"]"===pE)return vE("]"),e;for(;pE;){if(e.push(fE()),wE(),"]"===pE)return vE("]"),e;vE(","),wE()}}gE("Bad array")}();case'"':return bE();case"-":return yE();default:return pE>="0"&&pE<="9"?yE():function(){switch(pE){case"t":return vE("t"),vE("r"),vE("u"),vE("e"),!0;case"f":return vE("f"),vE("a"),vE("l"),vE("s"),vE("e"),!1;case"n":return vE("n"),vE("u"),vE("l"),vE("l"),null}gE('Unexpected "'+pE+'"')}()}},function(e){var t;return hE=e,dE=0,pE=" ",t=fE(),wE(),pE&&gE("Syntax error"),t}),$E.base64Encode=function(e){var t,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,l=0,c="",u=[];if(!e)return e;e=$E.utf8Encode(e);do{t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,u[l++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s<e.length);switch(c=u.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},$E.utf8Encode=function(e){var t,n,r,i,o="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var a=e.charCodeAt(i),s=null;a<128?n++:s=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(n>t&&(o+=e.substring(t,n)),o+=s,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},$E.UUID=function(){try{return gm.crypto.randomUUID()}catch(xR){for(var e=new Array(36),t=0;t<36;t++)e[t]=Math.floor(16*Math.random());return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",$E.map(e,function(e){return e.toString(16)}).join("")}};var GE=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];$E.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<GE.length;t++)if(-1!==e.indexOf(GE[t]))return!0;return!1},$E.HTTPBuildQuery=function(e,t){var n,r,i=[];return $E.isUndefined(t)&&(t="&"),$E.each(e,function(e,t){n=encodeURIComponent(e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n}),i.join(t)},$E.getQueryParam=function(e,t){t=t.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var n=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);if(null===n||n&&"string"!=typeof n[1]&&n[1].length)return"";var r=n[1];try{r=decodeURIComponent(r)}catch(xR){VE.error("Skipping decoding for malformed query param: "+r)}return r.replace(/\+/g," ")},$E.cookie={get:function(e){for(var t=e+"=",n=jE.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},parse:function(e){var t;try{t=$E.JSONDecode($E.cookie.get(e))||{}}catch(xR){}return t},set_seconds:function(e,t,n,r,i,o,a){var s="",l="",c="";if(a)s="; domain="+a;else if(r){var u=aI(jE.location.hostname);s=u?"; domain=."+u:""}if(n){var d=new Date;d.setTime(d.getTime()+1e3*n),l="; expires="+d.toGMTString()}o&&(i=!0,c="; SameSite=None"),i&&(c+="; secure"),jE.cookie=e+"="+encodeURIComponent(t)+l+"; path=/"+s+c},set:function(e,t,n,r,i,o,a){var s="",l="",c="";if(a)s="; domain="+a;else if(r){var u=aI(jE.location.hostname);s=u?"; domain=."+u:""}if(n){var d=new Date;d.setTime(d.getTime()+24*n*60*60*1e3),l="; expires="+d.toGMTString()}o&&(i=!0,c="; SameSite=None"),i&&(c+="; secure");var p=e+"="+encodeURIComponent(t)+l+"; path=/"+s+c;return jE.cookie=p,p},remove:function(e,t,n){$E.cookie.set(e,"",-1,t,!1,!1,n)}};var ZE=function(e){var t=!0;try{var n="__mplss_"+rI(8);e.setItem(n,"xyz"),"xyz"!==e.getItem(n)&&(t=!1),e.removeItem(n)}catch(xR){t=!1}return t},JE=null,YE=function(e,t){return null===JE||t?JE=ZE(e||gm.localStorage):JE},XE=null;function QE(e,t,n){var r=function(e){VE.error(t+" error: "+e)};return{is_supported:function(r){var i=n(e,r);return i||VE.error(t+" unsupported"),i},error:r,get:function(t){try{return e.getItem(t)}catch(xR){r(xR)}return null},parse:function(t){try{return $E.JSONDecode(e.getItem(t))||{}}catch(xR){}return null},set:function(t,n){try{e.setItem(t,n)}catch(xR){r(xR)}},remove:function(t){try{e.removeItem(t)}catch(xR){r(xR)}}}}$E.localStorage=QE(gm.localStorage,"localStorage",YE),$E.sessionStorage=QE(gm.sessionStorage,"sessionStorage",function(e,t){return null===XE||t?XE=ZE(e||gm.sessionStorage):XE}),$E.register_event=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,n,r,i,o){if(t)if(t.addEventListener&&!i)t.addEventListener(n,r,!!o);else{var a="on"+n,s=t[a];t[a]=function(t,n,r){var i=function(i){if(i=i||e(gm.event)){var o,a,s=!0;return $E.isFunction(r)&&(o=r(i)),a=n.call(t,i),!1!==o&&!1!==a||(s=!1),s}};return i}(t,r,s)}else VE.error("No valid element provided to register_event")}}();var eI=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');$E.dom_query=function(){function e(e){return e.all?e.all:e.getElementsByTagName("*")}var t=/[\t\r\n]/g;function n(e,n){var r=" "+n+" ";return(" "+e.className+" ").replace(t," ").indexOf(r)>=0}function r(t){if(!jE.getElementsByTagName)return[];var r,i,o,a,s,l,c,u,d,p,h=t.split(" "),f=[jE];for(l=0;l<h.length;l++)if((r=h[l].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){o=(i=r.split("#"))[0];var m=i[1],g=jE.getElementById(m);if(!g||o&&g.nodeName.toLowerCase()!=o)return[];f=[g]}else if(r.indexOf(".")>-1){o=(i=r.split("."))[0];var v=i[1];for(o||(o="*"),a=[],s=0,c=0;c<f.length;c++)for(d="*"==o?e(f[c]):f[c].getElementsByTagName(o),u=0;u<d.length;u++)a[s++]=d[u];for(f=[],p=0,c=0;c<a.length;c++)a[c].className&&$E.isString(a[c].className)&&n(a[c],v)&&(f[p++]=a[c])}else{var y=r.match(eI);if(y){o=y[1];var b,w=y[2],x=y[3],_=y[4];for(o||(o="*"),a=[],s=0,c=0;c<f.length;c++)for(d="*"==o?e(f[c]):f[c].getElementsByTagName(o),u=0;u<d.length;u++)a[s++]=d[u];switch(f=[],p=0,x){case"=":b=function(e){return e.getAttribute(w)==_};break;case"~":b=function(e){return e.getAttribute(w).match(new RegExp("\\b"+_+"\\b"))};break;case"|":b=function(e){return e.getAttribute(w).match(new RegExp("^"+_+"-?"))};break;case"^":b=function(e){return 0===e.getAttribute(w).indexOf(_)};break;case"$":b=function(e){return e.getAttribute(w).lastIndexOf(_)==e.getAttribute(w).length-_.length};break;case"*":b=function(e){return e.getAttribute(w).indexOf(_)>-1};break;default:b=function(e){return e.getAttribute(w)}}for(f=[],p=0,c=0;c<a.length;c++)b(a[c])&&(f[p++]=a[c])}else{for(o=r,a=[],s=0,c=0;c<f.length;c++)for(d=f[c].getElementsByTagName(o),u=0;u<d.length;u++)a[s++]=d[u];f=a}}return f}return function(e){return $E.isElement(e)?[e]:$E.isObject(e)&&!$E.isUndefined(e.length)?e:r.call(this,e)}}();var tI=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],nI=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];$E.info={campaignParams:function(e){var t="",n={};return $E.each(tI,function(r){(t=$E.getQueryParam(jE.URL,r)).length?n[r]=t:void 0!==e&&(n[r]=e)}),n},clickParams:function(){var e="",t={};return $E.each(nI,function(n){(e=$E.getQueryParam(jE.URL,n)).length&&(t[n]=e)}),t},marketingParams:function(){return $E.extend($E.info.campaignParams(),$E.info.clickParams())},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=$E.info.searchEngine(e),n="yahoo"!=t?"q":"p",r={};if(null!==t){r.$search_engine=t;var i=$E.getQueryParam(e,n);i.length&&(r.mp_keyword=i)}return r},browser:function(e,t,n){return t=t||"",n||$E.includes(e," OPR/")?$E.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":$E.includes(e,"IEMobile")||$E.includes(e,"WPDesktop")?"Internet Explorer Mobile":$E.includes(e,"SamsungBrowser/")?"Samsung Internet":$E.includes(e,"Edge")||$E.includes(e,"Edg/")?"Microsoft Edge":$E.includes(e,"FBIOS")?"Facebook Mobile":$E.includes(e,"Whale/")?"Whale Browser":$E.includes(e,"Chrome")?"Chrome":$E.includes(e,"CriOS")?"Chrome iOS":$E.includes(e,"UCWEB")||$E.includes(e,"UCBrowser")?"UC Browser":$E.includes(e,"FxiOS")?"Firefox iOS":$E.includes(t,"Apple")?$E.includes(e,"Mobile")?"Mobile Safari":"Safari":$E.includes(e,"Android")?"Android Mobile":$E.includes(e,"Konqueror")?"Konqueror":$E.includes(e,"Firefox")?"Firefox":$E.includes(e,"MSIE")||$E.includes(e,"Trident/")?"Internet Explorer":$E.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,n){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/}[$E.info.browser(e,t,n)];if(void 0===r)return null;var i=e.match(r);return i?parseFloat(i[i.length-2]):null},os:function(){var e=PE;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return gm.location.href},properties:function(e){return"object"!=typeof e&&(e={}),$E.extend($E.strip_empty_properties({$os:$E.info.os(),$browser:$E.info.browser(PE,RE.vendor,ME),$referrer:jE.referrer,$referring_domain:$E.info.referringDomain(jE.referrer),$device:$E.info.device(PE)}),{$current_url:$E.info.currentUrl(),$browser_version:$E.info.browserVersion(PE,RE.vendor,ME),$screen_height:AE.height,$screen_width:AE.width,mp_lib:"web",$lib_version:xE.LIB_VERSION,$insert_id:rI(),time:$E.timestamp()/1e3},$E.strip_empty_properties(e))},people_properties:function(){return $E.extend($E.strip_empty_properties({$os:$E.info.os(),$browser:$E.info.browser(PE,RE.vendor,ME)}),{$browser_version:$E.info.browserVersion(PE,RE.vendor,ME)})},mpPageViewProperties:function(){return $E.strip_empty_properties({current_page_title:jE.title,current_domain:gm.location.hostname,current_url_path:gm.location.pathname,current_url_protocol:gm.location.protocol,current_url_search:gm.location.search})}};var rI=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},iI=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,oI=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,aI=function(e){var t=oI,n=e.split("."),r=n[n.length-1];(r.length>4||"com"===r||"org"===r)&&(t=iI);var i=e.match(t);return i?i[0]:""},sI=function(){},lI=null,cI=null;"undefined"!=typeof JSON&&(lI=JSON.stringify,cI=JSON.parse),lI=lI||$E.JSONEncode,cI=cI||$E.JSONDecode;$E.info=$E.info,$E.info.browser=$E.info.browser,$E.info.browserVersion=$E.info.browserVersion,$E.info.device=$E.info.device,$E.info.properties=$E.info.properties,$E.isBlockedUA=$E.isBlockedUA,$E.isEmptyObject=$E.isEmptyObject,$E.isObject=$E.isObject,$E.JSONDecode=$E.JSONDecode,$E.JSONEncode=$E.JSONEncode,$E.toArray=$E.toArray,$E.NPO=lE;var uI="mixpanelRecordingEvents",dI="mixpanelRecordingRegistry",pI=[uI,dI],hI=function(e){this.dbPromise=null,this.storeName=e};hI.prototype._openDb=function(){return new cE(function(e,t){var n=gm.indexedDB.open("mixpanelBrowserDb",1);n.onerror=function(){t(n.error)},n.onsuccess=function(){e(n.result)},n.onupgradeneeded=function(e){var t=e.target.result;pI.forEach(function(e){t.createObjectStore(e)})}})},hI.prototype.init=function(){return gm.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(e){return e instanceof gm.IDBDatabase?cE.resolve():cE.reject(e)})):cE.reject("indexedDB is not supported in this browser")},hI.prototype.isInitialized=function(){return!!this.dbPromise},hI.prototype.makeTransaction=function(e,t){var n=this.storeName,r=function(r){return new cE(function(i,o){var a=r.transaction(n,e);a.oncomplete=function(){i(a)},a.onabort=a.onerror=function(){o(a.error)},t(a.objectStore(n))})};return this.dbPromise.then(r).catch(function(e){return e&&"InvalidStateError"===e.name?(this.dbPromise=this._openDb(),this.dbPromise.then(r)):cE.reject(e)}.bind(this))},hI.prototype.setItem=function(e,t){return this.makeTransaction("readwrite",function(n){n.put(t,e)})},hI.prototype.getItem=function(e){var t;return this.makeTransaction("readonly",function(n){t=n.get(e)}).then(function(){return t.result})},hI.prototype.removeItem=function(e){return this.makeTransaction("readwrite",function(t){t.delete(e)})},hI.prototype.getAll=function(){var e;return this.makeTransaction("readonly",function(t){e=t.getAll()}).then(function(){return e.result})};function fI(e,t){CI(!0,e,t)}function mI(e,t){CI(!1,e,t)}function gI(e,t){return"1"===SI(e,t)}function vI(e,t){if(function(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||gm,n=t.navigator||{},r=!1;return $E.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],function(e){$E.includes([!0,1,"1","yes"],e)&&(r=!0)}),r}(t))return VE.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var n="0"===SI(e,t);return n&&VE.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),n}function yI(e){return EI(e,function(e){return this.get_config(e)})}function bI(e){return EI(e,function(e){return this._get_config(e)})}function wI(e){return EI(e,function(e){return this._get_config(e)})}function xI(e,t){_I(t=t||{}).remove(kI(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function _I(e){return"localStorage"===(e=e||{}).persistenceType?$E.localStorage:$E.cookie}function kI(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function SI(e,t){return _I(t).get(kI(e,t))}function CI(e,t,n){$E.isString(t)&&t.length?(_I(n=n||{}).set(kI(t,n),e?1:0,$E.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})):VE.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function EI(e,t){return function(){var n=!1;try{var r=t.call(this,"token"),i=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),a=t.call(this,"opt_out_tracking_cookie_prefix"),s=t.call(this,"window");r&&(n=vI(r,{ignoreDnt:i,persistenceType:o,persistencePrefix:a,window:s}))}catch(xR){VE.error("Unexpected error when checking tracking opt-out status: "+xR)}if(!n)return e.apply(this,arguments);var l=arguments[arguments.length-1];"function"==typeof l&&l(0)}}var II=qE("lock"),NI=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||gm.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3,this.promiseImpl=t.promiseImpl||cE};NI.prototype.withLock=function(e,t){return new(0,this.promiseImpl)($E.bind(function(n,r){var i=t||(new Date).getTime()+"|"+Math.random(),o=(new Date).getTime(),a=this.storageKey,s=this.pollIntervalMS,l=this.timeoutMS,c=this.storage,u=a+":X",d=a+":Y",p=a+":Z",h=function(e){if((new Date).getTime()-o>l)return II.error("Timeout waiting for mutex on "+a+"; clearing lock. ["+i+"]"),c.removeItem(p),c.removeItem(d),void g();setTimeout(function(){try{e()}catch(xR){r(xR)}},s*(Math.random()+.1))},f=function(e,t){e()?t():h(function(){f(e,t)})},m=function(){var e=c.getItem(d);return(!e||e===i)&&(c.setItem(d,i),c.getItem(d)===i||(YE(c,!0)||r(new Error("localStorage support dropped while acquiring lock")),!1))},g=function(){c.setItem(u,i),f(m,function(){c.getItem(u)!==i?h(function(){c.getItem(d)===i?f(function(){return!c.getItem(p)},v):g()}):v()})},v=function(){c.setItem(p,"1");var t=function(){c.removeItem(p),c.getItem(d)===i&&c.removeItem(d),c.getItem(u)===i&&c.removeItem(u)};e().then(function(e){t(),n(e)}).catch(function(e){t(),r(e)})};try{if(!YE(c,!0))throw new Error("localStorage support check failed");g()}catch(xR){r(xR)}},this))};var OI=function(e){this.storage=e||gm.localStorage};OI.prototype.init=function(){return cE.resolve()},OI.prototype.isInitialized=function(){return!0},OI.prototype.setItem=function(e,t){return new cE($E.bind(function(n,r){try{this.storage.setItem(e,lI(t))}catch(tf){r(tf)}n()},this))},OI.prototype.getItem=function(e){return new cE($E.bind(function(t,n){var r;try{r=cI(this.storage.getItem(e))}catch(tf){n(tf)}t(r)},this))},OI.prototype.removeItem=function(e){return new cE($E.bind(function(t,n){try{this.storage.removeItem(e)}catch(tf){n(tf)}t()},this))};var TI=qE("batch"),RI=function(e,t){var n,r,i,o;t=t||{},this.storageKey=e,this.usePersistence=t.usePersistence,this.usePersistence&&(this.queueStorage=t.queueStorage||new OI,this.lock=new NI(e,{storage:t.sharedLockStorage||gm.localStorage,timeoutMS:t.sharedLockTimeoutMS})),this.reportError=t.errorReporter||$E.bind(TI.error,TI),this.pid=t.pid||null,this.memQueue=[],this.initialized=!1,t.enqueueThrottleMs?this.enqueuePersisted=(n=$E.bind(this._enqueuePersisted,this),r=t.enqueueThrottleMs,i=null,o=[],function(e){var t=this;return o.push(e),i||(i=new cE(function(e){setTimeout(function(){var r=n.apply(t,[o]);i=null,o=[],e(r)},r)})),i}):this.enqueuePersisted=$E.bind(function(e){return this._enqueuePersisted([e])},this)};RI.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?cE.resolve():this.queueStorage.init().then($E.bind(function(){this.initialized=!0},this)).catch($E.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))},RI.prototype.enqueue=function(e,t){var n={id:rI(),flushAfter:(new Date).getTime()+2*t,payload:e};return this.usePersistence?this.enqueuePersisted(n):(this.memQueue.push(n),cE.resolve(!0))},RI.prototype._enqueuePersisted=function(e){var t=$E.bind(function(){return this.ensureInit().then($E.bind(function(){return this.readFromStorage()},this)).then($E.bind(function(t){return this.saveToStorage(t.concat(e))},this)).then($E.bind(function(t){return t&&(this.memQueue=this.memQueue.concat(e)),t},this)).catch($E.bind(function(t){return this.reportError("Error enqueueing items",t,e),!1},this))},this);return this.lock.withLock(t,this.pid).catch($E.bind(function(e){return this.reportError("Error acquiring storage lock",e),!1},this))},RI.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);return this.usePersistence&&t.length<e?this.ensureInit().then($E.bind(function(){return this.readFromStorage()},this)).then($E.bind(function(n){if(n.length){var r={};$E.each(t,function(e){r[e.id]=!0});for(var i=0;i<n.length;i++){var o=n[i];if((new Date).getTime()>o.flushAfter&&!r[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}return t},this)):cE.resolve(t)};var jI=function(e,t){var n=[];return $E.each(e,function(e){e.id&&!t[e.id]&&n.push(e)}),n};RI.prototype.removeItemsByID=function(e){var t={};if($E.each(e,function(e){t[e]=!0}),this.memQueue=jI(this.memQueue,t),this.usePersistence){var n=$E.bind(function(){return this.ensureInit().then($E.bind(function(){return this.readFromStorage()},this)).then($E.bind(function(e){return e=jI(e,t),this.saveToStorage(e)},this)).then($E.bind(function(){return this.readFromStorage()},this)).then($E.bind(function(e){for(var n=0;n<e.length;n++){var r=e[n];if(r.id&&t[r.id])throw new Error("Item not removed from storage")}return!0},this)).catch($E.bind(function(t){return this.reportError("Error removing items",t,e),!1},this))},this);return this.lock.withLock(n,this.pid).catch($E.bind(function(e){return this.reportError("Error acquiring storage lock",e),!YE(this.lock.storage,!0)&&n().then($E.bind(function(e){return e||this.queueStorage.removeItem(this.storageKey).then(function(){return e})},this)).catch($E.bind(function(e){return this.reportError("Error clearing queue",e),!1},this))},this))}return cE.resolve(!0)};var MI=function(e,t){var n=[];return $E.each(e,function(e){var r=e.id;if(r in t){var i=t[r];null!==i&&(e.payload=i,n.push(e))}else n.push(e)}),n};RI.prototype.updatePayloads=function(e){return this.memQueue=MI(this.memQueue,e),this.usePersistence?this.lock.withLock($E.bind(function(){return this.ensureInit().then($E.bind(function(){return this.readFromStorage()},this)).then($E.bind(function(t){return t=MI(t,e),this.saveToStorage(t)},this)).catch($E.bind(function(t){return this.reportError("Error updating items",e,t),!1},this))},this),this.pid).catch($E.bind(function(e){return this.reportError("Error acquiring storage lock",e),!1},this)):cE.resolve(!0)},RI.prototype.readFromStorage=function(){return this.ensureInit().then($E.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then($E.bind(function(e){return e&&($E.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null)),e||[]},this)).catch($E.bind(function(e){return this.reportError("Error retrieving queue",e),[]},this))},RI.prototype.saveToStorage=function(e){return this.ensureInit().then($E.bind(function(){return this.queueStorage.setItem(this.storageKey,e)},this)).then(function(){return!0}).catch($E.bind(function(e){return this.reportError("Error saving queue",e),!1},this))},RI.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then($E.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):cE.resolve()};var AI=qE("batch"),PI=function(e,t){this.errorReporter=t.errorReporter,this.queue=new RI(e,{errorReporter:$E.bind(this.reportError,this),queueStorage:t.queueStorage,sharedLockStorage:t.sharedLockStorage,sharedLockTimeoutMS:t.sharedLockTimeoutMS,usePersistence:t.usePersistence,enqueueThrottleMs:t.enqueueThrottleMs}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=t.flushOnlyOnInterval||!1,this._flushPromise=null};PI.prototype.enqueue=function(e){return this.queue.enqueue(e,this.flushInterval)},PI.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},PI.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},PI.prototype.clear=function(){return this.queue.clear()},PI.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},PI.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},PI.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout($E.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))},PI.prototype.sendRequestPromise=function(e,t){return new cE($E.bind(function(n){this.sendRequest(e,t,n)},this))},PI.prototype.flush=function(e){if(this.requestInProgress)return AI.log("Flush: Request already in progress"),cE.resolve();this.requestInProgress=!0,e=e||{};var t=this.libConfig.batch_request_timeout_ms,n=(new Date).getTime(),r=this.batchSize;return this.queue.fillBatch(r).then($E.bind(function(i){var o=i.length===r,a=[],s={};if($E.each(i,function(e){var t=e.payload;if(this.beforeSendHook&&!e.orphaned&&(t=this.beforeSendHook(t)),t){t.event&&t.properties&&(t.properties=$E.extend({},t.properties,{mp_sent_by_lib_version:xE.LIB_VERSION}));var n=!0,r=e.id;r?(this.itemIdsSentSuccessfully[r]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[r]}),n=!1):this.reportError("[dupe] found item with no ID",{item:e}),n&&a.push(t)}s[e.id]=t},this),a.length<1)return this.requestInProgress=!1,this.resetFlush(),cE.resolve();var l=$E.bind(function(){return this.queue.removeItemsByID($E.map(i,function(e){return e.id})).then($E.bind(function(e){return $E.each(i,$E.bind(function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})},this)),e?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!o?(this.resetFlush(),cE.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),cE.resolve())},this))},this),c=$E.bind(function(o){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(s);if($E.isObject(o)&&"timeout"===o.error&&(new Date).getTime()-n>=t)return this.reportError("Network timeout; retrying"),this.flush();if($E.isObject(o)&&(o.httpStatusCode>=500||429===o.httpStatusCode||o.httpStatusCode<=0&&(u=gm.navigator.onLine,!$E.isUndefined(u)&&!u)||"timeout"===o.error)){var a=2*this.flushInterval;return o.retryAfter&&(a=1e3*parseInt(o.retryAfter,10)||a),a=Math.min(6e5,a),this.reportError("Error; retry in "+a+" ms"),this.scheduleFlush(a),cE.resolve()}if($E.isObject(o)&&413===o.httpStatusCode){if(i.length>1){var c=Math.max(1,Math.floor(r/2));return this.batchSize=Math.min(this.batchSize,c,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),cE.resolve()}return this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),l()}return l()}catch(xR){this.reportError("Error handling API response",xR),this.resetFlush()}var u},this),u={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};return e.unloading&&(u.transport="sendBeacon"),AI.log("MIXPANEL REQUEST:",a),this.sendRequestPromise(a,u).then(c)},this)).catch($E.bind(function(e){this.reportError("Error flushing request queue",e),this.resetFlush()},this))},PI.prototype.reportError=function(e,t){if(AI.error.apply(AI.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(n){AI.error(n)}};var LI=function(e){var t=Date.now();return!e||t>e.maxExpires||t>e.idleExpires},DI=qE("recorder"),FI=gm.CompressionStream,zI={batch_size:1e3,batch_flush_interval_ms:1e4,batch_request_timeout_ms:9e4,batch_autostart:!0},UI=new Set([TS.MouseMove,TS.MouseInteraction,TS.Scroll,TS.ViewportResize,TS.Input,TS.TouchMove,TS.MediaInteraction,TS.Drag,TS.Selection]);var BI=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout||sI,this._onMaxLengthReached=e.onMaxLengthReached||sI,this._onBatchSent=e.onBatchSent||sI,this._rrwebRecord=e.rrwebRecord||null,this._stopRecording=null,this.replayId=e.replayId,this.batchStartUrl=e.batchStartUrl||null,this.replayStartUrl=e.replayStartUrl||null,this.idleExpires=e.idleExpires||null,this.maxExpires=e.maxExpires||null,this.replayStartTime=e.replayStartTime||null,this.lastEventTimestamp=e.lastEventTimestamp||null,this.seqNo=e.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=_E,this.recordMinMs=0;var t=YE(e.sharedLockStorage,!0)&&!this.getConfig("disable_persistence");this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new hI(uI),this.batcher=new PI(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:zI,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:e.sharedLockStorage,usePersistence:t,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:250,sharedLockTimeoutMS:1e4})};BI.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var e={distinct_id:String(this._mixpanel.get_distinct_id())},t=this._mixpanel.get_property("$device_id");t&&(e.$device_id=t);var n=this._mixpanel.get_property("$user_id");return n&&(e.$user_id=n),e},BI.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.queueStorage.init().catch(function(){this.reportError("Error initializing IndexedDB storage for unloading persisted data.")}.bind(this)).then(function(){return this.getDurationMs()<this._getRecordMinMs()?this.queueStorage.removeItem(this.batcherKey):this.batcher.flush().then(function(){return this.queueStorage.removeItem(this.batcherKey)}.bind(this))}.bind(this))},BI.prototype.getConfig=function(e){return this._mixpanel.get_config(e)},BI.prototype.get_config=function(e){return this.getConfig(e)},BI.prototype.startRecording=function(e){if(null!==this._rrwebRecord)if(null===this._stopRecording){this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>_E&&(this.recordMaxMs=_E,DI.critical("record_max_ms cannot be greater than "+_E+"ms. Capping value.")),this.maxExpires||(this.maxExpires=(new Date).getTime()+this.recordMaxMs),this.recordMinMs=this._getRecordMinMs(),this.replayStartTime||(this.replayStartTime=(new Date).getTime(),this.batchStartUrl=$E.info.currentUrl(),this.replayStartUrl=$E.info.currentUrl()),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var t=function(){clearTimeout(this.idleTimeoutId);var e=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,e),this.idleExpires=(new Date).getTime()+e}.bind(this);t();var n,r=this.getConfig("record_block_selector");""!==r&&null!==r||(r=void 0);try{this._stopRecording=this._rrwebRecord({emit:function(e){this.idleExpires&&this.idleExpires<e.timestamp?this._onIdleTimeout():(function(e){return e.type===OS.IncrementalSnapshot&&UI.has(e.data.source)}(e)&&(this.batcher.stopped&&(new Date).getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),t()),this.__enqueuePromise=this.batcher.enqueue(e),(null===this.lastEventTimestamp||e.timestamp>this.lastEventTimestamp)&&(this.lastEventTimestamp=e.timestamp))}.bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:r,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextClass:this.getConfig("record_mask_text_class"),maskTextSelector:this.getConfig("record_mask_text_selector"),recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15},plugins:this.getConfig("record_console")?[(n={stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:50,depthOfLimit:2}},{name:"rrweb/console@1",observer:HC,options:n})]:[]})}catch(xR){this.reportError("Unexpected error when starting rrweb recording.",xR)}if("function"!=typeof this._stopRecording)return this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,void this.stopRecording();var i=this.maxExpires-(new Date).getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),i)}else DI.log("Recording already in progress, skipping startRecording.");else this.reportError("rrweb record function not provided. ")},BI.prototype.stopRecording=function(e){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(xR){this.reportError("Error with rrweb stopRecording",xR)}this._stopRecording=null}var t;return this.batcher.stopped?t=this.batcher.clear():e||(t=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),t},BI.prototype.isRrwebStopped=function(){return null===this._stopRecording},BI.prototype.flushEventsWithOptOut=function(e,t,n){var r=function(e){0===e&&(this.stopRecording(),n({error:"Tracking has been opted out, stopping recording."}))}.bind(this);this._flushEvents(e,t,n,r)},BI.prototype.serialize=function(){var e;try{e=this._mixpanel.get_tab_id()}catch(tf){this.reportError("Error getting tab ID for serialization ",tf),e=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,lastEventTimestamp:this.lastEventTimestamp,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:e}},BI.deserialize=function(e,t){return new BI($E.extend({},t,{replayId:e.replayId,batchStartUrl:e.batchStartUrl,replayStartUrl:e.replayStartUrl,idleExpires:e.idleExpires,maxExpires:e.maxExpires,replayStartTime:e.replayStartTime,lastEventTimestamp:e.lastEventTimestamp,seqNo:e.seqNo,sharedLockStorage:t.sharedLockStorage}))},BI.prototype._sendRequest=function(e,t,n,r){var i=function(t,n){200===t.status&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=$E.info.currentUrl()),this._onBatchSent(),r({status:0,httpStatusCode:t.status,responseBody:n,retryAfter:t.headers.get("Retry-After")})}.bind(this),o=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");gm.fetch(o+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:n}).then(function(e){e.json().then(function(t){i(e,t)}).catch(function(e){r({error:e})})}).catch(function(e){r({error:e,httpStatusCode:0})})},BI.prototype._flushEvents=yI(function(e,t,n){var r=e.length;if(r>0){for(var i=this.replayId,o=1/0,a=-1/0,s=!1,l=0;l<r;l++)o=Math.min(o,e[l].timestamp),a=Math.max(a,e[l].timestamp),e[l].type===OS.FullSnapshot&&(s=!0);if(0===this.seqNo){if(!s)return n({error:"First batch does not contain a full snapshot. Aborting recording."}),void this.stopRecording(!0);this.replayStartTime=o}else this.replayStartTime||(this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=o);var c=a-this.replayStartTime,u={$current_url:this.batchStartUrl,$lib_version:xE.LIB_VERSION,batch_start_time:o/1e3,mp_lib:"web",replay_id:i,replay_length_ms:c,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},d=JSON.stringify(e);if(Object.assign(u,this.getUserIdInfo()),function(e,t,n){if(!gm.CompressionStream)return!1;var r=$E.info.browser(e,t,n),i=$E.info.browserVersion(e,t,n);return!(("Safari"===r||"Mobile Safari"===r)&&i>=16.4&&i<16.6)}(PE,RE.vendor,ME)){var p=new Blob([d],{type:"application/json"}).stream().pipeThrough(new FI("gzip"));new Response(p).blob().then(function(e){u.format="gzip",this._sendRequest(i,u,e,n)}.bind(this))}else u.format="body",this._sendRequest(i,u,d,n)}}),BI.prototype.reportError=function(e,t){DI.error.apply(DI.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.getConfig("error_reporter")(e,t)}catch(n){DI.error(n)}},BI.prototype.getDurationMs=function(){return null===this.replayStartTime?0:null===this.lastEventTimestamp?(new Date).getTime()-this.replayStartTime:this.lastEventTimestamp-this.replayStartTime},BI.prototype._getRecordMinMs=function(){var e=this.getConfig("record_min_ms");return e>kE?(DI.critical("record_min_ms cannot be greater than 8000ms. Capping value."),kE):e};var $I=function(e){this.idb=new hI(dI),this.errorReporter=e.errorReporter,this.mixpanelInstance=e.mixpanelInstance,this.sharedLockStorage=e.sharedLockStorage};$I.prototype.isPersistenceEnabled=function(){return!this.mixpanelInstance.get_config("disable_persistence")},$I.prototype.handleError=function(e){this.errorReporter("IndexedDB error: ",e)},$I.prototype.setActiveRecording=function(e){if(!this.isPersistenceEnabled())return cE.resolve();var t=e.tabId;return t?this.idb.init().then(function(){return this.idb.setItem(t,e)}.bind(this)).catch(this.handleError.bind(this)):cE.resolve()},$I.prototype.getActiveRecording=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}.bind(this)).then(function(e){return LI(e)?null:e}.bind(this)).catch(this.handleError.bind(this)):cE.resolve(null)},$I.prototype.clearActiveRecording=function(){return this.isPersistenceEnabled()?this.markActiveRecordingExpired():this.deleteActiveRecording()},$I.prototype.markActiveRecordingExpired=function(){return this.getActiveRecording().then(function(e){if(e)return e.maxExpires=0,this.setActiveRecording(e)}.bind(this)).catch(this.handleError.bind(this))},$I.prototype.deleteActiveRecording=function(){return this.idb.isInitialized()?this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)):cE.resolve()},$I.prototype.flushInactiveRecordings=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getAll()}.bind(this)).then(function(e){var t=e.filter(function(e){return LI(e)}).map(function(e){return BI.deserialize(e,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage}).unloadPersistedData().then(function(){return this.idb.removeItem(e.tabId)}.bind(this)).catch(this.handleError.bind(this))}.bind(this));return cE.all(t)}.bind(this)).catch(this.handleError.bind(this)):cE.resolve([])};var VI=qE("recorder"),WI=function(e,t,n){this.mixpanelInstance=e,this.rrwebRecord=t||MC,this.sharedLockStorage=n,this.recordingRegistry=new $I({mixpanelInstance:this.mixpanelInstance,errorReporter:VI.error,sharedLockStorage:n}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};WI.prototype.startRecording=function(e){if(e=e||{},!this.activeRecording||this.activeRecording.isRrwebStopped()){var t=function(){VI.log("Idle timeout reached, restarting recording."),this.resetRecording()}.bind(this),n=function(){VI.log("Max recording length reached, stopping recording."),this.resetRecording()}.bind(this),r=function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}.bind(this),i={mixpanelInstance:this.mixpanelInstance,onBatchSent:r,onIdleTimeout:t,onMaxLengthReached:n,replayId:$E.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return e.activeSerializedRecording?this.activeRecording=BI.deserialize(e.activeSerializedRecording,i):this.activeRecording=new BI(i),this.activeRecording.startRecording(e.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())}VI.log("Recording already in progress, skipping startRecording.")},WI.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then(function(){return this.recordingRegistry.clearActiveRecording()}.bind(this)).then(function(){this.stopRecordingInProgress=!1}.bind(this))},WI.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)},WI.prototype._stopCurrentRecording=function(e,t){if(this.activeRecording){var n=this.activeRecording.stopRecording(e);return t&&(this.activeRecording=null),n}return cE.resolve()},WI.prototype.resumeRecording=function(e){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),cE.resolve(null)):this.recordingRegistry.getActiveRecording().then(function(t){return t&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:t}):e?this.startRecording({shouldStopBatcher:!1}):(VI.log("No resumable recording found."),null)}.bind(this))},WI.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})},WI.prototype.getActiveReplayId=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()?this.activeRecording.replayId:null},Object.defineProperty(WI.prototype,"replayId",{get:function(){return this.getActiveReplayId()}}),gm.__mp_recorder=WI;var qI="change",HI="click",KI="hashchange",GI="load",ZI="mp_locationchange",JI="popstate",YI="scrollend",XI="scroll",QI="submit",eN="visibilitychange",tN=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],nN=["mp-include"],rN=["mp-no-track"],iN=rN.concat(["mp-sensitive"]),oN=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],aN={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,spinbutton:!0,switch:!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},sN={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},lN={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},cN=["onclick","onmousedown","onmouseup","onpointerdown","onpointerup","ontouchend","ontouchstart"],uN=qE("autocapture");function dN(e){for(var t={},n=pN(e).split(" "),r=0;r<n.length;r++){var i=n[r];i&&(t[i]=!0)}return t}function pN(e){switch(typeof e.className){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}}function hN(e){if(e.previousElementSibling)return e.previousElementSibling;do{e=e.previousSibling}while(e&&!bN(e));return e}function fN(e,t,n,r,i,o){var a={$classes:pN(e).split(" "),$tag_name:e.tagName.toLowerCase()},s=e.id;s&&(a.$id=s),_N(e,t,i,o)&&$E.each(oN.concat(r),function(t){if(e.hasAttribute(t)&&!n[t]){var r=e.getAttribute(t);kN(r)&&(a["$attr-"+t]=r)}});for(var l=1,c=1,u=e;u=hN(u);)l++,u.tagName===e.tagName&&c++;return a.$nth_child=l,a.$nth_of_type=c,a}function mN(e,t){var n=t.allowElementCallback,r=t.allowSelectors||[],i=t.blockAttrs||[],o=t.blockElementCallback,a=t.blockSelectors||[],s=t.captureTextContent||!1,l=t.captureExtraAttrs||[],c=t.capturedForHeatMap||!1,u={};$E.each(i,function(e){u[e]=!0});var d=null,p=void 0===e.target?e.srcElement:e.target;if(xN(p)&&(p=p.parentNode),function(e,t){if(!e||wN(e,"html")||!bN(e))return!1;switch(e.tagName.toLowerCase()){case"form":return t.type===QI;case"input":return-1===["button","submit"].indexOf(e.getAttribute("type"))?t.type===qI:t.type===HI;case"select":case"textarea":return t.type===qI;default:return t.type===HI}}(p,e)&&vN(p,e,n,r)&&!yN(p,e,o,a)){for(var h=[p],f=p;f.parentNode&&!wN(f,"body");)h.push(f.parentNode),f=f.parentNode;var m,g=[],v=!1;if($E.each(h,function(t){var i=_N(t,e,n,r);u.href||"a"!==t.tagName.toLowerCase()||(m=t.getAttribute("href"),m=i&&kN(m)&&m),yN(t,e,o,a)&&(v=!0),g.push(fN(t,e,u,l,n,r))},this),!v){var y=jE.documentElement;if(d={$event_type:e.type,$host:gm.location.host,$pathname:gm.location.pathname,$elements:g,$el_attr__href:m,$viewportHeight:Math.max(y.clientHeight,gm.innerHeight||0),$viewportWidth:Math.max(y.clientWidth,gm.innerWidth||0),$pageHeight:jE.body.offsetHeight||0,$pageWidth:jE.body.offsetWidth||0},$E.each(l,function(e){if(!u[e]&&p.hasAttribute(e)){var t=p.getAttribute(e);kN(t)&&(d["$el_attr__"+e]=t)}}),s&&(b=gN(p,e,n,r))&&b.length&&(d.$el_text=b),e.type===HI&&($E.each(tN,function(t){t in e&&(d["$"+t]=e[t])}),c&&(d.$captured_for_heatmap=!0),p=function(e){for(var t=e.target,n=e.composedPath(),r=0;r<n.length;r++){var i=n[r];if(wN(i,"a")||wN(i,"button")||wN(i,"input")||wN(i,"select")||i.getAttribute&&"button"===i.getAttribute("role")){t=i;break}if(i===t)break}return t}(e)),s){var b=gN(p,e,n,r);b&&b.length&&(d.$el_text=b)}if(p){if(!vN(p,e,n,r)||yN(p,e,o,a))return null;var w=fN(p,e,u,l,n,r);d.$target=w,d.$el_classes=w.$classes,$E.extend(d,$E.strip_empty_properties({$el_id:w.$id,$el_tag_name:w.$tag_name}))}}}return d}function gN(e,t,n,r){var i="";return _N(e,t,n,r)&&e.childNodes&&e.childNodes.length&&$E.each(e.childNodes,function(e){xN(e)&&e.textContent&&(i+=$E.trim(e.textContent).split(/(\s+)/).filter(kN).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),$E.trim(i)}function vN(e,t,n,r){if(n)try{if(!n(e,t))return!1}catch(xR){return uN.critical("Error while checking element in allowElementCallback",xR),!1}if(!r.length)return!0;for(var i=0;i<r.length;i++){var o=r[i];try{if(e.matches(o))return!0}catch(xR){uN.critical("Error while checking selector: "+o,xR)}}return!1}function yN(e,t,n,r){var i;if(n)try{if(n(e,t))return!0}catch(xR){return uN.critical("Error while checking element in blockElementCallback",xR),!0}if(r&&r.length)for(i=0;i<r.length;i++){var o=r[i];try{if(e.matches(o))return!0}catch(xR){uN.critical("Error while checking selector: "+o,xR)}}var a=dN(e);for(i=0;i<rN.length;i++)if(a[rN[i]])return!0;return!1}function bN(e){return e&&1===e.nodeType}function wN(e,t){return e&&e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function xN(e){return e&&3===e.nodeType}function _N(e,t,n,r){var i;if(!vN(e,t,n,r))return!1;for(var o=e;o.parentNode&&!wN(o,"body");o=o.parentNode){var a=dN(o);for(i=0;i<iN.length;i++)if(a[iN[i]])return!1}var s=dN(e);for(i=0;i<nN.length;i++)if(s[nN[i]])return!0;if(wN(e,"input")||wN(e,"select")||wN(e,"textarea")||"true"===e.getAttribute("contenteditable"))return!1;var l=e.type||"";if("string"==typeof l)switch(l.toLowerCase()){case"hidden":case"password":return!1}var c=e.name||e.id||"";if("string"==typeof c){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(c.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function kN(e){if(null===e||$E.isUndefined(e))return!1;if("string"==typeof e){e=$E.trim(e);if(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(e))return!1}return!0}function SN(e){var t="onscrollend"in gm,n=HE(e),r=YI;if(!t){var i=null;n=HE(function(){clearTimeout(i),i=setTimeout(e,100)}),r=XI}return{listener:n,eventType:r}}function CN(e){var t=e.tagName.toLowerCase();return"button"===t||"input"===t||"select"===t||"textarea"===t||"details"===t||"dialog"===t||(!!e.isContentEditable||(!!(e.onclick||e.onmousedown||e.onmouseup||e.ontouchstart||e.ontouchend)||(!!function(e){for(var t=0;t<cN.length;t++)if(e.hasAttribute(cN[t]))return!0;return!1}(e)||(!!function(e){var t=e.getAttribute("role");if(!t)return!1;var n=t.trim().split(/\s+/)[0].toLowerCase();return aN[n]}(e)||(!("a"!==t||!e.hasAttribute("href"))||!!e.hasAttribute("tabindex"))))))}function EN(e){if(!e||!e.tagName)return!0;var t=e.tagName.toLowerCase();if(sN[t])return!0;if(CN(e))return!1;for(var n=e.parentElement,r=0;n&&r<5;){if(CN(n))return!1;if(n.getRootNode&&n.getRootNode()!==jE){var i=n.getRootNode();if(i.host&&CN(i.host))return!1}n=n.parentElement,r++}return!!lN[t]}function IN(e){return"composedPath"in e?e.composedPath():[]}function NN(e){var t=IN(e);return t&&t.length>0?t[0]:e.target||e.srcElement}function ON(){this.clicks=[]}function TN(e,t){this.changeCallback=e||function(){},this.observerConfig=t,this.observedShadowRoots=null,this.shadowObservers=[]}ON.prototype.isRageClick=function(e,t){var n=(t=t||{}).threshold_px||30,r=t.timeout_ms||1e3,i=t.click_count||4;if(t.interactive_elements_only||false){var o=NN(e);if(!o||EN(o))return!1}var a=Date.now(),s=e.pageX,l=e.pageY,c=this.clicks[this.clicks.length-1];if(c&&a-c.timestamp<r&&Math.sqrt(Math.pow(s-c.x,2)+Math.pow(l-c.y,2))<n){if(this.clicks.push({x:s,y:l,timestamp:a}),this.clicks.length>=i)return this.clicks=[],!0}else this.clicks=[{x:s,y:l,timestamp:a}];return!1},TN.prototype.getEventTarget=function(e){if(this.observedShadowRoots)return NN(e)},TN.prototype.observeFromEvent=function(e){if(this.observedShadowRoots)for(var t=IN(e),n=0;n<t.length;n++){var r=t[n];r&&r.shadowRoot&&this.observeShadowRoot(r.shadowRoot)}},TN.prototype.observeShadowRoot=function(e){if(this.observedShadowRoots&&!this.observedShadowRoots.has(e)){var t=this;try{this.observedShadowRoots.add(e);var n=new window.MutationObserver(function(){t.changeCallback()});n.observe(e,this.observerConfig),this.shadowObservers.push(n)}catch(tf){uN.critical("Error while observing shadow root",tf)}}},TN.prototype.start=function(){this.observedShadowRoots||("undefined"!=typeof WeakSet?this.observedShadowRoots=new WeakSet:uN.critical("Shadow DOM observation unavailable: WeakSet not supported"))},TN.prototype.stop=function(){if(this.observedShadowRoots){for(var e=0;e<this.shadowObservers.length;e++)try{this.shadowObservers[e].disconnect()}catch(tf){uN.critical("Error while disconnecting shadow DOM observer",tf)}this.shadowObservers=[],this.observedShadowRoots=null}};var RN=[qI,"input",QI,"select","toggle"],jN=[YI],MN=[KI],AN={characterData:!0,childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden","checked","selected","value","display","visibility"]};function PN(e){this.eventListeners=[],this.mutationObserver=null,this.shadowDOMObserver=null,this.isTracking=!1,this.lastChangeEventTimestamp=0,this.pendingClicks=[],this.onDeadClickCallback=e,this.processingActive=!1,this.processingTimeout=null}PN.prototype.addClick=function(e){var t=this.shadowDOMObserver&&this.shadowDOMObserver.getEventTarget(e);return t||(t=e.target||e.srcElement),!(!t||EN(t))&&(this.shadowDOMObserver&&this.shadowDOMObserver.observeFromEvent(e),this.pendingClicks.push({element:t,event:e,timestamp:Date.now()}),!0)},PN.prototype.trackClick=function(e,t){if(!this.isTracking)return!1;var n=this.addClick(e);return n&&this.triggerProcessing(t),n},PN.prototype.getDeadClicks=function(e){if(0===this.pendingClicks.length)return[];var t=e.timeout_ms,n=Date.now(),r=this.pendingClicks.slice();this.pendingClicks=[];for(var i=[],o=0;o<r.length;o++){var a=r[o];n-a.timestamp>=t?this.hasChangesAfter(a.timestamp)||i.push(a):this.pendingClicks.push(a)}return i},PN.prototype.hasChangesAfter=function(e){return this.lastChangeEventTimestamp>=e-100},PN.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()},PN.prototype.triggerProcessing=function(e){this.processingActive||(this.processingActive=!0,this.processRecursively(e))},PN.prototype.processRecursively=function(e){if(this.isTracking&&this.onDeadClickCallback){var t=e.timeout_ms,n=this;this.processingTimeout=setTimeout(function(){if(n.processingActive){for(var t=n.getDeadClicks(e),r=0;r<t.length;r++)n.onDeadClickCallback(t[r].event);n.pendingClicks.length>0?n.processRecursively(e):n.processingActive=!1}},t)}else this.processingActive=!1},PN.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var e=this;RN.forEach(function(t){var n=function(){e.recordChangeEvent()};document.addEventListener(t,n,{capture:!0,passive:!0}),e.eventListeners.push({target:document,event:t,handler:n,options:{capture:!0,passive:!0}})}),MN.forEach(function(t){var n=function(){e.recordChangeEvent()};window.addEventListener(t,n),e.eventListeners.push({target:window,event:t,handler:n})}),jN.forEach(function(t){var n=function(){e.recordChangeEvent()};window.addEventListener(t,n,{passive:!0}),e.eventListeners.push({target:window,event:t,handler:n,options:{passive:!0}})});var t=function(){e.recordChangeEvent()};if(document.addEventListener("selectionchange",t),e.eventListeners.push({target:document,event:"selectionchange",handler:t}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){e.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,AN)}catch(tf){uN.critical("Error while setting up mutation observer",tf)}if(window.customElements)try{this.shadowDOMObserver=new TN(function(){e.recordChangeEvent()},AN),this.shadowDOMObserver.start()}catch(tf){uN.critical("Error while setting up shadow DOM observer",tf),this.shadowDOMObserver=null}}},PN.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null);for(var e=0;e<this.eventListeners.length;e++){var t=this.eventListeners[e];try{t.target.removeEventListener(t.event,t.handler,t.options)}catch(tf){uN.critical("Error while removing event listener",tf)}}if(this.eventListeners=[],this.mutationObserver){try{this.mutationObserver.disconnect()}catch(tf){uN.critical("Error while disconnecting mutation observer",tf)}this.mutationObserver=null}if(this.shadowDOMObserver){try{this.shadowDOMObserver.stop()}catch(tf){uN.critical("Error while stopping shadow DOM observer",tf)}this.shadowDOMObserver=null}}};var LN="autocapture",DN="full-url",FN="allow_selectors",zN="allow_url_regexes",UN="block_attrs",BN="block_element_callback",$N="block_selectors",VN="block_url_regexes",WN="capture_extra_attrs",qN="capture_text_content",HN="scroll_capture_all",KN="scroll_depth_percent_checkpoints",GN="click",ZN="dead_click",JN="input",YN="pageview",XN="rage_click",QN="scroll",eO="page_leave",tO="submit",nO={};nO[FN]=[],nO[zN]=[],nO[UN]=[],nO[BN]=null,nO[$N]=[],nO[VN]=[],nO[WN]=[],nO[qN]=!1,nO[HN]=!1,nO[KN]=[25,50,75,100],nO[GN]=!0,nO[ZN]=!0,nO[JN]=!0,nO[YN]=DN,nO[XN]=!0,nO[QN]=!0,nO[eO]=!1,nO[tO]=!0;var rO={$mp_autocapture:!0},iO="$mp_click",oO="$mp_dead_click",aO="$mp_rage_click",sO=function(e){this.mp=e,this.maxScrollViewDepth=0,this.hasTrackedScrollSession=!1,this.previousScrollHeight=0};sO.prototype.init=function(){!function(){try{return!!jE.createElement("div").matches}catch(xR){return!1}}()?uN.critical("Autocapture unavailable: missing required DOM APIs"):(this.initPageListeners(),this.initPageviewTracking(),this.initClickTracking(),this.initDeadClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking(),this.initRageClickTracking(),this.initPageLeaveTracking())},sO.prototype.getFullConfig=function(){var e=this.mp.get_config(LN);return e?$E.isObject(e)?$E.extend({},nO,e):nO:{}},sO.prototype.getConfig=function(e){return this.getFullConfig()[e]},sO.prototype.currentUrlBlocked=function(){var e,t=$E.info.currentUrl(),n=this.getConfig(zN)||[];if(n.length){var r=!1;for(e=0;e<n.length;e++){var i=n[e];try{if(t.match(i)){r=!0;break}}catch(xR){return uN.critical("Error while checking block URL regex: "+i,xR),!0}}if(!r)return!0}var o=this.getConfig(VN)||[];if(!o||!o.length)return!1;for(e=0;e<o.length;e++)try{if(t.match(o[e]))return!0}catch(xR){return uN.critical("Error while checking block URL regex: "+o[e],xR),!0}return!1},sO.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(LN)?this.getConfig(YN):this.mp.get_config("track_pageview")},sO.prototype.trackDomEvent=function(e,t){if(!this.currentUrlBlocked()){var n=this.mp.is_recording_heatmap_data()&&(t===iO&&!this.getConfig(GN)||t===aO&&!this._getClickTrackingConfig(XN)||t===oO&&!this._getClickTrackingConfig(ZN)),r=mN(e,{allowElementCallback:this.getConfig("allow_element_callback"),allowSelectors:this.getConfig(FN),blockAttrs:this.getConfig(UN),blockElementCallback:this.getConfig(BN),blockSelectors:this.getConfig($N),captureExtraAttrs:this.getConfig(WN),captureTextContent:this.getConfig(qN),capturedForHeatMap:n});r&&($E.extend(r,rO),this.mp.track(t,r))}},sO.prototype.initPageListeners=function(){if(gm.removeEventListener(JI,this.listenerPopstate),gm.removeEventListener(KI,this.listenerHashchange),this.pageviewTrackingConfig()||this.getConfig(eO)||this.mp.get_config("record_heatmap_data")){this.listenerPopstate=function(){gm.dispatchEvent(new Event(ZI))},this.listenerHashchange=function(){gm.dispatchEvent(new Event(ZI))},gm.addEventListener(JI,this.listenerPopstate),gm.addEventListener(KI,this.listenerHashchange);var e=gm.history.pushState;"function"==typeof e&&(gm.history.pushState=function(t,n,r){e.call(gm.history,t,n,r),gm.dispatchEvent(new Event(ZI))});var t=gm.history.replaceState;"function"==typeof t&&(gm.history.replaceState=function(e,n,r){t.call(gm.history,e,n,r),gm.dispatchEvent(new Event(ZI))})}},sO.prototype._getClickTrackingConfig=function(e){var t=this.getConfig(e);return t?!0===t?{}:"object"==typeof t?t:{}:null},sO.prototype._trackPageLeave=function(e,t,n){if(!this.hasTrackedScrollSession&&(this.getConfig(eO)||this.mp.is_recording_heatmap_data())){this.hasTrackedScrollSession=!0;var r=Math.max(jE.documentElement.clientHeight,gm.innerHeight||0),i=Math.round(Math.max(this.maxScrollViewDepth-r,0)/(n-r)*100),o=Math.round(r/n*100);n<=r&&(i=100,o=100);var a=$E.extend({$max_scroll_view_depth:this.maxScrollViewDepth,$max_scroll_percentage:i,$fold_line_percentage:o,$scroll_height:n,$event_type:e.type,$current_url:t||$E.info.currentUrl(),$viewportHeight:r,$viewportWidth:Math.max(jE.documentElement.clientWidth,gm.innerWidth||0),$captured_for_heatmap:this.mp.is_recording_heatmap_data()},rO);this.mp.track("$mp_page_leave",a,{transport:"sendBeacon"})}},sO.prototype._initScrollDepthTracking=function(){if(gm.removeEventListener(XI,this.listenerScrollDepth),gm.removeEventListener(YI,this.listenerScrollDepth),this.mp.get_config("record_heatmap_data")){uN.log("Initializing scroll depth tracking"),this.maxScrollViewDepth=Math.max(jE.documentElement.clientHeight,gm.innerHeight||0);var e=SN(function(){if(!this.currentUrlBlocked()){var e=Math.max(jE.documentElement.clientHeight,gm.innerHeight||0)+gm.scrollY;e>this.maxScrollViewDepth&&(this.maxScrollViewDepth=e),this.previousScrollHeight=jE.body.scrollHeight}}.bind(this));this.listenerScrollDepth=e.listener,gm.addEventListener(e.eventType,this.listenerScrollDepth)}},sO.prototype.initClickTracking=function(){gm.removeEventListener(HI,this.listenerClick),(this.getConfig(GN)||this.mp.get_config("record_heatmap_data"))&&(uN.log("Initializing click tracking"),this.listenerClick=function(e){(this.getConfig(GN)||this.mp.is_recording_heatmap_data())&&this.trackDomEvent(e,iO)}.bind(this),gm.addEventListener(HI,this.listenerClick))},sO.prototype.initDeadClickTracking=function(){this._getClickTrackingConfig(ZN)||this.mp.get_config("record_heatmap_data")?(uN.log("Initializing dead click tracking"),this._deadClickTracker||(this._deadClickTracker=new PN(function(e){this.trackDomEvent(e,oO)}.bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=function(e){var t=this._getClickTrackingConfig(ZN);if((t||this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var n=t||{};n.timeout_ms||(n.timeout_ms=500),this._deadClickTracker.trackClick(e,n)}}.bind(this),gm.addEventListener(HI,this.listenerDeadClick))):this.stopDeadClickTracking()},sO.prototype.initInputTracking=function(){gm.removeEventListener(qI,this.listenerChange),this.getConfig(JN)&&(uN.log("Initializing input tracking"),this.listenerChange=function(e){this.getConfig(JN)&&this.trackDomEvent(e,"$mp_input_change")}.bind(this),gm.addEventListener(qI,this.listenerChange))},sO.prototype.initPageviewTracking=function(){if(gm.removeEventListener(ZI,this.listenerLocationchange),this.pageviewTrackingConfig()){uN.log("Initializing pageview tracking");var e="",t=!1;this.currentUrlBlocked()||(t=this.mp.track_pageview(rO)),t&&(e=$E.info.currentUrl()),this.listenerLocationchange=HE(function(){if(!this.currentUrlBlocked()){var t=$E.info.currentUrl(),n=!1,r=t.split("#")[0].split("?")[0]!==e.split("#")[0].split("?")[0],i=this.pageviewTrackingConfig();if(i===DN?n=t!==e:"url-with-path-and-query-string"===i?n=t.split("#")[0]!==e.split("#")[0]:"url-with-path"===i&&(n=r),n)this.mp.track_pageview(rO)&&(e=t),r&&(this.lastScrollCheckpoint=0,uN.log("Path change: re-initializing scroll depth checkpoints"))}}.bind(this)),gm.addEventListener(ZI,this.listenerLocationchange)}},sO.prototype.initRageClickTracking=function(){gm.removeEventListener(HI,this.listenerRageClick),(this._getClickTrackingConfig(XN)||this.mp.get_config("record_heatmap_data"))&&(uN.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new ON),this.listenerRageClick=function(e){var t=this._getClickTrackingConfig(XN);(t||this.mp.is_recording_heatmap_data())&&(this.currentUrlBlocked()||this._rageClickTracker.isRageClick(e,t)&&this.trackDomEvent(e,aO))}.bind(this),gm.addEventListener(HI,this.listenerRageClick))},sO.prototype.initScrollTracking=function(){if(gm.removeEventListener(YI,this.listenerScroll),gm.removeEventListener(XI,this.listenerScroll),this.getConfig(QN)){uN.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0;var e=function(){if(this.getConfig(QN)&&!this.currentUrlBlocked()){var e=this.getConfig(HN),t=(this.getConfig(KN)||[]).slice().sort(function(e,t){return e-t}),n=gm.scrollY,r=$E.extend({$scroll_top:n},rO);try{var i=jE.body.scrollHeight,o=Math.round(n/(i-gm.innerHeight)*100);if(r.$scroll_height=i,r.$scroll_percentage=o,o>this.lastScrollCheckpoint)for(var a=0;a<t.length;a++){var s=t[a];o>=s&&this.lastScrollCheckpoint<s&&(r.$scroll_checkpoint=s,this.lastScrollCheckpoint=s,e=!0)}}catch(xR){uN.critical("Error while calculating scroll percentage",xR)}e&&this.mp.track("$mp_scroll",r)}}.bind(this),t=SN(e);this.listenerScroll=t.listener,gm.addEventListener(t.eventType,this.listenerScroll)}},sO.prototype.initSubmitTracking=function(){gm.removeEventListener(QI,this.listenerSubmit),this.getConfig(tO)&&(uN.log("Initializing submit tracking"),this.listenerSubmit=function(e){this.getConfig(tO)&&this.trackDomEvent(e,"$mp_submit")}.bind(this),gm.addEventListener(QI,this.listenerSubmit))},sO.prototype.initPageLeaveTracking=function(){if(jE.removeEventListener(eN,this.listenerPageLeaveVisibilitychange),gm.removeEventListener(ZI,this.listenerPageLeaveLocationchange),gm.removeEventListener(GI,this.listenerPageLoad),this.getConfig(eO)||this.mp.get_config("record_heatmap_data")){uN.log("Initializing page visibility tracking."),this._initScrollDepthTracking();var e=$E.info.currentUrl();this.listenerPageLoad=function(){this.previousScrollHeight=jE.body.scrollHeight}.bind(this),gm.addEventListener(GI,this.listenerPageLoad),this.listenerPageLeaveLocationchange=HE(function(t){if(!this.currentUrlBlocked()){var n=$E.info.currentUrl();n!==e&&(this._trackPageLeave(t,e,this.previousScrollHeight),e=n,this.maxScrollViewDepth=Math.max(jE.documentElement.clientHeight,gm.innerHeight||0),this.previousScrollHeight=jE.body.scrollHeight,this.hasTrackedScrollSession=!1)}}.bind(this)),gm.addEventListener(ZI,this.listenerPageLeaveLocationchange),this.listenerPageLeaveVisibilitychange=function(t){jE.hidden&&this._trackPageLeave(t,e,this.previousScrollHeight)}.bind(this),jE.addEventListener(eN,this.listenerPageLeaveVisibilitychange)}},sO.prototype.stopDeadClickTracking=function(){this.listenerDeadClick&&(gm.removeEventListener(HI,this.listenerDeadClick),this.listenerDeadClick=null),this._deadClickTracker&&(this._deadClickTracker.stopTracking(),this._deadClickTracker=null)},KE(sO);var lO=qE("flags"),cO="flags",uO="context",dO={};dO[uO]={};var pO=function(e){this.fetch=gm.fetch,this.getFullApiRoute=e.getFullApiRoute,this.getMpConfig=e.getConfigFunc,this.setMpConfig=e.setConfigFunc,this.getMpProperty=e.getPropertyFunc,this.track=e.trackingFunc};pO.prototype.init=function(){this.minApisSupported()?(this.flags=null,this.fetchFlags(),this.trackedFeatures=new Set):lO.critical("Feature Flags unavailable: missing minimum required APIs")},pO.prototype.getFullConfig=function(){var e=this.getMpConfig(cO);return e?$E.isObject(e)?$E.extend({},dO,e):dO:{}},pO.prototype.getConfig=function(e){return this.getFullConfig()[e]},pO.prototype.isSystemEnabled=function(){return!!this.getMpConfig(cO)},pO.prototype.updateContext=function(e,t){if(!this.isSystemEnabled())return lO.critical("Feature Flags not enabled, cannot update context"),Promise.resolve();var n=this.getMpConfig(cO);$E.isObject(n)||(n={});var r=t&&t.replace?{}:this.getConfig(uO);return n[uO]=$E.extend({},r,e),this.setMpConfig(cO,n),this.fetchFlags()},pO.prototype.areFlagsReady=function(){return this.isSystemEnabled()||lO.error("Feature Flags not enabled"),!!this.flags},pO.prototype.fetchFlags=function(){if(!this.isSystemEnabled())return Promise.resolve();var e=this.getMpProperty("distinct_id"),t=this.getMpProperty("$device_id"),n="00-"+$E.UUID().replace(/-/g,"")+"-"+$E.UUID().replace(/-/g,"").substring(0,16)+"-01";lO.log("Fetching flags for distinct ID: "+e);var r=$E.extend({distinct_id:e,device_id:t},this.getConfig(uO)),i=new URLSearchParams;i.set("context",JSON.stringify(r)),i.set("token",this.getMpConfig("token")),i.set("mp_lib","web"),i.set("$lib_version",xE.LIB_VERSION);var o=this.getFullApiRoute()+"?"+i.toString();return this._fetchInProgressStartTime=Date.now(),this.fetchPromise=this.fetch.call(gm,o,{method:"GET",headers:{Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:n}}).then(function(e){return this.markFetchComplete(),e.json().then(function(e){var t=e.flags;if(!t)throw new Error("No flags in API response");var r=new Map;$E.each(t,function(e,t){r.set(t,{key:e.variant_key,value:e.variant_value,experiment_id:e.experiment_id,is_experiment_active:e.is_experiment_active,is_qa_tester:e.is_qa_tester})}),this.flags=r,this._traceparent=n}.bind(this)).catch(function(e){this.markFetchComplete(),lO.error(e)}.bind(this))}.bind(this)).catch(function(e){this.markFetchComplete(),lO.error(e)}.bind(this)),this.fetchPromise},pO.prototype.markFetchComplete=function(){this._fetchInProgressStartTime?(this._fetchStartTime=this._fetchInProgressStartTime,this._fetchCompleteTime=Date.now(),this._fetchLatency=this._fetchCompleteTime-this._fetchStartTime,this._fetchInProgressStartTime=null):lO.error("Fetch in progress started time not set, cannot mark fetch complete")},pO.prototype.getVariant=function(e,t){return this.fetchPromise?this.fetchPromise.then(function(){return this.getVariantSync(e,t)}.bind(this)).catch(function(e){return lO.error(e),t}):new Promise(function(e){lO.critical("Feature Flags not initialized"),e(t)})},pO.prototype.getVariantSync=function(e,t){if(!this.areFlagsReady())return lO.log("Flags not loaded yet"),t;var n=this.flags.get(e);return n?(this.trackFeatureCheck(e,n),n):(lO.log('No flag found: "'+e+'"'),t)},pO.prototype.getVariantValue=function(e,t){return this.getVariant(e,{value:t}).then(function(e){return e.value}).catch(function(e){return lO.error(e),t})},pO.prototype.getFeatureData=function(e,t){return lO.critical("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead."),this.getVariantValue(e,t)},pO.prototype.getVariantValueSync=function(e,t){return this.getVariantSync(e,{value:t}).value},pO.prototype.isEnabled=function(e,t){return this.getVariantValue(e).then(function(){return this.isEnabledSync(e,t)}.bind(this)).catch(function(e){return lO.error(e),t})},pO.prototype.isEnabledSync=function(e,t){t=t||!1;var n=this.getVariantValueSync(e,t);return!0!==n&&!1!==n&&(lO.error('Feature flag "'+e+'" value: '+n+" is not a boolean; returning fallback value: "+t),n=t),n},pO.prototype.trackFeatureCheck=function(e,t){if(!this.trackedFeatures.has(e)){this.trackedFeatures.add(e);var n={"Experiment name":e,"Variant name":t.key,$experiment_type:"feature_flag","Variant fetch start time":new Date(this._fetchStartTime).toISOString(),"Variant fetch complete time":new Date(this._fetchCompleteTime).toISOString(),"Variant fetch latency (ms)":this._fetchLatency,"Variant fetch traceparent":this._traceparent};"undefined"!==t.experiment_id&&(n.$experiment_id=t.experiment_id),"undefined"!==t.is_experiment_active&&(n.$is_experiment_active=t.is_experiment_active),"undefined"!==t.is_qa_tester&&(n.$is_qa_tester=t.is_qa_tester),this.track("$experiment_started",n)}},pO.prototype.minApisSupported=function(){return!!this.fetch&&"undefined"!=typeof Promise&&"undefined"!=typeof Map&&"undefined"!=typeof Set},KE(pO),pO.prototype.are_flags_ready=pO.prototype.areFlagsReady,pO.prototype.get_variant=pO.prototype.getVariant,pO.prototype.get_variant_sync=pO.prototype.getVariantSync,pO.prototype.get_variant_value=pO.prototype.getVariantValue,pO.prototype.get_variant_value_sync=pO.prototype.getVariantValueSync,pO.prototype.is_enabled=pO.prototype.isEnabled,pO.prototype.is_enabled_sync=pO.prototype.isEnabledSync,pO.prototype.update_context=pO.prototype.updateContext,pO.prototype.get_feature_data=pO.prototype.getFeatureData;var hO=function(){};hO.prototype.create_properties=function(){},hO.prototype.event_handler=function(){},hO.prototype.after_track_handler=function(){},hO.prototype.init=function(e){return this.mp=e,this},hO.prototype.track=function(e,t,n,r){var i=this,o=$E.dom_query(e);if(0!==o.length)return $E.each(o,function(e){$E.register_event(e,this.override_event,function(e){var o={},a=i.create_properties(n,this),s=i.mp.get_config("track_links_timeout");i.event_handler(e,this,o),window.setTimeout(i.track_callback(r,a,o,!0),s),i.mp.track(t,a,i.track_callback(r,a,o))})},this),!0;VE.error("The DOM query ("+e+") returned 0 elements")},hO.prototype.track_callback=function(e,t,n,r){r=r||!1;var i=this;return function(){n.callback_fired||(n.callback_fired=!0,e&&!1===e(r,t)||i.after_track_handler(t,n,r))}},hO.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):$E.extend({},e)};var fO=function(){this.override_event="click"};$E.inherit(fO,hO),fO.prototype.create_properties=function(e,t){var n=fO.superclass.create_properties.apply(this,arguments);return t.href&&(n.url=t.href),n},fO.prototype.event_handler=function(e,t,n){n.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,n.href=t.href,n.new_tab||e.preventDefault()},fO.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var mO=function(){this.override_event="submit"};$E.inherit(mO,hO),mO.prototype.event_handler=function(e,t,n){n.element=t,e.preventDefault()},mO.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var gO="$set",vO="$set_once",yO="$unset",bO="$add",wO="$append",xO="$union",_O="$remove",kO={set_action:function(e,t){var n={},r={};return $E.isObject(e)?$E.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[gO]=r,n},unset_action:function(e){var t={},n=[];return $E.isArray(e)||(e=[e]),$E.each(e,function(e){this._is_reserved_property(e)||n.push(e)},this),t[yO]=n,t},set_once_action:function(e,t){var n={},r={};return $E.isObject(e)?$E.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[vO]=r,n},union_action:function(e,t){var n={},r={};return $E.isObject(e)?$E.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=$E.isArray(e)?e:[e])},this):r[e]=$E.isArray(t)?t:[t],n[xO]=r,n},append_action:function(e,t){var n={},r={};return $E.isObject(e)?$E.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[wO]=r,n},remove_action:function(e,t){var n={},r={};return $E.isObject(e)?$E.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[_O]=r,n},delete_action:function(){var e={$delete:""};return e}},SO=function(){};$E.extend(SO.prototype,kO),SO.prototype._init=function(e,t,n){this._mixpanel=e,this._group_key=t,this._group_id=n},SO.prototype.set=wI(function(e,t,n){var r=this.set_action(e,t);return $E.isObject(e)&&(n=t),this._send_request(r,n)}),SO.prototype.set_once=wI(function(e,t,n){var r=this.set_once_action(e,t);return $E.isObject(e)&&(n=t),this._send_request(r,n)}),SO.prototype.unset=wI(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)}),SO.prototype.union=wI(function(e,t,n){$E.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)}),SO.prototype.delete=wI(function(e){var t=this.delete_action();return this._send_request(t,e)}),SO.prototype.remove=wI(function(e,t,n){var r=this.remove_action(e,t);return this._send_request(r,n)}),SO.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var n=$E.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:n,endpoint:this._mixpanel.get_api_host("groups")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)},SO.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},SO.prototype._get_config=function(e){return this._mixpanel.get_config(e)},SO.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},SO.prototype.remove=SO.prototype.remove,SO.prototype.set=SO.prototype.set,SO.prototype.set_once=SO.prototype.set_once,SO.prototype.union=SO.prototype.union,SO.prototype.unset=SO.prototype.unset,SO.prototype.toString=SO.prototype.toString;var CO=function(){};$E.extend(CO.prototype,kO),CO.prototype._init=function(e){this._mixpanel=e},CO.prototype.set=bI(function(e,t,n){var r=this.set_action(e,t);return $E.isObject(e)&&(n=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),r[gO]=$E.extend({},$E.info.people_properties(),r[gO]),this._send_request(r,n)}),CO.prototype.set_once=bI(function(e,t,n){var r=this.set_once_action(e,t);return $E.isObject(e)&&(n=t),this._send_request(r,n)}),CO.prototype.unset=bI(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)}),CO.prototype.increment=bI(function(e,t,n){var r={},i={};return $E.isObject(e)?($E.each(e,function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void VE.error("Invalid increment value passed to mixpanel.people.increment - must be a number");i[t]=e}},this),n=t):($E.isUndefined(t)&&(t=1),i[e]=t),r[bO]=i,this._send_request(r,n)}),CO.prototype.append=bI(function(e,t,n){$E.isObject(e)&&(n=t);var r=this.append_action(e,t);return this._send_request(r,n)}),CO.prototype.remove=bI(function(e,t,n){$E.isObject(e)&&(n=t);var r=this.remove_action(e,t);return this._send_request(r,n)}),CO.prototype.union=bI(function(e,t,n){$E.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)}),CO.prototype.track_charge=bI(function(){VE.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")}),CO.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},CO.prototype.delete_user=function(){if(this._identify_called()){var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)}VE.error("mixpanel.people.delete_user() requires you to call identify() first")},CO.prototype.toString=function(){return this._mixpanel.toString()+".people"},CO.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property("$device_id"),r=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),i&&(e.$had_persisted_distinct_id=i);var o=$E.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._mixpanel.get_api_host("people")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),$E.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),$E.truncate(o,255))},CO.prototype._get_config=function(e){return this._mixpanel.get_config(e)},CO.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},CO.prototype._enqueue=function(e){gO in e?this._mixpanel.persistence._add_to_people_queue(gO,e):vO in e?this._mixpanel.persistence._add_to_people_queue(vO,e):yO in e?this._mixpanel.persistence._add_to_people_queue(yO,e):bO in e?this._mixpanel.persistence._add_to_people_queue(bO,e):wO in e?this._mixpanel.persistence._add_to_people_queue(wO,e):_O in e?this._mixpanel.persistence._add_to_people_queue(_O,e):xO in e?this._mixpanel.persistence._add_to_people_queue(xO,e):VE.error("Invalid call to _enqueue():",e)},CO.prototype._flush_one_queue=function(e,t,n,r){var i=this,o=$E.extend({},this._mixpanel.persistence.load_queue(e)),a=o;$E.isUndefined(o)||!$E.isObject(o)||$E.isEmptyObject(o)||(i._mixpanel.persistence._pop_from_people_queue(e,o),i._mixpanel.persistence.save(),r&&(a=r(o)),t.call(i,a,function(t,r){0===t&&i._mixpanel.persistence._add_to_people_queue(e,o),$E.isUndefined(n)||n(t,r)}))},CO.prototype._flush=function(e,t,n,r,i,o,a){var s=this;this._flush_one_queue(gO,this.set,e),this._flush_one_queue(vO,this.set_once,r),this._flush_one_queue(yO,this.unset,o,function(e){return $E.keys(e)}),this._flush_one_queue(bO,this.increment,t),this._flush_one_queue(xO,this.union,i);var l=this._mixpanel.persistence.load_queue(wO);if(!$E.isUndefined(l)&&$E.isArray(l)&&l.length)for(var c,u=function(e,t){0===e&&s._mixpanel.persistence._add_to_people_queue(wO,c),$E.isUndefined(n)||n(e,t)},d=l.length-1;d>=0;d--)l=this._mixpanel.persistence.load_queue(wO),c=l.pop(),s._mixpanel.persistence.save(),$E.isEmptyObject(c)||s.append(c,u);var p=this._mixpanel.persistence.load_queue(_O);if(!$E.isUndefined(p)&&$E.isArray(p)&&p.length)for(var h,f=function(e,t){0===e&&s._mixpanel.persistence._add_to_people_queue(_O,h),$E.isUndefined(a)||a(e,t)},m=p.length-1;m>=0;m--)p=this._mixpanel.persistence.load_queue(_O),h=p.pop(),s._mixpanel.persistence.save(),$E.isEmptyObject(h)||s.remove(h,f)},CO.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},CO.prototype.set=CO.prototype.set,CO.prototype.set_once=CO.prototype.set_once,CO.prototype.unset=CO.prototype.unset,CO.prototype.increment=CO.prototype.increment,CO.prototype.append=CO.prototype.append,CO.prototype.remove=CO.prototype.remove,CO.prototype.union=CO.prototype.union,CO.prototype.track_charge=CO.prototype.track_charge,CO.prototype.clear_charges=CO.prototype.clear_charges,CO.prototype.delete_user=CO.prototype.delete_user,CO.prototype.toString=CO.prototype.toString;var EO,IO="__mps",NO="__mpso",OO="__mpus",TO="__mpa",RO="__mpap",jO="__mpr",MO="__mpu",AO="$people_distinct_id",PO="__alias",LO="__timers",DO=[IO,NO,OO,TO,RO,jO,MO,AO,PO,LO],FO=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(VE.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&$E.localStorage.is_supported()?this.storage=$E.localStorage:this.storage=$E.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};FO.prototype.properties=function(){var e={};return this.load(),$E.each(this.props,function(t,n){$E.include(DO,n)||(e[n]=t)}),e},FO.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=$E.extend({},e))}},FO.prototype.upgrade=function(){var e,t;this.storage===$E.localStorage?(e=$E.cookie.parse(this.name),$E.cookie.remove(this.name),$E.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===$E.cookie&&(t=$E.localStorage.parse(this.name),$E.localStorage.remove(this.name),t&&this.register_once(t))},FO.prototype.save=function(){this.disabled||this.storage.set(this.name,lI(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},FO.prototype.load_prop=function(e){return this.load(),this.props[e]},FO.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},FO.prototype.clear=function(){this.remove(),this.props={}},FO.prototype.register_once=function(e,t,n){return!!$E.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n,this.load(),$E.each(e,function(e,n){this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e)},this),this.save(),!0)},FO.prototype.register=function(e,t){return!!$E.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,this.load(),$E.extend(this.props,e),this.save(),!0)},FO.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},FO.prototype.update_search_keyword=function(e){this.register($E.info.searchInfo(e))},FO.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:$E.info.referringDomain(e)||"$direct"},"")},FO.prototype.get_referrer_info=function(){return $E.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},FO.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},FO.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},FO.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},FO.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},FO.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},FO.prototype.get_cross_subdomain=function(){return this.cross_subdomain},FO.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},FO.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],i=this._get_or_create_queue(gO),o=this._get_or_create_queue(vO),a=this._get_or_create_queue(yO),s=this._get_or_create_queue(bO),l=this._get_or_create_queue(xO),c=this._get_or_create_queue(_O,[]),u=this._get_or_create_queue(wO,[]);n===IO?($E.extend(i,r),this._pop_from_people_queue(bO,r),this._pop_from_people_queue(xO,r),this._pop_from_people_queue(yO,r)):n===NO?($E.each(r,function(e,t){t in o||(o[t]=e)}),this._pop_from_people_queue(yO,r)):n===OO?$E.each(r,function(e){$E.each([i,o,s,l],function(t){e in t&&delete t[e]}),$E.each(u,function(t){e in t&&delete t[e]}),a[e]=!0}):n===TO?($E.each(r,function(e,t){t in i?i[t]+=e:(t in s||(s[t]=0),s[t]+=e)},this),this._pop_from_people_queue(yO,r)):n===MO?($E.each(r,function(e,t){$E.isArray(e)&&(t in l||(l[t]=[]),$E.each(e,function(e){$E.include(l[t],e)||l[t].push(e)}))}),this._pop_from_people_queue(yO,r)):n===jO?(c.push(r),this._pop_from_people_queue(wO,r)):n===RO&&(u.push(r),this._pop_from_people_queue(yO,r)),VE.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),VE.log(t),this.save()},FO.prototype._pop_from_people_queue=function(e,t){var n=this.props[this._get_queue_key(e)];$E.isUndefined(n)||$E.each(t,function(t,r){e===wO||e===_O?$E.each(n,function(e){e[r]===t&&delete e[r]}):delete n[r]},this)},FO.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},FO.prototype._get_queue_key=function(e){return e===gO?IO:e===vO?NO:e===yO?OO:e===bO?TO:e===wO?RO:e===_O?jO:e===xO?MO:void VE.error("Invalid queue:",e)},FO.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=$E.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)},FO.prototype.set_event_timer=function(e,t){var n=this.load_prop(LO)||{};n[e]=t,this.props[LO]=n,this.save()},FO.prototype.remove_event_timer=function(e){var t=(this.load_prop(LO)||{})[e];return $E.isUndefined(t)||(delete this.props[LO][e],this.save()),t};var zO,UO=function(e,t){throw new Error(e+" not available in this build.")},BO=function(e){return e},$O="mixpanel",VO="base64",WO="$device:",qO=gm.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,HO=!qO&&-1===PE.indexOf("MSIE")&&-1===PE.indexOf("Mozilla"),KO=null;RE.sendBeacon&&(KO=function(){return RE.sendBeacon.apply(RE,arguments)});var GO={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/"},ZO={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:GO,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:VO,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:sI,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:sI,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,record_idle_timeout_ms:18e5,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:_E,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},JO=!1,YO=function(){},XO=function(e,t,n){var r,i=n===$O?zO:zO[n];if(i&&0===EO)r=i;else{if(i&&!$E.isArray(i))return void VE.error("You have already initialized "+n);r=new YO}if(r._cached_groups={},r._init(e,t,n),r.people=new CO,r.people._init(r),!r.get_config("skip_first_touch_marketing")){var o=$E.info.campaignParams(null),a={},s=!1;$E.each(o,function(e,t){a["initial_"+t]=e,e&&(s=!0)}),s&&r.people.set_once(a)}return xE.DEBUG=xE.DEBUG||r.get_config("debug"),!$E.isUndefined(i)&&$E.isArray(i)&&(r._execute_array.call(r.people,i.people),r._execute_array(i)),r};YO.prototype.init=function(e,t,n){if($E.isUndefined(n))this.report_error("You must name your new library: init(token, config, name)");else{if(n!==$O){var r=XO(e,t,n);return zO[n]=r,r._loaded(),r}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},YO.prototype._init=function(e,t,n){t=t||{},this.__loaded=!0,this.config={};var r={};"api_payload_format"in t||(t.api_host||ZO.api_host).match(/\.mixpanel\.com/)&&(r.api_payload_format="json");if(this.set_config($E.extend({},ZO,r,t,{name:n,token:e,callback_fn:(n===$O?n:$O+"."+n)+"._jsc"})),this._jsc=sI,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if($E.localStorage.is_supported(!0)&&qO){if(this.init_batchers(),KO&&gm.addEventListener){var i=$E.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);gm.addEventListener("pagehide",function(e){e.persisted&&i()}),gm.addEventListener("visibilitychange",function(){"hidden"===jE.visibilityState&&i()})}}else this._batch_requests=!1,VE.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),$E.each(this.get_batcher_configs(),function(e){VE.log("Clearing batch queue "+e.queue_key),$E.localStorage.remove(e.queue_key)});this.persistence=this.cookie=new FO(this.config),this.unpersisted_superprops={},this._gdpr_init();var o=$E.UUID();this.get_distinct_id()||this.register_once({distinct_id:WO+o,$device_id:o},""),this.flags=new pO({getFullApiRoute:$E.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:$E.bind(this.get_config,this),setConfigFunc:$E.bind(this.set_config,this),getPropertyFunc:$E.bind(this.get_property,this),trackingFunc:$E.bind(this.track,this)}),this.flags.init(),this.flags=this.flags,this.autocapture=new sO(this),this.autocapture.init(),this._init_tab_id(),this._check_and_start_session_recording()},YO.prototype._init_tab_id=function(){if(this.get_config("disable_persistence"))VE.log("Tab ID initialization skipped due to disable_persistence config");else if($E.sessionStorage.is_supported())try{var e=this.get_config("name")+"_"+this.get_config("token"),t="mp_tab_id_"+e,n="mp_gen_new_tab_id_"+e;!$E.sessionStorage.get(n)&&$E.sessionStorage.get(t)||$E.sessionStorage.set(t,"$tab-"+$E.UUID()),$E.sessionStorage.set(n,"1"),this.tab_id=$E.sessionStorage.get(t),gm.addEventListener("beforeunload",function(){$E.sessionStorage.remove(n)})}catch(xR){this.report_error("Error initializing tab id",xR)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")},YO.prototype.get_tab_id=function(){return this.tab_id||null},YO.prototype._should_load_recorder=function(){if(this.get_config("disable_persistence"))return VE.log("Load recorder check skipped due to disable_persistence config"),Promise.resolve(!1);var e=new hI(dI),t=this.get_tab_id();return e.init().then(function(){return e.getAll()}).then(function(e){for(var n=0;n<e.length;n++)if(LI(e[n])||e[n].tabId===t)return!0;return!1}).catch($E.bind(function(e){this.report_error("Error checking recording registry",e)},this))},YO.prototype._check_and_start_session_recording=yI(function(e){if(gm.MutationObserver){var t=$E.bind(function(e){var t=$E.bind(function(){this._recorder=this._recorder||new gm.__mp_recorder(this),this._recorder.resumeRecording(e)},this);$E.isUndefined(gm.__mp_recorder)?UO(this.get_config("recorder_src"),t):t()},this),n=this.get_config("record_sessions_percent")>0&&100*Math.random()<=this.get_config("record_sessions_percent");e||n?t(!0):this._should_load_recorder().then(function(e){e&&t(!1)})}else VE.critical("Browser does not support MutationObserver; skipping session recording")}),YO.prototype.start_session_recording=function(){this._check_and_start_session_recording(!0)},YO.prototype.stop_session_recording=function(){return this._recorder?this._recorder.stopRecording():Promise.resolve()},YO.prototype.pause_session_recording=function(){return this._recorder?this._recorder.pauseRecording():Promise.resolve()},YO.prototype.resume_session_recording=function(){return this._recorder?this._recorder.resumeRecording():Promise.resolve()},YO.prototype.is_recording_heatmap_data=function(){return this._get_session_replay_id()&&this.get_config("record_heatmap_data")},YO.prototype.get_session_recording_properties=function(){var e={},t=this._get_session_replay_id();return t&&(e.$mp_replay_id=t),e},YO.prototype.get_session_replay_url=function(){var e=null,t=this._get_session_replay_id();t&&(e="https://mixpanel.com/projects/replay-redirect?"+$E.HTTPBuildQuery({replay_id:t,distinct_id:this.get_distinct_id(),token:this.get_config("token")}));return e},YO.prototype._get_session_replay_id=function(){var e=null;return this._recorder&&(e=this._recorder.replayId),e||null},YO.prototype.__get_recorder=function(){return this._recorder},YO.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=$E.info.campaignParams(null);$E.each(e,function(e,t){this.unregister(t)}.bind(this))}},YO.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(jE.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register($E.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(jE.referrer)},YO.prototype._dom_loaded=function(){$E.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||$E.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue},YO.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!JO)return this.__dom_loaded_queue.push([e,t]),!1;var n=(new e).init(this);return n.track.apply(n,t)},YO.prototype._prepare_callback=function(e,t){if($E.isUndefined(e))return null;if(qO){return function(n){e(n,t)}}var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],e(i,t)},i},YO.prototype._send_request=function(e,t,n,r){var i=!0;if(HO)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},a=null;r||!$E.isFunction(n)&&"string"!=typeof n||(r=n,n=null),n=$E.extend(o,n||{}),qO||(n.method="GET");var s="POST"===n.method,l=KO&&s&&"sendbeacon"===n.transport.toLowerCase(),c=n.verbose;t.verbose&&(c=!0),this.get_config("test")&&(t.test=1),c&&(t.verbose=1),this.get_config("img")&&(t.img=1),qO||(r?t.callback=r:(c||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),s&&(a="data="+encodeURIComponent(t.data),delete t.data),$E.extend(t,this.get_config("api_extra_query_params")),e+="?"+$E.HTTPBuildQuery(t);var u=this;if("img"in t){var d=jE.createElement("img");d.src=e,jE.body.appendChild(d)}else if(l){try{i=KO(e,a)}catch(tf){u.report_error(tf),i=!1}try{r&&r(i?1:0)}catch(tf){u.report_error(tf)}}else if(qO)try{var p=new XMLHttpRequest;p.open(n.method,e,!0);var h=this.get_config("xhr_headers");if(s&&(h["Content-Type"]="application/x-www-form-urlencoded"),$E.each(h,function(e,t){p.setRequestHeader(t,e)}),n.timeout_ms&&void 0!==p.timeout){p.timeout=n.timeout_ms;var f=(new Date).getTime()}p.withCredentials=!0,p.onreadystatechange=function(){var e;if(4===p.readyState)if(200===p.status){if(r)if(c){var t;try{t=$E.JSONDecode(p.responseText)}catch(tf){if(u.report_error(tf),!n.ignore_json_errors)return;t=p.responseText}r(t)}else r(Number(p.responseText))}else if(e=p.timeout&&!p.status&&(new Date).getTime()-f>=p.timeout?"timeout":"Bad HTTP status: "+p.status+" "+p.statusText,u.report_error(e),r)if(c){var i=p.responseHeaders||{};r({status:0,httpStatusCode:p.status,error:e,retryAfter:i["Retry-After"]})}else r(0)},p.send(a)}catch(tf){u.report_error(tf),i=!1}else{var m=jE.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=e;var g=jE.getElementsByTagName("script")[0];g.parentNode.insertBefore(m,g)}return i},YO.prototype._execute_array=function(e){var t,n=[],r=[],i=[];$E.each(e,function(e){e&&(t=e[0],$E.isArray(t)?i.push(e):"function"==typeof e?e.call(this):$E.isArray(e)&&"alias"===t?n.push(e):$E.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?i.push(e):r.push(e))},this);var o=function(e,t){$E.each(e,function(e){if($E.isArray(e[0])){var n=t;$E.each(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};o(n,this),o(r,this),o(i,this)},YO.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},YO.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:e+"_ev"},people:{type:"people",api_name:"engage",queue_key:e+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:e+"_gr"}},this._batcher_configs},YO.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=$E.bind(function(e){return new PI(e.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:$E.bind(function(t,n,r){var i=this.get_config("api_routes");this._send_request(this.get_api_host(e.api_name)+"/"+i[e.api_name],this._encode_data_for_request(t),n,this._prepare_callback(r,t))},this),beforeSendHook:$E.bind(function(t){return this._run_hook("before_send_"+e.type,t)},this),stopAllBatchingFunc:$E.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},YO.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,$E.each(this.request_batchers,function(e){e.start()}))},YO.prototype.stop_batch_senders=function(){this._batch_requests=!1,$E.each(this.request_batchers,function(e){e.stop(),e.clear()})},YO.prototype.push=function(e){this._execute_array([e])},YO.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},YO.prototype._encode_data_for_request=function(e){var t=lI(e);return this.get_config("api_payload_format")===VO&&(t=$E.base64Encode(t)),{data:t}},YO.prototype._track_or_batch=function(e,t){var n=$E.truncate(e.data,255),r=e.endpoint,i=e.batcher,o=e.should_send_immediately,a=e.send_request_options||{};t=t||sI;var s=!0,l=$E.bind(function(){return a.skip_hooks||(n=this._run_hook("before_send_"+e.type,n)),n?(VE.log("MIXPANEL REQUEST:"),VE.log(n),this._send_request(r,this._encode_data_for_request(n),a,this._prepare_callback(t,n))):null},this);return this._batch_requests&&!o?i.enqueue(n).then(function(e){e?t(1,n):l()}):s=l(),s&&n},YO.prototype.track=yI(function(e,t,n,r){r||"function"!=typeof n||(r=n,n=null);var i=(n=n||{}).transport;i&&(n.transport=i);var o=n.send_immediately;if("function"!=typeof r&&(r=sI),$E.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=$E.extend({},t)).token=this.get_config("token");var a=this.persistence.remove_event_timer(e);if(!$E.isUndefined(a)){var s=(new Date).getTime()-a;t.$duration=parseFloat((s/1e3).toFixed(3))}this._set_default_superprops();var l=this.get_config("track_marketing")?$E.info.marketingParams():{};t=$E.extend({},$E.info.properties({mp_loader:this.get_config("mp_loader")}),l,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var c=this.get_config("property_blacklist");$E.isArray(c)?$E.each(c,function(e){delete t[e]}):this.report_error("Invalid value for property_blacklist config: "+c);var u={event:e,properties:t};return this._track_or_batch({type:"events",data:u,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:n},r)}r(0)}}),YO.prototype.set_group=yI(function(e,t,n){$E.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,n)}),YO.prototype.add_group=yI(function(e,t,n){var r=this.get_property(e),i={};return void 0===r?(i[e]=[t],this.register(i)):-1===r.indexOf(t)&&(r.push(t),i[e]=r,this.register(i)),this.people.union(e,t,n)}),YO.prototype.remove_group=yI(function(e,t,n){var r=this.get_property(e);if(void 0!==r){var i=r.indexOf(t);i>-1&&(r.splice(i,1),this.register({group_key:r})),0===r.length&&this.unregister(e)}return this.people.remove(e,t,n)}),YO.prototype.track_with_groups=yI(function(e,t,n,r){var i=$E.extend({},t||{});return $E.each(n,function(e,t){null!=e&&(i[t]=e)}),this.track(e,i,r)}),YO.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},YO.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},YO.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),r=this._cached_groups[n];return void 0!==r&&r._group_key===e&&r._group_id===t||((r=new SO)._init(this,e,t),this._cached_groups[n]=r),r},YO.prototype.track_pageview=yI(function(e,t){"object"!=typeof e&&(e={});var n=(t=t||{}).event_name||"$mp_web_page_view",r=$E.extend($E.info.mpPageViewProperties(),$E.info.campaignParams(),$E.info.clickParams()),i=$E.extend({},r,e);return this.track(n,i)}),YO.prototype.track_links=function(){return this._track_dom.call(this,fO,arguments)},YO.prototype.track_forms=function(){return this._track_dom.call(this,mO,arguments)},YO.prototype.time_event=function(e){$E.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var QO={persistent:!0},eT=function(e){var t;return t=$E.isObject(e)?e:$E.isUndefined(e)?{}:{days:e},$E.extend({},QO,t)};YO.prototype.register=function(e,t){var n=eT(t);n.persistent?this.persistence.register(e,n.days):$E.extend(this.unpersisted_superprops,e)},YO.prototype.register_once=function(e,t,n){var r=eT(n);r.persistent?this.persistence.register_once(e,t,r.days):(void 0===t&&(t="None"),$E.each(e,function(e,n){this.unpersisted_superprops.hasOwnProperty(n)&&this.unpersisted_superprops[n]!==t||(this.unpersisted_superprops[n]=e)},this))},YO.prototype.unregister=function(e,t){(t=eT(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},YO.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},YO.prototype.identify=function(e,t,n,r,i,o,a,s){var l=this.get_distinct_id();if(e&&l!==e){if("string"==typeof e&&0===e.indexOf(WO))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var c=l;this.register_once({$had_persisted_distinct_id:!0,$device_id:c},"")}e!==l&&e!==this.get_property(PO)&&(this.unregister(PO),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,r,i,o,a,s),e!==l&&this.track("$identify",{distinct_id:e,$anon_distinct_id:l},{skip_hooks:!0}),e!==l&&this.flags.fetchFlags()},YO.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var e=$E.UUID();this.register_once({distinct_id:WO+e,$device_id:e},""),this._check_and_start_session_recording()},YO.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},YO.prototype.alias=function(e,t){if(e===this.get_property(AO))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return $E.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(PO,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){n.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},YO.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},YO.prototype.set_config=function(e){$E.isObject(e)&&($E.extend(this.config,e),e.batch_size&&$E.each(this.request_batchers,function(e){e.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),xE.DEBUG=xE.DEBUG||this.get_config("debug"),("autocapture"in e||"record_heatmap_data"in e)&&this.autocapture&&this.autocapture.init())},YO.prototype.get_config=function(e){return this.config[e]},YO.prototype._run_hook=function(e){var t=(this.config.hooks[e]||BO).apply(this,IE.call(arguments,1));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},YO.prototype.get_property=function(e){return this.persistence.load_prop([e])},YO.prototype.get_api_host=function(e){return this.get_config("api_hosts")[e]||this.get_config("api_host")},YO.prototype.toString=function(){var e=this.get_config("name");return e!==$O&&(e=$O+"."+e),e},YO.prototype._event_is_disabled=function(e){return $E.isBlockedUA(PE)||this._flags.disable_all_events||$E.include(this.__disabled_events,e)},YO.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&$E.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!$E.cookie.get("mp_optout")||($E.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},YO.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()},YO.prototype._gdpr_call_func=function(e,t){return t=$E.extend({track:$E.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),$E.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},YO.prototype.opt_in_tracking=function(e){e=$E.extend({enable_persistence:!0},e),this._gdpr_call_func(fI,e),this._gdpr_update_persistence(e)},YO.prototype.opt_out_tracking=function(e){(e=$E.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(mI,e),this._gdpr_update_persistence(e)},YO.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(gI,e)},YO.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(vI,e)},YO.prototype.clear_opt_in_out_tracking=function(e){e=$E.extend({enable_persistence:!0},e),this._gdpr_call_func(xI,e),this._gdpr_update_persistence(e)},YO.prototype.report_error=function(e,t){VE.error.apply(VE.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(n){VE.error(n)}},YO.prototype.init=YO.prototype.init,YO.prototype.reset=YO.prototype.reset,YO.prototype.disable=YO.prototype.disable,YO.prototype.time_event=YO.prototype.time_event,YO.prototype.track=YO.prototype.track,YO.prototype.track_links=YO.prototype.track_links,YO.prototype.track_forms=YO.prototype.track_forms,YO.prototype.track_pageview=YO.prototype.track_pageview,YO.prototype.register=YO.prototype.register,YO.prototype.register_once=YO.prototype.register_once,YO.prototype.unregister=YO.prototype.unregister,YO.prototype.identify=YO.prototype.identify,YO.prototype.alias=YO.prototype.alias,YO.prototype.name_tag=YO.prototype.name_tag,YO.prototype.set_config=YO.prototype.set_config,YO.prototype.get_config=YO.prototype.get_config,YO.prototype.get_api_host=YO.prototype.get_api_host,YO.prototype.get_property=YO.prototype.get_property,YO.prototype.get_distinct_id=YO.prototype.get_distinct_id,YO.prototype.toString=YO.prototype.toString,YO.prototype.opt_out_tracking=YO.prototype.opt_out_tracking,YO.prototype.opt_in_tracking=YO.prototype.opt_in_tracking,YO.prototype.has_opted_out_tracking=YO.prototype.has_opted_out_tracking,YO.prototype.has_opted_in_tracking=YO.prototype.has_opted_in_tracking,YO.prototype.clear_opt_in_out_tracking=YO.prototype.clear_opt_in_out_tracking,YO.prototype.get_group=YO.prototype.get_group,YO.prototype.set_group=YO.prototype.set_group,YO.prototype.add_group=YO.prototype.add_group,YO.prototype.remove_group=YO.prototype.remove_group,YO.prototype.track_with_groups=YO.prototype.track_with_groups,YO.prototype.start_batch_senders=YO.prototype.start_batch_senders,YO.prototype.stop_batch_senders=YO.prototype.stop_batch_senders,YO.prototype.start_session_recording=YO.prototype.start_session_recording,YO.prototype.stop_session_recording=YO.prototype.stop_session_recording,YO.prototype.pause_session_recording=YO.prototype.pause_session_recording,YO.prototype.resume_session_recording=YO.prototype.resume_session_recording,YO.prototype.get_session_recording_properties=YO.prototype.get_session_recording_properties,YO.prototype.get_session_replay_url=YO.prototype.get_session_replay_url,YO.prototype.get_tab_id=YO.prototype.get_tab_id,YO.prototype.DEFAULT_API_ROUTES=GO,YO.prototype.__get_recorder=YO.prototype.__get_recorder,FO.prototype.properties=FO.prototype.properties,FO.prototype.update_search_keyword=FO.prototype.update_search_keyword,FO.prototype.update_referrer_info=FO.prototype.update_referrer_info,FO.prototype.get_cross_subdomain=FO.prototype.get_cross_subdomain,FO.prototype.clear=FO.prototype.clear;var tT={},nT=function(){zO.init=function(e,t,n){if(n)return zO[n]||(zO[n]=tT[n]=XO(e,t,n),zO[n]._loaded()),zO[n];var r=zO;tT[$O]?r=tT[$O]:e&&((r=XO(e,t,$O))._loaded(),tT[$O]=r),zO=r,1===EO&&(gm[$O]=zO),$E.each(tT,function(e,t){t!==$O&&(zO[t]=e)}),zO._=$E}};UO=function(e,t){t()},EO=0,zO=new YO,nT(),zO.init(),function(){function e(){e.done||(e.done=!0,JO=!0,HO=!1,$E.each(tT,function(e){e._dom_loaded()}))}if(jE.addEventListener)"complete"===jE.readyState?e():jE.addEventListener("DOMContentLoaded",e,!1);else if(jE.attachEvent){jE.attachEvent("onreadystatechange",e);var t=!1;try{t=null===gm.frameElement}catch(tf){}jE.documentElement.doScroll&&t&&function t(){try{jE.documentElement.doScroll("left")}catch(tf){return void setTimeout(t,1)}e()}()}$E.register_event(gm,"load",e,!0)}();const rT=(e,t)=>{(()=>{if("undefined"==typeof window)return!1;const e=window.location.hostname,t=window.location.port;"localhost"===e||"127.0.0.1"===e||e.startsWith("192.168.")})()},iT=({agent:e,initialIdentity:t="",onIdentityChange:n,onMessageSent:r,mode:i="portal",customEndpoint:o})=>{const a={trackDashboardView:()=>rT(),trackDashboardRefresh:()=>rT(),trackDashboardExport:()=>rT(),trackMetricCardClick:e=>rT(),trackAlertAction:(e,t)=>rT(),trackAgentListViewed:()=>rT(),trackAgentCreated:e=>rT(),trackAgentUpdated:(e,t)=>rT(),trackAgentDeleted:e=>rT(),trackAgentViewed:(e,t)=>rT(),trackAgentSearch:e=>rT(),trackAgentFilter:(e,t)=>rT(),trackAgentViewModeChanged:e=>rT(),trackAgentDetailTabChanged:(e,t)=>rT(),trackAgentTestStarted:(e,t)=>rT(),trackAgentTestMessageSent:(e,t)=>rT(),trackAgentTestCompleted:(e,t)=>rT(),trackAgentCodeEdited:e=>rT(),trackAgentTriggerCreated:(e,t)=>rT(),trackAgentMemoryAccessed:e=>rT(),trackAgentMetricsViewed:e=>rT(),trackAgentObservabilityViewed:e=>rT(),trackConnectorsListViewed:()=>rT(),trackConnectorTemplateViewed:(e,t)=>rT(),trackConnectorInstanceCreated:(e,t)=>rT(),trackConnectorInstanceDeleted:e=>rT(),trackConnectorDetailViewed:e=>rT(),trackConnectorTabChanged:(e,t)=>rT(),trackConnectorResourceCreated:(e,t)=>rT(),trackConnectorResourceUpdated:(e,t)=>rT(),trackConnectorResourceDeleted:(e,t)=>rT(),trackConnectorResourceTested:(e,t)=>rT(),trackConnectorSearch:e=>rT(),trackDataSourcesListViewed:()=>rT(),trackDataSourceCreated:(e,t)=>rT(),trackDataSourceUpdated:e=>rT(),trackDataSourceDeleted:(e,t)=>rT(),trackDataSourceViewed:e=>rT(),trackDataSourceConnectionTested:(e,t)=>rT(),trackDataSourceSynced:e=>rT(),trackCredentialsListViewed:()=>rT(),trackCredentialCreated:e=>rT(),trackCredentialUpdated:e=>rT(),trackCredentialDeleted:e=>rT(),trackCredentialViewed:e=>rT(),trackPromptsListViewed:()=>rT(),trackPromptCreated:e=>rT(),trackPromptUpdated:e=>rT(),trackPromptDeleted:e=>rT(),trackPromptViewed:e=>rT(),trackTriggersListViewed:()=>rT(),trackTriggerCreated:(e,t)=>rT(),trackTriggerUpdated:e=>rT(),trackTriggerDeleted:e=>rT(),trackTriggerViewed:e=>rT(),trackTriggerActivated:e=>rT(),trackTriggerDeactivated:e=>rT(),trackVectorSearchViewed:()=>rT(),trackVectorSearchPerformed:(e,t)=>rT(),trackKnowledgeBaseViewed:()=>rT(),trackAdminDashboardViewed:()=>rT(),trackTenantCreated:e=>rT(),trackTenantUpdated:e=>rT(),trackUserAccessGranted:(e,t)=>rT(),trackUserAccessRevoked:(e,t)=>rT(),trackProfileViewed:()=>rT(),trackProfileUpdated:()=>rT(),trackDocumentationViewed:()=>rT(),trackNavigationClick:(e,t)=>rT(),trackSidebarToggled:e=>rT()},[s,l]=B.useState([]),[c,u]=B.useState(""),[d,p]=B.useState(t),[h,f]=B.useState(!1),[m,g]=B.useState("disconnected"),[v,y]=B.useState(!1),[b,w]=B.useState(!1),[x,_]=B.useState(!1),[k,S]=B.useState("fields"),[C,E]=B.useState(null),[I,N]=B.useState([{key:"",value:""}]),[O,T]=B.useState('{\n "metadata": {\n "email": ""\n }\n}'),R=B.useRef(null),j=B.useRef(null);B.useEffect(()=>{var e;null==(e=R.current)||e.scrollIntoView({behavior:"smooth"})},[s]),B.useEffect(()=>{g("testing"),M()},[e]);const M=async(e=3,t=2e3)=>{let n=0;for(;n<e;){n++,n>1&&(l([{id:"1",type:"system",content:`🔄 Connecting to agent... (Attempt ${n}/${e})\n\nWaiting for server to be ready...`,timestamp:(new Date).toISOString()}]),await new Promise(e=>setTimeout(e,t)));if(await A())return;if(n===e)return}};B.useEffect(()=>{n&&d!==t&&n(d)},[d,n,t]);const A=async()=>{let t;if(t=o?`${o}/api/v1/agents/execute`:e.endpointUrl,!t)return l([{id:"1",type:"error",content:`❌ **Configuration Error**\n\nAgent "${e.name}" doesn't have an endpoint URL configured.`,timestamp:(new Date).toISOString()}]),g("disconnected"),!1;try{const e=await P("ping",null);if(e.error)throw new Error(e.error||"Connection failed");return g("connected"),l([{id:"1",type:"system",content:"✅ Connected to agent. Ready to receive messages."+(o?`\n\n**Local Mode:** ${t}`:""),timestamp:(new Date).toISOString()}]),!0}catch(gE){return g("disconnected"),l([{id:"1",type:"error",content:`❌ **Connection Failed**\n\nCouldn't connect to agent "${e.name}".\n\n**Endpoint:** ${t}\n**Error:** ${gE instanceof Error?gE.message:"Unknown error"}`,timestamp:(new Date).toISOString()}]),!1}},P=async(t,n=null)=>{var r;let i;if(i=o?`${o}/api/v1/agents/execute`:e.endpointUrl,!i)return{content:"",error:"Endpoint URL not configured"};let a={};if("ping"!==t)if("json"===k)try{O.trim()&&(a=JSON.parse(O))}catch(gE){return{content:"",error:`Invalid JSON in metadata: ${gE instanceof Error?gE.message:"Parse error"}`,rawRequest:{message:t,metadata_error:O},rawResponse:null}}else I.forEach(({key:e,value:t})=>{e.trim()&&t.trim()&&(a[e.trim()]=t.trim())});const s="ping"===t?{message:t}:{message:t,...a};try{const e=Date.now(),o={"Content-Type":"application/json"};n&&"ping"!==t&&(o["X-Session-Id"]=n),d&&"ping"!==t&&(o["X-Thread-Id"]=d),j.current=new AbortController;const a=await fetch(i,{method:"POST",headers:o,body:JSON.stringify(s),signal:j.current.signal});if(!a.ok)throw new Error(`HTTP ${a.status}: ${a.statusText}`);const l="ping"!==t?a.headers.get("x-session-id"):void 0,c=await a.json(),u=c.processingTime||(null==(r=c.metadata)?void 0:r.processingTime)||Date.now()-e,p=c.sessionId||c.session_id||c["x-session-id"];let h="";return h="string"==typeof c?c:c.response?"string"==typeof c.response?c.response:JSON.stringify(c.response,null,2):c.message?"string"==typeof c.message?c.message:"object"==typeof c.message&&c.message.output?c.message.output:JSON.stringify(c.message,null,2):c.content?"string"==typeof c.content?c.content:JSON.stringify(c.content,null,2):JSON.stringify(c,null,2),{content:h,metadata:{processingTime:u,...c.metadata},rawRequest:s,rawResponse:c,sessionId:l||p||void 0}}catch(gE){return gE instanceof Error&&"AbortError"===gE.name?{content:"",error:"Request cancelled by user",rawRequest:s,rawResponse:null}:{content:"",error:gE instanceof Error?gE.message:"Error communicating with agent",rawRequest:s,rawResponse:null}}},L=(e,t)=>({memory_load:"carregando memória",memory_save:"salvando contexto",tool_call:t?`usando ${t}`:"usando ferramenta",tool_result:"processando",rag_search:"buscando informações"}[e]||"pensando"),D=async()=>{if(!c.trim()||h||"connected"!==m)return;const t={id:Date.now().toString(),type:"user",content:c,timestamp:(new Date).toISOString()};a.trackAgentTestMessageSent(e.id,c.length),l(e=>[...e,t]);const n=c;let i;if(u(""),f(!0),x){i=(Date.now()+1).toString();const e={id:i,type:"agent",content:"",timestamp:(new Date).toISOString(),thinkingStatus:null};l(t=>[...t,e])}try{if(x)await(async(t,n=null,r)=>{var i,a,s;let c;if(o)c=`${o}/api/v1/agents/execute/stream`;else{const t=new URL(e.endpointUrl);t.pathname=t.pathname.replace(/\/?$/,"/stream"),c=t.toString()}let u={};if("json"===k)try{O.trim()&&(u=JSON.parse(O))}catch(gE){throw new Error(`Invalid JSON in metadata: ${gE instanceof Error?gE.message:"Parse error"}`)}else I.forEach(({key:e,value:t})=>{e.trim()&&t.trim()&&(u[e.trim()]=t.trim())});const p={message:t,...u};j.current=new AbortController;const h={"Content-Type":"application/json",Accept:"text/event-stream"};n&&(h["X-Session-Id"]=n),d&&(h["X-Thread-Id"]=d);try{const e=await fetch(c,{method:"POST",headers:h,body:JSON.stringify(p),signal:j.current.signal});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);const t=e.headers.get("x-session-id");t&&E(t);const n=null==(i=e.body)?void 0:i.getReader();if(!n)throw new Error("Response body is not readable");const o=new TextDecoder;let u="",d="";const m=r||(Date.now()+1).toString();if(r)l(e=>e.map(e=>e.id===m?{...e,rawRequest:p}:e));else{const e={id:m,type:"agent",content:"",timestamp:(new Date).toISOString(),rawRequest:p,thinkingStatus:null};l(t=>[...t,e])}for(;;){const{done:e,value:t}=await n.read();if(e)break;u+=o.decode(t,{stream:!0});const r=u.split("\n");u=r.pop()||"";for(const n of r)if(n.startsWith("data: ")){const e=n.slice(6);if("[DONE]"===e)continue;try{const t=JSON.parse(e);if("content"===t.type)d+=t.data.content,l(e=>e.map(e=>e.id===m?{...e,content:d}:e));else if("internal_process"===t.type){const e=t.data;if("started"===e.status){const t=L(e.processType,null==(a=e.process)?void 0:a.name);l(e=>e.map(e=>e.id===m?{...e,thinkingStatus:t}:e))}else"completed"===e.status&&l(e=>e.map(e=>e.id===m?{...e,thinkingStatus:null}:e))}else if("done"===t.type){l(e=>e.map(e=>e.id===m?{...e,content:t.data.message||d,metadata:t.data.metadata,rawResponse:t.data}:e));const e=t.data.sessionId||t.data.session_id||t.data["x-session-id"]||(null==(s=t.data.metadata)?void 0:s.sessionId);e&&E(e)}else if("error"===t.type)throw new Error(t.data.error)}catch(f){}}}}catch(gE){if(gE instanceof Error&&"AbortError"===gE.name)throw new Error("Request cancelled by user");throw gE}})(n,C,i);else{const e=await P(n,C);if(e.error){const t={id:(Date.now()+1).toString(),type:"error",content:`❌ **Communication Error**\n\n${e.error}`,timestamp:(new Date).toISOString(),rawRequest:e.rawRequest,rawResponse:e.rawResponse};l(e=>[...e,t])}else{e.sessionId&&E(e.sessionId);const t={id:(Date.now()+1).toString(),type:"agent",content:e.content,timestamp:(new Date).toISOString(),metadata:e.metadata,rawRequest:e.rawRequest,rawResponse:e.rawResponse};l(e=>[...e,t])}}r&&r()}catch(gE){const t={id:(Date.now()+1).toString(),type:"error",content:`❌ **Unexpected Error**\n\n${gE instanceof Error?gE.message:"Unknown error"}`,timestamp:(new Date).toISOString()};l(e=>[...e,t])}finally{f(!1),j.current=null}},F=(e,t,n)=>{const r=[...I];r[e][t]=n,N(r)},z="connected"===m?[{label:"Hello, how can you help?",value:"Hello, how can you help?"},{label:"What's your purpose?",value:"What's your purpose?"},{label:"Give me an example",value:"Give me an example"}]:[];return J.jsxs("div",{className:"flex flex-col h-full bg-white",children:[J.jsx("div",{className:"px-4 py-3 border-b border-gray-200 flex-shrink-0",children:J.jsxs("div",{className:"flex items-center justify-between mb-3",children:[J.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Test Agent"}),J.jsxs("div",{className:"flex items-center space-x-1",children:[J.jsx("button",{onClick:()=>_(!x),className:"p-1.5 rounded transition-colors "+(x?"bg-blue-100 text-blue-600":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"),title:x?"Streaming Enabled":"Streaming Disabled",children:J.jsx(mm,{className:"h-3.5 w-3.5"})}),J.jsx("button",{onClick:()=>w(!b),className:"p-1.5 rounded transition-colors "+(b?"bg-blue-100 text-blue-600":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"),title:"Debug Mode",children:J.jsx(Qf,{className:"h-3.5 w-3.5"})}),J.jsx("button",{onClick:()=>y(!v),className:"p-1.5 rounded transition-colors "+(v?"bg-blue-100 text-blue-600":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"),title:"Advanced Settings",children:J.jsx(um,{className:"h-3.5 w-3.5"})})]})]})}),v&&J.jsxs("div",{className:"border-b border-gray-200 p-3 bg-gray-50 flex-shrink-0 max-h-48 overflow-y-auto",children:[J.jsxs("div",{className:"flex items-center justify-between mb-2",children:[J.jsx("h4",{className:"text-xs font-medium text-gray-700",children:"Custom Metadata"}),J.jsxs("div",{className:"flex items-center space-x-1",children:[J.jsx("button",{type:"button",onClick:()=>S("fields"),className:"px-2 py-0.5 text-xs rounded transition-colors "+("fields"===k?"bg-blue-100 text-blue-700 border border-blue-300":"bg-white text-gray-600 border border-gray-300 hover:bg-gray-50"),children:"Fields"}),J.jsx("button",{type:"button",onClick:()=>S("json"),className:"px-2 py-0.5 text-xs rounded transition-colors "+("json"===k?"bg-blue-100 text-blue-700 border border-blue-300":"bg-white text-gray-600 border border-gray-300 hover:bg-gray-50"),children:"JSON"})]})]}),"fields"===k?J.jsxs("div",{className:"space-y-1.5",children:[I.map((e,t)=>J.jsxs("div",{className:"flex items-center space-x-2",children:[J.jsx("input",{type:"text",placeholder:"Key",value:e.key,onChange:e=>F(t,"key",e.target.value),className:"flex-1 px-2 py-1 text-xs border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"}),J.jsx("input",{type:"text",placeholder:"Value",value:e.value,onChange:e=>F(t,"value",e.target.value),className:"flex-1 px-2 py-1 text-xs border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"}),I.length>1&&J.jsx("button",{type:"button",onClick:()=>(e=>{I.length>1&&N(I.filter((t,n)=>n!==e))})(t),className:"text-red-500 hover:text-red-700 p-1",children:J.jsx(dm,{className:"h-3 w-3"})})]},t)),J.jsxs("button",{type:"button",onClick:()=>{N([...I,{key:"",value:""}])},className:"inline-flex items-center text-xs text-blue-600 hover:text-blue-700",children:[J.jsx(sm,{className:"h-3 w-3 mr-1"}),"Add field"]})]}):J.jsx("div",{className:"space-y-1.5",children:J.jsx("textarea",{value:O,onChange:e=>T(e.target.value),placeholder:'{\\n "metadata": {...}\\n}',className:"w-full px-2 py-1.5 text-xs font-mono border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500 resize-none",rows:3})})]}),J.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 min-h-0",children:[s.map(e=>{return J.jsx("div",{className:"flex "+("user"===e.type?"justify-end":"justify-start"),children:J.jsx("div",{className:"max-w-[85%] px-3 py-2 rounded-lg "+("user"===e.type?"bg-gray-800 text-white":"system"===e.type?"bg-blue-50 text-blue-800 border border-blue-200":"error"===e.type?"bg-red-50 text-red-800 border border-red-200":"bg-gray-100 text-gray-800"),children:J.jsxs("div",{className:"flex items-start space-x-2",children:["error"===e.type&&J.jsx(Gf,{className:"h-3.5 w-3.5 mt-0.5 text-red-600 flex-shrink-0"}),J.jsxs("div",{className:"flex-1",children:[e.content&&J.jsx("div",{className:"text-xs whitespace-pre-line",children:e.content}),e.thinkingStatus&&J.jsxs("div",{className:"flex items-center space-x-1 mt-1.5 text-xs text-gray-500 italic",children:[J.jsx(rm,{className:"h-2.5 w-2.5 animate-spin"}),J.jsxs("span",{children:[e.thinkingStatus,"..."]})]}),!e.content&&!e.thinkingStatus&&"agent"===e.type&&J.jsxs("div",{className:"flex items-center space-x-1 text-xs text-gray-500 italic",children:[J.jsx(rm,{className:"h-2.5 w-2.5 animate-spin"}),J.jsx("span",{children:"pensando..."})]}),J.jsx("div",{className:"text-xs opacity-70 mt-1",children:(t=e.timestamp,new Date(t).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}))}),b&&("agent"===e.type||"error"===e.type)&&J.jsxs("div",{className:"mt-2 space-y-1.5",children:[e.rawRequest&&J.jsxs("details",{className:"text-xs bg-blue-50 border border-blue-200 rounded",children:[J.jsxs("summary",{className:"cursor-pointer px-2 py-1.5 flex items-center space-x-1.5 text-blue-700 hover:bg-blue-100 transition-colors",children:[J.jsx(Jf,{className:"h-3.5 w-3.5"}),J.jsx("span",{className:"font-medium",children:"Request Sent"})]}),J.jsx("pre",{className:"mt-1 mx-2 mb-2 p-2 bg-gray-900 text-green-400 rounded text-xs overflow-x-auto font-mono",children:JSON.stringify(e.rawRequest,null,2)})]}),e.rawResponse&&J.jsxs("details",{className:"text-xs bg-purple-50 border border-purple-200 rounded",children:[J.jsxs("summary",{className:"cursor-pointer px-2 py-1.5 flex items-center space-x-1.5 text-purple-700 hover:bg-purple-100 transition-colors",children:[J.jsx(Zf,{className:"h-3.5 w-3.5"}),J.jsx("span",{className:"font-medium",children:"Response Received"})]}),J.jsx("pre",{className:"mt-1 mx-2 mb-2 p-2 bg-gray-900 text-cyan-400 rounded text-xs overflow-x-auto font-mono",children:JSON.stringify(e.rawResponse,null,2)})]})]})]})]})})},e.id);var t}),h&&!x&&J.jsx("div",{className:"flex justify-start",children:J.jsx("div",{className:"bg-gray-100 text-gray-800 px-3 py-2 rounded-lg",children:J.jsxs("div",{className:"flex items-center space-x-2",children:[J.jsx(rm,{className:"h-3.5 w-3.5 animate-spin text-gray-600"}),J.jsx("span",{className:"text-xs",children:"Processing..."})]})})}),J.jsx("div",{ref:R})]}),s.length<=1&&"connected"===m&&z.length>0&&J.jsxs("div",{className:"px-4 py-2 border-t border-gray-100 flex-shrink-0",children:[J.jsx("div",{className:"text-xs text-gray-500 mb-1.5",children:"Quick start:"}),J.jsx("div",{className:"flex flex-wrap gap-1.5",children:z.map((e,t)=>J.jsx("button",{onClick:()=>u(e.value),className:"text-xs px-2 py-1 bg-gray-100 text-gray-700 rounded hover:bg-gray-200 transition-colors",children:e.label},t))})]}),J.jsxs("div",{className:"p-4 border-t border-gray-200 flex-shrink-0",children:[J.jsxs("div",{className:"flex space-x-2",children:[J.jsx("textarea",{value:c,onChange:e=>u(e.target.value),onKeyPress:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),D())},placeholder:"Type your message...",className:"flex-1 border border-gray-300 rounded-lg px-2 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-gray-800 focus:border-transparent resize-none",rows:2,disabled:"connected"!==m}),J.jsx("button",{onClick:h?()=>{j.current&&(j.current.abort(),j.current=null,f(!1))}:D,disabled:!c.trim()&&!h||"connected"!==m,className:"px-3 py-1.5 rounded-lg transition-colors flex items-center self-end "+(h?"bg-red-600 hover:bg-red-700 text-white":"bg-gray-800 hover:bg-gray-900 text-white disabled:opacity-50 disabled:cursor-not-allowed"),children:h?J.jsxs(J.Fragment,{children:[J.jsx(fm,{className:"h-4 w-4 mr-1"}),J.jsx("span",{className:"text-xs font-medium",children:"Stop"})]}):J.jsx(cm,{className:"h-4 w-4"})})]}),J.jsx("div",{className:"mt-1.5 text-xs text-gray-500",children:"connected"===m?J.jsx("span",{children:"🔗 Connected • Press Enter to send"}):"testing"===m?J.jsx("span",{children:"⏳ Testing connection..."}):J.jsx("span",{children:"❌ Disconnected"})})]})]})};const oT="runflow_token_cache";let aT=(()=>{try{const e=localStorage.getItem(oT);if(e){const t=JSON.parse(e);if(t.expiresAt>Date.now())return t;localStorage.removeItem(oT)}}catch(gE){}return{token:null,expiresAt:0}})();const sT=new class{constructor(e="https://api.runflow.ai/api/v1"){t(this,"baseURL"),t(this,"tenantId",null),this.baseURL=e}setTenantId(e){this.tenantId=e}async getAccessToken(){return null}async request(e,t={},n=!1){var r;const i=`${this.baseURL}${e}`,o={"Content-Type":"application/json",...t.headers};try{const e=await this.getAccessToken();e&&(o.Authorization=`Bearer ${e}`)}catch(gE){}this.tenantId&&(o["X-Tenant-ID"]=this.tenantId);const a={headers:o,...t};try{const e=await fetch(i,a);if(401===e.status)return this.clearLocalData(),{data:null,success:!1,message:"Sessão expirada. Você será redirecionado para o login."};if(!e.ok){let t=null;try{t=await e.json()}catch(tf){}const n=(null==t?void 0:t.message)||(null==t?void 0:t.error),r=403===e.status&&n?n:`HTTP error! status: ${e.status} - ${e.statusText}`,i=new Error(r);throw i.response={data:t,status:e.status},i.data=t,i.status=e.status,i}if(204===e.status||"0"===e.headers.get("content-length"))return{data:null,success:!0};const t=await e.text();if(!t||""===t.trim())return{data:null,success:!0};try{return{data:JSON.parse(t),success:!0}}catch(s){return{data:null,success:!0}}}catch(gE){if(null==(r=null==gE?void 0:gE.response)?void 0:r.data)throw gE;return{data:null,success:!1,message:gE instanceof Error?gE.message:"Unknown error"}}}clearLocalData(){aT={token:null,expiresAt:0};try{localStorage.removeItem(oT),localStorage.removeItem("currentTenantId")}catch(gE){}this.tenantId=null}async get(e){return this.request(e,{method:"GET"})}async post(e,t){return this.request(e,{method:"POST",body:JSON.stringify(t)})}async put(e,t){return this.request(e,{method:"PUT",body:JSON.stringify(t)})}async patch(e,t){return this.request(e,{method:"PATCH",body:JSON.stringify(t)})}async delete(e){return this.request(e,{method:"DELETE"})}},lT=e=>{var t,n,r;return{id:e.id,name:e.name,description:e.description,category:{CUSTOMER_SUPPORT:"customer-support",SALES:"sales",VOICE:"voice",OPERATIONS:"operations",FINANCIAL_PREVENTION:"financial-prevention",FINANCIAL_RECOVERY:"financial-recovery",MARKETING:"marketing",ANALYTICS:"analytics"}[e.category]||(null==(t=e.category)?void 0:t.toLowerCase().replace("_","-"))||"other",subcategory:e.subcategory,status:(null==(n=e.status)?void 0:n.toLowerCase())||"inactive",lastDeploy:e.lastDeploy,updatedAt:e.updatedAt,logo:e.logo,repositoryUrl:e.repositoryUrl,dataSources:[],triggers:[],tags:e.tags||[],code:e.code||"",language:(null==(r=e.language)?void 0:r.toLowerCase())||"typescript",prompts:[],branch:e.branch||"main",commit:e.commit||"N/A",newEngine:e.newEngine,fileTree:e.fileTree&&Array.isArray(e.fileTree.data)?{data:e.fileTree.data,success:!0}:{data:[],success:!0},repositoryName:e.repositoryName||"N/A",endpointUrl:e.endpointUrl||"N/A",readme:e.readme||void 0}},cT=e=>{var t,n,r;return{name:e.name,description:e.description,category:{"customer-support":"CUSTOMER_SUPPORT",sales:"SALES",voice:"VOICE",operations:"OPERATIONS","financial-prevention":"FINANCIAL_PREVENTION","financial-recovery":"FINANCIAL_RECOVERY",marketing:"MARKETING",analytics:"ANALYTICS"}[e.category]||(null==(t=e.category)?void 0:t.toUpperCase()),subcategory:e.subcategory,newEngine:e.newEngine,status:{active:"ACTIVE",inactive:"INACTIVE",error:"ERROR",deploying:"DEPLOYING"}[e.status]||(null==(n=e.status)?void 0:n.toUpperCase())||"INACTIVE",code:e.code||"// Agent code",language:(null==(r=e.language)?void 0:r.toUpperCase())||"TYPESCRIPT",branch:e.branch||"main",tags:e.tags||[]}},uT={getAll:()=>sT.get("/agents").then(e=>{if(e.success&&e.data&&e.data.data){const t=e.data.data.map(lT);return{...e,data:{...e.data,data:t}}}return e}),getById:e=>sT.get(`/agents/${e}`).then(e=>{if(e.success&&e.data){const t=lT(e.data);return{...e,data:t}}return e}),create:e=>{const t=cT(e);return sT.post("/agents",t)},update:(e,t)=>{const n=cT(t);return sT.patch(`/agents/${e}`,n)},delete:e=>sT.delete(`/agents/${e}`),execute:(e,t)=>sT.post(`/agents/${e}/execute`,t),commitCode:(e,t)=>sT.patch(`/agents/${e}/code`,t),getFileTree:e=>sT.get(`/agents/${e}/tree`),getCategories:()=>sT.get("/agents/categories"),getMetrics:(e,t=30)=>sT.get(`/agents/${e}/business-metrics?days=${t}`),getCategoryMetrics:e=>sT.get(`/agents/category/${e}/metrics`),clearMetricsCache:e=>sT.delete(`/agents/${e}/metrics/cache`),clearCategoryMetricsCache:e=>sT.delete(`/agents/category/${e}/metrics/cache`),testEndpoint:async(e,t)=>{try{const n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t}),signal:AbortSignal.timeout(3e4)});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);return{success:!0,data:await n.json(),error:null}}catch(gE){return{success:!1,data:null,error:gE instanceof Error?gE.message:"Erro desconhecido"}}},resetData:e=>sT.post("/agent-data/reset",e)},dT=Object.freeze(Object.defineProperty({__proto__:null,agentsApi:uT,apiClient:sT},Symbol.toStringTag,{value:"Module"})),pT=B.createContext(void 0);function hT(){const{getAccessTokenSilently:e}=(void 0===t&&(t=kf),B.useContext(t));var t;const{currentTenant:n}=(()=>{const e=B.useContext(pT);if(void 0===e)throw new Error("useTenant must be used within a TenantProvider");return e})(),r=async(t,r={})=>{const{includeTenantId:i=!0,headers:o={},...a}=r;try{const r=await e(),s="https://api.runflow.ai/api/v1",l=t.startsWith("http")?t:`${s}${t}`,c={Authorization:`Bearer ${r}`,"Content-Type":"application/json",...o};i&&(null==n?void 0:n.id)&&(c["X-Tenant-ID"]=n.id);return await fetch(l,{...a,headers:c})}catch(gE){throw gE}},i=async(e,t={})=>{const n=await r(e,t);if(!n.ok){const e=await n.text();throw new Error(`API Error ${n.status}: ${e}`)}return 204===n.status?{success:!0,message:"Operation completed successfully"}:n.json()};return{apiCall:r,apiCallJson:i,get:(e,t={})=>i(e,{...t,method:"GET"}),post:(e,t,n={})=>i(e,{...n,method:"POST",body:t?JSON.stringify(t):void 0}),put:(e,t,n={})=>i(e,{...n,method:"PUT",body:t?JSON.stringify(t):void 0}),patch:(e,t,n={})=>i(e,{...n,method:"PATCH",body:t?JSON.stringify(t):void 0}),delete:(e,t={})=>i(e,{...t,method:"DELETE"}),currentTenantId:null==n?void 0:n.id,currentTenantDomain:null==n?void 0:n.domain}}const fT=({threadId:e,entityValue:t,executions:n,loading:r,onBack:i,onExecutionClick:o,onRefresh:a})=>{const s=e=>{switch(e){case"success":return J.jsx(Yf,{className:"h-4 w-4 text-green-600"});case"error":return J.jsx(Gf,{className:"h-4 w-4 text-red-600"});default:return J.jsx(Xf,{className:"h-4 w-4 text-yellow-600"})}};n.reduce((e,t)=>e+t.totalDurationMs,0);const l=n.reduce((e,t)=>e+(t.totalTokens||0),0),c=n.filter(e=>"success"===e.status).length,u=n.filter(e=>"error"===e.status).length;return J.jsxs("div",{className:"flex flex-col h-full bg-white",children:[J.jsxs("div",{className:"px-4 py-3 border-b border-gray-200 flex-shrink-0",children:[J.jsxs("div",{className:"flex items-center justify-between mb-2",children:[J.jsxs("div",{className:"flex items-center space-x-3",children:[J.jsx("button",{onClick:i,className:"p-1 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded transition-colors",title:"Back to threads",children:J.jsx(Vf,{className:"h-4 w-4"})}),J.jsx(om,{className:"h-5 w-5 text-blue-600"}),J.jsxs("div",{children:[J.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Messages"}),J.jsxs("p",{className:"text-xs text-gray-500",children:["Thread: ",J.jsx("span",{className:"font-mono",children:t})]})]})]}),a&&J.jsx("button",{onClick:a,className:"p-1.5 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded transition-colors",title:"Refresh",children:J.jsx(lm,{className:"h-3.5 w-3.5 "+(r?"animate-spin":"")})})]}),n.length>0&&J.jsxs("div",{className:"grid grid-cols-4 gap-2 mt-2 p-2 bg-gray-50 rounded",children:[J.jsxs("div",{className:"text-center",children:[J.jsx("div",{className:"text-xs text-gray-500",children:"Mensagens"}),J.jsx("div",{className:"text-sm font-semibold text-gray-900",children:n.length})]}),J.jsxs("div",{className:"text-center",children:[J.jsx("div",{className:"text-xs text-gray-500",children:"Sucesso"}),J.jsx("div",{className:"text-sm font-semibold text-green-600",children:c})]}),J.jsxs("div",{className:"text-center",children:[J.jsx("div",{className:"text-xs text-gray-500",children:"Erros"}),J.jsx("div",{className:"text-sm font-semibold text-red-600",children:u})]}),J.jsxs("div",{className:"text-center",children:[J.jsx("div",{className:"text-xs text-gray-500",children:"Tokens"}),J.jsx("div",{className:"text-sm font-semibold text-gray-900",children:l.toLocaleString()})]})]})]}),J.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 min-h-0",children:r&&0===n.length?J.jsx("div",{className:"space-y-3",children:[...Array(3)].map((e,t)=>J.jsx("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-3 animate-pulse",children:J.jsxs("div",{className:"flex items-start space-x-3",children:[J.jsx("div",{className:"w-6 h-6 bg-gray-200 rounded-full"}),J.jsxs("div",{className:"flex-1 space-y-2",children:[J.jsx("div",{className:"h-3 bg-gray-200 rounded w-3/4"}),J.jsx("div",{className:"h-3 bg-gray-200 rounded w-1/2"})]})]})},t))}):0===n.length?J.jsx("div",{className:"flex items-center justify-center h-full",children:J.jsxs("div",{className:"text-center",children:[J.jsx(om,{className:"h-10 w-10 text-gray-400 mx-auto mb-3"}),J.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-1",children:"Nenhuma mensagem ainda"}),J.jsx("p",{className:"text-xs text-gray-500",children:"As mensagens aparecerão aqui quando disponíveis"})]})}):n.sort((e,t)=>new Date(e.completedAt||e.startedAt).getTime()-new Date(t.completedAt||t.startedAt).getTime()).map((e,t)=>{return J.jsx("div",{className:"bg-white border border-gray-200 rounded-lg hover:shadow-sm transition-all",children:J.jsxs("div",{className:"p-3 space-y-2",children:[J.jsxs("div",{className:"flex items-center justify-between",children:[J.jsxs("div",{className:"flex items-center space-x-2",children:[s(e.status),J.jsx("span",{className:"text-xs text-gray-500",children:(r=e.startedAt,new Date(r).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}))})]}),J.jsxs("div",{className:"flex items-center space-x-2 text-xs text-gray-500",children:[J.jsxs("div",{className:"flex items-center space-x-1",children:[J.jsx(Xf,{className:"h-3 w-3"}),J.jsx("span",{children:(n=e.totalDurationMs,n<1e3?`${n}ms`:n<6e4?`${(n/1e3).toFixed(1)}s`:`${(n/6e4).toFixed(1)}m`)})]}),e.totalTokens&&e.totalTokens>0&&J.jsxs("div",{className:"flex items-center space-x-1",children:[J.jsx(mm,{className:"h-3 w-3"}),J.jsx("span",{children:e.totalTokens})]})]})]}),J.jsxs("div",{className:"flex items-start space-x-2",children:[J.jsx(hm,{className:"h-4 w-4 text-gray-500 mt-0.5 flex-shrink-0"}),J.jsx("div",{className:"flex-1 bg-gray-50 rounded-lg p-2",children:J.jsx("p",{className:"text-xs text-gray-700",children:e.inputMessage||"(no message)"})})]}),"error"===e.status?J.jsxs("div",{className:"flex items-start space-x-2",children:[J.jsx(Gf,{className:"h-4 w-4 text-red-500 mt-0.5 flex-shrink-0"}),J.jsxs("div",{className:"flex-1 bg-red-50 border border-red-200 rounded-lg p-2",children:[J.jsx("p",{className:"text-xs text-red-700 font-medium",children:"Error"}),J.jsx("p",{className:"text-xs text-red-600 mt-1",children:e.error||e.outputMessage||"Unknown error"})]})]}):J.jsxs("div",{className:"flex items-start space-x-2",children:[J.jsx(Wf,{className:"h-4 w-4 text-blue-500 mt-0.5 flex-shrink-0"}),J.jsx("div",{className:"flex-1 bg-blue-50 rounded-lg p-2",children:J.jsx("p",{className:"text-xs text-gray-700",children:e.outputMessage||"(processing...)"})})]}),J.jsx("div",{className:"flex justify-end",children:J.jsxs("button",{onClick:()=>o(e),className:"flex items-center space-x-1 px-2 py-1 text-xs text-blue-600 hover:text-blue-800 hover:bg-blue-50 rounded transition-colors",children:[J.jsx(tm,{className:"h-3 w-3"}),J.jsx("span",{children:"View traces"})]})})]})},e.executionId);var n,r})})]})},mT={agent_execution:"bg-blue-500",llm_call:"bg-purple-500",tool_call:"bg-green-500",rag_search:"bg-orange-500",memory_operation:"bg-indigo-500",workflow_execution:"bg-pink-500",connector_call:"bg-teal-500"},gT=({traces:e,onTraceSelect:t,selectedTraceId:n})=>{const[r,i]=B.useState(new Set);B.useEffect(()=>{const t=e=>{const n=[];for(const r of e)r.children&&r.children.length>0&&(n.push(r.traceId),n.push(...t(r.children)));return n},n=t(e);n.length>0&&i(new Set(n))},[e]);const o=e=>{if("custom_event"===e.operation&&e.metadata&&"object"==typeof e.metadata){const t=e.metadata.operation;if(t)return t}return e.operation},a=(e,s=0)=>{const l=r.has(e.traceId),c=e.children&&e.children.length>0,u=(e=>"tool_call"!==e.type?null:e.metadata&&"object"==typeof e.metadata&&e.metadata.toolName||null)(e),d=n===e.traceId;return J.jsxs("div",{className:s>0?"ml-6 relative":"",children:[s>0&&J.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-px bg-gray-200",style:{left:"-12px"}}),s>0&&J.jsx("div",{className:"absolute top-4 h-px bg-gray-200",style:{left:"-12px",width:"12px"}}),J.jsx("div",{className:"border rounded-lg cursor-pointer transition-all mb-2 "+(d?"border-blue-400 bg-blue-50":"error"===e.status?"border-red-300 bg-red-50 hover:border-red-400":"border-gray-200 bg-white hover:border-gray-300"),onClick:()=>null==t?void 0:t(e),children:J.jsx("div",{className:"px-2 py-2",children:J.jsxs("div",{className:"flex items-center gap-1.5",children:[c?J.jsx("button",{onClick:t=>{var n;t.stopPropagation(),n=e.traceId,i(e=>{const t=new Set(e);return t.has(n)?t.delete(n):t.add(n),t})},className:"hover:bg-gray-100 rounded transition-colors flex-shrink-0",children:l?J.jsx(Hf,{className:"h-3 w-3 text-gray-400"}):J.jsx(Kf,{className:"h-3 w-3 text-gray-400"})}):J.jsx("div",{className:"w-3 flex-shrink-0"}),J.jsx("div",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${mT[e.type]||"bg-gray-400"}`}),J.jsxs("div",{className:"flex-1 min-w-0",children:[J.jsx("span",{className:"font-medium text-gray-900 text-xs",children:o(e)}),u&&J.jsx("span",{className:"text-[10px] text-gray-400 font-mono ml-2",children:u})]}),J.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:["llm_call"===e.type&&e.metadata&&e.metadata.totalTokens&&J.jsxs("span",{className:"text-[10px] text-gray-400 tabular-nums",children:[e.metadata.totalTokens.toLocaleString()," tokens"]}),"error"===e.status&&J.jsx("span",{className:"text-[10px] font-medium text-red-600",children:"erro"}),e.durationMs>0&&J.jsx("span",{className:"text-[10px] text-gray-500 tabular-nums",children:(p=e.durationMs,p<1e3?`${p}ms`:p<6e4?`${(p/1e3).toFixed(1)}s`:`${(p/6e4).toFixed(1)}m`)})]})]})})}),c&&l&&J.jsx("div",{className:"relative",children:e.children.map(e=>a(e,s+1))})]},e.traceId);var p};return 0===e.length?J.jsxs("div",{className:"text-center py-8 bg-white border border-gray-200 rounded-lg",children:[J.jsx($f,{className:"h-6 w-6 text-gray-400 mx-auto mb-2"}),J.jsx("p",{className:"text-gray-500 text-sm",children:"Nenhum trace encontrado."})]}):J.jsx("div",{className:"space-y-2",children:e.map(e=>a(e))})};function vT(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 yT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bT(Object(n),!0).forEach(function(t){yT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_T(Object(n),!0).forEach(function(t){xT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_T(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ST(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(n,[].concat(i,r))}}}function CT(e){return{}.toString.call(e).includes("Object")}function ET(e){return"function"==typeof e}var IT=ST(function(e,t){throw new Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),NT={changes:function(e,t){return CT(t)||IT("changeType"),Object.keys(t).some(function(t){return n=e,r=t,!Object.prototype.hasOwnProperty.call(n,r);var n,r})&&IT("changeField"),t},selector:function(e){ET(e)||IT("selectorType")},handler:function(e){ET(e)||CT(e)||IT("handlerType"),CT(e)&&Object.values(e).some(function(e){return!ET(e)})&&IT("handlersType")},initial:function(e){var t;e||IT("initialIsRequired"),CT(e)||IT("initialType"),t=e,Object.keys(t).length||IT("initialContent")}};function OT(e,t){return ET(t)?t(e.current):t}function TT(e,t){return e.current=kT(kT({},e.current),t),t}function RT(e,t,n){return ET(t)?t(e.current):Object.keys(n).forEach(function(n){var r;return null===(r=t[n])||void 0===r?void 0:r.call(t,e.current[n])}),n}var jT={create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};NT.initial(e),NT.handler(t);var n={current:e},r=ST(RT)(n,t),i=ST(TT)(n),o=ST(NT.changes)(e),a=ST(OT)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return NT.selector(e),e(n.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(r,i,o,a)(e)}]}};var MT,AT=(MT=function(e,t){throw new Error(e[t]||e.default)},function e(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.length>=MT.length?MT.apply(this,r):function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return e.apply(t,[].concat(r,i))}})({configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "}),PT={config:function(e){return e||AT("configIsRequired"),function(e){return{}.toString.call(e).includes("Object")}(e)||AT("configType"),e.urls?{paths:{vs:e.urls.monacoBase}}:e}};function LT(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],LT(e[n],t[n]))}),wT(wT({},e),t)}var DT={type:"cancelation",msg:"operation is manually canceled"};function FT(e){var t=!1,n=new Promise(function(n,r){e.then(function(e){return t?r(DT):n(e)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var zT=["monaco"],UT=function(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=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vT(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vT(e,t):void 0}}(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.")}()}(jT.create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),2),BT=UT[0],$T=UT[1];function VT(e){return document.body.appendChild(e)}function WT(e){var t,n,r=BT(function(e){return{config:e.config,reject:e.reject}}),i=(t="".concat(r.config.paths.vs,"/loader.js"),n=document.createElement("script"),t&&(n.src=t),n);return i.onload=function(){return e()},i.onerror=r.reject,i}function qT(){var e=BT(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var n=t.m||t;HT(n),e.resolve(n)},function(t){e.reject(t)})}function HT(e){BT().monaco||$T({monaco:e})}var KT=new Promise(function(e,t){return $T({resolve:e,reject:t})}),GT={config:function(e){var t=PT.config(e),n=t.monaco,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,zT);$T(function(e){return{config:LT(e.config,r),monaco:n}})},init:function(){var e=BT(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if($T({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),FT(KT);if(window.monaco&&window.monaco.editor)return HT(window.monaco),e.resolve(window.monaco),FT(KT);!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(VT,WT)(qT)}return FT(KT)},__getMonacoInstance:function(){return BT(function(e){return e.monaco})}},ZT={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},JT={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}};var YT=function({children:e}){return $.createElement("div",{style:JT.container},e)},XT=YT;var QT=function({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:o,wrapperProps:a}){return $.createElement("section",{style:{...ZT.wrapper,width:e,height:t},...a},!n&&$.createElement(XT,null,r),$.createElement("div",{ref:i,style:{...ZT.fullWidth,...!n&&ZT.hide},className:o}))},eR=B.memo(QT);var tR=function(e){B.useEffect(e,[])};var nR=function(e,t,n=!0){let r=B.useRef(!0);B.useEffect(r.current||!n?()=>{r.current=!1}:e,t)};function rR(){}function iR(e,t,n,r){return function(e,t){return e.editor.getModel(oR(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r?oR(e,r):void 0)}(e,t,n,r)}function oR(e,t){return e.Uri.parse(t)}var aR=function({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:u="Loading...",options:d={},height:p="100%",width:h="100%",className:f,wrapperProps:m={},beforeMount:g=rR,onMount:v=rR}){let[y,b]=B.useState(!1),[w,x]=B.useState(!0),_=B.useRef(null),k=B.useRef(null),S=B.useRef(null),C=B.useRef(v),E=B.useRef(g),I=B.useRef(!1);tR(()=>{let e=GT.init();return e.then(e=>(k.current=e)&&x(!1)).catch(e=>"cancelation"!==(null==e?void 0:e.type)&&void 0),()=>_.current?function(){var e,t,n,r;let i=null==(e=_.current)?void 0:e.getModel();s||null==(t=null==i?void 0:i.original)||t.dispose(),l||null==(n=null==i?void 0:i.modified)||n.dispose(),null==(r=_.current)||r.dispose()}():e.cancel()}),nR(()=>{if(_.current&&k.current){let t=_.current.getOriginalEditor(),i=iR(k.current,e||"",r||n||"text",o||"");i!==t.getModel()&&t.setModel(i)}},[o],y),nR(()=>{if(_.current&&k.current){let e=_.current.getModifiedEditor(),r=iR(k.current,t||"",i||n||"text",a||"");r!==e.getModel()&&e.setModel(r)}},[a],y),nR(()=>{let e=_.current.getModifiedEditor();e.getOption(k.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],y),nR(()=>{var t,n;null==(n=null==(t=_.current)?void 0:t.getModel())||n.original.setValue(e||"")},[e],y),nR(()=>{let{original:e,modified:t}=_.current.getModel();k.current.editor.setModelLanguage(e,r||n||"text"),k.current.editor.setModelLanguage(t,i||n||"text")},[n,r,i],y),nR(()=>{var e;null==(e=k.current)||e.editor.setTheme(c)},[c],y),nR(()=>{var e;null==(e=_.current)||e.updateOptions(d)},[d],y);let N=B.useCallback(()=>{var s;if(!k.current)return;E.current(k.current);let l=iR(k.current,e||"",r||n||"text",o||""),c=iR(k.current,t||"",i||n||"text",a||"");null==(s=_.current)||s.setModel({original:l,modified:c})},[n,t,i,e,r,o,a]),O=B.useCallback(()=>{var e;!I.current&&S.current&&(_.current=k.current.editor.createDiffEditor(S.current,{automaticLayout:!0,...d}),N(),null==(e=k.current)||e.editor.setTheme(c),b(!0),I.current=!0)},[d,c,N]);return B.useEffect(()=>{y&&C.current(_.current,k.current)},[y]),B.useEffect(()=>{!w&&!y&&O()},[w,y,O]),$.createElement(eR,{width:h,height:p,isEditorReady:y,loading:u,_ref:S,className:f,wrapperProps:m})};B.memo(aR);var sR=function(e){let t=B.useRef();return B.useEffect(()=>{t.current=e},[e]),t.current},lR=new Map;var cR=function({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:a="light",line:s,loading:l="Loading...",options:c={},overrideServices:u={},saveViewState:d=!0,keepCurrentModel:p=!1,width:h="100%",height:f="100%",className:m,wrapperProps:g={},beforeMount:v=rR,onMount:y=rR,onChange:b,onValidate:w=rR}){let[x,_]=B.useState(!1),[k,S]=B.useState(!0),C=B.useRef(null),E=B.useRef(null),I=B.useRef(null),N=B.useRef(y),O=B.useRef(v),T=B.useRef(),R=B.useRef(r),j=sR(o),M=B.useRef(!1),A=B.useRef(!1);tR(()=>{let e=GT.init();return e.then(e=>(C.current=e)&&S(!1)).catch(e=>"cancelation"!==(null==e?void 0:e.type)&&void 0),()=>{return E.current?(null==(t=T.current)||t.dispose(),p?d&&lR.set(o,E.current.saveViewState()):null==(n=E.current.getModel())||n.dispose(),void E.current.dispose()):e.cancel();var t,n}}),nR(()=>{var a,s,l,c;let u=iR(C.current,e||r||"",t||i||"",o||n||"");u!==(null==(a=E.current)?void 0:a.getModel())&&(d&&lR.set(j,null==(s=E.current)?void 0:s.saveViewState()),null==(l=E.current)||l.setModel(u),d&&(null==(c=E.current)||c.restoreViewState(lR.get(o))))},[o],x),nR(()=>{var e;null==(e=E.current)||e.updateOptions(c)},[c],x),nR(()=>{!E.current||void 0===r||(E.current.getOption(C.current.editor.EditorOption.readOnly)?E.current.setValue(r):r!==E.current.getValue()&&(A.current=!0,E.current.executeEdits("",[{range:E.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),E.current.pushUndoStop(),A.current=!1))},[r],x),nR(()=>{var e,t;let n=null==(e=E.current)?void 0:e.getModel();n&&i&&(null==(t=C.current)||t.editor.setModelLanguage(n,i))},[i],x),nR(()=>{var e;void 0!==s&&(null==(e=E.current)||e.revealLine(s))},[s],x),nR(()=>{var e;null==(e=C.current)||e.editor.setTheme(a)},[a],x);let P=B.useCallback(()=>{var l;if(I.current&&C.current&&!M.current){O.current(C.current);let p=o||n,h=iR(C.current,r||e||"",t||i||"",p||"");E.current=null==(l=C.current)?void 0:l.editor.create(I.current,{model:h,automaticLayout:!0,...c},u),d&&E.current.restoreViewState(lR.get(p)),C.current.editor.setTheme(a),void 0!==s&&E.current.revealLine(s),_(!0),M.current=!0}},[e,t,n,r,i,o,c,u,d,a,s]);return B.useEffect(()=>{x&&N.current(E.current,C.current)},[x]),B.useEffect(()=>{!k&&!x&&P()},[k,x,P]),R.current=r,B.useEffect(()=>{var e,t;x&&b&&(null==(e=T.current)||e.dispose(),T.current=null==(t=E.current)?void 0:t.onDidChangeModelContent(e=>{A.current||b(E.current.getValue(),e)}))},[x,b]),B.useEffect(()=>{if(x){let e=C.current.editor.onDidChangeMarkers(e=>{var t;let n=null==(t=E.current.getModel())?void 0:t.uri;if(n&&e.find(e=>e.path===n.path)){let e=C.current.editor.getModelMarkers({resource:n});null==w||w(e)}});return()=>{null==e||e.dispose()}}return()=>{}},[x,w]),$.createElement(eR,{width:h,height:f,isEditorReady:x,loading:l,_ref:I,className:m,wrapperProps:g})},uR=B.memo(cR);const dR=({data:e,title:t,maxHeight:n="300px",showLineNumbers:r=!1,isExpanded:i=!1,onToggleExpand:o})=>{const a=JSON.stringify(e,null,2);return o?J.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden transition-all flex flex-col",children:[J.jsxs("button",{onClick:o,className:"w-full px-3 py-1.5 bg-gray-50 border-b border-gray-200 flex items-center justify-between hover:bg-gray-100 transition-colors flex-shrink-0",children:[J.jsx("h4",{className:"text-xs font-medium text-gray-700",children:t}),i?J.jsx(am,{className:"h-3.5 w-3.5 text-gray-500"}):J.jsx(im,{className:"h-3.5 w-3.5 text-gray-500"})]}),J.jsx("div",{style:{height:i?"calc(100vh - 200px)":n},children:J.jsx(uR,{height:"100%",language:"json",theme:"vs-dark",value:a,options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:11,lineNumbers:r?"on":"off",wordWrap:"on",automaticLayout:!0,selectOnLineNumbers:!0,roundedSelection:!1,cursorStyle:"line",scrollbar:{vertical:"auto",horizontal:"auto"}}})})]}):J.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden flex flex-col",children:[t&&J.jsx("div",{className:"px-4 py-2 bg-gray-50 border-b border-gray-200 flex-shrink-0",children:J.jsx("h4",{className:"text-sm font-medium text-gray-700",children:t})}),J.jsx("div",{style:{height:n},className:"overflow-hidden",children:J.jsx(uR,{height:"100%",language:"json",theme:"vs-dark",value:a,options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:11,lineNumbers:r?"on":"off",wordWrap:"on",automaticLayout:!0,selectOnLineNumbers:!0,roundedSelection:!1,cursorStyle:"line",scrollbar:{vertical:"auto",horizontal:"auto"}}})})]})},pR=({trace:e,onClose:t,isMaximized:n=!1,onToggleMaximize:r,onTraceSelect:i})=>{const[o,a]=B.useState(null),[s,l]=B.useState(!1),c=e=>e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${(e/6e4).toFixed(1)}m`;return J.jsxs("div",{className:"h-full bg-white border-l border-gray-200 flex flex-col overflow-hidden",children:[J.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-gray-200 bg-gray-50 flex-shrink-0",children:[J.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-1.5",children:[J.jsx("h3",{className:"text-xs font-semibold text-gray-900 truncate",children:e.operation}),J.jsx("span",{className:"px-1 py-0.5 bg-blue-100 text-blue-800 rounded text-[10px] flex-shrink-0",children:(d=e.type,{agent_execution:"Agent Execution",llm_call:"LLM Call",tool_call:"Tool Call",memory_operation:"Memory Operation",rag_search:"RAG Search",workflow_execution:"Workflow Execution",connector_call:"Connector Call"}[d]||d)}),J.jsx("span",{className:"px-1 py-0.5 rounded text-[10px] flex-shrink-0 "+("success"===e.status?"bg-green-100 text-green-800":"error"===e.status?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"),children:e.status}),J.jsxs("span",{className:"text-[10px] text-gray-500 flex-shrink-0",children:[c(e.durationMs)," • ",(u=e.startedAt,new Date(u).toLocaleString("pt-BR"))]}),J.jsx("button",{onClick:()=>{navigator.clipboard.writeText(e.traceId),l(!0),setTimeout(()=>l(!1),2e3)},className:"text-[10px] font-mono flex-shrink-0 px-1 py-0.5 rounded transition-colors "+(s?"text-green-600 bg-green-50":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"),title:`Copiar ID: ${e.traceId}`,children:s?"✓ Copiado!":`ID: ${e.traceId.slice(-8)}`})]}),J.jsxs("div",{className:"flex items-center space-x-0.5 ml-2 flex-shrink-0",children:[J.jsx("button",{onClick:()=>{const t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=`trace-${e.traceId}-${(new Date).toISOString().split("T")[0]}.json`,i.click()},className:"p-1 text-gray-500 hover:text-gray-700 hover:bg-gray-200 rounded",title:"Exportar",children:J.jsx(em,{className:"h-3.5 w-3.5"})}),r&&J.jsx("button",{onClick:r,className:"p-1 text-gray-500 hover:text-gray-700 hover:bg-gray-200 rounded",title:n?"Restaurar":"Maximizar",children:n?J.jsx(am,{className:"h-3.5 w-3.5"}):J.jsx(im,{className:"h-3.5 w-3.5"})}),J.jsx("button",{onClick:t,className:"p-1 text-gray-500 hover:text-gray-700 hover:bg-gray-200 rounded",title:"Fechar",children:J.jsx(fm,{className:"h-3.5 w-3.5"})})]})]}),J.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100",children:["llm_call"===e.type&&e.metadata&&e.metadata.totalTokens&&!o&&J.jsxs("div",{className:"flex items-center gap-2 flex-wrap text-[10px]",children:[e.metadata.model&&J.jsx("span",{className:"bg-gray-100 text-gray-600 px-2 py-1 rounded",children:e.metadata.model}),J.jsxs("span",{className:"bg-gray-100 text-gray-600 px-2 py-1 rounded",children:[J.jsx("span",{className:"text-gray-400",children:"input:"})," ",(e.metadata.promptTokens||0).toLocaleString()]}),J.jsxs("span",{className:"bg-gray-100 text-gray-600 px-2 py-1 rounded",children:[J.jsx("span",{className:"text-gray-400",children:"output:"})," ",(e.metadata.completionTokens||0).toLocaleString()]}),J.jsxs("span",{className:"bg-gray-800 text-white px-2 py-1 rounded font-medium",children:[(e.metadata.totalTokens||0).toLocaleString()," tokens"]})]}),(()=>{const t=e.input&&Object.keys(e.input).length>0,n=e.output&&Object.keys(e.output).length>0,r=e.metadata&&Object.keys(e.metadata).length>0,i=[t,n,r].filter(Boolean).length,s=1===i?"400px":2===i?"280px":"200px";return J.jsxs("div",{className:"flex flex-col space-y-2 min-w-0",children:[t&&(!o||"input"===o)&&J.jsx(dR,{data:e.input,title:"Input",showLineNumbers:!0,maxHeight:s,isExpanded:"input"===o,onToggleExpand:()=>a("input"===o?null:"input")}),n&&(!o||"output"===o)&&J.jsx(dR,{data:e.output,title:"Output",showLineNumbers:!0,maxHeight:s,isExpanded:"output"===o,onToggleExpand:()=>a("output"===o?null:"output")}),r&&(!o||"metadata"===o)&&J.jsx(dR,{data:e.metadata,title:"Metadata",showLineNumbers:!0,maxHeight:s,isExpanded:"metadata"===o,onToggleExpand:()=>a("metadata"===o?null:"metadata")})]})})(),!o&&e.children&&e.children.length>0&&J.jsxs("div",{className:"bg-gray-50 rounded-lg p-3",children:[J.jsxs("h4",{className:"text-xs font-medium text-gray-900 mb-2",children:["Traces Filhos (",e.children.length,")"]}),J.jsx("div",{className:"space-y-1",children:e.children.map(e=>J.jsxs("button",{onClick:()=>null==i?void 0:i(e),className:"w-full flex items-center justify-between text-xs p-1.5 rounded hover:bg-gray-100 transition-colors text-left",children:[J.jsx("span",{className:"text-gray-700 truncate",children:e.operation}),J.jsx("span",{className:"flex-shrink-0 ml-2 "+("success"===e.status?"text-green-600":"error"===e.status?"text-red-600":"text-gray-500"),children:c(e.durationMs)})]},e.traceId))})]})]})]});var u,d},hR=({execution:e,agentId:t,isOpen:n,onClose:r,mode:i="portal",customApiUrl:o})=>{const[a,s]=B.useState([]),[l,c]=B.useState(null),[u,d]=B.useState(!1),[p,h]=B.useState(null),[f,m]=B.useState(!1),[g,v]=B.useState(!1),[y,b]=B.useState(!1),w=hT();if(!n||!e)return null;B.useEffect(()=>{n&&(null==e?void 0:e.executionId)&&x()},[n,null==e?void 0:e.executionId]),B.useEffect(()=>{const e=e=>{"Escape"===e.key&&r()};if(n)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n,r]);const x=async()=>{if(e&&t){d(!0),h(null);try{let n;if("local"===i||o){const r=`${o||"http://localhost:3030"}/api/v1/observability/executions/${e.executionId}?agentId=${t}`,i=await fetch(r,{headers:{"Content-Type":"application/json"}});if(!i.ok)throw new Error(`Failed to fetch traces: ${i.statusText}`);n=await i.json()}else{const r=`/observability/executions/${e.executionId}?agentId=${t}`;n=await w.get(r)}const r=n.traces||[];s(r),r.length>0&&c(r[0])}catch(xR){h(xR.message||"Erro ao carregar traces"),s([])}finally{d(!1)}}},_=e=>{c(e)};return J.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex justify-end",onClick:e=>{e.target===e.currentTarget&&r()},children:J.jsxs("div",{className:"bg-white shadow-2xl w-[85%] h-full flex flex-col animate-slide-in-right overflow-hidden",children:[J.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200 bg-gray-50",children:[J.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[J.jsx("h2",{className:"text-sm font-semibold text-gray-900 whitespace-nowrap",children:"Execução"}),J.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-600 flex-wrap",children:[J.jsxs("div",{className:"flex items-center gap-1",children:[(e=>{switch(e){case"success":return J.jsx(Yf,{className:"h-4 w-4 text-green-600"});case"error":return J.jsx(Gf,{className:"h-4 w-4 text-red-600"});default:return J.jsx(Xf,{className:"h-4 w-4 text-yellow-600"})}})(e.status),J.jsx("span",{className:"capitalize",children:e.status})]}),J.jsx("span",{className:"text-gray-300",children:"•"}),J.jsx("span",{children:(S=e.totalDurationMs>0?e.totalDurationMs:a.reduce((e,t)=>e+(t.durationMs||0),0),S<1e3?`${S}ms`:S<6e4?`${(S/1e3).toFixed(1)}s`:`${(S/6e4).toFixed(1)}m`)}),J.jsx("span",{className:"text-gray-300",children:"•"}),J.jsx("span",{children:(k=e.startedAt,new Date(k).toLocaleString("pt-BR"))}),J.jsx("span",{className:"text-gray-300",children:"•"}),J.jsxs("span",{children:[a.length," traces"]}),J.jsx("button",{onClick:()=>{navigator.clipboard.writeText(e.executionId),b(!0),setTimeout(()=>b(!1),2e3)},className:"font-mono px-1.5 py-0.5 rounded transition-colors "+(y?"text-green-600 bg-green-50":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"),title:`Copiar ID: ${e.executionId}`,children:y?"✓ Copiado!":`ID: ${e.executionId.slice(-8)}`})]})]}),J.jsxs("div",{className:"flex items-center space-x-1 flex-shrink-0",children:[J.jsx("button",{onClick:()=>{const t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=`execution-${e.executionId}-${(new Date).toISOString().split("T")[0]}.json`,i.click()},className:"p-1.5 text-gray-500 hover:text-gray-700 hover:bg-gray-200 rounded",title:"Exportar execução",children:J.jsx(em,{className:"h-4 w-4"})}),J.jsx("button",{onClick:r,className:"p-1.5 text-gray-500 hover:text-gray-700 hover:bg-gray-200 rounded",title:"Fechar",children:J.jsx(fm,{className:"h-4 w-4"})})]})]}),J.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col p-4",children:[!f&&J.jsxs("div",{className:"mb-4 flex-shrink-0 border border-gray-200 rounded-lg bg-white overflow-hidden",children:[J.jsxs("button",{onClick:()=>v(!g),className:"w-full flex items-center justify-between px-3 py-2 bg-gray-50 hover:bg-gray-100 transition-colors",children:[J.jsx("h4",{className:"text-xs font-semibold text-gray-700",children:"Input & Output"}),g?J.jsx(am,{className:"h-3.5 w-3.5 text-gray-500"}):J.jsx(im,{className:"h-3.5 w-3.5 text-gray-500"})]}),g&&J.jsxs("div",{className:"p-3 space-y-3 border-t border-gray-100",children:[e.inputMessage&&""!==e.inputMessage.trim()&&J.jsxs("div",{className:"flex items-start space-x-2",children:[J.jsx("div",{className:"w-6 h-6 bg-blue-100 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",children:J.jsx(hm,{className:"h-3 w-3 text-blue-600"})}),J.jsxs("div",{className:"flex-1 bg-blue-50 border border-blue-100 rounded-lg p-2",children:[J.jsx("p",{className:"text-[10px] font-semibold text-blue-900 mb-1 uppercase tracking-wide",children:"Input"}),J.jsx("p",{className:"text-xs text-gray-800 leading-relaxed",children:e.inputMessage})]})]}),e.outputMessage&&J.jsxs("div",{className:"flex items-start space-x-2",children:[J.jsx("div",{className:"w-6 h-6 bg-gray-800 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",children:J.jsx(Wf,{className:"h-3 w-3 text-white"})}),J.jsxs("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-2",children:[J.jsx("p",{className:"text-[10px] font-semibold text-gray-700 mb-1 uppercase tracking-wide",children:"Output"}),J.jsx("p",{className:"text-xs text-gray-800 leading-relaxed",children:e.outputMessage})]})]})]})]}),J.jsx("div",{className:"flex-1 overflow-hidden",children:u?J.jsx("div",{className:"flex items-center justify-center h-full",children:J.jsx("div",{className:"text-gray-500 text-sm",children:"Carregando traces..."})}):p?J.jsx("div",{className:"flex items-center justify-center h-full",children:J.jsxs("div",{className:"text-red-500 text-center",children:[J.jsx(Gf,{className:"h-6 w-6 mx-auto mb-2"}),J.jsx("p",{className:"font-medium text-sm",children:"Erro ao carregar traces"}),J.jsx("p",{className:"text-xs mt-1",children:p}),J.jsx("button",{onClick:x,className:"mt-3 px-3 py-1.5 text-xs bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Tentar novamente"})]})}):a.length>0?J.jsxs("div",{className:"flex h-full gap-3",children:[!f&&J.jsx("div",{className:"w-1/3 min-w-[280px] max-w-[400px] flex-shrink-0 overflow-y-auto pr-2 scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100",children:J.jsx(gT,{traces:a,onTraceSelect:_,selectedTraceId:null==l?void 0:l.traceId})}),l&&J.jsx("div",{className:(f?"w-full":"flex-1")+" border-l border-gray-200",children:J.jsx(pR,{trace:l,onClose:()=>{c(null),m(!1)},isMaximized:f,onToggleMaximize:()=>m(!f),onTraceSelect:_})})]}):J.jsx("div",{className:"flex items-center justify-center h-full",children:J.jsxs("div",{className:"text-gray-500 text-center",children:[J.jsx(Xf,{className:"h-6 w-6 mx-auto mb-2"}),J.jsx("p",{className:"font-medium text-sm",children:"Nenhum trace encontrado"}),J.jsx("p",{className:"text-xs mt-1",children:"Esta execução não possui traces disponíveis"})]})})})]})]})});var k,S},fR=({traces:e,loading:t,onRefresh:n,selectedThreadId:r,onThreadSelect:i,agentId:o,mode:a="portal",customApiUrl:s})=>{const[l,c]=B.useState("threads"),[u,d]=B.useState(null),[p,h]=B.useState(null),[f,m]=B.useState(!1),{executions:g,loading:v,refetch:y}=(({threadId:e,agentId:t,mode:n="portal",enabled:r=!0,customApiUrl:i})=>{const[o,a]=B.useState([]),[s,l]=B.useState(!1),[c,u]=B.useState(null),[d,p]=B.useState(0),h=hT(),f=B.useCallback(async()=>{var o,s;if(!r||!e||!t)return a([]),void p(0);try{let r;if(l(!0),u(null),"local"===n||i){const n=`${i||"http://localhost:3030"}/api/v1/observability/threads/${e}/executions?agentId=${t}`,o=await fetch(n,{headers:{"Content-Type":"application/json"}});if(!o.ok)throw new Error(`Failed to fetch executions: ${o.statusText}`);r=await o.json()}else r=await h.get(`/observability/threads/${e}/executions?agentId=${t}`);const c=r.executions||(null==(o=r.data)?void 0:o.executions)||r.data||[];a(Array.isArray(c)?c:[]),p(r.total||(null==(s=r.data)?void 0:s.total)||c.length)}catch(xR){const t=xR instanceof Error?xR.message:"Failed to fetch executions";u(t)}finally{l(!1)}},[e,t,r,n,i]);return B.useEffect(()=>{r&&e&&t&&f()},[e,t,r]),{executions:o,loading:s,error:c,refetch:f,total:d}})({threadId:null==u?void 0:u.threadId,agentId:o,mode:a,enabled:"executions"===l&&!!u,customApiUrl:s}),b=e=>{const t=new Date(e),n=new Date,r=n.getTime()-t.getTime();if(r<6e4)return"agora";if(r<36e5)return`${Math.floor(r/6e4)}m atrás`;const i=t.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"});if(t.toDateString()===n.toDateString())return`hoje às ${i}`;const o=new Date(n);o.setDate(o.getDate()-1);if(t.toDateString()===o.toDateString())return`ontem às ${i}`;if(r<6048e5){return`${t.toLocaleDateString("pt-BR",{weekday:"short"})} às ${i}`}const a=t.getFullYear()===n.getFullYear();return`${t.toLocaleDateString("pt-BR",{day:"2-digit",month:"short",...a?{}:{year:"numeric"}})} às ${i}`},w=e=>{const t={whatsapp:{label:"WhatsApp",bg:"bg-green-50",text:"text-green-700"},email:{label:"Email",bg:"bg-blue-50",text:"text-blue-700"},api:{label:"API",bg:"bg-purple-50",text:"text-purple-700"},widget:{label:"Widget",bg:"bg-indigo-50",text:"text-indigo-700"},sdk:{label:"SDK",bg:"bg-gray-50",text:"text-gray-700"}}[e]||{label:e,bg:"bg-gray-50",text:"text-gray-700"};return J.jsx("span",{className:`inline-flex px-2 py-0.5 rounded text-xs font-medium ${t.bg} ${t.text}`,children:t.label})},x=()=>{c("threads"),d(null)},_=e=>{h(e),m(!0)},k=()=>{m(!1),h(null)};e.reduce((e,t)=>e+t.totalDurationMs,0);const S=e.reduce((e,t)=>e+t.totalTokens,0),C=e.filter(e=>"success"===e.status).length,E=e.filter(e=>"error"===e.status).length;return"executions"===l&&u?J.jsxs(J.Fragment,{children:[J.jsx(fT,{threadId:u.threadId,entityValue:u.entityValue||u.threadId,executions:g,loading:v,onBack:x,onExecutionClick:_,onRefresh:y}),p&&o&&J.jsx(hR,{execution:p,agentId:o,isOpen:f,onClose:k,mode:a,customApiUrl:s})]}):J.jsxs("div",{className:"flex flex-col h-full bg-white",children:[J.jsx("div",{className:"px-4 py-3 border-b border-gray-200 flex-shrink-0",children:J.jsxs("div",{className:"flex items-center justify-between",children:[J.jsxs("div",{className:"flex items-center space-x-3",children:[J.jsx($f,{className:"h-5 w-5 text-blue-600"}),J.jsxs("div",{children:[J.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Real-time Monitoring"}),J.jsxs("p",{className:"text-xs text-gray-500",children:[e.length," thread",1!==e.length?"s":""," found",r&&J.jsxs("span",{className:"ml-2",children:["• ",J.jsxs("span",{className:"font-mono text-blue-600",children:[r.slice(0,20),"..."]})," selected"]})]})]})]}),J.jsx("div",{className:"flex items-center space-x-2",children:n&&J.jsx("button",{onClick:n,className:"p-1.5 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded transition-colors",title:"Refresh",children:J.jsx(lm,{className:"h-3.5 w-3.5 "+(t?"animate-spin":"")})})})]})}),e.length>0&&J.jsx("div",{className:"px-4 py-2 bg-gray-50 border-b border-gray-200 flex-shrink-0",children:J.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[J.jsxs("div",{className:"text-center",children:[J.jsx("div",{className:"text-xs text-gray-500",children:"Traces"}),J.jsx("div",{className:"text-sm font-semibold text-gray-900",children:e.length})]}),J.jsxs("div",{className:"text-center",children:[J.jsx("div",{className:"text-xs text-gray-500",children:"Success"}),J.jsx("div",{className:"text-sm font-semibold text-green-600",children:C})]}),J.jsxs("div",{className:"text-center",children:[J.jsx("div",{className:"text-xs text-gray-500",children:"Errors"}),J.jsx("div",{className:"text-sm font-semibold text-red-600",children:E})]}),J.jsxs("div",{className:"text-center",children:[J.jsx("div",{className:"text-xs text-gray-500",children:"Tokens"}),J.jsx("div",{className:"text-sm font-semibold text-gray-900",children:S.toLocaleString()})]})]})}),J.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:t&&0===e.length?J.jsx("div",{className:"p-4 space-y-3",children:[...Array(3)].map((e,t)=>J.jsx("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-3 animate-pulse",children:J.jsxs("div",{className:"flex items-start space-x-3",children:[J.jsx("div",{className:"w-6 h-6 bg-gray-200 rounded"}),J.jsxs("div",{className:"flex-1 space-y-2",children:[J.jsx("div",{className:"h-3 bg-gray-200 rounded w-1/3"}),J.jsx("div",{className:"h-3 bg-gray-200 rounded w-1/2"})]})]})},t))}):0===e.length?J.jsx("div",{className:"flex items-center justify-center h-full p-8",children:J.jsxs("div",{className:"text-center",children:[J.jsx(om,{className:"h-10 w-10 text-gray-400 mx-auto mb-3"}),J.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-1",children:"Nenhuma thread ainda"}),J.jsx("p",{className:"text-xs text-gray-500",children:"Envie mensagens para ver as threads aparecerem aqui"})]})}):J.jsx("div",{className:"p-4 space-y-2",children:e.sort((e,t)=>{const n=new Date(e.completedAt||e.startedAt).getTime();return new Date(t.completedAt||t.startedAt).getTime()-n}).map(e=>{return J.jsx("div",{onClick:()=>{return d(t=e),c("executions"),void(null==i||i(t));var t},className:"bg-white border rounded-lg hover:shadow-sm transition-all cursor-pointer "+(r===e.threadId?"border-blue-400 bg-blue-50 shadow-sm":"border-gray-200 hover:border-gray-300"),children:J.jsxs("div",{className:"p-3",children:[J.jsxs("div",{className:"flex items-start gap-3",children:[J.jsx("div",{className:"flex-shrink-0 mt-1 w-2 h-2 rounded-full "+("success"===e.status?"bg-green-500":"error"===e.status?"bg-red-500":"bg-yellow-500")}),J.jsxs("div",{className:"flex-1 min-w-0",children:[J.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-1",children:[r===e.threadId&&J.jsxs("div",{className:"flex items-center space-x-1 bg-blue-600 text-white px-2 py-0.5 rounded text-xs font-medium",children:[J.jsx(Yf,{className:"h-3 w-3"}),J.jsx("span",{children:"Selecionado"})]}),e.channel&&w(e.channel),J.jsx("span",{className:"text-xs text-gray-400",children:b(e.completedAt||e.startedAt)})]}),J.jsx("p",{className:"text-xs text-gray-700 truncate mb-1",children:e.outputMessage||e.inputMessage||"Sem mensagem"}),e.entityValue&&J.jsx("div",{className:"flex items-center space-x-1 mb-1",children:J.jsx("span",{className:"text-xs font-semibold text-gray-900",children:e.entityValue})}),J.jsxs("div",{className:"flex items-center space-x-3 text-xs text-gray-500",children:[J.jsxs("div",{className:"flex items-center space-x-1",children:[J.jsx(Xf,{className:"h-3 w-3"}),J.jsx("span",{children:(t=e.totalDurationMs,t<1e3?`${t}ms`:t<6e4?`${(t/1e3).toFixed(1)}s`:`${(t/6e4).toFixed(1)}m`)})]}),J.jsxs("div",{className:"flex items-center space-x-1",children:[J.jsx(om,{className:"h-3 w-3"}),J.jsx("span",{children:e.totalTraces||0})]}),e.totalTokens>0&&J.jsxs("div",{className:"flex items-center space-x-1",children:[J.jsx(mm,{className:"h-3 w-3"}),J.jsx("span",{children:e.totalTokens.toLocaleString()})]})]})]})]}),"error"===e.status&&e.error&&J.jsx("div",{className:"mt-2 p-2 bg-red-50 border border-red-200 rounded",children:J.jsxs("div",{className:"flex items-start space-x-2",children:[J.jsx(Gf,{className:"h-3.5 w-3.5 text-red-600 mt-0.5 flex-shrink-0"}),J.jsxs("div",{children:[J.jsx("p",{className:"text-xs font-medium text-red-800",children:"Erro"}),J.jsx("p",{className:"text-xs text-red-700 mt-0.5",children:e.error})]})]})})]})},e.id);var t})})}),t&&e.length>0&&J.jsx("div",{className:"px-4 py-2 border-t border-gray-200 flex-shrink-0",children:J.jsxs("div",{className:"flex items-center justify-center space-x-2 text-xs text-gray-500",children:[J.jsx(lm,{className:"h-3 w-3 animate-spin"}),J.jsx("span",{children:"Atualizando..."})]})})]})},mR=({isOpen:e,onClose:t,title:n,subtitle:r,icon:i,children:o,size:a="lg",showCloseButton:s=!0,footer:l})=>{if(!e)return null;return J.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:J.jsxs("div",{className:"flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[J.jsx("div",{className:"fixed inset-0 bg-[#071527]/60 backdrop-blur-sm transition-opacity",onClick:t}),J.jsxs("div",{className:`inline-block align-bottom bg-white rounded-xl text-left overflow-hidden shadow-2xl transform transition-all sm:my-8 sm:align-middle ${{sm:"sm:max-w-sm",md:"sm:max-w-md",lg:"sm:max-w-lg",xl:"sm:max-w-xl","2xl":"sm:max-w-2xl","3xl":"sm:max-w-3xl","4xl":"sm:max-w-4xl"}[a]} sm:w-full`,children:[J.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100",children:[J.jsxs("div",{className:"flex items-center gap-3",children:[i,J.jsxs("div",{children:[J.jsx("h3",{className:"text-lg font-semibold text-[#071527]",children:n}),r&&J.jsx("p",{className:"text-sm text-[#65768D]",children:r})]})]}),s&&J.jsx("button",{onClick:t,className:"p-1.5 rounded-lg text-[#65768D] hover:text-[#071527] hover:bg-gray-100 transition-colors",children:J.jsx(fm,{className:"h-5 w-5"})})]}),J.jsx("div",{className:"px-6 py-6 max-h-[60vh] overflow-y-auto",children:o}),l&&J.jsx("div",{className:"px-6 py-4 border-t border-gray-100 bg-gray-50",children:l})]})]})})},gR=({status:e,successMessage:t="Operação realizada com sucesso!",errorMessage:n="Erro ao realizar operação",className:r=""})=>"success"===e?J.jsxs("div",{className:`flex items-center p-3 bg-green-50 border border-green-200 rounded-lg ${r}`,children:[J.jsx(Yf,{className:"h-5 w-5 text-green-600 mr-3"}),J.jsx("span",{className:"text-green-800 font-medium",children:t})]}):"error"===e?J.jsxs("div",{className:`flex items-start p-3 bg-red-50 border border-red-200 rounded-lg ${r}`,children:[J.jsx(Gf,{className:"h-5 w-5 text-red-600 mr-3 mt-0.5"}),J.jsxs("div",{children:[J.jsx("div",{className:"text-red-800 font-medium",children:"Erro"}),n&&J.jsx("div",{className:"text-red-700 text-sm mt-1",children:n})]})]}):null,vR=({isOpen:e,onClose:t,agent:n,onConfirm:r})=>{const[i,o]=B.useState("both"),[a,s]=B.useState(!1),[l,c]=B.useState(!1),[u,d]=B.useState("idle"),[p,h]=B.useState(""),[f,m]=B.useState({threadId:"",entityType:"",entityValue:"",sessionId:"",dateFrom:"",dateTo:""}),g=()=>{l||(d("idle"),h(""),m({threadId:"",entityType:"",entityValue:"",sessionId:"",dateFrom:"",dateTo:""}),s(!1),t())},v=Object.values(f).some(e=>""!==e.trim());return J.jsx(mR,{isOpen:e,onClose:g,title:"Resetar Dados do Agente",size:"lg",children:J.jsxs("div",{className:"space-y-6",children:[J.jsxs("div",{className:"flex items-start space-x-3 p-4 bg-red-50 border border-red-200 rounded-lg",children:[J.jsx(pm,{className:"h-5 w-5 text-red-600 mt-0.5 flex-shrink-0"}),J.jsxs("div",{children:[J.jsx("h4",{className:"text-red-800 font-medium mb-1",children:"⚠️ Ação Irreversível"}),J.jsx("p",{className:"text-red-700 text-sm",children:"Esta operação não pode ser desfeita. Os dados removidos serão perdidos permanentemente."})]})]}),J.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:J.jsxs("div",{className:"flex items-center space-x-3",children:[J.jsx("div",{className:"w-10 h-10 bg-gray-800 text-white rounded-lg flex items-center justify-center font-semibold text-sm",children:n.name.substring(0,2).toUpperCase()}),J.jsxs("div",{children:[J.jsx("h3",{className:"font-medium text-gray-900",children:n.name}),J.jsxs("p",{className:"text-sm text-gray-500",children:["ID: ",n.id]})]})]})}),J.jsxs("div",{className:"space-y-3",children:[J.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Tipo de Dados para Resetar"}),J.jsxs("div",{className:"space-y-2",children:[J.jsxs("label",{className:"flex items-start space-x-3 p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer",children:[J.jsx("input",{type:"radio",name:"target",value:"memory",checked:"memory"===i,onChange:e=>o(e.target.value),className:"mt-1"}),J.jsxs("div",{children:[J.jsx("div",{className:"font-medium text-gray-900",children:"Memória (Sessions)"}),J.jsx("div",{className:"text-sm text-gray-600",children:"Conversas, mensagens e histórico de sessões"})]})]}),J.jsxs("label",{className:"flex items-start space-x-3 p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer",children:[J.jsx("input",{type:"radio",name:"target",value:"observability",checked:"observability"===i,onChange:e=>o(e.target.value),className:"mt-1"}),J.jsxs("div",{children:[J.jsx("div",{className:"font-medium text-gray-900",children:"Observabilidade (Traces)"}),J.jsx("div",{className:"text-sm text-gray-600",children:"Traces de execução, logs e métricas"})]})]}),J.jsxs("label",{className:"flex items-start space-x-3 p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer",children:[J.jsx("input",{type:"radio",name:"target",value:"both",checked:"both"===i,onChange:e=>o(e.target.value),className:"mt-1"}),J.jsxs("div",{children:[J.jsx("div",{className:"font-medium text-gray-900",children:"Ambos (Completo)"}),J.jsx("div",{className:"text-sm text-gray-600",children:"Todos os dados do agente serão removidos"})]})]})]}),J.jsxs("p",{className:"text-sm text-gray-600 bg-blue-50 p-3 rounded-lg",children:["📝 ",(()=>{switch(i){case"memory":return"Apenas dados de memória (conversas e mensagens) serão removidos.";case"observability":return"Apenas dados de observabilidade (traces e execuções) serão removidos.";case"both":return"Todos os dados (memória e observabilidade) serão removidos.";default:return""}})()]})]}),J.jsxs("div",{className:"border-t pt-4",children:[J.jsxs("button",{type:"button",onClick:()=>s(!a),className:"flex items-center space-x-2 text-sm font-medium text-gray-700 hover:text-gray-900",children:[J.jsx(nm,{className:"h-4 w-4"}),J.jsx("span",{children:"Filtros Avançados (Opcional)"}),a?J.jsx(fm,{className:"h-4 w-4"}):J.jsx("span",{className:"text-gray-500",children:"+"})]}),a&&J.jsxs("div",{className:"mt-4 space-y-4 bg-gray-50 p-4 rounded-lg",children:[J.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Use filtros para remover apenas dados específicos. Deixe em branco para remover todos os dados do tipo selecionado."}),J.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[J.jsxs("div",{children:[J.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Thread ID"}),J.jsx("input",{type:"text",value:f.threadId,onChange:e=>m(t=>({...t,threadId:e.target.value})),placeholder:"ex: phone_acme_5511999999999",className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]}),J.jsxs("div",{children:[J.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Session ID"}),J.jsx("input",{type:"text",value:f.sessionId,onChange:e=>m(t=>({...t,sessionId:e.target.value})),placeholder:"ID da sessão específica",className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]}),J.jsxs("div",{children:[J.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Tipo de Entidade"}),J.jsx("input",{type:"text",value:f.entityType,onChange:e=>m(t=>({...t,entityType:e.target.value})),placeholder:"ex: phone, email, user",className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]}),J.jsxs("div",{children:[J.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Valor da Entidade"}),J.jsx("input",{type:"text",value:f.entityValue,onChange:e=>m(t=>({...t,entityValue:e.target.value})),placeholder:"ex: +5511999999999",className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]}),J.jsxs("div",{children:[J.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Data Inicial"}),J.jsx("input",{type:"datetime-local",value:f.dateFrom,onChange:e=>m(t=>({...t,dateFrom:e.target.value})),className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]}),J.jsxs("div",{children:[J.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Data Final"}),J.jsx("input",{type:"datetime-local",value:f.dateTo,onChange:e=>m(t=>({...t,dateTo:e.target.value})),className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]})]}),v&&J.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:J.jsxs("div",{className:"flex items-start space-x-2",children:[J.jsx(qf,{className:"h-4 w-4 text-blue-600 mt-0.5"}),J.jsxs("div",{className:"text-sm text-blue-700",children:[J.jsx("strong",{children:"Filtros aplicados:"})," Apenas dados que correspondam aos filtros especificados serão removidos."]})]})})]})]}),"idle"!==u&&J.jsx(gR,{status:u,successMessage:"✅ Dados do agente resetados com sucesso!",errorMessage:p||"Erro ao resetar dados do agente"}),J.jsxs("div",{className:"flex justify-end space-x-3 pt-4 border-t",children:[J.jsx("button",{type:"button",onClick:g,disabled:l,className:"px-4 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Cancelar"}),J.jsx("button",{type:"button",onClick:async()=>{if(!l){c(!0),d("idle"),h("");try{const e={target:i,filters:{agentId:n.id,...f.threadId&&{threadId:f.threadId},...f.entityType&&{entityType:f.entityType},...f.entityValue&&{entityValue:f.entityValue},...f.sessionId&&{sessionId:f.sessionId},...f.dateFrom&&{dateFrom:f.dateFrom},...f.dateTo&&{dateTo:f.dateTo}}};await r(e),d("success"),setTimeout(()=>{t()},2e3)}catch(gE){d("error"),h(gE instanceof Error?gE.message:"Erro desconhecido")}finally{c(!1)}}},disabled:l||"success"===u,className:"flex items-center px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:l?J.jsxs(J.Fragment,{children:[J.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),"Resetando..."]}):J.jsxs(J.Fragment,{children:[J.jsx(dm,{className:"h-4 w-4 mr-2"}),"Confirmar Reset"]})})]})]})})},yR=({mode:e="portal"})=>{const{agentId:t}=function(){let{matches:e}=B.useContext(qd),t=e[e.length-1];return t?t.params:{}}(),[n]=Dp(),r=Yd(),[i,o]=B.useState(null),[a,s]=B.useState(!0),[l,c]=B.useState(null),[u,d]=B.useState(n.get("threadId")||""),[p,h]=B.useState(n.get("threadId")||void 0),[f,m]=B.useState(!1),[g,v]=B.useState("both"),[y,b]=B.useState(!1),w=n.get("apiUrl")||void 0,x=w,{traces:_,loading:k,refreshTraces:S}=(({threadId:e,mode:t="portal",agentId:n,enabled:r=!0,pollingInterval:i=5e3,customApiUrl:o}={})=>{const[a,s]=B.useState([]),[l,c]=B.useState(!1),[u,d]=B.useState(null),[p,h]=B.useState(0),f=B.useRef(null),m=B.useRef(!0),g=hT();B.useEffect(()=>(m.current=!0,()=>{m.current=!1,f.current&&clearTimeout(f.current)}),[]);const v=B.useCallback(async()=>{var i,a;if(r){if(!n)return s([]),h(0),void c(!1);try{c(!0),d(null);const r=new URLSearchParams;let l;if(e&&r.append("threadId",e),n&&r.append("agentId",n),r.append("limit","50"),r.append("orderBy","created_at"),r.append("order","desc"),"local"===t||o){const e=`${o||"http://localhost:3030"}/api/v1/observability/threads?${r.toString()}`,t=await fetch(e,{headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to fetch traces: ${t.statusText}`);l=await t.json()}else l=await g.get(`/observability/threads?${r.toString()}`);const u=l.threads||(null==(i=l.data)?void 0:i.threads)||l.traces||l.data||[],p=l.total||(null==(a=l.data)?void 0:a.total)||u.length;m.current&&(s(Array.isArray(u)?u:[]),h(p))}catch(xR){if(m.current){const t=xR instanceof Error?xR.message:"Failed to fetch traces";d(t)}}finally{m.current&&c(!1)}}},[e,n,r,t,o]);return B.useEffect(()=>{r&&n&&v()},[e,n,r]),{traces:a,loading:l,error:u,refreshTraces:v,totalTraces:p}})({threadId:void 0,agentId:t||void 0,mode:e,customApiUrl:w,enabled:!!t,pollingInterval:5e3});B.useEffect(()=>{(async()=>{if(!t)return c("No agent ID provided"),void s(!1);if("local"===e||w){const e={id:t,name:n.get("agentName")||"Local Agent Test",description:n.get("agentDescription")||"Testing agent in local mode",endpointUrl:n.get("agentEndpoint")||w||"http://localhost:3030",status:"active",category:"test",triggers:[],dataSources:[],createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),fileTree:{data:[],success:!0}};return o(e),void s(!1)}try{s(!0);const e=await uT.getById(t);o(e.data),c(null)}catch(xR){c(xR instanceof Error?xR.message:"Failed to load agent")}finally{s(!1)}})()},[t,e,w,n]);const C=()=>{r(-1)},E="test"===g?{test:"w-full",monitoring:"hidden"}:"monitoring"===g?{test:"hidden",monitoring:"w-full"}:{test:"w-2/5",monitoring:"w-3/5"};return a?J.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-gray-900 bg-opacity-50",children:J.jsx("div",{className:"bg-white rounded-lg p-8",children:J.jsxs("div",{className:"flex items-center space-x-3",children:[J.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-gray-900"}),J.jsx("span",{className:"text-gray-900",children:"Loading agent..."})]})})}):l||!i?J.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-gray-900 bg-opacity-50",children:J.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-md",children:[J.jsx("h3",{className:"text-lg font-semibold text-red-600 mb-2",children:"Error"}),J.jsx("p",{className:"text-gray-700 mb-4",children:l||"Agent not found"}),J.jsx("button",{onClick:C,className:"px-4 py-2 bg-gray-800 text-white rounded hover:bg-gray-900",children:"Close"})]})}):J.jsxs("div",{className:"fixed inset-0 z-50 bg-gray-100 "+(f?"":"p-4"),children:[J.jsxs("div",{className:`bg-white ${f?"h-full":"h-full rounded-lg shadow-xl"} flex flex-col overflow-hidden`,children:[J.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 bg-white",children:[J.jsxs("div",{className:"flex items-center space-x-4",children:[J.jsxs("div",{className:"flex items-center space-x-3",children:[J.jsx("div",{className:"w-10 h-10 bg-gray-800 text-white rounded-lg flex items-center justify-center font-semibold text-sm flex-shrink-0",children:i.logo||i.name.substring(0,2).toUpperCase()}),J.jsxs("div",{className:"min-w-0",children:[J.jsxs("h2",{className:"text-lg font-semibold text-gray-900 truncate",children:[i.name," - Test & Monitor"]}),J.jsx("p",{className:"text-sm text-gray-500 truncate max-w-xs",title:i.description,children:i.description})]})]}),J.jsxs("div",{className:"flex items-center space-x-1 ml-8 bg-gray-100 rounded-lg p-1",children:[J.jsx("button",{onClick:()=>v("test"),className:"px-3 py-1 text-xs rounded transition-colors "+("test"===g?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-900"),children:"Test Only"}),J.jsx("button",{onClick:()=>v("both"),className:"px-3 py-1 text-xs rounded transition-colors "+("both"===g?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-900"),children:"Split View"}),J.jsx("button",{onClick:()=>v("monitoring"),className:"px-3 py-1 text-xs rounded transition-colors "+("monitoring"===g?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-900"),children:"Monitor Only"})]})]}),J.jsxs("div",{className:"flex items-center space-x-2",children:[_.length>0&&J.jsxs("div",{className:"flex items-center space-x-2 px-3 py-1 bg-blue-50 border border-blue-200 rounded-lg",children:[J.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-pulse"}),J.jsxs("span",{className:"text-sm font-medium text-blue-700",children:[_.length," trace",1!==_.length?"s":""]})]}),J.jsx("button",{onClick:()=>{m(!f)},className:"p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded transition-colors",title:f?"Exit fullscreen":"Fullscreen",children:f?J.jsx(am,{className:"h-5 w-5"}):J.jsx(im,{className:"h-5 w-5"})}),J.jsx("button",{onClick:C,className:"p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded transition-colors",title:"Close",children:J.jsx(fm,{className:"h-5 w-5"})})]})]}),J.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[J.jsx("div",{className:`${E.test} border-r border-gray-200 transition-all duration-300`,children:J.jsx(iT,{agent:i,initialIdentity:u,onIdentityChange:e=>{d(e)},onMessageSent:async()=>{const e=[..._];setTimeout(async()=>{await S();const t=(new Date).getTime(),n=_.find(n=>{const r=new Date(n.completedAt||n.startedAt).getTime(),i=t-r<1e4,o=e.find(e=>e.threadId===n.threadId);return i&&(!o||n.completedAt!==o.completedAt)});n&&(h(n.threadId),u||d(n.threadId))},3e3)},mode:e,customEndpoint:x})}),J.jsx("div",{className:`${E.monitoring} transition-all duration-300`,children:J.jsx(fR,{traces:_,loading:k,onRefresh:S,selectedThreadId:p,onThreadSelect:e=>{h(e.threadId),d(e.threadId)},agentId:t,mode:e,customApiUrl:w})})]})]}),i&&y&&J.jsx(vR,{agent:i,isOpen:y,onClose:()=>b(!1),onConfirm:async e=>{const{agentsApi:t}=await function(e,t){let n=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),r=(null==e?void 0:e.nonce)||(null==e?void 0:e.getAttribute("nonce"));n=Promise.allSettled(t.map(e=>{if((e=function(e){return"/"+e}(e))in Pf)return;Pf[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const i=document.createElement("link");return i.rel=t?"stylesheet":"modulepreload",t||(i.as="script"),i.crossOrigin="",i.href=e,r&&i.setAttribute("nonce",r),document.head.appendChild(i),t?new Promise((t,n)=>{i.addEventListener("load",t),i.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function r(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return n.then(t=>{for(const e of t||[])"rejected"===e.status&&r(e.reason);return e().catch(r)})}(async()=>{const{agentsApi:e}=await Promise.resolve().then(()=>dT);return{agentsApi:e}},[]);await t.resetData(e),await S()}})]})};function bR({children:e}){const t={id:"local-test",domain:"local.test",role:"ADMIN"},n={currentTenant:t,availableTenants:[t],isSuperAdmin:!1,switchTenant:()=>{},isLoading:!1,error:null};return J.jsx(pT.Provider,{value:n,children:e})}function wR(){return J.jsx(Af,{domain:"dummy.auth0.com",clientId:"dummy-client-id",authorizationParams:{redirect_uri:window.location.origin},skipRedirectCallback:!0,children:J.jsx(Mp,{children:J.jsx(bR,{children:J.jsxs(up,{children:[J.jsx(lp,{path:"/agents/:agentId/test-monitor",element:J.jsx(yR,{mode:"local"})}),J.jsx(lp,{path:"*",element:J.jsx("div",{className:"flex items-center justify-center h-screen bg-gray-50",children:J.jsxs("div",{className:"text-center max-w-md",children:[J.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-3",children:"Runflow Local Test"}),J.jsx("p",{className:"text-gray-600 mb-4",children:"This is a minimal build for local agent testing."}),J.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 text-left",children:[J.jsx("p",{className:"text-sm text-blue-800 font-medium mb-2",children:"Navigate to:"}),J.jsx("code",{className:"text-xs bg-blue-100 px-2 py-1 rounded text-blue-900 block",children:"/agents/YOUR_AGENT_ID/test-monitor?mode=local"})]})]})})})]})})})})}Y.createRoot(document.getElementById("root")).render(J.jsx($.StrictMode,{children:J.jsx(wR,{})}));