cosmic-ai-genius 0.3.6

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,741 @@
1
+ (function(Bi,Pe){typeof exports=="object"&&typeof module<"u"?Pe(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],Pe):(Bi=typeof globalThis<"u"?globalThis:Bi||self,Pe(Bi.GeniusSDK={},Bi.React,Bi.ReactDOM))})(this,function(Bi,Pe,ed){"use strict";var BE=Object.defineProperty;var UE=(Bi,Pe,ed)=>Pe in Bi?BE(Bi,Pe,{enumerable:!0,configurable:!0,writable:!0,value:ed}):Bi[Pe]=ed;var Bn=(Bi,Pe,ed)=>UE(Bi,typeof Pe!="symbol"?Pe+"":Pe,ed);var Mx;function Ng(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Y1={exports:{}},zg={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var YS;function k7(){if(YS)return zg;YS=1;var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(c,d,p){var y=null;if(p!==void 0&&(y=""+p),d.key!==void 0&&(y=""+d.key),"key"in d){p={};for(var x in d)x!=="key"&&(p[x]=d[x])}else p=d;return d=p.ref,{$$typeof:r,type:c,key:y,ref:d!==void 0?d:null,props:p}}return zg.Fragment=i,zg.jsx=o,zg.jsxs=o,zg}var Bg={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var XS;function M7(){return XS||(XS=1,process.env.NODE_ENV!=="production"&&function(){function r(_){if(_==null)return null;if(typeof _=="function")return _.$$typeof===K?null:_.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case F:return"Fragment";case ee:return"Profiler";case ae:return"StrictMode";case Q:return"Suspense";case z:return"SuspenseList";case se:return"Activity"}if(typeof _=="object")switch(typeof _.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),_.$$typeof){case D:return"Portal";case Y:return(_.displayName||"Context")+".Provider";case B:return(_._context.displayName||"Context")+".Consumer";case $:var re=_.render;return _=_.displayName,_||(_=re.displayName||re.name||"",_=_!==""?"ForwardRef("+_+")":"ForwardRef"),_;case V:return re=_.displayName||null,re!==null?re:r(_.type)||"Memo";case le:re=_._payload,_=_._init;try{return r(_(re))}catch{}}return null}function i(_){return""+_}function o(_){try{i(_);var re=!1}catch{re=!0}if(re){re=console;var me=re.error,g=typeof Symbol=="function"&&Symbol.toStringTag&&_[Symbol.toStringTag]||_.constructor.name||"Object";return me.call(re,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",g),i(_)}}function c(_){if(_===F)return"<>";if(typeof _=="object"&&_!==null&&_.$$typeof===le)return"<...>";try{var re=r(_);return re?"<"+re+">":"<...>"}catch{return"<...>"}}function d(){var _=L.A;return _===null?null:_.getOwner()}function p(){return Error("react-stack-top-frame")}function y(_){if(X.call(_,"key")){var re=Object.getOwnPropertyDescriptor(_,"key").get;if(re&&re.isReactWarning)return!1}return _.key!==void 0}function x(_,re){function me(){S||(S=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",re))}me.isReactWarning=!0,Object.defineProperty(_,"key",{get:me,configurable:!0})}function b(){var _=r(this.type);return T[_]||(T[_]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),_=this.props.ref,_!==void 0?_:null}function k(_,re,me,g,w,C,q,ce){return me=C.ref,_={$$typeof:J,type:_,key:re,props:C,_owner:w},(me!==void 0?me:null)!==null?Object.defineProperty(_,"ref",{enumerable:!1,get:b}):Object.defineProperty(_,"ref",{enumerable:!1,value:null}),_._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(_,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(_,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.defineProperty(_,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ce}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_}function O(_,re,me,g,w,C,q,ce){var j=re.children;if(j!==void 0)if(g)if(H(j)){for(g=0;g<j.length;g++)N(j[g]);Object.freeze&&Object.freeze(j)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else N(j);if(X.call(re,"key")){j=r(_);var U=Object.keys(re).filter(function(ge){return ge!=="key"});g=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",te[j+g]||(U=0<U.length?"{"+U.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
+ let props = %s;
19
+ <%s {...props} />
20
+ React keys must be passed directly to JSX without using spread:
21
+ let props = %s;
22
+ <%s key={someKey} {...props} />`,g,j,U,j),te[j+g]=!0)}if(j=null,me!==void 0&&(o(me),j=""+me),y(re)&&(o(re.key),j=""+re.key),"key"in re){me={};for(var ne in re)ne!=="key"&&(me[ne]=re[ne])}else me=re;return j&&x(me,typeof _=="function"?_.displayName||_.name||"Unknown":_),k(_,j,C,w,d(),me,q,ce)}function N(_){typeof _=="object"&&_!==null&&_.$$typeof===J&&_._store&&(_._store.validated=1)}var Z=Pe,J=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),ae=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),K=Symbol.for("react.client.reference"),L=Z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,H=Array.isArray,A=console.createTask?console.createTask:function(){return null};Z={"react-stack-bottom-frame":function(_){return _()}};var S,T={},E=Z["react-stack-bottom-frame"].bind(Z,p)(),P=A(c(p)),te={};Bg.Fragment=F,Bg.jsx=function(_,re,me,g,w){var C=1e4>L.recentlyCreatedOwnerStacks++;return O(_,re,me,!1,g,w,C?Error("react-stack-top-frame"):E,C?A(c(_)):P)},Bg.jsxs=function(_,re,me,g,w){var C=1e4>L.recentlyCreatedOwnerStacks++;return O(_,re,me,!0,g,w,C?Error("react-stack-top-frame"):E,C?A(c(_)):P)}}()),Bg}var FS;function A7(){return FS||(FS=1,process.env.NODE_ENV==="production"?Y1.exports=k7():Y1.exports=M7()),Y1.exports}var W=A7();const E7=()=>W.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{d:"M3.33 12.67V8.67H4.67V11.33H7.33V12.67H3.33ZM11.33 7.33V4.67H8.67V3.33H12.67V7.33H11.33Z",fill:"currentColor"})}),_7=()=>W.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{d:"M2.95 14L2 13.05L5.07 10H3.33V8.67H7.33V12.67H6V10.93L2.95 14ZM8.67 7.33V3.33H10V5.07L13.05 2L14 2.95L10.93 6H12.67V7.33H8.67Z",fill:"currentColor"})}),ZS=()=>W.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.99935 3.33268C6.31745 3.33268 3.33268 6.31745 3.33268 9.99935C3.33268 13.6812 6.31745 16.666 9.99935 16.666C13.1587 16.666 15.8047 14.4684 16.4922 11.5184L16.1718 11.8387C15.8463 12.1641 15.3187 12.164 14.9933 11.8385C14.6679 11.513 14.668 10.9854 14.9935 10.66L16.6606 8.99334C16.8169 8.83708 17.0289 8.74932 17.2499 8.74935C17.4709 8.74938 17.6829 8.83721 17.8391 8.99351L19.5053 10.6602C19.8307 10.9857 19.8306 11.5133 19.5051 11.8387C19.1797 12.1641 18.652 12.164 18.3266 11.8385L18.164 11.6758C17.3881 15.4747 14.0275 18.3327 9.99935 18.3327C5.39698 18.3327 1.66602 14.6017 1.66602 9.99935C1.66602 5.39698 5.39698 1.66602 9.99935 1.66602C13.0577 1.66602 15.7302 3.31401 17.1789 5.76641C17.413 6.16268 17.2815 6.67367 16.8853 6.90775C16.489 7.14184 15.978 7.01036 15.7439 6.6141C14.5827 4.64825 12.4442 3.33268 9.99935 3.33268ZM9.99935 4.99935C10.4596 4.99935 10.8327 5.37244 10.8327 5.83268V9.55336L12.9616 10.9726C13.3445 11.2279 13.448 11.7453 13.1927 12.1283C12.9374 12.5112 12.42 12.6147 12.0371 12.3594L9.5371 10.6927C9.30527 10.5382 9.16602 10.278 9.16602 9.99935V5.83268C9.16602 5.37244 9.53911 4.99935 9.99935 4.99935Z",fill:"#525252"})}),Ub=()=>W.jsx("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5 3.5C3.77614 3.22386 4.22386 3.22386 4.5 3.5L8 7L11.5 3.5C11.7761 3.22386 12.2239 3.22386 12.5 3.5C12.7761 3.77614 12.7761 4.22386 12.5 4.5L9 8L12.5 11.5C12.7761 11.7761 12.7761 12.2239 12.5 12.5C12.2239 12.7761 11.7761 12.7761 11.5 12.5L8 9L4.5 12.5C4.22386 12.7761 3.77614 12.7761 3.5 12.5C3.22386 12.2239 3.22386 11.7761 3.5 11.5L7 8L3.5 4.5C3.22386 4.22386 3.22386 3.77614 3.5 3.5Z",fill:"currentColor"})}),QS=()=>W.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.29 2.29C7.66 1.92 8.34 1.92 8.71 2.29L14.21 7.79C14.58 8.16 14.58 8.84 14.21 9.21C13.84 9.58 13.16 9.58 12.79 9.21L8.5 4.91V14.5C8.5 15.05 8.05 15.5 7.5 15.5C6.95 15.5 6.5 15.05 6.5 14.5V4.91L2.21 9.21C1.84 9.58 1.16 9.58 0.79 9.21C0.42 8.84 0.42 8.16 0.79 7.79L7.29 2.29Z",fill:"currentColor"})}),O7=()=>W.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[W.jsx("rect",{x:"11",y:"2",width:"1",height:"12",rx:"0.5",fill:"currentColor"}),W.jsx("rect",{x:"7.5",y:"4",width:"1",height:"8",rx:"0.5",fill:"currentColor"}),W.jsx("rect",{x:"2",y:"6",width:"1",height:"4",rx:"0.5",fill:"currentColor"}),W.jsx("rect",{x:"13",y:"6",width:"1",height:"4",rx:"0.5",fill:"currentColor"}),W.jsx("rect",{x:"4.5",y:"7",width:"1",height:"2",rx:"0.5",fill:"currentColor"})]}),Hb=()=>W.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsxs("g",{children:[W.jsx("path",{d:"M10.1611 0.999981C10.1611 1.0132 10.1611 1.0264 10.1611 1.03959C10.1647 7.58616 12.008 10.1611 19.3221 10.1611C12.008 10.1611 10.1647 12.736 10.1611 19.2825C10.1574 12.736 8.31411 10.1611 0.999981 10.1611C8.31411 10.1611 10.1574 7.58616 10.1611 1.03959C10.161 1.0264 10.161 1.0132 10.1611 0.999981Z",fill:"currentColor"}),W.jsx("path",{d:"M10.1611 0.999981C10.1648 7.57577 8.32884 10.1611 0.999981 10.1611C8.32884 10.1611 10.1648 12.7463 10.1611 19.3221C10.1573 12.7463 11.9933 10.1611 19.3221 10.1611C11.9933 10.1611 10.1573 7.57577 10.1611 0.999981Z",stroke:"currentColor",strokeWidth:"1.83221",strokeLinejoin:"round"})]})}),D7=()=>W.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.8 4.8C4.8 2.968 6.168 1.6 8 1.6C9.832 1.6 11.2 2.968 11.2 4.8V8.64C11.2 10.472 9.832 11.84 8 11.84C6.168 11.84 4.8 10.472 4.8 8.64V4.8ZM8 2.88C6.872 2.88 5.92 3.832 5.92 4.8V8.64C5.92 9.768 6.872 10.56 8 10.56C9.128 10.56 10.08 9.768 10.08 8.64V4.8C10.08 3.832 9.128 2.88 8 2.88ZM2.88 7.2C3.232 7.2 3.52 7.488 3.52 7.84V8.64C3.52 11.176 5.464 13.12 8 13.12C10.536 13.12 12.48 11.176 12.48 8.64V7.84C12.48 7.488 12.768 7.2 13.12 7.2C13.472 7.2 13.76 7.488 13.76 7.84V8.64C13.76 11.88 11.24 14.4 8 14.4C4.76 14.4 2.24 11.88 2.24 8.64V7.84C2.24 7.488 2.528 7.2 2.88 7.2Z",fill:"currentColor"})}),JS=({onEnd:r})=>W.jsx("div",{className:"genius-voice-call-container",children:W.jsx("div",{className:"genius-voice-call-content",children:W.jsxs("div",{className:"genius-voice-call-buttons",children:[W.jsx("div",{className:"genius-voice-call-genius-icon",children:W.jsx("div",{className:"genius-voice-call-genius-icon-inner",children:W.jsx(Hb,{})})}),W.jsx("div",{className:"genius-voice-call-voice-container",children:W.jsxs("div",{className:"genius-voice-call-mic-button",children:[W.jsx("svg",{width:"14",height:"19",viewBox:"0 0 14 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33333 3.33333C3.33333 1.49238 4.82572 0 6.66667 0C8.50762 0 10 1.49238 10 3.33333V9.16667C10 11.0076 8.50762 12.5 6.66667 12.5C4.82572 12.5 3.33333 11.0076 3.33333 9.16667V3.33333ZM6.66667 1.66667C5.74619 1.66667 5 2.41286 5 3.33333V9.16667C5 10.0871 5.74619 10.8333 6.66667 10.8333C7.58714 10.8333 8.33333 10.0871 8.33333 9.16667V3.33333C8.33333 2.41286 7.58714 1.66667 6.66667 1.66667ZM0.833333 6.66667C1.29357 6.66667 1.66667 7.03976 1.66667 7.5V9.16667C1.66667 11.9281 3.90524 14.1667 6.66667 14.1667C9.42809 14.1667 11.6667 11.9281 11.6667 9.16667V7.5C11.6667 7.03976 12.0398 6.66667 12.5 6.66667C12.9602 6.66667 13.3333 7.03976 13.3333 7.5V9.16667C13.3333 12.5663 10.7886 15.3717 7.5 15.7818V16.6667H10C10.4602 16.6667 10.8333 17.0398 10.8333 17.5C10.8333 17.9602 10.4602 18.3333 10 18.3333H3.33333C2.8731 18.3333 2.5 17.9602 2.5 17.5C2.5 17.0398 2.8731 16.6667 3.33333 16.6667H5.83333V15.7818C2.54474 15.3717 0 12.5663 0 9.16667V7.5C0 7.03976 0.373096 6.66667 0.833333 6.66667Z",fill:"currentColor"})}),W.jsx("div",{className:"genius-voice-call-waveform",children:W.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[W.jsx("rect",{x:"4",y:"8",width:"1",height:"4",rx:"0.5",fill:"currentColor"}),W.jsx("rect",{x:"6.5",y:"6",width:"1",height:"8",rx:"0.5",fill:"currentColor"}),W.jsx("rect",{x:"9",y:"4",width:"1",height:"12",rx:"0.5",fill:"currentColor"}),W.jsx("rect",{x:"11.5",y:"7",width:"1",height:"6",rx:"0.5",fill:"currentColor"}),W.jsx("rect",{x:"14",y:"9",width:"1",height:"2",rx:"0.5",fill:"currentColor"})]})})]})}),W.jsx("button",{className:"genius-voice-call-end-button",onClick:r,"aria-label":"End voice call",children:W.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.14611 1.75638C3.90962 1.63676 3.63035 1.63676 3.39386 1.75638C3.30493 1.80136 3.19406 1.89741 2.70488 2.3866L2.57351 2.51796C2.10667 2.98481 1.98083 3.11983 1.88024 3.2989C1.76364 3.50645 1.66596 3.88207 1.66667 4.12013C1.6673 4.33197 1.69857 4.45955 1.83629 4.94475C2.23521 6.35023 2.84158 7.70886 3.6554 8.97256C3.90459 9.3595 3.79291 9.87519 3.40597 10.1244C3.01903 10.3736 2.50335 10.2619 2.25416 9.87495C1.34975 8.47058 0.676021 6.96085 0.232956 5.39983C0.228478 5.38405 0.224034 5.36841 0.219624 5.3529C0.0967012 4.92039 0.0013796 4.585 1.06333e-05 4.12509C-0.00155409 3.59945 0.169701 2.94091 0.427143 2.48262C0.652809 2.0809 0.950438 1.78358 1.33855 1.39587C1.35716 1.37727 1.37598 1.35848 1.395 1.33945L1.52636 1.20809C1.55324 1.18122 1.57981 1.15457 1.60613 1.12819C1.96816 0.765228 2.28112 0.451466 2.64162 0.269128C3.35107 -0.0897089 4.1889 -0.0897099 4.89835 0.269128C5.25885 0.451467 5.57181 0.765229 5.93385 1.12819C5.96016 1.15457 5.98674 1.18122 6.01361 1.20809L6.176 1.37048C6.1937 1.38818 6.21124 1.4057 6.22861 1.42303C6.46749 1.66151 6.67327 1.86694 6.81764 2.08898C7.35638 2.91759 7.35638 3.98582 6.81764 4.81443C6.67327 5.03648 6.46749 5.2419 6.22861 5.48038C6.21124 5.49772 6.1937 5.51523 6.176 5.53294C6.12799 5.58094 6.1035 5.60556 6.08644 5.62361C6.08613 5.62497 6.08583 5.62647 6.08555 5.62809C6.08524 5.6299 6.08502 5.63157 6.08485 5.63308C6.0876 5.63918 6.09132 5.64724 6.09644 5.65812C6.10446 5.67515 6.11387 5.69476 6.12673 5.72155C6.22048 5.91682 6.32015 6.10995 6.42572 6.3007C6.6486 6.70337 6.50285 7.21047 6.10017 7.43335C5.6975 7.65623 5.1904 7.51048 4.96752 7.10781C4.84631 6.88882 4.73189 6.66709 4.62426 6.44292C4.62116 6.43645 4.61797 6.42983 4.6147 6.42306C4.57345 6.33748 4.52042 6.22747 4.48146 6.09383C4.34177 5.61464 4.43585 5.06292 4.72644 4.65709C4.80785 4.54339 4.90288 4.44872 4.97793 4.37394C4.98461 4.36727 4.99114 4.36077 4.99749 4.35443C5.31891 4.033 5.38472 3.96073 5.42034 3.90595C5.59992 3.62975 5.59992 3.27367 5.42034 2.99747C5.38472 2.94269 5.31891 2.87041 4.99749 2.54899L4.83509 2.3866C4.34591 1.89741 4.23504 1.80136 4.14611 1.75638ZM16.4809 0.615274C16.8063 0.940711 16.8063 1.46835 16.4809 1.79379L8.90707 9.36758C9.69231 10.0531 10.5486 10.6119 11.4497 11.0445C11.4765 11.0573 11.4961 11.0668 11.5131 11.0748C11.524 11.0799 11.532 11.0836 11.5381 11.0864C11.5396 11.0862 11.5413 11.086 11.5431 11.0857C11.5447 11.0854 11.5462 11.0851 11.5476 11.0848C11.5657 11.0677 11.5903 11.0432 11.6383 10.9952C11.656 10.9775 11.6735 10.96 11.6908 10.9426C11.9293 10.7037 12.1347 10.4979 12.3568 10.3536C13.1854 9.81484 14.2536 9.81484 15.0822 10.3536C15.3043 10.4979 15.5097 10.7037 15.7482 10.9426C15.7655 10.96 15.783 10.9775 15.8007 10.9952L15.9631 11.1576C15.99 11.1845 16.0166 11.211 16.043 11.2374C16.406 11.5994 16.7197 11.9124 16.9021 12.2729C17.2609 12.9823 17.2609 13.8201 16.9021 14.5296C16.7197 14.8901 16.406 15.2031 16.043 15.5651C16.0166 15.5914 15.99 15.618 15.9631 15.6449L15.8318 15.7762C15.8127 15.7952 15.7939 15.8141 15.7753 15.8327C15.3876 16.2208 15.0903 16.5184 14.6886 16.7441C14.2303 17.0015 13.5718 17.1728 13.0461 17.1712C12.5862 17.1698 12.2508 17.0745 11.8183 16.9516C11.8028 16.9472 11.7872 16.9427 11.7714 16.9383C9.34546 16.2497 7.04439 15.0043 5.07089 13.2038L1.48086 16.7938C1.15542 17.1192 0.627784 17.1192 0.302348 16.7938C-0.0230893 16.4683 -0.0230893 15.9407 0.302347 15.6153L15.3023 0.615274C15.6278 0.289837 16.1554 0.289837 16.4809 0.615274ZM7.7262 10.5484L6.25077 12.0239C8.01655 13.6188 10.0667 14.7219 12.2265 15.3349C12.7117 15.4726 12.8392 15.5039 13.0511 15.5045C13.2891 15.5053 13.6648 15.4076 13.8723 15.291C14.0514 15.1904 14.1864 15.0645 14.6533 14.5977L14.7846 14.4663C15.2738 13.9772 15.3699 13.8663 15.4148 13.7774C15.5344 13.5409 15.5344 13.2616 15.4148 13.0251C15.3699 12.9362 15.2738 12.8253 14.7846 12.3361L14.6222 12.1737C14.3008 11.8523 14.2285 11.7865 14.1737 11.7509C13.8975 11.5713 13.5415 11.5713 13.2653 11.7509C13.2105 11.7865 13.1382 11.8523 12.8168 12.1737C12.8104 12.1801 12.8039 12.1866 12.7973 12.1933C12.7225 12.2683 12.6278 12.3634 12.5141 12.4448C12.1083 12.7354 11.5566 12.8294 11.0774 12.6898C10.9437 12.6508 10.8337 12.5978 10.7482 12.5565C10.7414 12.5532 10.7348 12.5501 10.7283 12.547C9.6605 12.0343 8.64866 11.3679 7.7262 10.5484Z",fill:"currentColor"})})})]})})});function Pb(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var td=Pb();function WS(r){td=r}var Ug={exec:()=>null};function Gn(r,i=""){let o=typeof r=="string"?r:r.source;const c={replace:(d,p)=>{let y=typeof p=="string"?p:p.source;return y=y.replace(Va.caret,"$1"),o=o.replace(d,y),c},getRegex:()=>new RegExp(o,i)};return c}var Va={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},j7=/^(?:[ \t]*(?:\n|$))+/,L7=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,R7=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Hg=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,N7=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vb=/(?:[*+-]|\d{1,9}[.)])/,KS=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,e3=Gn(KS).replace(/bull/g,Vb).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),z7=Gn(KS).replace(/bull/g,Vb).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),$b=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,B7=/^[^\n]+/,Ib=/(?!\s*\])(?:\\.|[^\[\]\\])+/,U7=Gn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ib).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),H7=Gn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vb).getRegex(),X1="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",qb=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,P7=Gn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",qb).replace("tag",X1).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t3=Gn($b).replace("hr",Hg).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",X1).getRegex(),V7=Gn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",t3).getRegex(),Gb={blockquote:V7,code:L7,def:U7,fences:R7,heading:N7,hr:Hg,html:P7,lheading:e3,list:H7,newline:j7,paragraph:t3,table:Ug,text:B7},n3=Gn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Hg).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",X1).getRegex(),$7={...Gb,lheading:z7,table:n3,paragraph:Gn($b).replace("hr",Hg).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",n3).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",X1).getRegex()},I7={...Gb,html:Gn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qb).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ug,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Gn($b).replace("hr",Hg).replace("heading",` *#{1,6} *[^
23
+ ]`).replace("lheading",e3).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},q7=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,G7=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,i3=/^( {2,}|\\)\n(?!\s*$)/,Y7=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,F1=/[\p{P}\p{S}]/u,Yb=/[\s\p{P}\p{S}]/u,a3=/[^\s\p{P}\p{S}]/u,X7=Gn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Yb).getRegex(),s3=/(?!~)[\p{P}\p{S}]/u,F7=/(?!~)[\s\p{P}\p{S}]/u,Z7=/(?:[^\s\p{P}\p{S}]|~)/u,Q7=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,r3=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,J7=Gn(r3,"u").replace(/punct/g,F1).getRegex(),W7=Gn(r3,"u").replace(/punct/g,s3).getRegex(),o3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",K7=Gn(o3,"gu").replace(/notPunctSpace/g,a3).replace(/punctSpace/g,Yb).replace(/punct/g,F1).getRegex(),eT=Gn(o3,"gu").replace(/notPunctSpace/g,Z7).replace(/punctSpace/g,F7).replace(/punct/g,s3).getRegex(),tT=Gn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,a3).replace(/punctSpace/g,Yb).replace(/punct/g,F1).getRegex(),nT=Gn(/\\(punct)/,"gu").replace(/punct/g,F1).getRegex(),iT=Gn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),aT=Gn(qb).replace("(?:-->|$)","-->").getRegex(),sT=Gn("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",aT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z1=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rT=Gn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Z1).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),l3=Gn(/^!?\[(label)\]\[(ref)\]/).replace("label",Z1).replace("ref",Ib).getRegex(),c3=Gn(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ib).getRegex(),oT=Gn("reflink|nolink(?!\\()","g").replace("reflink",l3).replace("nolink",c3).getRegex(),Xb={_backpedal:Ug,anyPunctuation:nT,autolink:iT,blockSkip:Q7,br:i3,code:G7,del:Ug,emStrongLDelim:J7,emStrongRDelimAst:K7,emStrongRDelimUnd:tT,escape:q7,link:rT,nolink:c3,punctuation:X7,reflink:l3,reflinkSearch:oT,tag:sT,text:Y7,url:Ug},lT={...Xb,link:Gn(/^!?\[(label)\]\((.*?)\)/).replace("label",Z1).getRegex(),reflink:Gn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z1).getRegex()},Fb={...Xb,emStrongRDelimAst:eT,emStrongLDelim:W7,url:Gn(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},cT={...Fb,br:Gn(i3).replace("{2,}","*").getRegex(),text:Gn(Fb.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q1={normal:Gb,gfm:$7,pedantic:I7},Pg={normal:Xb,gfm:Fb,breaks:cT,pedantic:lT},uT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u3=r=>uT[r];function ko(r,i){if(i){if(Va.escapeTest.test(r))return r.replace(Va.escapeReplace,u3)}else if(Va.escapeTestNoEncode.test(r))return r.replace(Va.escapeReplaceNoEncode,u3);return r}function d3(r){try{r=encodeURI(r).replace(Va.percentDecode,"%")}catch{return null}return r}function h3(r,i){var p;const o=r.replace(Va.findPipe,(y,x,b)=>{let k=!1,O=x;for(;--O>=0&&b[O]==="\\";)k=!k;return k?"|":" |"}),c=o.split(Va.splitPipe);let d=0;if(c[0].trim()||c.shift(),c.length>0&&!((p=c.at(-1))!=null&&p.trim())&&c.pop(),i)if(c.length>i)c.splice(i);else for(;c.length<i;)c.push("");for(;d<c.length;d++)c[d]=c[d].trim().replace(Va.slashPipe,"|");return c}function Vg(r,i,o){const c=r.length;if(c===0)return"";let d=0;for(;d<c&&r.charAt(c-d-1)===i;)d++;return r.slice(0,c-d)}function dT(r,i){if(r.indexOf(i[1])===-1)return-1;let o=0;for(let c=0;c<r.length;c++)if(r[c]==="\\")c++;else if(r[c]===i[0])o++;else if(r[c]===i[1]&&(o--,o<0))return c;return o>0?-2:-1}function f3(r,i,o,c,d){const p=i.href,y=i.title||null,x=r[1].replace(d.other.outputLinkReplace,"$1");c.state.inLink=!0;const b={type:r[0].charAt(0)==="!"?"image":"link",raw:o,href:p,title:y,text:x,tokens:c.inlineTokens(x)};return c.state.inLink=!1,b}function hT(r,i,o){const c=r.match(o.other.indentCodeCompensation);if(c===null)return i;const d=c[1];return i.split(`
24
+ `).map(p=>{const y=p.match(o.other.beginningSpace);if(y===null)return p;const[x]=y;return x.length>=d.length?p.slice(d.length):p}).join(`
25
+ `)}var J1=class{constructor(r){Bn(this,"options");Bn(this,"rules");Bn(this,"lexer");this.options=r||td}space(r){const i=this.rules.block.newline.exec(r);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(r){const i=this.rules.block.code.exec(r);if(i){const o=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?o:Vg(o,`
26
+ `)}}}fences(r){const i=this.rules.block.fences.exec(r);if(i){const o=i[0],c=hT(o,i[3]||"",this.rules);return{type:"code",raw:o,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:c}}}heading(r){const i=this.rules.block.heading.exec(r);if(i){let o=i[2].trim();if(this.rules.other.endingHash.test(o)){const c=Vg(o,"#");(this.options.pedantic||!c||this.rules.other.endingSpaceChar.test(c))&&(o=c.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(r){const i=this.rules.block.hr.exec(r);if(i)return{type:"hr",raw:Vg(i[0],`
27
+ `)}}blockquote(r){const i=this.rules.block.blockquote.exec(r);if(i){let o=Vg(i[0],`
28
+ `).split(`
29
+ `),c="",d="";const p=[];for(;o.length>0;){let y=!1;const x=[];let b;for(b=0;b<o.length;b++)if(this.rules.other.blockquoteStart.test(o[b]))x.push(o[b]),y=!0;else if(!y)x.push(o[b]);else break;o=o.slice(b);const k=x.join(`
30
+ `),O=k.replace(this.rules.other.blockquoteSetextReplace,`
31
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");c=c?`${c}
32
+ ${k}`:k,d=d?`${d}
33
+ ${O}`:O;const N=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(O,p,!0),this.lexer.state.top=N,o.length===0)break;const Z=p.at(-1);if((Z==null?void 0:Z.type)==="code")break;if((Z==null?void 0:Z.type)==="blockquote"){const J=Z,D=J.raw+`
34
+ `+o.join(`
35
+ `),F=this.blockquote(D);p[p.length-1]=F,c=c.substring(0,c.length-J.raw.length)+F.raw,d=d.substring(0,d.length-J.text.length)+F.text;break}else if((Z==null?void 0:Z.type)==="list"){const J=Z,D=J.raw+`
36
+ `+o.join(`
37
+ `),F=this.list(D);p[p.length-1]=F,c=c.substring(0,c.length-Z.raw.length)+F.raw,d=d.substring(0,d.length-J.raw.length)+F.raw,o=D.substring(p.at(-1).raw.length).split(`
38
+ `);continue}}return{type:"blockquote",raw:c,tokens:p,text:d}}}list(r){let i=this.rules.block.list.exec(r);if(i){let o=i[1].trim();const c=o.length>1,d={type:"list",raw:"",ordered:c,start:c?+o.slice(0,-1):"",loose:!1,items:[]};o=c?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=c?o:"[*+-]");const p=this.rules.other.listItemRegex(o);let y=!1;for(;r;){let b=!1,k="",O="";if(!(i=p.exec(r))||this.rules.block.hr.test(r))break;k=i[0],r=r.substring(k.length);let N=i[2].split(`
39
+ `,1)[0].replace(this.rules.other.listReplaceTabs,ee=>" ".repeat(3*ee.length)),Z=r.split(`
40
+ `,1)[0],J=!N.trim(),D=0;if(this.options.pedantic?(D=2,O=N.trimStart()):J?D=i[1].length+1:(D=i[2].search(this.rules.other.nonSpaceChar),D=D>4?1:D,O=N.slice(D),D+=i[1].length),J&&this.rules.other.blankLine.test(Z)&&(k+=Z+`
41
+ `,r=r.substring(Z.length+1),b=!0),!b){const ee=this.rules.other.nextBulletRegex(D),B=this.rules.other.hrRegex(D),Y=this.rules.other.fencesBeginRegex(D),$=this.rules.other.headingBeginRegex(D),Q=this.rules.other.htmlBeginRegex(D);for(;r;){const z=r.split(`
42
+ `,1)[0];let V;if(Z=z,this.options.pedantic?(Z=Z.replace(this.rules.other.listReplaceNesting," "),V=Z):V=Z.replace(this.rules.other.tabCharGlobal," "),Y.test(Z)||$.test(Z)||Q.test(Z)||ee.test(Z)||B.test(Z))break;if(V.search(this.rules.other.nonSpaceChar)>=D||!Z.trim())O+=`
43
+ `+V.slice(D);else{if(J||N.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Y.test(N)||$.test(N)||B.test(N))break;O+=`
44
+ `+Z}!J&&!Z.trim()&&(J=!0),k+=z+`
45
+ `,r=r.substring(z.length+1),N=V.slice(D)}}d.loose||(y?d.loose=!0:this.rules.other.doubleBlankLine.test(k)&&(y=!0));let F=null,ae;this.options.gfm&&(F=this.rules.other.listIsTask.exec(O),F&&(ae=F[0]!=="[ ] ",O=O.replace(this.rules.other.listReplaceTask,""))),d.items.push({type:"list_item",raw:k,task:!!F,checked:ae,loose:!1,text:O,tokens:[]}),d.raw+=k}const x=d.items.at(-1);if(x)x.raw=x.raw.trimEnd(),x.text=x.text.trimEnd();else return;d.raw=d.raw.trimEnd();for(let b=0;b<d.items.length;b++)if(this.lexer.state.top=!1,d.items[b].tokens=this.lexer.blockTokens(d.items[b].text,[]),!d.loose){const k=d.items[b].tokens.filter(N=>N.type==="space"),O=k.length>0&&k.some(N=>this.rules.other.anyLine.test(N.raw));d.loose=O}if(d.loose)for(let b=0;b<d.items.length;b++)d.items[b].loose=!0;return d}}html(r){const i=this.rules.block.html.exec(r);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(r){const i=this.rules.block.def.exec(r);if(i){const o=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),c=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",d=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:o,raw:i[0],href:c,title:d}}}table(r){var y;const i=this.rules.block.table.exec(r);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;const o=h3(i[1]),c=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),d=(y=i[3])!=null&&y.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
46
+ `):[],p={type:"table",raw:i[0],header:[],align:[],rows:[]};if(o.length===c.length){for(const x of c)this.rules.other.tableAlignRight.test(x)?p.align.push("right"):this.rules.other.tableAlignCenter.test(x)?p.align.push("center"):this.rules.other.tableAlignLeft.test(x)?p.align.push("left"):p.align.push(null);for(let x=0;x<o.length;x++)p.header.push({text:o[x],tokens:this.lexer.inline(o[x]),header:!0,align:p.align[x]});for(const x of d)p.rows.push(h3(x,p.header.length).map((b,k)=>({text:b,tokens:this.lexer.inline(b),header:!1,align:p.align[k]})));return p}}lheading(r){const i=this.rules.block.lheading.exec(r);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(r){const i=this.rules.block.paragraph.exec(r);if(i){const o=i[1].charAt(i[1].length-1)===`
47
+ `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:o,tokens:this.lexer.inline(o)}}}text(r){const i=this.rules.block.text.exec(r);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(r){const i=this.rules.inline.escape.exec(r);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(r){const i=this.rules.inline.tag.exec(r);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(r){const i=this.rules.inline.link.exec(r);if(i){const o=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;const p=Vg(o.slice(0,-1),"\\");if((o.length-p.length)%2===0)return}else{const p=dT(i[2],"()");if(p===-2)return;if(p>-1){const x=(i[0].indexOf("!")===0?5:4)+i[1].length+p;i[2]=i[2].substring(0,p),i[0]=i[0].substring(0,x).trim(),i[3]=""}}let c=i[2],d="";if(this.options.pedantic){const p=this.rules.other.pedanticHrefTitle.exec(c);p&&(c=p[1],d=p[3])}else d=i[3]?i[3].slice(1,-1):"";return c=c.trim(),this.rules.other.startAngleBracket.test(c)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?c=c.slice(1):c=c.slice(1,-1)),f3(i,{href:c&&c.replace(this.rules.inline.anyPunctuation,"$1"),title:d&&d.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(r,i){let o;if((o=this.rules.inline.reflink.exec(r))||(o=this.rules.inline.nolink.exec(r))){const c=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),d=i[c.toLowerCase()];if(!d){const p=o[0].charAt(0);return{type:"text",raw:p,text:p}}return f3(o,d,o[0],this.lexer,this.rules)}}emStrong(r,i,o=""){let c=this.rules.inline.emStrongLDelim.exec(r);if(!c||c[3]&&o.match(this.rules.other.unicodeAlphaNumeric))return;if(!(c[1]||c[2]||"")||!o||this.rules.inline.punctuation.exec(o)){const p=[...c[0]].length-1;let y,x,b=p,k=0;const O=c[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(O.lastIndex=0,i=i.slice(-1*r.length+p);(c=O.exec(i))!=null;){if(y=c[1]||c[2]||c[3]||c[4]||c[5]||c[6],!y)continue;if(x=[...y].length,c[3]||c[4]){b+=x;continue}else if((c[5]||c[6])&&p%3&&!((p+x)%3)){k+=x;continue}if(b-=x,b>0)continue;x=Math.min(x,x+b+k);const N=[...c[0]][0].length,Z=r.slice(0,p+c.index+N+x);if(Math.min(p,x)%2){const D=Z.slice(1,-1);return{type:"em",raw:Z,text:D,tokens:this.lexer.inlineTokens(D)}}const J=Z.slice(2,-2);return{type:"strong",raw:Z,text:J,tokens:this.lexer.inlineTokens(J)}}}}codespan(r){const i=this.rules.inline.code.exec(r);if(i){let o=i[2].replace(this.rules.other.newLineCharGlobal," ");const c=this.rules.other.nonSpaceChar.test(o),d=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return c&&d&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:i[0],text:o}}}br(r){const i=this.rules.inline.br.exec(r);if(i)return{type:"br",raw:i[0]}}del(r){const i=this.rules.inline.del.exec(r);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(r){const i=this.rules.inline.autolink.exec(r);if(i){let o,c;return i[2]==="@"?(o=i[1],c="mailto:"+o):(o=i[1],c=o),{type:"link",raw:i[0],text:o,href:c,tokens:[{type:"text",raw:o,text:o}]}}}url(r){var o;let i;if(i=this.rules.inline.url.exec(r)){let c,d;if(i[2]==="@")c=i[0],d="mailto:"+c;else{let p;do p=i[0],i[0]=((o=this.rules.inline._backpedal.exec(i[0]))==null?void 0:o[0])??"";while(p!==i[0]);c=i[0],i[1]==="www."?d="http://"+i[0]:d=i[0]}return{type:"link",raw:i[0],text:c,href:d,tokens:[{type:"text",raw:c,text:c}]}}}inlineText(r){const i=this.rules.inline.text.exec(r);if(i){const o=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:o}}}},vl=class qS{constructor(i){Bn(this,"tokens");Bn(this,"options");Bn(this,"state");Bn(this,"tokenizer");Bn(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||td,this.options.tokenizer=this.options.tokenizer||new J1,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const o={other:Va,block:Q1.normal,inline:Pg.normal};this.options.pedantic?(o.block=Q1.pedantic,o.inline=Pg.pedantic):this.options.gfm&&(o.block=Q1.gfm,this.options.breaks?o.inline=Pg.breaks:o.inline=Pg.gfm),this.tokenizer.rules=o}static get rules(){return{block:Q1,inline:Pg}}static lex(i,o){return new qS(o).lex(i)}static lexInline(i,o){return new qS(o).inlineTokens(i)}lex(i){i=i.replace(Va.carriageReturn,`
48
+ `),this.blockTokens(i,this.tokens);for(let o=0;o<this.inlineQueue.length;o++){const c=this.inlineQueue[o];this.inlineTokens(c.src,c.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,o=[],c=!1){var d,p,y;for(this.options.pedantic&&(i=i.replace(Va.tabCharGlobal," ").replace(Va.spaceLine,""));i;){let x;if((p=(d=this.options.extensions)==null?void 0:d.block)!=null&&p.some(k=>(x=k.call({lexer:this},i,o))?(i=i.substring(x.raw.length),o.push(x),!0):!1))continue;if(x=this.tokenizer.space(i)){i=i.substring(x.raw.length);const k=o.at(-1);x.raw.length===1&&k!==void 0?k.raw+=`
49
+ `:o.push(x);continue}if(x=this.tokenizer.code(i)){i=i.substring(x.raw.length);const k=o.at(-1);(k==null?void 0:k.type)==="paragraph"||(k==null?void 0:k.type)==="text"?(k.raw+=`
50
+ `+x.raw,k.text+=`
51
+ `+x.text,this.inlineQueue.at(-1).src=k.text):o.push(x);continue}if(x=this.tokenizer.fences(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.heading(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.hr(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.blockquote(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.list(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.html(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.def(i)){i=i.substring(x.raw.length);const k=o.at(-1);(k==null?void 0:k.type)==="paragraph"||(k==null?void 0:k.type)==="text"?(k.raw+=`
52
+ `+x.raw,k.text+=`
53
+ `+x.raw,this.inlineQueue.at(-1).src=k.text):this.tokens.links[x.tag]||(this.tokens.links[x.tag]={href:x.href,title:x.title});continue}if(x=this.tokenizer.table(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.lheading(i)){i=i.substring(x.raw.length),o.push(x);continue}let b=i;if((y=this.options.extensions)!=null&&y.startBlock){let k=1/0;const O=i.slice(1);let N;this.options.extensions.startBlock.forEach(Z=>{N=Z.call({lexer:this},O),typeof N=="number"&&N>=0&&(k=Math.min(k,N))}),k<1/0&&k>=0&&(b=i.substring(0,k+1))}if(this.state.top&&(x=this.tokenizer.paragraph(b))){const k=o.at(-1);c&&(k==null?void 0:k.type)==="paragraph"?(k.raw+=`
54
+ `+x.raw,k.text+=`
55
+ `+x.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):o.push(x),c=b.length!==i.length,i=i.substring(x.raw.length);continue}if(x=this.tokenizer.text(i)){i=i.substring(x.raw.length);const k=o.at(-1);(k==null?void 0:k.type)==="text"?(k.raw+=`
56
+ `+x.raw,k.text+=`
57
+ `+x.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):o.push(x);continue}if(i){const k="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw new Error(k)}}return this.state.top=!0,o}inline(i,o=[]){return this.inlineQueue.push({src:i,tokens:o}),o}inlineTokens(i,o=[]){var x,b,k;let c=i,d=null;if(this.tokens.links){const O=Object.keys(this.tokens.links);if(O.length>0)for(;(d=this.tokenizer.rules.inline.reflinkSearch.exec(c))!=null;)O.includes(d[0].slice(d[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(d=this.tokenizer.rules.inline.anyPunctuation.exec(c))!=null;)c=c.slice(0,d.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(d=this.tokenizer.rules.inline.blockSkip.exec(c))!=null;)c=c.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let p=!1,y="";for(;i;){p||(y=""),p=!1;let O;if((b=(x=this.options.extensions)==null?void 0:x.inline)!=null&&b.some(Z=>(O=Z.call({lexer:this},i,o))?(i=i.substring(O.raw.length),o.push(O),!0):!1))continue;if(O=this.tokenizer.escape(i)){i=i.substring(O.raw.length),o.push(O);continue}if(O=this.tokenizer.tag(i)){i=i.substring(O.raw.length),o.push(O);continue}if(O=this.tokenizer.link(i)){i=i.substring(O.raw.length),o.push(O);continue}if(O=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(O.raw.length);const Z=o.at(-1);O.type==="text"&&(Z==null?void 0:Z.type)==="text"?(Z.raw+=O.raw,Z.text+=O.text):o.push(O);continue}if(O=this.tokenizer.emStrong(i,c,y)){i=i.substring(O.raw.length),o.push(O);continue}if(O=this.tokenizer.codespan(i)){i=i.substring(O.raw.length),o.push(O);continue}if(O=this.tokenizer.br(i)){i=i.substring(O.raw.length),o.push(O);continue}if(O=this.tokenizer.del(i)){i=i.substring(O.raw.length),o.push(O);continue}if(O=this.tokenizer.autolink(i)){i=i.substring(O.raw.length),o.push(O);continue}if(!this.state.inLink&&(O=this.tokenizer.url(i))){i=i.substring(O.raw.length),o.push(O);continue}let N=i;if((k=this.options.extensions)!=null&&k.startInline){let Z=1/0;const J=i.slice(1);let D;this.options.extensions.startInline.forEach(F=>{D=F.call({lexer:this},J),typeof D=="number"&&D>=0&&(Z=Math.min(Z,D))}),Z<1/0&&Z>=0&&(N=i.substring(0,Z+1))}if(O=this.tokenizer.inlineText(N)){i=i.substring(O.raw.length),O.raw.slice(-1)!=="_"&&(y=O.raw.slice(-1)),p=!0;const Z=o.at(-1);(Z==null?void 0:Z.type)==="text"?(Z.raw+=O.raw,Z.text+=O.text):o.push(O);continue}if(i){const Z="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(Z);break}else throw new Error(Z)}}return o}},W1=class{constructor(r){Bn(this,"options");Bn(this,"parser");this.options=r||td}space(r){return""}code({text:r,lang:i,escaped:o}){var p;const c=(p=(i||"").match(Va.notSpaceStart))==null?void 0:p[0],d=r.replace(Va.endingNewline,"")+`
58
+ `;return c?'<pre><code class="language-'+ko(c)+'">'+(o?d:ko(d,!0))+`</code></pre>
59
+ `:"<pre><code>"+(o?d:ko(d,!0))+`</code></pre>
60
+ `}blockquote({tokens:r}){return`<blockquote>
61
+ ${this.parser.parse(r)}</blockquote>
62
+ `}html({text:r}){return r}heading({tokens:r,depth:i}){return`<h${i}>${this.parser.parseInline(r)}</h${i}>
63
+ `}hr(r){return`<hr>
64
+ `}list(r){const i=r.ordered,o=r.start;let c="";for(let y=0;y<r.items.length;y++){const x=r.items[y];c+=this.listitem(x)}const d=i?"ol":"ul",p=i&&o!==1?' start="'+o+'"':"";return"<"+d+p+`>
65
+ `+c+"</"+d+`>
66
+ `}listitem(r){var o;let i="";if(r.task){const c=this.checkbox({checked:!!r.checked});r.loose?((o=r.tokens[0])==null?void 0:o.type)==="paragraph"?(r.tokens[0].text=c+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=c+" "+ko(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:c+" ",text:c+" ",escaped:!0}):i+=c+" "}return i+=this.parser.parse(r.tokens,!!r.loose),`<li>${i}</li>
67
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
68
+ `}table(r){let i="",o="";for(let d=0;d<r.header.length;d++)o+=this.tablecell(r.header[d]);i+=this.tablerow({text:o});let c="";for(let d=0;d<r.rows.length;d++){const p=r.rows[d];o="";for(let y=0;y<p.length;y++)o+=this.tablecell(p[y]);c+=this.tablerow({text:o})}return c&&(c=`<tbody>${c}</tbody>`),`<table>
69
+ <thead>
70
+ `+i+`</thead>
71
+ `+c+`</table>
72
+ `}tablerow({text:r}){return`<tr>
73
+ ${r}</tr>
74
+ `}tablecell(r){const i=this.parser.parseInline(r.tokens),o=r.header?"th":"td";return(r.align?`<${o} align="${r.align}">`:`<${o}>`)+i+`</${o}>
75
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${ko(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:i,tokens:o}){const c=this.parser.parseInline(o),d=d3(r);if(d===null)return c;r=d;let p='<a href="'+r+'"';return i&&(p+=' title="'+ko(i)+'"'),p+=">"+c+"</a>",p}image({href:r,title:i,text:o,tokens:c}){c&&(o=this.parser.parseInline(c,this.parser.textRenderer));const d=d3(r);if(d===null)return ko(o);r=d;let p=`<img src="${r}" alt="${o}"`;return i&&(p+=` title="${ko(i)}"`),p+=">",p}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:ko(r.text)}},Zb=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},bl=class GS{constructor(i){Bn(this,"options");Bn(this,"renderer");Bn(this,"textRenderer");this.options=i||td,this.options.renderer=this.options.renderer||new W1,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Zb}static parse(i,o){return new GS(o).parse(i)}static parseInline(i,o){return new GS(o).parseInline(i)}parse(i,o=!0){var d,p;let c="";for(let y=0;y<i.length;y++){const x=i[y];if((p=(d=this.options.extensions)==null?void 0:d.renderers)!=null&&p[x.type]){const k=x,O=this.options.extensions.renderers[k.type].call({parser:this},k);if(O!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(k.type)){c+=O||"";continue}}const b=x;switch(b.type){case"space":{c+=this.renderer.space(b);continue}case"hr":{c+=this.renderer.hr(b);continue}case"heading":{c+=this.renderer.heading(b);continue}case"code":{c+=this.renderer.code(b);continue}case"table":{c+=this.renderer.table(b);continue}case"blockquote":{c+=this.renderer.blockquote(b);continue}case"list":{c+=this.renderer.list(b);continue}case"html":{c+=this.renderer.html(b);continue}case"paragraph":{c+=this.renderer.paragraph(b);continue}case"text":{let k=b,O=this.renderer.text(k);for(;y+1<i.length&&i[y+1].type==="text";)k=i[++y],O+=`
76
+ `+this.renderer.text(k);o?c+=this.renderer.paragraph({type:"paragraph",raw:O,text:O,tokens:[{type:"text",raw:O,text:O,escaped:!0}]}):c+=O;continue}default:{const k='Token with "'+b.type+'" type was not found.';if(this.options.silent)return console.error(k),"";throw new Error(k)}}}return c}parseInline(i,o=this.renderer){var d,p;let c="";for(let y=0;y<i.length;y++){const x=i[y];if((p=(d=this.options.extensions)==null?void 0:d.renderers)!=null&&p[x.type]){const k=this.options.extensions.renderers[x.type].call({parser:this},x);if(k!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(x.type)){c+=k||"";continue}}const b=x;switch(b.type){case"escape":{c+=o.text(b);break}case"html":{c+=o.html(b);break}case"link":{c+=o.link(b);break}case"image":{c+=o.image(b);break}case"strong":{c+=o.strong(b);break}case"em":{c+=o.em(b);break}case"codespan":{c+=o.codespan(b);break}case"br":{c+=o.br(b);break}case"del":{c+=o.del(b);break}case"text":{c+=o.text(b);break}default:{const k='Token with "'+b.type+'" type was not found.';if(this.options.silent)return console.error(k),"";throw new Error(k)}}}return c}},K1=(Mx=class{constructor(r){Bn(this,"options");Bn(this,"block");this.options=r||td}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}provideLexer(){return this.block?vl.lex:vl.lexInline}provideParser(){return this.block?bl.parse:bl.parseInline}},Bn(Mx,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Mx),fT=class{constructor(...r){Bn(this,"defaults",Pb());Bn(this,"options",this.setOptions);Bn(this,"parse",this.parseMarkdown(!0));Bn(this,"parseInline",this.parseMarkdown(!1));Bn(this,"Parser",bl);Bn(this,"Renderer",W1);Bn(this,"TextRenderer",Zb);Bn(this,"Lexer",vl);Bn(this,"Tokenizer",J1);Bn(this,"Hooks",K1);this.use(...r)}walkTokens(r,i){var c,d;let o=[];for(const p of r)switch(o=o.concat(i.call(this,p)),p.type){case"table":{const y=p;for(const x of y.header)o=o.concat(this.walkTokens(x.tokens,i));for(const x of y.rows)for(const b of x)o=o.concat(this.walkTokens(b.tokens,i));break}case"list":{const y=p;o=o.concat(this.walkTokens(y.items,i));break}default:{const y=p;(d=(c=this.defaults.extensions)==null?void 0:c.childTokens)!=null&&d[y.type]?this.defaults.extensions.childTokens[y.type].forEach(x=>{const b=y[x].flat(1/0);o=o.concat(this.walkTokens(b,i))}):y.tokens&&(o=o.concat(this.walkTokens(y.tokens,i)))}}return o}use(...r){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(o=>{const c={...o};if(c.async=this.defaults.async||c.async||!1,o.extensions&&(o.extensions.forEach(d=>{if(!d.name)throw new Error("extension name required");if("renderer"in d){const p=i.renderers[d.name];p?i.renderers[d.name]=function(...y){let x=d.renderer.apply(this,y);return x===!1&&(x=p.apply(this,y)),x}:i.renderers[d.name]=d.renderer}if("tokenizer"in d){if(!d.level||d.level!=="block"&&d.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const p=i[d.level];p?p.unshift(d.tokenizer):i[d.level]=[d.tokenizer],d.start&&(d.level==="block"?i.startBlock?i.startBlock.push(d.start):i.startBlock=[d.start]:d.level==="inline"&&(i.startInline?i.startInline.push(d.start):i.startInline=[d.start]))}"childTokens"in d&&d.childTokens&&(i.childTokens[d.name]=d.childTokens)}),c.extensions=i),o.renderer){const d=this.defaults.renderer||new W1(this.defaults);for(const p in o.renderer){if(!(p in d))throw new Error(`renderer '${p}' does not exist`);if(["options","parser"].includes(p))continue;const y=p,x=o.renderer[y],b=d[y];d[y]=(...k)=>{let O=x.apply(d,k);return O===!1&&(O=b.apply(d,k)),O||""}}c.renderer=d}if(o.tokenizer){const d=this.defaults.tokenizer||new J1(this.defaults);for(const p in o.tokenizer){if(!(p in d))throw new Error(`tokenizer '${p}' does not exist`);if(["options","rules","lexer"].includes(p))continue;const y=p,x=o.tokenizer[y],b=d[y];d[y]=(...k)=>{let O=x.apply(d,k);return O===!1&&(O=b.apply(d,k)),O}}c.tokenizer=d}if(o.hooks){const d=this.defaults.hooks||new K1;for(const p in o.hooks){if(!(p in d))throw new Error(`hook '${p}' does not exist`);if(["options","block"].includes(p))continue;const y=p,x=o.hooks[y],b=d[y];K1.passThroughHooks.has(p)?d[y]=k=>{if(this.defaults.async)return Promise.resolve(x.call(d,k)).then(N=>b.call(d,N));const O=x.call(d,k);return b.call(d,O)}:d[y]=(...k)=>{let O=x.apply(d,k);return O===!1&&(O=b.apply(d,k)),O}}c.hooks=d}if(o.walkTokens){const d=this.defaults.walkTokens,p=o.walkTokens;c.walkTokens=function(y){let x=[];return x.push(p.call(this,y)),d&&(x=x.concat(d.call(this,y))),x}}this.defaults={...this.defaults,...c}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,i){return vl.lex(r,i??this.defaults)}parser(r,i){return bl.parse(r,i??this.defaults)}parseMarkdown(r){return(o,c)=>{const d={...c},p={...this.defaults,...d},y=this.onError(!!p.silent,!!p.async);if(this.defaults.async===!0&&d.async===!1)return y(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return y(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return y(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));p.hooks&&(p.hooks.options=p,p.hooks.block=r);const x=p.hooks?p.hooks.provideLexer():r?vl.lex:vl.lexInline,b=p.hooks?p.hooks.provideParser():r?bl.parse:bl.parseInline;if(p.async)return Promise.resolve(p.hooks?p.hooks.preprocess(o):o).then(k=>x(k,p)).then(k=>p.hooks?p.hooks.processAllTokens(k):k).then(k=>p.walkTokens?Promise.all(this.walkTokens(k,p.walkTokens)).then(()=>k):k).then(k=>b(k,p)).then(k=>p.hooks?p.hooks.postprocess(k):k).catch(y);try{p.hooks&&(o=p.hooks.preprocess(o));let k=x(o,p);p.hooks&&(k=p.hooks.processAllTokens(k)),p.walkTokens&&this.walkTokens(k,p.walkTokens);let O=b(k,p);return p.hooks&&(O=p.hooks.postprocess(O)),O}catch(k){return y(k)}}}onError(r,i){return o=>{if(o.message+=`
77
+ Please report this to https://github.com/markedjs/marked.`,r){const c="<p>An error occurred:</p><pre>"+ko(o.message+"",!0)+"</pre>";return i?Promise.resolve(c):c}if(i)return Promise.reject(o);throw o}}},nd=new fT;function On(r,i){return nd.parse(r,i)}On.options=On.setOptions=function(r){return nd.setOptions(r),On.defaults=nd.defaults,WS(On.defaults),On},On.getDefaults=Pb,On.defaults=td,On.use=function(...r){return nd.use(...r),On.defaults=nd.defaults,WS(On.defaults),On},On.walkTokens=function(r,i){return nd.walkTokens(r,i)},On.parseInline=nd.parseInline,On.Parser=bl,On.parser=bl.parse,On.Renderer=W1,On.TextRenderer=Zb,On.Lexer=vl,On.lexer=vl.lex,On.Tokenizer=J1,On.Hooks=K1,On.parse=On,On.options,On.setOptions,On.use,On.walkTokens,On.parseInline,bl.parse,vl.lex;const pT=()=>W.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4993 16.6654C12.0391 16.6654 11.666 17.0385 11.666 17.4987C11.666 17.9589 12.0391 18.332 12.4993 18.332H17.4993C17.9596 18.332 18.3327 17.9589 18.3327 17.4987V12.4987C18.3327 12.0385 17.9596 11.6654 17.4993 11.6654C17.0391 11.6654 16.666 12.0385 16.666 12.4987V15.4869L12.2553 11.0761C11.9298 10.7507 11.4022 10.7507 11.0768 11.0761C10.7513 11.4015 10.7513 11.9292 11.0768 12.2546L15.4875 16.6654H12.4993ZM8.92194 8.92129C9.24737 8.59585 9.24737 8.06821 8.92194 7.74278L4.51119 3.33203H7.49935C7.95959 3.33203 8.33268 2.95893 8.33268 2.4987C8.33268 2.03846 7.95959 1.66537 7.49935 1.66537H2.49935C2.27834 1.66537 2.06637 1.75316 1.91009 1.90944C1.75381 2.06572 1.66602 2.27769 1.66602 2.4987L1.66602 7.4987C1.66602 7.95894 2.03911 8.33203 2.49935 8.33203C2.95959 8.33203 3.33268 7.95894 3.33268 7.4987L3.33268 4.51054L7.74343 8.92129C8.06886 9.24672 8.5965 9.24672 8.92194 8.92129Z",fill:"#525252"})}),gT=()=>W.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4993 16.6654C12.0391 16.6654 11.666 17.0385 11.666 17.4987C11.666 17.9589 12.0391 18.332 12.4993 18.332H17.4993C17.9596 18.332 18.3327 17.9589 18.3327 17.4987V12.4987C18.3327 12.0385 17.9596 11.6654 17.4993 11.6654C17.0391 11.6654 16.666 12.0385 16.666 12.4987V15.4869L12.2553 11.0761C11.9298 10.7507 11.4022 10.7507 11.0768 11.0761C10.7513 11.4015 10.7513 11.9292 11.0768 12.2546L15.4875 16.6654H12.4993ZM8.92194 8.92129C9.24737 8.59585 9.24737 8.06821 8.92194 7.74278L4.51119 3.33203H7.49935C7.95959 3.33203 8.33268 2.95893 8.33268 2.4987C8.33268 2.03846 7.95959 1.66537 7.49935 1.66537H2.49935C2.27834 1.66537 2.06637 1.75316 1.91009 1.90944C1.75381 2.06572 1.66602 2.27769 1.66602 2.4987L1.66602 7.4987C1.66602 7.95894 2.03911 8.33203 2.49935 8.33203C2.95959 8.33203 3.33268 7.95894 3.33268 7.4987L3.33268 4.51054L7.74343 8.92129C8.06886 9.24672 8.5965 9.24672 8.92194 8.92129Z",fill:"#525252"})}),mT=()=>W.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.99935 3.33464C6.31745 3.33464 3.33268 6.3194 3.33268 10.0013C3.33268 13.6832 6.31745 16.668 9.99935 16.668C13.1587 16.668 15.8047 14.4703 16.4922 11.5204L16.1718 11.8406C15.8463 12.166 15.3187 12.166 14.9933 11.8405C14.6679 11.515 14.668 10.9873 14.9935 10.662L16.6606 8.99529C16.8169 8.83904 17.0289 8.75127 17.2499 8.7513C17.4709 8.75133 17.6829 8.83916 17.8391 8.99547L19.5053 10.6621C19.8307 10.9876 19.8306 11.5153 19.5051 11.8406C19.1797 12.166 18.652 12.166 18.3266 11.8405L18.164 11.6778C17.3881 15.4766 14.0275 18.3346 9.99935 18.3346C5.39698 18.3346 1.66602 14.6037 1.66602 10.0013C1.66602 5.39893 5.39698 1.66797 9.99935 1.66797C13.0577 1.66797 15.7302 3.31596 17.1789 5.76837C17.413 6.16463 17.2815 6.67563 16.8853 6.90971C16.489 7.14379 15.978 7.01232 15.7439 6.61605C14.5827 4.65021 12.4442 3.33464 9.99935 3.33464ZM9.99935 5.0013C10.4596 5.0013 10.8327 5.3744 10.8327 5.83464V9.55532L12.9616 10.9746C13.3445 11.2299 13.448 11.7473 13.1927 12.1302C12.9374 12.5132 12.42 12.6166 12.0371 12.3613L9.5371 10.6947C9.30527 10.5401 9.16602 10.2799 9.16602 10.0013V5.83464C9.16602 5.3744 9.53911 5.0013 9.99935 5.0013Z",fill:"#525252"})}),p3=()=>W.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{d:"M15 5L5 15M5 5L15 15",stroke:"#454545",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),yT=()=>W.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.49922 5.5C5.49922 3.567 7.06622 2 8.99922 2C10.9322 2 12.4992 3.567 12.4992 5.5V9.7C12.4992 11.633 10.9322 13.2 8.99922 13.2C7.06622 13.2 5.49922 11.633 5.49922 9.7V5.5ZM8.99922 3.4C7.83942 3.4 6.89922 4.3402 6.89922 5.5V9.7C6.89922 10.8598 7.83942 11.8 8.99922 11.8C10.159 11.8 11.0992 10.8598 11.0992 9.7V5.5C11.0992 4.3402 10.159 3.4 8.99922 3.4ZM3.39922 8.3C3.78582 8.3 4.09922 8.6134 4.09922 9V9.7C4.09922 12.4062 6.29302 14.6 8.99922 14.6C11.7054 14.6 13.8992 12.4062 13.8992 9.7V9C13.8992 8.6134 14.2126 8.3 14.5992 8.3C14.9858 8.3 15.2992 8.6134 15.2992 9V9.7C15.2992 13.1794 12.4786 16 8.99922 16C5.51983 16 2.69922 13.1794 2.69922 9.7V9C2.69922 8.6134 3.01262 8.3 3.39922 8.3Z",fill:"#5F5F5F"})}),vT=()=>W.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",fill:"none",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.52153 3.79548C8.7853 3.53171 9.21295 3.53171 9.47673 3.79548L14.2047 8.52348C14.4685 8.78725 14.4685 9.21491 14.2047 9.47868C13.941 9.74245 13.5133 9.74245 13.2495 9.47868L9.67455 5.90371V13.7291C9.67455 14.1021 9.37215 14.4045 8.99913 14.4045C8.6261 14.4045 8.3237 14.1021 8.3237 13.7291V5.90371L4.74873 9.47868C4.48496 9.74245 4.0573 9.74245 3.79353 9.47868C3.52976 9.21491 3.52976 8.78725 3.79353 8.52348L8.52153 3.79548Z",fill:"white"})}),bT=()=>W.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[W.jsx("path",{d:"M9 1.5L3 4.5V8.25C3 12.0375 5.5575 15.4275 9 16.5C12.4425 15.4275 15 12.0375 15 8.25V4.5L9 1.5Z",stroke:"#939393",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),W.jsx("path",{d:"M6.75 9L8.25 10.5L11.25 7.5",stroke:"#939393",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),xT=()=>W.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[W.jsx("path",{d:"M12.6667 2.66667H3.33333C2.59695 2.66667 2 3.26362 2 4V13.3333C2 14.0697 2.59695 14.6667 3.33333 14.6667H12.6667C13.403 14.6667 14 14.0697 14 13.3333V4C14 3.26362 13.403 2.66667 12.6667 2.66667Z",stroke:"#454545",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),W.jsx("path",{d:"M10.6667 1.33333V4M5.33333 1.33333V4M2 6.66667H14",stroke:"#454545",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]}),ey=()=>W.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",fill:"none",children:W.jsx("path",{d:"M6.00052 0.765625C6.00053 0.773142 6.00053 0.780651 6.00052 0.78815C6.0026 4.52913 7.05588 6.00052 11.2354 6.00052C7.05588 6.00052 6.0026 7.47192 6.00052 11.2129C5.99844 7.47192 4.94517 6.00052 0.765625 6.00052C4.94517 6.00052 5.99844 4.52913 6.00052 0.78815C6.00052 0.780651 6.00052 0.773142 6.00052 0.765625Z",fill:"white",stroke:"white","stroke-width":"1.04698","stroke-linejoin":"round"})}),g3=()=>W.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{d:"M18 6L6 18M6 6L18 18",stroke:"#868686",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),m3=()=>W.jsx("svg",{width:"14",height:"14",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5899 3.57611C10.9153 3.90155 10.9153 4.42918 10.5899 4.75462L6.17916 9.16536H15.834C16.2942 9.16536 16.6673 9.53846 16.6673 9.9987C16.6673 10.4589 16.2942 10.832 15.834 10.832H6.17916L10.5899 15.2428C10.9153 15.5682 10.9153 16.0958 10.5899 16.4213C10.2645 16.7467 9.73683 16.7467 9.4114 16.4213L3.57806 10.588C3.25263 10.2625 3.25263 9.73488 3.57806 9.40944L9.4114 3.57611C9.73683 3.25067 10.2645 3.25067 10.5899 3.57611Z",fill:"#525252"})}),Qb=()=>W.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[W.jsx("g",{"clip-path":"url(#clip0_9265_39109)",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.8281 1.49622C15.8439 0.480426 17.4908 0.480428 18.5066 1.49622C19.5224 2.51201 19.5224 4.15894 18.5066 5.17473L10.5376 13.1437C10.5211 13.1602 10.5048 13.1766 10.4886 13.1928C10.249 13.4328 10.0378 13.6444 9.78321 13.8004C9.55953 13.9375 9.31567 14.0385 9.06058 14.0997C8.7702 14.1694 8.47125 14.1692 8.13216 14.1689C8.10921 14.1688 8.08608 14.1688 8.06275 14.1688H6.6673C6.20706 14.1688 5.83396 13.7957 5.83396 13.3355V11.94C5.83396 11.9167 5.83394 11.8936 5.83392 11.8706C5.8336 11.5315 5.83333 11.2326 5.90304 10.9422C5.96428 10.6871 6.06529 10.4433 6.20236 10.2196C6.35839 9.96497 6.56999 9.75377 6.80998 9.51423C6.82622 9.49801 6.8426 9.48167 6.85909 9.46517L14.8281 1.49622ZM17.3281 2.67473C16.9631 2.30981 16.3715 2.30981 16.0066 2.67473L8.0376 10.6437C7.7213 10.96 7.66298 11.0259 7.62343 11.0904C7.57774 11.165 7.54407 11.2463 7.52365 11.3313C7.50599 11.4049 7.50063 11.4927 7.50063 11.94V12.5021H8.06275C8.51006 12.5021 8.5979 12.4968 8.6715 12.4791C8.75653 12.4587 8.83782 12.425 8.91238 12.3793C8.97691 12.3398 9.04281 12.2815 9.35911 11.9652L17.3281 3.99622C17.693 3.6313 17.693 3.03965 17.3281 2.67473ZM5.6329 2.50214L9.16732 2.50214C9.62756 2.50214 10.0007 2.87524 10.0007 3.33548C10.0007 3.79571 9.62756 4.16881 9.16732 4.16881H5.66732C4.9535 4.16881 4.46826 4.16946 4.09318 4.2001C3.72784 4.22995 3.541 4.28406 3.41067 4.35047C3.09706 4.51025 2.8421 4.76522 2.68231 5.07883C2.6159 5.20916 2.56179 5.396 2.53194 5.76134C2.5013 6.13642 2.50065 6.62166 2.50065 7.33548V14.3355C2.50065 15.0493 2.5013 15.5345 2.53194 15.9096C2.56179 16.275 2.6159 16.4618 2.68231 16.5921C2.8421 16.9057 3.09706 17.1607 3.41067 17.3205C3.541 17.3869 3.72784 17.441 4.09318 17.4708C4.46826 17.5015 4.9535 17.5021 5.66732 17.5021H12.6673C13.3811 17.5021 13.8664 17.5015 14.2415 17.4708C14.6068 17.441 14.7936 17.3869 14.924 17.3205C15.2376 17.1607 15.4925 16.9057 15.6523 16.5921C15.7187 16.4618 15.7728 16.275 15.8027 15.9096C15.8333 15.5345 15.834 15.0493 15.834 14.3355V10.8355C15.834 10.3752 16.2071 10.0021 16.6673 10.0021C17.1276 10.0021 17.5007 10.3752 17.5007 10.8355V14.3699C17.5007 15.0407 17.5007 15.5943 17.4638 16.0453C17.4256 16.5137 17.3434 16.9443 17.1373 17.3488C16.8178 17.976 16.3078 18.4859 15.6806 18.8055C15.2762 19.0116 14.8456 19.0937 14.3772 19.132C13.9262 19.1688 13.3726 19.1688 12.7018 19.1688H5.63288C4.96208 19.1688 4.40845 19.1688 3.95746 19.132C3.48905 19.0937 3.05846 19.0116 2.65402 18.8055C2.02681 18.4859 1.51687 17.976 1.1973 17.3488C0.991221 16.9443 0.909084 16.5137 0.870813 16.0453C0.833965 15.5943 0.833974 15.0407 0.833985 14.3699V7.30106C0.833974 6.63025 0.833965 6.07662 0.870813 5.62562C0.909084 5.15721 0.991221 4.72662 1.1973 4.32217C1.51687 3.69497 2.02681 3.18503 2.65402 2.86545C3.05846 2.65938 3.48905 2.57724 3.95746 2.53897C4.40846 2.50212 4.96209 2.50213 5.6329 2.50214Z",fill:"#525252"})}),W.jsx("defs",{children:W.jsx("clipPath",{id:"clip0_9265_39109",children:W.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),y3=()=>W.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.30056 0.832032H10.6981C11.1374 0.832017 11.5164 0.832004 11.8285 0.857507C12.158 0.884425 12.4857 0.943855 12.801 1.10452C13.2714 1.3442 13.6538 1.72665 13.8935 2.19706C14.0542 2.51237 14.1136 2.84005 14.1405 3.16951C14.1634 3.44932 14.1658 3.78284 14.166 4.16537H17.4993C17.9596 4.16537 18.3327 4.53846 18.3327 4.9987C18.3327 5.45894 17.9596 5.83203 17.4993 5.83203H16.666V14.3665C16.666 15.0373 16.666 15.5909 16.6292 16.0419C16.5909 16.5103 16.5088 16.9409 16.3027 17.3453C15.9831 17.9725 15.4732 18.4825 14.846 18.8021C14.4415 19.0081 14.011 19.0903 13.5425 19.1285C13.0915 19.1654 12.5379 19.1654 11.8671 19.1654H8.13158C7.46078 19.1654 6.90715 19.1654 6.45616 19.1285C5.98775 19.0903 5.55716 19.0081 5.15271 18.8021C4.52551 18.4825 4.01557 17.9725 3.69599 17.3453C3.48992 16.9409 3.40778 16.5103 3.36951 16.0419C3.33266 15.5909 3.33267 15.0373 3.33268 14.3664L3.33268 5.83203H2.49935C2.03911 5.83203 1.66602 5.45894 1.66602 4.9987C1.66602 4.53846 2.03911 4.16537 2.49935 4.16537H5.83271C5.83294 3.78284 5.83529 3.44932 5.85816 3.16951C5.88507 2.84006 5.9445 2.51237 6.10517 2.19706C6.34485 1.72665 6.7273 1.3442 7.19771 1.10452C7.51302 0.943855 7.8407 0.884425 8.17016 0.857507C8.4823 0.832004 8.86127 0.832017 9.30056 0.832032ZM4.99935 5.83203V14.332C4.99935 15.0458 5 15.5311 5.03064 15.9062C5.06049 16.2715 5.1146 16.4584 5.181 16.5887C5.34079 16.9023 5.59576 17.1573 5.90936 17.317C6.0397 17.3835 6.22653 17.4376 6.59188 17.4674C6.96696 17.4981 7.4522 17.4987 8.16602 17.4987H11.8327C12.5465 17.4987 13.0317 17.4981 13.4068 17.4674C13.7722 17.4376 13.959 17.3835 14.0893 17.317C14.4029 17.1573 14.6579 16.9023 14.8177 16.5887C14.8841 16.4584 14.9382 16.2715 14.9681 15.9062C14.9987 15.5311 14.9993 15.0458 14.9993 14.332V5.83203H4.99935ZM12.4993 4.16537H7.49941C7.49978 3.77778 7.50232 3.51285 7.51929 3.30523C7.53778 3.07884 7.56918 2.99491 7.59018 2.95371C7.67007 2.79691 7.79756 2.66942 7.95436 2.58953C7.99556 2.56853 8.07949 2.53714 8.30588 2.51864C8.54199 2.49935 8.85222 2.4987 9.33268 2.4987H10.666C11.1465 2.4987 11.4567 2.49935 11.6928 2.51864C11.9192 2.53714 12.0031 2.56853 12.0443 2.58953C12.2011 2.66942 12.3286 2.79691 12.4085 2.95371C12.4295 2.99491 12.4609 3.07884 12.4794 3.30523C12.4964 3.51285 12.4989 3.77778 12.4993 4.16537ZM8.33268 8.7487C8.79292 8.7487 9.16602 9.12179 9.16602 9.58203V13.7487C9.16602 14.2089 8.79292 14.582 8.33268 14.582C7.87245 14.582 7.49935 14.2089 7.49935 13.7487V9.58203C7.49935 9.12179 7.87245 8.7487 8.33268 8.7487ZM11.666 8.7487C12.1263 8.7487 12.4993 9.12179 12.4993 9.58203V13.7487C12.4993 14.2089 12.1263 14.582 11.666 14.582C11.2058 14.582 10.8327 14.2089 10.8327 13.7487V9.58203C10.8327 9.12179 11.2058 8.7487 11.666 8.7487Z",fill:"#525252"})}),v3=()=>W.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.27859 1.43945H10.9337C11.4703 1.43944 11.9132 1.43944 12.274 1.46892C12.6487 1.49953 12.9932 1.56524 13.3168 1.7301C13.8185 1.98577 14.2265 2.39371 14.4821 2.89548C14.647 3.21904 14.7127 3.5635 14.7433 3.93824C14.7728 4.29903 14.7728 4.74193 14.7728 5.27857V10.9337C14.7728 11.4703 14.7728 11.9132 14.7433 12.274C14.7127 12.6487 14.647 12.9932 14.4821 13.3168C14.2265 13.8185 13.8185 14.2265 13.3168 14.4821C12.9932 14.647 12.6487 14.7127 12.274 14.7433C11.9132 14.7728 11.4703 14.7728 10.9337 14.7728H5.27857C4.74193 14.7728 4.29903 14.7728 3.93824 14.7433C3.5635 14.7127 3.21904 14.647 2.89548 14.4821C2.39371 14.2265 1.98577 13.8185 1.7301 13.3168C1.56524 12.9932 1.49953 12.6487 1.46892 12.274C1.43944 11.9132 1.43944 11.4703 1.43945 10.9337V5.27859C1.43944 4.74194 1.43944 4.29903 1.46892 3.93824C1.49953 3.5635 1.56524 3.21904 1.7301 2.89548C1.98577 2.39371 2.39371 1.98577 2.89548 1.7301C3.21904 1.56524 3.56351 1.49953 3.93824 1.46892C4.29903 1.43944 4.74194 1.43944 5.27859 1.43945ZM4.04681 2.79782C3.75454 2.8217 3.60507 2.86499 3.5008 2.91811C3.24992 3.04594 3.04594 3.24992 2.91811 3.5008C2.86499 3.60507 2.8217 3.75454 2.79782 4.04681C2.77331 4.34687 2.77279 4.73507 2.77279 5.30612V10.9061C2.77279 11.4772 2.77331 11.8654 2.79782 12.1654C2.8217 12.4577 2.86499 12.6072 2.91811 12.7114C3.04594 12.9623 3.24992 13.1663 3.5008 13.2941C3.60507 13.3473 3.75454 13.3905 4.04681 13.4144C4.34687 13.4389 4.73507 13.4395 5.30612 13.4395H10.9061C11.4772 13.4395 11.8654 13.4389 12.1654 13.4144C12.4577 13.3905 12.6072 13.3473 12.7114 13.2941C12.9623 13.1663 13.1663 12.9623 13.2941 12.7114C13.3473 12.6072 13.3905 12.4577 13.4144 12.1654C13.4389 11.8654 13.4395 11.4772 13.4395 10.9061V5.30612C13.4395 4.73507 13.4389 4.34687 13.4144 4.04681C13.3905 3.75454 13.3473 3.60507 13.2941 3.5008C13.1663 3.24992 12.9623 3.04594 12.7114 2.91811C12.6072 2.86499 12.4577 2.8217 12.1654 2.79782C11.8654 2.77331 11.4772 2.77279 10.9061 2.77279H5.30612C4.73507 2.77279 4.34687 2.77331 4.04681 2.79782Z",fill:"white"})}),ST=()=>W.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.2426 4.75736C10.8995 2.41421 7.10051 2.41421 4.75736 4.75736C3.92636 5.58835 3.39104 6.60043 3.14928 7.66595C3.05763 8.0699 2.65587 8.32306 2.25192 8.23141C1.84797 8.13976 1.59481 7.73799 1.68646 7.33405C1.989 6.00065 2.65978 4.73362 3.6967 3.6967C6.62563 0.767767 11.3744 0.767767 14.3033 3.6967C14.9018 4.29519 15.3752 4.79632 15.75 5.21519V3C15.75 2.58579 16.0858 2.25 16.5 2.25C16.9142 2.25 17.25 2.58579 17.25 3V7.5C17.25 7.91421 16.9142 8.25 16.5 8.25H12C11.5858 8.25 11.25 7.91421 11.25 7.5C11.25 7.08579 11.5858 6.75 12 6.75H15.0943C14.7103 6.2873 14.1264 5.64114 13.2426 4.75736ZM15.7481 9.76859C16.152 9.86024 16.4052 10.262 16.3135 10.666C16.011 11.9994 15.3402 13.2664 14.3033 14.3033C11.3744 17.2322 6.62563 17.2322 3.6967 14.3033C3.09821 13.7048 2.62481 13.2037 2.25 12.7848V15C2.25 15.4142 1.91421 15.75 1.5 15.75C1.08579 15.75 0.75 15.4142 0.75 15V10.5C0.75 10.0858 1.08579 9.75 1.5 9.75H6C6.41421 9.75 6.75 10.0858 6.75 10.5C6.75 10.9142 6.41421 11.25 6 11.25H2.90572C3.2897 11.7127 3.87358 12.3589 4.75736 13.2426C7.10051 15.5858 10.8995 15.5858 13.2426 13.2426C14.0736 12.4116 14.609 11.3996 14.8507 10.334C14.9424 9.9301 15.3441 9.67694 15.7481 9.76859Z",fill:"#5F5F5F"})}),wT=()=>W.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.40193 1.56149C7.62125 1.06802 8.11061 0.75 8.65062 0.75C10.0862 0.75 11.25 1.91378 11.25 3.34938V6H13.8774C15.716 6 17.1221 7.6389 16.8425 9.45617L16.0348 14.7062C15.8096 16.1697 14.5504 17.25 13.0697 17.25H3C1.75736 17.25 0.75 16.2426 0.75 15V9.75C0.75 8.50736 1.75736 7.5 3 7.5H4.76259L7.40193 1.56149ZM6 15.75H13.0697C13.81 15.75 14.4397 15.2098 14.5522 14.4781L15.3599 9.22809C15.4997 8.31945 14.7967 7.5 13.8774 7.5H11.25C10.4216 7.5 9.75 6.82843 9.75 6V3.34938C9.75 2.77092 9.30325 2.29681 8.73595 2.25326L6.13331 8.10921C6.09578 8.19366 6.05103 8.27344 6 8.34794V15.75ZM4.5 9V15.75H3C2.58579 15.75 2.25 15.4142 2.25 15V9.75C2.25 9.33579 2.58579 9 3 9H4.5Z",fill:"#5F5F5F"})}),CT=()=>W.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:W.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5981 16.4385C10.3788 16.932 9.88939 17.25 9.34938 17.25C7.91378 17.25 6.75 16.0862 6.75 14.6506V12H4.12263C2.28395 12 0.877912 10.3611 1.15747 8.54383L1.96517 3.29383C2.1904 1.83034 3.44958 0.75 4.93026 0.75H15C16.2426 0.75 17.25 1.75736 17.25 3V8.25C17.25 9.49264 16.2426 10.5 15 10.5H13.2374L10.5981 16.4385ZM12 2.25H4.93026C4.19001 2.25 3.56033 2.79019 3.44781 3.52188L2.64011 8.77191C2.50032 9.68055 3.20327 10.5 4.12263 10.5H6.75C7.57843 10.5 8.25 11.1716 8.25 12V14.6506C8.25 15.2291 8.69675 15.7032 9.26405 15.7467L11.8667 9.89079C11.9042 9.80634 11.949 9.72656 12 9.65206V2.25ZM13.5 9V2.25H15C15.4142 2.25 15.75 2.58579 15.75 3V8.25C15.75 8.66421 15.4142 9 15 9H13.5Z",fill:"#5F5F5F"})}),TT=()=>W.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[W.jsxs("g",{"clip-path":"url(#clip0_3131_12441)",children:[W.jsx("path",{d:"M13.5943 12.9714C13.4442 13.9471 12.6047 14.6673 11.6175 14.6673H2.66671C1.93033 14.6673 1.33337 14.0704 1.33337 13.334V8.66732C1.33337 7.93094 1.93033 7.33398 2.66671 7.33398H4.23346C4.49692 7.33398 4.73567 7.17883 4.84267 6.93808L7.18875 1.6594C7.27669 1.46151 7.47293 1.33398 7.68948 1.33398C8.59738 1.33398 9.33337 2.06998 9.33337 2.97788V5.33398C9.33337 5.70217 9.63185 6.00065 10 6.00065H12.3355C13.5613 6.00065 14.4986 7.09325 14.3122 8.30477L13.5943 12.9714Z",fill:"#ADADAD"}),W.jsx("path",{d:"M4.66671 14.6673V7.33398M1.33337 8.66732V13.334C1.33337 14.0704 1.93033 14.6673 2.66671 14.6673H11.6175C12.6047 14.6673 13.4442 13.9471 13.5943 12.9714L14.3122 8.30477C14.4986 7.09325 13.5613 6.00065 12.3355 6.00065H10C9.63185 6.00065 9.33337 5.70217 9.33337 5.33398V2.97788C9.33337 2.06998 8.59738 1.33398 7.68948 1.33398C7.47293 1.33398 7.27669 1.46151 7.18875 1.6594L4.84267 6.93808C4.73567 7.17883 4.49692 7.33398 4.23346 7.33398H2.66671C1.93033 7.33398 1.33337 7.93094 1.33337 8.66732Z",stroke:"#6C6C6C","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})]}),W.jsx("defs",{children:W.jsx("clipPath",{id:"clip0_3131_12441",children:W.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),kT=()=>W.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[W.jsx("path",{d:"M2.24929 4.0474C2.39745 3.08441 2.47152 2.60291 2.70757 2.24113C2.91561 1.92227 3.21034 1.66941 3.55713 1.51227C3.9506 1.33398 4.43776 1.33398 5.41208 1.33398H12.5334C13.2801 1.33398 13.6535 1.33398 13.9387 1.47931C14.1896 1.60714 14.3936 1.81111 14.5214 2.062C14.6667 2.34721 14.6667 2.72058 14.6667 3.46732V6.53398C14.6667 7.28072 14.6667 7.65409 14.5214 7.93931C14.3936 8.19019 14.1896 8.39416 13.9387 8.52199C13.6535 8.66732 13.2801 8.66732 12.5334 8.66732H12.0266C11.7757 8.66732 11.6502 8.66732 11.5407 8.70678C11.4439 8.74165 11.3565 8.79847 11.2853 8.87278C11.2047 8.95684 11.1538 9.07148 11.0519 9.30077L8.81137 14.3419C8.72342 14.5398 8.52718 14.6673 8.31064 14.6673C7.40274 14.6673 6.66674 13.9313 6.66674 13.0234V11.0673C6.66674 10.6939 6.66674 10.5073 6.59408 10.3647C6.53016 10.2392 6.42818 10.1372 6.30274 10.0733C6.16013 10.0007 5.97344 10.0007 5.60008 10.0007H5.06337C3.7783 10.0007 3.13576 10.0007 2.67602 9.73923C2.27251 9.50978 1.96137 9.14711 1.79595 8.7134C1.60747 8.21926 1.70517 7.58419 1.90058 6.31407L2.24929 4.0474Z",fill:"#ADADAD"}),W.jsx("path",{d:"M11.3334 1.33398V8.66732M14.6667 6.53398V3.46732C14.6667 2.72058 14.6667 2.34721 14.5214 2.062C14.3936 1.81111 14.1896 1.60714 13.9387 1.47931C13.6535 1.33398 13.2801 1.33398 12.5334 1.33398H5.41208C4.43776 1.33398 3.9506 1.33398 3.55713 1.51227C3.21034 1.66941 2.91561 1.92227 2.70757 2.24113C2.47152 2.60291 2.39745 3.08441 2.24929 4.0474L1.90058 6.31407C1.70517 7.58419 1.60747 8.21926 1.79595 8.7134C1.96137 9.14711 2.27251 9.50978 2.67602 9.73923C3.13576 10.0007 3.7783 10.0007 5.06337 10.0007H5.60008C5.97344 10.0007 6.16013 10.0007 6.30274 10.0733C6.42818 10.1372 6.53016 10.2392 6.59408 10.3647C6.66674 10.5073 6.66674 10.6939 6.66674 11.0673V13.0234C6.66674 13.9313 7.40274 14.6673 8.31064 14.6673C8.52718 14.6673 8.72342 14.5398 8.81137 14.3419L11.0519 9.30077C11.1538 9.07148 11.2047 8.95684 11.2853 8.87278C11.3565 8.79847 11.4439 8.74165 11.5407 8.70678C11.6502 8.66732 11.7757 8.66732 12.0266 8.66732H12.5334C13.2801 8.66732 13.6535 8.66732 13.9387 8.52199C14.1896 8.39416 14.3936 8.19019 14.5214 7.93931C14.6667 7.65409 14.6667 7.28072 14.6667 6.53398Z",stroke:"#6C6C6C","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})]}),b3=()=>W.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsx("path",{d:"M10 12.0005C8.54614 10.9492 7.2424 9.71853 6.12189 8.34057C5.95937 8.14071 5.95937 7.86027 6.12189 7.66041C7.2424 6.28245 8.54614 5.05183 10 4.00049",stroke:"#383838","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})}),MT=({text:r,onUpdate:i,onTypingComplete:o})=>{const[c,d]=Pe.useState(""),p=Pe.useRef(null),y=b=>{const Z=b.trim().split(/\s+/).length/700*60*1e3,J=b.length,D=Z/J;return Math.max(5,Math.min(50,D))};Pe.useEffect(()=>{i&&i()},[c,i]),Pe.useEffect(()=>{let b=0;const k=y(r),O=setInterval(()=>{d(r.substring(0,b+1)),b++,b===r.length&&(clearInterval(O),o&&o())},k);return()=>clearInterval(O)},[r,o]);const x=b=>{let k=On.parse(b);return k=k.replace(/<table>/g,'<div class="genius-dashboard-table-wrapper"><table>').replace(/<\/table>/g,"</table></div>"),k=k.replace(/<a\s+href=/g,'<a target="_blank" rel="noopener noreferrer" href='),{__html:k}};return W.jsx("div",{ref:p,dangerouslySetInnerHTML:x(c)})};var ty={exports:{}},AT=ty.exports,x3;function ET(){return x3||(x3=1,function(r){(function(i,o){r.exports?(o.default=o,r.exports=i&&i.document?o(i):o):(i.Highcharts&&i.Highcharts.error(16,!0),i.Highcharts=o(i))})(typeof window<"u"?window:AT,function(i){var o={};function c(d,p,y,x){!d.hasOwnProperty(p)&&(d[p]=x.apply(null,y),i&&typeof CustomEvent=="function"&&i.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:p,module:d[p]}})))}return c(o,"Core/Globals.js",[],function(){var d,p;return(p=d||(d={})).SVG_NS="http://www.w3.org/2000/svg",p.product="Highcharts",p.version="11.4.8",p.win=i!==void 0?i:{},p.doc=p.win.document,p.svg=p.doc&&p.doc.createElementNS&&!!p.doc.createElementNS(p.SVG_NS,"svg").createSVGRect,p.userAgent=p.win.navigator&&p.win.navigator.userAgent||"",p.isChrome=p.win.chrome,p.isFirefox=p.userAgent.indexOf("Firefox")!==-1,p.isMS=/(edge|msie|trident)/i.test(p.userAgent)&&!p.win.opera,p.isSafari=!p.isChrome&&p.userAgent.indexOf("Safari")!==-1,p.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(p.userAgent),p.isWebKit=p.userAgent.indexOf("AppleWebKit")!==-1,p.deg2rad=2*Math.PI/360,p.hasBidiBug=p.isFirefox&&4>parseInt(p.userAgent.split("Firefox/")[1],10),p.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],p.noop=function(){},p.supportsPassiveEvents=function(){let y=!1;if(!p.isMS){let x=Object.defineProperty({},"passive",{get:function(){y=!0}});p.win.addEventListener&&p.win.removeEventListener&&(p.win.addEventListener("testPassive",p.noop,x),p.win.removeEventListener("testPassive",p.noop,x))}return y}(),p.charts=[],p.composed=[],p.dateFormats={},p.seriesTypes={},p.symbolSizes={},p.chartCount=0,d}),c(o,"Core/Utilities.js",[o["Core/Globals.js"]],function(d){let p,{charts:y,doc:x,win:b}=d;function k(A,S,T,E){let P=S?"Highcharts error":"Highcharts warning";A===32&&(A=`${P}: Deprecated member`);let te=ae(A),_=te?`${P} #${A}: www.highcharts.com/errors/${A}/`:A.toString();if(E!==void 0){let re="";te&&(_+="?"),K(E,function(me,g){re+=`
78
+ - ${g}: ${me}`,te&&(_+=encodeURI(g)+"="+encodeURI(me))}),_+=re}X(d,"displayError",{chart:T,code:A,message:_,params:E},function(){if(S)throw Error(_);b.console&&k.messages.indexOf(_)===-1&&console.warn(_)}),k.messages.push(_)}function O(A,S){return parseInt(A,S||10)}function N(A){return typeof A=="string"}function Z(A){let S=Object.prototype.toString.call(A);return S==="[object Array]"||S==="[object Array Iterator]"}function J(A,S){return!!A&&typeof A=="object"&&(!S||!Z(A))}function D(A){return J(A)&&typeof A.nodeType=="number"}function F(A){let S=A&&A.constructor;return!!(J(A,!0)&&!D(A)&&S&&S.name&&S.name!=="Object")}function ae(A){return typeof A=="number"&&!isNaN(A)&&A<1/0&&A>-1/0}function ee(A){return A!=null}function B(A,S,T){let E,P=N(S)&&!ee(T),te=(_,re)=>{ee(_)?A.setAttribute(re,_):P?(E=A.getAttribute(re))||re!=="class"||(E=A.getAttribute(re+"Name")):A.removeAttribute(re)};return N(S)?te(T,S):K(S,te),E}function Y(A){return Z(A)?A:[A]}function $(A,S){let T;for(T in A||(A={}),S)A[T]=S[T];return A}function Q(){let A=arguments,S=A.length;for(let T=0;T<S;T++){let E=A[T];if(E!=null)return E}}function z(A,S){$(A.style,S)}function V(A){return Math.pow(10,Math.floor(Math.log(A)/Math.LN10))}function le(A,S){return A>1e14?A:parseFloat(A.toPrecision(S||14))}(k||(k={})).messages=[],Math.easeInOutSine=function(A){return-.5*(Math.cos(Math.PI*A)-1)};let se=Array.prototype.find?function(A,S){return A.find(S)}:function(A,S){let T,E=A.length;for(T=0;T<E;T++)if(S(A[T],T))return A[T]};function K(A,S,T){for(let E in A)Object.hasOwnProperty.call(A,E)&&S.call(T||A[E],A[E],E,A)}function L(A,S,T){function E(_,re){let me=A.removeEventListener;me&&me.call(A,_,re,!1)}function P(_){let re,me;A.nodeName&&(S?(re={})[S]=!0:re=_,K(re,function(g,w){if(_[w])for(me=_[w].length;me--;)E(w,_[w][me].fn)}))}let te=typeof A=="function"&&A.prototype||A;if(Object.hasOwnProperty.call(te,"hcEvents")){let _=te.hcEvents;if(S){let re=_[S]||[];T?(_[S]=re.filter(function(me){return T!==me.fn}),E(S,T)):(P(_),_[S]=[])}else P(_),delete te.hcEvents}}function X(A,S,T,E){if(T=T||{},x.createEvent&&(A.dispatchEvent||A.fireEvent&&A!==d)){let P=x.createEvent("Events");P.initEvent(S,!0,!0),T=$(P,T),A.dispatchEvent?A.dispatchEvent(T):A.fireEvent(S,T)}else if(A.hcEvents){T.target||$(T,{preventDefault:function(){T.defaultPrevented=!0},target:A,type:S});let P=[],te=A,_=!1;for(;te.hcEvents;)Object.hasOwnProperty.call(te,"hcEvents")&&te.hcEvents[S]&&(P.length&&(_=!0),P.unshift.apply(P,te.hcEvents[S])),te=Object.getPrototypeOf(te);_&&P.sort((re,me)=>re.order-me.order),P.forEach(re=>{re.fn.call(A,T)===!1&&T.preventDefault()})}E&&!T.defaultPrevented&&E.call(A,T)}K({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(A,S){d[S]=function(T){return k(32,!1,void 0,{[`Highcharts.${S}`]:`use Array.${A}`}),Array.prototype[A].apply(T,[].slice.call(arguments,1))}});let H=function(){let A=Math.random().toString(36).substring(2,9)+"-",S=0;return function(){return"highcharts-"+(p?"":A)+S++}}();return b.jQuery&&(b.jQuery.fn.highcharts=function(){let A=[].slice.call(arguments);if(this[0])return A[0]?(new d[N(A[0])?A.shift():"Chart"](this[0],A[0],A[1]),this):y[B(this[0],"data-highcharts-chart")]}),{addEvent:function(A,S,T,E={}){let P=typeof A=="function"&&A.prototype||A;Object.hasOwnProperty.call(P,"hcEvents")||(P.hcEvents={});let te=P.hcEvents;d.Point&&A instanceof d.Point&&A.series&&A.series.chart&&(A.series.chart.runTrackerClick=!0);let _=A.addEventListener;_&&_.call(A,S,T,!!d.supportsPassiveEvents&&{passive:E.passive===void 0?S.indexOf("touch")!==-1:E.passive,capture:!1}),te[S]||(te[S]=[]);let re={fn:T,order:typeof E.order=="number"?E.order:1/0};return te[S].push(re),te[S].sort((me,g)=>me.order-g.order),function(){L(A,S,T)}},arrayMax:function(A){let S=A.length,T=A[0];for(;S--;)A[S]>T&&(T=A[S]);return T},arrayMin:function(A){let S=A.length,T=A[0];for(;S--;)A[S]<T&&(T=A[S]);return T},attr:B,clamp:function(A,S,T){return A>S?A<T?A:T:S},clearTimeout:function(A){ee(A)&&clearTimeout(A)},correctFloat:le,createElement:function(A,S,T,E,P){let te=x.createElement(A);return S&&$(te,S),P&&z(te,{padding:"0",border:"none",margin:"0"}),T&&z(te,T),E&&E.appendChild(te),te},crisp:(A,S=0,T)=>{let E=S%2/2,P=T?-1:1;return(Math.round(A*P-E)+E)*P},css:z,defined:ee,destroyObjectProperties:function(A,S,T){K(A,function(E,P){E!==S&&(E!=null&&E.destroy)&&E.destroy(),(E!=null&&E.destroy||!T)&&delete A[P]})},diffObjects:function(A,S,T,E){let P={};return function te(_,re,me,g){let w=T?re:_;K(_,function(C,q){if(!g&&E&&E.indexOf(q)>-1&&re[q]){C=Y(C),me[q]=[];for(let ce=0;ce<Math.max(C.length,re[q].length);ce++)re[q][ce]&&(C[ce]===void 0?me[q][ce]=re[q][ce]:(me[q][ce]={},te(C[ce],re[q][ce],me[q][ce],g+1)))}else J(C,!0)&&!C.nodeType?(me[q]=Z(C)?[]:{},te(C,re[q]||{},me[q],g+1),Object.keys(me[q]).length!==0||q==="colorAxis"&&g===0||delete me[q]):(_[q]!==re[q]||q in _&&!(q in re))&&q!=="__proto__"&&q!=="constructor"&&(me[q]=w[q])})}(A,S,P,0),P},discardElement:function(A){A&&A.parentElement&&A.parentElement.removeChild(A)},erase:function(A,S){let T=A.length;for(;T--;)if(A[T]===S){A.splice(T,1);break}},error:k,extend:$,extendClass:function(A,S){let T=function(){};return T.prototype=new A,$(T.prototype,S),T},find:se,fireEvent:X,getClosestDistance:function(A,S){let T,E,P,te=!S;return A.forEach(_=>{if(_.length>1)for(P=_.length-1;P>0;P--)(E=_[P]-_[P-1])<0&&!te?(S==null||S(),S=void 0):E&&(T===void 0||E<T)&&(T=E)}),T},getMagnitude:V,getNestedProperty:function(A,S){let T=A.split(".");for(;T.length&&ee(S);){let E=T.shift();if(E===void 0||E==="__proto__")return;if(E==="this"){let te;return J(S)&&(te=S["@this"]),te??S}let P=S[E];if(!ee(P)||typeof P=="function"||typeof P.nodeType=="number"||P===b)return;S=P}return S},getStyle:function A(S,T,E){let P;if(T==="width"){let _=Math.min(S.offsetWidth,S.scrollWidth),re=S.getBoundingClientRect&&S.getBoundingClientRect().width;return re<_&&re>=_-1&&(_=Math.floor(re)),Math.max(0,_-(A(S,"padding-left",!0)||0)-(A(S,"padding-right",!0)||0))}if(T==="height")return Math.max(0,Math.min(S.offsetHeight,S.scrollHeight)-(A(S,"padding-top",!0)||0)-(A(S,"padding-bottom",!0)||0));let te=b.getComputedStyle(S,void 0);return te&&(P=te.getPropertyValue(T),Q(E,T!=="opacity")&&(P=O(P))),P},inArray:function(A,S,T){return k(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),S.indexOf(A,T)},insertItem:function(A,S){let T,E=A.options.index,P=S.length;for(T=A.options.isInternal?P:0;T<P+1;T++)if(!S[T]||ae(E)&&E<Q(S[T].options.index,S[T]._i)||S[T].options.isInternal){S.splice(T,0,A);break}return T},isArray:Z,isClass:F,isDOMElement:D,isFunction:function(A){return typeof A=="function"},isNumber:ae,isObject:J,isString:N,keys:function(A){return k(32,!1,void 0,{"Highcharts.keys":"use Object.keys"}),Object.keys(A)},merge:function(){let A,S=arguments,T={},E=function(te,_){return typeof te!="object"&&(te={}),K(_,function(re,me){me!=="__proto__"&&me!=="constructor"&&(!J(re,!0)||F(re)||D(re)?te[me]=_[me]:te[me]=E(te[me]||{},re))}),te};S[0]===!0&&(T=S[1],S=Array.prototype.slice.call(S,2));let P=S.length;for(A=0;A<P;A++)T=E(T,S[A]);return T},normalizeTickInterval:function(A,S,T,E,P){let te,_=A;T=Q(T,V(A));let re=A/T;for(!S&&(S=P?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],E===!1&&(T===1?S=S.filter(function(me){return me%1==0}):T<=.1&&(S=[1/T]))),te=0;te<S.length&&(_=S[te],(!P||!(_*T>=A))&&(P||!(re<=(S[te]+(S[te+1]||S[te]))/2)));te++);return le(_*T,-Math.round(Math.log(.001)/Math.LN10))},objectEach:K,offset:function(A){let S=x.documentElement,T=A.parentElement||A.parentNode?A.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:T.top+(b.pageYOffset||S.scrollTop)-(S.clientTop||0),left:T.left+(b.pageXOffset||S.scrollLeft)-(S.clientLeft||0),width:T.width,height:T.height}},pad:function(A,S,T){return Array((S||2)+1-String(A).replace("-","").length).join(T||"0")+A},pick:Q,pInt:O,pushUnique:function(A,S){return 0>A.indexOf(S)&&!!A.push(S)},relativeLength:function(A,S,T){return/%$/.test(A)?S*parseFloat(A)/100+(T||0):parseFloat(A)},removeEvent:L,replaceNested:function(A,...S){let T,E;do for(E of(T=A,S))A=A.replace(E[0],E[1]);while(A!==T);return A},splat:Y,stableSort:function(A,S){let T,E,P=A.length;for(E=0;E<P;E++)A[E].safeI=E;for(A.sort(function(te,_){return(T=S(te,_))===0?te.safeI-_.safeI:T}),E=0;E<P;E++)delete A[E].safeI},syncTimeout:function(A,S,T){return S>0?setTimeout(A,S,T):(A.call(0,T),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:H,useSerialIds:function(A){return p=Q(A,p)},wrap:function(A,S,T){let E=A[S];A[S]=function(){let P=arguments,te=this;return T.apply(this,[function(){return E.apply(te,arguments.length?arguments:P)}].concat([].slice.call(arguments)))}}}}),c(o,"Core/Chart/ChartDefaults.js",[],function(){return{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}}),c(o,"Core/Color/Palettes.js",[],function(){return{colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"]}}),c(o,"Core/Time.js",[o["Core/Globals.js"],o["Core/Utilities.js"]],function(d,p){let{win:y}=d,{defined:x,error:b,extend:k,isNumber:O,isObject:N,merge:Z,objectEach:J,pad:D,pick:F,splat:ae,timeUnits:ee}=p,B=d.isSafari&&y.Intl&&y.Intl.DateTimeFormat.prototype.formatRange,Y=d.isSafari&&y.Intl&&!y.Intl.DateTimeFormat.prototype.formatRange;class ${constructor(z){this.options={},this.useUTC=!1,this.variableTimezone=!1,this.Date=y.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(z)}get(z,V){if(this.variableTimezone||this.timezoneOffset){let le=V.getTime(),se=le-this.getTimezoneOffset(V);V.setTime(se);let K=V["getUTC"+z]();return V.setTime(le),K}return this.useUTC?V["getUTC"+z]():V["get"+z]()}set(z,V,le){if(this.variableTimezone||this.timezoneOffset){if(z==="Milliseconds"||z==="Seconds"||z==="Minutes"&&this.getTimezoneOffset(V)%36e5==0)return V["setUTC"+z](le);let se=this.getTimezoneOffset(V),K=V.getTime()-se;V.setTime(K),V["setUTC"+z](le);let L=this.getTimezoneOffset(V);return K=V.getTime()+L,V.setTime(K)}return this.useUTC||B&&z==="FullYear"?V["setUTC"+z](le):V["set"+z](le)}update(z={}){let V=F(z.useUTC,!0);this.options=z=Z(!0,this.options,z),this.Date=z.Date||y.Date||Date,this.useUTC=V,this.timezoneOffset=V&&z.timezoneOffset||void 0,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=V&&!!(z.getTimezoneOffset||z.timezone)}makeTime(z,V,le,se,K,L){let X,H,A;return this.useUTC?(X=this.Date.UTC.apply(0,arguments),H=this.getTimezoneOffset(X),X+=H,H!==(A=this.getTimezoneOffset(X))?X+=A-H:H-36e5!==this.getTimezoneOffset(X-36e5)||Y||(X-=36e5)):X=new this.Date(z,V,F(le,1),F(se,0),F(K,0),F(L,0)).getTime(),X}timezoneOffsetFunction(){let z=this,V=this.options,le=V.getTimezoneOffset;return this.useUTC?V.timezone?se=>{try{let K=`shortOffset,${V.timezone||""}`,[L,X,H,A,S=0]=($.formatCache[K]=$.formatCache[K]||Intl.DateTimeFormat("en",{timeZone:V.timezone,timeZoneName:"shortOffset"})).format(se).split(/(GMT|:)/).map(Number),T=-(36e5*(H+S/60));if(O(T))return T}catch{b(34)}return 0}:this.useUTC&&le?se=>6e4*le(se.valueOf()):()=>6e4*(z.timezoneOffset||0):se=>6e4*new Date(se.toString()).getTimezoneOffset()}dateFormat(z,V,le){if(!x(V)||isNaN(V))return d.defaultOptions.lang&&d.defaultOptions.lang.invalidDate||"";z=F(z,"%Y-%m-%d %H:%M:%S");let se=this,K=new this.Date(V),L=this.get("Hours",K),X=this.get("Day",K),H=this.get("Date",K),A=this.get("Month",K),S=this.get("FullYear",K),T=d.defaultOptions.lang,E=T&&T.weekdays,P=T&&T.shortWeekdays;return J(k({a:P?P[X]:E[X].substr(0,3),A:E[X],d:D(H),e:D(H,2," "),w:X,b:T.shortMonths[A],B:T.months[A],m:D(A+1),o:A+1,y:S.toString().substr(2,2),Y:S,H:D(L),k:L,I:D(L%12||12),l:L%12||12,M:D(this.get("Minutes",K)),p:L<12?"AM":"PM",P:L<12?"am":"pm",S:D(this.get("Seconds",K)),L:D(Math.floor(V%1e3),3)},d.dateFormats),function(te,_){for(;z.indexOf("%"+_)!==-1;)z=z.replace("%"+_,typeof te=="function"?te.call(se,V):te)}),le?z.substr(0,1).toUpperCase()+z.substr(1):z}resolveDTLFormat(z){return N(z,!0)?z:{main:(z=ae(z))[0],from:z[1],to:z[2]}}getTimeTicks(z,V,le,se){let K,L,X,H,A=this,S=A.Date,T=[],E={},P=new S(V),te=z.unitRange,_=z.count||1;if(se=F(se,1),x(V)){A.set("Milliseconds",P,te>=ee.second?0:_*Math.floor(A.get("Milliseconds",P)/_)),te>=ee.second&&A.set("Seconds",P,te>=ee.minute?0:_*Math.floor(A.get("Seconds",P)/_)),te>=ee.minute&&A.set("Minutes",P,te>=ee.hour?0:_*Math.floor(A.get("Minutes",P)/_)),te>=ee.hour&&A.set("Hours",P,te>=ee.day?0:_*Math.floor(A.get("Hours",P)/_)),te>=ee.day&&A.set("Date",P,te>=ee.month?1:Math.max(1,_*Math.floor(A.get("Date",P)/_))),te>=ee.month&&(A.set("Month",P,te>=ee.year?0:_*Math.floor(A.get("Month",P)/_)),L=A.get("FullYear",P)),te>=ee.year&&(L-=L%_,A.set("FullYear",P,L)),te===ee.week&&(H=A.get("Day",P),A.set("Date",P,A.get("Date",P)-H+se+(H<se?-7:0))),L=A.get("FullYear",P);let re=A.get("Month",P),me=A.get("Date",P),g=A.get("Hours",P);V=P.getTime(),(A.variableTimezone||!A.useUTC)&&x(le)&&(X=le-V>4*ee.month||A.getTimezoneOffset(V)!==A.getTimezoneOffset(le));let w=P.getTime();for(K=1;w<le;)T.push(w),te===ee.year?w=A.makeTime(L+K*_,0):te===ee.month?w=A.makeTime(L,re+K*_):X&&(te===ee.day||te===ee.week)?w=A.makeTime(L,re,me+K*_*(te===ee.day?1:7)):X&&te===ee.hour&&_>1?w=A.makeTime(L,re,me,g+K*_):w+=te*_,K++;T.push(w),te<=ee.hour&&T.length<1e4&&T.forEach(function(C){C%18e5==0&&A.dateFormat("%H%M%S%L",C)==="000000000"&&(E[C]="day")})}return T.info=k(z,{higherRanks:E,totalRange:te*_}),T}getDateFormat(z,V,le,se){let K=this.dateFormat("%m-%d %H:%M:%S.%L",V),L="01-01 00:00:00.000",X={millisecond:15,second:12,minute:9,hour:6,day:3},H="millisecond",A=H;for(H in ee){if(z===ee.week&&+this.dateFormat("%w",V)===le&&K.substr(6)===L.substr(6)){H="week";break}if(ee[H]>z){H=A;break}if(X[H]&&K.substr(X[H])!==L.substr(X[H]))break;H!=="week"&&(A=H)}return this.resolveDTLFormat(se[H]).main}}return $.formatCache={},$}),c(o,"Core/Defaults.js",[o["Core/Chart/ChartDefaults.js"],o["Core/Globals.js"],o["Core/Color/Palettes.js"],o["Core/Time.js"],o["Core/Utilities.js"]],function(d,p,y,x,b){let{isTouchDevice:k}=p,{fireEvent:O,merge:N}=b,Z={colors:y.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",numericSymbols:["k","M","G","T","P","E"],resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{buttonTheme:{fill:"#f7f7f7",padding:8,r:2,stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},states:{hover:{fill:"#e6e6e6"},select:{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},disabled:{style:{color:"#cccccc"}}}}},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:d,title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:"",align:"center",widthAdjust:-44},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",events:{},layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:{duration:300,easing:D=>Math.sqrt(1-Math.pow(D-1,2))},borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %e %b, %H:%M:%S.%L",second:"%A, %e %b, %H:%M:%S",minute:"%A, %e %b, %H:%M",hour:"%A, %e %b, %H:%M",day:"%A, %e %b %Y",week:"Week from %A, %e %b %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:k?25:10,headerFormat:'<span style="font-size: 0.8em">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:"#ffffff",borderWidth:void 0,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}};Z.chart.styledMode=!1;let J=new x(Z.time);return{defaultOptions:Z,defaultTime:J,getOptions:function(){return Z},setOptions:function(D){return O(p,"setOptions",{options:D}),N(!0,Z,D),(D.time||D.global)&&(p.time?p.time.update(N(Z.global,Z.time,D.global,D.time)):p.time=J),Z}}}),c(o,"Core/Color/Color.js",[o["Core/Globals.js"],o["Core/Utilities.js"]],function(d,p){let{isNumber:y,merge:x,pInt:b}=p;class k{static parse(N){return N?new k(N):k.None}constructor(N){let Z,J,D,F;this.rgba=[NaN,NaN,NaN,NaN],this.input=N;let ae=d.Color;if(ae&&ae!==k)return new ae(N);if(typeof N=="object"&&N.stops!==void 0)this.stops=N.stops.map(ee=>new k(ee[1]));else if(typeof N=="string"){if(this.input=N=k.names[N.toLowerCase()]||N,N.charAt(0)==="#"){let ee=N.length,B=parseInt(N.substr(1),16);ee===7?J=[(16711680&B)>>16,(65280&B)>>8,255&B,1]:ee===4&&(J=[(3840&B)>>4|(3840&B)>>8,(240&B)>>4|240&B,(15&B)<<4|15&B,1])}if(!J)for(D=k.parsers.length;D--&&!J;)(Z=(F=k.parsers[D]).regex.exec(N))&&(J=F.parse(Z))}J&&(this.rgba=J)}get(N){let Z=this.input,J=this.rgba;if(typeof Z=="object"&&this.stops!==void 0){let D=x(Z);return D.stops=[].slice.call(D.stops),this.stops.forEach((F,ae)=>{D.stops[ae]=[D.stops[ae][0],F.get(N)]}),D}return J&&y(J[0])?N!=="rgb"&&(N||J[3]!==1)?N==="a"?`${J[3]}`:"rgba("+J.join(",")+")":"rgb("+J[0]+","+J[1]+","+J[2]+")":Z}brighten(N){let Z=this.rgba;if(this.stops)this.stops.forEach(function(J){J.brighten(N)});else if(y(N)&&N!==0)for(let J=0;J<3;J++)Z[J]+=b(255*N),Z[J]<0&&(Z[J]=0),Z[J]>255&&(Z[J]=255);return this}setOpacity(N){return this.rgba[3]=N,this}tweenTo(N,Z){let J=this.rgba,D=N.rgba;if(!y(J[0])||!y(D[0]))return N.input||"none";let F=D[3]!==1||J[3]!==1;return(F?"rgba(":"rgb(")+Math.round(D[0]+(J[0]-D[0])*(1-Z))+","+Math.round(D[1]+(J[1]-D[1])*(1-Z))+","+Math.round(D[2]+(J[2]-D[2])*(1-Z))+(F?","+(D[3]+(J[3]-D[3])*(1-Z)):"")+")"}}return k.names={white:"#ffffff",black:"#000000"},k.parsers=[{regex:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?(?:\.\d+)?)\s*\)/,parse:function(O){return[b(O[1]),b(O[2]),b(O[3]),parseFloat(O[4],10)]}},{regex:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/,parse:function(O){return[b(O[1]),b(O[2]),b(O[3]),1]}}],k.None=new k(""),k}),c(o,"Core/Animation/Fx.js",[o["Core/Color/Color.js"],o["Core/Globals.js"],o["Core/Utilities.js"]],function(d,p,y){let{parse:x}=d,{win:b}=p,{isNumber:k,objectEach:O}=y;class N{constructor(J,D,F){this.pos=NaN,this.options=D,this.elem=J,this.prop=F}dSetter(){let J=this.paths,D=J&&J[0],F=J&&J[1],ae=this.now||0,ee=[];if(ae!==1&&D&&F)if(D.length===F.length&&ae<1)for(let B=0;B<F.length;B++){let Y=D[B],$=F[B],Q=[];for(let z=0;z<$.length;z++){let V=Y[z],le=$[z];k(V)&&k(le)&&!($[0]==="A"&&(z===4||z===5))?Q[z]=V+ae*(le-V):Q[z]=le}ee.push(Q)}else ee=F;else ee=this.toD||[];this.elem.attr("d",ee,void 0,!0)}update(){let J=this.elem,D=this.prop,F=this.now,ae=this.options.step;this[D+"Setter"]?this[D+"Setter"]():J.attr?J.element&&J.attr(D,F,null,!0):J.style[D]=F+this.unit,ae&&ae.call(J,F,this)}run(J,D,F){let ae=this,ee=ae.options,B=function(Q){return!B.stopped&&ae.step(Q)},Y=b.requestAnimationFrame||function(Q){setTimeout(Q,13)},$=function(){for(let Q=0;Q<N.timers.length;Q++)N.timers[Q]()||N.timers.splice(Q--,1);N.timers.length&&Y($)};J!==D||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=J,this.end=D,this.unit=F,this.now=this.start,this.pos=0,B.elem=this.elem,B.prop=this.prop,B()&&N.timers.push(B)===1&&Y($)):(delete ee.curAnim[this.prop],ee.complete&&Object.keys(ee.curAnim).length===0&&ee.complete.call(this.elem))}step(J){let D,F,ae=+new Date,ee=this.options,B=this.elem,Y=ee.complete,$=ee.duration,Q=ee.curAnim;return B.attr&&!B.element?D=!1:J||ae>=$+this.startTime?(this.now=this.end,this.pos=1,this.update(),Q[this.prop]=!0,F=!0,O(Q,function(z){z!==!0&&(F=!1)}),F&&Y&&Y.call(B),D=!1):(this.pos=ee.easing((ae-this.startTime)/$),this.now=this.start+(this.end-this.start)*this.pos,this.update(),D=!0),D}initPath(J,D,F){let ae=J.startX,ee=J.endX,B=F.slice(),Y=J.isArea,$=Y?2:1,Q=D&&F.length>D.length&&F.hasStackedCliffs,z,V,le,se,K=D&&D.slice();if(!K||Q)return[B,B];function L(H,A){for(;H.length<V;){let S=H[0],T=A[V-H.length];if(T&&S[0]==="M"&&(T[0]==="C"?H[0]=["C",S[1],S[2],S[1],S[2],S[1],S[2]]:H[0]=["L",S[1],S[2]]),H.unshift(S),Y){let E=H.pop();H.push(H[H.length-1],E)}}}function X(H){for(;H.length<V;){let A=H[Math.floor(H.length/$)-1].slice();if(A[0]==="C"&&(A[1]=A[5],A[2]=A[6]),Y){let S=H[Math.floor(H.length/$)].slice();H.splice(H.length/2,0,A,S)}else H.push(A)}}if(ae&&ee&&ee.length){for(le=0;le<ae.length;le++){if(ae[le]===ee[0]){z=le;break}if(ae[0]===ee[ee.length-ae.length+le]){z=le,se=!0;break}if(ae[ae.length-1]===ee[ee.length-ae.length+le]){z=ae.length-le;break}}z===void 0&&(K=[])}return K.length&&k(z)&&(V=B.length+z*$,se?(L(K,B),X(B)):(L(B,K),X(K))),[K,B]}fillSetter(){N.prototype.strokeSetter.apply(this,arguments)}strokeSetter(){this.elem.attr(this.prop,x(this.start).tweenTo(x(this.end),this.pos),void 0,!0)}}return N.timers=[],N}),c(o,"Core/Animation/AnimationUtilities.js",[o["Core/Animation/Fx.js"],o["Core/Utilities.js"]],function(d,p){let{defined:y,getStyle:x,isArray:b,isNumber:k,isObject:O,merge:N,objectEach:Z,pick:J}=p;function D(ae){return O(ae)?N({duration:500,defer:0},ae):{duration:ae?500:0,defer:0}}function F(ae,ee){let B=d.timers.length;for(;B--;)d.timers[B].elem!==ae||ee&&ee!==d.timers[B].prop||(d.timers[B].stopped=!0)}return{animate:function(ae,ee,B){let Y,$="",Q,z,V;O(B)||(V=arguments,B={duration:V[2],easing:V[3],complete:V[4]}),k(B.duration)||(B.duration=400),B.easing=typeof B.easing=="function"?B.easing:Math[B.easing]||Math.easeInOutSine,B.curAnim=N(ee),Z(ee,function(le,se){F(ae,se),z=new d(ae,B,se),Q=void 0,se==="d"&&b(ee.d)?(z.paths=z.initPath(ae,ae.pathArray,ee.d),z.toD=ee.d,Y=0,Q=1):ae.attr?Y=ae.attr(se):(Y=parseFloat(x(ae,se))||0,se!=="opacity"&&($="px")),Q||(Q=le),typeof Q=="string"&&Q.match("px")&&(Q=Q.replace(/px/g,"")),z.run(Y,Q,$)})},animObject:D,getDeferredAnimation:function(ae,ee,B){let Y=D(ee),$=B?[B]:ae.series,Q=0,z=0;return $.forEach(V=>{let le=D(V.options.animation);Q=O(ee)&&y(ee.defer)?Y.defer:Math.max(Q,le.duration+le.defer),z=Math.min(Y.duration,le.duration)}),ae.renderer.forExport&&(Q=0),{defer:Math.max(0,Q-z),duration:Math.min(Q,z)}},setAnimation:function(ae,ee){ee.renderer.globalAnimation=J(ae,ee.options.chart.animation,!0)},stop:F}}),c(o,"Core/Renderer/HTML/AST.js",[o["Core/Globals.js"],o["Core/Utilities.js"]],function(d,p){let{SVG_NS:y,win:x}=d,{attr:b,createElement:k,css:O,error:N,isFunction:Z,isString:J,objectEach:D,splat:F}=p,{trustedTypes:ae}=x,ee=ae&&Z(ae.createPolicy)&&ae.createPolicy("highcharts",{createHTML:Q=>Q}),B=ee?ee.createHTML(""):"",Y=function(){try{return!!new DOMParser().parseFromString(B,"text/html")}catch{return!1}}();class ${static filterUserAttributes(z){return D(z,(V,le)=>{let se=!0;$.allowedAttributes.indexOf(le)===-1&&(se=!1),["background","dynsrc","href","lowsrc","src"].indexOf(le)!==-1&&(se=J(V)&&$.allowedReferences.some(K=>V.indexOf(K)===0)),se||(N(33,!1,void 0,{"Invalid attribute in config":`${le}`}),delete z[le]),J(V)&&z[le]&&(z[le]=V.replace(/</g,"&lt;"))}),z}static parseStyle(z){return z.split(";").reduce((V,le)=>{let se=le.split(":").map(L=>L.trim()),K=se.shift();return K&&se.length&&(V[K.replace(/-([a-z])/g,L=>L[1].toUpperCase())]=se.join(":")),V},{})}static setElementHTML(z,V){z.innerHTML=$.emptyHTML,V&&new $(V).addToDOM(z)}constructor(z){this.nodes=typeof z=="string"?this.parseMarkup(z):z}addToDOM(z){return function V(le,se){let K;return F(le).forEach(function(L){let X,H=L.tagName,A=L.textContent?d.doc.createTextNode(L.textContent):void 0,S=$.bypassHTMLFiltering;if(H)if(H==="#text")X=A;else if($.allowedTags.indexOf(H)!==-1||S){let T=H==="svg"?y:se.namespaceURI||y,E=d.doc.createElementNS(T,H),P=L.attributes||{};D(L,function(te,_){_!=="tagName"&&_!=="attributes"&&_!=="children"&&_!=="style"&&_!=="textContent"&&(P[_]=te)}),b(E,S?P:$.filterUserAttributes(P)),L.style&&O(E,L.style),A&&E.appendChild(A),V(L.children||[],E),X=E}else N(33,!1,void 0,{"Invalid tagName in config":H});X&&se.appendChild(X),K=X}),K}(this.nodes,z)}parseMarkup(z){let V,le=[];if(z=z.trim().replace(/ style=(["'])/g," data-style=$1"),Y)V=new DOMParser().parseFromString(ee?ee.createHTML(z):z,"text/html");else{let K=k("div");K.innerHTML=z,V={body:K}}let se=(K,L)=>{let X=K.nodeName.toLowerCase(),H={tagName:X};X==="#text"&&(H.textContent=K.textContent||"");let A=K.attributes;if(A){let S={};[].forEach.call(A,T=>{T.name==="data-style"?H.style=$.parseStyle(T.value):S[T.name]=T.value}),H.attributes=S}if(K.childNodes.length){let S=[];[].forEach.call(K.childNodes,T=>{se(T,S)}),S.length&&(H.children=S)}L.push(H)};return[].forEach.call(V.body.childNodes,K=>se(K,le)),le}}return $.allowedAttributes=["alt","aria-controls","aria-describedby","aria-expanded","aria-haspopup","aria-hidden","aria-label","aria-labelledby","aria-live","aria-pressed","aria-readonly","aria-roledescription","aria-selected","class","clip-path","color","colspan","cx","cy","d","dx","dy","disabled","fill","filterUnits","flood-color","flood-opacity","height","href","id","in","in2","markerHeight","markerWidth","offset","opacity","operator","orient","padding","paddingLeft","paddingRight","patternUnits","r","radius","refX","refY","role","scope","slope","src","startOffset","stdDeviation","stroke","stroke-linecap","stroke-width","style","tableValues","result","rowspan","summary","target","tabindex","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],$.allowedReferences=["https://","http://","mailto:","/","../","./","#"],$.allowedTags=["a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feComposite","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMorphology","feOffset","feMerge","feMergeNode","filter","h1","h2","h3","h4","h5","h6","hr","i","img","li","linearGradient","marker","ol","p","path","pattern","pre","rect","small","span","stop","strong","style","sub","sup","svg","table","text","textPath","thead","title","tbody","tspan","td","th","tr","u","ul","#text"],$.emptyHTML=B,$.bypassHTMLFiltering=!1,$}),c(o,"Core/Templating.js",[o["Core/Defaults.js"],o["Core/Utilities.js"]],function(d,p){let{defaultOptions:y,defaultTime:x}=d,{extend:b,getNestedProperty:k,isArray:O,isNumber:N,isObject:Z,pick:J,pInt:D}=p,F={add:(B,Y)=>B+Y,divide:(B,Y)=>Y!==0?B/Y:"",eq:(B,Y)=>B==Y,each:function(B){let Y=arguments[arguments.length-1];return!!O(B)&&B.map(($,Q)=>ae(Y.body,b(Z($)?$:{"@this":$},{"@index":Q,"@first":Q===0,"@last":Q===B.length-1}))).join("")},ge:(B,Y)=>B>=Y,gt:(B,Y)=>B>Y,if:B=>!!B,le:(B,Y)=>B<=Y,lt:(B,Y)=>B<Y,multiply:(B,Y)=>B*Y,ne:(B,Y)=>B!=Y,subtract:(B,Y)=>B-Y,unless:B=>!B};function ae(B="",Y,$){let Q=/\{([\w\:\.\,;\-\/<>%@"'’= #\(\)]+)\}/g,z=/\(([\w\:\.\,;\-\/<>%@"'= ]+)\)/g,V=[],le=/f$/,se=/\.(\d)/,K=y.lang,L=$&&$.time||x,X=$&&$.numberFormatter||ee,H=(P="")=>{let te;return P==="true"||P!=="false"&&((te=Number(P)).toString()===P?te:k(P,Y))},A,S,T=0,E;for(;(A=Q.exec(B))!==null;){let P=z.exec(A[1]);P&&(A=P,E=!0),S&&S.isBlock||(S={ctx:Y,expression:A[1],find:A[0],isBlock:A[1].charAt(0)==="#",start:A.index,startInner:A.index+A[0].length,length:A[0].length});let te=A[1].split(" ")[0].replace("#","");F[te]&&(S.isBlock&&te===S.fn&&T++,S.fn||(S.fn=te));let _=A[1]==="else";if(S.isBlock&&S.fn&&(A[1]===`/${S.fn}`||_))if(T)!_&&T--;else{let re=S.startInner,me=B.substr(re,A.index-re);S.body===void 0?(S.body=me,S.startInner=A.index+A[0].length):S.elseBody=me,S.find+=me+A[0],_||(V.push(S),S=void 0)}else S.isBlock||V.push(S);if(P&&!(S!=null&&S.isBlock))break}return V.forEach(P=>{let te,_,{body:re,elseBody:me,expression:g,fn:w}=P;if(w){let C=[P],q=g.split(" ");for(_=F[w].length;_--;)C.unshift(H(q[_+1]));te=F[w].apply(Y,C),P.isBlock&&typeof te=="boolean"&&(te=ae(te?re:me,Y,$))}else{let C=g.split(":");if(te=H(C.shift()||""),C.length&&typeof te=="number"){let q=C.join(":");if(le.test(q)){let ce=parseInt((q.match(se)||["","-1"])[1],10);te!==null&&(te=X(te,ce,K.decimalPoint,q.indexOf(",")>-1?K.thousandsSep:""))}else te=L.dateFormat(q,te)}}B=B.replace(P.find,J(te,""))}),E?ae(B,Y,$):B}function ee(B,Y,$,Q){let z,V;B=+B||0,Y=+Y;let le=y.lang,se=(B.toString().split(".")[1]||"").split("e")[0].length,K=B.toString().split("e"),L=Y;Y===-1?Y=Math.min(se,20):N(Y)?Y&&K[1]&&K[1]<0&&((V=Y+ +K[1])>=0?(K[0]=(+K[0]).toExponential(V).split("e")[0],Y=V):(K[0]=K[0].split(".")[0]||0,B=Y<20?(K[0]*Math.pow(10,K[1])).toFixed(Y):0,K[1]=0)):Y=2;let X=(Math.abs(K[1]?K[0]:B)+Math.pow(10,-Math.max(Y,se)-1)).toFixed(Y),H=String(D(X)),A=H.length>3?H.length%3:0;return $=J($,le.decimalPoint),Q=J(Q,le.thousandsSep),z=(B<0?"-":"")+(A?H.substr(0,A)+Q:""),0>+K[1]&&!L?z="0":z+=H.substr(A).replace(/(\d{3})(?=\d)/g,"$1"+Q),Y?z+=$+X.slice(-Y):+z==0&&(z="0"),K[1]&&+z!=0&&(z+="e"+K[1]),z}return{dateFormat:function(B,Y,$){return x.dateFormat(B,Y,$)},format:ae,helpers:F,numberFormat:ee}}),c(o,"Core/Renderer/RendererRegistry.js",[o["Core/Globals.js"]],function(d){var p,y;let x;return(y=p||(p={})).rendererTypes={},y.getRendererType=function(b=x){return y.rendererTypes[b]||y.rendererTypes[x]},y.registerRendererType=function(b,k,O){y.rendererTypes[b]=k,(!x||O)&&(x=b,d.Renderer=k)},p}),c(o,"Core/Renderer/RendererUtilities.js",[o["Core/Utilities.js"]],function(d){var p;let{clamp:y,pick:x,pushUnique:b,stableSort:k}=d;return(p||(p={})).distribute=function O(N,Z,J){let D=N,F=D.reducedLen||Z,ae=(H,A)=>H.target-A.target,ee=[],B=N.length,Y=[],$=ee.push,Q,z,V,le=!0,se,K,L=0,X;for(Q=B;Q--;)L+=N[Q].size;if(L>F){for(k(N,(H,A)=>(A.rank||0)-(H.rank||0)),V=(X=N[0].rank===N[N.length-1].rank)?B/2:-1,z=X?V:B-1;V&&L>F;)se=N[Q=Math.floor(z)],b(Y,Q)&&(L-=se.size),z+=V,X&&z>=N.length&&(V/=2,z=V);Y.sort((H,A)=>A-H).forEach(H=>$.apply(ee,N.splice(H,1)))}for(k(N,ae),N=N.map(H=>({size:H.size,targets:[H.target],align:x(H.align,.5)}));le;){for(Q=N.length;Q--;)se=N[Q],K=(Math.min.apply(0,se.targets)+Math.max.apply(0,se.targets))/2,se.pos=y(K-se.size*se.align,0,Z-se.size);for(Q=N.length,le=!1;Q--;)Q>0&&N[Q-1].pos+N[Q-1].size>N[Q].pos&&(N[Q-1].size+=N[Q].size,N[Q-1].targets=N[Q-1].targets.concat(N[Q].targets),N[Q-1].align=.5,N[Q-1].pos+N[Q-1].size>Z&&(N[Q-1].pos=Z-N[Q-1].size),N.splice(Q,1),le=!0)}return $.apply(D,ee),Q=0,N.some(H=>{let A=0;return(H.targets||[]).some(()=>(D[Q].pos=H.pos+A,J!==void 0&&Math.abs(D[Q].pos-D[Q].target)>J?(D.slice(0,Q+1).forEach(S=>delete S.pos),D.reducedLen=(D.reducedLen||Z)-.1*Z,D.reducedLen>.1*Z&&O(D,Z,J),!0):(A+=D[Q].size,Q++,!1)))}),k(D,ae),D},p}),c(o,"Core/Renderer/SVG/SVGElement.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Color/Color.js"],o["Core/Globals.js"],o["Core/Utilities.js"]],function(d,p,y,x){let{animate:b,animObject:k,stop:O}=d,{deg2rad:N,doc:Z,svg:J,SVG_NS:D,win:F}=y,{addEvent:ae,attr:ee,createElement:B,crisp:Y,css:$,defined:Q,erase:z,extend:V,fireEvent:le,isArray:se,isFunction:K,isObject:L,isString:X,merge:H,objectEach:A,pick:S,pInt:T,pushUnique:E,replaceNested:P,syncTimeout:te,uniqueKey:_}=x;class re{_defaultGetter(g){let w=S(this[g+"Value"],this[g],this.element?this.element.getAttribute(g):null,0);return/^-?[\d\.]+$/.test(w)&&(w=parseFloat(w)),w}_defaultSetter(g,w,C){C.setAttribute(w,g)}add(g){let w,C=this.renderer,q=this.element;return g&&(this.parentGroup=g),this.textStr!==void 0&&this.element.nodeName==="text"&&C.buildText(this),this.added=!0,(!g||g.handleZ||this.zIndex)&&(w=this.zIndexSetter()),w||(g?g.element:C.box).appendChild(q),this.onAdd&&this.onAdd(),this}addClass(g,w){let C=w?"":this.attr("class")||"";return(g=(g||"").split(/ /g).reduce(function(q,ce){return C.indexOf(ce)===-1&&q.push(ce),q},C?[C]:[]).join(" "))!==C&&this.attr("class",g),this}afterSetters(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)}align(g,w,C,q=!0){let ce,j,U,ne,ge={},R=this.renderer,G=R.alignedObjects,ie=!!g;g?(this.alignOptions=g,this.alignByTranslate=w,this.alignTo=C):(g=this.alignOptions||{},w=this.alignByTranslate,C=this.alignTo);let ue=!C||X(C)?C||"renderer":void 0;ue&&(ie&&E(G,this),C=void 0);let de=S(C,R[ue],R),ye=g.align,Se=g.verticalAlign;return ce=(de.x||0)+(g.x||0),j=(de.y||0)+(g.y||0),ye==="right"?U=1:ye==="center"&&(U=2),U&&(ce+=((de.width||0)-(g.width||0))/U),ge[w?"translateX":"x"]=Math.round(ce),Se==="bottom"?ne=1:Se==="middle"&&(ne=2),ne&&(j+=((de.height||0)-(g.height||0))/ne),ge[w?"translateY":"y"]=Math.round(j),q&&(this[this.placed?"animate":"attr"](ge),this.placed=!0),this.alignAttr=ge,this}alignSetter(g){let w={left:"start",center:"middle",right:"end"};w[g]&&(this.alignValue=g,this.element.setAttribute("text-anchor",w[g]))}animate(g,w,C){let q=k(S(w,this.renderer.globalAnimation,!0)),ce=q.defer;return Z.hidden&&(q.duration=0),q.duration!==0?(C&&(q.complete=C),te(()=>{this.element&&b(this,g,q)},ce)):(this.attr(g,void 0,C||q.complete),A(g,function(j,U){q.step&&q.step.call(this,j,{prop:U,pos:1,elem:this})},this)),this}applyTextOutline(g){let w=this.element;g.indexOf("contrast")!==-1&&(g=g.replace(/contrast/g,this.renderer.getContrast(w.style.fill)));let C=g.split(" "),q=C[C.length-1],ce=C[0];if(ce&&ce!=="none"&&y.svg){this.fakeTS=!0,ce=ce.replace(/(^[\d\.]+)(.*?)$/g,function(R,G,ie){return 2*Number(G)+ie}),this.removeTextOutline();let j=Z.createElementNS(D,"tspan");ee(j,{class:"highcharts-text-outline",fill:q,stroke:q,"stroke-width":ce,"stroke-linejoin":"round"});let U=w.querySelector("textPath")||w;[].forEach.call(U.childNodes,R=>{let G=R.cloneNode(!0);G.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(ie=>G.removeAttribute(ie)),j.appendChild(G)});let ne=0;[].forEach.call(U.querySelectorAll("text tspan"),R=>{ne+=Number(R.getAttribute("dy"))});let ge=Z.createElementNS(D,"tspan");ge.textContent="​",ee(ge,{x:Number(w.getAttribute("x")),dy:-ne}),j.appendChild(ge),U.insertBefore(j,U.firstChild)}}attr(g,w,C,q){let{element:ce}=this,j=re.symbolCustomAttribs,U,ne,ge=this,R;return typeof g=="string"&&w!==void 0&&(U=g,(g={})[U]=w),typeof g=="string"?ge=(this[g+"Getter"]||this._defaultGetter).call(this,g,ce):(A(g,function(G,ie){R=!1,q||O(this,ie),this.symbolName&&j.indexOf(ie)!==-1&&(ne||(this.symbolAttr(g),ne=!0),R=!0),this.rotation&&(ie==="x"||ie==="y")&&(this.doTransform=!0),R||(this[ie+"Setter"]||this._defaultSetter).call(this,G,ie,ce)},this),this.afterSetters()),C&&C.call(this),ge}clip(g){if(g&&!g.clipPath){let w=_()+"-",C=this.renderer.createElement("clipPath").attr({id:w}).add(this.renderer.defs);V(g,{clipPath:C,id:w,count:0}),g.add(C)}return this.attr("clip-path",g?`url(${this.renderer.url}#${g.id})`:"none")}crisp(g,w){w=Math.round(w||g.strokeWidth||0);let C=g.x||this.x||0,q=g.y||this.y||0,ce=(g.width||this.width||0)+C,j=(g.height||this.height||0)+q,U=Y(C,w),ne=Y(q,w);return V(g,{x:U,y:ne,width:Y(ce,w)-U,height:Y(j,w)-ne}),Q(g.strokeWidth)&&(g.strokeWidth=w),g}complexColor(g,w,C){let q=this.renderer,ce,j,U,ne,ge,R,G,ie,ue,de,ye=[],Se;le(this.renderer,"complexColor",{args:arguments},function(){if(g.radialGradient?j="radialGradient":g.linearGradient&&(j="linearGradient"),j){if(U=g[j],ge=q.gradients,R=g.stops,ue=C.radialReference,se(U)&&(g[j]=U={x1:U[0],y1:U[1],x2:U[2],y2:U[3],gradientUnits:"userSpaceOnUse"}),j==="radialGradient"&&ue&&!Q(U.gradientUnits)&&(ne=U,U=H(U,q.getRadialAttr(ue,ne),{gradientUnits:"userSpaceOnUse"})),A(U,function(Ce,Ae){Ae!=="id"&&ye.push(Ae,Ce)}),A(R,function(Ce){ye.push(Ce)}),ge[ye=ye.join(",")])de=ge[ye].attr("id");else{U.id=de=_();let Ce=ge[ye]=q.createElement(j).attr(U).add(q.defs);Ce.radAttr=ne,Ce.stops=[],R.forEach(function(Ae){Ae[1].indexOf("rgba")===0?(G=(ce=p.parse(Ae[1])).get("rgb"),ie=ce.get("a")):(G=Ae[1],ie=1);let Ne=q.createElement("stop").attr({offset:Ae[0],"stop-color":G,"stop-opacity":ie}).add(Ce);Ce.stops.push(Ne)})}Se="url("+q.url+"#"+de+")",C.setAttribute(w,Se),C.gradient=ye,g.toString=function(){return Se}}})}css(g){let w=this.styles,C={},q=this.element,ce,j=!w;if(w&&A(g,function(U,ne){w&&w[ne]!==U&&(C[ne]=U,j=!0)}),j){w&&(g=V(w,C)),g.width===null||g.width==="auto"?delete this.textWidth:q.nodeName.toLowerCase()==="text"&&g.width&&(ce=this.textWidth=T(g.width)),V(this.styles,g),ce&&!J&&this.renderer.forExport&&delete g.width;let U=H(g);q.namespaceURI===this.SVG_NS&&(["textOutline","textOverflow","width"].forEach(ne=>U&&delete U[ne]),U.color&&(U.fill=U.color)),$(q,U)}return this.added&&(this.element.nodeName==="text"&&this.renderer.buildText(this),g.textOutline&&this.applyTextOutline(g.textOutline)),this}dashstyleSetter(g){let w,C=this["stroke-width"];if(C==="inherit"&&(C=1),g=g&&g.toLowerCase()){let q=g.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(w=q.length;w--;)q[w]=""+T(q[w])*S(C,NaN);g=q.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",g)}}destroy(){var ne;let g=this,w=g.element||{},C=g.renderer,q=w.ownerSVGElement,ce=w.nodeName==="SPAN"&&g.parentGroup||void 0,j,U;if(w.onclick=w.onmouseout=w.onmouseover=w.onmousemove=w.point=null,O(g),g.clipPath&&q){let ge=g.clipPath;[].forEach.call(q.querySelectorAll("[clip-path],[CLIP-PATH]"),function(R){R.getAttribute("clip-path").indexOf(ge.element.id)>-1&&R.removeAttribute("clip-path")}),g.clipPath=ge.destroy()}if(g.connector=(ne=g.connector)==null?void 0:ne.destroy(),g.stops){for(U=0;U<g.stops.length;U++)g.stops[U].destroy();g.stops.length=0,g.stops=void 0}for(g.safeRemoveChild(w);ce&&ce.div&&ce.div.childNodes.length===0;)j=ce.parentGroup,g.safeRemoveChild(ce.div),delete ce.div,ce=j;g.alignOptions&&z(C.alignedObjects,g),A(g,function(ge,R){g[R]&&g[R].parentGroup===g&&g[R].destroy&&g[R].destroy(),delete g[R]})}dSetter(g,w,C){se(g)&&(typeof g[0]=="string"&&(g=this.renderer.pathToSegments(g)),this.pathArray=g,g=g.reduce((q,ce,j)=>ce&&ce.join?(j?q+" ":"")+ce.join(" "):(ce||"").toString(),"")),/(NaN| {2}|^$)/.test(g)&&(g="M 0 0"),this[w]!==g&&(C.setAttribute(w,g),this[w]=g)}fillSetter(g,w,C){typeof g=="string"?C.setAttribute(w,g):g&&this.complexColor(g,w,C)}hrefSetter(g,w,C){C.setAttributeNS("http://www.w3.org/1999/xlink",w,g)}getBBox(g,w){let C,q,ce,j,{alignValue:U,element:ne,renderer:ge,styles:R,textStr:G}=this,{cache:ie,cacheKeys:ue}=ge,de=ne.namespaceURI===this.SVG_NS,ye=S(w,this.rotation,0),Se=ge.styledMode?ne&&re.prototype.getStyle.call(ne,"font-size"):R.fontSize;if(Q(G)&&((j=G.toString()).indexOf("<")===-1&&(j=j.replace(/\d/g,"0")),j+=["",ge.rootFontSize,Se,ye,this.textWidth,U,R.textOverflow,R.fontWeight].join(",")),j&&!g&&(C=ie[j]),!C||C.polygon){if(de||ge.forExport){try{ce=this.fakeTS&&function(Ae){let Ne=ne.querySelector(".highcharts-text-outline");Ne&&$(Ne,{display:Ae})},K(ce)&&ce("none"),C=ne.getBBox?V({},ne.getBBox()):{width:ne.offsetWidth,height:ne.offsetHeight,x:0,y:0},K(ce)&&ce("")}catch{}(!C||C.width<0)&&(C={x:0,y:0,width:0,height:0})}else C=this.htmlGetBBox();q=C.height,de&&(C.height=q={"11px,17":14,"13px,20":16}[`${Se||""},${Math.round(q)}`]||q),ye&&(C=this.getRotatedBox(C,ye));let Ce={bBox:C};le(this,"afterGetBBox",Ce),C=Ce.bBox}if(j&&(G===""||C.height>0)){for(;ue.length>250;)delete ie[ue.shift()];ie[j]||ue.push(j),ie[j]=C}return C}getRotatedBox(g,w){let{x:C,y:q,width:ce,height:j}=g,{alignValue:U,translateY:ne,rotationOriginX:ge=0,rotationOriginY:R=0}=this,G={right:1,center:.5}[U||0]||0,ie=Number(this.element.getAttribute("y")||0)-(ne?0:q),ue=w*N,de=(w-90)*N,ye=Math.cos(ue),Se=Math.sin(ue),Ce=ce*ye,Ae=ce*Se,Ne=Math.cos(de),Re=Math.sin(de),[[fe,pe],[ve,be]]=[ge,R].map(pt=>[pt-pt*ye,pt*Se]),ke=C+G*(ce-Ce)+fe+be+ie*Ne,Ee=ke+Ce,_e=Ee-j*Ne,Le=_e-Ce,Be=q+ie-G*Ae-pe+ve+ie*Re,$e=Be+Ae,Me=$e-j*Re,ze=Me-Ae,Xe=Math.min(ke,Ee,_e,Le),Ve=Math.min(Be,$e,Me,ze),Ie=Math.max(ke,Ee,_e,Le)-Xe,Ge=Math.max(Be,$e,Me,ze)-Ve;return{x:Xe,y:Ve,width:Ie,height:Ge,polygon:[[ke,Be],[Ee,$e],[_e,Me],[Le,ze]]}}getStyle(g){return F.getComputedStyle(this.element||this,"").getPropertyValue(g)}hasClass(g){return(""+this.attr("class")).split(" ").indexOf(g)!==-1}hide(){return this.attr({visibility:"hidden"})}htmlGetBBox(){return{height:0,width:0,x:0,y:0}}constructor(g,w){this.onEvents={},this.opacity=1,this.SVG_NS=D,this.element=w==="span"||w==="body"?B(w):Z.createElementNS(this.SVG_NS,w),this.renderer=g,this.styles={},le(this,"afterInit")}on(g,w){let{onEvents:C}=this;return C[g]&&C[g](),C[g]=ae(this.element,g,w),this}opacitySetter(g,w,C){let q=Number(Number(g).toFixed(3));this.opacity=q,C.setAttribute(w,q)}reAlign(){var g;(g=this.alignOptions)!=null&&g.width&&this.alignOptions.align!=="left"&&(this.alignOptions.width=this.getBBox().width,this.placed=!1,this.align())}removeClass(g){return this.attr("class",(""+this.attr("class")).replace(X(g)?RegExp(`(^| )${g}( |$)`):g," ").replace(/ +/g," ").trim())}removeTextOutline(){let g=this.element.querySelector("tspan.highcharts-text-outline");g&&this.safeRemoveChild(g)}safeRemoveChild(g){let w=g.parentNode;w&&w.removeChild(g)}setRadialReference(g){let w=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=g,w&&w.radAttr&&w.animate(this.renderer.getRadialAttr(g,w.radAttr)),this}shadow(g){var ce;let{renderer:w}=this,C=H(((ce=this.parentGroup)==null?void 0:ce.rotation)===90?{offsetX:-1,offsetY:-1}:{},L(g)?g:{}),q=w.shadowDefinition(C);return this.attr({filter:g?`url(${w.url}#${q})`:"none"})}show(g=!0){return this.attr({visibility:g?"inherit":"visible"})}"stroke-widthSetter"(g,w,C){this[w]=g,C.setAttribute(w,g)}strokeWidth(){if(!this.renderer.styledMode)return this["stroke-width"]||0;let g=this.getStyle("stroke-width"),w=0,C;return/px$/.test(g)?w=T(g):g!==""&&(ee(C=Z.createElementNS(D,"rect"),{width:g,"stroke-width":0}),this.element.parentNode.appendChild(C),w=C.getBBox().width,C.parentNode.removeChild(C)),w}symbolAttr(g){let w=this;re.symbolCustomAttribs.forEach(function(C){w[C]=S(g[C],w[C])}),w.attr({d:w.renderer.symbols[w.symbolName](w.x,w.y,w.width,w.height,w)})}textSetter(g){g!==this.textStr&&(delete this.textPxLength,this.textStr=g,this.added&&this.renderer.buildText(this),this.reAlign())}titleSetter(g){let w=this.element,C=w.getElementsByTagName("title")[0]||Z.createElementNS(this.SVG_NS,"title");w.insertBefore?w.insertBefore(C,w.firstChild):w.appendChild(C),C.textContent=P(S(g,""),[/<[^>]*>/g,""]).replace(/&lt;/g,"<").replace(/&gt;/g,">")}toFront(){let g=this.element;return g.parentNode.appendChild(g),this}translate(g,w){return this.attr({translateX:g,translateY:w})}updateTransform(g="transform"){var ie;let{element:w,matrix:C,rotation:q=0,rotationOriginX:ce,rotationOriginY:j,scaleX:U,scaleY:ne,translateX:ge=0,translateY:R=0}=this,G=["translate("+ge+","+R+")"];Q(C)&&G.push("matrix("+C.join(",")+")"),q&&(G.push("rotate("+q+" "+S(ce,w.getAttribute("x"),0)+" "+S(j,w.getAttribute("y")||0)+")"),((ie=this.text)==null?void 0:ie.element.tagName)==="SPAN"&&this.text.attr({rotation:q,rotationOriginX:(ce||0)-this.padding,rotationOriginY:(j||0)-this.padding})),(Q(U)||Q(ne))&&G.push("scale("+S(U,1)+" "+S(ne,1)+")"),G.length&&!(this.text||this).textPath&&w.setAttribute(g,G.join(" "))}visibilitySetter(g,w,C){g==="inherit"?C.removeAttribute(w):this[w]!==g&&C.setAttribute(w,g),this[w]=g}xGetter(g){return this.element.nodeName==="circle"&&(g==="x"?g="cx":g==="y"&&(g="cy")),this._defaultGetter(g)}zIndexSetter(g,w){let C=this.renderer,q=this.parentGroup,ce=(q||C).element||C.box,j=this.element,U=ce===C.box,ne,ge,R,G=!1,ie,ue=this.added,de;if(Q(g)?(j.setAttribute("data-z-index",g),g=+g,this[w]===g&&(ue=!1)):Q(this[w])&&j.removeAttribute("data-z-index"),this[w]=g,ue){for((g=this.zIndex)&&q&&(q.handleZ=!0),de=(ne=ce.childNodes).length-1;de>=0&&!G;de--)ie=!Q(R=(ge=ne[de]).getAttribute("data-z-index")),ge!==j&&(g<0&&ie&&!U&&!de?(ce.insertBefore(j,ne[de]),G=!0):(T(R)<=g||ie&&(!Q(g)||g>=0))&&(ce.insertBefore(j,ne[de+1]),G=!0));G||(ce.insertBefore(j,ne[U?3:0]),G=!0)}return G}}return re.symbolCustomAttribs=["anchorX","anchorY","clockwise","end","height","innerR","r","start","width","x","y"],re.prototype.strokeSetter=re.prototype.fillSetter,re.prototype.yGetter=re.prototype.xGetter,re.prototype.matrixSetter=re.prototype.rotationOriginXSetter=re.prototype.rotationOriginYSetter=re.prototype.rotationSetter=re.prototype.scaleXSetter=re.prototype.scaleYSetter=re.prototype.translateXSetter=re.prototype.translateYSetter=re.prototype.verticalAlignSetter=function(me,g){this[g]=me,this.doTransform=!0},re}),c(o,"Core/Renderer/SVG/SVGLabel.js",[o["Core/Renderer/SVG/SVGElement.js"],o["Core/Utilities.js"]],function(d,p){let{defined:y,extend:x,isNumber:b,merge:k,pick:O,removeEvent:N}=p;class Z extends d{constructor(D,F,ae,ee,B,Y,$,Q,z,V){let le;super(D,"g"),this.paddingLeftSetter=this.paddingSetter,this.paddingRightSetter=this.paddingSetter,this.doUpdate=!1,this.textStr=F,this.x=ae,this.y=ee,this.anchorX=Y,this.anchorY=$,this.baseline=z,this.className=V,this.addClass(V==="button"?"highcharts-no-tooltip":"highcharts-label"),V&&this.addClass("highcharts-"+V),this.text=D.text(void 0,0,0,Q).attr({zIndex:1}),typeof B=="string"&&((le=/^url\((.*?)\)$/.test(B))||this.renderer.symbols[B])&&(this.symbolKey=B),this.bBox=Z.emptyBBox,this.padding=3,this.baselineOffset=0,this.needsBox=D.styledMode||le,this.deferredAttr={},this.alignFactor=0}alignSetter(D){let F={left:0,center:.5,right:1}[D];F!==this.alignFactor&&(this.alignFactor=F,this.bBox&&b(this.xSetting)&&this.attr({x:this.xSetting}))}anchorXSetter(D,F){this.anchorX=D,this.boxAttr(F,Math.round(D)-this.getCrispAdjust()-this.xSetting)}anchorYSetter(D,F){this.anchorY=D,this.boxAttr(F,D-this.ySetting)}boxAttr(D,F){this.box?this.box.attr(D,F):this.deferredAttr[D]=F}css(D){if(D){let F={};D=k(D),Z.textProps.forEach(ae=>{D[ae]!==void 0&&(F[ae]=D[ae],delete D[ae])}),this.text.css(F),"fontSize"in F||"fontWeight"in F?this.updateTextPadding():("width"in F||"textOverflow"in F)&&this.updateBoxSize()}return d.prototype.css.call(this,D)}destroy(){N(this.element,"mouseenter"),N(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),d.prototype.destroy.call(this)}fillSetter(D,F){D&&(this.needsBox=!0),this.fill=D,this.boxAttr(F,D)}getBBox(D,F){this.textStr&&this.bBox.width===0&&this.bBox.height===0&&this.updateBoxSize();let{padding:ae,height:ee=0,translateX:B=0,translateY:Y=0,width:$=0}=this,Q=O(this.paddingLeft,ae),z=F??(this.rotation||0),V={width:$,height:ee,x:B+this.bBox.x-Q,y:Y+this.bBox.y-ae+this.baselineOffset};return z&&(V=this.getRotatedBox(V,z)),V}getCrispAdjust(){return(this.renderer.styledMode&&this.box?this.box.strokeWidth():this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2}heightSetter(D){this.heightSetting=D,this.doUpdate=!0}afterSetters(){super.afterSetters(),this.doUpdate&&(this.updateBoxSize(),this.doUpdate=!1)}onAdd(){this.text.add(this),this.attr({text:O(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&y(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})}paddingSetter(D,F){b(D)?D!==this[F]&&(this[F]=D,this.updateTextPadding()):this[F]=void 0}rSetter(D,F){this.boxAttr(F,D)}strokeSetter(D,F){this.stroke=D,this.boxAttr(F,D)}"stroke-widthSetter"(D,F){D&&(this.needsBox=!0),this["stroke-width"]=D,this.boxAttr(F,D)}"text-alignSetter"(D){this.textAlign=D}textSetter(D){D!==void 0&&this.text.attr({text:D}),this.updateTextPadding(),this.reAlign()}updateBoxSize(){let D,F=this.text,ae={},ee=this.padding,B=this.bBox=(!b(this.widthSetting)||!b(this.heightSetting)||this.textAlign)&&y(F.textStr)?F.getBBox(void 0,0):Z.emptyBBox;this.width=this.getPaddedWidth(),this.height=(this.heightSetting||B.height||0)+2*ee;let Y=this.renderer.fontMetrics(F);if(this.baselineOffset=ee+Math.min((this.text.firstLineMetrics||Y).b,B.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-Y.h)/2),this.needsBox&&!F.textPath){if(!this.box){let $=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect();$.addClass((this.className==="button"?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),$.add(this)}D=this.getCrispAdjust(),ae.x=D,ae.y=(this.baseline?-this.baselineOffset:0)+D,ae.width=Math.round(this.width),ae.height=Math.round(this.height),this.box.attr(x(ae,this.deferredAttr)),this.deferredAttr={}}}updateTextPadding(){let D=this.text;if(!D.textPath){this.updateBoxSize();let F=this.baseline?0:this.baselineOffset,ae=O(this.paddingLeft,this.padding);y(this.widthSetting)&&this.bBox&&(this.textAlign==="center"||this.textAlign==="right")&&(ae+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width)),(ae!==D.x||F!==D.y)&&(D.attr("x",ae),D.hasBoxWidthChanged&&(this.bBox=D.getBBox(!0)),F!==void 0&&D.attr("y",F)),D.x=ae,D.y=F}}widthSetter(D){this.widthSetting=b(D)?D:void 0,this.doUpdate=!0}getPaddedWidth(){let D=this.padding,F=O(this.paddingLeft,D),ae=O(this.paddingRight,D);return(this.widthSetting||this.bBox.width||0)+F+ae}xSetter(D){this.x=D,this.alignFactor&&(D-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(D),this.attr("translateX",this.xSetting)}ySetter(D){this.ySetting=this.y=Math.round(D),this.attr("translateY",this.ySetting)}}return Z.emptyBBox={width:0,height:0,x:0,y:0},Z.textProps=["color","direction","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textDecoration","textOutline","textOverflow","whiteSpace","width"],Z}),c(o,"Core/Renderer/SVG/Symbols.js",[o["Core/Utilities.js"]],function(d){let{defined:p,isNumber:y,pick:x}=d;function b(N,Z,J,D,F){let ae=[];if(F){let ee=F.start||0,B=x(F.r,J),Y=x(F.r,D||J),$=2e-4/(F.borderRadius?1:Math.max(B,1)),Q=Math.abs((F.end||0)-ee-2*Math.PI)<$,z=(F.end||0)-(Q?$:0),V=F.innerR,le=x(F.open,Q),se=Math.cos(ee),K=Math.sin(ee),L=Math.cos(z),X=Math.sin(z),H=x(F.longArc,z-ee-Math.PI<$?0:1),A=["A",B,Y,0,H,x(F.clockwise,1),N+B*L,Z+Y*X];A.params={start:ee,end:z,cx:N,cy:Z},ae.push(["M",N+B*se,Z+Y*K],A),p(V)&&((A=["A",V,V,0,H,p(F.clockwise)?1-F.clockwise:0,N+V*se,Z+V*K]).params={start:z,end:ee,cx:N,cy:Z},ae.push(le?["M",N+V*L,Z+V*X]:["L",N+V*L,Z+V*X],A)),le||ae.push(["Z"])}return ae}function k(N,Z,J,D,F){return F&&F.r?O(N,Z,J,D,F):[["M",N,Z],["L",N+J,Z],["L",N+J,Z+D],["L",N,Z+D],["Z"]]}function O(N,Z,J,D,F){let ae=(F==null?void 0:F.r)||0;return[["M",N+ae,Z],["L",N+J-ae,Z],["A",ae,ae,0,0,1,N+J,Z+ae],["L",N+J,Z+D-ae],["A",ae,ae,0,0,1,N+J-ae,Z+D],["L",N+ae,Z+D],["A",ae,ae,0,0,1,N,Z+D-ae],["L",N,Z+ae],["A",ae,ae,0,0,1,N+ae,Z],["Z"]]}return{arc:b,callout:function(N,Z,J,D,F){let ae=Math.min(F&&F.r||0,J,D),ee=ae+6,B=F&&F.anchorX,Y=F&&F.anchorY||0,$=O(N,Z,J,D,{r:ae});if(!y(B)||B<J&&B>0&&Y<D&&Y>0)return $;if(N+B>J-ee)if(Y>Z+ee&&Y<Z+D-ee)$.splice(3,1,["L",N+J,Y-6],["L",N+J+6,Y],["L",N+J,Y+6],["L",N+J,Z+D-ae]);else if(B<J){let Q=Y<Z+ee,z=Q?Z:Z+D;$.splice(Q?2:5,0,["L",B,Y],["L",N+J-ae,z])}else $.splice(3,1,["L",N+J,D/2],["L",B,Y],["L",N+J,D/2],["L",N+J,Z+D-ae]);else if(N+B<ee)if(Y>Z+ee&&Y<Z+D-ee)$.splice(7,1,["L",N,Y+6],["L",N-6,Y],["L",N,Y-6],["L",N,Z+ae]);else if(B>0){let Q=Y<Z+ee,z=Q?Z:Z+D;$.splice(Q?1:6,0,["L",B,Y],["L",N+ae,z])}else $.splice(7,1,["L",N,D/2],["L",B,Y],["L",N,D/2],["L",N,Z+ae]);else Y>D&&B<J-ee?$.splice(5,1,["L",B+6,Z+D],["L",B,Z+D+6],["L",B-6,Z+D],["L",N+ae,Z+D]):Y<0&&B>ee&&$.splice(1,1,["L",B-6,Z],["L",B,Z-6],["L",B+6,Z],["L",J-ae,Z]);return $},circle:function(N,Z,J,D){return b(N+J/2,Z+D/2,J/2,D/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(N,Z,J,D){return[["M",N+J/2,Z],["L",N+J,Z+D/2],["L",N+J/2,Z+D],["L",N,Z+D/2],["Z"]]},rect:k,roundedRect:O,square:k,triangle:function(N,Z,J,D){return[["M",N+J/2,Z],["L",N+J,Z+D],["L",N,Z+D],["Z"]]},"triangle-down":function(N,Z,J,D){return[["M",N,Z],["L",N+J,Z],["L",N+J/2,Z+D],["Z"]]}}}),c(o,"Core/Renderer/SVG/TextBuilder.js",[o["Core/Renderer/HTML/AST.js"],o["Core/Globals.js"],o["Core/Utilities.js"]],function(d,p,y){let{doc:x,SVG_NS:b,win:k}=p,{attr:O,extend:N,fireEvent:Z,isString:J,objectEach:D,pick:F}=y;return class{constructor(ae){let ee=ae.styles;this.renderer=ae.renderer,this.svgElement=ae,this.width=ae.textWidth,this.textLineHeight=ee&&ee.lineHeight,this.textOutline=ee&&ee.textOutline,this.ellipsis=!!(ee&&ee.textOverflow==="ellipsis"),this.noWrap=!!(ee&&ee.whiteSpace==="nowrap")}buildSVG(){let ae=this.svgElement,ee=ae.element,B=ae.renderer,Y=F(ae.textStr,"").toString(),$=Y.indexOf("<")!==-1,Q=ee.childNodes,z=!ae.added&&B.box,V=[Y,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,ae.getStyle("font-size"),this.width].join(",");if(V!==ae.textCache){ae.textCache=V,delete ae.actualWidth;for(let le=Q.length;le--;)ee.removeChild(Q[le]);if($||this.ellipsis||this.width||ae.textPath||Y.indexOf(" ")!==-1&&(!this.noWrap||/<br.*?>/g.test(Y))){if(Y!==""){z&&z.appendChild(ee);let le=new d(Y);this.modifyTree(le.nodes),le.addToDOM(ee),this.modifyDOM(),this.ellipsis&&(ee.textContent||"").indexOf("…")!==-1&&ae.attr("title",this.unescapeEntities(ae.textStr||"",["&lt;","&gt;"])),z&&z.removeChild(ee)}}else ee.appendChild(x.createTextNode(this.unescapeEntities(Y)));J(this.textOutline)&&ae.applyTextOutline&&ae.applyTextOutline(this.textOutline)}}modifyDOM(){let ae,ee=this.svgElement,B=O(ee.element,"x");for(ee.firstLineMetrics=void 0;(ae=ee.element.firstChild)&&/^[\s\u200B]*$/.test(ae.textContent||" ");)ee.element.removeChild(ae);[].forEach.call(ee.element.querySelectorAll("tspan.highcharts-br"),(z,V)=>{z.nextSibling&&z.previousSibling&&(V===0&&z.previousSibling.nodeType===1&&(ee.firstLineMetrics=ee.renderer.fontMetrics(z.previousSibling)),O(z,{dy:this.getLineHeight(z.nextSibling),x:B}))});let Y=this.width||0;if(!Y)return;let $=(z,V)=>{let le=z.textContent||"",se=le.replace(/([^\^])-/g,"$1- ").split(" "),K=!this.noWrap&&(se.length>1||ee.element.childNodes.length>1),L=this.getLineHeight(V),X=0,H=ee.actualWidth;if(this.ellipsis)le&&this.truncate(z,le,void 0,0,Math.max(0,Y-.8*L),(A,S)=>A.substring(0,S)+"…");else if(K){let A=[],S=[];for(;V.firstChild&&V.firstChild!==z;)S.push(V.firstChild),V.removeChild(V.firstChild);for(;se.length;)se.length&&!this.noWrap&&X>0&&(A.push(z.textContent||""),z.textContent=se.join(" ").replace(/- /g,"-")),this.truncate(z,void 0,se,X===0&&H||0,Y,(T,E)=>se.slice(0,E).join(" ").replace(/- /g,"-")),H=ee.actualWidth,X++;S.forEach(T=>{V.insertBefore(T,z)}),A.forEach(T=>{V.insertBefore(x.createTextNode(T),z);let E=x.createElementNS(b,"tspan");E.textContent="​",O(E,{dy:L,x:B}),V.insertBefore(E,z)})}},Q=z=>{[].slice.call(z.childNodes).forEach(V=>{V.nodeType===k.Node.TEXT_NODE?$(V,z):(V.className.baseVal.indexOf("highcharts-br")!==-1&&(ee.actualWidth=0),Q(V))})};Q(ee.element)}getLineHeight(ae){let ee=ae.nodeType===k.Node.TEXT_NODE?ae.parentElement:ae;return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(ee||this.svgElement.element).h}modifyTree(ae){let ee=(B,Y)=>{let{attributes:$={},children:Q,style:z={},tagName:V}=B,le=this.renderer.styledMode;if(V==="b"||V==="strong"?le?$.class="highcharts-strong":z.fontWeight="bold":(V==="i"||V==="em")&&(le?$.class="highcharts-emphasized":z.fontStyle="italic"),z&&z.color&&(z.fill=z.color),V==="br"){$.class="highcharts-br",B.textContent="​";let se=ae[Y+1];se&&se.textContent&&(se.textContent=se.textContent.replace(/^ +/gm,""))}else V==="a"&&Q&&Q.some(se=>se.tagName==="#text")&&(B.children=[{children:Q,tagName:"tspan"}]);V!=="#text"&&V!=="a"&&(B.tagName="tspan"),N(B,{attributes:$,style:z}),Q&&Q.filter(se=>se.tagName!=="#text").forEach(ee)};ae.forEach(ee),Z(this.svgElement,"afterModifyTree",{nodes:ae})}truncate(ae,ee,B,Y,$,Q){let z,V,le=this.svgElement,{rotation:se}=le,K=[],L=B?1:0,X=(ee||B||"").length,H=X,A=function(S,T){let E=T||S,P=ae.parentNode;if(P&&K[E]===void 0&&P.getSubStringLength)try{K[E]=Y+P.getSubStringLength(0,B?E+1:E)}catch{}return K[E]};if(le.rotation=0,Y+(V=A(ae.textContent.length))>$){for(;L<=X;)H=Math.ceil((L+X)/2),B&&(z=Q(B,H)),V=A(H,z&&z.length-1),L===X?L=X+1:V>$?X=H-1:L=H;X===0?ae.textContent="":ee&&X===ee.length-1||(ae.textContent=z||Q(ee||B,H))}B&&B.splice(0,H),le.actualWidth=V,le.rotation=se}unescapeEntities(ae,ee){return D(this.renderer.escapes,function(B,Y){ee&&ee.indexOf(B)!==-1||(ae=ae.toString().replace(RegExp(B,"g"),Y))}),ae}}}),c(o,"Core/Renderer/SVG/SVGRenderer.js",[o["Core/Renderer/HTML/AST.js"],o["Core/Defaults.js"],o["Core/Color/Color.js"],o["Core/Globals.js"],o["Core/Renderer/RendererRegistry.js"],o["Core/Renderer/SVG/SVGElement.js"],o["Core/Renderer/SVG/SVGLabel.js"],o["Core/Renderer/SVG/Symbols.js"],o["Core/Renderer/SVG/TextBuilder.js"],o["Core/Utilities.js"]],function(d,p,y,x,b,k,O,N,Z,J){let D,{defaultOptions:F}=p,{charts:ae,deg2rad:ee,doc:B,isFirefox:Y,isMS:$,isWebKit:Q,noop:z,SVG_NS:V,symbolSizes:le,win:se}=x,{addEvent:K,attr:L,createElement:X,crisp:H,css:A,defined:S,destroyObjectProperties:T,extend:E,isArray:P,isNumber:te,isObject:_,isString:re,merge:me,pick:g,pInt:w,replaceNested:C,uniqueKey:q}=J;class ce{constructor(U,ne,ge,R,G,ie,ue){let de,ye,Se=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),Ce=Se.element;ue||Se.css(this.getStyle(R||{})),U.appendChild(Ce),L(U,"dir","ltr"),U.innerHTML.indexOf("xmlns")===-1&&L(Ce,"xmlns",this.SVG_NS),this.box=Ce,this.boxWrapper=Se,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(B.createTextNode("Created with Highcharts 11.4.8")),this.defs=this.createElement("defs").add(),this.allowHTML=ie,this.forExport=G,this.styledMode=ue,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.rootFontSize=Se.getStyle("font-size"),this.setSize(ne,ge,!1),Y&&U.getBoundingClientRect&&((de=function(){A(U,{left:0,top:0}),ye=U.getBoundingClientRect(),A(U,{left:Math.ceil(ye.left)-ye.left+"px",top:Math.ceil(ye.top)-ye.top+"px"})})(),this.unSubPixelFix=K(se,"resize",de))}definition(U){return new d([U]).addToDOM(this.defs.element)}getReferenceURL(){if((Y||Q)&&B.getElementsByTagName("base").length){if(!S(D)){let U=q(),ne=new d([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:U},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":`url(#${U})`,fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(B.body);A(ne,{position:"fixed",top:0,left:0,zIndex:9e5});let ge=B.elementFromPoint(6,6);D=(ge&&ge.id)==="hitme",B.body.removeChild(ne)}if(D)return C(se.location.href.split("#")[0],[/<[^>]*>/g,""],[/([\('\)])/g,"\\$1"],[/ /g,"%20"])}return""}getStyle(U){return this.style=E({fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1rem"},U),this.style}setStyle(U){this.boxWrapper.css(this.getStyle(U))}isHidden(){return!this.boxWrapper.getBBox().width}destroy(){let U=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),T(this.gradients||{}),this.gradients=null,this.defs=U.destroy(),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null,null}createElement(U){return new this.Element(this,U)}getRadialAttr(U,ne){return{cx:U[0]-U[2]/2+(ne.cx||0)*U[2],cy:U[1]-U[2]/2+(ne.cy||0)*U[2],r:(ne.r||0)*U[2]}}shadowDefinition(U){let ne=[`highcharts-drop-shadow-${this.chartIndex}`,...Object.keys(U).map(R=>`${R}-${U[R]}`)].join("-").toLowerCase().replace(/[^a-z\d\-]/g,""),ge=me({color:"#000000",offsetX:1,offsetY:1,opacity:.15,width:5},U);return this.defs.element.querySelector(`#${ne}`)||this.definition({tagName:"filter",attributes:{id:ne,filterUnits:ge.filterUnits},children:this.getShadowFilterContent(ge)}),ne}getShadowFilterContent(U){return[{tagName:"feDropShadow",attributes:{dx:U.offsetX,dy:U.offsetY,"flood-color":U.color,"flood-opacity":Math.min(5*U.opacity,1),stdDeviation:U.width/2}}]}buildText(U){new Z(U).buildSVG()}getContrast(U){let ne=y.parse(U).rgba.map(R=>{let G=R/255;return G<=.03928?G/12.92:Math.pow((G+.055)/1.055,2.4)}),ge=.2126*ne[0]+.7152*ne[1]+.0722*ne[2];return 1.05/(ge+.05)>(ge+.05)/.05?"#FFFFFF":"#000000"}button(U,ne,ge,R,G={},ie,ue,de,ye,Se){let Ce=this.label(U,ne,ge,ye,void 0,void 0,Se,void 0,"button"),Ae=this.styledMode,Ne=arguments,Re=0;G=me(F.global.buttonTheme,G),Ae&&(delete G.fill,delete G.stroke,delete G["stroke-width"]);let fe=G.states||{},pe=G.style||{};delete G.states,delete G.style;let ve=[d.filterUserAttributes(G)],be=[pe];return Ae||["hover","select","disabled"].forEach((ke,Ee)=>{ve.push(me(ve[0],d.filterUserAttributes(Ne[Ee+5]||fe[ke]||{}))),be.push(ve[Ee+1].style),delete ve[Ee+1].style}),K(Ce.element,$?"mouseover":"mouseenter",function(){Re!==3&&Ce.setState(1)}),K(Ce.element,$?"mouseout":"mouseleave",function(){Re!==3&&Ce.setState(Re)}),Ce.setState=(ke=0)=>{if(ke!==1&&(Ce.state=Re=ke),Ce.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][ke]),!Ae){Ce.attr(ve[ke]);let Ee=be[ke];_(Ee)&&Ce.css(Ee)}},Ce.attr(ve[0]),!Ae&&(Ce.css(E({cursor:"default"},pe)),Se&&Ce.text.css({pointerEvents:"none"})),Ce.on("touchstart",ke=>ke.stopPropagation()).on("click",function(ke){Re!==3&&R.call(Ce,ke)})}crispLine(U,ne){let[ge,R]=U;return S(ge[1])&&ge[1]===R[1]&&(ge[1]=R[1]=H(ge[1],ne)),S(ge[2])&&ge[2]===R[2]&&(ge[2]=R[2]=H(ge[2],ne)),U}path(U){let ne=this.styledMode?{}:{fill:"none"};return P(U)?ne.d=U:_(U)&&E(ne,U),this.createElement("path").attr(ne)}circle(U,ne,ge){let R=_(U)?U:U===void 0?{}:{x:U,y:ne,r:ge},G=this.createElement("circle");return G.xSetter=G.ySetter=function(ie,ue,de){de.setAttribute("c"+ue,ie)},G.attr(R)}arc(U,ne,ge,R,G,ie){let ue;_(U)?(ne=(ue=U).y,ge=ue.r,R=ue.innerR,G=ue.start,ie=ue.end,U=ue.x):ue={innerR:R,start:G,end:ie};let de=this.symbol("arc",U,ne,ge,ge,ue);return de.r=ge,de}rect(U,ne,ge,R,G,ie){let ue=_(U)?U:U===void 0?{}:{x:U,y:ne,r:G,width:Math.max(ge||0,0),height:Math.max(R||0,0)},de=this.createElement("rect");return this.styledMode||(ie!==void 0&&(ue["stroke-width"]=ie,E(ue,de.crisp(ue))),ue.fill="none"),de.rSetter=function(ye,Se,Ce){de.r=ye,L(Ce,{rx:ye,ry:ye})},de.rGetter=function(){return de.r||0},de.attr(ue)}roundedRect(U){return this.symbol("roundedRect").attr(U)}setSize(U,ne,ge){this.width=U,this.height=ne,this.boxWrapper.animate({width:U,height:ne},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:g(ge,!0)?void 0:0}),this.alignElements()}g(U){let ne=this.createElement("g");return U?ne.attr({class:"highcharts-"+U}):ne}image(U,ne,ge,R,G,ie){let ue={preserveAspectRatio:"none"};te(ne)&&(ue.x=ne),te(ge)&&(ue.y=ge),te(R)&&(ue.width=R),te(G)&&(ue.height=G);let de=this.createElement("image").attr(ue),ye=function(Se){de.attr({href:U}),ie.call(de,Se)};if(ie){de.attr({href:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="});let Se=new se.Image;K(Se,"load",ye),Se.src=U,Se.complete&&ye({})}else de.attr({href:U});return de}symbol(U,ne,ge,R,G,ie){let ue,de,ye,Se,Ce=this,Ae=/^url\((.*?)\)$/,Ne=Ae.test(U),Re=!Ne&&(this.symbols[U]?U:"circle"),fe=Re&&this.symbols[Re];if(fe)typeof ne=="number"&&(de=fe.call(this.symbols,ne||0,ge||0,R||0,G||0,ie)),ue=this.path(de),Ce.styledMode||ue.attr("fill","none"),E(ue,{symbolName:Re||void 0,x:ne,y:ge,width:R,height:G}),ie&&E(ue,ie);else if(Ne){ye=U.match(Ae)[1];let pe=ue=this.image(ye);pe.imgwidth=g(ie&&ie.width,le[ye]&&le[ye].width),pe.imgheight=g(ie&&ie.height,le[ye]&&le[ye].height),Se=ve=>ve.attr({width:ve.width,height:ve.height}),["width","height"].forEach(ve=>{pe[`${ve}Setter`]=function(be,ke){this[ke]=be;let{alignByTranslate:Ee,element:_e,width:Le,height:Be,imgwidth:$e,imgheight:Me}=this,ze=ke==="width"?$e:Me,Xe=1;ie&&ie.backgroundSize==="within"&&Le&&Be&&$e&&Me?(Xe=Math.min(Le/$e,Be/Me),L(_e,{width:Math.round($e*Xe),height:Math.round(Me*Xe)})):_e&&ze&&_e.setAttribute(ke,ze),!Ee&&$e&&Me&&this.translate(((Le||0)-$e*Xe)/2,((Be||0)-Me*Xe)/2)}}),S(ne)&&pe.attr({x:ne,y:ge}),pe.isImg=!0,pe.symbolUrl=U,S(pe.imgwidth)&&S(pe.imgheight)?Se(pe):(pe.attr({width:0,height:0}),X("img",{onload:function(){let ve=ae[Ce.chartIndex];this.width===0&&(A(this,{position:"absolute",top:"-999em"}),B.body.appendChild(this)),le[ye]={width:this.width,height:this.height},pe.imgwidth=this.width,pe.imgheight=this.height,pe.element&&Se(pe),this.parentNode&&this.parentNode.removeChild(this),Ce.imgCount--,Ce.imgCount||!ve||ve.hasLoaded||ve.onload()},src:ye}),this.imgCount++)}return ue}clipRect(U,ne,ge,R){return this.rect(U,ne,ge,R,0)}text(U,ne,ge,R){let G={};if(R&&(this.allowHTML||!this.forExport))return this.html(U,ne,ge);G.x=Math.round(ne||0),ge&&(G.y=Math.round(ge)),S(U)&&(G.text=U);let ie=this.createElement("text").attr(G);return R&&(!this.forExport||this.allowHTML)||(ie.xSetter=function(ue,de,ye){let Se=ye.getElementsByTagName("tspan"),Ce=ye.getAttribute(de);for(let Ae=0,Ne;Ae<Se.length;Ae++)(Ne=Se[Ae]).getAttribute(de)===Ce&&Ne.setAttribute(de,ue);ye.setAttribute(de,ue)}),ie}fontMetrics(U){let ne=w(k.prototype.getStyle.call(U,"font-size")||0),ge=ne<24?ne+3:Math.round(1.2*ne),R=Math.round(.8*ge);return{h:ge,b:R,f:ne}}rotCorr(U,ne,ge){let R=U;return ne&&ge&&(R=Math.max(R*Math.cos(ne*ee),4)),{x:-U/3*Math.sin(ne*ee),y:R}}pathToSegments(U){let ne=[],ge=[],R={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2};for(let G=0;G<U.length;G++)re(ge[0])&&te(U[G])&&ge.length===R[ge[0].toUpperCase()]&&U.splice(G,0,ge[0].replace("M","L").replace("m","l")),typeof U[G]=="string"&&(ge.length&&ne.push(ge.slice(0)),ge.length=0),ge.push(U[G]);return ne.push(ge.slice(0)),ne}label(U,ne,ge,R,G,ie,ue,de,ye){return new O(this,U,ne,ge,R,G,ie,ue,de,ye)}alignElements(){this.alignedObjects.forEach(U=>U.align())}}return E(ce.prototype,{Element:k,SVG_NS:V,escapes:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},symbols:N,draw:z}),b.registerRendererType("svg",ce,!0),ce}),c(o,"Core/Renderer/HTML/HTMLElement.js",[o["Core/Renderer/HTML/AST.js"],o["Core/Globals.js"],o["Core/Renderer/SVG/SVGElement.js"],o["Core/Utilities.js"]],function(d,p,y,x){let{composed:b}=p,{attr:k,css:O,createElement:N,defined:Z,extend:J,pInt:D,pushUnique:F}=x;function ae($,Q,z){var le;let V=((le=this.div)==null?void 0:le.style)||z.style;y.prototype[`${Q}Setter`].call(this,$,Q,z),V&&(V[Q]=$)}let ee=($,Q)=>{var z;if(!$.div){let V=k($.element,"class"),le=$.css,se=N("div",V?{className:V}:void 0,{position:"absolute",left:`${$.translateX||0}px`,top:`${$.translateY||0}px`,...$.styles,display:$.display,opacity:$.opacity,visibility:$.visibility},((z=$.parentGroup)==null?void 0:z.div)||Q);$.classSetter=(K,L,X)=>{X.setAttribute("class",K),se.className=K},$.translateXSetter=$.translateYSetter=(K,L)=>{$[L]=K,se.style[L==="translateX"?"left":"top"]=`${K}px`,$.doTransform=!0},$.opacitySetter=$.visibilitySetter=ae,$.css=K=>(le.call($,K),K.cursor&&(se.style.cursor=K.cursor),K.pointerEvents&&(se.style.pointerEvents=K.pointerEvents),$),$.on=function(){return y.prototype.on.apply({element:se,onEvents:$.onEvents},arguments),$},$.div=se}return $.div};class B extends y{static compose(Q){F(b,this.compose)&&(Q.prototype.html=function(z,V,le){return new B(this,"span").attr({text:z,x:Math.round(V),y:Math.round(le)})})}constructor(Q,z){super(Q,z),this.css({position:"absolute",...Q.styledMode?{}:{fontFamily:Q.style.fontFamily,fontSize:Q.style.fontSize}}),this.element.style.whiteSpace="nowrap"}getSpanCorrection(Q,z,V){this.xCorr=-Q*V,this.yCorr=-z}css(Q){let z,{element:V}=this,le=V.tagName==="SPAN"&&Q&&"width"in Q,se=le&&Q.width;return le&&(delete Q.width,this.textWidth=D(se)||void 0,z=!0),(Q==null?void 0:Q.textOverflow)==="ellipsis"&&(Q.whiteSpace="nowrap",Q.overflow="hidden"),J(this.styles,Q),O(V,Q),z&&this.updateTransform(),this}htmlGetBBox(){let{element:Q}=this;return{x:Q.offsetLeft,y:Q.offsetTop,width:Q.offsetWidth,height:Q.offsetHeight}}updateTransform(){var te;if(!this.added){this.alignOnAdd=!0;return}let{element:Q,renderer:z,rotation:V,rotationOriginX:le,rotationOriginY:se,styles:K,textAlign:L="left",textWidth:X,translateX:H=0,translateY:A=0,x:S=0,y:T=0}=this,E={left:0,center:.5,right:1}[L],P=K.whiteSpace;if(O(Q,{marginLeft:`${H}px`,marginTop:`${A}px`}),Q.tagName==="SPAN"){let _=[V,L,Q.innerHTML,X,this.textAlign].join(","),re=-(((te=this.parentGroup)==null?void 0:te.padding)*1)||0,me,g=!1;if(X!==this.oldTextWidth){let j=this.textPxLength?this.textPxLength:(O(Q,{width:"",whiteSpace:P||"nowrap"}),Q.offsetWidth),U=X||0;(U>this.oldTextWidth||j>U)&&(/[ \-]/.test(Q.textContent||Q.innerText)||Q.style.textOverflow==="ellipsis")&&(O(Q,{width:j>U||V?X+"px":"auto",display:"block",whiteSpace:P||"normal"}),this.oldTextWidth=X,g=!0)}this.hasBoxWidthChanged=g,_!==this.cTT&&(me=z.fontMetrics(Q).b,Z(V)&&(V!==(this.oldRotation||0)||L!==this.oldAlign)&&this.setSpanRotation(V,re,re),this.getSpanCorrection(!Z(V)&&this.textPxLength||Q.offsetWidth,me,E));let{xCorr:w=0,yCorr:C=0}=this,q=(le??S)-w-S-re,ce=(se??T)-C-T-re;O(Q,{left:`${S+w}px`,top:`${T+C}px`,transformOrigin:`${q}px ${ce}px`}),this.cTT=_,this.oldRotation=V,this.oldAlign=L}}setSpanRotation(Q,z,V){O(this.element,{transform:`rotate(${Q}deg)`,transformOrigin:`${z}% ${V}px`})}add(Q){let z,V=this.renderer.box.parentNode,le=[];if(this.parentGroup=Q,Q&&!(z=Q.div)){let se=Q;for(;se;)le.push(se),se=se.parentGroup;for(let K of le.reverse())z=ee(K,V)}return(z||V).appendChild(this.element),this.added=!0,this.alignOnAdd&&this.updateTransform(),this}textSetter(Q){Q!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,d.setElementHTML(this.element,Q??""),this.textStr=Q,this.doTransform=!0)}alignSetter(Q){this.alignValue=this.textAlign=Q,this.doTransform=!0}xSetter(Q,z){this[z]=Q,this.doTransform=!0}}let Y=B.prototype;return Y.visibilitySetter=Y.opacitySetter=ae,Y.ySetter=Y.rotationSetter=Y.rotationOriginXSetter=Y.rotationOriginYSetter=Y.xSetter,B}),c(o,"Core/Axis/AxisDefaults.js",[],function(){var d,p;return(p=d||(d={})).xAxis={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e %b"},week:{main:"%e %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotationLimit:80,distance:15,enabled:!0,indentation:10,overflow:"justify",reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,zIndex:7,style:{color:"#333333",cursor:"default",fontSize:"0.8em"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minorTicksPerMajor:5,minPadding:.01,offset:void 0,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",useHTML:!1,x:0,y:0,style:{color:"#666666",fontSize:"0.8em"}},visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#333333",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#333333"},p.yAxis={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:void 0},startOnTick:!0,title:{text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){let{numberFormatter:y}=this.axis.chart;return y(this.total||0,-1)},style:{color:"#000000",fontSize:"0.7em",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},d}),c(o,"Core/Foundation.js",[o["Core/Utilities.js"]],function(d){var p;let{addEvent:y,isFunction:x,objectEach:b,removeEvent:k}=d;return(p||(p={})).registerEventOptions=function(O,N){O.eventOptions=O.eventOptions||{},b(N.events,function(Z,J){O.eventOptions[J]!==Z&&(O.eventOptions[J]&&(k(O,J,O.eventOptions[J]),delete O.eventOptions[J]),x(Z)&&(O.eventOptions[J]=Z,y(O,J,Z,{order:0})))})},p}),c(o,"Core/Axis/Tick.js",[o["Core/Templating.js"],o["Core/Globals.js"],o["Core/Utilities.js"]],function(d,p,y){let{deg2rad:x}=p,{clamp:b,correctFloat:k,defined:O,destroyObjectProperties:N,extend:Z,fireEvent:J,isNumber:D,merge:F,objectEach:ae,pick:ee}=y;return class{constructor(B,Y,$,Q,z){this.isNew=!0,this.isNewLabel=!0,this.axis=B,this.pos=Y,this.type=$||"",this.parameters=z||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,J(this,"init"),$||Q||this.addLabel()}addLabel(){let B=this,Y=B.axis,$=Y.options,Q=Y.chart,z=Y.categories,V=Y.logarithmic,le=Y.names,se=B.pos,K=ee(B.options&&B.options.labels,$.labels),L=Y.tickPositions,X=se===L[0],H=se===L[L.length-1],A=(!K.step||K.step===1)&&Y.tickInterval===1,S=L.info,T=B.label,E,P,te,_=this.parameters.category||(z?ee(z[se],le[se],se):se);V&&D(_)&&(_=k(V.lin2log(_))),Y.dateTime&&(S?E=(P=Q.time.resolveDTLFormat($.dateTimeLabelFormats[!$.grid&&S.higherRanks[se]||S.unitName])).main:D(_)&&(E=Y.dateTime.getXDateFormat(_,$.dateTimeLabelFormats||{}))),B.isFirst=X,B.isLast=H;let re={axis:Y,chart:Q,dateTimeLabelFormat:E,isFirst:X,isLast:H,pos:se,tick:B,tickPositionInfo:S,value:_};J(this,"labelFormat",re);let me=C=>K.formatter?K.formatter.call(C,C):K.format?(C.text=Y.defaultLabelFormatter.call(C),d.format(K.format,C,Q)):Y.defaultLabelFormatter.call(C),g=me.call(re,re),w=P&&P.list;w?B.shortenLabel=function(){for(te=0;te<w.length;te++)if(Z(re,{dateTimeLabelFormat:w[te]}),T.attr({text:me.call(re,re)}),T.getBBox().width<Y.getSlotWidth(B)-2*(K.padding||0))return;T.attr({text:""})}:B.shortenLabel=void 0,A&&Y._addedPlotLB&&B.moveLabel(g,K),O(T)||B.movedLabel?T&&T.textStr!==g&&!A&&(!T.textWidth||K.style.width||T.styles.width||T.css({width:null}),T.attr({text:g}),T.textPxLength=T.getBBox().width):(B.label=T=B.createLabel(g,K),B.rotation=0)}createLabel(B,Y,$){let Q=this.axis,z=Q.chart,V=O(B)&&Y.enabled?z.renderer.text(B,$==null?void 0:$.x,$==null?void 0:$.y,Y.useHTML).add(Q.labelGroup):void 0;return V&&(z.styledMode||V.css(F(Y.style)),V.textPxLength=V.getBBox().width),V}destroy(){N(this,this.axis)}getPosition(B,Y,$,Q){let z=this.axis,V=z.chart,le=Q&&V.oldChartHeight||V.chartHeight,se={x:B?k(z.translate(Y+$,void 0,void 0,Q)+z.transB):z.left+z.offset+(z.opposite?(Q&&V.oldChartWidth||V.chartWidth)-z.right-z.left:0),y:B?le-z.bottom+z.offset-(z.opposite?z.height:0):k(le-z.translate(Y+$,void 0,void 0,Q)-z.transB)};return se.y=b(se.y,-1e9,1e9),J(this,"afterGetPosition",{pos:se}),se}getLabelPosition(B,Y,$,Q,z,V,le,se){let K,L,X=this.axis,H=X.transA,A=X.isLinked&&X.linkedParent?X.linkedParent.reversed:X.reversed,S=X.staggerLines,T=X.tickRotCorr||{x:0,y:0},E=Q||X.reserveSpaceDefault?0:-X.labelOffset*(X.labelAlign==="center"?.5:1),P=z.distance,te={};return K=X.side===0?$.rotation?-P:-$.getBBox().height:X.side===2?T.y+P:Math.cos($.rotation*x)*(T.y-$.getBBox(!1,0).height/2),O(z.y)&&(K=X.side===0&&X.horiz?z.y+K:z.y),B=B+ee(z.x,[0,1,0,-1][X.side]*P)+E+T.x-(V&&Q?V*H*(A?-1:1):0),Y=Y+K-(V&&!Q?V*H*(A?1:-1):0),S&&(L=le/(se||1)%S,X.opposite&&(L=S-L-1),Y+=L*(X.labelOffset/S)),te.x=B,te.y=Math.round(Y),J(this,"afterGetLabelPosition",{pos:te,tickmarkOffset:V,index:le}),te}getLabelSize(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0}getMarkPath(B,Y,$,Q,z=!1,V){return V.crispLine([["M",B,Y],["L",B+(z?0:-$),Y+(z?$:0)]],Q)}handleOverflow(B){let Y=this.axis,$=Y.options.labels,Q=B.x,z=Y.chart.chartWidth,V=Y.chart.spacing,le=ee(Y.labelLeft,Math.min(Y.pos,V[3])),se=ee(Y.labelRight,Math.max(Y.isRadial?0:Y.pos+Y.len,z-V[1])),K=this.label,L=this.rotation,X={left:0,center:.5,right:1}[Y.labelAlign||K.attr("align")],H=K.getBBox().width,A=Y.getSlotWidth(this),S={},T=A,E=1,P,te,_;L||$.overflow!=="justify"?L<0&&Q-X*H<le?_=Math.round(Q/Math.cos(L*x)-le):L>0&&Q+X*H>se&&(_=Math.round((z-Q)/Math.cos(L*x))):(P=Q-X*H,te=Q+(1-X)*H,P<le?T=B.x+T*(1-X)-le:te>se&&(T=se-B.x+T*X,E=-1),(T=Math.min(A,T))<A&&Y.labelAlign==="center"&&(B.x+=E*(A-T-X*(A-Math.min(H,T)))),(H>T||Y.autoRotation&&(K.styles||{}).width)&&(_=T)),_&&(this.shortenLabel?this.shortenLabel():(S.width=Math.floor(_)+"px",($.style||{}).textOverflow||(S.textOverflow="ellipsis"),K.css(S)))}moveLabel(B,Y){let $=this,Q=$.label,z=$.axis,V=!1,le;Q&&Q.textStr===B?($.movedLabel=Q,V=!0,delete $.label):ae(z.ticks,function(se){V||se.isNew||se===$||!se.label||se.label.textStr!==B||($.movedLabel=se.label,V=!0,se.labelPos=$.movedLabel.xy,delete se.label)}),!V&&($.labelPos||Q)&&(le=$.labelPos||Q.xy,$.movedLabel=$.createLabel(B,Y,le),$.movedLabel&&$.movedLabel.attr({opacity:0}))}render(B,Y,$){let Q=this.axis,z=Q.horiz,V=this.pos,le=ee(this.tickmarkOffset,Q.tickmarkOffset),se=this.getPosition(z,V,le,Y),K=se.x,L=se.y,X=Q.pos,H=X+Q.len,A=z?K:L;!Q.chart.polar&&this.isNew&&(k(A)<X||A>H)&&($=0);let S=ee($,this.label&&this.label.newOpacity,1);$=ee($,1),this.isActive=!0,this.renderGridLine(Y,$),this.renderMark(se,$),this.renderLabel(se,Y,S,B),this.isNew=!1,J(this,"afterRender")}renderGridLine(B,Y){let $=this.axis,Q=$.options,z={},V=this.pos,le=this.type,se=ee(this.tickmarkOffset,$.tickmarkOffset),K=$.chart.renderer,L=this.gridLine,X,H=Q.gridLineWidth,A=Q.gridLineColor,S=Q.gridLineDashStyle;this.type==="minor"&&(H=Q.minorGridLineWidth,A=Q.minorGridLineColor,S=Q.minorGridLineDashStyle),L||($.chart.styledMode||(z.stroke=A,z["stroke-width"]=H||0,z.dashstyle=S),le||(z.zIndex=1),B&&(Y=0),this.gridLine=L=K.path().attr(z).addClass("highcharts-"+(le?le+"-":"")+"grid-line").add($.gridGroup)),L&&(X=$.getPlotLinePath({value:V+se,lineWidth:L.strokeWidth(),force:"pass",old:B,acrossPanes:!1}))&&L[B||this.isNew?"attr":"animate"]({d:X,opacity:Y})}renderMark(B,Y){let $=this.axis,Q=$.options,z=$.chart.renderer,V=this.type,le=$.tickSize(V?V+"Tick":"tick"),se=B.x,K=B.y,L=ee(Q[V!=="minor"?"tickWidth":"minorTickWidth"],!V&&$.isXAxis?1:0),X=Q[V!=="minor"?"tickColor":"minorTickColor"],H=this.mark,A=!H;le&&($.opposite&&(le[0]=-le[0]),H||(this.mark=H=z.path().addClass("highcharts-"+(V?V+"-":"")+"tick").add($.axisGroup),$.chart.styledMode||H.attr({stroke:X,"stroke-width":L})),H[A?"attr":"animate"]({d:this.getMarkPath(se,K,le[0],H.strokeWidth(),$.horiz,z),opacity:Y}))}renderLabel(B,Y,$,Q){let z=this.axis,V=z.horiz,le=z.options,se=this.label,K=le.labels,L=K.step,X=ee(this.tickmarkOffset,z.tickmarkOffset),H=B.x,A=B.y,S=!0;se&&D(H)&&(se.xy=B=this.getLabelPosition(H,A,se,V,K,X,Q,L),(!this.isFirst||this.isLast||le.showFirstLabel)&&(!this.isLast||this.isFirst||le.showLastLabel)?!V||K.step||K.rotation||Y||$===0||this.handleOverflow(B):S=!1,L&&Q%L&&(S=!1),S&&D(B.y)?(B.opacity=$,se[this.isNewLabel?"attr":"animate"](B).show(!0),this.isNewLabel=!1):(se.hide(),this.isNewLabel=!0))}replaceMovedLabel(){let B=this.label,Y=this.axis;B&&!this.isNew&&(B.animate({opacity:0},void 0,B.destroy),delete this.label),Y.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel}}}),c(o,"Core/Axis/Axis.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Axis/AxisDefaults.js"],o["Core/Color/Color.js"],o["Core/Defaults.js"],o["Core/Foundation.js"],o["Core/Globals.js"],o["Core/Axis/Tick.js"],o["Core/Utilities.js"]],function(d,p,y,x,b,k,O,N){let{animObject:Z}=d,{xAxis:J,yAxis:D}=p,{defaultOptions:F}=x,{registerEventOptions:ae}=b,{deg2rad:ee}=k,{arrayMax:B,arrayMin:Y,clamp:$,correctFloat:Q,defined:z,destroyObjectProperties:V,erase:le,error:se,extend:K,fireEvent:L,getClosestDistance:X,insertItem:H,isArray:A,isNumber:S,isString:T,merge:E,normalizeTickInterval:P,objectEach:te,pick:_,relativeLength:re,removeEvent:me,splat:g,syncTimeout:w}=N,C=(ce,j)=>P(j,void 0,void 0,_(ce.options.allowDecimals,j<.5||ce.tickAmount!==void 0),!!ce.tickAmount);K(F,{xAxis:J,yAxis:E(J,D)});class q{constructor(j,U,ne){this.init(j,U,ne)}init(j,U,ne=this.coll){let ge=ne==="xAxis",R=this.isZAxis||(j.inverted?!ge:ge);this.chart=j,this.horiz=R,this.isXAxis=ge,this.coll=ne,L(this,"init",{userOptions:U}),this.opposite=_(U.opposite,this.opposite),this.side=_(U.side,this.side,R?this.opposite?0:2:this.opposite?1:3),this.setOptions(U);let G=this.options,ie=G.labels;this.type??(this.type=G.type||"linear"),this.uniqueNames??(this.uniqueNames=G.uniqueNames??!0),L(this,"afterSetType"),this.userOptions=U,this.minPixelPadding=0,this.reversed=_(G.reversed,this.reversed),this.visible=G.visible,this.zoomEnabled=G.zoomEnabled,this.hasNames=this.type==="category"||G.categories===!0,this.categories=A(G.categories)&&G.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=z(G.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len??(this.len=0),this.minRange=this.userMinRange=G.minRange||G.maxZoom,this.range=G.range,this.offset=G.offset||0,this.max=void 0,this.min=void 0;let ue=_(G.crosshair,g(j.options.tooltip.crosshairs)[ge?0:1]);this.crosshair=ue===!0?{}:ue,j.axes.indexOf(this)===-1&&(ge?j.axes.splice(j.xAxis.length,0,this):j.axes.push(this),H(this,j[this.coll])),j.orderItems(this.coll),this.series=this.series||[],j.inverted&&!this.isZAxis&&ge&&!z(this.reversed)&&(this.reversed=!0),this.labelRotation=S(ie.rotation)?ie.rotation:void 0,ae(this,G),L(this,"afterInit")}setOptions(j){let U=this.horiz?{labels:{autoRotation:[-45],padding:4},margin:15}:{labels:{padding:1},title:{rotation:90*this.side}};this.options=E(U,F[this.coll],j),L(this,"afterSetOptions",{userOptions:j})}defaultLabelFormatter(){let j=this.axis,{numberFormatter:U}=this.chart,ne=S(this.value)?this.value:NaN,ge=j.chart.time,R=j.categories,G=this.dateTimeLabelFormat,ie=F.lang,ue=ie.numericSymbols,de=ie.numericSymbolMagnitude||1e3,ye=j.logarithmic?Math.abs(ne):j.tickInterval,Se=ue&&ue.length,Ce,Ae;if(R)Ae=`${this.value}`;else if(G)Ae=ge.dateFormat(G,ne);else if(Se&&ue&&ye>=1e3)for(;Se--&&Ae===void 0;)ye>=(Ce=Math.pow(de,Se+1))&&10*ne%Ce==0&&ue[Se]!==null&&ne!==0&&(Ae=U(ne/Ce,-1)+ue[Se]);return Ae===void 0&&(Ae=Math.abs(ne)>=1e4?U(ne,-1):U(ne,-1,void 0,"")),Ae}getSeriesExtremes(){let j,U=this;L(this,"getSeriesExtremes",null,function(){U.hasVisibleSeries=!1,U.dataMin=U.dataMax=U.threshold=void 0,U.softThreshold=!U.isXAxis,U.series.forEach(ne=>{if(ne.reserveSpace()){let ge=ne.options,R,G=ge.threshold,ie,ue;if(U.hasVisibleSeries=!0,U.positiveValuesOnly&&0>=(G||0)&&(G=void 0),U.isXAxis)(R=ne.xData)&&R.length&&(R=U.logarithmic?R.filter(de=>de>0):R,ie=(j=ne.getXExtremes(R)).min,ue=j.max,S(ie)||ie instanceof Date||(R=R.filter(S),ie=(j=ne.getXExtremes(R)).min,ue=j.max),R.length&&(U.dataMin=Math.min(_(U.dataMin,ie),ie),U.dataMax=Math.max(_(U.dataMax,ue),ue)));else{let de=ne.applyExtremes();S(de.dataMin)&&(ie=de.dataMin,U.dataMin=Math.min(_(U.dataMin,ie),ie)),S(de.dataMax)&&(ue=de.dataMax,U.dataMax=Math.max(_(U.dataMax,ue),ue)),z(G)&&(U.threshold=G),(!ge.softThreshold||U.positiveValuesOnly)&&(U.softThreshold=!1)}}})}),L(this,"afterGetSeriesExtremes")}translate(j,U,ne,ge,R,G){var Re;let ie=this.linkedParent||this,ue=ge&&ie.old?ie.old.min:ie.min;if(!S(ue))return NaN;let de=ie.minPixelPadding,ye=(ie.isOrdinal||((Re=ie.brokenAxis)==null?void 0:Re.hasBreaks)||ie.logarithmic&&R)&&ie.lin2val,Se=1,Ce=0,Ae=ge&&ie.old?ie.old.transA:ie.transA,Ne=0;return Ae||(Ae=ie.transA),ne&&(Se*=-1,Ce=ie.len),ie.reversed&&(Se*=-1,Ce-=Se*(ie.sector||ie.len)),U?(Ne=(j=j*Se+Ce-de)/Ae+ue,ye&&(Ne=ie.lin2val(Ne))):(ye&&(j=ie.val2lin(j)),Ne=Se*(j-ue)*Ae+Ce+Se*de+(S(G)?Ae*G:0),ie.isRadial||(Ne=Q(Ne))),Ne}toPixels(j,U){return this.translate(j,!1,!this.horiz,void 0,!0)+(U?0:this.pos)}toValue(j,U){return this.translate(j-(U?0:this.pos),!0,!this.horiz,void 0,!0)}getPlotLinePath(j){let U=this,ne=U.chart,ge=U.left,R=U.top,G=j.old,ie=j.value,ue=j.lineWidth,de=G&&ne.oldChartHeight||ne.chartHeight,ye=G&&ne.oldChartWidth||ne.chartWidth,Se=U.transB,Ce=j.translatedValue,Ae=j.force,Ne,Re,fe,pe,ve;function be(Ee,_e,Le){return Ae!=="pass"&&(Ee<_e||Ee>Le)&&(Ae?Ee=$(Ee,_e,Le):ve=!0),Ee}let ke={value:ie,lineWidth:ue,old:G,force:Ae,acrossPanes:j.acrossPanes,translatedValue:Ce};return L(this,"getPlotLinePath",ke,function(Ee){Ne=fe=(Ce=$(Ce=_(Ce,U.translate(ie,void 0,void 0,G)),-1e9,1e9))+Se,Re=pe=de-Ce-Se,S(Ce)?U.horiz?(Re=R,pe=de-U.bottom+(U.options.isInternal?0:ne.scrollablePixelsY||0),Ne=fe=be(Ne,ge,ge+U.width)):(Ne=ge,fe=ye-U.right+(ne.scrollablePixelsX||0),Re=pe=be(Re,R,R+U.height)):(ve=!0,Ae=!1),Ee.path=ve&&!Ae?void 0:ne.renderer.crispLine([["M",Ne,Re],["L",fe,pe]],ue||1)}),ke.path}getLinearTickPositions(j,U,ne){let ge,R,G,ie=Q(Math.floor(U/j)*j),ue=Q(Math.ceil(ne/j)*j),de=[];if(Q(ie+j)===ie&&(G=20),this.single)return[U];for(ge=ie;ge<=ue&&(de.push(ge),(ge=Q(ge+j,G))!==R);)R=ge;return de}getMinorTickInterval(){let{minorTicks:j,minorTickInterval:U}=this.options;return j===!0?_(U,"auto"):j!==!1?U:void 0}getMinorTickPositions(){let j=this.options,U=this.tickPositions,ne=this.minorTickInterval,ge=this.pointRangePadding||0,R=(this.min||0)-ge,G=(this.max||0)+ge,ie=G-R,ue=[],de;if(ie&&ie/ne<this.len/3){let ye=this.logarithmic;if(ye)this.paddedTicks.forEach(function(Se,Ce,Ae){Ce&&ue.push.apply(ue,ye.getLogTickPositions(ne,Ae[Ce-1],Ae[Ce],!0))});else if(this.dateTime&&this.getMinorTickInterval()==="auto")ue=ue.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(ne),R,G,j.startOfWeek));else for(de=R+(U[0]-R)%ne;de<=G&&de!==ue[0];de+=ne)ue.push(de)}return ue.length!==0&&this.trimTicks(ue),ue}adjustForMinRange(){let j=this.options,U=this.logarithmic,{max:ne,min:ge,minRange:R}=this,G,ie,ue,de;this.isXAxis&&R===void 0&&!U&&(R=z(j.min)||z(j.max)||z(j.floor)||z(j.ceiling)?null:Math.min(5*(X(this.series.map(ye=>{var Se;return(ye.xIncrement?(Se=ye.xData)==null?void 0:Se.slice(0,2):ye.xData)||[]}))||0),this.dataMax-this.dataMin)),S(ne)&&S(ge)&&S(R)&&ne-ge<R&&(ie=this.dataMax-this.dataMin>=R,G=(R-ne+ge)/2,ue=[ge-G,_(j.min,ge-G)],ie&&(ue[2]=U?U.log2lin(this.dataMin):this.dataMin),de=[(ge=B(ue))+R,_(j.max,ge+R)],ie&&(de[2]=U?U.log2lin(this.dataMax):this.dataMax),(ne=Y(de))-ge<R&&(ue[0]=ne-R,ue[1]=_(j.min,ne-R),ge=B(ue))),this.minRange=R,this.min=ge,this.max=ne}getClosest(){let j,U;if(this.categories)U=1;else{let ne=[];this.series.forEach(function(ge){var G;let R=ge.closestPointRange;((G=ge.xData)==null?void 0:G.length)===1?ne.push(ge.xData[0]):!ge.noSharedTooltip&&z(R)&&ge.reserveSpace()&&(U=z(U)?Math.min(U,R):R)}),ne.length&&(ne.sort((ge,R)=>ge-R),j=X([ne]))}return j&&U?Math.min(j,U):j||U}nameToX(j){let U=A(this.options.categories),ne=U?this.categories:this.names,ge=j.options.x,R;return j.series.requireSorting=!1,z(ge)||(ge=this.uniqueNames&&ne?U?ne.indexOf(j.name):_(ne.keys[j.name],-1):j.series.autoIncrement()),ge===-1?!U&&ne&&(R=ne.length):R=ge,R!==void 0?(this.names[R]=j.name,this.names.keys[j.name]=R):j.x&&(R=j.x),R}updateNames(){let j=this,U=this.names;U.length>0&&(Object.keys(U.keys).forEach(function(ne){delete U.keys[ne]}),U.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(ne=>{ne.xIncrement=null,(!ne.points||ne.isDirtyData)&&(j.max=Math.max(j.max,ne.xData.length-1),ne.processData(),ne.generatePoints()),ne.data.forEach(function(ge,R){let G;ge!=null&&ge.options&&ge.name!==void 0&&(G=j.nameToX(ge))!==void 0&&G!==ge.x&&(ge.x=G,ne.xData[R]=G)})}))}setAxisTranslation(){let j=this,U=j.max-j.min,ne=j.linkedParent,ge=!!j.categories,R=j.isXAxis,G=j.axisPointRange||0,ie,ue=0,de=0,ye,Se=j.transA;(R||ge||G)&&(ie=j.getClosest(),ne?(ue=ne.minPointOffset,de=ne.pointRangePadding):j.series.forEach(function(Ce){let Ae=ge?1:R?_(Ce.options.pointRange,ie,0):j.axisPointRange||0,Ne=Ce.options.pointPlacement;if(G=Math.max(G,Ae),!j.single||ge){let Re=Ce.is("xrange")?!R:R;ue=Math.max(ue,Re&&T(Ne)?0:Ae/2),de=Math.max(de,Re&&Ne==="on"?0:Ae)}}),ye=j.ordinal&&j.ordinal.slope&&ie?j.ordinal.slope/ie:1,j.minPointOffset=ue*=ye,j.pointRangePadding=de*=ye,j.pointRange=Math.min(G,j.single&&ge?1:U),R&&ie&&(j.closestPointRange=ie)),j.translationSlope=j.transA=Se=j.staticScale||j.len/(U+de||1),j.transB=j.horiz?j.left:j.bottom,j.minPixelPadding=Se*ue,L(this,"afterSetAxisTranslation")}minFromRange(){let{max:j,min:U}=this;return S(j)&&S(U)&&j-U||void 0}setTickInterval(j){var Ie,Ge,pt,mt;let{categories:U,chart:ne,dataMax:ge,dataMin:R,dateTime:G,isXAxis:ie,logarithmic:ue,options:de,softThreshold:ye}=this,Se=S(this.threshold)?this.threshold:void 0,Ce=this.minRange||0,{ceiling:Ae,floor:Ne,linkedTo:Re,softMax:fe,softMin:pe}=de,ve=S(Re)&&((Ie=ne[this.coll])==null?void 0:Ie[Re]),be=de.tickPixelInterval,ke=de.maxPadding,Ee=de.minPadding,_e=0,Le,Be=S(de.tickInterval)&&de.tickInterval>=0?de.tickInterval:void 0,$e,Me,ze,Xe;if(G||U||ve||this.getTickAmount(),ze=_(this.userMin,de.min),Xe=_(this.userMax,de.max),ve?(this.linkedParent=ve,Le=ve.getExtremes(),this.min=_(Le.min,Le.dataMin),this.max=_(Le.max,Le.dataMax),this.type!==ve.type&&se(11,!0,ne)):(ye&&z(Se)&&S(ge)&&S(R)&&(R>=Se?($e=Se,Ee=0):ge<=Se&&(Me=Se,ke=0)),this.min=_(ze,$e,R),this.max=_(Xe,Me,ge)),S(this.max)&&S(this.min)&&(ue&&(this.positiveValuesOnly&&!j&&0>=Math.min(this.min,_(R,this.min))&&se(10,!0,ne),this.min=Q(ue.log2lin(this.min),16),this.max=Q(ue.log2lin(this.max),16)),this.range&&S(R)&&(this.userMin=this.min=ze=Math.max(R,this.minFromRange()||0),this.userMax=Xe=this.max,this.range=void 0)),L(this,"foundExtremes"),this.adjustForMinRange(),S(this.min)&&S(this.max)){if(!S(this.userMin)&&S(pe)&&pe<this.min&&(this.min=ze=pe),!S(this.userMax)&&S(fe)&&fe>this.max&&(this.max=Xe=fe),U||this.axisPointRange||(Ge=this.stacking)!=null&&Ge.usePercentage||ve||!(_e=this.max-this.min)||(!z(ze)&&Ee&&(this.min-=_e*Ee),z(Xe)||!ke||(this.max+=_e*ke)),!S(this.userMin)&&S(Ne)&&(this.min=Math.max(this.min,Ne)),!S(this.userMax)&&S(Ae)&&(this.max=Math.min(this.max,Ae)),ye&&S(R)&&S(ge)){let ct=Se||0;!z(ze)&&this.min<ct&&R>=ct?this.min=de.minRange?Math.min(ct,this.max-Ce):ct:!z(Xe)&&this.max>ct&&ge<=ct&&(this.max=de.minRange?Math.max(ct,this.min+Ce):ct)}!ne.polar&&this.min>this.max&&(z(de.min)?this.max=this.min:z(de.max)&&(this.min=this.max)),_e=this.max-this.min}if(this.min!==this.max&&S(this.min)&&S(this.max)?ve&&!Be&&be===ve.options.tickPixelInterval?this.tickInterval=Be=ve.tickInterval:this.tickInterval=_(Be,this.tickAmount?_e/Math.max(this.tickAmount-1,1):void 0,U?1:_e*be/Math.max(this.len,be)):this.tickInterval=1,ie&&!j){let ct=this.min!==((pt=this.old)==null?void 0:pt.min)||this.max!==((mt=this.old)==null?void 0:mt.max);this.series.forEach(function(_t){var Rt;_t.forceCrop=(Rt=_t.forceCropping)==null?void 0:Rt.call(_t),_t.processData(ct)}),L(this,"postProcessData",{hasExtremesChanged:ct})}this.setAxisTranslation(),L(this,"initialAxisTranslation"),this.pointRange&&!Be&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));let Ve=_(de.minTickInterval,G&&!this.series.some(ct=>ct.noSharedTooltip)?this.closestPointRange:0);!Be&&this.tickInterval<Ve&&(this.tickInterval=Ve),G||ue||Be||(this.tickInterval=C(this,this.tickInterval)),this.tickAmount||(this.tickInterval=this.unsquish()),this.setTickPositions()}setTickPositions(){var ye,Se;let j=this.options,U=j.tickPositions,ne=j.tickPositioner,ge=this.getMinorTickInterval(),R=!this.isPanning,G=R&&j.startOnTick,ie=R&&j.endOnTick,ue=[],de;if(this.tickmarkOffset=this.categories&&j.tickmarkPlacement==="between"&&this.tickInterval===1?.5:0,this.single=this.min===this.max&&z(this.min)&&!this.tickAmount&&(this.min%1==0||j.allowDecimals!==!1),U)ue=U.slice();else if(S(this.min)&&S(this.max)){if(!((ye=this.ordinal)!=null&&ye.positions)&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200))ue=[this.min,this.max],se(19,!1,this.chart);else if(this.dateTime)ue=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,j.units),this.min,this.max,j.startOfWeek,(Se=this.ordinal)==null?void 0:Se.positions,this.closestPointRange,!0);else if(this.logarithmic)ue=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else{let Ce=this.tickInterval,Ae=Ce;for(;Ae<=2*Ce&&(ue=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&ue.length>this.tickAmount);)this.tickInterval=C(this,Ae*=1.1)}ue.length>this.len&&(ue=[ue[0],ue[ue.length-1]])[0]===ue[1]&&(ue.length=1),ne&&(this.tickPositions=ue,(de=ne.apply(this,[this.min,this.max]))&&(ue=de))}this.tickPositions=ue,this.minorTickInterval=ge==="auto"&&this.tickInterval?this.tickInterval/j.minorTicksPerMajor:ge,this.paddedTicks=ue.slice(0),this.trimTicks(ue,G,ie),!this.isLinked&&S(this.min)&&S(this.max)&&(this.single&&ue.length<2&&!this.categories&&!this.series.some(Ce=>Ce.is("heatmap")&&Ce.options.pointPlacement==="between")&&(this.min-=.5,this.max+=.5),U||de||this.adjustTickAmount()),L(this,"afterSetTickPositions")}trimTicks(j,U,ne){let ge=j[0],R=j[j.length-1],G=!this.isOrdinal&&this.minPointOffset||0;if(L(this,"trimTicks"),!this.isLinked){if(U&&ge!==-1/0)this.min=ge;else for(;this.min-G>j[0];)j.shift();if(ne)this.max=R;else for(;this.max+G<j[j.length-1];)j.pop();j.length===0&&z(ge)&&!this.options.tickPositions&&j.push((R+ge)/2)}}alignToOthers(){let j,U=this,ne=U.chart,ge=[this],R=U.options,G=ne.options.chart,ie=this.coll==="yAxis"&&G.alignThresholds,ue=[];if(U.thresholdAlignment=void 0,(G.alignTicks!==!1&&R.alignTicks||ie)&&R.startOnTick!==!1&&R.endOnTick!==!1&&!U.logarithmic){let de=Se=>{let{horiz:Ce,options:Ae}=Se;return[Ce?Ae.left:Ae.top,Ae.width,Ae.height,Ae.pane].join(",")},ye=de(this);ne[this.coll].forEach(function(Se){let{series:Ce}=Se;Ce.length&&Ce.some(Ae=>Ae.visible)&&Se!==U&&de(Se)===ye&&(j=!0,ge.push(Se))})}if(j&&ie){ge.forEach(ye=>{let Se=ye.getThresholdAlignment(U);S(Se)&&ue.push(Se)});let de=ue.length>1?ue.reduce((ye,Se)=>ye+=Se,0)/ue.length:void 0;ge.forEach(ye=>{ye.thresholdAlignment=de})}return j}getThresholdAlignment(j){if((!S(this.dataMin)||this!==j&&this.series.some(U=>U.isDirty||U.isDirtyData))&&this.getSeriesExtremes(),S(this.threshold)){let U=$((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1);return this.options.reversed&&(U=1-U),U}}getTickAmount(){let j=this.options,U=j.tickPixelInterval,ne=j.tickAmount;z(j.tickInterval)||ne||!(this.len<U)||this.isRadial||this.logarithmic||!j.startOnTick||!j.endOnTick||(ne=2),!ne&&this.alignToOthers()&&(ne=Math.ceil(this.len/U)+1),ne<4&&(this.finalTickAmt=ne,ne=5),this.tickAmount=ne}adjustTickAmount(){let j=this,{finalTickAmt:U,max:ne,min:ge,options:R,tickPositions:G,tickAmount:ie,thresholdAlignment:ue}=j,de=G==null?void 0:G.length,ye=_(j.threshold,j.softThreshold?0:null),Se,Ce,Ae=j.tickInterval,Ne,Re=()=>G.push(Q(G[G.length-1]+Ae)),fe=()=>G.unshift(Q(G[0]-Ae));if(S(ue)&&(Ne=ue<.5?Math.ceil(ue*(ie-1)):Math.floor(ue*(ie-1)),R.reversed&&(Ne=ie-1-Ne)),j.hasData()&&S(ge)&&S(ne)){let pe=()=>{j.transA*=(de-1)/(ie-1),j.min=R.startOnTick?G[0]:Math.min(ge,G[0]),j.max=R.endOnTick?G[G.length-1]:Math.max(ne,G[G.length-1])};if(S(Ne)&&S(j.threshold)){for(;G[Ne]!==ye||G.length!==ie||G[0]>ge||G[G.length-1]<ne;){for(G.length=0,G.push(j.threshold);G.length<ie;)G[Ne]===void 0||G[Ne]>j.threshold?fe():Re();if(Ae>8*j.tickInterval)break;Ae*=2}pe()}else if(de<ie){for(;G.length<ie;)G.length%2||ge===ye?Re():fe();pe()}if(z(U)){for(Ce=Se=G.length;Ce--;)(U===3&&Ce%2==1||U<=2&&Ce>0&&Ce<Se-1)&&G.splice(Ce,1);j.finalTickAmt=void 0}}}setScale(){var G,ie;let{coll:j,stacking:U}=this,ne=!1,ge=!1;this.series.forEach(ue=>{ne=ne||ue.isDirtyData||ue.isDirty,ge=ge||ue.xAxis&&ue.xAxis.isDirty||!1}),this.setAxisSize();let R=this.len!==(this.old&&this.old.len);R||ne||ge||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?(U&&j==="yAxis"&&U.buildStacks(),this.forceRedraw=!1,this.userMinRange||(this.minRange=void 0),this.getSeriesExtremes(),this.setTickInterval(),U&&j==="xAxis"&&U.buildStacks(),this.isDirty||(this.isDirty=R||this.min!==((G=this.old)==null?void 0:G.min)||this.max!==((ie=this.old)==null?void 0:ie.max))):U&&U.cleanStacks(),ne&&delete this.allExtremes,L(this,"afterSetScale")}setExtremes(j,U,ne=!0,ge,R){this.series.forEach(G=>{delete G.kdTree}),L(this,"setExtremes",R=K(R,{min:j,max:U}),G=>{this.userMin=G.min,this.userMax=G.max,this.eventArgs=G,ne&&this.chart.redraw(ge)})}setAxisSize(){let j=this.chart,U=this.options,ne=U.offsets||[0,0,0,0],ge=this.horiz,R=this.width=Math.round(re(_(U.width,j.plotWidth-ne[3]+ne[1]),j.plotWidth)),G=this.height=Math.round(re(_(U.height,j.plotHeight-ne[0]+ne[2]),j.plotHeight)),ie=this.top=Math.round(re(_(U.top,j.plotTop+ne[0]),j.plotHeight,j.plotTop)),ue=this.left=Math.round(re(_(U.left,j.plotLeft+ne[3]),j.plotWidth,j.plotLeft));this.bottom=j.chartHeight-G-ie,this.right=j.chartWidth-R-ue,this.len=Math.max(ge?R:G,0),this.pos=ge?ue:ie}getExtremes(){let j=this.logarithmic;return{min:j?Q(j.lin2log(this.min)):this.min,max:j?Q(j.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}}getThreshold(j){let U=this.logarithmic,ne=U?U.lin2log(this.min):this.min,ge=U?U.lin2log(this.max):this.max;return j===null||j===-1/0?j=ne:j===1/0?j=ge:ne>j?j=ne:ge<j&&(j=ge),this.translate(j,0,1,0,1)}autoLabelAlign(j){let U=(_(j,0)-90*this.side+720)%360,ne={align:"center"};return L(this,"autoLabelAlign",ne,function(ge){U>15&&U<165?ge.align="right":U>195&&U<345&&(ge.align="left")}),ne.align}tickSize(j){let U=this.options,ne=_(U[j==="tick"?"tickWidth":"minorTickWidth"],j==="tick"&&this.isXAxis&&!this.categories?1:0),ge=U[j==="tick"?"tickLength":"minorTickLength"],R;ne&&ge&&(U[j+"Position"]==="inside"&&(ge=-ge),R=[ge,ne]);let G={tickSize:R};return L(this,"afterTickSize",G),G.tickSize}labelMetrics(){let j=this.chart.renderer,U=this.ticks,ne=U[Object.keys(U)[0]]||{};return this.chart.renderer.fontMetrics(ne.label||ne.movedLabel||j.box)}unsquish(){let j=this.options.labels,U=j.padding||0,ne=this.horiz,ge=this.tickInterval,R=this.len/(((this.categories?1:0)+this.max-this.min)/ge),G=j.rotation,ie=Q(.8*this.labelMetrics().h),ue=Math.max(this.max-this.min,0),de=function(Ne){let Re=(Ne+2*U)/(R||1);return(Re=Re>1?Math.ceil(Re):1)*ge>ue&&Ne!==1/0&&R!==1/0&&ue&&(Re=Math.ceil(ue/ge)),Q(Re*ge)},ye=ge,Se,Ce=Number.MAX_VALUE,Ae;if(ne){if(!j.staggerLines&&(S(G)?Ae=[G]:R<j.autoRotationLimit&&(Ae=j.autoRotation)),Ae){let Ne,Re;for(let fe of Ae)(fe===G||fe&&fe>=-90&&fe<=90)&&(Re=(Ne=de(Math.abs(ie/Math.sin(ee*fe))))+Math.abs(fe/360))<Ce&&(Ce=Re,Se=fe,ye=Ne)}}else ye=de(.75*ie);return this.autoRotation=Ae,this.labelRotation=_(Se,S(G)?G:0),j.step?ge:ye}getSlotWidth(j){let U=this.chart,ne=this.horiz,ge=this.options.labels,R=Math.max(this.tickPositions.length-(this.categories?0:1),1),G=U.margin[3];if(j&&S(j.slotWidth))return j.slotWidth;if(ne&&ge.step<2)return ge.rotation?0:(this.staggerLines||1)*this.len/R;if(!ne){let ie=ge.style.width;if(ie!==void 0)return parseInt(String(ie),10);if(G)return G-U.spacing[3]}return .33*U.chartWidth}renderUnsquish(){let j=this.chart,U=j.renderer,ne=this.tickPositions,ge=this.ticks,R=this.options.labels,G=R.style,ie=this.horiz,ue=this.getSlotWidth(),de=Math.max(1,Math.round(ue-(ie?2*(R.padding||0):R.distance||0))),ye={},Se=this.labelMetrics(),Ce=G.textOverflow,Ae,Ne,Re=0,fe,pe;if(T(R.rotation)||(ye.rotation=R.rotation||0),ne.forEach(function(ve){let be=ge[ve];be.movedLabel&&be.replaceMovedLabel(),be&&be.label&&be.label.textPxLength>Re&&(Re=be.label.textPxLength)}),this.maxLabelLength=Re,this.autoRotation)Re>de&&Re>Se.h?ye.rotation=this.labelRotation:this.labelRotation=0;else if(ue&&(Ae=de,!Ce))for(Ne="clip",pe=ne.length;!ie&&pe--;)(fe=ge[ne[pe]].label)&&(fe.styles.textOverflow==="ellipsis"?fe.css({textOverflow:"clip"}):fe.textPxLength>ue&&fe.css({width:ue+"px"}),fe.getBBox().height>this.len/ne.length-(Se.h-Se.f)&&(fe.specificTextOverflow="ellipsis"));ye.rotation&&(Ae=Re>.5*j.chartHeight?.33*j.chartHeight:Re,Ce||(Ne="ellipsis")),this.labelAlign=R.align||this.autoLabelAlign(this.labelRotation),this.labelAlign&&(ye.align=this.labelAlign),ne.forEach(function(ve){let be=ge[ve],ke=be&&be.label,Ee=G.width,_e={};ke&&(ke.attr(ye),be.shortenLabel?be.shortenLabel():Ae&&!Ee&&G.whiteSpace!=="nowrap"&&(Ae<ke.textPxLength||ke.element.tagName==="SPAN")?(_e.width=Ae+"px",Ce||(_e.textOverflow=ke.specificTextOverflow||Ne),ke.css(_e)):!ke.styles.width||_e.width||Ee||ke.css({width:null}),delete ke.specificTextOverflow,be.rotation=ye.rotation)},this),this.tickRotCorr=U.rotCorr(Se.b,this.labelRotation||0,this.side!==0)}hasData(){return this.series.some(function(j){return j.hasData()})||this.options.showEmpty&&z(this.min)&&z(this.max)}addTitle(j){let U,ne=this.chart.renderer,ge=this.horiz,R=this.opposite,G=this.options.title,ie=this.chart.styledMode;this.axisTitle||((U=G.textAlign)||(U=(ge?{low:"left",middle:"center",high:"right"}:{low:R?"right":"left",middle:"center",high:R?"left":"right"})[G.align]),this.axisTitle=ne.text(G.text||"",0,0,G.useHTML).attr({zIndex:7,rotation:G.rotation||0,align:U}).addClass("highcharts-axis-title"),ie||this.axisTitle.css(E(G.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),ie||G.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"}),this.axisTitle[j?"show":"hide"](j)}generateTick(j){let U=this.ticks;U[j]?U[j].addLabel():U[j]=new O(this,j)}createGroups(){let{axisParent:j,chart:U,coll:ne,options:ge}=this,R=U.renderer,G=(ie,ue,de)=>R.g(ie).attr({zIndex:de}).addClass(`highcharts-${ne.toLowerCase()}${ue} `+(this.isRadial?`highcharts-radial-axis${ue} `:"")+(ge.className||"")).add(j);this.axisGroup||(this.gridGroup=G("grid","-grid",ge.gridZIndex),this.axisGroup=G("axis","",ge.zIndex),this.labelGroup=G("axis-labels","-labels",ge.labels.zIndex))}getOffset(){let j=this,{chart:U,horiz:ne,options:ge,side:R,ticks:G,tickPositions:ie,coll:ue}=j,de=U.inverted&&!j.isZAxis?[1,0,3,2][R]:R,ye=j.hasData(),Se=ge.title,Ce=ge.labels,Ae=S(ge.crossing),Ne=U.axisOffset,Re=U.clipOffset,fe=[-1,1,1,-1][R],pe,ve=0,be,ke=0,Ee=0,_e,Le;if(j.showAxis=pe=ye||ge.showEmpty,j.staggerLines=j.horiz&&Ce.staggerLines||void 0,j.createGroups(),ye||j.isLinked?(ie.forEach(function(Be){j.generateTick(Be)}),j.renderUnsquish(),j.reserveSpaceDefault=R===0||R===2||{1:"left",3:"right"}[R]===j.labelAlign,_(Ce.reserveSpace,!Ae&&null,j.labelAlign==="center"||null,j.reserveSpaceDefault)&&ie.forEach(function(Be){Ee=Math.max(G[Be].getLabelSize(),Ee)}),j.staggerLines&&(Ee*=j.staggerLines),j.labelOffset=Ee*(j.opposite?-1:1)):te(G,function(Be,$e){Be.destroy(),delete G[$e]}),Se!=null&&Se.text&&Se.enabled!==!1&&(j.addTitle(pe),pe&&!Ae&&Se.reserveSpace!==!1&&(j.titleOffset=ve=j.axisTitle.getBBox()[ne?"height":"width"],ke=z(be=Se.offset)?0:_(Se.margin,ne?5:10))),j.renderLine(),j.offset=fe*_(ge.offset,Ne[R]?Ne[R]+(ge.margin||0):0),j.tickRotCorr=j.tickRotCorr||{x:0,y:0},Le=R===0?-j.labelMetrics().h:R===2?j.tickRotCorr.y:0,_e=Math.abs(Ee)+ke,Ee&&(_e-=Le,_e+=fe*(ne?_(Ce.y,j.tickRotCorr.y+fe*Ce.distance):_(Ce.x,fe*Ce.distance))),j.axisTitleMargin=_(be,_e),j.getMaxLabelDimensions&&(j.maxLabelDimensions=j.getMaxLabelDimensions(G,ie)),ue!=="colorAxis"&&Re){let Be=this.tickSize("tick");Ne[R]=Math.max(Ne[R],(j.axisTitleMargin||0)+ve+fe*j.offset,_e,ie&&ie.length&&Be?Be[0]+fe*j.offset:0);let $e=!j.axisLine||ge.offset?0:j.axisLine.strokeWidth()/2;Re[de]=Math.max(Re[de],$e)}L(this,"afterGetOffset")}getLinePath(j){let U=this.chart,ne=this.opposite,ge=this.offset,R=this.horiz,G=this.left+(ne?this.width:0)+ge,ie=U.chartHeight-this.bottom-(ne?this.height:0)+ge;return ne&&(j*=-1),U.renderer.crispLine([["M",R?this.left:G,R?ie:this.top],["L",R?U.chartWidth-this.right:G,R?ie:U.chartHeight-this.bottom]],j)}renderLine(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))}getTitlePosition(j){let U=this.horiz,ne=this.left,ge=this.top,R=this.len,G=this.options.title,ie=U?ne:ge,ue=this.opposite,de=this.offset,ye=G.x,Se=G.y,Ce=this.chart.renderer.fontMetrics(j),Ae=j?Math.max(j.getBBox(!1,0).height-Ce.h-1,0):0,Ne={low:ie+(U?0:R),middle:ie+R/2,high:ie+(U?R:0)}[G.align],Re=(U?ge+this.height:ne)+(U?1:-1)*(ue?-1:1)*(this.axisTitleMargin||0)+[-Ae,Ae,Ce.f,-Ae][this.side],fe={x:U?Ne+ye:Re+(ue?this.width:0)+de+ye,y:U?Re+Se-(ue?this.height:0)+de:Ne+Se};return L(this,"afterGetTitlePosition",{titlePosition:fe}),fe}renderMinorTick(j,U){let ne=this.minorTicks;ne[j]||(ne[j]=new O(this,j,"minor")),U&&ne[j].isNew&&ne[j].render(null,!0),ne[j].render(null,!1,1)}renderTick(j,U,ne){let ge=this.isLinked,R=this.ticks;(!ge||j>=this.min&&j<=this.max||this.grid&&this.grid.isColumn)&&(R[j]||(R[j]=new O(this,j)),ne&&R[j].isNew&&R[j].render(U,!0,-1),R[j].render(U))}render(){let j,U,ne=this,ge=ne.chart,R=ne.logarithmic,G=ge.renderer,ie=ne.options,ue=ne.isLinked,de=ne.tickPositions,ye=ne.axisTitle,Se=ne.ticks,Ce=ne.minorTicks,Ae=ne.alternateBands,Ne=ie.stackLabels,Re=ie.alternateGridColor,fe=ie.crossing,pe=ne.tickmarkOffset,ve=ne.axisLine,be=ne.showAxis,ke=Z(G.globalAnimation);if(ne.labelEdge.length=0,ne.overlap=!1,[Se,Ce,Ae].forEach(function(Ee){te(Ee,function(_e){_e.isActive=!1})}),S(fe)){let Ee=this.isXAxis?ge.yAxis[0]:ge.xAxis[0],_e=[1,-1,-1,1][this.side];if(Ee){let Le=Ee.toPixels(fe,!0);ne.horiz&&(Le=Ee.len-Le),ne.offset=_e*Le}}if(ne.hasData()||ue){let Ee=ne.chart.hasRendered&&ne.old&&S(ne.old.min);ne.minorTickInterval&&!ne.categories&&ne.getMinorTickPositions().forEach(function(_e){ne.renderMinorTick(_e,Ee)}),de.length&&(de.forEach(function(_e,Le){ne.renderTick(_e,Le,Ee)}),pe&&(ne.min===0||ne.single)&&(Se[-1]||(Se[-1]=new O(ne,-1,null,!0)),Se[-1].render(-1))),Re&&de.forEach(function(_e,Le){U=de[Le+1]!==void 0?de[Le+1]+pe:ne.max-pe,Le%2==0&&_e<ne.max&&U<=ne.max+(ge.polar?-pe:pe)&&(Ae[_e]||(Ae[_e]=new k.PlotLineOrBand(ne,{})),j=_e+pe,Ae[_e].options={from:R?R.lin2log(j):j,to:R?R.lin2log(U):U,color:Re,className:"highcharts-alternate-grid"},Ae[_e].render(),Ae[_e].isActive=!0)}),ne._addedPlotLB||(ne._addedPlotLB=!0,(ie.plotLines||[]).concat(ie.plotBands||[]).forEach(function(_e){ne.addPlotBandOrLine(_e)}))}[Se,Ce,Ae].forEach(function(Ee){let _e=[],Le=ke.duration;te(Ee,function(Be,$e){Be.isActive||(Be.render($e,!1,0),Be.isActive=!1,_e.push($e))}),w(function(){let Be=_e.length;for(;Be--;)Ee[_e[Be]]&&!Ee[_e[Be]].isActive&&(Ee[_e[Be]].destroy(),delete Ee[_e[Be]])},Ee!==Ae&&ge.hasRendered&&Le?Le:0)}),ve&&(ve[ve.isPlaced?"animate":"attr"]({d:this.getLinePath(ve.strokeWidth())}),ve.isPlaced=!0,ve[be?"show":"hide"](be)),ye&&be&&(ye[ye.isNew?"attr":"animate"](ne.getTitlePosition(ye)),ye.isNew=!1),Ne&&Ne.enabled&&ne.stacking&&ne.stacking.renderStackTotals(),ne.old={len:ne.len,max:ne.max,min:ne.min,transA:ne.transA,userMax:ne.userMax,userMin:ne.userMin},ne.isDirty=!1,L(this,"afterRender")}redraw(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(j){j.render()})),this.series.forEach(function(j){j.isDirty=!0})}getKeepProps(){return this.keepProps||q.keepProps}destroy(j){let U=this,ne=U.plotLinesAndBands,ge=this.eventOptions;if(L(this,"destroy",{keepEvents:j}),j||me(U),[U.ticks,U.minorTicks,U.alternateBands].forEach(function(R){V(R)}),ne){let R=ne.length;for(;R--;)ne[R].destroy()}for(let R in["axisLine","axisTitle","axisGroup","gridGroup","labelGroup","cross","scrollbar"].forEach(function(G){U[G]&&(U[G]=U[G].destroy())}),U.plotLinesAndBandsGroups)U.plotLinesAndBandsGroups[R]=U.plotLinesAndBandsGroups[R].destroy();te(U,function(R,G){U.getKeepProps().indexOf(G)===-1&&delete U[G]}),this.eventOptions=ge}drawCrosshair(j,U){let ne=this.crosshair,ge=_(ne&&ne.snap,!0),R=this.chart,G,ie,ue,de=this.cross,ye;if(L(this,"drawCrosshair",{e:j,point:U}),j||(j=this.cross&&this.cross.e),ne&&(z(U)||!ge)!==!1){if(ge?z(U)&&(ie=_(this.coll!=="colorAxis"?U.crosshairPos:null,this.isXAxis?U.plotX:this.len-U.plotY)):ie=j&&(this.horiz?j.chartX-this.pos:this.len-j.chartY+this.pos),z(ie)&&(ye={value:U&&(this.isXAxis?U.x:_(U.stackY,U.y)),translatedValue:ie},R.polar&&K(ye,{isCrosshair:!0,chartX:j&&j.chartX,chartY:j&&j.chartY,point:U}),G=this.getPlotLinePath(ye)||null),!z(G)){this.hideCrosshair();return}ue=this.categories&&!this.isRadial,de||(this.cross=de=R.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(ue?"category ":"thin ")+(ne.className||"")).attr({zIndex:_(ne.zIndex,2)}).add(),!R.styledMode&&(de.attr({stroke:ne.color||(ue?y.parse("#ccd3ff").setOpacity(.25).get():"#cccccc"),"stroke-width":_(ne.width,1)}).css({"pointer-events":"none"}),ne.dashStyle&&de.attr({dashstyle:ne.dashStyle}))),de.show().attr({d:G}),ue&&!ne.width&&de.attr({"stroke-width":this.transA}),this.cross.e=j}else this.hideCrosshair();L(this,"afterDrawCrosshair",{e:j,point:U})}hideCrosshair(){this.cross&&this.cross.hide(),L(this,"afterHideCrosshair")}update(j,U){let ne=this.chart;j=E(this.userOptions,j),this.destroy(!0),this.init(ne,j),ne.isDirtyBox=!0,_(U,!0)&&ne.redraw()}remove(j){let U=this.chart,ne=this.coll,ge=this.series,R=ge.length;for(;R--;)ge[R]&&ge[R].remove(!1);le(U.axes,this),le(U[ne]||[],this),U.orderItems(ne),this.destroy(),U.isDirtyBox=!0,_(j,!0)&&U.redraw()}setTitle(j,U){this.update({title:j},U)}setCategories(j,U){this.update({categories:j},U)}}return q.keepProps=["coll","extKey","hcEvents","len","names","series","userMax","userMin"],q}),c(o,"Core/Axis/DateTimeAxis.js",[o["Core/Utilities.js"]],function(d){var p;let{addEvent:y,getMagnitude:x,normalizeTickInterval:b,timeUnits:k}=d;return function(O){function N(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)}function Z(){if(this.type!=="datetime"){this.dateTime=void 0;return}this.dateTime||(this.dateTime=new J(this))}O.compose=function(D){return D.keepProps.includes("dateTime")||(D.keepProps.push("dateTime"),D.prototype.getTimeTicks=N,y(D,"afterSetType",Z)),D};class J{constructor(F){this.axis=F}normalizeTimeTickInterval(F,ae){let ee=ae||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],B=ee[ee.length-1],Y=k[B[0]],$=B[1],Q;for(Q=0;Q<ee.length&&(Y=k[(B=ee[Q])[0]],$=B[1],!ee[Q+1]||!(F<=(Y*$[$.length-1]+k[ee[Q+1][0]])/2));Q++);Y===k.year&&F<5*Y&&($=[1,2,5]);let z=b(F/Y,$,B[0]==="year"?Math.max(x(F/Y),1):1);return{unitRange:Y,count:z,unitName:B[0]}}getXDateFormat(F,ae){let{axis:ee}=this,B=ee.chart.time;return ee.closestPointRange?B.getDateFormat(ee.closestPointRange,F,ee.options.startOfWeek,ae)||B.resolveDTLFormat(ae.year).main:B.resolveDTLFormat(ae.day).main}}O.Additions=J}(p||(p={})),p}),c(o,"Core/Axis/LogarithmicAxis.js",[o["Core/Utilities.js"]],function(d){var p;let{addEvent:y,normalizeTickInterval:x,pick:b}=d;return function(k){function O(){this.type!=="logarithmic"?this.logarithmic=void 0:this.logarithmic??(this.logarithmic=new Z(this))}function N(){let J=this.logarithmic;J&&(this.lin2val=function(D){return J.lin2log(D)},this.val2lin=function(D){return J.log2lin(D)})}k.compose=function(J){return J.keepProps.includes("logarithmic")||(J.keepProps.push("logarithmic"),y(J,"afterSetType",O),y(J,"afterInit",N)),J};class Z{constructor(D){this.axis=D}getLogTickPositions(D,F,ae,ee){let B=this.axis,Y=B.len,$=B.options,Q=[];if(ee||(this.minorAutoInterval=void 0),D>=.5)D=Math.round(D),Q=B.getLinearTickPositions(D,F,ae);else if(D>=.08){let z,V,le,se,K,L,X,H=Math.floor(F);for(z=D>.3?[1,2,4]:D>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],V=H;V<ae+1&&!X;V++)for(le=0,se=z.length;le<se&&!X;le++)(K=this.log2lin(this.lin2log(V)*z[le]))>F&&(!ee||L<=ae)&&L!==void 0&&Q.push(L),L>ae&&(X=!0),L=K}else{let z=this.lin2log(F),V=this.lin2log(ae),le=ee?B.getMinorTickInterval():$.tickInterval,se=$.tickPixelInterval/(ee?5:1),K=ee?Y/B.tickPositions.length:Y;D=x(D=b(le==="auto"?null:le,this.minorAutoInterval,(V-z)*se/(K||1))),Q=B.getLinearTickPositions(D,z,V).map(this.log2lin),ee||(this.minorAutoInterval=D/5)}return ee||(B.tickInterval=D),Q}lin2log(D){return Math.pow(10,D)}log2lin(D){return Math.log(D)/Math.LN10}}k.Additions=Z}(p||(p={})),p}),c(o,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[o["Core/Utilities.js"]],function(d){var p;let{erase:y,extend:x,isNumber:b}=d;return function(k){let O;function N(B){return this.addPlotBandOrLine(B,"plotBands")}function Z(B,Y){let $=this.userOptions,Q=new O(this,B);if(this.visible&&(Q=Q.render()),Q){if(this._addedPlotLB||(this._addedPlotLB=!0,($.plotLines||[]).concat($.plotBands||[]).forEach(z=>{this.addPlotBandOrLine(z)})),Y){let z=$[Y]||[];z.push(B),$[Y]=z}this.plotLinesAndBands.push(Q)}return Q}function J(B){return this.addPlotBandOrLine(B,"plotLines")}function D(B,Y,$){$=$||this.options;let Q=this.getPlotLinePath({value:Y,force:!0,acrossPanes:$.acrossPanes}),z=[],V=this.horiz,le=!b(this.min)||!b(this.max)||B<this.min&&Y<this.min||B>this.max&&Y>this.max,se=this.getPlotLinePath({value:B,force:!0,acrossPanes:$.acrossPanes}),K,L=1,X;if(se&&Q)for(le&&(X=se.toString()===Q.toString(),L=0),K=0;K<se.length;K+=2){let H=se[K],A=se[K+1],S=Q[K],T=Q[K+1];(H[0]==="M"||H[0]==="L")&&(A[0]==="M"||A[0]==="L")&&(S[0]==="M"||S[0]==="L")&&(T[0]==="M"||T[0]==="L")&&(V&&S[1]===H[1]?(S[1]+=L,T[1]+=L):V||S[2]!==H[2]||(S[2]+=L,T[2]+=L),z.push(["M",H[1],H[2]],["L",A[1],A[2]],["L",T[1],T[2]],["L",S[1],S[2]],["Z"])),z.isFlat=X}return z}function F(B){this.removePlotBandOrLine(B)}function ae(B){let Y=this.plotLinesAndBands,$=this.options,Q=this.userOptions;if(Y){let z=Y.length;for(;z--;)Y[z].id===B&&Y[z].destroy();[$.plotLines||[],Q.plotLines||[],$.plotBands||[],Q.plotBands||[]].forEach(function(V){for(z=V.length;z--;)(V[z]||{}).id===B&&y(V,V[z])})}}function ee(B){this.removePlotBandOrLine(B)}k.compose=function(B,Y){let $=Y.prototype;return $.addPlotBand||(O=B,x($,{addPlotBand:N,addPlotLine:J,addPlotBandOrLine:Z,getPlotBandPath:D,removePlotBand:F,removePlotLine:ee,removePlotBandOrLine:ae})),Y}}(p||(p={})),p}),c(o,"Core/Axis/PlotLineOrBand/PlotLineOrBand.js",[o["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"],o["Core/Utilities.js"]],function(d,p){let{addEvent:y,arrayMax:x,arrayMin:b,defined:k,destroyObjectProperties:O,erase:N,fireEvent:Z,merge:J,objectEach:D,pick:F}=p;class ae{static compose(B,Y){return y(B,"afterInit",function(){this.labelCollectors.push(()=>{var Q;let $=[];for(let z of this.axes)for(let{label:V,options:le}of z.plotLinesAndBands)V&&!((Q=le==null?void 0:le.label)!=null&&Q.allowOverlap)&&$.push(V);return $})}),d.compose(ae,Y)}constructor(B,Y){this.axis=B,this.options=Y,this.id=Y.id}render(){Z(this,"render");let{axis:B,options:Y}=this,{horiz:$,logarithmic:Q}=B,{color:z,events:V,zIndex:le=0}=Y,se={},K=B.chart.renderer,L=Y.to,X=Y.from,H=Y.value,A=Y.borderWidth,S=Y.label,{label:T,svgElem:E}=this,P=[],te,_=k(X)&&k(L),re=k(H),me=!E,g={class:"highcharts-plot-"+(_?"band ":"line ")+(Y.className||"")},w=_?"bands":"lines";if(!B.chart.styledMode&&(re?(g.stroke=z||"#999999",g["stroke-width"]=F(Y.width,1),Y.dashStyle&&(g.dashstyle=Y.dashStyle)):_&&(g.fill=z||"#e6e9ff",A&&(g.stroke=Y.borderColor,g["stroke-width"]=A))),se.zIndex=le,w+="-"+le,(te=B.plotLinesAndBandsGroups[w])||(B.plotLinesAndBandsGroups[w]=te=K.g("plot-"+w).attr(se).add()),E||(this.svgElem=E=K.path().attr(g).add(te)),k(H))P=B.getPlotLinePath({value:(Q==null?void 0:Q.log2lin(H))??H,lineWidth:E.strokeWidth(),acrossPanes:Y.acrossPanes});else{if(!(k(X)&&k(L)))return;P=B.getPlotBandPath((Q==null?void 0:Q.log2lin(X))??X,(Q==null?void 0:Q.log2lin(L))??L,Y)}return!this.eventsAdded&&V&&(D(V,(C,q)=>{E==null||E.on(q,ce=>{V[q].apply(this,[ce])})}),this.eventsAdded=!0),(me||!E.d)&&(P!=null&&P.length)?E.attr({d:P}):E&&(P?(E.show(),E.animate({d:P})):E.d&&(E.hide(),T&&(this.label=T=T.destroy()))),S&&(k(S.text)||k(S.formatter))&&(P!=null&&P.length)&&B.width>0&&B.height>0&&!P.isFlat?(S=J({align:$&&_?"center":void 0,x:$?!_&&4:10,verticalAlign:!$&&_?"middle":void 0,y:$?_?16:10:_?6:-4,rotation:$&&!_?90:0,..._?{inside:!0}:{}},S),this.renderLabel(S,P,_,le)):T&&T.hide(),this}renderLabel(B,Y,$,Q){var S;let z=this.axis,V=z.chart.renderer,le=B.inside,se=this.label;se||(this.label=se=V.text(this.getLabelText(B),0,0,B.useHTML).attr({align:B.textAlign||B.align,rotation:B.rotation,class:"highcharts-plot-"+($?"band":"line")+"-label "+(B.className||""),zIndex:Q}),z.chart.styledMode||se.css(J({fontSize:"0.8em",textOverflow:$&&!le?"":"ellipsis"},B.style)),se.add());let K=Y.xBounds||[Y[0][1],Y[1][1],$?Y[2][1]:Y[0][1]],L=Y.yBounds||[Y[0][2],Y[1][2],$?Y[2][2]:Y[0][2]],X=b(K),H=b(L),A=x(K)-X;se.align(B,!1,{x:X,y:H,width:A,height:x(L)-H}),(!se.alignValue||se.alignValue==="left"||k(le))&&se.css({width:(((S=B.style)==null?void 0:S.width)||($&&le?A:se.rotation===90?z.height-(se.alignAttr.y-z.top):(B.clip?z.width:z.chart.chartWidth)-(se.alignAttr.x-z.left)))+"px"}),se.show(!0)}getLabelText(B){return k(B.formatter)?B.formatter.call(this):B.text}destroy(){N(this.axis.plotLinesAndBands,this),delete this.axis,O(this)}}return ae}),c(o,"Core/Tooltip.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Templating.js"],o["Core/Globals.js"],o["Core/Renderer/RendererUtilities.js"],o["Core/Renderer/RendererRegistry.js"],o["Core/Utilities.js"]],function(d,p,y,x,b,k){var O;let{animObject:N}=d,{format:Z}=p,{composed:J,doc:D,isSafari:F}=y,{distribute:ae}=x,{addEvent:ee,clamp:B,css:Y,discardElement:$,extend:Q,fireEvent:z,isArray:V,isNumber:le,isString:se,merge:K,pick:L,pushUnique:X,splat:H,syncTimeout:A}=k;class S{constructor(E,P,te){this.allowShared=!0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.options={},this.outside=!1,this.chart=E,this.init(E,P),this.pointer=te}bodyFormatter(E){return E.map(function(P){let te=P.series.tooltipOptions;return(te[(P.point.formatPrefix||"point")+"Formatter"]||P.point.tooltipFormatter).call(P.point,te[(P.point.formatPrefix||"point")+"Format"]||"")})}cleanSplit(E){this.chart.series.forEach(function(P){let te=P&&P.tt;te&&(!te.isActive||E?P.tt=te.destroy():te.isActive=!1)})}defaultFormatter(E){let P,te=this.points||H(this);return(P=(P=[E.tooltipFooterHeaderFormatter(te[0])]).concat(E.bodyFormatter(te))).push(E.tooltipFooterHeaderFormatter(te[0],!0)),P}destroy(){this.label&&(this.label=this.label.destroy()),this.split&&(this.cleanSplit(!0),this.tt&&(this.tt=this.tt.destroy())),this.renderer&&(this.renderer=this.renderer.destroy(),$(this.container)),k.clearTimeout(this.hideTimer)}getAnchor(E,P){let te,{chart:_,pointer:re}=this,me=_.inverted,g=_.plotTop,w=_.plotLeft;if((E=H(E))[0].series&&E[0].series.yAxis&&!E[0].series.yAxis.options.reversedStacks&&(E=E.slice().reverse()),this.followPointer&&P)P.chartX===void 0&&(P=re.normalize(P)),te=[P.chartX-w,P.chartY-g];else if(E[0].tooltipPos)te=E[0].tooltipPos;else{let C=0,q=0;E.forEach(function(ce){let j=ce.pos(!0);j&&(C+=j[0],q+=j[1])}),C/=E.length,q/=E.length,this.shared&&E.length>1&&P&&(me?C=P.chartX:q=P.chartY),te=[C-w,q-g]}return te.map(Math.round)}getClassName(E,P,te){let _=this.options,re=E.series,me=re.options;return[_.className,"highcharts-label",te&&"highcharts-tooltip-header",P?"highcharts-tooltip-box":"highcharts-tooltip",!te&&"highcharts-color-"+L(E.colorIndex,re.colorIndex),me&&me.className].filter(se).join(" ")}getLabel({anchorX:E,anchorY:P}={anchorX:0,anchorY:0}){let te=this,_=this.chart.styledMode,re=this.options,me=this.split&&this.allowShared,g=this.container,w=this.chart.renderer;if(this.label){let C=!this.label.hasClass("highcharts-label");(!me&&C||me&&!C)&&this.destroy()}if(!this.label){if(this.outside){let C=this.chart.options.chart.style,q=b.getRendererType();this.container=g=y.doc.createElement("div"),g.className="highcharts-tooltip-container",Y(g,{position:"absolute",top:"1px",pointerEvents:"none",zIndex:Math.max(this.options.style.zIndex||0,(C&&C.zIndex||0)+3)}),this.renderer=w=new q(g,0,0,C,void 0,void 0,w.styledMode)}if(me?this.label=w.g("tooltip"):(this.label=w.label("",E,P,re.shape,void 0,void 0,re.useHTML,void 0,"tooltip").attr({padding:re.padding,r:re.borderRadius}),_||this.label.attr({fill:re.backgroundColor,"stroke-width":re.borderWidth||0}).css(re.style).css({pointerEvents:re.style.pointerEvents||(this.shouldStickOnContact()?"auto":"none")})),te.outside){let C=this.label;[C.xSetter,C.ySetter].forEach((q,ce)=>{C[ce?"ySetter":"xSetter"]=j=>{q.call(C,te.distance),C[ce?"y":"x"]=j,g&&(g.style[ce?"top":"left"]=`${j}px`)}})}this.label.attr({zIndex:8}).shadow(re.shadow).add()}return g&&!g.parentElement&&y.doc.body.appendChild(g),this.label}getPlayingField(){let{body:E,documentElement:P}=D,{chart:te,distance:_,outside:re}=this;return{width:re?Math.max(E.scrollWidth,P.scrollWidth,E.offsetWidth,P.offsetWidth,P.clientWidth)-2*_:te.chartWidth,height:re?Math.max(E.scrollHeight,P.scrollHeight,E.offsetHeight,P.offsetHeight,P.clientHeight):te.chartHeight}}getPosition(E,P,te){var ke,Ee;let{distance:_,chart:re,outside:me,pointer:g}=this,{inverted:w,plotLeft:C,plotTop:q,polar:ce}=re,{plotX:j=0,plotY:U=0}=te,ne={},ge=w&&te.h||0,{height:R,width:G}=this.getPlayingField(),ie=g.getChartPosition(),ue=_e=>_e*ie.scaleX,de=_e=>_e*ie.scaleY,ye=_e=>{let Le=_e==="x";return[_e,Le?G:R,Le?E:P].concat(me?[Le?ue(E):de(P),Le?ie.left-_+ue(j+C):ie.top-_+de(U+q),0,Le?G:R]:[Le?E:P,Le?j+C:U+q,Le?C:q,Le?C+re.plotWidth:q+re.plotHeight])},Se=ye("y"),Ce=ye("x"),Ae,Ne=!!te.negative;!ce&&((Ee=(ke=re.hoverSeries)==null?void 0:ke.yAxis)!=null&&Ee.reversed)&&(Ne=!Ne);let Re=!this.followPointer&&L(te.ttBelow,!ce&&!w===Ne),fe=function(_e,Le,Be,$e,Me,ze,Xe){let Ve=me?_e==="y"?de(_):ue(_):_,Ie=(Be-$e)/2,Ge=$e<Me-_,pt=Me+_+$e<Le,mt=Me-Ve-Be+Ie,ct=Me+Ve-Ie;if(Re&&pt)ne[_e]=ct;else if(!Re&&Ge)ne[_e]=mt;else if(Ge)ne[_e]=Math.min(Xe-$e,mt-ge<0?mt:mt-ge);else{if(!pt)return!1;ne[_e]=Math.max(ze,ct+ge+Be>Le?ct:ct+ge)}},pe=function(_e,Le,Be,$e,Me){if(Me<_||Me>Le-_)return!1;Me<Be/2?ne[_e]=1:Me>Le-$e/2?ne[_e]=Le-$e-2:ne[_e]=Me-Be/2},ve=function(_e){[Se,Ce]=[Ce,Se],Ae=_e},be=()=>{fe.apply(0,Se)!==!1?pe.apply(0,Ce)!==!1||Ae||(ve(!0),be()):Ae?ne.x=ne.y=0:(ve(!0),be())};return(w&&!ce||this.len>1)&&ve(),be(),ne}hide(E){let P=this;k.clearTimeout(this.hideTimer),E=L(E,this.options.hideDelay),this.isHidden||(this.hideTimer=A(function(){let te=P.getLabel();P.getLabel().animate({opacity:0},{duration:E&&150,complete:()=>{te.hide(),P.container&&P.container.remove()}}),P.isHidden=!0},E))}init(E,P){this.chart=E,this.options=P,this.crosshairs=[],this.isHidden=!0,this.split=P.split&&!E.inverted&&!E.polar,this.shared=P.shared||this.split,this.outside=L(P.outside,!!(E.scrollablePixelsX||E.scrollablePixelsY))}shouldStickOnContact(E){return!!(!this.followPointer&&this.options.stickOnContact&&(!E||this.pointer.inClass(E.target,"highcharts-tooltip")))}move(E,P,te,_){let re=this,me=N(!re.isHidden&&re.options.animation),g=re.followPointer||(re.len||0)>1,w={x:E,y:P};g||(w.anchorX=te,w.anchorY=_),me.step=()=>re.drawTracker(),re.getLabel().animate(w,me)}refresh(E,P){let{chart:te,options:_,pointer:re,shared:me}=this,g=H(E),w=g[0],C=[],q=_.format,ce=_.formatter||this.defaultFormatter,j=te.styledMode,U={},ne=this.allowShared;if(!_.enabled||!w.series)return;k.clearTimeout(this.hideTimer),this.allowShared=!(!V(E)&&E.series&&E.series.noSharedTooltip),ne=ne&&!this.allowShared,this.followPointer=!this.split&&w.series.tooltipOptions.followPointer;let ge=this.getAnchor(E,P),R=ge[0],G=ge[1];me&&this.allowShared?(re.applyInactiveState(g),g.forEach(function(de){de.setState("hover"),C.push(de.getLabelConfig())}),(U=w.getLabelConfig()).points=C):U=w.getLabelConfig(),this.len=C.length;let ie=se(q)?Z(q,U,te):ce.call(U,this),ue=w.series;if(this.distance=L(ue.tooltipOptions.distance,16),ie===!1)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(ie,g);else{let de=R,ye=G;if(P&&re.isDirectTouch&&(de=P.chartX-te.plotLeft,ye=P.chartY-te.plotTop),te.polar||ue.options.clip===!1||g.some(Se=>re.isDirectTouch||Se.series.shouldShowTooltip(de,ye))){let Se=this.getLabel(ne&&this.tt||{});(!_.style.width||j)&&Se.css({width:(this.outside?this.getPlayingField():te.spacingBox).width+"px"}),Se.attr({class:this.getClassName(w),text:ie&&ie.join?ie.join(""):ie}),this.outside&&Se.attr({x:B(Se.x||0,0,this.getPlayingField().width-(Se.width||0))}),j||Se.attr({stroke:_.borderColor||w.color||ue.color||"#666666"}),this.updatePosition({plotX:R,plotY:G,negative:w.negative,ttBelow:w.ttBelow,h:ge[2]||0})}else{this.hide();return}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}z(this,"refresh")}renderSplit(E,P){var Le;let te=this,{chart:_,chart:{chartWidth:re,chartHeight:me,plotHeight:g,plotLeft:w,plotTop:C,scrollablePixelsY:q=0,scrollablePixelsX:ce,styledMode:j},distance:U,options:ne,options:{positioner:ge},pointer:R}=te,{scrollLeft:G=0,scrollTop:ie=0}=((Le=_.scrollablePlotArea)==null?void 0:Le.scrollingContainer)||{},ue=te.outside&&typeof ce!="number"?D.documentElement.getBoundingClientRect():{left:G,right:G+re},de=te.getLabel(),ye=this.renderer||_.renderer,Se=!!(_.xAxis[0]&&_.xAxis[0].opposite),{left:Ce,top:Ae}=R.getChartPosition(),Ne=C+ie,Re=0,fe=g-q;function pe(Be,$e,Me,ze,Xe=!0){let Ve,Ie;return Me?(Ve=Se?0:fe,Ie=B(Be-ze/2,ue.left,ue.right-ze-(te.outside?Ce:0))):(Ve=$e-Ne,Ie=B(Ie=Xe?Be-ze-U:Be+U,Xe?Ie:ue.left,ue.right)),{x:Ie,y:Ve}}se(E)&&(E=[!1,E]);let ve=E.slice(0,P.length+1).reduce(function(Be,$e,Me){if($e!==!1&&$e!==""){let ze=P[Me-1]||{isHeader:!0,plotX:P[0].plotX,plotY:g,series:{}},Xe=ze.isHeader,Ve=Xe?te:ze.series,Ie=Ve.tt=function(_t,Rt,Vt){let xt=_t,{isHeader:lt,series:ht}=Rt;if(!xt){let ft={padding:ne.padding,r:ne.borderRadius};j||(ft.fill=ne.backgroundColor,ft["stroke-width"]=ne.borderWidth??1),xt=ye.label("",0,0,ne[lt?"headerShape":"shape"],void 0,void 0,ne.useHTML).addClass(te.getClassName(Rt,!0,lt)).attr(ft).add(de)}return xt.isActive=!0,xt.attr({text:Vt}),j||xt.css(ne.style).attr({stroke:ne.borderColor||Rt.color||ht.color||"#333333"}),xt}(Ve.tt,ze,$e.toString()),Ge=Ie.getBBox(),pt=Ge.width+Ie.strokeWidth();Xe&&(Re=Ge.height,fe+=Re,Se&&(Ne-=Re));let{anchorX:mt,anchorY:ct}=function(_t){let Rt,Vt,{isHeader:xt,plotX:lt=0,plotY:ht=0,series:ft}=_t;if(xt)Rt=Math.max(w+lt,w),Vt=C+g/2;else{let{xAxis:Ct,yAxis:ut}=ft;Rt=Ct.pos+B(lt,-U,Ct.len+U),ft.shouldShowTooltip(0,ut.pos-C+ht,{ignoreX:!0})&&(Vt=ut.pos+ht)}return{anchorX:Rt=B(Rt,ue.left-U,ue.right+U),anchorY:Vt}}(ze);if(typeof ct=="number"){let _t=Ge.height+1,Rt=ge?ge.call(te,pt,_t,ze):pe(mt,ct,Xe,pt);Be.push({align:ge?0:void 0,anchorX:mt,anchorY:ct,boxWidth:pt,point:ze,rank:L(Rt.rank,Xe?1:0),size:_t,target:Rt.y,tt:Ie,x:Rt.x})}else Ie.isActive=!1}return Be},[]);!ge&&ve.some(Be=>{let{outside:$e}=te,Me=($e?Ce:0)+Be.anchorX;return Me<ue.left&&Me+Be.boxWidth<ue.right||Me<Ce-ue.left+Be.boxWidth&&ue.right-Me>Me})&&(ve=ve.map(Be=>{let{x:$e,y:Me}=pe(Be.anchorX,Be.anchorY,Be.point.isHeader,Be.boxWidth,!1);return Q(Be,{target:Me,x:$e})})),te.cleanSplit(),ae(ve,fe);let be={left:Ce,right:Ce};ve.forEach(function(Be){let{x:$e,boxWidth:Me,isHeader:ze}=Be;!ze&&(te.outside&&Ce+$e<be.left&&(be.left=Ce+$e),!ze&&te.outside&&be.left+Me>be.right&&(be.right=Ce+$e))}),ve.forEach(function(Be){let{x:$e,anchorX:Me,anchorY:ze,pos:Xe,point:{isHeader:Ve}}=Be,Ie={visibility:Xe===void 0?"hidden":"inherit",x:$e,y:(Xe||0)+Ne,anchorX:Me,anchorY:ze};if(te.outside&&$e<Me){let Ge=Ce-be.left;Ge>0&&(Ve||(Ie.x=$e+Ge,Ie.anchorX=Me+Ge),Ve&&(Ie.x=(be.right-be.left)/2,Ie.anchorX=Me+Ge))}Be.tt.attr(Ie)});let{container:ke,outside:Ee,renderer:_e}=te;if(Ee&&ke&&_e){let{width:Be,height:$e,x:Me,y:ze}=de.getBBox();_e.setSize(Be+Me,$e+ze,!1),ke.style.left=be.left+"px",ke.style.top=Ae+"px"}F&&de.attr({opacity:de.opacity===1?.999:1})}drawTracker(){if(!this.shouldStickOnContact()){this.tracker&&(this.tracker=this.tracker.destroy());return}let E=this.chart,P=this.label,te=this.shared?E.hoverPoints:E.hoverPoint;if(!P||!te)return;let _={x:0,y:0,width:0,height:0},re=this.getAnchor(te),me=P.getBBox();re[0]+=E.plotLeft-(P.translateX||0),re[1]+=E.plotTop-(P.translateY||0),_.x=Math.min(0,re[0]),_.y=Math.min(0,re[1]),_.width=re[0]<0?Math.max(Math.abs(re[0]),me.width-re[0]):Math.max(Math.abs(re[0]),me.width),_.height=re[1]<0?Math.max(Math.abs(re[1]),me.height-Math.abs(re[1])):Math.max(Math.abs(re[1]),me.height),this.tracker?this.tracker.attr(_):(this.tracker=P.renderer.rect(_).addClass("highcharts-tracker").add(P),E.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}styledModeFormat(E){return E.replace('style="font-size: 0.8em"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')}tooltipFooterHeaderFormatter(E,P){let te=E.series,_=te.tooltipOptions,re=te.xAxis,me=re&&re.dateTime,g={isFooter:P,labelConfig:E},w=_.xDateFormat,C=_[P?"footerFormat":"headerFormat"];return z(this,"headerFormatter",g,function(q){me&&!w&&le(E.key)&&(w=me.getXDateFormat(E.key,_.dateTimeLabelFormats)),me&&w&&(E.point&&E.point.tooltipDateKeys||["key"]).forEach(function(ce){C=C.replace("{point."+ce+"}","{point."+ce+":"+w+"}")}),te.chart.styledMode&&(C=this.styledModeFormat(C)),q.text=Z(C,{point:E,series:te},this.chart)}),g.text}update(E){this.destroy(),this.init(this.chart,K(!0,this.options,E))}updatePosition(E){let{chart:P,container:te,distance:_,options:re,pointer:me,renderer:g}=this,{height:w=0,width:C=0}=this.getLabel(),{left:q,top:ce,scaleX:j,scaleY:U}=me.getChartPosition(),ne=(re.positioner||this.getPosition).call(this,C,w,E),ge=(E.plotX||0)+P.plotLeft,R=(E.plotY||0)+P.plotTop,G;g&&te&&(re.positioner&&(ne.x+=q-_,ne.y+=ce-_),G=(re.borderWidth||0)+2*_+2,g.setSize(C+G,w+G,!1),(j!==1||U!==1)&&(Y(te,{transform:`scale(${j}, ${U})`}),ge*=j,R*=U),ge+=q-ne.x,R+=ce-ne.y),this.move(Math.round(ne.x),Math.round(ne.y||0),ge,R)}}return(O=S||(S={})).compose=function(T){X(J,"Core.Tooltip")&&ee(T,"afterInit",function(){let E=this.chart;E.options.tooltip&&(E.tooltip=new O(E,E.options.tooltip,this))})},S}),c(o,"Core/Series/Point.js",[o["Core/Renderer/HTML/AST.js"],o["Core/Animation/AnimationUtilities.js"],o["Core/Defaults.js"],o["Core/Templating.js"],o["Core/Utilities.js"]],function(d,p,y,x,b){let{animObject:k}=p,{defaultOptions:O}=y,{format:N}=x,{addEvent:Z,crisp:J,erase:D,extend:F,fireEvent:ae,getNestedProperty:ee,isArray:B,isFunction:Y,isNumber:$,isObject:Q,merge:z,pick:V,syncTimeout:le,removeEvent:se,uniqueKey:K}=b;class L{animateBeforeDestroy(){let H=this,A={x:H.startXPos,opacity:0},S=H.getGraphicalProps();S.singular.forEach(function(T){H[T]=H[T].animate(T==="dataLabel"?{x:H[T].startXPos,y:H[T].startYPos,opacity:0}:A)}),S.plural.forEach(function(T){H[T].forEach(function(E){E.element&&E.animate(F({x:H.startXPos},E.startYPos?{x:E.startXPos,y:E.startYPos}:{}))})})}applyOptions(H,A){let S=this.series,T=S.options.pointValKey||S.pointValKey;return F(this,H=L.prototype.optionsToObject.call(this,H)),this.options=this.options?F(this.options,H):H,H.group&&delete this.group,H.dataLabels&&delete this.dataLabels,T&&(this.y=L.prototype.getNestedProperty.call(this,T)),this.selected&&(this.state="select"),"name"in this&&A===void 0&&S.xAxis&&S.xAxis.hasNames&&(this.x=S.xAxis.nameToX(this)),this.x===void 0&&S?this.x=A??S.autoIncrement():$(H.x)&&S.options.relativeXValue&&(this.x=S.autoIncrement(H.x)),this.isNull=this.isValid&&!this.isValid(),this.formatPrefix=this.isNull?"null":"point",this}destroy(){if(!this.destroyed){let H=this,A=H.series,S=A.chart,T=A.options.dataSorting,E=S.hoverPoints,P=k(H.series.chart.renderer.globalAnimation),te=()=>{for(let _ in(H.graphic||H.graphics||H.dataLabel||H.dataLabels)&&(se(H),H.destroyElements()),H)delete H[_]};H.legendItem&&S.legend.destroyItem(H),E&&(H.setState(),D(E,H),E.length||(S.hoverPoints=null)),H===S.hoverPoint&&H.onMouseOut(),T&&T.enabled?(this.animateBeforeDestroy(),le(te,P.duration)):te(),S.pointCount--}this.destroyed=!0}destroyElements(H){let A=this,S=A.getGraphicalProps(H);S.singular.forEach(function(T){A[T]=A[T].destroy()}),S.plural.forEach(function(T){A[T].forEach(function(E){E&&E.element&&E.destroy()}),delete A[T]})}firePointEvent(H,A,S){let T=this,E=this.series.options;T.manageEvent(H),H==="click"&&E.allowPointSelect&&(S=function(P){!T.destroyed&&T.select&&T.select(null,P.ctrlKey||P.metaKey||P.shiftKey)}),ae(T,H,A,S)}getClassName(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(this.colorIndex!==void 0?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")}getGraphicalProps(H){let A,S,T=this,E=[],P={singular:[],plural:[]};for((H=H||{graphic:1,dataLabel:1}).graphic&&E.push("graphic","connector"),H.dataLabel&&E.push("dataLabel","dataLabelPath","dataLabelUpper"),S=E.length;S--;)T[A=E[S]]&&P.singular.push(A);return["graphic","dataLabel"].forEach(function(te){let _=te+"s";H[te]&&T[_]&&P.plural.push(_)}),P}getLabelConfig(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}}getNestedProperty(H){return H?H.indexOf("custom.")===0?ee(H,this.options):this[H]:void 0}getZone(){let H=this.series,A=H.zones,S=H.zoneAxis||"y",T,E=0;for(T=A[0];this[S]>=T.value;)T=A[++E];return this.nonZonedColor||(this.nonZonedColor=this.color),T&&T.color&&!this.options.color?this.color=T.color:this.color=this.nonZonedColor,T}hasNewShapeType(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType}constructor(H,A,S){this.formatPrefix="point",this.visible=!0,this.series=H,this.applyOptions(A,S),this.id??(this.id=K()),this.resolveColor(),H.chart.pointCount++,ae(this,"afterInit")}isValid(){return($(this.x)||this.x instanceof Date)&&$(this.y)}optionsToObject(H){let A=this.series,S=A.options.keys,T=S||A.pointArrayMap||["y"],E=T.length,P={},te,_=0,re=0;if($(H)||H===null)P[T[0]]=H;else if(B(H))for(!S&&H.length>E&&((te=typeof H[0])=="string"?P.name=H[0]:te==="number"&&(P.x=H[0]),_++);re<E;)S&&H[_]===void 0||(T[re].indexOf(".")>0?L.prototype.setNestedProperty(P,H[_],T[re]):P[T[re]]=H[_]),_++,re++;else typeof H=="object"&&(P=H,H.dataLabels&&(A.hasDataLabels=()=>!0),H.marker&&(A._hasPointMarkers=!0));return P}pos(H,A=this.plotY){if(!this.destroyed){let{plotX:S,series:T}=this,{chart:E,xAxis:P,yAxis:te}=T,_=0,re=0;if($(S)&&$(A))return H&&(_=P?P.pos:E.plotLeft,re=te?te.pos:E.plotTop),E.inverted&&P&&te?[te.len-A+re,P.len-S+_]:[S+_,A+re]}}resolveColor(){let H=this.series,A=H.chart.options.chart,S=H.chart.styledMode,T,E,P=A.colorCount,te;delete this.nonZonedColor,H.options.colorByPoint?(S||(T=(E=H.options.colors||H.chart.options.colors)[H.colorCounter],P=E.length),te=H.colorCounter,H.colorCounter++,H.colorCounter===P&&(H.colorCounter=0)):(S||(T=H.color),te=H.colorIndex),this.colorIndex=V(this.options.colorIndex,te),this.color=V(this.options.color,T)}setNestedProperty(H,A,S){return S.split(".").reduce(function(T,E,P,te){let _=te.length-1===P;return T[E]=_?A:Q(T[E],!0)?T[E]:{},T[E]},H),H}shouldDraw(){return!this.isNull}tooltipFormatter(H){let A=this.series,S=A.tooltipOptions,T=V(S.valueDecimals,""),E=S.valuePrefix||"",P=S.valueSuffix||"";return A.chart.styledMode&&(H=A.chart.tooltip.styledModeFormat(H)),(A.pointArrayMap||["y"]).forEach(function(te){te="{point."+te,(E||P)&&(H=H.replace(RegExp(te+"}","g"),E+te+"}"+P)),H=H.replace(RegExp(te+"}","g"),te+":,."+T+"f}")}),N(H,{point:this,series:this.series},A.chart)}update(H,A,S,T){let E,P=this,te=P.series,_=P.graphic,re=te.chart,me=te.options;function g(){P.applyOptions(H);let w=_&&P.hasMockGraphic,C=P.y===null?!w:w;_&&C&&(P.graphic=_.destroy(),delete P.hasMockGraphic),Q(H,!0)&&(_&&_.element&&H&&H.marker&&H.marker.symbol!==void 0&&(P.graphic=_.destroy()),H!=null&&H.dataLabels&&P.dataLabel&&(P.dataLabel=P.dataLabel.destroy())),E=P.index,te.updateParallelArrays(P,E),me.data[E]=Q(me.data[E],!0)||Q(H,!0)?P.options:V(H,me.data[E]),te.isDirty=te.isDirtyData=!0,!te.fixedBox&&te.hasCartesianSeries&&(re.isDirtyBox=!0),me.legendType==="point"&&(re.isDirtyLegend=!0),A&&re.redraw(S)}A=V(A,!0),T===!1?g():P.firePointEvent("update",{options:H},g)}remove(H,A){this.series.removePoint(this.series.data.indexOf(this),H,A)}select(H,A){let S=this,T=S.series,E=T.chart;H=V(H,!S.selected),this.selectedStaging=H,S.firePointEvent(H?"select":"unselect",{accumulate:A},function(){S.selected=S.options.selected=H,T.options.data[T.data.indexOf(S)]=S.options,S.setState(H&&"select"),A||E.getSelectedPoints().forEach(function(P){let te=P.series;P.selected&&P!==S&&(P.selected=P.options.selected=!1,te.options.data[te.data.indexOf(P)]=P.options,P.setState(E.hoverPoints&&te.options.inactiveOtherPoints?"inactive":""),P.firePointEvent("unselect"))})}),delete this.selectedStaging}onMouseOver(H){let{inverted:A,pointer:S}=this.series.chart;S&&(H=H?S.normalize(H):S.getChartCoordinatesFromPoint(this,A),S.runPointActions(H,this))}onMouseOut(){let H=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(H.hoverPoints||[]).forEach(function(A){A.setState()}),H.hoverPoints=H.hoverPoint=null}manageEvent(H){var T,E,P,te,_,re;let A=z(this.series.options.point,this.options),S=(T=A.events)==null?void 0:T[H];Y(S)&&(!((E=this.hcEvents)!=null&&E[H])||((te=(P=this.hcEvents)==null?void 0:P[H])==null?void 0:te.map(me=>me.fn).indexOf(S))===-1)?((_=this.importedUserEvent)==null||_.call(this),this.importedUserEvent=Z(this,H,S)):this.importedUserEvent&&!S&&((re=this.hcEvents)!=null&&re[H])&&(se(this,H),delete this.hcEvents[H],Object.keys(this.hcEvents)||delete this.importedUserEvent)}setState(H,A){var ie;let S=this.series,T=this.state,E=S.options.states[H||"normal"]||{},P=O.plotOptions[S.type].marker&&S.options.marker,te=P&&P.enabled===!1,_=P&&P.states&&P.states[H||"normal"]||{},re=_.enabled===!1,me=this.marker||{},g=S.chart,w=P&&S.markerAttribs,C=S.halo,q,ce,j,U=S.stateMarkerGraphic,ne;if((H=H||"")===this.state&&!A||this.selected&&H!=="select"||E.enabled===!1||H&&(re||te&&_.enabled===!1)||H&&me.states&&me.states[H]&&me.states[H].enabled===!1)return;if(this.state=H,w&&(q=S.markerAttribs(this,H)),this.graphic&&!this.hasMockGraphic){if(T&&this.graphic.removeClass("highcharts-point-"+T),H&&this.graphic.addClass("highcharts-point-"+H),!g.styledMode){ce=S.pointAttribs(this,H),j=V(g.options.chart.animation,E.animation);let ue=ce.opacity;S.options.inactiveOtherPoints&&$(ue)&&(this.dataLabels||[]).forEach(function(de){de&&!de.hasClass("highcharts-data-label-hidden")&&(de.animate({opacity:ue},j),de.connector&&de.connector.animate({opacity:ue},j))}),this.graphic.animate(ce,j)}q&&this.graphic.animate(q,V(g.options.chart.animation,_.animation,P.animation)),U&&U.hide()}else H&&_&&(ne=me.symbol||S.symbol,U&&U.currentSymbol!==ne&&(U=U.destroy()),q&&(U?U[A?"animate":"attr"]({x:q.x,y:q.y}):ne&&(S.stateMarkerGraphic=U=g.renderer.symbol(ne,q.x,q.y,q.width,q.height).add(S.markerGroup),U.currentSymbol=ne)),!g.styledMode&&U&&this.state!=="inactive"&&U.attr(S.pointAttribs(this,H))),U&&(U[H&&this.isInside?"show":"hide"](),U.element.point=this,U.addClass(this.getClassName(),!0));let ge=E.halo,R=this.graphic||U,G=R&&R.visibility||"inherit";ge&&ge.size&&R&&G!=="hidden"&&!this.isCluster?(C||(S.halo=C=g.renderer.path().add(R.parentGroup)),C.show()[A?"animate":"attr"]({d:this.haloPath(ge.size)}),C.attr({class:"highcharts-halo highcharts-color-"+V(this.colorIndex,S.colorIndex)+(this.className?" "+this.className:""),visibility:G,zIndex:-1}),C.point=this,g.styledMode||C.attr(F({fill:this.color||S.color,"fill-opacity":ge.opacity},d.filterUserAttributes(ge.attributes||{})))):(ie=C==null?void 0:C.point)!=null&&ie.haloPath&&!C.point.destroyed&&C.animate({d:C.point.haloPath(0)},null,C.hide),ae(this,"afterSetState",{state:H})}haloPath(H){let A=this.pos();return A?this.series.chart.renderer.symbols.circle(J(A[0],1)-H,A[1]-H,2*H,2*H):[]}}return L}),c(o,"Core/Pointer.js",[o["Core/Color/Color.js"],o["Core/Globals.js"],o["Core/Utilities.js"]],function(d,p,y){var x;let{parse:b}=d,{charts:k,composed:O,isTouchDevice:N}=p,{addEvent:Z,attr:J,css:D,extend:F,find:ae,fireEvent:ee,isNumber:B,isObject:Y,objectEach:$,offset:Q,pick:z,pushUnique:V,splat:le}=y;class se{applyInactiveState(L){let X=[],H;(L||[]).forEach(function(A){H=A.series,X.push(H),H.linkedParent&&X.push(H.linkedParent),H.linkedSeries&&(X=X.concat(H.linkedSeries)),H.navigatorSeries&&X.push(H.navigatorSeries)}),this.chart.series.forEach(function(A){X.indexOf(A)===-1?A.setState("inactive",!0):A.options.inactiveOtherPoints&&A.setAllPointsToState("inactive")})}destroy(){let L=this;this.eventsToUnbind.forEach(X=>X()),this.eventsToUnbind=[],!p.chartCount&&(se.unbindDocumentMouseUp&&se.unbindDocumentMouseUp.forEach(X=>X()),se.unbindDocumentTouchEnd&&(se.unbindDocumentTouchEnd=se.unbindDocumentTouchEnd())),clearInterval(L.tooltipTimeout),$(L,function(X,H){L[H]=void 0})}getSelectionMarkerAttrs(L,X){let H={args:{chartX:L,chartY:X},attrs:{},shapeType:"rect"};return ee(this,"getSelectionMarkerAttrs",H,A=>{let S,{chart:T,zoomHor:E,zoomVert:P}=this,{mouseDownX:te=0,mouseDownY:_=0}=T,re=A.attrs;re.x=T.plotLeft,re.y=T.plotTop,re.width=E?1:T.plotWidth,re.height=P?1:T.plotHeight,E&&(S=L-te,re.width=Math.max(1,Math.abs(S)),re.x=(S>0?0:S)+te),P&&(S=X-_,re.height=Math.max(1,Math.abs(S)),re.y=(S>0?0:S)+_)}),H}drag(L){let{chart:X}=this,{mouseDownX:H=0,mouseDownY:A=0}=X,{panning:S,panKey:T,selectionMarkerFill:E}=X.options.chart,P=X.plotLeft,te=X.plotTop,_=X.plotWidth,re=X.plotHeight,me=Y(S)?S.enabled:S,g=T&&L[`${T}Key`],w=L.chartX,C=L.chartY,q,ce=this.selectionMarker;if((!ce||!ce.touch)&&(w<P?w=P:w>P+_&&(w=P+_),C<te?C=te:C>te+re&&(C=te+re),this.hasDragged=Math.sqrt(Math.pow(H-w,2)+Math.pow(A-C,2)),this.hasDragged>10)){q=X.isInsidePlot(H-P,A-te,{visiblePlotOnly:!0});let{shapeType:j,attrs:U}=this.getSelectionMarkerAttrs(w,C);(X.hasCartesianSeries||X.mapView)&&this.hasZoom&&q&&!g&&!ce&&(this.selectionMarker=ce=X.renderer[j](),ce.attr({class:"highcharts-selection-marker",zIndex:7}).add(),X.styledMode||ce.attr({fill:E||b("#334eff").setOpacity(.25).get()})),ce&&ce.attr(U),q&&!ce&&me&&X.pan(L,S)}}dragStart(L){let X=this.chart;X.mouseIsDown=L.type,X.cancelClick=!1,X.mouseDownX=L.chartX,X.mouseDownY=L.chartY}getSelectionBox(L){let X={args:{marker:L},result:L.getBBox()};return ee(this,"getSelectionBox",X),X.result}drop(L){let X,{chart:H,selectionMarker:A}=this;for(let S of H.axes)S.isPanning&&(S.isPanning=!1,(S.options.startOnTick||S.options.endOnTick||S.series.some(T=>T.boosted))&&(S.forceRedraw=!0,S.setExtremes(S.userMin,S.userMax,!1),X=!0));if(X&&H.redraw(),A&&L){if(this.hasDragged){let S=this.getSelectionBox(A);H.transform({axes:H.axes.filter(T=>T.zoomEnabled&&(T.coll==="xAxis"&&this.zoomX||T.coll==="yAxis"&&this.zoomY)),selection:{originalEvent:L,xAxis:[],yAxis:[],...S},from:S})}B(H.index)&&(this.selectionMarker=A.destroy())}H&&B(H.index)&&(D(H.container,{cursor:H._cursor}),H.cancelClick=this.hasDragged>10,H.mouseIsDown=!1,this.hasDragged=0,this.pinchDown=[])}findNearestKDPoint(L,X,H){let A;return L.forEach(function(S){let T=!(S.noSharedTooltip&&X)&&0>S.options.findNearestPointBy.indexOf("y"),E=S.searchPoint(H,T);Y(E,!0)&&E.series&&(!Y(A,!0)||function(P,te){var g,w;let _=P.distX-te.distX,re=P.dist-te.dist,me=((g=te.series.group)==null?void 0:g.zIndex)-((w=P.series.group)==null?void 0:w.zIndex);return _!==0&&X?_:re!==0?re:me!==0?me:P.series.index>te.series.index?-1:1}(A,E)>0)&&(A=E)}),A}getChartCoordinatesFromPoint(L,X){let{xAxis:H,yAxis:A}=L.series,S=L.shapeArgs;if(H&&A){let T=L.clientX??L.plotX??0,E=L.plotY||0;return L.isNode&&S&&B(S.x)&&B(S.y)&&(T=S.x,E=S.y),X?{chartX:A.len+A.pos-E,chartY:H.len+H.pos-T}:{chartX:T+H.pos,chartY:E+A.pos}}if(S&&S.x&&S.y)return{chartX:S.x,chartY:S.y}}getChartPosition(){if(this.chartPosition)return this.chartPosition;let{container:L}=this.chart,X=Q(L);this.chartPosition={left:X.left,top:X.top,scaleX:1,scaleY:1};let{offsetHeight:H,offsetWidth:A}=L;return A>2&&H>2&&(this.chartPosition.scaleX=X.width/A,this.chartPosition.scaleY=X.height/H),this.chartPosition}getCoordinates(L){let X={xAxis:[],yAxis:[]};for(let H of this.chart.axes)X[H.isXAxis?"xAxis":"yAxis"].push({axis:H,value:H.toValue(L[H.horiz?"chartX":"chartY"])});return X}getHoverData(L,X,H,A,S,T){let E=[],P=function(g){return g.visible&&!(!S&&g.directTouch)&&z(g.options.enableMouseTracking,!0)},te=X,_,re={chartX:T?T.chartX:void 0,chartY:T?T.chartY:void 0,shared:S};ee(this,"beforeGetHoverData",re),_=te&&!te.stickyTracking?[te]:H.filter(g=>g.stickyTracking&&(re.filter||P)(g));let me=A&&L||!T?L:this.findNearestKDPoint(_,S,T);return te=me&&me.series,me&&(S&&!te.noSharedTooltip?(_=H.filter(function(g){return re.filter?re.filter(g):P(g)&&!g.noSharedTooltip})).forEach(function(g){let w=ae(g.points,function(C){return C.x===me.x&&!C.isNull});Y(w)&&(g.boosted&&g.boost&&(w=g.boost.getPoint(w)),E.push(w))}):E.push(me)),ee(this,"afterGetHoverData",re={hoverPoint:me}),{hoverPoint:re.hoverPoint,hoverSeries:te,hoverPoints:E}}getPointFromEvent(L){let X=L.target,H;for(;X&&!H;)H=X.point,X=X.parentNode;return H}onTrackerMouseOut(L){let X=this.chart,H=L.relatedTarget,A=X.hoverSeries;this.isDirectTouch=!1,!A||!H||A.stickyTracking||this.inClass(H,"highcharts-tooltip")||this.inClass(H,"highcharts-series-"+A.index)&&this.inClass(H,"highcharts-tracker")||A.onMouseOut()}inClass(L,X){let H=L,A;for(;H;){if(A=J(H,"class")){if(A.indexOf(X)!==-1)return!0;if(A.indexOf("highcharts-container")!==-1)return!1}H=H.parentElement}}constructor(L,X){var H;this.hasDragged=0,this.pointerCaptureEventsToUnbind=[],this.eventsToUnbind=[],this.options=X,this.chart=L,this.runChartClick=!!((H=X.chart.events)!=null&&H.click),this.pinchDown=[],this.setDOMEvents(),ee(this,"afterInit")}normalize(L,X){let H=L.touches,A=H?H.length?H.item(0):z(H.changedTouches,L.changedTouches)[0]:L;X||(X=this.getChartPosition());let S=A.pageX-X.left,T=A.pageY-X.top;return F(L,{chartX:Math.round(S/=X.scaleX),chartY:Math.round(T/=X.scaleY)})}onContainerClick(L){let X=this.chart,H=X.hoverPoint,A=this.normalize(L),S=X.plotLeft,T=X.plotTop;!X.cancelClick&&(H&&this.inClass(A.target,"highcharts-tracker")?(ee(H.series,"click",F(A,{point:H})),X.hoverPoint&&H.firePointEvent("click",A)):(F(A,this.getCoordinates(A)),X.isInsidePlot(A.chartX-S,A.chartY-T,{visiblePlotOnly:!0})&&ee(X,"click",A)))}onContainerMouseDown(L){var H;let X=(1&(L.buttons||L.button))==1;L=this.normalize(L),p.isFirefox&&L.button!==0&&this.onContainerMouseMove(L),(L.button===void 0||X)&&(this.zoomOption(L),X&&((H=L.preventDefault)==null||H.call(L)),this.dragStart(L))}onContainerMouseLeave(L){let{pointer:X}=k[z(se.hoverChartIndex,-1)]||{};L=this.normalize(L),this.onContainerMouseMove(L),X&&!this.inClass(L.relatedTarget,"highcharts-tooltip")&&(X.reset(),X.chartPosition=void 0)}onContainerMouseEnter(){delete this.chartPosition}onContainerMouseMove(L){let X=this.chart,H=X.tooltip,A=this.normalize(L);this.setHoverChartIndex(L),(X.mouseIsDown==="mousedown"||this.touchSelect(A))&&this.drag(A),!X.openMenu&&(this.inClass(A.target,"highcharts-tracker")||X.isInsidePlot(A.chartX-X.plotLeft,A.chartY-X.plotTop,{visiblePlotOnly:!0}))&&!(H&&H.shouldStickOnContact(A))&&(this.inClass(A.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(A))}onDocumentTouchEnd(L){this.onDocumentMouseUp(L)}onContainerTouchMove(L){this.touchSelect(L)?this.onContainerMouseMove(L):this.touch(L)}onContainerTouchStart(L){this.touchSelect(L)?this.onContainerMouseDown(L):(this.zoomOption(L),this.touch(L,!0))}onDocumentMouseMove(L){let X=this.chart,H=X.tooltip,A=this.chartPosition,S=this.normalize(L,A);!A||X.isInsidePlot(S.chartX-X.plotLeft,S.chartY-X.plotTop,{visiblePlotOnly:!0})||H&&H.shouldStickOnContact(S)||S.target!==X.container.ownerDocument&&this.inClass(S.target,"highcharts-tracker")||this.reset()}onDocumentMouseUp(L){var X,H;(H=(X=k[z(se.hoverChartIndex,-1)])==null?void 0:X.pointer)==null||H.drop(L)}pinch(L){let X=this,{chart:H,hasZoom:A,lastTouches:S}=X,T=[].map.call(L.touches||[],re=>X.normalize(re)),E=T.length,P=E===1&&(X.inClass(L.target,"highcharts-tracker")&&H.runTrackerClick||X.runChartClick),te=H.tooltip,_=E===1&&z(te==null?void 0:te.options.followTouchMove,!0);E>1?X.initiated=!0:_&&(X.initiated=!1),A&&X.initiated&&!P&&L.cancelable!==!1&&L.preventDefault(),L.type==="touchstart"?(X.pinchDown=T,X.res=!0,H.mouseDownX=L.chartX):_?this.runPointActions(X.normalize(L)):S&&(ee(H,"touchpan",{originalEvent:L,touches:T},()=>{let re=me=>{let g=me[0],w=me[1]||g;return{x:g.chartX,y:g.chartY,width:w.chartX-g.chartX,height:w.chartY-g.chartY}};H.transform({axes:H.axes.filter(me=>me.zoomEnabled&&(this.zoomHor&&me.horiz||this.zoomVert&&!me.horiz)),to:re(T),from:re(S),trigger:L.type})}),X.res&&(X.res=!1,this.reset(!1,0))),X.lastTouches=T}reset(L,X){let H=this.chart,A=H.hoverSeries,S=H.hoverPoint,T=H.hoverPoints,E=H.tooltip,P=E&&E.shared?T:S;L&&P&&le(P).forEach(function(te){te.series.isCartesian&&te.plotX===void 0&&(L=!1)}),L?E&&P&&le(P).length&&(E.refresh(P),E.shared&&T?T.forEach(function(te){te.setState(te.state,!0),te.series.isCartesian&&(te.series.xAxis.crosshair&&te.series.xAxis.drawCrosshair(null,te),te.series.yAxis.crosshair&&te.series.yAxis.drawCrosshair(null,te))}):S&&(S.setState(S.state,!0),H.axes.forEach(function(te){te.crosshair&&S.series[te.coll]===te&&te.drawCrosshair(null,S)}))):(S&&S.onMouseOut(),T&&T.forEach(function(te){te.setState()}),A&&A.onMouseOut(),E&&E.hide(X),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),H.axes.forEach(function(te){te.hideCrosshair()}),H.hoverPoints=H.hoverPoint=void 0)}runPointActions(L,X,H){let A=this.chart,S=A.series,T=A.tooltip&&A.tooltip.options.enabled?A.tooltip:void 0,E=!!T&&T.shared,P=X||A.hoverPoint,te=P&&P.series||A.hoverSeries,_=(!L||L.type!=="touchmove")&&(!!X||te&&te.directTouch&&this.isDirectTouch),re=this.getHoverData(P,te,S,_,E,L);P=re.hoverPoint,te=re.hoverSeries;let me=re.hoverPoints,g=te&&te.tooltipOptions.followPointer&&!te.tooltipOptions.split,w=E&&te&&!te.noSharedTooltip;if(P&&(H||P!==A.hoverPoint||T&&T.isHidden)){if((A.hoverPoints||[]).forEach(function(C){me.indexOf(C)===-1&&C.setState()}),A.hoverSeries!==te&&te.onMouseOver(),this.applyInactiveState(me),(me||[]).forEach(function(C){C.setState("hover")}),A.hoverPoint&&A.hoverPoint.firePointEvent("mouseOut"),!P.series)return;A.hoverPoints=me,A.hoverPoint=P,P.firePointEvent("mouseOver",void 0,()=>{T&&P&&T.refresh(w?me:P,L)})}else if(g&&T&&!T.isHidden){let C=T.getAnchor([{}],L);A.isInsidePlot(C[0],C[1],{visiblePlotOnly:!0})&&T.updatePosition({plotX:C[0],plotY:C[1]})}this.unDocMouseMove||(this.unDocMouseMove=Z(A.container.ownerDocument,"mousemove",C=>{var q,ce;return(ce=(q=k[se.hoverChartIndex??-1])==null?void 0:q.pointer)==null?void 0:ce.onDocumentMouseMove(C)}),this.eventsToUnbind.push(this.unDocMouseMove)),A.axes.forEach(function(C){let q,ce=z((C.crosshair||{}).snap,!0);!ce||(q=A.hoverPoint)&&q.series[C.coll]===C||(q=ae(me,j=>j.series&&j.series[C.coll]===C)),q||!ce?C.drawCrosshair(L,q):C.hideCrosshair()})}setDOMEvents(){let L=this.chart.container,X=L.ownerDocument;L.onmousedown=this.onContainerMouseDown.bind(this),L.onmousemove=this.onContainerMouseMove.bind(this),L.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(Z(L,"mouseenter",this.onContainerMouseEnter.bind(this)),Z(L,"mouseleave",this.onContainerMouseLeave.bind(this))),se.unbindDocumentMouseUp||(se.unbindDocumentMouseUp=[]),se.unbindDocumentMouseUp.push(Z(X,"mouseup",this.onDocumentMouseUp.bind(this)));let H=this.chart.renderTo.parentElement;for(;H&&H.tagName!=="BODY";)this.eventsToUnbind.push(Z(H,"scroll",()=>{delete this.chartPosition})),H=H.parentElement;this.eventsToUnbind.push(Z(L,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1}),Z(L,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),se.unbindDocumentTouchEnd||(se.unbindDocumentTouchEnd=Z(X,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})),this.setPointerCapture(),Z(this.chart,"redraw",this.setPointerCapture.bind(this))}setPointerCapture(){var S,T;if(!N)return;let L=this.pointerCaptureEventsToUnbind,X=this.chart,H=X.container,A=z((S=X.options.tooltip)==null?void 0:S.followTouchMove,!0)&&X.series.some(E=>E.options.findNearestPointBy.indexOf("y")>-1);!this.hasPointerCapture&&A?(L.push(Z(H,"pointerdown",E=>{var P,te;(P=E.target)!=null&&P.hasPointerCapture(E.pointerId)&&((te=E.target)==null||te.releasePointerCapture(E.pointerId))}),Z(H,"pointermove",E=>{var P,te;(te=(P=X.pointer)==null?void 0:P.getPointFromEvent(E))==null||te.onMouseOver(E)})),X.styledMode||D(H,{"touch-action":"none"}),H.className+=" highcharts-no-touch-action",this.hasPointerCapture=!0):this.hasPointerCapture&&!A&&(L.forEach(E=>E()),L.length=0,X.styledMode||D(H,{"touch-action":z((T=X.options.chart.style)==null?void 0:T["touch-action"],"manipulation")}),H.className=H.className.replace(" highcharts-no-touch-action",""),this.hasPointerCapture=!1)}setHoverChartIndex(L){var A;let X=this.chart,H=p.charts[z(se.hoverChartIndex,-1)];if(H&&H!==X){let S={relatedTarget:X.container};L&&!(L!=null&&L.relatedTarget)&&(L={...S,...L}),(A=H.pointer)==null||A.onContainerMouseLeave(L||S)}H&&H.mouseIsDown||(se.hoverChartIndex=X.index)}touch(L,X){let H,{chart:A,pinchDown:S=[]}=this;this.setHoverChartIndex(),(L=this.normalize(L)).touches.length===1?A.isInsidePlot(L.chartX-A.plotLeft,L.chartY-A.plotTop,{visiblePlotOnly:!0})&&!A.openMenu?(X&&this.runPointActions(L),L.type==="touchmove"&&(H=!!S[0]&&Math.pow(S[0].chartX-L.chartX,2)+Math.pow(S[0].chartY-L.chartY,2)>=16),z(H,!0)&&this.pinch(L)):X&&this.reset():L.touches.length===2&&this.pinch(L)}touchSelect(L){return!!(this.chart.zooming.singleTouch&&L.touches&&L.touches.length===1)}zoomOption(L){let X=this.chart,H=X.inverted,A=X.zooming.type||"",S,T;/touch/.test(L.type)&&(A=z(X.zooming.pinchType,A)),this.zoomX=S=/x/.test(A),this.zoomY=T=/y/.test(A),this.zoomHor=S&&!H||T&&H,this.zoomVert=T&&!H||S&&H,this.hasZoom=S||T}}return(x=se||(se={})).compose=function(K){V(O,"Core.Pointer")&&Z(K,"beforeRender",function(){this.pointer=new x(this,this.options)})},se}),c(o,"Core/Legend/LegendSymbol.js",[o["Core/Utilities.js"]],function(d){var p;let{extend:y,merge:x,pick:b}=d;return function(k){function O(N,Z,J){var H,A;let D=this.legendItem=this.legendItem||{},{chart:F,options:ae}=this,{baseline:ee=0,symbolWidth:B,symbolHeight:Y}=N,$=this.symbol||"circle",Q=Y/2,z=F.renderer,V=D.group,le=ee-Math.round((((H=N.fontMetrics)==null?void 0:H.b)||Y)*(J?.4:.3)),se={},K,L=ae.marker,X=0;if(F.styledMode||(se["stroke-width"]=Math.min(ae.lineWidth||0,24),ae.dashStyle?se.dashstyle=ae.dashStyle:ae.linecap==="square"||(se["stroke-linecap"]="round")),D.line=z.path().addClass("highcharts-graph").attr(se).add(V),J&&(D.area=z.path().addClass("highcharts-area").add(V)),se["stroke-linecap"]&&(X=Math.min(D.line.strokeWidth(),B)/2),B){let S=[["M",X,le],["L",B-X,le]];D.line.attr({d:S}),(A=D.area)==null||A.attr({d:[...S,["L",B-X,ee],["L",X,ee]]})}if(L&&L.enabled!==!1&&B){let S=Math.min(b(L.radius,Q),Q);$.indexOf("url")===0&&(L=x(L,{width:Y,height:Y}),S=0),D.symbol=K=z.symbol($,B/2-S,le-S,2*S,2*S,y({context:"legend"},L)).addClass("highcharts-point").add(V),K.isMarker=!0}}k.areaMarker=function(N,Z){O.call(this,N,Z,!0)},k.lineMarker=O,k.rectangle=function(N,Z){let J=Z.legendItem||{},D=N.options,F=N.symbolHeight,ae=D.squareSymbol,ee=ae?F:N.symbolWidth;J.symbol=this.chart.renderer.rect(ae?(N.symbolWidth-F)/2:0,N.baseline-F+1,ee,F,b(N.options.symbolRadius,F/2)).addClass("highcharts-point").attr({zIndex:3}).add(J.group)}}(p||(p={})),p}),c(o,"Core/Series/SeriesDefaults.js",[],function(){return{lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},enableMouseTracking:!0,events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:150},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",borderWidth:0,defer:!0,formatter:function(){let{numberFormatter:d}=this.series.chart;return typeof this.y!="number"?"":d(this.y,-1)},padding:5,style:{fontSize:"0.7em",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:150},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:150},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"}}),c(o,"Core/Series/SeriesRegistry.js",[o["Core/Globals.js"],o["Core/Defaults.js"],o["Core/Series/Point.js"],o["Core/Utilities.js"]],function(d,p,y,x){var b;let{defaultOptions:k}=p,{extend:O,extendClass:N,merge:Z}=x;return function(J){function D(F,ae){let ee=k.plotOptions||{},B=ae.defaultOptions,Y=ae.prototype;return Y.type=F,Y.pointClass||(Y.pointClass=y),!J.seriesTypes[F]&&(B&&(ee[F]=B),J.seriesTypes[F]=ae,!0)}J.seriesTypes=d.seriesTypes,J.registerSeriesType=D,J.seriesType=function(F,ae,ee,B,Y){let $=k.plotOptions||{};if(ae=ae||"",$[F]=Z($[ae],ee),delete J.seriesTypes[F],D(F,N(J.seriesTypes[ae]||function(){},B)),J.seriesTypes[F].prototype.type=F,Y){class Q extends y{}O(Q.prototype,Y),J.seriesTypes[F].prototype.pointClass=Q}return J.seriesTypes[F]}}(b||(b={})),b}),c(o,"Core/Series/Series.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Defaults.js"],o["Core/Foundation.js"],o["Core/Globals.js"],o["Core/Legend/LegendSymbol.js"],o["Core/Series/Point.js"],o["Core/Series/SeriesDefaults.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Renderer/SVG/SVGElement.js"],o["Core/Utilities.js"]],function(d,p,y,x,b,k,O,N,Z,J){let{animObject:D,setAnimation:F}=d,{defaultOptions:ae}=p,{registerEventOptions:ee}=y,{svg:B,win:Y}=x,{seriesTypes:$}=N,{arrayMax:Q,arrayMin:z,clamp:V,correctFloat:le,crisp:se,defined:K,destroyObjectProperties:L,diffObjects:X,erase:H,error:A,extend:S,find:T,fireEvent:E,getClosestDistance:P,getNestedProperty:te,insertItem:_,isArray:re,isNumber:me,isString:g,merge:w,objectEach:C,pick:q,removeEvent:ce,splat:j,syncTimeout:U}=J;class ne{constructor(){this.zoneAxis="y"}init(R,G){let ie;E(this,"init",{options:G});let ue=this,de=R.series;this.eventsToUnbind=[],ue.chart=R,ue.options=ue.setOptions(G);let ye=ue.options,Se=ye.visible!==!1;ue.linkedSeries=[],ue.bindAxes(),S(ue,{name:ye.name,state:"",visible:Se,selected:ye.selected===!0}),ee(this,ye);let Ce=ye.events;(Ce&&Ce.click||ye.point&&ye.point.events&&ye.point.events.click||ye.allowPointSelect)&&(R.runTrackerClick=!0),ue.getColor(),ue.getSymbol(),ue.parallelArrays.forEach(function(Ae){ue[Ae+"Data"]||(ue[Ae+"Data"]=[])}),ue.isCartesian&&(R.hasCartesianSeries=!0),de.length&&(ie=de[de.length-1]),ue._i=q(ie&&ie._i,-1)+1,ue.opacity=ue.options.opacity,R.orderItems("series",_(this,de)),ye.dataSorting&&ye.dataSorting.enabled?ue.setDataSortingOptions():ue.points||ue.data||ue.setData(ye.data,!1),E(this,"afterInit")}is(R){return $[R]&&this instanceof $[R]}bindAxes(){let R,G=this,ie=G.options,ue=G.chart;E(this,"bindAxes",null,function(){(G.axisTypes||[]).forEach(function(de){(ue[de]||[]).forEach(function(ye){R=ye.options,(q(ie[de],0)===ye.index||ie[de]!==void 0&&ie[de]===R.id)&&(_(G,ye.series),G[de]=ye,ye.isDirty=!0)}),G[de]||G.optionalAxis===de||A(18,!0,ue)})}),E(this,"afterBindAxes")}updateParallelArrays(R,G,ie){let ue=R.series,de=me(G)?function(ye){let Se=ye==="y"&&ue.toYData?ue.toYData(R):R[ye];ue[ye+"Data"][G]=Se}:function(ye){Array.prototype[G].apply(ue[ye+"Data"],ie)};ue.parallelArrays.forEach(de)}hasData(){return this.visible&&this.dataMax!==void 0&&this.dataMin!==void 0||this.visible&&this.yData&&this.yData.length>0}hasMarkerChanged(R,G){let ie=R.marker,ue=G.marker||{};return ie&&(ue.enabled&&!ie.enabled||ue.symbol!==ie.symbol||ue.height!==ie.height||ue.width!==ie.width)}autoIncrement(R){let G=this.options,ie=G.pointIntervalUnit,ue=G.relativeXValue,de=this.chart.time,ye=this.xIncrement,Se,Ce;return ye=q(ye,G.pointStart,0),this.pointInterval=Ce=q(this.pointInterval,G.pointInterval,1),ue&&me(R)&&(Ce*=R),ie&&(Se=new de.Date(ye),ie==="day"?de.set("Date",Se,de.get("Date",Se)+Ce):ie==="month"?de.set("Month",Se,de.get("Month",Se)+Ce):ie==="year"&&de.set("FullYear",Se,de.get("FullYear",Se)+Ce),Ce=Se.getTime()-ye),ue&&me(R)?ye+Ce:(this.xIncrement=ye+Ce,ye)}setDataSortingOptions(){let R=this.options;S(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),K(R.pointRange)||(R.pointRange=1)}setOptions(R){var ke,Ee;let G,ie=this.chart,ue=ie.options.plotOptions,de=ie.userOptions||{},ye=w(R),Se=ie.styledMode,Ce={plotOptions:ue,userOptions:ye};E(this,"setOptions",Ce);let Ae=Ce.plotOptions[this.type],Ne=de.plotOptions||{},Re=Ne.series||{},fe=ae.plotOptions[this.type]||{},pe=Ne[this.type]||{};this.userOptions=Ce.userOptions;let ve=w(Ae,ue.series,pe,ye);this.tooltipOptions=w(ae.tooltip,(ke=ae.plotOptions.series)==null?void 0:ke.tooltip,fe==null?void 0:fe.tooltip,ie.userOptions.tooltip,(Ee=Ne.series)==null?void 0:Ee.tooltip,pe.tooltip,ye.tooltip),this.stickyTracking=q(ye.stickyTracking,pe.stickyTracking,Re.stickyTracking,!!this.tooltipOptions.shared&&!this.noSharedTooltip||ve.stickyTracking),Ae.marker===null&&delete ve.marker,this.zoneAxis=ve.zoneAxis||"y";let be=this.zones=(ve.zones||[]).map(_e=>({..._e}));return(ve.negativeColor||ve.negativeFillColor)&&!ve.zones&&(G={value:ve[this.zoneAxis+"Threshold"]||ve.threshold||0,className:"highcharts-negative"},Se||(G.color=ve.negativeColor,G.fillColor=ve.negativeFillColor),be.push(G)),be.length&&K(be[be.length-1].value)&&be.push(Se?{}:{color:this.color,fillColor:this.fillColor}),E(this,"afterSetOptions",{options:ve}),ve}getName(){return q(this.options.name,"Series "+(this.index+1))}getCyclic(R,G,ie){let ue,de,ye=this.chart,Se=`${R}Index`,Ce=`${R}Counter`,Ae=(ie==null?void 0:ie.length)||ye.options.chart.colorCount;!G&&(K(de=q(R==="color"?this.options.colorIndex:void 0,this[Se]))?ue=de:(ye.series.length||(ye[Ce]=0),ue=ye[Ce]%Ae,ye[Ce]+=1),ie&&(G=ie[ue])),ue!==void 0&&(this[Se]=ue),this[R]=G}getColor(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||ae.plotOptions[this.type].color,this.chart.options.colors)}getPointsCollection(){return(this.hasGroupedData?this.points:this.data)||[]}getSymbol(){let R=this.options.marker;this.getCyclic("symbol",R.symbol,this.chart.options.symbols)}findPointIndex(R,G){let ie,ue,de,ye=R.id,Se=R.x,Ce=this.points,Ae=this.options.dataSorting;if(ye){let Ne=this.chart.get(ye);Ne instanceof k&&(ie=Ne)}else if(this.linkedParent||this.enabledDataSorting||this.options.relativeXValue){let Ne=Re=>!Re.touched&&Re.index===R.index;if(Ae&&Ae.matchByName?Ne=Re=>!Re.touched&&Re.name===R.name:this.options.relativeXValue&&(Ne=Re=>!Re.touched&&Re.options.x===R.x),!(ie=T(Ce,Ne)))return}return ie&&(de=ie&&ie.index)!==void 0&&(ue=!0),de===void 0&&me(Se)&&(de=this.xData.indexOf(Se,G)),de!==-1&&de!==void 0&&this.cropped&&(de=de>=this.cropStart?de-this.cropStart:de),!ue&&me(de)&&Ce[de]&&Ce[de].touched&&(de=void 0),de}updateData(R,G){let ie=this.options,ue=ie.dataSorting,de=this.points,ye=[],Se=this.requireSorting,Ce=R.length===de.length,Ae,Ne,Re,fe,pe=!0;if(this.xIncrement=null,R.forEach(function(ve,be){let ke,Ee=K(ve)&&this.pointClass.prototype.optionsToObject.call({series:this},ve)||{},_e=Ee.x;Ee.id||me(_e)?((ke=this.findPointIndex(Ee,fe))===-1||ke===void 0?ye.push(ve):de[ke]&&ve!==ie.data[ke]?(de[ke].update(ve,!1,null,!1),de[ke].touched=!0,Se&&(fe=ke+1)):de[ke]&&(de[ke].touched=!0),(!Ce||be!==ke||ue&&ue.enabled||this.hasDerivedData)&&(Ae=!0)):ye.push(ve)},this),Ae)for(Ne=de.length;Ne--;)(Re=de[Ne])&&!Re.touched&&Re.remove&&Re.remove(!1,G);else!Ce||ue&&ue.enabled?pe=!1:(R.forEach(function(ve,be){ve===de[be].y||de[be].destroyed||de[be].update(ve,!1,null,!1)}),ye.length=0);return de.forEach(function(ve){ve&&(ve.touched=!1)}),!!pe&&(ye.forEach(function(ve){this.addPoint(ve,!1,null,null,!1)},this),this.xIncrement===null&&this.xData&&this.xData.length&&(this.xIncrement=Q(this.xData),this.autoIncrement()),!0)}setData(R,G=!0,ie,ue){var Ve;let de=this,ye=de.points,Se=ye&&ye.length||0,Ce=de.options,Ae=de.chart,Ne=Ce.dataSorting,Re=de.xAxis,fe=Ce.turboThreshold,pe=this.xData,ve=this.yData,be=de.pointArrayMap,ke=be&&be.length,Ee=Ce.keys,_e,Le,Be,$e=0,Me=1,ze;Ae.options.chart.allowMutatingData||(Ce.data&&delete de.options.data,de.userOptions.data&&delete de.userOptions.data,ze=w(!0,R));let Xe=(R=ze||R||[]).length;if(Ne&&Ne.enabled&&(R=this.sortData(R)),Ae.options.chart.allowMutatingData&&ue!==!1&&Xe&&Se&&!de.cropped&&!de.hasGroupedData&&de.visible&&!de.boosted&&(Be=this.updateData(R,ie)),!Be){de.xIncrement=null,de.colorCounter=0,this.parallelArrays.forEach(function(Ge){de[Ge+"Data"].length=0});let Ie=fe&&Xe>fe;if(Ie){let Ge=de.getFirstValidPoint(R),pt=de.getFirstValidPoint(R,Xe-1,-1),mt=ct=>!!(re(ct)&&(Ee||me(ct[0])));if(me(Ge)&&me(pt))for(_e=0;_e<Xe;_e++)pe[_e]=this.autoIncrement(),ve[_e]=R[_e];else if(mt(Ge)&&mt(pt))if(ke)if(Ge.length===ke)for(_e=0;_e<Xe;_e++)pe[_e]=this.autoIncrement(),ve[_e]=R[_e];else for(_e=0;_e<Xe;_e++)Le=R[_e],pe[_e]=Le[0],ve[_e]=Le.slice(1,ke+1);else if(Ee&&($e=Ee.indexOf("x"),Me=Ee.indexOf("y"),$e=$e>=0?$e:0,Me=Me>=0?Me:1),Ge.length===1&&(Me=0),$e===Me)for(_e=0;_e<Xe;_e++)pe[_e]=this.autoIncrement(),ve[_e]=R[_e][Me];else for(_e=0;_e<Xe;_e++)Le=R[_e],pe[_e]=Le[$e],ve[_e]=Le[Me];else Ie=!1}if(!Ie)for(_e=0;_e<Xe;_e++)Le={series:de},de.pointClass.prototype.applyOptions.apply(Le,[R[_e]]),de.updateParallelArrays(Le,_e);for(ve&&g(ve[0])&&A(14,!0,Ae),de.data=[],de.options.data=de.userOptions.data=R,_e=Se;_e--;)(Ve=ye[_e])==null||Ve.destroy();Re&&(Re.minRange=Re.userMinRange),de.isDirty=Ae.isDirtyBox=!0,de.isDirtyData=!!ye,ie=!1}Ce.legendType==="point"&&(this.processData(),this.generatePoints()),G&&Ae.redraw(ie)}sortData(R){let G=this,ie=G.options.dataSorting.sortKey||"y",ue=function(de,ye){return K(ye)&&de.pointClass.prototype.optionsToObject.call({series:de},ye)||{}};return R.forEach(function(de,ye){R[ye]=ue(G,de),R[ye].index=ye},this),R.concat().sort((de,ye)=>{let Se=te(ie,de),Ce=te(ie,ye);return Ce<Se?-1:Ce>Se?1:0}).forEach(function(de,ye){de.x=ye},this),G.linkedSeries&&G.linkedSeries.forEach(function(de){let ye=de.options,Se=ye.data;ye.dataSorting&&ye.dataSorting.enabled||!Se||(Se.forEach(function(Ce,Ae){Se[Ae]=ue(de,Ce),R[Ae]&&(Se[Ae].x=R[Ae].x,Se[Ae].index=Ae)}),de.setData(Se,!1))}),R}getProcessedData(R){let G=this,ie=G.xAxis,ue=G.options.cropThreshold,de=ie==null?void 0:ie.logarithmic,ye=G.isCartesian,Se,Ce,Ae=0,Ne,Re,fe,pe=G.xData,ve=G.yData,be=!1,ke=pe.length;ie&&(Re=(Ne=ie.getExtremes()).min,fe=Ne.max,be=!!(ie.categories&&!ie.names.length)),ye&&G.sorted&&!R&&(!ue||ke>ue||G.forceCrop)&&(pe[ke-1]<Re||pe[0]>fe?(pe=[],ve=[]):G.yData&&(pe[0]<Re||pe[ke-1]>fe)&&(pe=(Se=this.cropData(G.xData,G.yData,Re,fe)).xData,ve=Se.yData,Ae=Se.start,Ce=!0));let Ee=P([de?pe.map(de.log2lin):pe],()=>G.requireSorting&&!be&&A(15,!1,G.chart));return{xData:pe,yData:ve,cropped:Ce,cropStart:Ae,closestPointRange:Ee}}processData(R){let G=this.xAxis;if(this.isCartesian&&!this.isDirty&&!G.isDirty&&!this.yAxis.isDirty&&!R)return!1;let ie=this.getProcessedData();this.cropped=ie.cropped,this.cropStart=ie.cropStart,this.processedXData=ie.xData,this.processedYData=ie.yData,this.closestPointRange=this.basePointRange=ie.closestPointRange,E(this,"afterProcessData")}cropData(R,G,ie,ue){let de=R.length,ye,Se,Ce=0,Ae=de;for(ye=0;ye<de;ye++)if(R[ye]>=ie){Ce=Math.max(0,ye-1);break}for(Se=ye;Se<de;Se++)if(R[Se]>ue){Ae=Se+1;break}return{xData:R.slice(Ce,Ae),yData:G.slice(Ce,Ae),start:Ce,end:Ae}}generatePoints(){let R=this.options,G=this.processedData||R.data,ie=this.processedXData,ue=this.processedYData,de=this.pointClass,ye=ie.length,Se=this.cropStart||0,Ce=this.hasGroupedData,Ae=R.keys,Ne=[],Re=R.dataGrouping&&R.dataGrouping.groupAll?Se:0,fe,pe,ve,be,ke=this.data;if(!ke&&!Ce){let Ee=[];Ee.length=G.length,ke=this.data=Ee}for(Ae&&Ce&&(this.options.keys=!1),be=0;be<ye;be++)pe=Se+be,Ce?((ve=new de(this,[ie[be]].concat(j(ue[be])))).dataGroup=this.groupMap[Re+be],ve.dataGroup.options&&(ve.options=ve.dataGroup.options,S(ve,ve.dataGroup.options),delete ve.dataLabels)):(ve=ke[pe])||G[pe]===void 0||(ke[pe]=ve=new de(this,G[pe],ie[be])),ve&&(ve.index=Ce?Re+be:pe,Ne[be]=ve);if(this.options.keys=Ae,ke&&(ye!==(fe=ke.length)||Ce))for(be=0;be<fe;be++)be!==Se||Ce||(be+=ye),ke[be]&&(ke[be].destroyElements(),ke[be].plotX=void 0);this.data=ke,this.points=Ne,E(this,"afterGeneratePoints")}getXExtremes(R){return{min:z(R),max:Q(R)}}getExtremes(R,G){let ie=this.xAxis,ue=this.yAxis,de=[],ye=this.requireSorting&&!this.is("column")?1:0,Se=!!ue&&ue.positiveValuesOnly,Ce=G||this.getExtremesFromAll||this.options.getExtremesFromAll,{processedXData:Ae,processedYData:Ne}=this,Re,fe,pe,ve,be,ke,Ee,_e=0,Le=0,Be=0;if(this.cropped&&Ce){let Xe=this.getProcessedData(!0);Ae=Xe.xData,Ne=Xe.yData}let $e=(R=R||this.stackedYData||Ne||[]).length,Me=Ae||this.xData;for(ie&&(_e=(Re=ie.getExtremes()).min,Le=Re.max),ke=0;ke<$e;ke++)if(ve=Me[ke],fe=(me(be=R[ke])||re(be))&&((me(be)?be>0:be.length)||!Se),pe=G||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!ie||(Me[ke+ye]||ve)>=_e&&(Me[ke-ye]||ve)<=Le,fe&&pe)if(Ee=be.length)for(;Ee--;)me(be[Ee])&&(de[Be++]=be[Ee]);else de[Be++]=be;let ze={activeYData:de,dataMin:z(de),dataMax:Q(de)};return E(this,"afterGetExtremes",{dataExtremes:ze}),ze}applyExtremes(){let R=this.getExtremes();return this.dataMin=R.dataMin,this.dataMax=R.dataMax,R}getFirstValidPoint(R,G=0,ie=1){let ue=R.length,de=G;for(;de>=0&&de<ue;){if(K(R[de]))return R[de];de+=ie}}translate(){var Le;this.processedXData||this.processData(),this.generatePoints();let R=this.options,G=R.stacking,ie=this.xAxis,ue=ie.categories,de=this.enabledDataSorting,ye=this.yAxis,Se=this.points,Ce=Se.length,Ae=this.pointPlacementToXValue(),Ne=!!Ae,Re=R.threshold,fe=R.startFromThreshold?Re:0,pe,ve,be,ke,Ee=Number.MAX_VALUE;function _e(Be){return V(Be,-1e9,1e9)}for(pe=0;pe<Ce;pe++){let Be,$e=Se[pe],Me=$e.x,ze,Xe,Ve=$e.y,Ie=$e.low,Ge=G&&((Le=ye.stacking)==null?void 0:Le.stacks[(this.negStacks&&Ve<(fe?0:Re)?"-":"")+this.stackKey]);ve=ie.translate(Me,!1,!1,!1,!0,Ae),$e.plotX=me(ve)?le(_e(ve)):void 0,G&&this.visible&&Ge&&Ge[Me]&&(ke=this.getStackIndicator(ke,Me,this.index),!$e.isNull&&ke.key&&(Xe=(ze=Ge[Me]).points[ke.key]),ze&&re(Xe)&&(Ie=Xe[0],Ve=Xe[1],Ie===fe&&ke.key===Ge[Me].base&&(Ie=q(me(Re)?Re:ye.min)),ye.positiveValuesOnly&&K(Ie)&&Ie<=0&&(Ie=void 0),$e.total=$e.stackTotal=q(ze.total),$e.percentage=K($e.y)&&ze.total?$e.y/ze.total*100:void 0,$e.stackY=Ve,this.irregularWidths||ze.setOffset(this.pointXOffset||0,this.barW||0,void 0,void 0,void 0,this.xAxis))),$e.yBottom=K(Ie)?_e(ye.translate(Ie,!1,!0,!1,!0)):void 0,this.dataModify&&(Ve=this.dataModify.modifyValue(Ve,pe)),me(Ve)&&$e.plotX!==void 0&&(Be=me(Be=ye.translate(Ve,!1,!0,!1,!0))?_e(Be):void 0),$e.plotY=Be,$e.isInside=this.isPointInside($e),$e.clientX=Ne?le(ie.translate(Me,!1,!1,!1,!0,Ae)):ve,$e.negative=($e.y||0)<(Re||0),$e.category=q(ue&&ue[$e.x],$e.x),$e.isNull||$e.visible===!1||(be!==void 0&&(Ee=Math.min(Ee,Math.abs(ve-be))),be=ve),$e.zone=this.zones.length?$e.getZone():void 0,!$e.graphic&&this.group&&de&&($e.isNew=!0)}this.closestPointRangePx=Ee,E(this,"afterTranslate")}getValidPoints(R,G,ie){let ue=this.chart;return(R||this.points||[]).filter(function(de){let{plotX:ye,plotY:Se}=de;return!!((ie||!de.isNull&&me(Se))&&(!G||ue.isInsidePlot(ye,Se,{inverted:ue.inverted})))&&de.visible!==!1})}getClipBox(){let{chart:R,xAxis:G,yAxis:ie}=this,{x:ue,y:de,width:ye,height:Se}=w(R.clipBox);return G&&G.len!==R.plotSizeX&&(ye=G.len),ie&&ie.len!==R.plotSizeY&&(Se=ie.len),R.inverted&&!this.invertible&&([ye,Se]=[Se,ye]),{x:ue,y:de,width:ye,height:Se}}getSharedClipKey(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0),this.sharedClipKey}setClip(){let{chart:R,group:G,markerGroup:ie}=this,ue=R.sharedClips,de=R.renderer,ye=this.getClipBox(),Se=this.getSharedClipKey(),Ce=ue[Se];Ce?Ce.animate(ye):ue[Se]=Ce=de.clipRect(ye),G&&G.clip(this.options.clip===!1?void 0:Ce),ie&&ie.clip()}animate(R){let{chart:G,group:ie,markerGroup:ue}=this,de=G.inverted,ye=D(this.options.animation),Se=[this.getSharedClipKey(),ye.duration,ye.easing,ye.defer].join(","),Ce=G.sharedClips[Se],Ae=G.sharedClips[Se+"m"];if(R&&ie){let Ne=this.getClipBox();if(Ce)Ce.attr("height",Ne.height);else{Ne.width=0,de&&(Ne.x=G.plotHeight),Ce=G.renderer.clipRect(Ne),G.sharedClips[Se]=Ce;let Re={x:-99,y:-99,width:de?G.plotWidth+199:99,height:de?99:G.plotHeight+199};Ae=G.renderer.clipRect(Re),G.sharedClips[Se+"m"]=Ae}ie.clip(Ce),ue==null||ue.clip(Ae)}else if(Ce&&!Ce.hasClass("highcharts-animating")){let Ne=this.getClipBox(),Re=ye.step;(ue!=null&&ue.element.childNodes.length||G.series.length>1)&&(ye.step=function(fe,pe){Re&&Re.apply(pe,arguments),pe.prop==="width"&&(Ae!=null&&Ae.element)&&Ae.attr(de?"height":"width",fe+99)}),Ce.addClass("highcharts-animating").animate(Ne,ye)}}afterAnimate(){this.setClip(),C(this.chart.sharedClips,(R,G,ie)=>{R&&!this.chart.container.querySelector(`[clip-path="url(#${R.id})"]`)&&(R.destroy(),delete ie[G])}),this.finishedAnimating=!0,E(this,"afterAnimate")}drawPoints(R=this.points){let G,ie,ue,de,ye,Se,Ce,Ae=this.chart,Ne=Ae.styledMode,{colorAxis:Re,options:fe}=this,pe=fe.marker,ve=this[this.specialGroup||"markerGroup"],be=this.xAxis,ke=q(pe.enabled,!be||!!be.isRadial||null,this.closestPointRangePx>=pe.enabledThreshold*pe.radius);if(pe.enabled!==!1||this._hasPointMarkers)for(G=0;G<R.length;G++)if(de=(ue=(ie=R[G]).graphic)?"animate":"attr",ye=ie.marker||{},Se=!!ie.marker,(ke&&ye.enabled===void 0||ye.enabled)&&!ie.isNull&&ie.visible!==!1){let Ee=q(ye.symbol,this.symbol,"rect");Ce=this.markerAttribs(ie,ie.selected&&"select"),this.enabledDataSorting&&(ie.startXPos=be.reversed?-(Ce.width||0):be.width);let _e=ie.isInside!==!1;if(!ue&&_e&&((Ce.width||0)>0||ie.hasImage)&&(ie.graphic=ue=Ae.renderer.symbol(Ee,Ce.x,Ce.y,Ce.width,Ce.height,Se?ye:pe).add(ve),this.enabledDataSorting&&Ae.hasRendered&&(ue.attr({x:ie.startXPos}),de="animate")),ue&&de==="animate"&&ue[_e?"show":"hide"](_e).animate(Ce),ue){let Le=this.pointAttribs(ie,Ne||!ie.selected?void 0:"select");Ne?Re&&ue.css({fill:Le.fill}):ue[de](Le)}ue&&ue.addClass(ie.getClassName(),!0)}else ue&&(ie.graphic=ue.destroy())}markerAttribs(R,G){let ie=this.options,ue=ie.marker,de=R.marker||{},ye=de.symbol||ue.symbol,Se={},Ce,Ae,Ne=q(de.radius,ue&&ue.radius);G&&(Ce=ue.states[G],Ne=q((Ae=de.states&&de.states[G])&&Ae.radius,Ce&&Ce.radius,Ne&&Ne+(Ce&&Ce.radiusPlus||0))),R.hasImage=ye&&ye.indexOf("url")===0,R.hasImage&&(Ne=0);let Re=R.pos();return me(Ne)&&Re&&(ie.crisp&&(Re[0]=se(Re[0],R.hasImage?0:ye==="rect"?(ue==null?void 0:ue.lineWidth)||0:1)),Se.x=Re[0]-Ne,Se.y=Re[1]-Ne),Ne&&(Se.width=Se.height=2*Ne),Se}pointAttribs(R,G){let ie=this.options.marker,ue=R&&R.options,de=ue&&ue.marker||{},ye=ue&&ue.color,Se=R&&R.color,Ce=R&&R.zone&&R.zone.color,Ae,Ne,Re=this.color,fe,pe,ve=q(de.lineWidth,ie.lineWidth),be=1;return Re=ye||Ce||Se||Re,fe=de.fillColor||ie.fillColor||Re,pe=de.lineColor||ie.lineColor||Re,G=G||"normal",Ae=ie.states[G]||{},ve=q((Ne=de.states&&de.states[G]||{}).lineWidth,Ae.lineWidth,ve+q(Ne.lineWidthPlus,Ae.lineWidthPlus,0)),fe=Ne.fillColor||Ae.fillColor||fe,{stroke:pe=Ne.lineColor||Ae.lineColor||pe,"stroke-width":ve,fill:fe,opacity:be=q(Ne.opacity,Ae.opacity,be)}}destroy(R){let G,ie,ue,de=this,ye=de.chart,Se=/AppleWebKit\/533/.test(Y.navigator.userAgent),Ce=de.data||[];for(E(de,"destroy",{keepEventsForUpdate:R}),this.removeEvents(R),(de.axisTypes||[]).forEach(function(Ae){(ue=de[Ae])&&ue.series&&(H(ue.series,de),ue.isDirty=ue.forceRedraw=!0)}),de.legendItem&&de.chart.legend.destroyItem(de),G=Ce.length;G--;)(ie=Ce[G])&&ie.destroy&&ie.destroy();for(let Ae of de.zones)L(Ae,void 0,!0);J.clearTimeout(de.animationTimeout),C(de,function(Ae,Ne){Ae instanceof Z&&!Ae.survive&&Ae[Se&&Ne==="group"?"hide":"destroy"]()}),ye.hoverSeries===de&&(ye.hoverSeries=void 0),H(ye.series,de),ye.orderItems("series"),C(de,function(Ae,Ne){R&&Ne==="hcEvents"||delete de[Ne]})}applyZones(){let{area:R,chart:G,graph:ie,zones:ue,points:de,xAxis:ye,yAxis:Se,zoneAxis:Ce}=this,{inverted:Ae,renderer:Ne}=G,Re=this[`${Ce}Axis`],{isXAxis:fe,len:pe=0}=Re||{},ve=((ie==null?void 0:ie.strokeWidth())||0)/2+1,be=(ke,Ee=0,_e=0)=>{Ae&&(_e=pe-_e);let{translated:Le=0,lineClip:Be}=ke,$e=_e-Le;Be==null||Be.push(["L",Ee,Math.abs($e)<ve?_e-ve*($e<=0?-1:1):Le])};if(ue.length&&(ie||R)&&Re&&me(Re.min)){let ke=Re.getExtremes().max,Ee=Be=>{Be.forEach(($e,Me)=>{($e[0]==="M"||$e[0]==="L")&&(Be[Me]=[$e[0],fe?pe-$e[1]:$e[1],fe?$e[2]:pe-$e[2]])})};if(ue.forEach(Be=>{Be.lineClip=[],Be.translated=V(Re.toPixels(q(Be.value,ke),!0)||0,0,pe)}),ie&&!this.showLine&&ie.hide(),R&&R.hide(),Ce==="y"&&de.length<ye.len)for(let Be of de){let{plotX:$e,plotY:Me,zone:ze}=Be,Xe=ze&&ue[ue.indexOf(ze)-1];ze&&be(ze,$e,Me),Xe&&be(Xe,$e,Me)}let _e=[],Le=Re.toPixels(Re.getExtremes().min,!0);ue.forEach(Be=>{var _t,Rt;let $e=Be.lineClip||[],Me=Math.round(Be.translated||0);ye.reversed&&$e.reverse();let{clip:ze,simpleClip:Xe}=Be,Ve=0,Ie=0,Ge=ye.len,pt=Se.len;fe?(Ve=Me,Ge=Le):(Ie=Me,pt=Le);let mt=[["M",Ve,Ie],["L",Ge,Ie],["L",Ge,pt],["L",Ve,pt],["Z"]],ct=[mt[0],...$e,mt[1],mt[2],..._e,mt[3],mt[4]];_e=$e.reverse(),Le=Me,Ae&&(Ee(ct),R&&Ee(mt)),ze?(ze.animate({d:ct}),Xe==null||Xe.animate({d:mt})):(ze=Be.clip=Ne.path(ct),R&&(Xe=Be.simpleClip=Ne.path(mt))),ie&&((_t=Be.graph)==null||_t.clip(ze)),R&&((Rt=Be.area)==null||Rt.clip(Xe))})}else this.visible&&(ie&&ie.show(),R&&R.show())}plotGroup(R,G,ie,ue,de){let ye=this[R],Se=!ye,Ce={visibility:ie,zIndex:ue||.1};return K(this.opacity)&&!this.chart.styledMode&&this.state!=="inactive"&&(Ce.opacity=this.opacity),ye||(this[R]=ye=this.chart.renderer.g().add(de)),ye.addClass("highcharts-"+G+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(K(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(ye.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),ye.attr(Ce)[Se?"attr":"animate"](this.getPlotBox(G)),ye}getPlotBox(R){let G=this.xAxis,ie=this.yAxis,ue=this.chart,de=ue.inverted&&!ue.polar&&G&&this.invertible&&R==="series";return ue.inverted&&(G=ie,ie=this.xAxis),{translateX:G?G.left:ue.plotLeft,translateY:ie?ie.top:ue.plotTop,rotation:de?90:0,rotationOriginX:de?(G.len-ie.len)/2:0,rotationOriginY:de?(G.len+ie.len)/2:0,scaleX:de?-1:1,scaleY:1}}removeEvents(R){let{eventsToUnbind:G}=this;R||ce(this),G.length&&(G.forEach(ie=>{ie()}),G.length=0)}render(){var Ne,Re,fe,pe,ve;let R=this,{chart:G,options:ie,hasRendered:ue}=R,de=D(ie.animation),ye=R.visible?"inherit":"hidden",Se=ie.zIndex,Ce=G.seriesGroup,Ae=R.finishedAnimating?0:de.duration;E(this,"render"),R.plotGroup("group","series",ye,Se,Ce),R.markerGroup=R.plotGroup("markerGroup","markers",ye,Se,Ce),ie.clip!==!1&&R.setClip(),Ae&&((Ne=R.animate)==null||Ne.call(R,!0)),R.drawGraph&&(R.drawGraph(),R.applyZones()),R.visible&&R.drawPoints(),(Re=R.drawDataLabels)==null||Re.call(R),(fe=R.redrawPoints)==null||fe.call(R),ie.enableMouseTracking&&((pe=R.drawTracker)==null||pe.call(R)),Ae&&((ve=R.animate)==null||ve.call(R)),ue||(Ae&&de.defer&&(Ae+=de.defer),R.animationTimeout=U(()=>{R.afterAnimate()},Ae||0)),R.isDirty=!1,R.hasRendered=!0,E(R,"afterRender")}redraw(){let R=this.isDirty||this.isDirtyData;this.translate(),this.render(),R&&delete this.kdTree}reserveSpace(){return this.visible||!this.chart.options.chart.ignoreHiddenSeries}searchPoint(R,G){let{xAxis:ie,yAxis:ue}=this,de=this.chart.inverted;return this.searchKDTree({clientX:de?ie.len-R.chartY+ie.pos:R.chartX-ie.pos,plotY:de?ue.len-R.chartX+ue.pos:R.chartY-ue.pos},G,R)}buildKDTree(R){this.buildingKdTree=!0;let G=this,ie=G.options.findNearestPointBy.indexOf("y")>-1?2:1;delete G.kdTree,U(function(){G.kdTree=function ue(de,ye,Se){let Ce,Ae,Ne=de==null?void 0:de.length;if(Ne)return Ce=G.kdAxisArray[ye%Se],de.sort((Re,fe)=>(Re[Ce]||0)-(fe[Ce]||0)),{point:de[Ae=Math.floor(Ne/2)],left:ue(de.slice(0,Ae),ye+1,Se),right:ue(de.slice(Ae+1),ye+1,Se)}}(G.getValidPoints(void 0,!G.directTouch),ie,ie),G.buildingKdTree=!1},G.options.kdNow||(R==null?void 0:R.type)==="touchstart"?0:1)}searchKDTree(R,G,ie){let ue=this,[de,ye]=this.kdAxisArray,Se=G?"distX":"dist",Ce=(ue.options.findNearestPointBy||"").indexOf("y")>-1?2:1,Ae=!!ue.isBubble;if(this.kdTree||this.buildingKdTree||this.buildKDTree(ie),this.kdTree)return function Ne(Re,fe,pe,ve){var ze;let be=fe.point,ke=ue.kdAxisArray[pe%ve],Ee,_e,Le=be;(function(Xe,Ve){var Vt;let Ie=Xe[de],Ge=Ve[de],pt=K(Ie)&&K(Ge)?Ie-Ge:null,mt=Xe[ye],ct=Ve[ye],_t=K(mt)&&K(ct)?mt-ct:0,Rt=Ae&&((Vt=Ve.marker)==null?void 0:Vt.radius)||0;Ve.dist=Math.sqrt((pt&&pt*pt||0)+_t*_t)-Rt,Ve.distX=K(pt)?Math.abs(pt)-Rt:Number.MAX_VALUE})(Re,be);let Be=(Re[ke]||0)-(be[ke]||0)+(Ae&&((ze=be.marker)==null?void 0:ze.radius)||0),$e=Be<0?"left":"right",Me=Be<0?"right":"left";return fe[$e]&&(Le=(Ee=Ne(Re,fe[$e],pe+1,ve))[Se]<Le[Se]?Ee:be),fe[Me]&&Math.sqrt(Be*Be)<Le[Se]&&(Le=(_e=Ne(Re,fe[Me],pe+1,ve))[Se]<Le[Se]?_e:Le),Le}(R,this.kdTree,Ce,Ce)}pointPlacementToXValue(){let{options:R,xAxis:G}=this,ie=R.pointPlacement;return ie==="between"&&(ie=G.reversed?-.5:.5),me(ie)?ie*(R.pointRange||G.pointRange):0}isPointInside(R){let{chart:G,xAxis:ie,yAxis:ue}=this,{plotX:de=-1,plotY:ye=-1}=R;return ye>=0&&ye<=(ue?ue.len:G.plotHeight)&&de>=0&&de<=(ie?ie.len:G.plotWidth)}drawTracker(){var fe;let R=this,G=R.options,ie=G.trackByArea,ue=[].concat((ie?R.areaPath:R.graphPath)||[]),de=R.chart,ye=de.pointer,Se=de.renderer,Ce=((fe=de.options.tooltip)==null?void 0:fe.snap)||0,Ae=()=>{G.enableMouseTracking&&de.hoverSeries!==R&&R.onMouseOver()},Ne="rgba(192,192,192,"+(B?1e-4:.002)+")",Re=R.tracker;Re?Re.attr({d:ue}):R.graph&&(R.tracker=Re=Se.path(ue).attr({visibility:R.visible?"inherit":"hidden",zIndex:2}).addClass(ie?"highcharts-tracker-area":"highcharts-tracker-line").add(R.group),de.styledMode||Re.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:Ne,fill:ie?Ne:"none","stroke-width":R.graph.strokeWidth()+(ie?0:2*Ce)}),[R.tracker,R.markerGroup,R.dataLabelsGroup].forEach(pe=>{pe&&(pe.addClass("highcharts-tracker").on("mouseover",Ae).on("mouseout",ve=>{ye==null||ye.onTrackerMouseOut(ve)}),G.cursor&&!de.styledMode&&pe.css({cursor:G.cursor}),pe.on("touchstart",Ae))})),E(this,"afterDrawTracker")}addPoint(R,G,ie,ue,de){let ye,Se,Ce=this.options,Ae=this.data,Ne=this.chart,Re=this.xAxis,fe=Re&&Re.hasNames&&Re.names,pe=Ce.data,ve=this.xData;G=q(G,!0);let be={series:this};this.pointClass.prototype.applyOptions.apply(be,[R]);let ke=be.x;if(Se=ve.length,this.requireSorting&&ke<ve[Se-1])for(ye=!0;Se&&ve[Se-1]>ke;)Se--;this.updateParallelArrays(be,"splice",[Se,0,0]),this.updateParallelArrays(be,Se),fe&&be.name&&(fe[ke]=be.name),pe.splice(Se,0,R),(ye||this.processedData)&&(this.data.splice(Se,0,null),this.processData()),Ce.legendType==="point"&&this.generatePoints(),ie&&(Ae[0]&&Ae[0].remove?Ae[0].remove(!1):(Ae.shift(),this.updateParallelArrays(be,"shift"),pe.shift())),de!==!1&&E(this,"addPoint",{point:be}),this.isDirty=!0,this.isDirtyData=!0,G&&Ne.redraw(ue)}removePoint(R,G,ie){let ue=this,de=ue.data,ye=de[R],Se=ue.points,Ce=ue.chart,Ae=function(){Se&&Se.length===de.length&&Se.splice(R,1),de.splice(R,1),ue.options.data.splice(R,1),ue.updateParallelArrays(ye||{series:ue},"splice",[R,1]),ye&&ye.destroy(),ue.isDirty=!0,ue.isDirtyData=!0,G&&Ce.redraw()};F(ie,Ce),G=q(G,!0),ye?ye.firePointEvent("remove",null,Ae):Ae()}remove(R,G,ie,ue){let de=this,ye=de.chart;function Se(){de.destroy(ue),ye.isDirtyLegend=ye.isDirtyBox=!0,ye.linkSeries(ue),q(R,!0)&&ye.redraw(G)}ie!==!1?E(de,"remove",null,Se):Se()}update(R,G){var Ee,_e,Le;E(this,"update",{options:R=X(R,this.userOptions)});let ie=this,ue=ie.chart,de=ie.userOptions,ye=ie.initialType||ie.type,Se=ue.options.plotOptions,Ce=$[ye].prototype,Ae=ie.finishedAnimating&&{animation:!1},Ne={},Re,fe,pe=["colorIndex","eventOptions","navigatorSeries","symbolIndex","baseSeries"],ve=R.type||de.type||ue.options.chart.type,be=!(this.hasDerivedData||ve&&ve!==this.type||R.pointStart!==void 0||R.pointInterval!==void 0||R.relativeXValue!==void 0||R.joinBy||R.mapData||["dataGrouping","pointStart","pointInterval","pointIntervalUnit","keys"].some(Be=>ie.hasOptionChanged(Be)));ve=ve||ye,be&&(pe.push("data","isDirtyData","isDirtyCanvas","points","processedData","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","hasDataLabels","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX","transformGroups"),R.visible!==!1&&pe.push("area","graph"),ie.parallelArrays.forEach(function(Be){pe.push(Be+"Data")}),R.data&&(R.dataSorting&&S(ie.options.dataSorting,R.dataSorting),this.setData(R.data,!1))),R=w(de,{index:de.index===void 0?ie.index:de.index,pointStart:((Ee=Se==null?void 0:Se.series)==null?void 0:Ee.pointStart)??de.pointStart??((_e=ie.xData)==null?void 0:_e[0])},!be&&{data:ie.options.data},R,Ae),be&&R.data&&(R.data=ie.options.data),(pe=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(pe)).forEach(function(Be){pe[Be]=ie[Be],delete ie[Be]});let ke=!1;if($[ve]){if(ke=ve!==ie.type,ie.remove(!1,!1,!1,!0),ke)if(ue.propFromSeries(),Object.setPrototypeOf)Object.setPrototypeOf(ie,$[ve].prototype);else{let Be=Object.hasOwnProperty.call(ie,"hcEvents")&&ie.hcEvents;for(fe in Ce)ie[fe]=void 0;S(ie,$[ve].prototype),Be?ie.hcEvents=Be:delete ie.hcEvents}}else A(17,!0,ue,{missingModuleFor:ve});if(pe.forEach(function(Be){ie[Be]=pe[Be]}),ie.init(ue,R),be&&this.points)for(let Be of((Re=ie.options).visible===!1?(Ne.graphic=1,Ne.dataLabel=1):(this.hasMarkerChanged(Re,de)&&(Ne.graphic=1),(Le=ie.hasDataLabels)!=null&&Le.call(ie)||(Ne.dataLabel=1)),this.points))Be&&Be.series&&(Be.resolveColor(),Object.keys(Ne).length&&Be.destroyElements(Ne),Re.showInLegend===!1&&Be.legendItem&&ue.legend.destroyItem(Be));ie.initialType=ye,ue.linkSeries(),ue.setSortedData(),ke&&ie.linkedSeries.length&&(ie.isDirtyData=!0),E(this,"afterUpdate"),q(G,!0)&&ue.redraw(!!be&&void 0)}setName(R){this.name=this.options.name=this.userOptions.name=R,this.chart.isDirtyLegend=!0}hasOptionChanged(R){var Se,Ce;let G=this.chart,ie=this.options[R],ue=G.options.plotOptions,de=this.userOptions[R],ye=q((Se=ue==null?void 0:ue[this.type])==null?void 0:Se[R],(Ce=ue==null?void 0:ue.series)==null?void 0:Ce[R]);return de&&!K(ye)?ie!==de:ie!==q(ye,ie)}onMouseOver(){let R=this.chart,G=R.hoverSeries,ie=R.pointer;ie==null||ie.setHoverChartIndex(),G&&G!==this&&G.onMouseOut(),this.options.events.mouseOver&&E(this,"mouseOver"),this.setState("hover"),R.hoverSeries=this}onMouseOut(){let R=this.options,G=this.chart,ie=G.tooltip,ue=G.hoverPoint;G.hoverSeries=null,ue&&ue.onMouseOut(),this&&R.events.mouseOut&&E(this,"mouseOut"),ie&&!this.stickyTracking&&(!ie.shared||this.noSharedTooltip)&&ie.hide(),G.series.forEach(function(de){de.setState("",!0)})}setState(R,G){let ie=this,ue=ie.options,de=ie.graph,ye=ue.inactiveOtherPoints,Se=ue.states,Ce=q(Se[R||"normal"]&&Se[R||"normal"].animation,ie.chart.options.chart.animation),Ae=ue.lineWidth,Ne=ue.opacity;if(R=R||"",ie.state!==R&&([ie.group,ie.markerGroup,ie.dataLabelsGroup].forEach(function(Re){Re&&(ie.state&&Re.removeClass("highcharts-series-"+ie.state),R&&Re.addClass("highcharts-series-"+R))}),ie.state=R,!ie.chart.styledMode)){if(Se[R]&&Se[R].enabled===!1)return;if(R&&(Ae=Se[R].lineWidth||Ae+(Se[R].lineWidthPlus||0),Ne=q(Se[R].opacity,Ne)),de&&!de.dashstyle&&me(Ae))for(let Re of[de,...this.zones.map(fe=>fe.graph)])Re==null||Re.animate({"stroke-width":Ae},Ce);ye||[ie.group,ie.markerGroup,ie.dataLabelsGroup,ie.labelBySeries].forEach(function(Re){Re&&Re.animate({opacity:Ne},Ce)})}G&&ye&&ie.points&&ie.setAllPointsToState(R||void 0)}setAllPointsToState(R){this.points.forEach(function(G){G.setState&&G.setState(R)})}setVisible(R,G){var Ce;let ie=this,ue=ie.chart,de=ue.options.chart.ignoreHiddenSeries,ye=ie.visible;ie.visible=R=ie.options.visible=ie.userOptions.visible=R===void 0?!ye:R;let Se=R?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(Ae=>{var Ne;(Ne=ie[Ae])==null||Ne[Se]()}),(ue.hoverSeries===ie||((Ce=ue.hoverPoint)==null?void 0:Ce.series)===ie)&&ie.onMouseOut(),ie.legendItem&&ue.legend.colorizeItem(ie,R),ie.isDirty=!0,ie.options.stacking&&ue.series.forEach(Ae=>{Ae.options.stacking&&Ae.visible&&(Ae.isDirty=!0)}),ie.linkedSeries.forEach(Ae=>{Ae.setVisible(R,!1)}),de&&(ue.isDirtyBox=!0),E(ie,Se),G!==!1&&ue.redraw()}show(){this.setVisible(!0)}hide(){this.setVisible(!1)}select(R){this.selected=R=this.options.selected=R===void 0?!this.selected:R,this.checkbox&&(this.checkbox.checked=R),E(this,R?"select":"unselect")}shouldShowTooltip(R,G,ie={}){return ie.series=this,ie.visiblePlotOnly=!0,this.chart.isInsidePlot(R,G,ie)}drawLegendSymbol(R,G){var ie;(ie=b[this.options.legendSymbol||"rectangle"])==null||ie.call(this,R,G)}}return ne.defaultOptions=O,ne.types=N.seriesTypes,ne.registerType=N.registerSeriesType,S(ne.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,directTouch:!1,invertible:!0,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:k,requireSorting:!0,sorted:!0}),N.series=ne,ne}),c(o,"Core/Legend/Legend.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Foundation.js"],o["Core/Globals.js"],o["Core/Series/Series.js"],o["Core/Series/Point.js"],o["Core/Renderer/RendererUtilities.js"],o["Core/Templating.js"],o["Core/Utilities.js"]],function(d,p,y,x,b,k,O,N){var Z;let{animObject:J,setAnimation:D}=d,{registerEventOptions:F}=p,{composed:ae,marginNames:ee}=y,{distribute:B}=k,{format:Y}=O,{addEvent:$,createElement:Q,css:z,defined:V,discardElement:le,find:se,fireEvent:K,isNumber:L,merge:X,pick:H,pushUnique:A,relativeLength:S,stableSort:T,syncTimeout:E}=N;class P{constructor(_,re){this.allItems=[],this.initialItemY=0,this.itemHeight=0,this.itemMarginBottom=0,this.itemMarginTop=0,this.itemX=0,this.itemY=0,this.lastItemY=0,this.lastLineHeight=0,this.legendHeight=0,this.legendWidth=0,this.maxItemWidth=0,this.maxLegendWidth=0,this.offsetWidth=0,this.padding=0,this.pages=[],this.symbolHeight=0,this.symbolWidth=0,this.titleHeight=0,this.totalItemWidth=0,this.widthOption=0,this.chart=_,this.setOptions(re),re.enabled&&(this.render(),F(this,re),$(this.chart,"endResize",function(){this.legend.positionCheckboxes()})),$(this.chart,"render",()=>{this.options.enabled&&this.proximate&&(this.proximatePositions(),this.positionItems())})}setOptions(_){let re=H(_.padding,8);this.options=_,this.chart.styledMode||(this.itemStyle=_.itemStyle,this.itemHiddenStyle=X(this.itemStyle,_.itemHiddenStyle)),this.itemMarginTop=_.itemMarginTop,this.itemMarginBottom=_.itemMarginBottom,this.padding=re,this.initialItemY=re-5,this.symbolWidth=H(_.symbolWidth,16),this.pages=[],this.proximate=_.layout==="proximate"&&!this.chart.inverted,this.baseline=void 0}update(_,re){let me=this.chart;this.setOptions(X(!0,this.options,_)),"events"in this.options&&F(this,this.options),this.destroy(),me.isDirtyLegend=me.isDirtyBox=!0,H(re,!0)&&me.redraw(),K(this,"afterUpdate",{redraw:re})}colorizeItem(_,re){let{area:me,group:g,label:w,line:C,symbol:q}=_.legendItem||{};if(g==null||g[re?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){let{itemHiddenStyle:ce={}}=this,j=ce.color,{fillColor:U,fillOpacity:ne,lineColor:ge,marker:R}=_.options,G=ie=>(!re&&(ie.fill&&(ie.fill=j),ie.stroke&&(ie.stroke=j)),ie);w==null||w.css(X(re?this.itemStyle:ce)),C==null||C.attr(G({stroke:ge||_.color})),q&&q.attr(G(R&&q.isMarker?_.pointAttribs():{fill:_.color})),me==null||me.attr(G({fill:U||_.color,"fill-opacity":U?1:ne??.75}))}K(this,"afterColorizeItem",{item:_,visible:re})}positionItems(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()}positionItem(_){let{group:re,x:me=0,y:g=0}=_.legendItem||{},w=this.options,C=w.symbolPadding,q=!w.rtl,ce=_.checkbox;if(re&&re.element){let j={translateX:q?me:this.legendWidth-me-2*C-4,translateY:g};re[V(re.translateY)?"animate":"attr"](j,void 0,()=>{K(this,"afterPositionItem",{item:_})})}ce&&(ce.x=me,ce.y=g)}destroyItem(_){let re=_.checkbox,me=_.legendItem||{};for(let g of["group","label","line","symbol"])me[g]&&(me[g]=me[g].destroy());re&&le(re),_.legendItem=void 0}destroy(){for(let _ of this.getAllItems())this.destroyItem(_);for(let _ of["clipRect","up","down","pager","nav","box","title","group"])this[_]&&(this[_]=this[_].destroy());this.display=null}positionCheckboxes(){let _,re=this.group&&this.group.alignAttr,me=this.clipHeight||this.legendHeight,g=this.titleHeight;re&&(_=re.translateY,this.allItems.forEach(function(w){let C,q=w.checkbox;q&&(C=_+g+q.y+(this.scrollOffset||0)+3,z(q,{left:re.translateX+w.checkboxOffset+q.x-20+"px",top:C+"px",display:this.proximate||C>_-6&&C<_+me-6?"":"none"}))},this))}renderTitle(){let _=this.options,re=this.padding,me=_.title,g,w=0;me.text&&(this.title||(this.title=this.chart.renderer.label(me.text,re-3,re-4,void 0,void 0,void 0,_.useHTML,void 0,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(me.style),this.title.add(this.group)),me.width||this.title.css({width:this.maxLegendWidth+"px"}),w=(g=this.title.getBBox()).height,this.offsetWidth=g.width,this.contentGroup.attr({translateY:w})),this.titleHeight=w}setText(_){let re=this.options;_.legendItem.label.attr({text:re.labelFormat?Y(re.labelFormat,_,this.chart):re.labelFormatter.call(_)})}renderItem(_){let re=_.legendItem=_.legendItem||{},me=this.chart,g=me.renderer,w=this.options,C=w.layout==="horizontal",q=this.symbolWidth,ce=w.symbolPadding||0,j=this.itemStyle,U=this.itemHiddenStyle,ne=C?H(w.itemDistance,20):0,ge=!w.rtl,R=!_.series,G=!R&&_.series.drawLegendSymbol?_.series:_,ie=G.options,ue=!!this.createCheckboxForItem&&ie&&ie.showCheckbox,de=w.useHTML,ye=_.options.className,Se=re.label,Ce=q+ce+ne+(ue?20:0);!Se&&(re.group=g.g("legend-item").addClass("highcharts-"+G.type+"-series highcharts-color-"+_.colorIndex+(ye?" "+ye:"")+(R?" highcharts-series-"+_.index:"")).attr({zIndex:1}).add(this.scrollGroup),re.label=Se=g.text("",ge?q+ce:-ce,this.baseline||0,de),me.styledMode||Se.css(X(_.visible?j:U)),Se.attr({align:ge?"left":"right",zIndex:2}).add(re.group),!this.baseline&&(this.fontMetrics=g.fontMetrics(Se),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,Se.attr("y",this.baseline),this.symbolHeight=H(w.symbolHeight,this.fontMetrics.f),w.squareSymbol&&(this.symbolWidth=H(w.symbolWidth,Math.max(this.symbolHeight,16)),Ce=this.symbolWidth+ce+ne+(ue?20:0),ge&&Se.attr("x",this.symbolWidth+ce))),G.drawLegendSymbol(this,_),this.setItemEvents&&this.setItemEvents(_,Se,de)),ue&&!_.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem(_),this.colorizeItem(_,_.visible),(me.styledMode||!j.width)&&Se.css({width:(w.itemWidth||this.widthOption||me.spacingBox.width)-Ce+"px"}),this.setText(_);let Ae=Se.getBBox(),Ne=this.fontMetrics&&this.fontMetrics.h||0;_.itemWidth=_.checkboxOffset=w.itemWidth||re.labelWidth||Ae.width+Ce,this.maxItemWidth=Math.max(this.maxItemWidth,_.itemWidth),this.totalItemWidth+=_.itemWidth,this.itemHeight=_.itemHeight=Math.round(re.labelHeight||(Ae.height>1.5*Ne?Ae.height:Ne))}layoutItem(_){let re=this.options,me=this.padding,g=re.layout==="horizontal",w=_.itemHeight,C=this.itemMarginBottom,q=this.itemMarginTop,ce=g?H(re.itemDistance,20):0,j=this.maxLegendWidth,U=re.alignColumns&&this.totalItemWidth>j?this.maxItemWidth:_.itemWidth,ne=_.legendItem||{};g&&this.itemX-me+U>j&&(this.itemX=me,this.lastLineHeight&&(this.itemY+=q+this.lastLineHeight+C),this.lastLineHeight=0),this.lastItemY=q+this.itemY+C,this.lastLineHeight=Math.max(w,this.lastLineHeight),ne.x=this.itemX,ne.y=this.itemY,g?this.itemX+=U:(this.itemY+=q+w+C,this.lastLineHeight=w),this.offsetWidth=this.widthOption||Math.max((g?this.itemX-me-(_.checkbox?0:ce):U)+me,this.offsetWidth)}getAllItems(){let _=[];return this.chart.series.forEach(function(re){let me=re&&re.options;re&&H(me.showInLegend,!V(me.linkedTo)&&void 0,!0)&&(_=_.concat((re.legendItem||{}).labels||(me.legendType==="point"?re.data:re)))}),K(this,"afterGetAllItems",{allItems:_}),_}getAlignment(){let _=this.options;return this.proximate?_.align.charAt(0)+"tv":_.floating?"":_.align.charAt(0)+_.verticalAlign.charAt(0)+_.layout.charAt(0)}adjustMargins(_,re){let me=this.chart,g=this.options,w=this.getAlignment();w&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(C,q){C.test(w)&&!V(_[q])&&(me[ee[q]]=Math.max(me[ee[q]],me.legend[(q+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][q]*g[q%2?"x":"y"]+H(g.margin,12)+re[q]+(me.titleOffset[q]||0)))})}proximatePositions(){let _,re=this.chart,me=[],g=this.options.align==="left";for(let w of(this.allItems.forEach(function(C){let q,ce,j=g,U,ne;C.yAxis&&(C.xAxis.options.reversed&&(j=!j),C.points&&(q=se(j?C.points:C.points.slice(0).reverse(),function(ge){return L(ge.plotY)})),ce=this.itemMarginTop+C.legendItem.label.getBBox().height+this.itemMarginBottom,ne=C.yAxis.top-re.plotTop,U=C.visible?(q?q.plotY:C.yAxis.height)+(ne-.3*ce):ne+C.yAxis.height,me.push({target:U,size:ce,item:C}))},this),B(me,re.plotHeight)))_=w.item.legendItem||{},L(w.pos)&&(_.y=re.plotTop-re.spacing[0]+w.pos)}render(){let _=this.chart,re=_.renderer,me=this.options,g=this.padding,w=this.getAllItems(),C,q,ce,j=this.group,U,ne=this.box;this.itemX=g,this.itemY=this.initialItemY,this.offsetWidth=0,this.lastItemY=0,this.widthOption=S(me.width,_.spacingBox.width-g),U=_.spacingBox.width-2*g-me.x,["rm","lm"].indexOf(this.getAlignment().substring(0,2))>-1&&(U/=2),this.maxLegendWidth=this.widthOption||U,j||(this.group=j=re.g("legend").addClass(me.className||"").attr({zIndex:7}).add(),this.contentGroup=re.g().attr({zIndex:1}).add(j),this.scrollGroup=re.g().add(this.contentGroup)),this.renderTitle(),T(w,(ge,R)=>(ge.options&&ge.options.legendIndex||0)-(R.options&&R.options.legendIndex||0)),me.reversed&&w.reverse(),this.allItems=w,this.display=C=!!w.length,this.lastLineHeight=0,this.maxItemWidth=0,this.totalItemWidth=0,this.itemHeight=0,w.forEach(this.renderItem,this),w.forEach(this.layoutItem,this),q=(this.widthOption||this.offsetWidth)+g,ce=this.lastItemY+this.lastLineHeight+this.titleHeight,ce=this.handleOverflow(ce)+g,ne||(this.box=ne=re.rect().addClass("highcharts-legend-box").attr({r:me.borderRadius}).add(j)),_.styledMode||ne.attr({stroke:me.borderColor,"stroke-width":me.borderWidth||0,fill:me.backgroundColor||"none"}).shadow(me.shadow),q>0&&ce>0&&ne[ne.placed?"animate":"attr"](ne.crisp.call({},{x:0,y:0,width:q,height:ce},ne.strokeWidth())),j[C?"show":"hide"](),_.styledMode&&j.getStyle("display")==="none"&&(q=ce=0),this.legendWidth=q,this.legendHeight=ce,C&&this.align(),this.proximate||this.positionItems(),K(this,"afterRender")}align(_=this.chart.spacingBox){let re=this.chart,me=this.options,g=_.y;/(lth|ct|rth)/.test(this.getAlignment())&&re.titleOffset[0]>0?g+=re.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&re.titleOffset[2]>0&&(g-=re.titleOffset[2]),g!==_.y&&(_=X(_,{y:g})),re.hasRendered||(this.group.placed=!1),this.group.align(X(me,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":me.verticalAlign}),!0,_)}handleOverflow(_){let re=this,me=this.chart,g=me.renderer,w=this.options,C=w.y,q=w.verticalAlign==="top",ce=this.padding,j=w.maxHeight,U=w.navigation,ne=H(U.animation,!0),ge=U.arrowSize||12,R=this.pages,G=this.allItems,ie=function(Re){typeof Re=="number"?Ne.attr({height:Re}):Ne&&(re.clipRect=Ne.destroy(),re.contentGroup.clip()),re.contentGroup.div&&(re.contentGroup.div.style.clip=Re?"rect("+ce+"px,9999px,"+(ce+Re)+"px,0)":"auto")},ue=function(Re){return re[Re]=g.circle(0,0,1.3*ge).translate(ge/2,ge/2).add(Ae),me.styledMode||re[Re].attr("fill","rgba(0,0,0,0.0001)"),re[Re]},de,ye,Se,Ce=me.spacingBox.height+(q?-C:C)-ce,Ae=this.nav,Ne=this.clipRect;return w.layout!=="horizontal"||w.verticalAlign==="middle"||w.floating||(Ce/=2),j&&(Ce=Math.min(Ce,j)),R.length=0,_&&Ce>0&&_>Ce&&U.enabled!==!1?(this.clipHeight=de=Math.max(Ce-20-this.titleHeight-ce,0),this.currentPage=H(this.currentPage,1),this.fullHeight=_,G.forEach((Re,fe)=>{let pe=(Se=Re.legendItem||{}).y||0,ve=Math.round(Se.label.getBBox().height),be=R.length;(!be||pe-R[be-1]>de&&(ye||pe)!==R[be-1])&&(R.push(ye||pe),be++),Se.pageIx=be-1,ye&&((G[fe-1].legendItem||{}).pageIx=be-1),fe===G.length-1&&pe+ve-R[be-1]>de&&pe>R[be-1]&&(R.push(pe),Se.pageIx=be),pe!==ye&&(ye=pe)}),Ne||(Ne=re.clipRect=g.clipRect(0,ce-2,9999,0),re.contentGroup.clip(Ne)),ie(de),Ae||(this.nav=Ae=g.g().attr({zIndex:1}).add(this.group),this.up=g.symbol("triangle",0,0,ge,ge).add(Ae),ue("upTracker").on("click",function(){re.scroll(-1,ne)}),this.pager=g.text("",15,10).addClass("highcharts-legend-navigation"),!me.styledMode&&U.style&&this.pager.css(U.style),this.pager.add(Ae),this.down=g.symbol("triangle-down",0,0,ge,ge).add(Ae),ue("downTracker").on("click",function(){re.scroll(1,ne)})),re.scroll(0),_=Ce):Ae&&(ie(),this.nav=Ae.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),_}scroll(_,re){let me=this.chart,g=this.pages,w=g.length,C=this.clipHeight,q=this.options.navigation,ce=this.pager,j=this.padding,U=this.currentPage+_;U>w&&(U=w),U>0&&(re!==void 0&&D(re,me),this.nav.attr({translateX:j,translateY:C+this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach(function(ne){ne.attr({class:U===1?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),ce.attr({text:U+"/"+w}),[this.down,this.downTracker].forEach(function(ne){ne.attr({x:18+this.pager.getBBox().width,class:U===w?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),me.styledMode||(this.up.attr({fill:U===1?q.inactiveColor:q.activeColor}),this.upTracker.css({cursor:U===1?"default":"pointer"}),this.down.attr({fill:U===w?q.inactiveColor:q.activeColor}),this.downTracker.css({cursor:U===w?"default":"pointer"})),this.scrollOffset=-g[U-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=U,this.positionCheckboxes(),E(()=>{K(this,"afterScroll",{currentPage:U})},J(H(re,me.renderer.globalAnimation,!0)).duration))}setItemEvents(_,re,me){let g=this,w=_.legendItem||{},C=g.chart.renderer.boxWrapper,q=_ instanceof b,ce=_ instanceof x,j="highcharts-legend-"+(q?"point":"series")+"-active",U=g.chart.styledMode,ne=me?[re,w.symbol]:[w.group],ge=R=>{g.allItems.forEach(G=>{_!==G&&[G].concat(G.linkedSeries||[]).forEach(ie=>{ie.setState(R,!q)})})};for(let R of ne)R&&R.on("mouseover",function(){_.visible&&ge("inactive"),_.setState("hover"),_.visible&&C.addClass(j),U||re.css(g.options.itemHoverStyle)}).on("mouseout",function(){g.chart.styledMode||re.css(X(_.visible?g.itemStyle:g.itemHiddenStyle)),ge(""),C.removeClass(j),_.setState()}).on("click",function(G){let ie=function(){_.setVisible&&_.setVisible(),ge(_.visible?"inactive":"")};C.removeClass(j),K(g,"itemClick",{browserEvent:G,legendItem:_},ie),q?_.firePointEvent("legendItemClick",{browserEvent:G}):ce&&K(_,"legendItemClick",{browserEvent:G})})}createCheckboxForItem(_){_.checkbox=Q("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:_.selected,defaultChecked:_.selected},this.options.itemCheckboxStyle,this.chart.container),$(_.checkbox,"click",function(re){let me=re.target;K(_.series||_,"checkboxClick",{checked:me.checked,item:_},function(){_.select()})})}}return(Z=P||(P={})).compose=function(te){A(ae,"Core.Legend")&&$(te,"beforeMargins",function(){this.legend=new Z(this,this.options.legend)})},P}),c(o,"Core/Chart/Chart.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Axis/Axis.js"],o["Core/Defaults.js"],o["Core/Templating.js"],o["Core/Foundation.js"],o["Core/Globals.js"],o["Core/Renderer/RendererRegistry.js"],o["Core/Series/Series.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Renderer/SVG/SVGRenderer.js"],o["Core/Time.js"],o["Core/Utilities.js"],o["Core/Renderer/HTML/AST.js"],o["Core/Axis/Tick.js"]],function(d,p,y,x,b,k,O,N,Z,J,D,F,ae,ee){let{animate:B,animObject:Y,setAnimation:$}=d,{defaultOptions:Q,defaultTime:z}=y,{numberFormat:V}=x,{registerEventOptions:le}=b,{charts:se,doc:K,marginNames:L,svg:X,win:H}=k,{seriesTypes:A}=Z,{addEvent:S,attr:T,createElement:E,css:P,defined:te,diffObjects:_,discardElement:re,erase:me,error:g,extend:w,find:C,fireEvent:q,getStyle:ce,isArray:j,isNumber:U,isObject:ne,isString:ge,merge:R,objectEach:G,pick:ie,pInt:ue,relativeLength:de,removeEvent:ye,splat:Se,syncTimeout:Ce,uniqueKey:Ae}=F;class Ne{static chart(fe,pe,ve){return new Ne(fe,pe,ve)}constructor(fe,pe,ve){this.sharedClips={};let be=[...arguments];(ge(fe)||fe.nodeName)&&(this.renderTo=be.shift()),this.init(be[0],be[1])}setZoomOptions(){let fe=this.options.chart,pe=fe.zooming;this.zooming={...pe,type:ie(fe.zoomType,pe.type),key:ie(fe.zoomKey,pe.key),pinchType:ie(fe.pinchType,pe.pinchType),singleTouch:ie(fe.zoomBySingleTouch,pe.singleTouch,!1),resetButton:R(pe.resetButton,fe.resetZoomButton)}}init(fe,pe){q(this,"init",{args:arguments},function(){let ve=R(Q,fe),be=ve.chart;this.userOptions=w({},fe),this.margin=[],this.spacing=[],this.labelCollectors=[],this.callback=pe,this.isResizing=0,this.options=ve,this.axes=[],this.series=[],this.time=fe.time&&Object.keys(fe.time).length?new D(fe.time):k.time,this.numberFormatter=be.numberFormatter||V,this.styledMode=be.styledMode,this.hasCartesianSeries=be.showAxes,this.index=se.length,se.push(this),k.chartCount++,le(this,be),this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,this.setZoomOptions(),q(this,"afterInit"),this.firstRender()})}initSeries(fe){let pe=this.options.chart,ve=fe.type||pe.type,be=A[ve];be||g(17,!0,this,{missingModuleFor:ve});let ke=new be;return typeof ke.init=="function"&&ke.init(this,fe),ke}setSortedData(){this.getSeriesOrderByLinks().forEach(function(fe){fe.points||fe.data||!fe.enabledDataSorting||fe.setData(fe.options.data,!1)})}getSeriesOrderByLinks(){return this.series.concat().sort(function(fe,pe){return fe.linkedSeries.length||pe.linkedSeries.length?pe.linkedSeries.length-fe.linkedSeries.length:0})}orderItems(fe,pe=0){let ve=this[fe],be=this.options[fe]=Se(this.options[fe]).slice(),ke=this.userOptions[fe]=this.userOptions[fe]?Se(this.userOptions[fe]).slice():[];if(this.hasRendered&&(be.splice(pe),ke.splice(pe)),ve)for(let Ee=pe,_e=ve.length;Ee<_e;++Ee){let Le=ve[Ee];Le&&(Le.index=Ee,Le instanceof N&&(Le.name=Le.getName()),Le.options.isInternal||(be[Ee]=Le.options,ke[Ee]=Le.userOptions))}}isInsidePlot(fe,pe,ve={}){var Ge;let{inverted:be,plotBox:ke,plotLeft:Ee,plotTop:_e,scrollablePlotBox:Le}=this,{scrollLeft:Be=0,scrollTop:$e=0}=ve.visiblePlotOnly&&((Ge=this.scrollablePlotArea)==null?void 0:Ge.scrollingContainer)||{},Me=ve.series,ze=ve.visiblePlotOnly&&Le||ke,Xe=ve.inverted?pe:fe,Ve=ve.inverted?fe:pe,Ie={x:Xe,y:Ve,isInsidePlot:!0,options:ve};if(!ve.ignoreX){let pt=Me&&(be&&!this.polar?Me.yAxis:Me.xAxis)||{pos:Ee,len:1/0},mt=ve.paneCoordinates?pt.pos+Xe:Ee+Xe;mt>=Math.max(Be+Ee,pt.pos)&&mt<=Math.min(Be+Ee+ze.width,pt.pos+pt.len)||(Ie.isInsidePlot=!1)}if(!ve.ignoreY&&Ie.isInsidePlot){let pt=!be&&ve.axis&&!ve.axis.isXAxis&&ve.axis||Me&&(be?Me.xAxis:Me.yAxis)||{pos:_e,len:1/0},mt=ve.paneCoordinates?pt.pos+Ve:_e+Ve;mt>=Math.max($e+_e,pt.pos)&&mt<=Math.min($e+_e+ze.height,pt.pos+pt.len)||(Ie.isInsidePlot=!1)}return q(this,"afterIsInsidePlot",Ie),Ie.isInsidePlot}redraw(fe){q(this,"beforeRedraw");let pe=this.hasCartesianSeries?this.axes:this.colorAxis||[],ve=this.series,be=this.pointer,ke=this.legend,Ee=this.userOptions.legend,_e=this.renderer,Le=_e.isHidden(),Be=[],$e,Me,ze,Xe=this.isDirtyBox,Ve=this.isDirtyLegend,Ie;for(_e.rootFontSize=_e.boxWrapper.getStyle("font-size"),this.setResponsive&&this.setResponsive(!1),$(!!this.hasRendered&&fe,this),Le&&this.temporaryDisplay(),this.layOutTitles(!1),ze=ve.length;ze--;)if(((Ie=ve[ze]).options.stacking||Ie.options.centerInCategory)&&(Me=!0,Ie.isDirty)){$e=!0;break}if($e)for(ze=ve.length;ze--;)(Ie=ve[ze]).options.stacking&&(Ie.isDirty=!0);ve.forEach(function(Ge){Ge.isDirty&&(Ge.options.legendType==="point"?(typeof Ge.updateTotals=="function"&&Ge.updateTotals(),Ve=!0):Ee&&(Ee.labelFormatter||Ee.labelFormat)&&(Ve=!0)),Ge.isDirtyData&&q(Ge,"updatedData")}),Ve&&ke&&ke.options.enabled&&(ke.render(),this.isDirtyLegend=!1),Me&&this.getStacks(),pe.forEach(function(Ge){Ge.updateNames(),Ge.setScale()}),this.getMargins(),pe.forEach(function(Ge){Ge.isDirty&&(Xe=!0)}),pe.forEach(function(Ge){let pt=Ge.min+","+Ge.max;Ge.extKey!==pt&&(Ge.extKey=pt,Be.push(function(){q(Ge,"afterSetExtremes",w(Ge.eventArgs,Ge.getExtremes())),delete Ge.eventArgs})),(Xe||Me)&&Ge.redraw()}),Xe&&this.drawChartBox(),q(this,"predraw"),ve.forEach(function(Ge){(Xe||Ge.isDirty)&&Ge.visible&&Ge.redraw(),Ge.isDirtyData=!1}),be&&be.reset(!0),_e.draw(),q(this,"redraw"),q(this,"render"),Le&&this.temporaryDisplay(!0),Be.forEach(function(Ge){Ge.call()})}get(fe){let pe=this.series;function ve(ke){return ke.id===fe||ke.options&&ke.options.id===fe}let be=C(this.axes,ve)||C(this.series,ve);for(let ke=0;!be&&ke<pe.length;ke++)be=C(pe[ke].points||[],ve);return be}getAxes(){let fe=this.userOptions;for(let pe of(q(this,"getAxes"),["xAxis","yAxis"]))for(let ve of fe[pe]=Se(fe[pe]||{}))new p(this,ve,pe);q(this,"afterGetAxes")}getSelectedPoints(){return this.series.reduce((fe,pe)=>(pe.getPointsCollection().forEach(ve=>{ie(ve.selectedStaging,ve.selected)&&fe.push(ve)}),fe),[])}getSelectedSeries(){return this.series.filter(function(fe){return fe.selected})}setTitle(fe,pe,ve){this.applyDescription("title",fe),this.applyDescription("subtitle",pe),this.applyDescription("caption",void 0),this.layOutTitles(ve)}applyDescription(fe,pe){let ve=this,be=this.options[fe]=R(this.options[fe],pe),ke=this[fe];ke&&pe&&(this[fe]=ke=ke.destroy()),be&&!ke&&((ke=this.renderer.text(be.text,0,0,be.useHTML).attr({align:be.align,class:"highcharts-"+fe,zIndex:be.zIndex||4}).add()).update=function(Ee,_e){ve.applyDescription(fe,Ee),ve.layOutTitles(_e)},this.styledMode||ke.css(w(fe==="title"?{fontSize:this.options.isStock?"1em":"1.2em"}:{},be.style)),this[fe]=ke)}layOutTitles(fe=!0){let pe=[0,0,0],ve=this.renderer,be=this.spacingBox;["title","subtitle","caption"].forEach(function(Ee){let _e=this[Ee],Le=this.options[Ee],Be=Le.verticalAlign||"top",$e=Ee==="title"?Be==="top"?-3:0:Be==="top"?pe[0]+2:0;if(_e){_e.css({width:(Le.width||be.width+(Le.widthAdjust||0))+"px"});let Me=ve.fontMetrics(_e).b,ze=Math.round(_e.getBBox(Le.useHTML).height);_e.align(w({y:Be==="bottom"?Me:$e+Me,height:ze},Le),!1,"spacingBox"),Le.floating||(Be==="top"?pe[0]=Math.ceil(pe[0]+ze):Be==="bottom"&&(pe[2]=Math.ceil(pe[2]+ze)))}},this),pe[0]&&(this.options.title.verticalAlign||"top")==="top"&&(pe[0]+=this.options.title.margin),pe[2]&&this.options.caption.verticalAlign==="bottom"&&(pe[2]+=this.options.caption.margin);let ke=!this.titleOffset||this.titleOffset.join(",")!==pe.join(",");this.titleOffset=pe,q(this,"afterLayOutTitles"),!this.isDirtyBox&&ke&&(this.isDirtyBox=this.isDirtyLegend=ke,this.hasRendered&&fe&&this.isDirtyBox&&this.redraw())}getContainerBox(){let fe=[].map.call(this.renderTo.children,ve=>{if(ve!==this.container){let be=ve.style.display;return ve.style.display="none",[ve,be]}}),pe={width:ce(this.renderTo,"width",!0)||0,height:ce(this.renderTo,"height",!0)||0};return fe.filter(Boolean).forEach(([ve,be])=>{ve.style.display=be}),pe}getChartSize(){var Ee;let fe=this.options.chart,pe=fe.width,ve=fe.height,be=this.getContainerBox(),ke=be.height>1&&!(!((Ee=this.renderTo.parentElement)!=null&&Ee.style.height)&&this.renderTo.style.height==="100%");this.chartWidth=Math.max(0,pe||be.width||600),this.chartHeight=Math.max(0,de(ve,this.chartWidth)||(ke?be.height:400)),this.containerBox=be}temporaryDisplay(fe){let pe=this.renderTo,ve;if(fe)for(;pe&&pe.style;)pe.hcOrigStyle&&(P(pe,pe.hcOrigStyle),delete pe.hcOrigStyle),pe.hcOrigDetached&&(K.body.removeChild(pe),pe.hcOrigDetached=!1),pe=pe.parentNode;else for(;pe&&pe.style&&(K.body.contains(pe)||pe.parentNode||(pe.hcOrigDetached=!0,K.body.appendChild(pe)),(ce(pe,"display",!1)==="none"||pe.hcOricDetached)&&(pe.hcOrigStyle={display:pe.style.display,height:pe.style.height,overflow:pe.style.overflow},ve={display:"block",overflow:"hidden"},pe!==this.renderTo&&(ve.height=0),P(pe,ve),pe.offsetWidth||pe.style.setProperty("display","block","important")),(pe=pe.parentNode)!==K.body););}setClassName(fe){this.container.className="highcharts-container "+(fe||"")}getContainer(){var ze;let fe=this.options,pe=fe.chart,ve="data-highcharts-chart",be=Ae(),ke,Ee=this.renderTo;Ee||(this.renderTo=Ee=pe.renderTo),ge(Ee)&&(this.renderTo=Ee=K.getElementById(Ee)),Ee||g(13,!0,this);let _e=ue(T(Ee,ve));U(_e)&&se[_e]&&se[_e].hasRendered&&se[_e].destroy(),T(Ee,ve,this.index),Ee.innerHTML=ae.emptyHTML,pe.skipClone||Ee.offsetWidth||this.temporaryDisplay(),this.getChartSize();let Le=this.chartHeight,Be=this.chartWidth;P(Ee,{overflow:"hidden"}),this.styledMode||(ke=w({position:"relative",overflow:"hidden",width:Be+"px",height:Le+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none",padding:"0px"},pe.style||{}));let $e=E("div",{id:be},ke,Ee);this.container=$e,this.getChartSize(),Be===this.chartWidth||(Be=this.chartWidth,this.styledMode||P($e,{width:ie((ze=pe.style)==null?void 0:ze.width,Be+"px")})),this.containerBox=this.getContainerBox(),this._cursor=$e.style.cursor;let Me=pe.renderer||!X?O.getRendererType(pe.renderer):J;if(this.renderer=new Me($e,Be,Le,void 0,pe.forExport,fe.exporting&&fe.exporting.allowHTML,this.styledMode),$(void 0,this),this.setClassName(pe.className),this.styledMode)for(let Xe in fe.defs)this.renderer.definition(fe.defs[Xe]);else this.renderer.setStyle(pe.style);this.renderer.chartIndex=this.index,q(this,"afterGetContainer")}getMargins(fe){let{spacing:pe,margin:ve,titleOffset:be}=this;this.resetMargins(),be[0]&&!te(ve[0])&&(this.plotTop=Math.max(this.plotTop,be[0]+pe[0])),be[2]&&!te(ve[2])&&(this.marginBottom=Math.max(this.marginBottom,be[2]+pe[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(ve,pe),q(this,"getMargins"),fe||this.getAxisMargins()}getAxisMargins(){let fe=this,pe=fe.axisOffset=[0,0,0,0],ve=fe.colorAxis,be=fe.margin,ke=function(Ee){Ee.forEach(function(_e){_e.visible&&_e.getOffset()})};fe.hasCartesianSeries?ke(fe.axes):ve&&ve.length&&ke(ve),L.forEach(function(Ee,_e){te(be[_e])||(fe[Ee]+=pe[_e])}),fe.setChartSize()}getOptions(){return _(this.userOptions,Q)}reflow(fe){var ke;let pe=this,ve=pe.containerBox,be=pe.getContainerBox();(ke=pe.pointer)==null||delete ke.chartPosition,!pe.isPrinting&&!pe.isResizing&&ve&&be.width&&((be.width!==ve.width||be.height!==ve.height)&&(F.clearTimeout(pe.reflowTimeout),pe.reflowTimeout=Ce(function(){pe.container&&pe.setSize(void 0,void 0,!1)},fe?100:0)),pe.containerBox=be)}setReflow(){let fe=this,pe=ve=>{var be;(be=fe.options)!=null&&be.chart.reflow&&fe.hasLoaded&&fe.reflow(ve)};if(typeof ResizeObserver=="function")new ResizeObserver(pe).observe(fe.renderTo);else{let ve=S(H,"resize",pe);S(this,"destroy",ve)}}setSize(fe,pe,ve){let be=this,ke=be.renderer;be.isResizing+=1,$(ve,be);let Ee=ke.globalAnimation;be.oldChartHeight=be.chartHeight,be.oldChartWidth=be.chartWidth,fe!==void 0&&(be.options.chart.width=fe),pe!==void 0&&(be.options.chart.height=pe),be.getChartSize();let{chartWidth:_e,chartHeight:Le,scrollablePixelsX:Be=0,scrollablePixelsY:$e=0}=be;(be.isDirtyBox||_e!==be.oldChartWidth||Le!==be.oldChartHeight)&&(be.styledMode||(Ee?B:P)(be.container,{width:`${_e+Be}px`,height:`${Le+$e}px`},Ee),be.setChartSize(!0),ke.setSize(_e,Le,Ee),be.axes.forEach(function(Me){Me.isDirty=!0,Me.setScale()}),be.isDirtyLegend=!0,be.isDirtyBox=!0,be.layOutTitles(),be.getMargins(),be.redraw(Ee),be.oldChartHeight=void 0,q(be,"resize"),setTimeout(()=>{be&&q(be,"endResize")},Y(Ee).duration)),be.isResizing-=1}setChartSize(fe){let pe,ve,be,ke,{chartHeight:Ee,chartWidth:_e,inverted:Le,spacing:Be,renderer:$e}=this,Me=this.clipOffset,ze=Math[Le?"floor":"round"];this.plotLeft=pe=Math.round(this.plotLeft),this.plotTop=ve=Math.round(this.plotTop),this.plotWidth=be=Math.max(0,Math.round(_e-pe-this.marginRight)),this.plotHeight=ke=Math.max(0,Math.round(Ee-ve-this.marginBottom)),this.plotSizeX=Le?ke:be,this.plotSizeY=Le?be:ke,this.spacingBox=$e.spacingBox={x:Be[3],y:Be[0],width:_e-Be[3]-Be[1],height:Ee-Be[0]-Be[2]},this.plotBox=$e.plotBox={x:pe,y:ve,width:be,height:ke},Me&&(this.clipBox={x:ze(Me[3]),y:ze(Me[0]),width:ze(this.plotSizeX-Me[1]-Me[3]),height:ze(this.plotSizeY-Me[0]-Me[2])}),fe||(this.axes.forEach(function(Xe){Xe.setAxisSize(),Xe.setAxisTranslation()}),$e.alignElements()),q(this,"afterSetChartSize",{skipAxes:fe})}resetMargins(){q(this,"resetMargins");let fe=this,pe=fe.options.chart,ve=pe.plotBorderWidth||0,be=ve/2;["margin","spacing"].forEach(function(ke){let Ee=pe[ke],_e=ne(Ee)?Ee:[Ee,Ee,Ee,Ee];["Top","Right","Bottom","Left"].forEach(function(Le,Be){fe[ke][Be]=ie(pe[ke+Le],_e[Be])})}),L.forEach(function(ke,Ee){fe[ke]=ie(fe.margin[Ee],fe.spacing[Ee])}),fe.axisOffset=[0,0,0,0],fe.clipOffset=[be,be,be,be],fe.plotBorderWidth=ve}drawChartBox(){let fe=this.options.chart,pe=this.renderer,ve=this.chartWidth,be=this.chartHeight,ke=this.styledMode,Ee=this.plotBGImage,_e=fe.backgroundColor,Le=fe.plotBackgroundColor,Be=fe.plotBackgroundImage,$e=this.plotLeft,Me=this.plotTop,ze=this.plotWidth,Xe=this.plotHeight,Ve=this.plotBox,Ie=this.clipRect,Ge=this.clipBox,pt=this.chartBackground,mt=this.plotBackground,ct=this.plotBorder,_t,Rt,Vt,xt="animate";pt||(this.chartBackground=pt=pe.rect().addClass("highcharts-background").add(),xt="attr"),ke?_t=Rt=pt.strokeWidth():(Rt=(_t=fe.borderWidth||0)+(fe.shadow?8:0),Vt={fill:_e||"none"},(_t||pt["stroke-width"])&&(Vt.stroke=fe.borderColor,Vt["stroke-width"]=_t),pt.attr(Vt).shadow(fe.shadow)),pt[xt]({x:Rt/2,y:Rt/2,width:ve-Rt-_t%2,height:be-Rt-_t%2,r:fe.borderRadius}),xt="animate",mt||(xt="attr",this.plotBackground=mt=pe.rect().addClass("highcharts-plot-background").add()),mt[xt](Ve),!ke&&(mt.attr({fill:Le||"none"}).shadow(fe.plotShadow),Be&&(Ee?(Be!==Ee.attr("href")&&Ee.attr("href",Be),Ee.animate(Ve)):this.plotBGImage=pe.image(Be,$e,Me,ze,Xe).add())),Ie?Ie.animate({width:Ge.width,height:Ge.height}):this.clipRect=pe.clipRect(Ge),xt="animate",ct||(xt="attr",this.plotBorder=ct=pe.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),ke||ct.attr({stroke:fe.plotBorderColor,"stroke-width":fe.plotBorderWidth||0,fill:"none"}),ct[xt](ct.crisp({x:$e,y:Me,width:ze,height:Xe},-ct.strokeWidth())),this.isDirtyBox=!1,q(this,"afterDrawChartBox")}propFromSeries(){let fe,pe,ve,be=this,ke=be.options.chart,Ee=be.options.series;["inverted","angular","polar"].forEach(function(_e){for(pe=A[ke.type],ve=ke[_e]||pe&&pe.prototype[_e],fe=Ee&&Ee.length;!ve&&fe--;)(pe=A[Ee[fe].type])&&pe.prototype[_e]&&(ve=!0);be[_e]=ve})}linkSeries(fe){let pe=this,ve=pe.series;ve.forEach(function(be){be.linkedSeries.length=0}),ve.forEach(function(be){let{linkedTo:ke}=be.options;if(ge(ke)){let Ee;(Ee=ke===":previous"?pe.series[be.index-1]:pe.get(ke))&&Ee.linkedParent!==be&&(Ee.linkedSeries.push(be),be.linkedParent=Ee,Ee.enabledDataSorting&&be.setDataSortingOptions(),be.visible=ie(be.options.visible,Ee.options.visible,be.visible))}}),q(this,"afterLinkSeries",{isUpdating:fe})}renderSeries(){this.series.forEach(function(fe){fe.translate(),fe.render()})}render(){var $e;let fe=this.axes,pe=this.colorAxis,ve=this.renderer,be=this.options.chart.axisLayoutRuns||2,ke=Me=>{Me.forEach(ze=>{ze.visible&&ze.render()})},Ee=0,_e=!0,Le,Be=0;for(let Me of(this.setTitle(),q(this,"beforeMargins"),($e=this.getStacks)==null||$e.call(this),this.getMargins(!0),this.setChartSize(),fe)){let{options:ze}=Me,{labels:Xe}=ze;if(this.hasCartesianSeries&&Me.horiz&&Me.visible&&Xe.enabled&&Me.series.length&&Me.coll!=="colorAxis"&&!this.polar){Ee=ze.tickLength,Me.createGroups();let Ve=new ee(Me,0,"",!0),Ie=Ve.createLabel("x",Xe);if(Ve.destroy(),Ie&&ie(Xe.reserveSpace,!U(ze.crossing))&&(Ee=Ie.getBBox().height+Xe.distance+Math.max(ze.offset||0,0)),Ee){Ie==null||Ie.destroy();break}}}for(this.plotHeight=Math.max(this.plotHeight-Ee,0);(_e||Le||be>1)&&Be<be;){let Me=this.plotWidth,ze=this.plotHeight;for(let Xe of fe)Be===0?Xe.setScale():(Xe.horiz&&_e||!Xe.horiz&&Le)&&Xe.setTickInterval(!0);Be===0?this.getAxisMargins():this.getMargins(),_e=Me/this.plotWidth>(Be?1:1.1),Le=ze/this.plotHeight>(Be?1:1.05),Be++}this.drawChartBox(),this.hasCartesianSeries?ke(fe):pe&&pe.length&&ke(pe),this.seriesGroup||(this.seriesGroup=ve.g("series-group").attr({zIndex:3}).shadow(this.options.chart.seriesGroupShadow).add()),this.renderSeries(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0}addCredits(fe){let pe=this,ve=R(!0,this.options.credits,fe);ve.enabled&&!this.credits&&(this.credits=this.renderer.text(ve.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){ve.href&&(H.location.href=ve.href)}).attr({align:ve.position.align,zIndex:8}),pe.styledMode||this.credits.css(ve.style),this.credits.add().align(ve.position),this.credits.update=function(be){pe.credits=pe.credits.destroy(),pe.addCredits(be)})}destroy(){let fe,pe=this,ve=pe.axes,be=pe.series,ke=pe.container,Ee=ke&&ke.parentNode;for(q(pe,"destroy"),pe.renderer.forExport?me(se,pe):se[pe.index]=void 0,k.chartCount--,pe.renderTo.removeAttribute("data-highcharts-chart"),ye(pe),fe=ve.length;fe--;)ve[fe]=ve[fe].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),fe=be.length;fe--;)be[fe]=be[fe].destroy();["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","rangeSelector","legend","resetZoomButton","tooltip","renderer"].forEach(function(_e){let Le=pe[_e];Le&&Le.destroy&&(pe[_e]=Le.destroy())}),ke&&(ke.innerHTML=ae.emptyHTML,ye(ke),Ee&&re(ke)),G(pe,function(_e,Le){delete pe[Le]})}firstRender(){var be;let fe=this,pe=fe.options;fe.getContainer(),fe.resetMargins(),fe.setChartSize(),fe.propFromSeries(),fe.getAxes();let ve=j(pe.series)?pe.series:[];pe.series=[],ve.forEach(function(ke){fe.initSeries(ke)}),fe.linkSeries(),fe.setSortedData(),q(fe,"beforeRender"),fe.render(),(be=fe.pointer)==null||be.getChartPosition(),fe.renderer.imgCount||fe.hasLoaded||fe.onload(),fe.temporaryDisplay(!0)}onload(){this.callbacks.concat([this.callback]).forEach(function(fe){fe&&this.index!==void 0&&fe.apply(this,[this])},this),q(this,"load"),q(this,"render"),te(this.index)&&this.setReflow(),this.warnIfA11yModuleNotLoaded(),this.hasLoaded=!0}warnIfA11yModuleNotLoaded(){let{options:fe,title:pe}=this;!fe||this.accessibility||(this.renderer.boxWrapper.attr({role:"img","aria-label":(pe&&pe.element.textContent||"").replace(/</g,"&lt;")}),fe.accessibility&&fe.accessibility.enabled===!1||g('Highcharts warning: Consider including the "accessibility.js" module to make your chart more usable for people with disabilities. Set the "accessibility.enabled" option to false to remove this warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.',!1,this))}addSeries(fe,pe,ve){let be,ke=this;return fe&&(pe=ie(pe,!0),q(ke,"addSeries",{options:fe},function(){be=ke.initSeries(fe),ke.isDirtyLegend=!0,ke.linkSeries(),be.enabledDataSorting&&be.setData(fe.data,!1),q(ke,"afterAddSeries",{series:be}),pe&&ke.redraw(ve)})),be}addAxis(fe,pe,ve,be){return this.createAxis(pe?"xAxis":"yAxis",{axis:fe,redraw:ve,animation:be})}addColorAxis(fe,pe,ve){return this.createAxis("colorAxis",{axis:fe,redraw:pe,animation:ve})}createAxis(fe,pe){let ve=new p(this,pe.axis,fe);return ie(pe.redraw,!0)&&this.redraw(pe.animation),ve}showLoading(fe){let pe=this,ve=pe.options,be=ve.loading,ke=function(){Ee&&P(Ee,{left:pe.plotLeft+"px",top:pe.plotTop+"px",width:pe.plotWidth+"px",height:pe.plotHeight+"px"})},Ee=pe.loadingDiv,_e=pe.loadingSpan;Ee||(pe.loadingDiv=Ee=E("div",{className:"highcharts-loading highcharts-loading-hidden"},null,pe.container)),_e||(pe.loadingSpan=_e=E("span",{className:"highcharts-loading-inner"},null,Ee),S(pe,"redraw",ke)),Ee.className="highcharts-loading",ae.setElementHTML(_e,ie(fe,ve.lang.loading,"")),pe.styledMode||(P(Ee,w(be.style,{zIndex:10})),P(_e,be.labelStyle),pe.loadingShown||(P(Ee,{opacity:0,display:""}),B(Ee,{opacity:be.style.opacity||.5},{duration:be.showDuration||0}))),pe.loadingShown=!0,ke()}hideLoading(){let fe=this.options,pe=this.loadingDiv;pe&&(pe.className="highcharts-loading highcharts-loading-hidden",this.styledMode||B(pe,{opacity:0},{duration:fe.loading.hideDuration||100,complete:function(){P(pe,{display:"none"})}})),this.loadingShown=!1}update(fe,pe,ve,be){let ke,Ee,_e,Le=this,Be={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},$e=fe.isResponsiveOptions,Me=[];q(Le,"update",{options:fe}),$e||Le.setResponsive(!1,!0),fe=_(fe,Le.options),Le.userOptions=R(Le.userOptions,fe);let ze=fe.chart;ze&&(R(!0,Le.options.chart,ze),this.setZoomOptions(),"className"in ze&&Le.setClassName(ze.className),("inverted"in ze||"polar"in ze||"type"in ze)&&(Le.propFromSeries(),ke=!0),"alignTicks"in ze&&(ke=!0),"events"in ze&&le(this,ze),G(ze,function(Ie,Ge){Le.propsRequireUpdateSeries.indexOf("chart."+Ge)!==-1&&(Ee=!0),Le.propsRequireDirtyBox.indexOf(Ge)!==-1&&(Le.isDirtyBox=!0),Le.propsRequireReflow.indexOf(Ge)===-1||(Le.isDirtyBox=!0,$e||(_e=!0))}),!Le.styledMode&&ze.style&&Le.renderer.setStyle(Le.options.chart.style||{})),!Le.styledMode&&fe.colors&&(this.options.colors=fe.colors),fe.time&&(this.time===z&&(this.time=new D(fe.time)),R(!0,Le.options.time,fe.time)),G(fe,function(Ie,Ge){Le[Ge]&&typeof Le[Ge].update=="function"?Le[Ge].update(Ie,!1):typeof Le[Be[Ge]]=="function"?Le[Be[Ge]](Ie):Ge!=="colors"&&Le.collectionsWithUpdate.indexOf(Ge)===-1&&R(!0,Le.options[Ge],fe[Ge]),Ge!=="chart"&&Le.propsRequireUpdateSeries.indexOf(Ge)!==-1&&(Ee=!0)}),this.collectionsWithUpdate.forEach(function(Ie){fe[Ie]&&(Se(fe[Ie]).forEach(function(Ge,pt){let mt,ct=te(Ge.id);ct&&(mt=Le.get(Ge.id)),!mt&&Le[Ie]&&(mt=Le[Ie][ie(Ge.index,pt)])&&(ct&&te(mt.options.id)||mt.options.isInternal)&&(mt=void 0),mt&&mt.coll===Ie&&(mt.update(Ge,!1),ve&&(mt.touched=!0)),!mt&&ve&&Le.collectionsWithInit[Ie]&&(Le.collectionsWithInit[Ie][0].apply(Le,[Ge].concat(Le.collectionsWithInit[Ie][1]||[]).concat([!1])).touched=!0)}),ve&&Le[Ie].forEach(function(Ge){Ge.touched||Ge.options.isInternal?delete Ge.touched:Me.push(Ge)}))}),Me.forEach(function(Ie){Ie.chart&&Ie.remove&&Ie.remove(!1)}),ke&&Le.axes.forEach(function(Ie){Ie.update({},!1)}),Ee&&Le.getSeriesOrderByLinks().forEach(function(Ie){Ie.chart&&Ie.update({},!1)},this);let Xe=ze&&ze.width,Ve=ze&&(ge(ze.height)?de(ze.height,Xe||Le.chartWidth):ze.height);_e||U(Xe)&&Xe!==Le.chartWidth||U(Ve)&&Ve!==Le.chartHeight?Le.setSize(Xe,Ve,be):ie(pe,!0)&&Le.redraw(be),q(Le,"afterUpdate",{options:fe,redraw:pe,animation:be})}setSubtitle(fe,pe){this.applyDescription("subtitle",fe),this.layOutTitles(pe)}setCaption(fe,pe){this.applyDescription("caption",fe),this.layOutTitles(pe)}showResetZoom(){let fe=this,pe=Q.lang,ve=fe.zooming.resetButton,be=ve.theme,ke=ve.relativeTo==="chart"||ve.relativeTo==="spacingBox"?null:"plotBox";function Ee(){fe.zoomOut()}q(this,"beforeShowResetZoom",null,function(){fe.resetZoomButton=fe.renderer.button(pe.resetZoom,null,null,Ee,be).attr({align:ve.position.align,title:pe.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(ve.position,!1,ke)}),q(this,"afterShowResetZoom")}zoomOut(){q(this,"selection",{resetSelection:!0},()=>this.transform({reset:!0,trigger:"zoom"}))}pan(fe,pe){let ve=this,be=typeof pe=="object"?pe:{enabled:pe,type:"x"},ke=be.type,Ee=ke&&ve[{x:"xAxis",xy:"axes",y:"yAxis"}[ke]].filter(Le=>Le.options.panningEnabled&&!Le.options.isInternal),_e=ve.options.chart;_e!=null&&_e.panning&&(_e.panning=be),q(this,"pan",{originalEvent:fe},()=>{ve.transform({axes:Ee,event:fe,to:{x:fe.chartX-(ve.mouseDownX||0),y:fe.chartY-(ve.mouseDownY||0)},trigger:"pan"}),P(ve.container,{cursor:"move"})})}transform(fe){var Xe;let{axes:pe=this.axes,event:ve,from:be={},reset:ke,selection:Ee,to:_e={},trigger:Le}=fe,{inverted:Be}=this,$e=!1,Me,ze;for(let Ve of((Xe=this.hoverPoints)==null||Xe.forEach(Ie=>Ie.setState()),pe)){let{horiz:Ie,len:Ge,minPointOffset:pt=0,options:mt,reversed:ct}=Ve,_t=Ie?"width":"height",Rt=Ie?"x":"y",Vt=ie(_e[_t],Ve.len),xt=ie(be[_t],Ve.len),lt=10>Math.abs(Vt)?1:Vt/xt,ht=(be[Rt]||0)+xt/2-Ve.pos,ft=ht-((_e[Rt]??Ve.pos)+Vt/2-Ve.pos)/lt,Ct=ct&&!Be||!ct&&Be?-1:1;if(!ke&&(ht<0||ht>Ve.len))continue;let ut=Ve.toValue(ft,!0)+(Ee||Ve.isOrdinal?0:pt*Ct),bt=Ve.toValue(ft+Ge/lt,!0)-(Ee||Ve.isOrdinal?0:pt*Ct||0),yt=Ve.allExtremes;if(ut>bt&&([ut,bt]=[bt,ut]),lt===1&&!ke&&Ve.coll==="yAxis"&&!yt){for(let At of Ve.series){let Lt=At.getExtremes(At.getProcessedData(!0).yData,!0);yt??(yt={dataMin:Number.MAX_VALUE,dataMax:-Number.MAX_VALUE}),U(Lt.dataMin)&&U(Lt.dataMax)&&(yt.dataMin=Math.min(Lt.dataMin,yt.dataMin),yt.dataMax=Math.max(Lt.dataMax,yt.dataMax))}Ve.allExtremes=yt}let{dataMin:wt,dataMax:Ot,min:Ht,max:Dt}=w(Ve.getExtremes(),yt||{}),vt=wt??mt.min,nt=Ot??mt.max,Ut=bt-ut,kt=Ve.categories?0:Math.min(Ut,nt-vt),Tt=vt-kt*(te(mt.min)?0:mt.minPadding),jt=nt+kt*(te(mt.max)?0:mt.maxPadding),nn=Ve.allowZoomOutside||lt===1||Le!=="zoom"&&lt>1,It=Math.min(mt.min??Tt,Tt,nn?Ht:Tt),Yt=Math.max(mt.max??jt,jt,nn?Dt:jt);(!Ve.isOrdinal||Ve.options.overscroll||lt!==1||ke)&&(ut<It&&(ut=It,lt>=1&&(bt=ut+Ut)),bt>Yt&&(bt=Yt,lt>=1&&(ut=bt-Ut)),(ke||Ve.series.length&&(ut!==Ht||bt!==Dt)&&ut>=It&&bt<=Yt)&&(Ee?Ee[Ve.coll].push({axis:Ve,min:ut,max:bt}):(Ve.isPanning=Le!=="zoom",Ve.isPanning&&(ze=!0),Ve.setExtremes(ke?void 0:ut,ke?void 0:bt,!1,!1,{move:ft,trigger:Le,scale:lt}),!ke&&(ut>It||bt<Yt)&&Le!=="mousewheel"&&(Me=!0)),$e=!0),ve&&(this[Ie?"mouseDownX":"mouseDownY"]=ve[Ie?"chartX":"chartY"]))}return $e&&(Ee?q(this,"selection",Ee,()=>{delete fe.selection,fe.trigger="zoom",this.transform(fe)}):(!Me||ze||this.resetZoomButton?!Me&&this.resetZoomButton&&(this.resetZoomButton=this.resetZoomButton.destroy()):this.showResetZoom(),this.redraw(Le==="zoom"&&(this.options.chart.animation??this.pointCount<100)))),$e}}return w(Ne.prototype,{callbacks:[],collectionsWithInit:{xAxis:[Ne.prototype.addAxis,[!0]],yAxis:[Ne.prototype.addAxis,[!1]],series:[Ne.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:["backgroundColor","borderColor","borderWidth","borderRadius","plotBackgroundColor","plotBackgroundImage","plotBorderColor","plotBorderWidth","plotShadow","shadow"],propsRequireReflow:["margin","marginTop","marginRight","marginBottom","marginLeft","spacing","spacingTop","spacingRight","spacingBottom","spacingLeft"],propsRequireUpdateSeries:["chart.inverted","chart.polar","chart.ignoreHiddenSeries","chart.type","colors","plotOptions","time","tooltip"]}),Ne}),c(o,"Extensions/ScrollablePlotArea.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Globals.js"],o["Core/Renderer/RendererRegistry.js"],o["Core/Utilities.js"]],function(d,p,y,x){let{stop:b}=d,{composed:k}=p,{addEvent:O,createElement:N,css:Z,defined:J,merge:D,pushUnique:F}=x;function ae(){let Y=this.scrollablePlotArea;(this.scrollablePixelsX||this.scrollablePixelsY)&&!Y&&(this.scrollablePlotArea=Y=new B(this)),Y==null||Y.applyFixed()}function ee(){this.chart.scrollablePlotArea&&(this.chart.scrollablePlotArea.isDirty=!0)}class B{static compose($,Q,z){F(k,this.compose)&&(O($,"afterInit",ee),O(Q,"afterSetChartSize",V=>this.afterSetSize(V.target,V)),O(Q,"render",ae),O(z,"show",ee))}static afterSetSize($,Q){let z,V,le,{minWidth:se,minHeight:K}=$.options.chart.scrollablePlotArea||{},{clipBox:L,plotBox:X,inverted:H,renderer:A}=$;if(!A.forExport&&(se?($.scrollablePixelsX=z=Math.max(0,se-$.chartWidth),z&&($.scrollablePlotBox=D($.plotBox),X.width=$.plotWidth+=z,L[H?"height":"width"]+=z,le=!0)):K&&($.scrollablePixelsY=V=Math.max(0,K-$.chartHeight),J(V)&&($.scrollablePlotBox=D($.plotBox),X.height=$.plotHeight+=V,L[H?"width":"height"]+=V,le=!1)),J(le)&&!Q.skipAxes))for(let S of $.axes)S.horiz===le&&(S.setAxisSize(),S.setAxisTranslation())}constructor($){var T;let Q,z=$.options.chart,V=y.getRendererType(),le=z.scrollablePlotArea||{},se=this.moveFixedElements.bind(this),K={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};$.scrollablePixelsX&&(K.overflowX="auto"),$.scrollablePixelsY&&(K.overflowY="auto"),this.chart=$;let L=this.parentDiv=N("div",{className:"highcharts-scrolling-parent"},{position:"relative"},$.renderTo),X=this.scrollingContainer=N("div",{className:"highcharts-scrolling"},K,L),H=this.innerContainer=N("div",{className:"highcharts-inner-container"},void 0,X),A=this.fixedDiv=N("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(((T=z.style)==null?void 0:T.zIndex)||0)+2,top:0},void 0,!0),S=this.fixedRenderer=new V(A,$.chartWidth,$.chartHeight,z.style);this.mask=S.path().attr({fill:z.backgroundColor||"#fff","fill-opacity":le.opacity??.85,zIndex:-1}).addClass("highcharts-scrollable-mask").add(),X.parentNode.insertBefore(A,X),Z($.renderTo,{overflow:"visible"}),O($,"afterShowResetZoom",se),O($,"afterApplyDrilldown",se),O($,"afterLayOutTitles",se),O(X,"scroll",()=>{let{pointer:E,hoverPoint:P}=$;E&&(delete E.chartPosition,P&&(Q=P),E.runPointActions(void 0,Q,!0))}),H.appendChild($.container)}applyFixed(){var U;let{chart:$,fixedRenderer:Q,isDirty:z,scrollingContainer:V}=this,{axisOffset:le,chartWidth:se,chartHeight:K,container:L,plotHeight:X,plotLeft:H,plotTop:A,plotWidth:S,scrollablePixelsX:T=0,scrollablePixelsY:E=0}=$,{scrollPositionX:P=0,scrollPositionY:te=0}=$.options.chart.scrollablePlotArea||{},_=se+T,re=K+E;Q.setSize(se,K),(z??!0)&&(this.isDirty=!1,this.moveFixedElements()),b($.container),Z(L,{width:`${_}px`,height:`${re}px`}),$.renderer.boxWrapper.attr({width:_,height:re,viewBox:[0,0,_,re].join(" ")}),(U=$.chartBackground)==null||U.attr({width:_,height:re}),Z(V,{width:`${se}px`,height:`${K}px`}),J(z)||(V.scrollLeft=T*P,V.scrollTop=E*te);let me=A-le[0]-1,g=H-le[3]-1,w=A+X+le[2]+1,C=H+S+le[1]+1,q=H+S-T,ce=A+X-E,j=[["M",0,0]];T?j=[["M",0,me],["L",H-1,me],["L",H-1,w],["L",0,w],["Z"],["M",q,me],["L",se,me],["L",se,w],["L",q,w],["Z"]]:E&&(j=[["M",g,0],["L",g,A-1],["L",C,A-1],["L",C,0],["Z"],["M",g,ce],["L",g,K],["L",C,K],["L",C,ce],["Z"]]),$.redrawTrigger!=="adjustHeight"&&this.mask.attr({d:j})}moveFixedElements(){let $,{container:Q,inverted:z,scrollablePixelsX:V,scrollablePixelsY:le}=this.chart,se=this.fixedRenderer,K=B.fixedSelectors;for(let L of(V&&!z?$=".highcharts-yaxis":V&&z||le&&!z?$=".highcharts-xaxis":le&&z&&($=".highcharts-yaxis"),$&&K.push(`${$}:not(.highcharts-radial-axis)`,`${$}-labels:not(.highcharts-radial-axis-labels)`),K))[].forEach.call(Q.querySelectorAll(L),X=>{(X.namespaceURI===se.SVG_NS?se.box:se.box.parentNode).appendChild(X),X.style.pointerEvents="auto"})}}return B.fixedSelectors=[".highcharts-breadcrumbs-group",".highcharts-contextbutton",".highcharts-caption",".highcharts-credits",".highcharts-drillup-button",".highcharts-legend",".highcharts-legend-checkbox",".highcharts-navigator-series",".highcharts-navigator-xaxis",".highcharts-navigator-yaxis",".highcharts-navigator",".highcharts-range-selector-group",".highcharts-reset-zoom",".highcharts-scrollbar",".highcharts-subtitle",".highcharts-title"],B}),c(o,"Core/Axis/Stacking/StackItem.js",[o["Core/Templating.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(d,p,y){let{format:x}=d,{series:b}=p,{destroyObjectProperties:k,fireEvent:O,isNumber:N,pick:Z}=y;return class{constructor(J,D,F,ae,ee){let B=J.chart.inverted,Y=J.reversed;this.axis=J;let $=this.isNegative=!!F!=!!Y;this.options=D=D||{},this.x=ae,this.total=null,this.cumulative=null,this.points={},this.hasValidPoints=!1,this.stack=ee,this.leftCliff=0,this.rightCliff=0,this.alignOptions={align:D.align||(B?$?"left":"right":"center"),verticalAlign:D.verticalAlign||(B?"middle":$?"bottom":"top"),y:D.y,x:D.x},this.textAlign=D.textAlign||(B?$?"right":"left":"center")}destroy(){k(this,this.axis)}render(J){let D=this.axis.chart,F=this.options,ae=F.format,ee=ae?x(ae,this,D):F.formatter.call(this);if(this.label)this.label.attr({text:ee,visibility:"hidden"});else{this.label=D.renderer.label(ee,null,void 0,F.shape,void 0,void 0,F.useHTML,!1,"stack-labels");let B={r:F.borderRadius||0,text:ee,padding:Z(F.padding,5),visibility:"hidden"};D.styledMode||(B.fill=F.backgroundColor,B.stroke=F.borderColor,B["stroke-width"]=F.borderWidth,this.label.css(F.style||{})),this.label.attr(B),this.label.added||this.label.add(J)}this.label.labelrank=D.plotSizeY,O(this,"afterRender")}setOffset(J,D,F,ae,ee,B){let{alignOptions:Y,axis:$,label:Q,options:z,textAlign:V}=this,le=$.chart,se=this.getStackBox({xOffset:J,width:D,boxBottom:F,boxTop:ae,defaultX:ee,xAxis:B}),{verticalAlign:K}=Y;if(Q&&se){let L=Q.getBBox(void 0,0),X=Q.padding,H=Z(z.overflow,"justify")==="justify",A;Y.x=z.x||0,Y.y=z.y||0;let{x:S,y:T}=this.adjustStackPosition({labelBox:L,verticalAlign:K,textAlign:V});se.x-=S,se.y-=T,Q.align(Y,!1,se),(A=le.isInsidePlot(Q.alignAttr.x+Y.x+S,Q.alignAttr.y+Y.y+T))||(H=!1),H&&b.prototype.justifyDataLabel.call($,Q,Y,Q.alignAttr,L,se),Q.attr({x:Q.alignAttr.x,y:Q.alignAttr.y,rotation:z.rotation,rotationOriginX:L.width*{left:0,center:.5,right:1}[z.textAlign||"center"],rotationOriginY:L.height/2}),Z(!H&&z.crop,!0)&&(A=N(Q.x)&&N(Q.y)&&le.isInsidePlot(Q.x-X+(Q.width||0),Q.y)&&le.isInsidePlot(Q.x+X,Q.y)),Q[A?"show":"hide"]()}O(this,"afterSetOffset",{xOffset:J,width:D})}adjustStackPosition({labelBox:J,verticalAlign:D,textAlign:F}){let ae={bottom:0,middle:1,top:2,right:1,center:0,left:-1},ee=ae[D],B=ae[F];return{x:J.width/2+J.width/2*B,y:J.height/2*ee}}getStackBox(J){let D=this.axis,F=D.chart,{boxTop:ae,defaultX:ee,xOffset:B,width:Y,boxBottom:$}=J,Q=D.stacking.usePercentage?100:Z(ae,this.total,0),z=D.toPixels(Q),V=J.xAxis||F.xAxis[0],le=Z(ee,V.translate(this.x))+B,se=Math.abs(z-D.toPixels($||N(D.min)&&D.logarithmic&&D.logarithmic.lin2log(D.min)||0)),K=F.inverted,L=this.isNegative;return K?{x:(L?z:z-se)-F.plotLeft,y:V.height-le-Y+V.top-F.plotTop,width:se,height:Y}:{x:le+V.transB-F.plotLeft,y:(L?z-se:z)-F.plotTop,width:Y,height:se}}}}),c(o,"Core/Axis/Stacking/StackingAxis.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Axis/Axis.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Axis/Stacking/StackItem.js"],o["Core/Utilities.js"]],function(d,p,y,x,b){var k;let{getDeferredAnimation:O}=d,{series:{prototype:N}}=y,{addEvent:Z,correctFloat:J,defined:D,destroyObjectProperties:F,fireEvent:ae,isArray:ee,isNumber:B,objectEach:Y,pick:$}=b;function Q(){let A=this.inverted;this.axes.forEach(S=>{S.stacking&&S.stacking.stacks&&S.hasVisibleSeries&&(S.stacking.oldStacks=S.stacking.stacks)}),this.series.forEach(S=>{let T=S.xAxis&&S.xAxis.options||{};S.options.stacking&&S.reserveSpace()&&(S.stackKey=[S.type,$(S.options.stack,""),A?T.top:T.left,A?T.height:T.width].join(","))})}function z(){var S;let A=this.stacking;if(A){let T=A.stacks;Y(T,(E,P)=>{F(E),delete T[P]}),(S=A.stackTotalGroup)==null||S.destroy()}}function V(){this.stacking||(this.stacking=new H(this))}function le(A,S,T,E){return!D(A)||A.x!==S||E&&A.stackKey!==E?A={x:S,index:0,key:E,stackKey:E}:A.index++,A.key=[T,S,A.index].join(","),A}function se(){let A,S=this,T=S.yAxis,E=S.stackKey||"",P=T.stacking.stacks,te=S.processedXData,_=S.options.stacking,re=S[_+"Stacker"];re&&[E,"-"+E].forEach(me=>{var ce;let g=te.length,w,C,q;for(;g--;)w=te[g],A=S.getStackIndicator(A,w,S.index,me),C=(ce=P[me])==null?void 0:ce[w],(q=C==null?void 0:C.points[A.key||""])&&re.call(S,q,C,g)})}function K(A,S,T){let E=S.total?100/S.total:0;A[0]=J(A[0]*E),A[1]=J(A[1]*E),this.stackedYData[T]=A[1]}function L(A){(this.is("column")||this.is("columnrange"))&&(this.options.centerInCategory&&!this.options.stacking&&this.chart.series.length>1?N.setStackedPoints.call(this,A,"group"):A.stacking.resetStacks())}function X(A,S){var Ae,Ne;let T,E,P,te,_,re,me,g,w,C=S||this.options.stacking;if(!C||!this.reserveSpace()||({group:"xAxis"}[C]||"yAxis")!==A.coll)return;let q=this.processedXData,ce=this.processedYData,j=[],U=ce.length,ne=this.options,ge=ne.threshold||0,R=ne.startFromThreshold?ge:0,G=ne.stack,ie=S?`${this.type},${C}`:this.stackKey||"",ue="-"+ie,de=this.negStacks,ye=A.stacking,Se=ye.stacks,Ce=ye.oldStacks;for(ye.stacksTouched+=1,me=0;me<U;me++){g=q[me],w=ce[me],re=(T=this.getStackIndicator(T,g,this.index)).key||"",Se[_=(E=de&&w<(R?0:ge))?ue:ie]||(Se[_]={}),Se[_][g]||((Ae=Ce[_])!=null&&Ae[g]?(Se[_][g]=Ce[_][g],Se[_][g].total=null):Se[_][g]=new x(A,A.options.stackLabels,!!E,g,G)),P=Se[_][g],w!==null?(P.points[re]=P.points[this.index]=[$(P.cumulative,R)],D(P.cumulative)||(P.base=re),P.touched=ye.stacksTouched,T.index>0&&this.singleStacks===!1&&(P.points[re][0]=P.points[this.index+","+g+",0"][0])):(delete P.points[re],delete P.points[this.index]);let Re=P.total||0;C==="percent"?(te=E?ie:ue,Re=de&&((Ne=Se[te])!=null&&Ne[g])?(te=Se[te][g]).total=Math.max(te.total||0,Re)+Math.abs(w)||0:J(Re+(Math.abs(w)||0))):C==="group"?(ee(w)&&(w=w[0]),w!==null&&Re++):Re=J(Re+(w||0)),C==="group"?P.cumulative=(Re||1)-1:P.cumulative=J($(P.cumulative,R)+(w||0)),P.total=Re,w!==null&&(P.points[re].push(P.cumulative),j[me]=P.cumulative,P.hasValidPoints=!0)}C==="percent"&&(ye.usePercentage=!0),C!=="group"&&(this.stackedYData=j),ye.oldStacks={}}class H{constructor(S){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=S}buildStacks(){let S,T,E=this.axis,P=E.series,te=E.coll==="xAxis",_=E.options.reversedStacks,re=P.length;for(this.resetStacks(),this.usePercentage=!1,T=re;T--;)S=P[_?T:re-T-1],te&&S.setGroupedPoints(E),S.setStackedPoints(E);if(!te)for(T=0;T<re;T++)P[T].modifyStacks();ae(E,"afterBuildStacks")}cleanStacks(){this.oldStacks&&(this.stacks=this.oldStacks,Y(this.stacks,S=>{Y(S,T=>{T.cumulative=T.total})}))}resetStacks(){Y(this.stacks,S=>{Y(S,(T,E)=>{B(T.touched)&&T.touched<this.stacksTouched?(T.destroy(),delete S[E]):(T.total=null,T.cumulative=null)})})}renderStackTotals(){var re;let S=this.axis,T=S.chart,E=T.renderer,P=this.stacks,te=O(T,((re=S.options.stackLabels)==null?void 0:re.animation)||!1),_=this.stackTotalGroup=this.stackTotalGroup||E.g("stack-labels").attr({zIndex:6,opacity:0}).add();_.translate(T.plotLeft,T.plotTop),Y(P,me=>{Y(me,g=>{g.render(_)})}),_.animate({opacity:1},te)}}return(k||(k={})).compose=function(A,S,T){let E=S.prototype,P=T.prototype;E.getStacks||(Z(A,"init",V),Z(A,"destroy",z),E.getStacks=Q,P.getStackIndicator=le,P.modifyStacks=se,P.percentStacker=K,P.setGroupedPoints=L,P.setStackedPoints=X)},k}),c(o,"Series/Line/LineSeries.js",[o["Core/Series/Series.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(d,p,y){let{defined:x,merge:b,isObject:k}=y;class O extends d{drawGraph(){let Z=this.options,J=(this.gappedPath||this.getGraphPath).call(this),D=this.chart.styledMode;[this,...this.zones].forEach((F,ae)=>{let ee,B=F.graph,Y=B?"animate":"attr",$=F.dashStyle||Z.dashStyle;B?(B.endX=this.preventGraphAnimation?null:J.xMap,B.animate({d:J})):J.length&&(F.graph=B=this.chart.renderer.path(J).addClass("highcharts-graph"+(ae?` highcharts-zone-graph-${ae-1} `:" ")+(ae&&F.className||"")).attr({zIndex:1}).add(this.group)),B&&!D&&(ee={stroke:!ae&&Z.lineColor||F.color||this.color||"#cccccc","stroke-width":Z.lineWidth||0,fill:this.fillGraph&&this.color||"none"},$?ee.dashstyle=$:Z.linecap!=="square"&&(ee["stroke-linecap"]=ee["stroke-linejoin"]="round"),B[Y](ee).shadow(ae<2&&Z.shadow&&b({filterUnits:"userSpaceOnUse"},k(Z.shadow)?Z.shadow:{}))),B&&(B.startX=J.xMap,B.isArea=J.isArea)})}getGraphPath(Z,J,D){let F=this,ae=F.options,ee=[],B=[],Y,$=ae.step,Q=(Z=Z||F.points).reversed;return Q&&Z.reverse(),($={right:1,center:2}[$]||$&&3)&&Q&&($=4-$),(Z=this.getValidPoints(Z,!1,!(ae.connectNulls&&!J&&!D))).forEach(function(z,V){let le,se=z.plotX,K=z.plotY,L=Z[V-1],X=z.isNull||typeof K!="number";(z.leftCliff||L&&L.rightCliff)&&!D&&(Y=!0),X&&!x(J)&&V>0?Y=!ae.connectNulls:X&&!J?Y=!0:(V===0||Y?le=[["M",z.plotX,z.plotY]]:F.getPointSpline?le=[F.getPointSpline(Z,z,V)]:$?(le=$===1?[["L",L.plotX,K]]:$===2?[["L",(L.plotX+se)/2,L.plotY],["L",(L.plotX+se)/2,K]]:[["L",se,L.plotY]]).push(["L",se,K]):le=[["L",se,K]],B.push(z.x),$&&(B.push(z.x),$===2&&B.push(z.x)),ee.push.apply(ee,le),Y=!1)}),ee.xMap=B,F.graphPath=ee,ee}}return O.defaultOptions=b(d.defaultOptions,{legendSymbol:"lineMarker"}),p.registerSeriesType("line",O),O}),c(o,"Series/Area/AreaSeriesDefaults.js",[],function(){return{threshold:0,legendSymbol:"areaMarker"}}),c(o,"Series/Area/AreaSeries.js",[o["Series/Area/AreaSeriesDefaults.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(d,p,y){let{seriesTypes:{line:x}}=p,{extend:b,merge:k,objectEach:O,pick:N}=y;class Z extends x{drawGraph(){this.areaPath=[],super.drawGraph.apply(this);let{areaPath:D,options:F}=this;[this,...this.zones].forEach((ae,ee)=>{let B={},Y=ae.fillColor||F.fillColor,$=ae.area,Q=$?"animate":"attr";$?($.endX=this.preventGraphAnimation?null:D.xMap,$.animate({d:D})):(B.zIndex=0,($=ae.area=this.chart.renderer.path(D).addClass("highcharts-area"+(ee?` highcharts-zone-area-${ee-1} `:" ")+(ee&&ae.className||"")).add(this.group)).isArea=!0),this.chart.styledMode||(B.fill=Y||ae.color||this.color,B["fill-opacity"]=Y?1:F.fillOpacity??.75,$.css({pointerEvents:this.stickyTracking?"none":"auto"})),$[Q](B),$.startX=D.xMap,$.shiftUnit=F.step?2:1})}getGraphPath(D){let F,ae,ee,B=x.prototype.getGraphPath,Y=this.options,$=Y.stacking,Q=this.yAxis,z=[],V=[],le=this.index,se=Q.stacking.stacks[this.stackKey],K=Y.threshold,L=Math.round(Q.getThreshold(Y.threshold)),X=N(Y.connectNulls,$==="percent"),H=function(te,_,re){let me=D[te],g=$&&se[me.x].points[le],w=me[re+"Null"]||0,C=me[re+"Cliff"]||0,q,ce,j=!0;C||w?(q=(w?g[0]:g[1])+C,ce=g[0]+C,j=!!w):!$&&D[_]&&D[_].isNull&&(q=ce=K),q!==void 0&&(V.push({plotX:F,plotY:q===null?L:Q.getThreshold(q),isNull:j,isCliff:!0}),z.push({plotX:F,plotY:ce===null?L:Q.getThreshold(ce),doCurve:!1}))};D=D||this.points,$&&(D=this.getStackPoints(D));for(let te=0,_=D.length;te<_;++te)$||(D[te].leftCliff=D[te].rightCliff=D[te].leftNull=D[te].rightNull=void 0),ae=D[te].isNull,F=N(D[te].rectPlotX,D[te].plotX),ee=$?N(D[te].yBottom,L):L,ae&&!X||(X||H(te,te-1,"left"),ae&&!$&&X||(V.push(D[te]),z.push({x:te,plotX:F,plotY:ee})),X||H(te,te+1,"right"));let A=B.call(this,V,!0,!0);z.reversed=!0;let S=B.call(this,z,!0,!0),T=S[0];T&&T[0]==="M"&&(S[0]=["L",T[1],T[2]]);let E=A.concat(S);E.length&&E.push(["Z"]);let P=B.call(this,V,!1,X);return this.chart.series.length>1&&$&&V.some(te=>te.isCliff)&&(E.hasStackedCliffs=P.hasStackedCliffs=!0),E.xMap=A.xMap,this.areaPath=E,P}getStackPoints(D){let F=this,ae=[],ee=[],B=this.xAxis,Y=this.yAxis,$=Y.stacking.stacks[this.stackKey],Q={},z=Y.series,V=z.length,le=Y.options.reversedStacks?1:-1,se=z.indexOf(F);if(D=D||this.points,this.options.stacking){for(let L=0;L<D.length;L++)D[L].leftNull=D[L].rightNull=void 0,Q[D[L].x]=D[L];O($,function(L,X){L.total!==null&&ee.push(X)}),ee.sort(function(L,X){return L-X});let K=z.map(L=>L.visible);ee.forEach(function(L,X){let H=0,A,S;if(Q[L]&&!Q[L].isNull)ae.push(Q[L]),[-1,1].forEach(function(T){let E=T===1?"rightNull":"leftNull",P=$[ee[X+T]],te=0;if(P){let _=se;for(;_>=0&&_<V;){let re=z[_].index;!(A=P.points[re])&&(re===F.index?Q[L][E]=!0:K[_]&&(S=$[L].points[re])&&(te-=S[1]-S[0])),_+=le}}Q[L][T===1?"rightCliff":"leftCliff"]=te});else{let T=se;for(;T>=0&&T<V;){let E=z[T].index;if(A=$[L].points[E]){H=A[1];break}T+=le}H=N(H,0),H=Y.translate(H,0,1,0,1),ae.push({isNull:!0,plotX:B.translate(L,0,0,0,1),x:L,plotY:H,yBottom:H})}})}return ae}}return Z.defaultOptions=k(x.defaultOptions,d),b(Z.prototype,{singleStacks:!1}),p.registerSeriesType("area",Z),Z}),c(o,"Series/Spline/SplineSeries.js",[o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(d,p){let{line:y}=d.seriesTypes,{merge:x,pick:b}=p;class k extends y{getPointSpline(N,Z,J){let D,F,ae,ee,B=Z.plotX||0,Y=Z.plotY||0,$=N[J-1],Q=N[J+1];function z(le){return le&&!le.isNull&&le.doCurve!==!1&&!Z.isCliff}if(z($)&&z(Q)){let le=$.plotX||0,se=$.plotY||0,K=Q.plotX||0,L=Q.plotY||0,X=0;D=(1.5*B+le)/2.5,F=(1.5*Y+se)/2.5,ae=(1.5*B+K)/2.5,ee=(1.5*Y+L)/2.5,ae!==D&&(X=(ee-F)*(ae-B)/(ae-D)+Y-ee),F+=X,ee+=X,F>se&&F>Y?(F=Math.max(se,Y),ee=2*Y-F):F<se&&F<Y&&(F=Math.min(se,Y),ee=2*Y-F),ee>L&&ee>Y?(ee=Math.max(L,Y),F=2*Y-ee):ee<L&&ee<Y&&(ee=Math.min(L,Y),F=2*Y-ee),Z.rightContX=ae,Z.rightContY=ee,Z.controlPoints={low:[D,F],high:[ae,ee]}}let V=["C",b($.rightContX,$.plotX,0),b($.rightContY,$.plotY,0),b(D,B,0),b(F,Y,0),B,Y];return $.rightContX=$.rightContY=void 0,V}}return k.defaultOptions=x(y.defaultOptions),d.registerSeriesType("spline",k),k}),c(o,"Series/AreaSpline/AreaSplineSeries.js",[o["Series/Spline/SplineSeries.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(d,p,y){let{area:x,area:{prototype:b}}=p.seriesTypes,{extend:k,merge:O}=y;class N extends d{}return N.defaultOptions=O(d.defaultOptions,x.defaultOptions),k(N.prototype,{getGraphPath:b.getGraphPath,getStackPoints:b.getStackPoints,drawGraph:b.drawGraph}),p.registerSeriesType("areaspline",N),N}),c(o,"Series/Column/ColumnSeriesDefaults.js",[],function(){return{borderRadius:3,centerInCategory:!1,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"}}),c(o,"Series/Column/ColumnSeries.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Color/Color.js"],o["Series/Column/ColumnSeriesDefaults.js"],o["Core/Globals.js"],o["Core/Series/Series.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(d,p,y,x,b,k,O){let{animObject:N}=d,{parse:Z}=p,{noop:J}=x,{clamp:D,crisp:F,defined:ae,extend:ee,fireEvent:B,isArray:Y,isNumber:$,merge:Q,pick:z,objectEach:V}=O;class le extends b{animate(K){let L,X,H=this,A=this.yAxis,S=A.pos,T=A.reversed,E=H.options,{clipOffset:P,inverted:te}=this.chart,_={},re=te?"translateX":"translateY";K&&P?(_.scaleY=.001,X=D(A.toPixels(E.threshold),S,S+A.len),te?(X+=T?-Math.floor(P[0]):Math.ceil(P[2]),_.translateX=X-A.len):(X+=T?Math.ceil(P[0]):-Math.floor(P[2]),_.translateY=X),H.clipBox&&H.setClip(),H.group.attr(_)):(L=Number(H.group.attr(re)),H.group.animate({scaleY:1},ee(N(H.options.animation),{step:function(me,g){H.group&&(_[re]=L+g.pos*(S-L),H.group.attr(_))}})))}init(K,L){super.init.apply(this,arguments);let X=this;(K=X.chart).hasRendered&&K.series.forEach(function(H){H.type===X.type&&(H.isDirty=!0)})}getColumnMetrics(){var w,C;let K=this,L=K.options,X=K.xAxis,H=K.yAxis,A=X.options.reversedStacks,S=X.reversed&&!A||!X.reversed&&A,T={},E,P=0;L.grouping===!1?P=1:K.chart.series.forEach(function(q){let ce,j=q.yAxis,U=q.options;q.type===K.type&&q.reserveSpace()&&H.len===j.len&&H.pos===j.pos&&(U.stacking&&U.stacking!=="group"?(T[E=q.stackKey]===void 0&&(T[E]=P++),ce=T[E]):U.grouping!==!1&&(ce=P++),q.columnIndex=ce)});let te=Math.min(Math.abs(X.transA)*(!((w=X.brokenAxis)!=null&&w.hasBreaks)&&((C=X.ordinal)==null?void 0:C.slope)||L.pointRange||X.closestPointRange||X.tickInterval||1),X.len),_=te*L.groupPadding,re=(te-2*_)/(P||1),me=Math.min(L.maxPointWidth||X.len,z(L.pointWidth,re*(1-2*L.pointPadding))),g=(K.columnIndex||0)+(S?1:0);return K.columnMetrics={width:me,offset:(re-me)/2+(_+g*re-te/2)*(S?-1:1),paddedWidth:re,columnCount:P},K.columnMetrics}crispCol(K,L,X,H){let A=this.borderWidth,S=this.chart.inverted;return H=F(L+H,A,S)-(L=F(L,A,S)),this.options.crisp&&(X=F(K+X,A)-(K=F(K,A))),{x:K,y:L,width:X,height:H}}adjustForMissingColumns(K,L,X,H){var A;if(!X.isNull&&H.columnCount>1){let S=this.xAxis.series.filter(te=>te.visible).map(te=>te.index),T=0,E=0;V((A=this.xAxis.stacking)==null?void 0:A.stacks,te=>{if(typeof X.x=="number"){let _=te[X.x.toString()];if(_&&Y(_.points[this.index])){let re=Object.keys(_.points).filter(me=>!me.match(",")&&_.points[me]&&_.points[me].length>1).map(parseFloat).filter(me=>S.indexOf(me)!==-1).sort((me,g)=>g-me);T=re.indexOf(this.index),E=re.length}}}),T=this.xAxis.reversed?E-1-T:T;let P=(E-1)*H.paddedWidth+L;K=(X.plotX||0)+P/2-L-T*H.paddedWidth}return K}translate(){let K=this,L=K.chart,X=K.options,H=K.dense=K.closestPointRange*K.xAxis.transA<2,A=K.borderWidth=z(X.borderWidth,H?0:1),S=K.xAxis,T=K.yAxis,E=X.threshold,P=z(X.minPointLength,5),te=K.getColumnMetrics(),_=te.width,re=K.pointXOffset=te.offset,me=K.dataMin,g=K.dataMax,w=K.translatedThreshold=T.getThreshold(E),C=K.barW=Math.max(_,1+2*A);X.pointPadding&&(C=Math.ceil(C)),b.prototype.translate.apply(K),K.points.forEach(function(q){let ce=z(q.yBottom,w),j=999+Math.abs(ce),U=q.plotX||0,ne=D(q.plotY,-j,T.len+j),ge,R=Math.min(ne,ce),G=Math.max(ne,ce)-R,ie=_,ue=U+re,de=C;P&&Math.abs(G)<P&&(G=P,ge=!T.reversed&&!q.negative||T.reversed&&q.negative,$(E)&&$(g)&&q.y===E&&g<=E&&(T.min||0)<E&&(me!==g||(T.max||0)<=E)&&(ge=!ge,q.negative=!q.negative),R=Math.abs(R-w)>P?ce-P:w-(ge?P:0)),ae(q.options.pointWidth)&&(ue-=Math.round(((ie=de=Math.ceil(q.options.pointWidth))-_)/2)),X.centerInCategory&&!X.stacking&&(ue=K.adjustForMissingColumns(ue,ie,q,te)),q.barX=ue,q.pointWidth=ie,q.tooltipPos=L.inverted?[D(T.len+T.pos-L.plotLeft-ne,T.pos-L.plotLeft,T.len+T.pos-L.plotLeft),S.len+S.pos-L.plotTop-ue-de/2,G]:[S.left-L.plotLeft+ue+de/2,D(ne+T.pos-L.plotTop,T.pos-L.plotTop,T.len+T.pos-L.plotTop),G],q.shapeType=K.pointClass.prototype.shapeType||"roundedRect",q.shapeArgs=K.crispCol(ue,q.isNull?w:R,de,q.isNull?0:G)}),B(this,"afterColumnTranslate")}drawGraph(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")}pointAttribs(K,L){let X=this.options,H=this.pointAttrToOptions||{},A=H.stroke||"borderColor",S=H["stroke-width"]||"borderWidth",T,E,P,te=K&&K.color||this.color,_=K&&K[A]||X[A]||te,re=K&&K.options.dashStyle||X.dashStyle,me=K&&K[S]||X[S]||this[S]||0,g=z(K&&K.opacity,X.opacity,1);K&&this.zones.length&&(E=K.getZone(),te=K.options.color||E&&(E.color||K.nonZonedColor)||this.color,E&&(_=E.borderColor||_,re=E.dashStyle||re,me=E.borderWidth||me)),L&&K&&(P=(T=Q(X.states[L],K.options.states&&K.options.states[L]||{})).brightness,te=T.color||P!==void 0&&Z(te).brighten(T.brightness).get()||te,_=T[A]||_,me=T[S]||me,re=T.dashStyle||re,g=z(T.opacity,g));let w={fill:te,stroke:_,"stroke-width":me,opacity:g};return re&&(w.dashstyle=re),w}drawPoints(K=this.points){let L,X=this,H=this.chart,A=X.options,S=H.renderer,T=A.animationLimit||250;K.forEach(function(E){let P=E.plotY,te=E.graphic,_=!!te,re=te&&H.pointCount<T?"animate":"attr";$(P)&&E.y!==null?(L=E.shapeArgs,te&&E.hasNewShapeType()&&(te=te.destroy()),X.enabledDataSorting&&(E.startXPos=X.xAxis.reversed?-(L&&L.width||0):X.xAxis.width),!te&&(E.graphic=te=S[E.shapeType](L).add(E.group||X.group),te&&X.enabledDataSorting&&H.hasRendered&&H.pointCount<T&&(te.attr({x:E.startXPos}),_=!0,re="animate")),te&&_&&te[re](Q(L)),H.styledMode||te[re](X.pointAttribs(E,E.selected&&"select")).shadow(E.allowShadow!==!1&&A.shadow),te&&(te.addClass(E.getClassName(),!0),te.attr({visibility:E.visible?"inherit":"hidden"}))):te&&(E.graphic=te.destroy())})}drawTracker(K=this.points){let L,X=this,H=X.chart,A=H.pointer,S=function(T){let E=A==null?void 0:A.getPointFromEvent(T);A&&E&&X.options.enableMouseTracking&&(A.isDirectTouch=!0,E.onMouseOver(T))};K.forEach(function(T){L=Y(T.dataLabels)?T.dataLabels:T.dataLabel?[T.dataLabel]:[],T.graphic&&(T.graphic.element.point=T),L.forEach(function(E){(E.div||E.element).point=T})}),X._hasTracking||(X.trackerGroups.forEach(function(T){X[T]&&(X[T].addClass("highcharts-tracker").on("mouseover",S).on("mouseout",function(E){A==null||A.onTrackerMouseOut(E)}).on("touchstart",S),!H.styledMode&&X.options.cursor&&X[T].css({cursor:X.options.cursor}))}),X._hasTracking=!0),B(this,"afterDrawTracker")}remove(){let K=this,L=K.chart;L.hasRendered&&L.series.forEach(function(X){X.type===K.type&&(X.isDirty=!0)}),b.prototype.remove.apply(K,arguments)}}return le.defaultOptions=Q(b.defaultOptions,y),ee(le.prototype,{directTouch:!0,getSymbol:J,negStacks:!0,trackerGroups:["group","dataLabelsGroup"]}),k.registerSeriesType("column",le),le}),c(o,"Core/Series/DataLabel.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Templating.js"],o["Core/Utilities.js"]],function(d,p,y){var x;let{getDeferredAnimation:b}=d,{format:k}=p,{defined:O,extend:N,fireEvent:Z,isArray:J,isString:D,merge:F,objectEach:ae,pick:ee,pInt:B,splat:Y}=y;return function($){function Q(){return X(this).some(A=>A==null?void 0:A.enabled)}function z(A,S,T,E,P){var ne;let{chart:te,enabledDataSorting:_}=this,re=this.isCartesian&&te.inverted,me=A.plotX,g=A.plotY,w=T.rotation||0,C=O(me)&&O(g)&&te.isInsidePlot(me,Math.round(g),{inverted:re,paneCoordinates:!0,series:this}),q=w===0&&ee(T.overflow,_?"none":"justify")==="justify",ce=this.visible&&A.visible!==!1&&O(me)&&(A.series.forceDL||_&&!q||C||ee(T.inside,!!this.options.stacking)&&E&&te.isInsidePlot(me,re?E.x+1:E.y+E.height-1,{inverted:re,paneCoordinates:!0,series:this})),j=A.pos();if(ce&&j){var U;let ge=S.getBBox(),R=S.getBBox(void 0,0),G={right:1,center:.5}[T.align||0]||0,ie={bottom:1,middle:.5}[T.verticalAlign||0]||0;if(E=N({x:j[0],y:Math.round(j[1]),width:0,height:0},E||{}),T.alignTo==="plotEdges"&&this.isCartesian&&(E[re?"x":"y"]=0,E[re?"width":"height"]=((ne=this.yAxis)==null?void 0:ne.len)||0),N(T,{width:ge.width,height:ge.height}),U=E,_&&this.xAxis&&!q&&this.setDataLabelStartPos(A,S,P,C,U),S.align(F(T,{width:R.width,height:R.height}),!1,E,!1),S.alignAttr.x+=G*(R.width-ge.width),S.alignAttr.y+=ie*(R.height-ge.height),S[S.placed?"animate":"attr"]({x:S.alignAttr.x+(ge.width-R.width)/2,y:S.alignAttr.y+(ge.height-R.height)/2,rotationOriginX:(S.width||0)/2,rotationOriginY:(S.height||0)/2}),q&&E.height>=0)this.justifyDataLabel(S,T,S.alignAttr,ge,E,P);else if(ee(T.crop,!0)){let{x:ue,y:de}=S.alignAttr;ce=te.isInsidePlot(ue,de,{paneCoordinates:!0,series:this})&&te.isInsidePlot(ue+ge.width-1,de+ge.height-1,{paneCoordinates:!0,series:this})}T.shape&&!w&&S[P?"attr":"animate"]({anchorX:j[0],anchorY:j[1]})}P&&_&&(S.placed=!1),ce||_&&!q?(S.show(),S.placed=!0):(S.hide(),S.placed=!1)}function V(){return this.plotGroup("dataLabelsGroup","data-labels",this.hasRendered?"inherit":"hidden",this.options.dataLabels.zIndex||6)}function le(A){let S=this.hasRendered||0,T=this.initDataLabelsGroup().attr({opacity:+S});return!S&&T&&(this.visible&&T.show(),this.options.animation?T.animate({opacity:1},A):T.attr({opacity:1})),T}function se(A){var ce;let S;A=A||this.points;let T=this,E=T.chart,P=T.options,te=E.renderer,{backgroundColor:_,plotBackgroundColor:re}=E.options.chart,me=te.getContrast(D(re)&&re||D(_)&&_||"#000000"),g=X(T),{animation:w,defer:C}=g[0],q=C?b(E,w,T):{defer:0,duration:0};Z(this,"drawDataLabels"),(ce=T.hasDataLabels)!=null&&ce.call(T)&&(S=this.initDataLabels(q),A.forEach(j=>{var ge,R;let U=j.dataLabels||[];Y(L(g,j.dlOptions||((ge=j.options)==null?void 0:ge.dataLabels))).forEach((G,ie)=>{let ue=G.enabled&&(j.visible||j.dataLabelOnHidden)&&(!j.isNull||j.dataLabelOnNull)&&function(Ee,_e){let Le=_e.filter;if(Le){let Be=Le.operator,$e=Ee[Le.property],Me=Le.value;return Be===">"&&$e>Me||Be==="<"&&$e<Me||Be===">="&&$e>=Me||Be==="<="&&$e<=Me||Be==="=="&&$e==Me||Be==="==="&&$e===Me||Be==="!="&&$e!=Me||Be==="!=="&&$e!==Me}return!0}(j,G),{backgroundColor:de,borderColor:ye,distance:Se,style:Ce={}}=G,Ae,Ne,Re,fe,pe={},ve=U[ie],be=!ve,ke;ue&&(Ne=ee(G[j.formatPrefix+"Format"],G.format),Ae=j.getLabelConfig(),Re=O(Ne)?k(Ne,Ae,E):(G[j.formatPrefix+"Formatter"]||G.formatter).call(Ae,G),fe=G.rotation,!E.styledMode&&(Ce.color=ee(G.color,Ce.color,D(T.color)?T.color:void 0,"#000000"),Ce.color==="contrast"?(de!=="none"&&(ke=de),j.contrastColor=te.getContrast(ke!=="auto"&&ke||j.color||T.color),Ce.color=ke||!O(Se)&&G.inside||0>B(Se||0)||P.stacking?j.contrastColor:me):delete j.contrastColor,P.cursor&&(Ce.cursor=P.cursor)),pe={r:G.borderRadius||0,rotation:fe,padding:G.padding,zIndex:1},E.styledMode||(pe.fill=de==="auto"?j.color:de,pe.stroke=ye==="auto"?j.color:ye,pe["stroke-width"]=G.borderWidth),ae(pe,(Ee,_e)=>{Ee===void 0&&delete pe[_e]})),!ve||ue&&O(Re)&&!!ve.div==!!G.useHTML&&(ve.rotation&&G.rotation||ve.rotation===G.rotation)||(ve=void 0,be=!0),ue&&O(Re)&&(ve?pe.text=Re:(ve=te.label(Re,0,0,G.shape,void 0,void 0,G.useHTML,void 0,"data-label")).addClass(" highcharts-data-label-color-"+j.colorIndex+" "+(G.className||"")+(G.useHTML?" highcharts-tracker":"")),ve&&(ve.options=G,ve.attr(pe),E.styledMode?Ce.width&&ve.css({width:Ce.width,textOverflow:Ce.textOverflow}):ve.css(Ce).shadow(G.shadow),Z(ve,"beforeAddingDataLabel",{labelOptions:G,point:j}),ve.added||ve.add(S),T.alignDataLabel(j,ve,G,void 0,be),ve.isActive=!0,U[ie]&&U[ie]!==ve&&U[ie].destroy(),U[ie]=ve))});let ne=U.length;for(;ne--;)U[ne]&&U[ne].isActive?U[ne].isActive=!1:((R=U[ne])==null||R.destroy(),U.splice(ne,1));j.dataLabel=U[0],j.dataLabels=U})),Z(this,"afterDrawDataLabels")}function K(A,S,T,E,P,te){let _=this.chart,re=S.align,me=S.verticalAlign,g=A.box?0:A.padding||0,w=_.inverted?this.yAxis:this.xAxis,C=w?w.left-_.plotLeft:0,q=_.inverted?this.xAxis:this.yAxis,ce=q?q.top-_.plotTop:0,{x:j=0,y:U=0}=S,ne,ge;return(ne=(T.x||0)+g+C)<0&&(re==="right"&&j>=0?(S.align="left",S.inside=!0):j-=ne,ge=!0),(ne=(T.x||0)+E.width-g+C)>_.plotWidth&&(re==="left"&&j<=0?(S.align="right",S.inside=!0):j+=_.plotWidth-ne,ge=!0),(ne=T.y+g+ce)<0&&(me==="bottom"&&U>=0?(S.verticalAlign="top",S.inside=!0):U-=ne,ge=!0),(ne=(T.y||0)+E.height-g+ce)>_.plotHeight&&(me==="top"&&U<=0?(S.verticalAlign="bottom",S.inside=!0):U+=_.plotHeight-ne,ge=!0),ge&&(S.x=j,S.y=U,A.placed=!te,A.align(S,void 0,P)),ge}function L(A,S){let T=[],E;if(J(A)&&!J(S))T=A.map(function(P){return F(P,S)});else if(J(S)&&!J(A))T=S.map(function(P){return F(A,P)});else if(J(A)||J(S)){if(J(A)&&J(S))for(E=Math.max(A.length,S.length);E--;)T[E]=F(A[E],S[E])}else T=F(A,S);return T}function X(A){var T,E;let S=A.chart.options.plotOptions;return Y(L(L((T=S==null?void 0:S.series)==null?void 0:T.dataLabels,(E=S==null?void 0:S[A.type])==null?void 0:E.dataLabels),A.options.dataLabels))}function H(A,S,T,E,P){let te=this.chart,_=te.inverted,re=this.xAxis,me=re.reversed,g=((_?S.height:S.width)||0)/2,w=A.pointWidth,C=w?w/2:0;S.startXPos=_?P.x:me?-g-C:re.width-g+C,S.startYPos=_?me?this.yAxis.height-g+C:-g-C:P.y,E?S.visibility==="hidden"&&(S.show(),S.attr({opacity:0}).animate({opacity:1})):S.attr({opacity:1}).animate({opacity:0},void 0,S.hide),te.hasRendered&&(T&&S.attr({x:S.startXPos,y:S.startYPos}),S.placed=!0)}$.compose=function(A){let S=A.prototype;S.initDataLabels||(S.initDataLabels=le,S.initDataLabelsGroup=V,S.alignDataLabel=z,S.drawDataLabels=se,S.justifyDataLabel=K,S.setDataLabelStartPos=H,S.hasDataLabels=Q)}}(x||(x={})),x}),c(o,"Series/Column/ColumnDataLabel.js",[o["Core/Series/DataLabel.js"],o["Core/Globals.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(d,p,y,x){var b;let{composed:k}=p,{series:O}=y,{merge:N,pick:Z,pushUnique:J}=x;return function(D){function F(ae,ee,B,Y,$){let Q=this.chart.inverted,z=ae.series,V=(z.xAxis?z.xAxis.len:this.chart.plotSizeX)||0,le=(z.yAxis?z.yAxis.len:this.chart.plotSizeY)||0,se=ae.dlBox||ae.shapeArgs,K=Z(ae.below,ae.plotY>Z(this.translatedThreshold,le)),L=Z(B.inside,!!this.options.stacking);if(se){if(Y=N(se),!(B.overflow==="allow"&&B.crop===!1)){Y.y<0&&(Y.height+=Y.y,Y.y=0);let X=Y.y+Y.height-le;X>0&&X<Y.height-1&&(Y.height-=X)}Q&&(Y={x:le-Y.y-Y.height,y:V-Y.x-Y.width,width:Y.height,height:Y.width}),L||(Q?(Y.x+=K?0:Y.width,Y.width=0):(Y.y+=K?Y.height:0,Y.height=0))}B.align=Z(B.align,!Q||L?"center":K?"right":"left"),B.verticalAlign=Z(B.verticalAlign,Q||L?"middle":K?"top":"bottom"),O.prototype.alignDataLabel.call(this,ae,ee,B,Y,$),B.inside&&ae.contrastColor&&ee.css({color:ae.contrastColor})}D.compose=function(ae){d.compose(O),J(k,"ColumnDataLabel")&&(ae.prototype.alignDataLabel=F)}}(b||(b={})),b}),c(o,"Series/Bar/BarSeries.js",[o["Series/Column/ColumnSeries.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(d,p,y){let{extend:x,merge:b}=y;class k extends d{}return k.defaultOptions=b(d.defaultOptions,{}),x(k.prototype,{inverted:!0}),p.registerSeriesType("bar",k),k}),c(o,"Series/Scatter/ScatterSeriesDefaults.js",[],function(){return{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">●</span> <span style="font-size: 0.8em"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}}),c(o,"Series/Scatter/ScatterSeries.js",[o["Series/Scatter/ScatterSeriesDefaults.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(d,p,y){let{column:x,line:b}=p.seriesTypes,{addEvent:k,extend:O,merge:N}=y;class Z extends b{applyJitter(){let D=this,F=this.options.jitter,ae=this.points.length;F&&this.points.forEach(function(ee,B){["x","y"].forEach(function(Y,$){if(F[Y]&&!ee.isNull){let Q=`plot${Y.toUpperCase()}`,z=D[`${Y}Axis`],V=F[Y]*z.transA;if(z&&!z.logarithmic){let le=Math.max(0,(ee[Q]||0)-V),se=Math.min(z.len,(ee[Q]||0)+V);ee[Q]=le+(se-le)*function(K){let L=1e4*Math.sin(K);return L-Math.floor(L)}(B+$*ae),Y==="x"&&(ee.clientX=ee.plotX)}}})})}drawGraph(){this.options.lineWidth?super.drawGraph():this.graph&&(this.graph=this.graph.destroy())}}return Z.defaultOptions=N(b.defaultOptions,d),O(Z.prototype,{drawTracker:x.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"]}),k(Z,"afterTranslate",function(){this.applyJitter()}),p.registerSeriesType("scatter",Z),Z}),c(o,"Series/CenteredUtilities.js",[o["Core/Globals.js"],o["Core/Series/Series.js"],o["Core/Utilities.js"]],function(d,p,y){var x,b;let{deg2rad:k}=d,{fireEvent:O,isNumber:N,pick:Z,relativeLength:J}=y;return(b=x||(x={})).getCenter=function(){let D=this.options,F=this.chart,ae=2*(D.slicedOffset||0),ee=F.plotWidth-2*ae,B=F.plotHeight-2*ae,Y=D.center,$=Math.min(ee,B),Q=D.thickness,z,V=D.size,le=D.innerSize||0,se,K;typeof V=="string"&&(V=parseFloat(V)),typeof le=="string"&&(le=parseFloat(le));let L=[Z(Y[0],"50%"),Z(Y[1],"50%"),Z(V&&V<0?void 0:D.size,"100%"),Z(le&&le<0?void 0:D.innerSize||0,"0%")];for(!F.angular||this instanceof p||(L[3]=0),se=0;se<4;++se)K=L[se],z=se<2||se===2&&/%$/.test(K),L[se]=J(K,[ee,B,$,L[2]][se])+(z?ae:0);return L[3]>L[2]&&(L[3]=L[2]),N(Q)&&2*Q<L[2]&&Q>0&&(L[3]=L[2]-2*Q),O(this,"afterGetCenter",{positions:L}),L},b.getStartAndEndRadians=function(D,F){let ae=N(D)?D:0,ee=N(F)&&F>ae&&F-ae<360?F:ae+360;return{start:k*(ae+-90),end:k*(ee+-90)}},x}),c(o,"Series/Pie/PiePoint.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Series/Point.js"],o["Core/Utilities.js"]],function(d,p,y){let{setAnimation:x}=d,{addEvent:b,defined:k,extend:O,isNumber:N,pick:Z,relativeLength:J}=y;class D extends p{getConnectorPath(ae){let ee=ae.dataLabelPosition,B=ae.options||{},Y=B.connectorShape,$=this.connectorShapes[Y]||Y;return ee&&$.call(this,{...ee.computed,alignment:ee.alignment},ee.connectorPosition,B)||[]}getTranslate(){return this.sliced&&this.slicedTranslation||{translateX:0,translateY:0}}haloPath(ae){let ee=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(ee.x,ee.y,ee.r+ae,ee.r+ae,{innerR:ee.r-1,start:ee.start,end:ee.end,borderRadius:ee.borderRadius})}constructor(ae,ee,B){super(ae,ee,B),this.half=0,this.name??(this.name="Slice");let Y=$=>{this.slice($.type==="select")};b(this,"select",Y),b(this,"unselect",Y)}isValid(){return N(this.y)&&this.y>=0}setVisible(ae,ee=!0){ae!==this.visible&&this.update({visible:ae??!this.visible},ee,void 0,!1)}slice(ae,ee,B){let Y=this.series;x(B,Y.chart),ee=Z(ee,!0),this.sliced=this.options.sliced=ae=k(ae)?ae:!this.sliced,Y.options.data[Y.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate())}}return O(D.prototype,{connectorShapes:{fixedOffset:function(F,ae,ee){let B=ae.breakAt,Y=ae.touchingSliceAt,$=ee.softConnector?["C",F.x+(F.alignment==="left"?-5:5),F.y,2*B.x-Y.x,2*B.y-Y.y,B.x,B.y]:["L",B.x,B.y];return[["M",F.x,F.y],$,["L",Y.x,Y.y]]},straight:function(F,ae){let ee=ae.touchingSliceAt;return[["M",F.x,F.y],["L",ee.x,ee.y]]},crookedLine:function(F,ae,ee){let{breakAt:B,touchingSliceAt:Y}=ae,{series:$}=this,[Q,z,V]=$.center,le=V/2,{plotLeft:se,plotWidth:K}=$.chart,L=F.alignment==="left",{x:X,y:H}=F,A=B.x;if(ee.crookDistance){let T=J(ee.crookDistance,1);A=L?Q+le+(K+se-Q-le)*(1-T):se+(Q-le)*T}else A=Q+(z-H)*Math.tan((this.angle||0)-Math.PI/2);let S=[["M",X,H]];return(L?A<=X&&A>=B.x:A>=X&&A<=B.x)&&S.push(["L",A,H]),S.push(["L",B.x,B.y],["L",Y.x,Y.y]),S}}}),D}),c(o,"Series/Pie/PieSeriesDefaults.js",[],function(){return{borderRadius:3,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{connectorPadding:5,connectorShape:"crookedLine",crookDistance:void 0,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}}),c(o,"Series/Pie/PieSeries.js",[o["Series/CenteredUtilities.js"],o["Series/Column/ColumnSeries.js"],o["Core/Globals.js"],o["Series/Pie/PiePoint.js"],o["Series/Pie/PieSeriesDefaults.js"],o["Core/Series/Series.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Renderer/SVG/Symbols.js"],o["Core/Utilities.js"]],function(d,p,y,x,b,k,O,N,Z){let{getStartAndEndRadians:J}=d,{noop:D}=y,{clamp:F,extend:ae,fireEvent:ee,merge:B,pick:Y}=Z;class $ extends k{animate(z){let V=this,le=V.points,se=V.startAngleRad;z||le.forEach(function(K){let L=K.graphic,X=K.shapeArgs;L&&X&&(L.attr({r:Y(K.startR,V.center&&V.center[3]/2),start:se,end:se}),L.animate({r:X.r,start:X.start,end:X.end},V.options.animation))})}drawEmpty(){let z,V,le=this.startAngleRad,se=this.endAngleRad,K=this.options;this.total===0&&this.center?(z=this.center[0],V=this.center[1],this.graph||(this.graph=this.chart.renderer.arc(z,V,this.center[1]/2,0,le,se).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:N.arc(z,V,this.center[2]/2,0,{start:le,end:se,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":K.borderWidth,fill:K.fillColor||"none",stroke:K.color||"#cccccc"})):this.graph&&(this.graph=this.graph.destroy())}drawPoints(){let z=this.chart.renderer;this.points.forEach(function(V){V.graphic&&V.hasNewShapeType()&&(V.graphic=V.graphic.destroy()),V.graphic||(V.graphic=z[V.shapeType](V.shapeArgs).add(V.series.group),V.delayedRendering=!0)})}generatePoints(){super.generatePoints(),this.updateTotals()}getX(z,V,le,se){let K=this.center,L=this.radii?this.radii[le.index]||0:K[2]/2,X=se.dataLabelPosition,H=(X==null?void 0:X.distance)||0,A=Math.asin(F((z-K[1])/(L+H),-1,1));return K[0]+Math.cos(A)*(L+H)*(V?-1:1)+(H>0?(V?-1:1)*(se.padding||0):0)}hasData(){return!!this.processedXData.length}redrawPoints(){let z,V,le,se,K=this,L=K.chart;this.drawEmpty(),K.group&&!L.styledMode&&K.group.shadow(K.options.shadow),K.points.forEach(function(X){let H={};V=X.graphic,!X.isNull&&V?(se=X.shapeArgs,z=X.getTranslate(),L.styledMode||(le=K.pointAttribs(X,X.selected&&"select")),X.delayedRendering?(V.setRadialReference(K.center).attr(se).attr(z),L.styledMode||V.attr(le).attr({"stroke-linejoin":"round"}),X.delayedRendering=!1):(V.setRadialReference(K.center),L.styledMode||B(!0,H,le),B(!0,H,se,z),V.animate(H)),V.attr({visibility:X.visible?"inherit":"hidden"}),V.addClass(X.getClassName(),!0)):V&&(X.graphic=V.destroy())})}sortByAngle(z,V){z.sort(function(le,se){return le.angle!==void 0&&(se.angle-le.angle)*V})}translate(z){ee(this,"translate"),this.generatePoints();let V=this.options,le=V.slicedOffset,se=J(V.startAngle,V.endAngle),K=this.startAngleRad=se.start,L=(this.endAngleRad=se.end)-K,X=this.points,H=V.ignoreHiddenPoint,A=X.length,S,T,E,P,te,_,re,me=0;for(z||(this.center=z=this.getCenter()),_=0;_<A;_++){re=X[_],S=K+me*L,re.isValid()&&(!H||re.visible)&&(me+=re.percentage/100),T=K+me*L;let g={x:z[0],y:z[1],r:z[2]/2,innerR:z[3]/2,start:Math.round(1e3*S)/1e3,end:Math.round(1e3*T)/1e3};re.shapeType="arc",re.shapeArgs=g,(E=(T+S)/2)>1.5*Math.PI?E-=2*Math.PI:E<-Math.PI/2&&(E+=2*Math.PI),re.slicedTranslation={translateX:Math.round(Math.cos(E)*le),translateY:Math.round(Math.sin(E)*le)},P=Math.cos(E)*z[2]/2,te=Math.sin(E)*z[2]/2,re.tooltipPos=[z[0]+.7*P,z[1]+.7*te],re.half=E<-Math.PI/2||E>Math.PI/2?1:0,re.angle=E}ee(this,"afterTranslate")}updateTotals(){let z=this.points,V=z.length,le=this.options.ignoreHiddenPoint,se,K,L=0;for(se=0;se<V;se++)(K=z[se]).isValid()&&(!le||K.visible)&&(L+=K.y);for(se=0,this.total=L;se<V;se++)(K=z[se]).percentage=L>0&&(K.visible||!le)?K.y/L*100:0,K.total=L}}return $.defaultOptions=B(k.defaultOptions,b),ae($.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawTracker:p.prototype.drawTracker,getCenter:d.getCenter,getSymbol:D,invertible:!1,isCartesian:!1,noSharedTooltip:!0,pointAttribs:p.prototype.pointAttribs,pointClass:x,requireSorting:!1,searchPoint:D,trackerGroups:["group","dataLabelsGroup"]}),O.registerSeriesType("pie",$),$}),c(o,"Series/Pie/PieDataLabel.js",[o["Core/Series/DataLabel.js"],o["Core/Globals.js"],o["Core/Renderer/RendererUtilities.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(d,p,y,x,b){var k;let{composed:O,noop:N}=p,{distribute:Z}=y,{series:J}=x,{arrayMax:D,clamp:F,defined:ae,pick:ee,pushUnique:B,relativeLength:Y}=b;return function($){let Q={radialDistributionY:function(K,L){var X;return(((X=L.dataLabelPosition)==null?void 0:X.top)||0)+K.distributeBox.pos},radialDistributionX:function(K,L,X,H,A){let S=A.dataLabelPosition;return K.getX(X<((S==null?void 0:S.top)||0)+2||X>((S==null?void 0:S.bottom)||0)-2?H:X,L.half,L,A)},justify:function(K,L,X,H){var A;return H[0]+(K.half?-1:1)*(X+(((A=L.dataLabelPosition)==null?void 0:A.distance)||0))},alignToPlotEdges:function(K,L,X,H){let A=K.getBBox().width;return L?A+H:X-A-H},alignToConnectors:function(K,L,X,H){let A=0,S;return K.forEach(function(T){(S=T.dataLabel.getBBox().width)>A&&(A=S)}),L?A+H:X-A-H}};function z(K,L){let{center:X,options:H}=this,A=X[2]/2,S=K.angle||0,T=Math.cos(S),E=Math.sin(S),P=X[0]+T*A,te=X[1]+E*A,_=Math.min((H.slicedOffset||0)+(H.borderWidth||0),L/5);return{natural:{x:P+T*L,y:te+E*L},computed:{},alignment:L<0?"center":K.half?"right":"left",connectorPosition:{breakAt:{x:P+T*_,y:te+E*_},touchingSliceAt:{x:P,y:te}},distance:L}}function V(){var ce;let K=this,L=K.points,X=K.chart,H=X.plotWidth,A=X.plotHeight,S=X.plotLeft,T=Math.round(X.chartWidth/3),E=K.center,P=E[2]/2,te=E[1],_=[[],[]],re=[0,0,0,0],me=K.dataLabelPositioners,g,w,C,q=0;K.visible&&((ce=K.hasDataLabels)!=null&&ce.call(K))&&(L.forEach(j=>{(j.dataLabels||[]).forEach(U=>{U.shortened&&(U.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),U.shortened=!1)})}),J.prototype.drawDataLabels.apply(K),L.forEach(j=>{(j.dataLabels||[]).forEach((U,ne)=>{var ie;let ge=E[2]/2,R=U.options,G=Y((R==null?void 0:R.distance)||0,ge);ne===0&&_[j.half].push(j),!ae((ie=R==null?void 0:R.style)==null?void 0:ie.width)&&U.getBBox().width>T&&(U.css({width:Math.round(.7*T)+"px"}),U.shortened=!0),U.dataLabelPosition=this.getDataLabelPosition(j,G),q=Math.max(q,G)})}),_.forEach((j,U)=>{let ne=j.length,ge=[],R,G,ie=0,ue;ne&&(K.sortByAngle(j,U-.5),q>0&&(R=Math.max(0,te-P-q),G=Math.min(te+P+q,X.plotHeight),j.forEach(de=>{(de.dataLabels||[]).forEach(ye=>{var Ce;let Se=ye.dataLabelPosition;Se&&Se.distance>0&&(Se.top=Math.max(0,te-P-Se.distance),Se.bottom=Math.min(te+P+Se.distance,X.plotHeight),ie=ye.getBBox().height||21,ye.lineHeight=X.renderer.fontMetrics(ye.text||ye).h+2*ye.padding,de.distributeBox={target:(((Ce=ye.dataLabelPosition)==null?void 0:Ce.natural.y)||0)-Se.top+ye.lineHeight/2,size:ie,rank:de.y},ge.push(de.distributeBox))})}),Z(ge,ue=G+ie-R,ue/5)),j.forEach(de=>{(de.dataLabels||[]).forEach(ye=>{let Se=ye.options||{},Ce=de.distributeBox,Ae=ye.dataLabelPosition,Ne=(Ae==null?void 0:Ae.natural.y)||0,Re=Se.connectorPadding||0,fe=ye.lineHeight||21,pe=(fe-ye.getBBox().height)/2,ve=0,be=Ne,ke="inherit";if(Ae){if(ge&&ae(Ce)&&Ae.distance>0&&(Ce.pos===void 0?ke="hidden":(C=Ce.size,be=me.radialDistributionY(de,ye))),Se.justify)ve=me.justify(de,ye,P,E);else switch(Se.alignTo){case"connectors":ve=me.alignToConnectors(j,U,H,S);break;case"plotEdges":ve=me.alignToPlotEdges(ye,U,H,S);break;default:ve=me.radialDistributionX(K,de,be-pe,Ne,ye)}if(Ae.attribs={visibility:ke,align:Ae.alignment},Ae.posAttribs={x:ve+(Se.x||0)+({left:Re,right:-Re}[Ae.alignment]||0),y:be+(Se.y||0)-fe/2},Ae.computed.x=ve,Ae.computed.y=be-pe,ee(Se.crop,!0)){let Ee;ve-(w=ye.getBBox().width)<Re&&U===1?(Ee=Math.round(w-ve+Re),re[3]=Math.max(Ee,re[3])):ve+w>H-Re&&U===0&&(Ee=Math.round(ve+w-H+Re),re[1]=Math.max(Ee,re[1])),be-C/2<0?re[0]=Math.max(Math.round(-be+C/2),re[0]):be+C/2>A&&(re[2]=Math.max(Math.round(be+C/2-A),re[2])),Ae.sideOverflow=Ee}}})}))}),(D(re)===0||this.verifyDataLabelOverflow(re))&&(this.placeDataLabels(),this.points.forEach(j=>{(j.dataLabels||[]).forEach(U=>{var G;let{connectorColor:ne,connectorWidth:ge=1}=U.options||{},R=U.dataLabelPosition;if(ge){let ie;g=U.connector,R&&R.distance>0?(ie=!g,g||(U.connector=g=X.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+j.colorIndex+(j.className?" "+j.className:"")).add(K.dataLabelsGroup)),X.styledMode||g.attr({"stroke-width":ge,stroke:ne||j.color||"#666666"}),g[ie?"attr":"animate"]({d:j.getConnectorPath(U)}),g.attr({visibility:(G=R.attribs)==null?void 0:G.visibility})):g&&(U.connector=g.destroy())}})})))}function le(){this.points.forEach(K=>{(K.dataLabels||[]).forEach(L=>{var H;let X=L.dataLabelPosition;X?(X.sideOverflow&&(L.css({width:Math.max(L.getBBox().width-X.sideOverflow,0)+"px",textOverflow:(((H=L.options)==null?void 0:H.style)||{}).textOverflow||"ellipsis"}),L.shortened=!0),L.attr(X.attribs),L[L.moved?"animate":"attr"](X.posAttribs),L.moved=!0):L&&L.attr({y:-9999})}),delete K.distributeBox},this)}function se(K){let L=this.center,X=this.options,H=X.center,A=X.minSize||80,S=A,T=X.size!==null;return!T&&(H[0]!==null?S=Math.max(L[2]-Math.max(K[1],K[3]),A):(S=Math.max(L[2]-K[1]-K[3],A),L[0]+=(K[3]-K[1])/2),H[1]!==null?S=F(S,A,L[2]-Math.max(K[0],K[2])):(S=F(S,A,L[2]-K[0]-K[2]),L[1]+=(K[0]-K[2])/2),S<L[2]?(L[2]=S,L[3]=Math.min(X.thickness?Math.max(0,S-2*X.thickness):Math.max(0,Y(X.innerSize||0,S)),S),this.translate(L),this.drawDataLabels&&this.drawDataLabels()):T=!0),T}$.compose=function(K){if(d.compose(J),B(O,"PieDataLabel")){let L=K.prototype;L.dataLabelPositioners=Q,L.alignDataLabel=N,L.drawDataLabels=V,L.getDataLabelPosition=z,L.placeDataLabels=le,L.verifyDataLabelOverflow=se}}}(k||(k={})),k}),c(o,"Core/Geometry/GeometryUtilities.js",[],function(){var d,p;return(p=d||(d={})).getCenterOfPoints=function(y){let x=y.reduce((b,k)=>(b.x+=k.x,b.y+=k.y,b),{x:0,y:0});return{x:x.x/y.length,y:x.y/y.length}},p.getDistanceBetweenPoints=function(y,x){return Math.sqrt(Math.pow(x.x-y.x,2)+Math.pow(x.y-y.y,2))},p.getAngleBetweenPoints=function(y,x){return Math.atan2(x.x-y.x,x.y-y.y)},p.pointInPolygon=function({x:y,y:x},b){let k=b.length,O,N,Z=!1;for(O=0,N=k-1;O<k;N=O++){let[J,D]=b[O],[F,ae]=b[N];D>x!=ae>x&&y<(F-J)*(x-D)/(ae-D)+J&&(Z=!Z)}return Z},d}),c(o,"Extensions/OverlappingDataLabels.js",[o["Core/Geometry/GeometryUtilities.js"],o["Core/Utilities.js"]],function(d,p){let{pointInPolygon:y}=d,{addEvent:x,fireEvent:b,objectEach:k,pick:O}=p;function N(D){let F=D.length,ae=(le,se)=>!(se.x>=le.x+le.width||se.x+se.width<=le.x||se.y>=le.y+le.height||se.y+se.height<=le.y),ee=(le,se)=>{for(let K of le)if(y({x:K[0],y:K[1]},se))return!0;return!1},B,Y,$,Q,z,V=!1;for(let le=0;le<F;le++)(B=D[le])&&(B.oldOpacity=B.opacity,B.newOpacity=1,B.absoluteBox=function(se){var K,L;if(se&&(!se.alignAttr||se.placed)){let X=se.box?0:se.padding||0,H=se.alignAttr||{x:se.attr("x"),y:se.attr("y")},A=se.getBBox();return se.width=A.width,se.height=A.height,{x:H.x+(((K=se.parentGroup)==null?void 0:K.translateX)||0)+X,y:H.y+(((L=se.parentGroup)==null?void 0:L.translateY)||0)+X,width:(se.width||0)-2*X,height:(se.height||0)-2*X,polygon:A==null?void 0:A.polygon}}}(B));D.sort((le,se)=>(se.labelrank||0)-(le.labelrank||0));for(let le=0;le<F;++le){Q=(Y=D[le])&&Y.absoluteBox;let se=Q==null?void 0:Q.polygon;for(let K=le+1;K<F;++K){z=($=D[K])&&$.absoluteBox;let L=!1;if(Q&&z&&Y!==$&&Y.newOpacity!==0&&$.newOpacity!==0&&Y.visibility!=="hidden"&&$.visibility!=="hidden"){let X=z.polygon;if(se&&X&&se!==X?ee(se,X)&&(L=!0):ae(Q,z)&&(L=!0),L){let H=Y.labelrank<$.labelrank?Y:$,A=H.text;H.newOpacity=0,A!=null&&A.element.querySelector("textPath")&&A.hide()}}}}for(let le of D)Z(le,this)&&(V=!0);V&&b(this,"afterHideAllOverlappingLabels")}function Z(D,F){let ae,ee,B=!1;return D&&(ee=D.newOpacity,D.oldOpacity!==ee&&(D.hasClass("highcharts-data-label")?(D[ee?"removeClass":"addClass"]("highcharts-data-label-hidden"),ae=function(){F.styledMode||D.css({pointerEvents:ee?"auto":"none"})},B=!0,D[D.isOld?"animate":"attr"]({opacity:ee},void 0,ae),b(F,"afterHideOverlappingLabel")):D.attr({opacity:ee})),D.isOld=!0),B}function J(){var ae;let D=this,F=[];for(let ee of D.labelCollectors||[])F=F.concat(ee());for(let ee of D.yAxis||[])ee.stacking&&ee.options.stackLabels&&!ee.options.stackLabels.allowOverlap&&k(ee.stacking.stacks,B=>{k(B,Y=>{Y.label&&F.push(Y.label)})});for(let ee of D.series||[])if(ee.visible&&((ae=ee.hasDataLabels)!=null&&ae.call(ee))){let B=Y=>{for(let $ of Y)$.visible&&($.dataLabels||[]).forEach(Q=>{var V;let z=Q.options||{};Q.labelrank=O(z.labelrank,$.labelrank,(V=$.shapeArgs)==null?void 0:V.height),z.allowOverlap??Number(z.distance)>0?(Q.oldOpacity=Q.opacity,Q.newOpacity=1,Z(Q,D)):F.push(Q)})};B(ee.nodes||[]),B(ee.points)}this.hideOverlappingLabels(F)}return{compose:function(D){let F=D.prototype;F.hideOverlappingLabels||(F.hideOverlappingLabels=N,x(D,"render",J))}}}),c(o,"Extensions/BorderRadius.js",[o["Core/Defaults.js"],o["Core/Globals.js"],o["Core/Utilities.js"]],function(d,p,y){let{defaultOptions:x}=d,{noop:b}=p,{addEvent:k,extend:O,isObject:N,merge:Z,relativeLength:J}=y,D={radius:0,scope:"stack",where:void 0},F=b,ae=b;function ee(z,V,le,se,K={}){let L=F(z,V,le,se,K),{innerR:X=0,r:H=le,start:A=0,end:S=0}=K;if(K.open||!K.borderRadius)return L;let T=S-A,E=Math.sin(T/2),P=Math.max(Math.min(J(K.borderRadius||0,H-X),(H-X)/2,H*E/(1+E)),0),te=Math.min(P,T/Math.PI*2*X),_=L.length-1;for(;_--;)(function(re,me,g){let w,C,q,ce=re[me],j=re[me+1];if(j[0]==="Z"&&(j=re[0]),(ce[0]==="M"||ce[0]==="L")&&j[0]==="A"?(w=ce,C=j,q=!0):ce[0]==="A"&&(j[0]==="M"||j[0]==="L")&&(w=j,C=ce),w&&C&&C.params){let U=C[1],ne=C[5],ge=C.params,{start:R,end:G,cx:ie,cy:ue}=ge,de=ne?U-g:U+g,ye=de?Math.asin(g/de):0,Se=ne?ye:-ye,Ce=Math.cos(ye)*de;q?(ge.start=R+Se,w[1]=ie+Ce*Math.cos(R),w[2]=ue+Ce*Math.sin(R),re.splice(me+1,0,["A",g,g,0,0,1,ie+U*Math.cos(ge.start),ue+U*Math.sin(ge.start)])):(ge.end=G-Se,C[6]=ie+U*Math.cos(ge.end),C[7]=ue+U*Math.sin(ge.end),re.splice(me+1,0,["A",g,g,0,0,1,ie+Ce*Math.cos(G),ue+Ce*Math.sin(G)])),C[4]=Math.abs(ge.end-ge.start)<Math.PI?0:1}})(L,_,_>1?te:P);return L}function B(){var z,V;if(this.options.borderRadius&&!(this.chart.is3d&&this.chart.is3d())){let{options:le,yAxis:se}=this,K=le.stacking==="percent",L=(V=(z=x.plotOptions)==null?void 0:z[this.type])==null?void 0:V.borderRadius,X=Y(le.borderRadius,N(L)?L:{}),H=se.options.reversed;for(let A of this.points){let{shapeArgs:S}=A;if(A.shapeType==="roundedRect"&&S){let{width:T=0,height:E=0,y:P=0}=S,te=P,_=E;if(X.scope==="stack"&&A.stackTotal){let w=se.translate(K?100:A.stackTotal,!1,!0,!1,!0),C=se.translate(le.threshold||0,!1,!0,!1,!0),q=this.crispCol(0,Math.min(w,C),0,Math.abs(w-C));te=q.y,_=q.height}let re=(A.negative?-1:1)*(H?-1:1)==-1,me=X.where;!me&&this.is("waterfall")&&Math.abs((A.yBottom||0)-(this.translatedThreshold||0))>this.borderWidth&&(me="all"),me||(me="end");let g=Math.min(J(X.radius,T),T/2,me==="all"?E/2:1/0)||0;me==="end"&&(re&&(te-=g),_+=g),O(S,{brBoxHeight:_,brBoxY:te,r:g})}}}}function Y(z,V){return N(z)||(z={radius:z||0}),Z(D,V,z)}function $(){let z=Y(this.options.borderRadius);for(let V of this.points){let le=V.shapeArgs;le&&(le.borderRadius=J(z.radius,(le.r||0)-(le.innerR||0)))}}function Q(z,V,le,se,K={}){let L=ae(z,V,le,se,K),{r:X=0,brBoxHeight:H=se,brBoxY:A=V}=K,S=V-A,T=A+H-(V+se),E=S-X>-.1?0:X,P=T-X>-.1?0:X,te=Math.max(E&&S,0),_=Math.max(P&&T,0),re=[z+E,V],me=[z+le-E,V],g=[z+le,V+E],w=[z+le,V+se-P],C=[z+le-P,V+se],q=[z+P,V+se],ce=[z,V+se-P],j=[z,V+E],U=(ne,ge)=>Math.sqrt(Math.pow(ne,2)-Math.pow(ge,2));if(te){let ne=U(E,E-te);re[0]-=ne,me[0]+=ne,g[1]=j[1]=V+E-te}if(se<E-te){let ne=U(E,E-te-se);g[0]=w[0]=z+le-E+ne,C[0]=Math.min(g[0],C[0]),q[0]=Math.max(w[0],q[0]),ce[0]=j[0]=z+E-ne,g[1]=j[1]=V+se}if(_){let ne=U(P,P-_);C[0]+=ne,q[0]-=ne,w[1]=ce[1]=V+se-P+_}if(se<P-_){let ne=U(P,P-_-se);g[0]=w[0]=z+le-P+ne,me[0]=Math.min(g[0],me[0]),re[0]=Math.max(w[0],re[0]),ce[0]=j[0]=z+P-ne,w[1]=ce[1]=V}return L.length=0,L.push(["M",...re],["L",...me],["A",E,E,0,0,1,...g],["L",...w],["A",P,P,0,0,1,...C],["L",...q],["A",P,P,0,0,1,...ce],["L",...j],["A",E,E,0,0,1,...re],["Z"]),L}return{compose:function(z,V,le){let se=z.types.pie;if(!V.symbolCustomAttribs.includes("borderRadius")){let K=le.prototype.symbols;k(z,"afterColumnTranslate",B,{order:9}),k(se,"afterTranslate",$),V.symbolCustomAttribs.push("borderRadius","brBoxHeight","brBoxY"),F=K.arc,ae=K.roundedRect,K.arc=ee,K.roundedRect=Q}},optionsToObject:Y}}),c(o,"Core/Responsive.js",[o["Core/Utilities.js"]],function(d){var p;let{diffObjects:y,extend:x,find:b,merge:k,pick:O,uniqueKey:N}=d;return function(Z){function J(F,ae){let ee=F.condition;(ee.callback||function(){return this.chartWidth<=O(ee.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=O(ee.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=O(ee.minWidth,0)&&this.chartHeight>=O(ee.minHeight,0)}).call(this)&&ae.push(F._id)}function D(F,ae){let ee=this.options.responsive,B=this.currentResponsive,Y=[],$;!ae&&ee&&ee.rules&&ee.rules.forEach(V=>{V._id===void 0&&(V._id=N()),this.matchResponsiveRule(V,Y)},this);let Q=k(...Y.map(V=>b((ee||{}).rules||[],le=>le._id===V)).map(V=>V&&V.chartOptions));Q.isResponsiveOptions=!0,Y=Y.toString()||void 0;let z=B&&B.ruleIds;Y===z||(B&&(this.currentResponsive=void 0,this.updatingResponsive=!0,this.update(B.undoOptions,F,!0),this.updatingResponsive=!1),Y?(($=y(Q,this.options,!0,this.collectionsWithUpdate)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:Y,mergedOptions:Q,undoOptions:$},this.updatingResponsive||this.update(Q,F,!0)):this.currentResponsive=void 0)}Z.compose=function(F){let ae=F.prototype;return ae.matchResponsiveRule||x(ae,{matchResponsiveRule:J,setResponsive:D}),F}}(p||(p={})),p}),c(o,"masters/highcharts.src.js",[o["Core/Globals.js"],o["Core/Utilities.js"],o["Core/Defaults.js"],o["Core/Animation/Fx.js"],o["Core/Animation/AnimationUtilities.js"],o["Core/Renderer/HTML/AST.js"],o["Core/Templating.js"],o["Core/Renderer/RendererRegistry.js"],o["Core/Renderer/RendererUtilities.js"],o["Core/Renderer/SVG/SVGElement.js"],o["Core/Renderer/SVG/SVGRenderer.js"],o["Core/Renderer/HTML/HTMLElement.js"],o["Core/Axis/Axis.js"],o["Core/Axis/DateTimeAxis.js"],o["Core/Axis/LogarithmicAxis.js"],o["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],o["Core/Axis/Tick.js"],o["Core/Tooltip.js"],o["Core/Series/Point.js"],o["Core/Pointer.js"],o["Core/Legend/Legend.js"],o["Core/Legend/LegendSymbol.js"],o["Core/Chart/Chart.js"],o["Extensions/ScrollablePlotArea.js"],o["Core/Axis/Stacking/StackingAxis.js"],o["Core/Axis/Stacking/StackItem.js"],o["Core/Series/Series.js"],o["Core/Series/SeriesRegistry.js"],o["Series/Column/ColumnDataLabel.js"],o["Series/Pie/PieDataLabel.js"],o["Core/Series/DataLabel.js"],o["Extensions/OverlappingDataLabels.js"],o["Extensions/BorderRadius.js"],o["Core/Responsive.js"],o["Core/Color/Color.js"],o["Core/Time.js"]],function(d,p,y,x,b,k,O,N,Z,J,D,F,ae,ee,B,Y,$,Q,z,V,le,se,K,L,X,H,A,S,T,E,P,te,_,re,me,g){return d.AST=k,d.Axis=ae,d.Chart=K,d.Color=me,d.DataLabel=P,d.Fx=x,d.HTMLElement=F,d.Legend=le,d.LegendSymbol=se,d.OverlappingDataLabels=d.OverlappingDataLabels||te,d.PlotLineOrBand=Y,d.Point=z,d.Pointer=V,d.RendererRegistry=N,d.Series=A,d.SeriesRegistry=S,d.StackItem=H,d.SVGElement=J,d.SVGRenderer=D,d.Templating=O,d.Tick=$,d.Time=g,d.Tooltip=Q,d.animate=b.animate,d.animObject=b.animObject,d.chart=K.chart,d.color=me.parse,d.dateFormat=O.dateFormat,d.defaultOptions=y.defaultOptions,d.distribute=Z.distribute,d.format=O.format,d.getDeferredAnimation=b.getDeferredAnimation,d.getOptions=y.getOptions,d.numberFormat=O.numberFormat,d.seriesType=S.seriesType,d.setAnimation=b.setAnimation,d.setOptions=y.setOptions,d.stop=b.stop,d.time=y.defaultTime,d.timers=x.timers,_.compose(d.Series,d.SVGElement,d.SVGRenderer),T.compose(d.Series.types.column),P.compose(d.Series),ee.compose(d.Axis),F.compose(d.SVGRenderer),le.compose(d.Chart),B.compose(d.Axis),te.compose(d.Chart),E.compose(d.Series.types.pie),Y.compose(d.Chart,d.Axis),V.compose(d.Chart),re.compose(d.Chart),L.compose(d.Axis,d.Chart,d.Series),X.compose(d.Axis,d.Chart,d.Series),Q.compose(d.Pointer),p.extend(d,p),d}),o["masters/highcharts.src.js"]._modules=o,o["masters/highcharts.src.js"]})}(ty)),ty.exports}var _T=ET();const ny=Ng(_T);var iy={exports:{}},OT=iy.exports,S3;function DT(){return S3||(S3=1,function(r,i){(function(o,c){r.exports=c(Pe)})(typeof self<"u"?self:OT,function(o){return function(c){function d(y){if(p[y])return p[y].exports;var x=p[y]={i:y,l:!1,exports:{}};return c[y].call(x.exports,x,x.exports,d),x.l=!0,x.exports}var p={};return d.m=c,d.c=p,d.d=function(y,x,b){d.o(y,x)||Object.defineProperty(y,x,{configurable:!1,enumerable:!0,get:b})},d.n=function(y){var x=y&&y.__esModule?function(){return y.default}:function(){return y};return d.d(x,"a",x),x},d.o=function(y,x){return Object.prototype.hasOwnProperty.call(y,x)},d.p="",d(d.s=0)}([function(c,d,p){function y(){return y=Object.assign?Object.assign.bind():function(B){for(var Y=1;Y<arguments.length;Y++){var $=arguments[Y];for(var Q in $)Object.prototype.hasOwnProperty.call($,Q)&&(B[Q]=$[Q])}return B},y.apply(this,arguments)}function x(B){return N(B)||O(B)||k(B)||b()}function b(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
79
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k(B,Y){if(B){if(typeof B=="string")return Z(B,Y);var $=Object.prototype.toString.call(B).slice(8,-1);return $==="Object"&&B.constructor&&($=B.constructor.name),$==="Map"||$==="Set"?Array.from(B):$==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($)?Z(B,Y):void 0}}function O(B){if(typeof Symbol<"u"&&B[Symbol.iterator]!=null||B["@@iterator"]!=null)return Array.from(B)}function N(B){if(Array.isArray(B))return Z(B)}function Z(B,Y){(Y==null||Y>B.length)&&(Y=B.length);for(var $=0,Q=new Array(Y);$<Y;$++)Q[$]=B[$];return Q}function J(B){"@babel/helpers - typeof";return(J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y})(B)}Object.defineProperty(d,"__esModule",{value:!0}),p.d(d,"HighchartsReact",function(){return ee});var D=p(1),F=p.n(D),ae=typeof window<"u"?D.useLayoutEffect:D.useEffect,ee=Object(D.memo)(Object(D.forwardRef)(function(B,Y){var $=Object(D.useRef)(),Q=Object(D.useRef)(),z=Object(D.useRef)(B.constructorType),V=Object(D.useRef)(B.highcharts);return ae(function(){function le(){var K=B.highcharts||(typeof window>"u"?"undefined":J(window))==="object"&&window.Highcharts,L=B.constructorType||"chart";K?K[L]?B.options?Q.current=K[L]($.current,B.options,B.callback):console.warn('The "options" property was not passed.'):console.warn('The "constructorType" property is incorrect or some required module is not imported.'):console.warn('The "highcharts" property was not passed.')}if(Q.current){if(B.allowChartUpdate!==!1)if(B.constructorType!==z.current||B.highcharts!==V.current)z.current=B.constructorType,V.current=B.highcharts,le();else if(!B.immutable&&Q.current){var se;(se=Q.current).update.apply(se,[B.options].concat(x(B.updateArgs||[!0,!0])))}else le()}else le()},[B.options,B.allowChartUpdate,B.updateArgs,B.containerProps,B.highcharts,B.constructorType]),ae(function(){return function(){Q.current&&(Q.current.destroy(),Q.current=null)}},[]),Object(D.useImperativeHandle)(Y,function(){return{get chart(){return Q.current},container:$}},[]),F.a.createElement("div",y({},B.containerProps,{ref:$}))}));d.default=ee},function(c,d){c.exports=o}])})}(iy)),iy.exports}var jT=DT();const LT=Ng(jT);ny.setOptions({credits:{enabled:!1},colors:["#7856FF","#FEBBB2","#72BEF4","#1E90FF","#E377C2","#7FE1D8","#CB80DC","#5CB7AF","#1F77B4","#9467BD","#0F7EA0","#17BECF","#7F7F7F","#BCBD22","#A0872C","#006400","#B3596E","#4B0082","#4B6D8C"]});const RT=({text:r,maxLength:i=30,className:o="w-full"})=>r.length>i?W.jsxs("div",{className:`whitespace-pre text-ellipsis overflow-hidden ${o}`,title:r,children:[r.slice(0,i),"..."]}):W.jsx("div",{className:`whitespace-pre ${o}`,children:r}),NT=({item:r,isSelected:i,isHovered:o=!1,onClick:c,onMouseEnter:d,onMouseLeave:p,showValue:y=!1,maxWidth:x=200})=>{const b=i?"opacity-100":"opacity-60",k=o?"bg-gray-100":"";return W.jsxs("div",{className:`flex items-center gap-2 cursor-pointer select-none transition-all duration-200 ${b} ${k} font-medium p-1 rounded`,onClick:()=>c(r),onMouseEnter:()=>d(r),onMouseLeave:p,style:{maxWidth:`${x}px`},children:[W.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:r.color}}),W.jsx(RT,{text:r.name,maxLength:x/8,className:"flex-1"}),y&&r.overallValue&&W.jsxs(W.Fragment,{children:[W.jsx("div",{className:"w-px h-2.5 bg-gray-300"}),W.jsx("div",{className:"text-xs font-medium text-gray-600",children:r.overallValue})]})]})},ay=({legendData:r,selectedRows:i,hoveredItem:o,onItemClick:c,onItemHover:d,legendType:p,position:y,maxItems:x=10,responsive:b=!0})=>{const[k,O]=Pe.useState(!1),N=b&&window.innerWidth<=768,Z=k?r:r.slice(0,x),J=r.length>x,D=Pe.useCallback(Y=>{c(Y)},[c]),F=Pe.useCallback(Y=>{d(Y)},[d]),B=`flex ${y==="top"||y==="bottom"?"flex-row flex-wrap":"flex-col"} gap-4 p-4`;return p==="Table"?W.jsx("div",{className:B,children:W.jsxs("div",{className:"w-full",children:[W.jsxs("table",{className:"w-full text-sm",children:[W.jsx("thead",{children:W.jsxs("tr",{className:"border-b",children:[W.jsx("th",{className:"text-left p-2",children:"Series"}),W.jsx("th",{className:"text-right p-2",children:"Value"})]})}),W.jsx("tbody",{children:Z.map(Y=>W.jsxs("tr",{className:`cursor-pointer hover:bg-gray-50 ${i.includes(Y.name)?"bg-blue-50":""} ${(o==null?void 0:o.name)===Y.name?"bg-gray-100":""}`,onClick:()=>D(Y),onMouseEnter:()=>F(Y),onMouseLeave:()=>F(null),children:[W.jsx("td",{className:"p-2",children:W.jsxs("div",{className:"flex items-center gap-2",children:[W.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:Y.color}}),W.jsx("span",{children:Y.name})]})}),W.jsx("td",{className:"p-2 text-right",children:Y.overallValue||Y.value||"-"})]},Y.name))})]}),J&&W.jsx("button",{className:"mt-2 text-blue-600 hover:text-blue-800 text-sm",onClick:()=>O(!k),children:k?"Show less":`+${r.length-x} more`})]})}):W.jsxs("div",{className:B,children:[Z.map(Y=>W.jsx(NT,{item:Y,isSelected:i.length===0||i.includes(Y.name),isHovered:(o==null?void 0:o.name)===Y.name,onClick:D,onMouseEnter:F,onMouseLeave:()=>F(null),showValue:!0,maxWidth:N?150:200},Y.name)),J&&W.jsx("button",{className:"text-blue-600 hover:text-blue-800 text-sm px-2 py-1 rounded",onClick:()=>O(!k),children:k?"Show less":`+${r.length-x} more`})]})},w3=(r,i)=>{const o=new Set;return r.forEach(c=>{const d=String(c[i]||"");d&&o.add(d)}),Array.from(o)},zT=r=>{switch(r){case"TOP_3":return 3;case"TOP_5":return 5;case"TOP_10":return 10;case"TOP_15":return 15;case"TOP_20":return 20;default:return 5}},BT=(r,i,o,c)=>{const d=w3(r,i),p=zT(c),x=d.map(b=>{const O=r.filter(N=>String(N[i])===b).reduce((N,Z)=>N+Number(Z[o]||0),0);return{groupbyValue:b,total:O}}).sort((b,k)=>k.total-b.total).slice(0,p).map(b=>b.groupbyValue);return r.filter(b=>x.includes(String(b[i])))},UT=r=>r.replace("T"," ").replace("Z",""),HT=(r,i,o,c,d)=>{const p=w3(r,o),y=ny.getOptions().colors||[];return p.map((x,b)=>{const N=r.filter(D=>String(D[o])===x).sort((D,F)=>{const ae=new Date(String(D[i])).getTime(),ee=new Date(String(F[i])).getTime();return ae-ee}).map(D=>{const F=new Date(String(D[i])).getTime(),ae=Number(D[c]||0);return[F,ae]}),Z=d?d(x):x,J=y[b%y.length];return{type:"line",name:Z,data:N,color:J,marker:{enabled:!1}}})},PT=r=>r.split(" ").map(i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase()).join(" "),VT=r=>r.split("_").map(i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase()).join(" "),$T=({options:r,showLegend:i=!1,legendType:o="Points",legendPosition:c="bottom",legendData:d=[],selectedRows:p=[],onLegendItemClick:y,onLegendItemHover:x,className:b="",chartRef:k,responsive:O=!0,maxLegendItems:N=10,rawChartData:Z=[],groupbyConfig:J,selectedMetrics:D,enableGroupby:F=!1,dimensionLabelMapper:ae})=>{const[ee,B]=Pe.useState([]),[Y,$]=Pe.useState(null),Q=Pe.useRef(null),z=k||Q,V=Pe.useMemo(()=>{if(!F||!Z.length||!J)return r;const{groupbyKey:S,timeColumn:T,metricColumn:E,cardinality:P="TOP_5",showCardinality:te=!0}=J;let _=Z;te&&(_=BT(Z,S,E,P)),_=_.map(w=>({...w,[T]:UT(String(w[T]))}));const re=HT(_,T,S,E,ae),me=(D==null?void 0:D.metric_label)||VT(E);return{...r,title:{text:me,style:{fontSize:"16px",fontWeight:"bold",padding:"12px"}},xAxis:{...r.xAxis,type:"datetime",labels:{rotation:0,style:{textOverflow:"none",color:"#9aa0a6",fontSize:"10px"}},lineColor:"#9aa0a6",gridLineWidth:re.length>1?1:0,gridLineColor:"#9aa0a6",gridLineDashStyle:"Solid"},yAxis:{...r.yAxis,title:{text:(D==null?void 0:D.metric_label)||""},labels:{...typeof r.yAxis=="object"&&"labels"in r.yAxis?r.yAxis.labels:{},style:{fontSize:"10px",color:"#9aa0a6",...typeof r.yAxis=="object"&&"labels"in r.yAxis&&r.yAxis.labels&&typeof r.yAxis.labels=="object"&&"style"in r.yAxis.labels?r.yAxis.labels.style:{}}},gridLineWidth:1,gridLineColor:"#9aa0a6",gridLineDashStyle:"Dash"},series:re,plotOptions:{line:{marker:{enabled:!1}},...r.plotOptions},tooltip:{shared:!1,...r.tooltip},legend:{enabled:i&&o==="Points",align:"left",verticalAlign:c==="top"?"top":"bottom",layout:"horizontal",itemStyle:{fontSize:"12px"},x:0,floating:!1}}},[r,F,Z,J,D,i,o,c,ae]),le=p.length>0?p:ee,se=Pe.useCallback(S=>{var P;const T=le.includes(S.name)?le.filter(te=>te!==S.name):[...le,S.name],E=T.length===d.length?[]:T;if(B(E),(P=z.current)!=null&&P.chart){const te=z.current.chart;te.series.forEach(_=>{E.length===0?_.setVisible(!0,!1):_.setVisible(E.includes(_.name||""),!1)}),te.redraw()}y==null||y(S)},[le,d,z,y]),K=Pe.useCallback(S=>{$(S),x==null||x(S)},[x]),L=Pe.useMemo(()=>{var te,_;const S=V,T=typeof S.xAxis=="object"&&"labels"in S.xAxis?S.xAxis.labels:{},E=T&&typeof T=="object"&&"step"in T?T.step:1,P={...S,xAxis:{...S.xAxis,labels:{...T,rotation:0,step:E,style:{textOverflow:"none",color:"#9aa0a6",fontSize:"10px"}},lineColor:"#9aa0a6",gridLineWidth:S.series&&S.series.length>1?1:0,gridLineColor:"#9aa0a6",gridLineDashStyle:"Solid"},legend:{enabled:i&&o==="Points",align:"left",verticalAlign:c==="top"?"top":"bottom",layout:"horizontal",itemStyle:{fontSize:"12px"},x:0,floating:!1,...S.legend},yAxis:{...S.yAxis,gridLineWidth:1,gridLineColor:"#9aa0a6",gridLineDashStyle:"Dash",labels:{...typeof S.yAxis=="object"&&"labels"in S.yAxis?S.yAxis.labels:{},style:{fontSize:"10px",color:"#9aa0a6",...typeof S.yAxis=="object"&&"labels"in S.yAxis&&S.yAxis.labels&&typeof S.yAxis.labels=="object"&&"style"in S.yAxis.labels?S.yAxis.labels.style:{}}}},tooltip:{...S.tooltip,shared:!1}};return(te=S.title)!=null&&te.text?{...P,title:{...S.title,text:PT(S.title.text),style:{...(_=S.title)==null?void 0:_.style,padding:"12px"}}}:P},[V,i,o,c]),X=Pe.useMemo(()=>{if(d.length>0)return d;const S=L;return S.series?S.series.map((T,E)=>{const P=T,te=P.color,_=ny.getOptions().colors||[],re=typeof te=="string"?te:_[E%_.length];return{name:P.name||`Series ${E+1}`,color:re,visible:P.visible!==!1,data:P.data||[],value:Array.isArray(P.data)&&P.data.length>0?P.data[P.data.length-1]:void 0}}):[]},[d,L]),H=c==="left"||c==="right",A=`highchart-wrapper ${b} ${H?"flex flex-row":"flex flex-col"}`;return W.jsxs("div",{className:A,children:[i&&c==="top"&&W.jsx(ay,{legendData:X,selectedRows:le,hoveredItem:Y,onItemClick:se,onItemHover:K,legendType:o,position:c,maxItems:N,responsive:O}),W.jsx("div",{className:`${H?"flex-1":"w-full"} ${i&&c==="left"?"order-2":""}`,children:W.jsx(LT,{highcharts:ny,options:L,ref:z})}),i&&c==="right"&&W.jsx(ay,{legendData:X,selectedRows:le,hoveredItem:Y,onItemClick:se,onItemHover:K,legendType:o,position:c,maxItems:N,responsive:O}),i&&c==="left"&&W.jsx(ay,{legendData:X,selectedRows:le,hoveredItem:Y,onItemClick:se,onItemHover:K,legendType:o,position:c,maxItems:N,responsive:O}),i&&c==="bottom"&&W.jsx(ay,{legendData:X,selectedRows:le,hoveredItem:Y,onItemClick:se,onItemHover:K,legendType:o,position:c,maxItems:N,responsive:O})]})},IT=r=>r?r.replace(/_/g," ").split(" ").map(o=>o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()).join(" "):"Unknown",qT=(r,i)=>{if(i==null||i==="")return"N/A";let o;if(typeof i=="string"){const d=i.replace(/[^0-9.-]/g,"");o=parseFloat(d)}else o=i;if(isNaN(o))return String(i);const c=r.toLowerCase();return c.includes("rate")||c.includes("percentage")||c.includes("percent")?`${o}%`:c.includes("latency")||c.includes("time")||c.includes("duration")?`${o}S`:c.includes("volume")||c.includes("count")||c.includes("amount")||c.includes("total")||c.includes("transaction")||c.includes("order")||c.includes("number")||c.includes("quantity")?o>=1e7?`${(o/1e7).toFixed(1)} Cr`:o>=1e5?`${(o/1e5).toFixed(1)} L`:o>=1e3?`${(o/1e3).toFixed(1)} K`:o%1!==0?o.toFixed(2):o.toLocaleString("en-IN"):String(o)},GT=({metric:r,value:i})=>W.jsxs("div",{className:"genius-dashboard-single-stat-card",children:[W.jsx("div",{className:"genius-dashboard-single-stat-title",children:IT(r)}),W.jsx("div",{className:"genius-dashboard-single-stat-value",children:qT(r,i)})]}),YT=({data:r})=>{const[i,o]=Pe.useState(1),c=5;if(!r||r.length===0)return null;const d=Object.keys(r[0]),p=[],y=[];d.forEach(F=>{var ee;typeof((ee=r.find(B=>B[F]!==null&&B[F]!==void 0))==null?void 0:ee[F])=="string"||F.toLowerCase().includes("name")||F.toLowerCase().includes("id")?p.push(F):y.push(F)});const x=[...p,...y],b=i*c,k=b-c,O=r.slice(k,b),N=Math.ceil(r.length/c),Z=F=>{o(F)},J=()=>{const ae=[],ee=[];let B;ae.push(1);for(let Y=i-2;Y<=i+2;Y++)Y>1&&Y<N&&ae.push(Y);return N>1&&ae.push(N),ae.forEach(Y=>{B!==void 0&&typeof Y=="number"&&(Y-B===2?ee.push(B+1):Y-B!==1&&ee.push("...")),ee.push(Y),B=typeof Y=="number"?Y:B}),ee},D=(F,ae)=>{if(F==null||F==="")return"N/A";const ee=typeof F=="string"?parseFloat(F):F;if(isNaN(ee))return String(F);const B=ae.toLowerCase();if(B.includes("rate")||B.includes("percentage")||B.includes("percent"))return`${ee}%`;if(B.includes("latency")||B.includes("time")||B.includes("duration"))return`${ee}S`;if(B.includes("volume")||B.includes("count")||B.includes("amount")||B.includes("total")){if(ee>=1e7)return`${(ee/1e7).toFixed(1)}Cr`;if(ee>=1e5)return`${(ee/1e5).toFixed(1)}L`;if(ee>=1e3)return`${(ee/1e3).toFixed(1)}K`}return B.includes("price")||B.includes("cost")?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(ee):B.includes("quantity")?new Intl.NumberFormat("en-US").format(ee):typeof F=="number"?new Intl.NumberFormat("en-US").format(F):F.toString()};return W.jsxs("div",{className:"genius-dashboard-table-container","data-loaded-table":"genius-table",children:[W.jsx("div",{className:"genius-dashboard-table-wrapper",children:W.jsxs("table",{className:"genius-dashboard-table",children:[W.jsx("thead",{className:"genius-dashboard-table-head",children:W.jsx("tr",{className:"genius-dashboard-table-head-row",children:x.map(F=>W.jsx("th",{className:"genius-dashboard-table-head-cell text-left",children:W.jsx("div",{className:"genius-dashboard-table-head-content",children:F.replace(/_/g," ")})},F))})}),W.jsx("tbody",{className:"genius-dashboard-table-body",children:O.map((F,ae)=>W.jsx("tr",{className:"genius-dashboard-table-row",children:x.map(ee=>W.jsx("td",{className:"genius-dashboard-table-cell",children:W.jsx("div",{className:"genius-dashboard-table-cell-content",children:D(F[ee],ee)})},ee))},ae))})]})}),r.length>c&&W.jsxs("div",{className:"genius-dashboard-pagination",children:[W.jsxs("span",{className:"genius-dashboard-pagination-info",children:["Showing ",k+1," - ",Math.min(b,r.length)," of ",r.length]}),W.jsxs("div",{className:"genius-dashboard-page-controls",children:[W.jsx("button",{onClick:()=>Z(i-1),disabled:i===1,className:"genius-dashboard-page-button",children:"←"}),J().map((F,ae)=>F==="..."?W.jsx("span",{className:"genius-dashboard-pagination-dots",children:"..."},`dots-${ae}`):W.jsx("button",{onClick:()=>Z(F),className:`genius-dashboard-page-button ${i===F?"active":""}`,children:F},F)),W.jsx("button",{onClick:()=>Z(i+1),disabled:i===N,className:"genius-dashboard-page-button",children:"→"})]})]})]})},C3=({message:r,showIcon:i=!0,onTypingStateChange:o,skipAnimation:c=!1,onRetry:d,isLastMessage:p=!1,onDislike:y,endpoint:x="https://genius.juspay.in/api/v3/analytics/"})=>{const b=Pe.useRef(null),k=Pe.useRef(!1),O=c||r.skipAnimation||!1,[N,Z]=Pe.useState(O),[J,D]=Pe.useState(!1),[F,ae]=Pe.useState(r.hasDisliked||!1);Pe.useEffect(()=>{o&&r.content&&!k.current&&!O&&(k.current=!0,o(!0))},[r.content,O,o]),Pe.useEffect(()=>{ae(r.hasDisliked||!1)},[r.hasDisliked]);const ee=()=>{},B=Pe.useCallback(()=>{o&&o(!1),Z(!0)},[o]),Y=async()=>{const z=localStorage.getItem("login")||"";if(console.log("handleLike called",{feedbackId:r.feedbackId,localToken:z?"present":"missing",hasLiked:J,message:r}),!r.feedbackId||!z||J){console.log("Early return:",{noFeedbackId:!r.feedbackId,noToken:!z,alreadyLiked:J});return}try{const V=x.replace(/\/api\/v3\/analytics\/?$/,""),le=`Basic ${btoa(z+":")}`;console.log("Making feedback API call to:",`${V}/api/v3/analytics/feedback`);const se=await fetch(`${V}/api/v3/analytics/feedback`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:le},body:JSON.stringify({id:r.feedbackId,feedbackEnum:"LIKE",feedbackText:"LIKE"})});console.log("Response status:",se.status),se.ok?(D(!0),ae(!1),console.log("Feedback submitted successfully")):console.error("Failed to submit feedback",se.status,se.statusText)}catch(V){console.error("Error submitting feedback:",V)}},$=()=>{!r.feedbackId||F||(ae(!0),y&&y())},Q=z=>{let V=On.parse(z);return V=V.replace(/<table>/g,'<div class="genius-dashboard-table-wrapper"><table>').replace(/<\/table>/g,"</table></div>"),V=V.replace(/<a\s+href=/g,'<a target="_blank" rel="noopener noreferrer" href='),{__html:V}};return W.jsxs("div",{className:"genius-dashboard-message assistant",children:[i&&W.jsx("div",{className:"genius-dashboard-assistant-icon",children:W.jsx(ey,{})}),W.jsxs("div",{className:"genius-dashboard-message-bubble",children:[r.description&&W.jsx("div",{className:"genius-dashboard-description",dangerouslySetInnerHTML:{__html:r.description}}),r.chartData&&W.jsx("div",{className:"genius-dashboard-chart-container",children:W.jsx($T,{options:r.chartData})}),r.singleStat&&W.jsx("div",{className:"genius-dashboard-single-stat-wrapper",children:W.jsx(GT,{metric:r.singleStat.metric,value:r.singleStat.value})}),r.tableData&&W.jsx("div",{className:"genius-dashboard-table-wrapper-container",children:W.jsx(YT,{data:r.tableData})}),r.content&&W.jsxs("div",{className:"genius-dashboard-message-content-wrapper",children:[W.jsx("div",{ref:b,className:"genius-dashboard-message-content",children:O?W.jsx("div",{dangerouslySetInnerHTML:Q(r.content)}):W.jsx(MT,{text:r.content,onUpdate:ee,onTypingComplete:B})}),(O||N)&&!r.isFromHistory&&W.jsxs("div",{className:"genius-dashboard-action-buttons",children:[W.jsx("button",{className:`genius-dashboard-like-button-inline ${J?"liked":""}`,onClick:Y,"aria-label":"Like",title:J?"Liked":"Like",disabled:J,children:J?W.jsx(TT,{}):W.jsx(wT,{})}),W.jsx("button",{className:`genius-dashboard-dislike-button-inline ${F?"disliked":""}`,onClick:$,"aria-label":"Dislike",title:F?"Disliked":"Dislike",disabled:F,children:F?W.jsx(kT,{}):W.jsx(CT,{})}),d&&p&&W.jsx("button",{className:"genius-dashboard-retry-button-inline",onClick:d,"aria-label":"Retry",title:"Retry",children:W.jsx(ST,{})})]})]})]})]})},Mo=r=>`<span class="genius-dashboard-value-pill">${r}</span>`,T3=r=>{const i=new Date(r),o=new Date(i.getTime()-5.5*60*60*1e3),c={month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0};return o.toLocaleString("en-US",c)},tf=r=>({merchant_id:"Merchant ID",success_rate:"Success Rate",total_amount:"Total Amount",transaction_count:"Transaction Count",payment_method:"Payment Method",payment_method_type:"Payment Method Type",status:"Status",created_at:"Created At",volume:"Volume",count:"Count",amount:"Amount",rate:"Rate",upi:"UPI",card:"Card",netbanking:"Net Banking",wallet:"Wallet"})[r.toLowerCase()]||r.split("_").map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" "),k3=r=>r?"True":"False",M3=r=>{let i=[],o="";if(typeof r=="string")i=[r],o=r;else if(Array.isArray(r))i=r.map(c=>typeof c=="string"?c:typeof c=="number"?c.toString():typeof c=="boolean"?k3(c):Array.isArray(c)?c.join(", "):"").filter(Boolean),o=i.join(", ");else if(typeof r=="number"){const c=r.toString();i=[c],o=c}else if(typeof r=="boolean"){const c=k3(r);i=[c],o=c}return{displayValue:o,valuesArray:i}},XT=r=>{if(!r||Object.keys(r).length===0)return"";if(r.clauses&&Array.isArray(r.clauses)){const c=r.clauses.map(p=>{const y=p.field||"",x=p.condition||"=",{displayValue:b}=M3(p.val);if(!y||!b)return"";const k=Mo(tf(y)),O=b.split(",").map(J=>Mo(J.trim())).join(", "),Z=x.toLowerCase()==="in"?"in":x;return`${k} ${Z} ${O}`}).filter(Boolean);return c.length===0?"":`where ${c.join(" and ")}`}const i=c=>{if(c.and||c.or){const k=c.and?"and":"or",O=c[k==="and"?"and":"or"],N=i(O.left),Z=i(O.right);return N?Z?`${N} ${k} ${Z}`:N:Z}const d=c.field||"",p=c.condition||"=",{displayValue:y}=M3(c.val);if(!d||!y)return"";const x=Mo(tf(d)),b=y.split(",").map(k=>Mo(k.trim())).join(", ");return`${x} ${p} ${b}`},o=i(r);return o?`where ${o}`:""},FT=r=>{if(!r||!r.start||!r.end)return"";const i=Mo(T3(r.start)),o=Mo(T3(r.end));return`for period ${i} to ${o}`},ZT=r=>{const i=r.find(x=>x&&x.granularity);if(!i||!i.granularity)return{hasGranularity:!1,granularityString:""};const{duration:o=1,unit:c=""}=i.granularity,d=`${o} ${c}`;return{hasGranularity:!0,granularityString:`${{"1 day":"daily","1 hour":"hourly","1 week":"weekly","1 month":"monthly","1 year":"yearly"}[d]||d} granularity`}},_c=(r,i,o)=>{var c,d,p;try{const y=JSON.parse(r),x=(i==null?void 0:i.includes("compare"))||(o==null?void 0:o.name)==="time_range_comparison",b=x?"Comparing":"Displaying";let k="";y.metric&&(typeof y.metric=="string"?k=Mo(tf(y.metric)):Array.isArray(y.metric)&&(k=y.metric.map(z=>Mo(tf(z))).join(", ")));const O=y.dimensions||[],N=O.filter(z=>typeof z=="string").map(z=>tf(z)),Z=N.length>0?Mo(N.join(", ")):"",{hasGranularity:J,granularityString:D}=ZT(O),F=XT(y.filters);let ae=0;(d=(c=y.filters)==null?void 0:c.val)!=null&&d.limit&&(ae=y.filters.val.limit);const ee=ae>0?`top ${ae}`:"";let B="";(p=y.sortedOn)!=null&&p.sortDimension&&(B=`sorted by ${Mo(tf(y.sortedOn.sortDimension))}`);let Y="";x&&(o!=null&&o.previous_interval)||(Y=FT(y.interval));const $=[b,k];return J&&$.push("with",D),N.length>0&&(ae>0?$.push("for",ee):$.push("by"),$.push(Z)),F&&$.push(F),B&&$.push(B),Y&&$.push(Y),$.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}catch(y){return console.error("Error parsing tool input:",y),""}},sy=r=>{if(r==null)return r;if(typeof r!="function"){if(r instanceof Date)return r;if(Array.isArray(r))return r.map(i=>sy(i)).filter(i=>i!==void 0);if(typeof r=="object"){const i={};for(const[o,c]of Object.entries(r)){const d=sy(c);d!==void 0&&(i[o]=d)}return i}return r}};class QT{constructor(){Bn(this,"db",null);Bn(this,"dbName","GeniusChatHistory");Bn(this,"version",1);Bn(this,"sessionsStore","sessions")}async init(){return new Promise((i,o)=>{const c=indexedDB.open(this.dbName,this.version);c.onerror=()=>{o(new Error("Failed to open IndexedDB"))},c.onsuccess=d=>{this.db=d.target.result,i()},c.onupgradeneeded=d=>{const p=d.target.result;p.objectStoreNames.contains(this.sessionsStore)||p.createObjectStore(this.sessionsStore,{keyPath:"sessionId"}).createIndex("lastUpdated","lastUpdated",{unique:!1})}})}async saveMessage(i,o,c,d){this.db||await this.init();const y=this.db.transaction([this.sessionsStore],"readwrite").objectStore(this.sessionsStore),x=y.get(i);return new Promise((b,k)=>{x.onsuccess=()=>{const O=x.result,N=new Date,Z={id:`${i}-user-${N.getTime()}`,content:o,role:"user",timestamp:N},J={id:`${i}-bot-${N.getTime()}`,content:c,role:"assistant",timestamp:N};if(d){const ee=sy(d);ee.finalOutputData&&(J.finalOutputData=ee.finalOutputData),ee.chartData&&(J.chartData=ee.chartData),ee.singleStat&&(J.singleStat=ee.singleStat),ee.tableData&&(J.tableData=ee.tableData),ee.description&&(J.description=ee.description)}let D;O?D={...O,messages:[...O.messages,Z,J],lastUpdated:N}:D={sessionId:i,messages:[Z,J],title:this.generateSessionTitle(o),lastUpdated:N};const F=sy(D),ae=y.put(F);ae.onsuccess=()=>b(),ae.onerror=()=>k(new Error("Failed to save session"))},x.onerror=()=>k(new Error("Failed to get session"))})}async loadMessages(i){this.db||await this.init();const c=this.db.transaction([this.sessionsStore],"readonly").objectStore(this.sessionsStore);return new Promise((d,p)=>{const y=c.get(i);y.onsuccess=()=>{const x=y.result;d(x?x.messages:[])},y.onerror=()=>p(new Error("Failed to load messages"))})}async loadSessions(){this.db||await this.init();const o=this.db.transaction([this.sessionsStore],"readonly").objectStore(this.sessionsStore);return new Promise((c,d)=>{const p=o.getAll();p.onsuccess=()=>{const y=p.result.map(x=>{var b;return{sessionId:x.sessionId,title:x.title,lastMessage:((b=x.messages[x.messages.length-2])==null?void 0:b.content)||"",timestamp:x.lastUpdated,messageCount:Math.floor(x.messages.length/2)}});y.sort((x,b)=>b.timestamp.getTime()-x.timestamp.getTime()),c(y)},p.onerror=()=>d(new Error("Failed to load sessions"))})}async deleteSession(i){this.db||await this.init();const c=this.db.transaction([this.sessionsStore],"readwrite").objectStore(this.sessionsStore);return new Promise((d,p)=>{const y=c.delete(i);y.onsuccess=()=>d(),y.onerror=()=>p(new Error("Failed to delete session"))})}async deleteAllHistory(){this.db||await this.init();const o=this.db.transaction([this.sessionsStore],"readwrite").objectStore(this.sessionsStore);return new Promise((c,d)=>{const p=o.clear();p.onsuccess=()=>c(),p.onerror=()=>d(new Error("Failed to delete all history"))})}generateSessionTitle(i){const o=i.trim();return o.length>50?o.substring(0,47)+"...":o}}const Ao=new QT;function Jb(r){return typeof r=="object"&&r!==null}function ry(r,i){if(Jb(r)&&Jb(r[i]))return r[i]}function $g(r,i,o=""){return Jb(r)&&typeof r[i]=="string"?r[i]:o}const oy=r=>{if(!r)return"";const i=new Date(r),o=c=>c.toString().padStart(2,"0");return`${i.getFullYear()}-${o(i.getMonth()+1)}-${o(i.getDate())} ${o(i.getHours())}:${o(i.getMinutes())}:${o(i.getSeconds())}`},JT=({data:r,updatedPayload:i,userEmail:o})=>{const[c,d]=Pe.useState(!1),[p,y]=Pe.useState(!1),[x,b]=Pe.useState("initial"),k=(r==null?void 0:r.is_SR_drop)===!0,O=ry(r,"sR_comparision")||{},N=ry(O,"current_sr")||{},Z=ry(O,"point_of_comparision")||{},J=$g(i,"entity_id",""),D=ry(i,"sr_drop_filters")||{},F=$g(N,"start_time",""),ae=$g(N,"end_time",""),ee=$g(Z,"start_time",""),B=$g(Z,"end_time",""),Y=new Date(F),Q=(new Date(ae).getTime()-Y.getTime())/6e4,z=Q<30,V=Q>10080,le=async()=>{d(!0),b("processing");try{const se={post_start_date:oy(F),post_end_date:oy(ae),pre_start_date:oy(ee),pre_end_date:oy(B),merchant_id:J,input_dimensions:D,status:"completed",communication_metadata:{email:{to:[o]}}},K=localStorage.getItem("login")||"";(await fetch("https://euler-x.internal.svc.k8s.mum.juspay.net/ec/v1/admin/rcacalculate",{method:"POST",headers:{"Content-Type":"application/json","x-web-logintoken":K},body:JSON.stringify(se)})).status===200?b("success"):b("error")}catch{b("error")}};return z||V||!k?null:W.jsxs(W.Fragment,{children:[!c&&W.jsxs("div",{className:"rca-box",children:[W.jsxs("div",{className:"rca-box-text",children:["Would you like a detailed report on the SR drop, including impacted dimensions and potential causes? ",W.jsx("br",{}),`It will be sent to your registered email (${o}) in 15 minutes.`]}),W.jsxs("div",{className:"rca-box-buttons",children:[W.jsx("button",{className:"rca-box-btn rca-box-btn-primary",onClick:le,disabled:x==="processing",children:"Yes"}),W.jsx("button",{className:"rca-box-btn rca-box-btn-secondary",onClick:()=>{d(!0),y(!0)},disabled:x==="processing",children:"No"})]})]}),p&&W.jsxs("div",{className:"rca-box-support",children:["For any further queries related to this, please feel free to reach out to"," ",W.jsx("a",{href:"mailto:support@juspay.in",className:"rca-box-support-link",children:"support@juspay.in"})]}),x==="success"&&W.jsxs("div",{className:"rca-box-status rca-box-status-success",children:["Your request for a detailed report on the SR drop has been received. The report, including impacted dimensions and potential causes, will be sent to your registered email (",o,") within the next 15 minutes."]}),x==="error"&&W.jsx("div",{className:"rca-box-status rca-box-status-error",children:"We encountered an issue while processing your request. Please try again later or contact support if the problem persists."}),x==="processing"&&W.jsx("div",{className:"rca-box-status rca-box-status-processing",children:"Processing your request..."})]})},A3=({feedbackType:r,onFeedbackClick:i,onBack:o,onClose:c,onHistoryClick:d})=>{const[p,y]=Pe.useState(""),[x,b]=Pe.useState(""),[k,O]=Pe.useState(""),J=r==="LIKE"?["Answer was factually correct","Was able to generate the answer","Dimensions were correct","Followed the instructions"]:["Answer was factually incorrect","Was not able to generate the answer","Dimensions were wrong","Didn't follow the instructions"],D=F=>{if(F.preventDefault(),!p&&!x){O("Please select at least 1 feedback");return}const ae=(p?p+" ":"")+x;i(ae.trim())};return W.jsx("div",{className:"genius-dashboard-feedback-container",children:W.jsx("div",{className:"genius-dashboard-feedback-body",children:W.jsxs("div",{className:"genius-dashboard-feedback-content",children:[W.jsx("div",{className:"genius-dashboard-feedback-icon",children:W.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[W.jsx("circle",{cx:"16",cy:"16",r:"16",fill:"#F5F5F5"}),W.jsx("circle",{cx:"11",cy:"12",r:"2",fill:"#454545"}),W.jsx("circle",{cx:"21",cy:"12",r:"2",fill:"#454545"}),W.jsx("path",{d:"M11 20C11 20 13 18 16 18C19 18 21 20 21 20",stroke:"#454545",strokeWidth:"2",strokeLinecap:"round"})]})}),W.jsx("h3",{className:"genius-dashboard-feedback-title",children:"Tell us more:"}),W.jsx("div",{className:"genius-dashboard-feedback-options",children:J.map(F=>W.jsx("button",{className:`genius-dashboard-feedback-option ${p===F?"selected":""}`,onClick:()=>y(F),children:F},F))}),W.jsxs("div",{className:"genius-dashboard-feedback-textarea-container",children:[W.jsx("p",{className:"genius-dashboard-feedback-label",children:"Feel free to add specific feedback"}),W.jsxs("form",{onSubmit:D,children:[W.jsx("textarea",{className:"genius-dashboard-feedback-textarea",placeholder:"Enter your feedback",value:x,onChange:F=>{b(F.target.value),O("")},rows:5}),k&&W.jsx("p",{className:"genius-dashboard-feedback-error",children:k}),W.jsx("button",{type:"submit",className:"genius-dashboard-feedback-submit",children:"Submit"})]})]})]})})})};var Wb,E3;function _3(){if(E3)return Wb;E3=1;var r=Object.prototype.toString;Wb=function(N){if(N===void 0)return"undefined";if(N===null)return"null";var Z=typeof N;if(Z==="boolean")return"boolean";if(Z==="string")return"string";if(Z==="number")return"number";if(Z==="symbol")return"symbol";if(Z==="function")return y(N)?"generatorfunction":"function";if(o(N))return"array";if(k(N))return"buffer";if(b(N))return"arguments";if(d(N))return"date";if(c(N))return"error";if(p(N))return"regexp";switch(i(N)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(x(N))return"generator";switch(Z=r.call(N),Z){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return Z.slice(8,-1).toLowerCase().replace(/\s/g,"")};function i(O){return typeof O.constructor=="function"?O.constructor.name:null}function o(O){return Array.isArray?Array.isArray(O):O instanceof Array}function c(O){return O instanceof Error||typeof O.message=="string"&&O.constructor&&typeof O.constructor.stackTraceLimit=="number"}function d(O){return O instanceof Date?!0:typeof O.toDateString=="function"&&typeof O.getDate=="function"&&typeof O.setDate=="function"}function p(O){return O instanceof RegExp?!0:typeof O.flags=="string"&&typeof O.ignoreCase=="boolean"&&typeof O.multiline=="boolean"&&typeof O.global=="boolean"}function y(O,N){return i(O)==="GeneratorFunction"}function x(O){return typeof O.throw=="function"&&typeof O.return=="function"&&typeof O.next=="function"}function b(O){try{if(typeof O.length=="number"&&typeof O.callee=="function")return!0}catch(N){if(N.message.indexOf("callee")!==-1)return!0}return!1}function k(O){return O.constructor&&typeof O.constructor.isBuffer=="function"?O.constructor.isBuffer(O):!1}return Wb}/*!
80
+ * shallow-clone <https://github.com/jonschlinkert/shallow-clone>
81
+ *
82
+ * Copyright (c) 2015-present, Jon Schlinkert.
83
+ * Released under the MIT License.
84
+ */var Kb,O3;function WT(){if(O3)return Kb;O3=1;const r=Symbol.prototype.valueOf,i=_3();function o(b,k){switch(i(b)){case"array":return b.slice();case"object":return Object.assign({},b);case"date":return new b.constructor(Number(b));case"map":return new Map(b);case"set":return new Set(b);case"buffer":return y(b);case"symbol":return x(b);case"arraybuffer":return d(b);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return p(b);case"regexp":return c(b);case"error":return Object.create(b);default:return b}}function c(b){const k=b.flags!==void 0?b.flags:/\w+$/.exec(b)||void 0,O=new b.constructor(b.source,k);return O.lastIndex=b.lastIndex,O}function d(b){const k=new b.constructor(b.byteLength);return new Uint8Array(k).set(new Uint8Array(b)),k}function p(b,k){return new b.constructor(b.buffer,b.byteOffset,b.length)}function y(b){const k=b.length,O=Buffer.allocUnsafe?Buffer.allocUnsafe(k):Buffer.from(k);return b.copy(O),O}function x(b){return r?Object(r.call(b)):{}}return Kb=o,Kb}/*!
85
+ * isobject <https://github.com/jonschlinkert/isobject>
86
+ *
87
+ * Copyright (c) 2014-2017, Jon Schlinkert.
88
+ * Released under the MIT License.
89
+ */var e2,D3;function KT(){return D3||(D3=1,e2=function(i){return i!=null&&typeof i=="object"&&Array.isArray(i)===!1}),e2}/*!
90
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
91
+ *
92
+ * Copyright (c) 2014-2017, Jon Schlinkert.
93
+ * Released under the MIT License.
94
+ */var t2,j3;function ek(){if(j3)return t2;j3=1;var r=KT();function i(o){return r(o)===!0&&Object.prototype.toString.call(o)==="[object Object]"}return t2=function(c){var d,p;return!(i(c)===!1||(d=c.constructor,typeof d!="function")||(p=d.prototype,i(p)===!1)||p.hasOwnProperty("isPrototypeOf")===!1)},t2}var n2,L3;function tk(){if(L3)return n2;L3=1;const r=WT(),i=_3(),o=ek();function c(y,x){switch(i(y)){case"object":return d(y,x);case"array":return p(y,x);default:return r(y)}}function d(y,x){if(typeof x=="function")return x(y);if(x||o(y)){const b=new y.constructor;for(let k in y)b[k]=c(y[k],x);return b}return y}function p(y,x){const b=new y.constructor(y.length);for(let k=0;k<y.length;k++)b[k]=c(y[k],x);return b}return n2=c,n2}var nk=tk();const R3=Ng(nk);var ly={exports:{}},N3;function ik(){if(N3)return ly.exports;N3=1;var r=typeof Reflect=="object"?Reflect:null,i=r&&typeof r.apply=="function"?r.apply:function(Q,z,V){return Function.prototype.apply.call(Q,z,V)},o;r&&typeof r.ownKeys=="function"?o=r.ownKeys:Object.getOwnPropertySymbols?o=function(Q){return Object.getOwnPropertyNames(Q).concat(Object.getOwnPropertySymbols(Q))}:o=function(Q){return Object.getOwnPropertyNames(Q)};function c($){console&&console.warn&&console.warn($)}var d=Number.isNaN||function(Q){return Q!==Q};function p(){p.init.call(this)}ly.exports=p,ly.exports.once=ee,p.EventEmitter=p,p.prototype._events=void 0,p.prototype._eventsCount=0,p.prototype._maxListeners=void 0;var y=10;function x($){if(typeof $!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof $)}Object.defineProperty(p,"defaultMaxListeners",{enumerable:!0,get:function(){return y},set:function($){if(typeof $!="number"||$<0||d($))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+$+".");y=$}}),p.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},p.prototype.setMaxListeners=function(Q){if(typeof Q!="number"||Q<0||d(Q))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Q+".");return this._maxListeners=Q,this};function b($){return $._maxListeners===void 0?p.defaultMaxListeners:$._maxListeners}p.prototype.getMaxListeners=function(){return b(this)},p.prototype.emit=function(Q){for(var z=[],V=1;V<arguments.length;V++)z.push(arguments[V]);var le=Q==="error",se=this._events;if(se!==void 0)le=le&&se.error===void 0;else if(!le)return!1;if(le){var K;if(z.length>0&&(K=z[0]),K instanceof Error)throw K;var L=new Error("Unhandled error."+(K?" ("+K.message+")":""));throw L.context=K,L}var X=se[Q];if(X===void 0)return!1;if(typeof X=="function")i(X,this,z);else for(var H=X.length,A=D(X,H),V=0;V<H;++V)i(A[V],this,z);return!0};function k($,Q,z,V){var le,se,K;if(x(z),se=$._events,se===void 0?(se=$._events=Object.create(null),$._eventsCount=0):(se.newListener!==void 0&&($.emit("newListener",Q,z.listener?z.listener:z),se=$._events),K=se[Q]),K===void 0)K=se[Q]=z,++$._eventsCount;else if(typeof K=="function"?K=se[Q]=V?[z,K]:[K,z]:V?K.unshift(z):K.push(z),le=b($),le>0&&K.length>le&&!K.warned){K.warned=!0;var L=new Error("Possible EventEmitter memory leak detected. "+K.length+" "+String(Q)+" listeners added. Use emitter.setMaxListeners() to increase limit");L.name="MaxListenersExceededWarning",L.emitter=$,L.type=Q,L.count=K.length,c(L)}return $}p.prototype.addListener=function(Q,z){return k(this,Q,z,!1)},p.prototype.on=p.prototype.addListener,p.prototype.prependListener=function(Q,z){return k(this,Q,z,!0)};function O(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function N($,Q,z){var V={fired:!1,wrapFn:void 0,target:$,type:Q,listener:z},le=O.bind(V);return le.listener=z,V.wrapFn=le,le}p.prototype.once=function(Q,z){return x(z),this.on(Q,N(this,Q,z)),this},p.prototype.prependOnceListener=function(Q,z){return x(z),this.prependListener(Q,N(this,Q,z)),this},p.prototype.removeListener=function(Q,z){var V,le,se,K,L;if(x(z),le=this._events,le===void 0)return this;if(V=le[Q],V===void 0)return this;if(V===z||V.listener===z)--this._eventsCount===0?this._events=Object.create(null):(delete le[Q],le.removeListener&&this.emit("removeListener",Q,V.listener||z));else if(typeof V!="function"){for(se=-1,K=V.length-1;K>=0;K--)if(V[K]===z||V[K].listener===z){L=V[K].listener,se=K;break}if(se<0)return this;se===0?V.shift():F(V,se),V.length===1&&(le[Q]=V[0]),le.removeListener!==void 0&&this.emit("removeListener",Q,L||z)}return this},p.prototype.off=p.prototype.removeListener,p.prototype.removeAllListeners=function(Q){var z,V,le;if(V=this._events,V===void 0)return this;if(V.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):V[Q]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete V[Q]),this;if(arguments.length===0){var se=Object.keys(V),K;for(le=0;le<se.length;++le)K=se[le],K!=="removeListener"&&this.removeAllListeners(K);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(z=V[Q],typeof z=="function")this.removeListener(Q,z);else if(z!==void 0)for(le=z.length-1;le>=0;le--)this.removeListener(Q,z[le]);return this};function Z($,Q,z){var V=$._events;if(V===void 0)return[];var le=V[Q];return le===void 0?[]:typeof le=="function"?z?[le.listener||le]:[le]:z?ae(le):D(le,le.length)}p.prototype.listeners=function(Q){return Z(this,Q,!0)},p.prototype.rawListeners=function(Q){return Z(this,Q,!1)},p.listenerCount=function($,Q){return typeof $.listenerCount=="function"?$.listenerCount(Q):J.call($,Q)},p.prototype.listenerCount=J;function J($){var Q=this._events;if(Q!==void 0){var z=Q[$];if(typeof z=="function")return 1;if(z!==void 0)return z.length}return 0}p.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function D($,Q){for(var z=new Array(Q),V=0;V<Q;++V)z[V]=$[V];return z}function F($,Q){for(;Q+1<$.length;Q++)$[Q]=$[Q+1];$.pop()}function ae($){for(var Q=new Array($.length),z=0;z<Q.length;++z)Q[z]=$[z].listener||$[z];return Q}function ee($,Q){return new Promise(function(z,V){function le(K){$.removeListener(Q,se),V(K)}function se(){typeof $.removeListener=="function"&&$.removeListener("error",le),z([].slice.call(arguments))}Y($,Q,se,{once:!0}),Q!=="error"&&B($,le,{once:!0})})}function B($,Q,z){typeof $.on=="function"&&Y($,"error",Q,z)}function Y($,Q,z,V){if(typeof $.on=="function")V.once?$.once(Q,z):$.on(Q,z);else if(typeof $.addEventListener=="function")$.addEventListener(Q,function le(se){V.once&&$.removeEventListener(Q,le),z(se)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof $)}return ly.exports}var ak=ik();const sk=Ng(ak);for(var fa=[],i2=0;i2<256;++i2)fa.push((i2+256).toString(16).slice(1));function rk(r,i=0){return(fa[r[i+0]]+fa[r[i+1]]+fa[r[i+2]]+fa[r[i+3]]+"-"+fa[r[i+4]]+fa[r[i+5]]+"-"+fa[r[i+6]]+fa[r[i+7]]+"-"+fa[r[i+8]]+fa[r[i+9]]+"-"+fa[r[i+10]]+fa[r[i+11]]+fa[r[i+12]]+fa[r[i+13]]+fa[r[i+14]]+fa[r[i+15]]).toLowerCase()}var cy,ok=new Uint8Array(16);function lk(){if(!cy&&(cy=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!cy))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cy(ok)}var ck=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const z3={randomUUID:ck};function uk(r,i,o){if(z3.randomUUID&&!i&&!r)return z3.randomUUID();r=r||{};var c=r.random||(r.rng||lk)();if(c[6]=c[6]&15|64,c[8]=c[8]&63|128,i){o=o||0;for(var d=0;d<16;++d)i[o+d]=c[d];return i}return rk(c)}function Mi(r,i,o,c){Object.defineProperty(r,i,{get:o,set:c,enumerable:!0,configurable:!0})}function dk(r){return r&&r.__esModule?r.default:r}var hk={};Mi(hk,"httpActionGenerator",()=>B3);async function B3(r,i,o,c){try{Cn.debug("[RTVI] Fetch action",r,i);const d=new Headers({...Object.fromEntries((o.headers??new Headers).entries())});d.has("Content-Type")||d.set("Content-Type","application/json"),d.set("Cache-Control","no-cache"),d.set("Connection","keep-alive");const p=await fetch(r,{method:"POST",headers:d,body:JSON.stringify({...o.requestData,actions:[i]})}),y=p.headers.get("content-type");if(!p.ok){const x=await p.text();throw new Zs(`Failed to resolve action: ${x}`,p.status)}if(p.body&&(y!=null&&y.includes("text/event-stream"))){const x=p.body.pipeThrough(new TextDecoderStream).getReader();let b="";for(;;){const{value:k,done:O}=await x.read();if(O)break;b+=k;let N=b.indexOf(`
95
+
96
+ `);for(;N!==-1;){const Z=b.slice(0,N);b=b.slice(N+2);const J=Z.split(`
97
+ `);let D="";for(const F of J){const ae=F.indexOf(":");ae!==-1&&(D+=F.slice(ae+1).trim())}try{const F=atob(D),ae=JSON.parse(F);c(ae)}catch(F){throw Cn.error("[RTVI] Failed to parse JSON:",F),F}N=b.indexOf(`
98
+
99
+ `)}}}else{const x=await p.json();c(x)}}catch(d){throw Cn.error("[RTVI] Error during fetch:",d),d}}var fk={};Mi(fk,"RTVIClient",()=>xl);var U3={};U3=JSON.parse('{"name":"@pipecat-ai/client-js","version":"0.3.4","license":"BSD-2-Clause","main":"dist/index.js","module":"dist/index.module.js","types":"dist/index.d.ts","source":"src/index.ts","repository":{"type":"git","url":"git+https://github.com/pipecat-ai/pipecat-client-web.git"},"files":["dist","package.json","README.md"],"scripts":{"build":"jest --silent && parcel build --no-cache","dev":"parcel watch","lint":"eslint src/ --report-unused-disable-directives --max-warnings 0","test":"jest"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"devDependencies":{"@jest/globals":"^29.7.0","@types/clone-deep":"^4.0.4","@types/jest":"^29.5.12","@types/uuid":"^10.0.0","eslint":"^9.11.1","eslint-config-prettier":"^9.1.0","eslint-plugin-simple-import-sort":"^12.1.1","jest":"^29.7.0","ts-jest":"^29.2.5"},"dependencies":{"@types/events":"^3.0.3","clone-deep":"^4.0.1","events":"^3.3.0","typed-emitter":"^2.1.0","uuid":"^10.0.0"}}');var id={};Mi(id,"RTVIError",()=>Zs),Mi(id,"ConnectionTimeoutError",()=>H3),Mi(id,"StartBotError",()=>a2),Mi(id,"TransportStartError",()=>P3),Mi(id,"BotNotReadyError",()=>Oc),Mi(id,"ConfigUpdateError",()=>pk),Mi(id,"ActionEndpointNotSetError",()=>V3);class Zs extends Error{constructor(i,o){super(i),this.status=o}}class H3 extends Zs{constructor(i){super(i??"Bot did not enter ready state within the specified timeout period.")}}class a2 extends Zs{constructor(i,o){super(i??"Failed to connect / invalid auth bundle from base url",o??500),this.error="invalid-request-error"}}class P3 extends Zs{constructor(i){super(i??"Unable to connect to transport")}}class Oc extends Zs{constructor(i){super(i??"Attempt to call action on transport when not in 'ready' state.")}}class pk extends Zs{constructor(i){super(i??"Unable to update configuration"),this.status=400}}class V3 extends Zs{constructor(i){super(i??"Action endpoint is not set")}}function nf(r,i,o){const c=o.value;return o.value=function(...d){if(this.state==="ready")return c.apply(this,d);throw new Oc(`Attempt to call ${i.toString()} when transport not in ready state. Await connect() first.`)},o}function gk(...r){return r=["ready",...r],function(i,o,c){const d=c.get;return c.get=function(){if(r.includes(this.state))return d==null?void 0:d.apply(this);throw new Oc(`Attempt to call ${o.toString()} when transport not in ${r}. Await connect() first.`)},c}}var mk={};Mi(mk,"RTVIEvent",()=>Et);var Et;(function(r){r.MessageError="messageError",r.Error="error",r.Connected="connected",r.Disconnected="disconnected",r.TransportStateChanged="transportStateChanged",r.Config="config",r.ConfigDescribe="configDescribe",r.ActionsAvailable="actionsAvailable",r.ParticipantConnected="participantConnected",r.ParticipantLeft="participantLeft",r.TrackStarted="trackStarted",r.TrackStopped="trackStopped",r.ScreenTrackStarted="screenTrackStarted",r.ScreenTrackStopped="screenTrackStopped",r.ScreenShareError="screenShareError",r.AvailableCamsUpdated="availableCamsUpdated",r.AvailableMicsUpdated="availableMicsUpdated",r.AvailableSpeakersUpdated="availableSpeakersUpdated",r.CamUpdated="camUpdated",r.MicUpdated="micUpdated",r.SpeakerUpdated="speakerUpdated",r.BotConnected="botConnected",r.BotReady="botReady",r.BotDisconnected="botDisconnected",r.BotStartedSpeaking="botStartedSpeaking",r.BotStoppedSpeaking="botStoppedSpeaking",r.RemoteAudioLevel="remoteAudioLevel",r.UserStartedSpeaking="userStartedSpeaking",r.UserStoppedSpeaking="userStoppedSpeaking",r.LocalAudioLevel="localAudioLevel",r.Metrics="metrics",r.UserTranscript="userTranscript",r.BotTranscript="botTranscript",r.BotLlmText="botLlmText",r.BotLlmStarted="botLlmStarted",r.BotLlmStopped="botLlmStopped",r.BotTtsText="botTtsText",r.BotTtsStarted="botTtsStarted",r.BotTtsStopped="botTtsStopped",r.LLMFunctionCall="llmFunctionCall",r.LLMFunctionCallStart="llmFunctionCallStart",r.LLMJsonCompletion="llmJsonCompletion",r.StorageItemStored="storageItemStored",r.BotLlmSearchResponse="botLlmSearchResponse",r.ServerMessage="serverMessage"})(Et||(Et={}));var yk={};Mi(yk,"RTVIClientHelper",()=>s2);class s2{constructor(i){this._options=i}set client(i){this._client=i}set service(i){this._service=i}}var $3={};Mi($3,"LogLevel",()=>Dc),Mi($3,"logger",()=>Cn);var Dc;(function(r){r[r.NONE=0]="NONE",r[r.ERROR=1]="ERROR",r[r.WARN=2]="WARN",r[r.INFO=3]="INFO",r[r.DEBUG=4]="DEBUG"})(Dc||(Dc={}));class af{constructor(){this.level=Dc.DEBUG}static getInstance(){return af.instance||(af.instance=new af),af.instance}setLevel(i){this.level=i}debug(...i){this.level>=Dc.DEBUG&&console.debug(...i)}info(...i){this.level>=Dc.INFO&&console.info(...i)}warn(...i){this.level>=Dc.WARN&&console.warn(...i)}error(...i){this.level>=Dc.ERROR&&console.error(...i)}}const Cn=af.getInstance();var Ig={};Mi(Ig,"RTVI_MESSAGE_LABEL",()=>I3),Mi(Ig,"RTVIMessageType",()=>Tn),Mi(Ig,"RTVIMessage",()=>Yi),Mi(Ig,"RTVIActionRequest",()=>q3),Mi(Ig,"MessageDispatcher",()=>r2);const I3="rtvi-ai";var Tn;(function(r){r.CLIENT_READY="client-ready",r.UPDATE_CONFIG="update-config",r.GET_CONFIG="get-config",r.DESCRIBE_CONFIG="describe-config",r.DESCRIBE_ACTIONS="describe-actions",r.DISCONNECT_BOT="disconnect-bot",r.ACTION="action",r.BOT_READY="bot-ready",r.ERROR="error",r.ERROR_RESPONSE="error-response",r.CONFIG="config",r.CONFIG_AVAILABLE="config-available",r.CONFIG_ERROR="config-error",r.ACTIONS_AVAILABLE="actions-available",r.ACTION_RESPONSE="action-response",r.METRICS="metrics",r.USER_TRANSCRIPTION="user-transcription",r.BOT_TRANSCRIPTION="bot-transcription",r.USER_STARTED_SPEAKING="user-started-speaking",r.USER_STOPPED_SPEAKING="user-stopped-speaking",r.BOT_STARTED_SPEAKING="bot-started-speaking",r.BOT_STOPPED_SPEAKING="bot-stopped-speaking",r.USER_LLM_TEXT="user-llm-text",r.BOT_LLM_TEXT="bot-llm-text",r.BOT_LLM_STARTED="bot-llm-started",r.BOT_LLM_STOPPED="bot-llm-stopped",r.BOT_TTS_TEXT="bot-tts-text",r.BOT_TTS_STARTED="bot-tts-started",r.BOT_TTS_STOPPED="bot-tts-stopped",r.BOT_LLM_SEARCH_RESPONSE="bot-llm-search-response",r.STORAGE_ITEM_STORED="storage-item-stored",r.SERVER_MESSAGE="server-message"})(Tn||(Tn={}));class Yi{constructor(i,o,c){this.label=I3,this.type=i,this.data=o,this.id=c||uk().slice(0,8)}static clientReady(){return new Yi(Tn.CLIENT_READY,{})}static updateConfig(i,o=!1){return new Yi(Tn.UPDATE_CONFIG,{config:i,interrupt:o})}static describeConfig(){return new Yi(Tn.DESCRIBE_CONFIG,{})}static getBotConfig(){return new Yi(Tn.GET_CONFIG,{})}static describeActions(){return new Yi(Tn.DESCRIBE_ACTIONS,{})}static disconnectBot(){return new Yi(Tn.DISCONNECT_BOT,{})}static error(i,o=!1){return new Yi(Tn.ERROR,{message:i,fatal:o})}}class q3 extends Yi{constructor(i){super(Tn.ACTION,i)}}class r2{constructor(i){this._queue=new Array,this._gcTime=1e4,this._queue=[],this._client=i}dispatch(i){const o=new Promise((c,d)=>{this._queue.push({message:i,timestamp:Date.now(),resolve:c,reject:d})});return Cn.debug("[MessageDispatcher] dispatch",i),this._client.sendMessage(i),this._gc(),o}async dispatchAction(i,o){var d;const c=new Promise((p,y)=>{this._queue.push({message:i,timestamp:Date.now(),resolve:p,reject:y})});if(Cn.debug("[MessageDispatcher] action",i),this._client.connected)this._client.sendMessage(i);else{if(!((d=this._client.params.endpoints)!=null&&d.action))throw Cn.error("[MessageDispatcher] Action endpoint is required when dispatching action in disconnected state"),new V3;const p=this._client.constructUrl("action");try{await B3(p,i,this._client.params,y=>{o(y)})}catch{o(new Yi(Tn.ERROR_RESPONSE,`Action endpoint '${p}' returned an error response`,i.id))}}return this._gc(),c}_resolveReject(i,o=!0){const c=this._queue.find(d=>d.message.id===i.id);return c&&(o?(Cn.debug("[MessageDispatcher] Resolve",i),c.resolve((i.type===Tn.ACTION_RESPONSE,i))):(Cn.debug("[MessageDispatcher] Reject",i),c.reject(i)),this._queue=this._queue.filter(d=>d.message.id!==i.id),Cn.debug("[MessageDispatcher] Queue",this._queue)),i}resolve(i){return this._resolveReject(i,!0)}reject(i){return this._resolveReject(i,!1)}_gc(){this._queue=this._queue.filter(i=>Date.now()-i.timestamp<this._gcTime),Cn.debug("[MessageDispatcher] GC",this._queue)}}var ad=function(r,i,o,c){var d=arguments.length,p=d<3?i:c===null?c=Object.getOwnPropertyDescriptor(i,o):c,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(r,i,o,c);else for(var x=r.length-1;x>=0;x--)(y=r[x])&&(p=(d<3?y(p):d>3?y(i,o,p):y(i,o))||p);return d>3&&p&&Object.defineProperty(i,o,p),p};const vk={connect:"/connect",action:"/action"};class bk{constructor(i){this._transport=i,this._proxy=new Proxy(this._transport,{get:(o,c,d)=>{if(typeof o[c]=="function"){let p;switch(String(c)){case"initialize":p="Calls to initialize() are disabled and used internally by the RTVIClient";break;case"sendReadyMessage":p="Calls to sendReadyMessage() are disabled and used internally by the RTVIClient";break;case"connect":p="Calls to connect() are disabled. Please use RTVIClient.connect()";break;case"disconnect":p="Calls to disconnect() are disabled. Please use RTVIClient.disconnect()";break}return p?()=>{throw new Error(p)}:(...y)=>o[c](...y)}return Reflect.get(o,c,d)}})}get proxy(){return this._proxy}}class xk extends sk{}class xl extends xk{constructor(i){super(),this.params={...i.params,endpoints:{...vk,...i.params.endpoints??{}}},this._helpers={},this._transport=i.transport,this._transportWrapper=new bk(this._transport);const o={...i.callbacks,onMessageError:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onMessageError)==null||p.call(d,c),this.emit(Et.MessageError,c)},onError:c=>{var p,y;(y=(p=i==null?void 0:i.callbacks)==null?void 0:p.onError)==null||y.call(p,c);try{this.emit(Et.Error,c)}catch{Cn.debug("Could not emit error",c)}const d=c.data;d!=null&&d.fatal&&(Cn.error("Fatal error reported. Disconnecting..."),this.disconnect())},onConnected:()=>{var c,d;(d=(c=i==null?void 0:i.callbacks)==null?void 0:c.onConnected)==null||d.call(c),this.emit(Et.Connected)},onDisconnected:()=>{var c,d;(d=(c=i==null?void 0:i.callbacks)==null?void 0:c.onDisconnected)==null||d.call(c),this.emit(Et.Disconnected)},onTransportStateChanged:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onTransportStateChanged)==null||p.call(d,c),this.emit(Et.TransportStateChanged,c)},onConfig:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onConfig)==null||p.call(d,c),this.emit(Et.Config,c)},onConfigDescribe:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onConfigDescribe)==null||p.call(d,c),this.emit(Et.ConfigDescribe,c)},onActionsAvailable:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onActionsAvailable)==null||p.call(d,c),this.emit(Et.ActionsAvailable,c)},onParticipantJoined:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onParticipantJoined)==null||p.call(d,c),this.emit(Et.ParticipantConnected,c)},onParticipantLeft:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onParticipantLeft)==null||p.call(d,c),this.emit(Et.ParticipantLeft,c)},onTrackStarted:(c,d)=>{var p,y;(y=(p=i==null?void 0:i.callbacks)==null?void 0:p.onTrackStarted)==null||y.call(p,c,d),this.emit(Et.TrackStarted,c,d)},onTrackStopped:(c,d)=>{var p,y;(y=(p=i==null?void 0:i.callbacks)==null?void 0:p.onTrackStopped)==null||y.call(p,c,d),this.emit(Et.TrackStopped,c,d)},onScreenTrackStarted:(c,d)=>{var p,y;(y=(p=i==null?void 0:i.callbacks)==null?void 0:p.onScreenTrackStarted)==null||y.call(p,c,d),this.emit(Et.ScreenTrackStarted,c,d)},onScreenTrackStopped:(c,d)=>{var p,y;(y=(p=i==null?void 0:i.callbacks)==null?void 0:p.onScreenTrackStopped)==null||y.call(p,c,d),this.emit(Et.ScreenTrackStopped,c,d)},onScreenShareError:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onScreenShareError)==null||p.call(d,c),this.emit(Et.ScreenShareError,c)},onAvailableCamsUpdated:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onAvailableCamsUpdated)==null||p.call(d,c),this.emit(Et.AvailableCamsUpdated,c)},onAvailableMicsUpdated:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onAvailableMicsUpdated)==null||p.call(d,c),this.emit(Et.AvailableMicsUpdated,c)},onAvailableSpeakersUpdated:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onAvailableSpeakersUpdated)==null||p.call(d,c),this.emit(Et.AvailableSpeakersUpdated,c)},onCamUpdated:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onCamUpdated)==null||p.call(d,c),this.emit(Et.CamUpdated,c)},onMicUpdated:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onMicUpdated)==null||p.call(d,c),this.emit(Et.MicUpdated,c)},onSpeakerUpdated:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onSpeakerUpdated)==null||p.call(d,c),this.emit(Et.SpeakerUpdated,c)},onBotConnected:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onBotConnected)==null||p.call(d,c),this.emit(Et.BotConnected,c)},onBotReady:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onBotReady)==null||p.call(d,c),this.emit(Et.BotReady,c)},onBotDisconnected:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onBotDisconnected)==null||p.call(d,c),this.emit(Et.BotDisconnected,c)},onBotStartedSpeaking:()=>{var c,d;(d=(c=i==null?void 0:i.callbacks)==null?void 0:c.onBotStartedSpeaking)==null||d.call(c),this.emit(Et.BotStartedSpeaking)},onBotStoppedSpeaking:()=>{var c,d;(d=(c=i==null?void 0:i.callbacks)==null?void 0:c.onBotStoppedSpeaking)==null||d.call(c),this.emit(Et.BotStoppedSpeaking)},onRemoteAudioLevel:(c,d)=>{var p,y;(y=(p=i==null?void 0:i.callbacks)==null?void 0:p.onRemoteAudioLevel)==null||y.call(p,c,d),this.emit(Et.RemoteAudioLevel,c,d)},onUserStartedSpeaking:()=>{var c,d;(d=(c=i==null?void 0:i.callbacks)==null?void 0:c.onUserStartedSpeaking)==null||d.call(c),this.emit(Et.UserStartedSpeaking)},onUserStoppedSpeaking:()=>{var c,d;(d=(c=i==null?void 0:i.callbacks)==null?void 0:c.onUserStoppedSpeaking)==null||d.call(c),this.emit(Et.UserStoppedSpeaking)},onLocalAudioLevel:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onLocalAudioLevel)==null||p.call(d,c),this.emit(Et.LocalAudioLevel,c)},onUserTranscript:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onUserTranscript)==null||p.call(d,c),this.emit(Et.UserTranscript,c)},onBotTranscript:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onBotTranscript)==null||p.call(d,c),this.emit(Et.BotTranscript,c)},onBotLlmText:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onBotLlmText)==null||p.call(d,c),this.emit(Et.BotLlmText,c)},onBotLlmStarted:()=>{var c,d;(d=(c=i==null?void 0:i.callbacks)==null?void 0:c.onBotLlmStarted)==null||d.call(c),this.emit(Et.BotLlmStarted)},onBotLlmStopped:()=>{var c,d;(d=(c=i==null?void 0:i.callbacks)==null?void 0:c.onBotLlmStopped)==null||d.call(c),this.emit(Et.BotLlmStopped)},onBotTtsText:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onBotTtsText)==null||p.call(d,c),this.emit(Et.BotTtsText,c)},onBotTtsStarted:()=>{var c,d;(d=(c=i==null?void 0:i.callbacks)==null?void 0:c.onBotTtsStarted)==null||d.call(c),this.emit(Et.BotTtsStarted)},onBotTtsStopped:()=>{var c,d;(d=(c=i==null?void 0:i.callbacks)==null?void 0:c.onBotTtsStopped)==null||d.call(c),this.emit(Et.BotTtsStopped)},onStorageItemStored:c=>{var d,p;(p=(d=i==null?void 0:i.callbacks)==null?void 0:d.onStorageItemStored)==null||p.call(d,c),this.emit(Et.StorageItemStored,c)}};this._options={...i,callbacks:o,enableMic:i.enableMic??!0,enableCam:i.enableCam??!1},this._initialize(),Cn.debug("[RTVI Client] Initialized",this.version)}constructUrl(i){var c;if(!this.params.baseUrl)throw new Zs("Base URL not set. Please set rtviClient.params.baseUrl");return this.params.baseUrl.replace(/\/+$/,"")+(((c=this.params.endpoints)==null?void 0:c[i])??"")}setLogLevel(i){Cn.setLevel(i)}async initDevices(){Cn.debug("[RTVI Client] Initializing devices..."),await this._transport.initDevices()}async connect(){if(["authenticating","connecting","connected","ready"].includes(this._transport.state))throw new Zs("Voice client has already been started. Please call disconnect() before starting again.");return this._abortController=new AbortController,new Promise((i,o)=>{(async()=>{var p,y,x;this._startResolve=i,this._transport.state==="disconnected"&&await this._transport.initDevices(),this._transport.state="authenticating",this._options.timeout&&(this._handshakeTimeout=setTimeout(async()=>{var b;(b=this._abortController)==null||b.abort(),await this.disconnect(),this._transport.state="error",o(new H3)},this._options.timeout));let c;const d=this._options.customConnectHandler;if(Cn.debug("[RTVI Client] Start params",this.params),this.params={...this.params,requestData:{...this.params.requestData,rtvi_client_version:this.version}},!this.params.baseUrl&&!((p=this.params.endpoints)!=null&&p.connect))Cn.debug("[RTVI Client] Connecting directly (skipping handshake / auth)..."),clearTimeout(this._handshakeTimeout);else{const b=this.constructUrl("connect");Cn.debug("[RTVI Client] Connecting...",b),Cn.debug("[RTVI Client] Start params",this.params);try{d?c=await d(this.params,this._handshakeTimeout,this._abortController):c=await fetch(b,{method:"POST",mode:"cors",headers:new Headers({"Content-Type":"application/json",...Object.fromEntries((this.params.headers??new Headers).entries())}),body:JSON.stringify({config:this.params.config,...this.params.services?{services:this.params.services}:{},...this.params.requestData}),signal:(y=this._abortController)==null?void 0:y.signal}).then(k=>(clearTimeout(this._handshakeTimeout),k.ok?k.json():Promise.reject(k)))}catch(k){if(clearTimeout(this._handshakeTimeout),(x=this._abortController)!=null&&x.signal.aborted)return;if(this._transport.state="error",k instanceof Response){const O=await k.json();o(new a2(O.info??O.detail??k.statusText,k.status))}else o(new a2);return}Cn.debug("[RTVI Client] Auth bundle received",c)}try{await this._transport.connect(c,this._abortController),await this._transport.sendReadyMessage()}catch(b){clearTimeout(this._handshakeTimeout),this.disconnect(),o(b);return}})()})}async disconnect(){this._abortController&&this._abortController.abort(),clearTimeout(this._handshakeTimeout),await this._transport.disconnect(),this._messageDispatcher=new r2(this)}_initialize(){this._transport.initialize(this._options,this.handleMessage.bind(this)),this._messageDispatcher=new r2(this)}get connected(){return["connected","ready"].includes(this._transport.state)}get transport(){return this._transportWrapper.proxy}get state(){return this._transport.state}get version(){return dk(U3).version}async getAllMics(){return await this._transport.getAllMics()}async getAllCams(){return await this._transport.getAllCams()}async getAllSpeakers(){return await this._transport.getAllSpeakers()}get selectedMic(){return this._transport.selectedMic}get selectedCam(){return this._transport.selectedCam}get selectedSpeaker(){return this._transport.selectedSpeaker}updateMic(i){this._transport.updateMic(i)}updateCam(i){this._transport.updateCam(i)}updateSpeaker(i){this._transport.updateSpeaker(i)}enableMic(i){this._transport.enableMic(i)}get isMicEnabled(){return this._transport.isMicEnabled}enableCam(i){this._transport.enableCam(i)}get isCamEnabled(){return this._transport.isCamEnabled}tracks(){return this._transport.tracks()}enableScreenShare(i){return this._transport.enableScreenShare(i)}get isSharingScreen(){return this._transport.isSharingScreen}async getConfig(){return(await this._messageDispatcher.dispatch(Yi.getBotConfig())).data.config}async updateConfig(i,o=!1){return Cn.debug("[RTVI Client] Updating config",i),this._messageDispatcher.dispatch(Yi.updateConfig(i,o))}async describeConfig(){return this._messageDispatcher.dispatch(Yi.describeConfig())}async getServiceOptionsFromConfig(i,o){if(!o&&this.state!=="ready")throw new Oc("getServiceOptionsFromConfig called without config array before bot is ready");return Promise.resolve().then(async()=>{if(!i){Cn.debug("Target service name is required");return}const d=(o??await this.getConfig()).find(p=>p.service===i);if(!d){Cn.debug("No service with name "+i+" not found in config");return}return d})}async getServiceOptionValueFromConfig(i,o,c){const d=await this.getServiceOptionsFromConfig(i,c);if(!d){Cn.debug("Service with name "+i+" not found in config");return}const p=d.options.find(y=>y.name===o);return p?p.value:void 0}_updateOrAddOption(i,o){const c=i.findIndex(d=>d.name===o.name);return c!==-1?i.map((d,p)=>p===c?{...d,value:o.value}:d):[...i,{name:o.name,value:o.value}]}async setServiceOptionInConfig(i,o,c){const d=R3(c??await this.getConfig());if(!await this.getServiceOptionsFromConfig(i,d))return Cn.debug("Service with name '"+i+"' not found in config"),d;const y=Array.isArray(o)?o:[o];for(const x of y){const b=d.find(O=>O.service===i),k=b?this._updateOrAddOption(b.options,x):[{name:x.name,value:x.value}];b?b.options=k:d.push({service:i,options:k})}return d}async setConfigOptions(i,o){let c=R3(o??await this.getConfig());for(const d of i)c=await this.setServiceOptionInConfig(d.service,d.options,c)||c;return c}async action(i){return this._messageDispatcher.dispatchAction(new q3(i),this.handleMessage.bind(this))}async describeActions(){return this._messageDispatcher.dispatch(Yi.describeActions())}get transportExpiry(){return this._transport.expiry}sendMessage(i){this._transport.sendMessage(i)}disconnectBot(){this._transport.sendMessage(new Yi(Tn.DISCONNECT_BOT,{}))}handleMessage(i){var o,c,d,p,y,x,b,k,O,N,Z,J,D,F,ae,ee,B,Y,$,Q,z,V,le,se,K,L,X,H,A,S,T,E,P,te,_,re,me,g,w,C,q,ce,j,U,ne,ge,R;switch(Cn.debug("[RTVI Message]",i),i.type){case Tn.BOT_READY:clearTimeout(this._handshakeTimeout),(o=this._startResolve)==null||o.call(this,i.data),(d=(c=this._options.callbacks)==null?void 0:c.onBotReady)==null||d.call(c,i.data);break;case Tn.CONFIG_AVAILABLE:this._messageDispatcher.resolve(i),(y=(p=this._options.callbacks)==null?void 0:p.onConfigDescribe)==null||y.call(p,i.data);break;case Tn.CONFIG:{const G=this._messageDispatcher.resolve(i);(b=(x=this._options.callbacks)==null?void 0:x.onConfig)==null||b.call(x,G.data.config);break}case Tn.ACTIONS_AVAILABLE:this._messageDispatcher.resolve(i),(O=(k=this._options.callbacks)==null?void 0:k.onActionsAvailable)==null||O.call(k,i.data);break;case Tn.ACTION_RESPONSE:this._messageDispatcher.resolve(i);break;case Tn.ERROR_RESPONSE:{const G=this._messageDispatcher.reject(i);(Z=(N=this._options.callbacks)==null?void 0:N.onMessageError)==null||Z.call(N,G);break}case Tn.ERROR:(D=(J=this._options.callbacks)==null?void 0:J.onError)==null||D.call(J,i);break;case Tn.USER_STARTED_SPEAKING:(ae=(F=this._options.callbacks)==null?void 0:F.onUserStartedSpeaking)==null||ae.call(F);break;case Tn.USER_STOPPED_SPEAKING:(B=(ee=this._options.callbacks)==null?void 0:ee.onUserStoppedSpeaking)==null||B.call(ee);break;case Tn.BOT_STARTED_SPEAKING:($=(Y=this._options.callbacks)==null?void 0:Y.onBotStartedSpeaking)==null||$.call(Y);break;case Tn.BOT_STOPPED_SPEAKING:(z=(Q=this._options.callbacks)==null?void 0:Q.onBotStoppedSpeaking)==null||z.call(Q);break;case Tn.USER_TRANSCRIPTION:{const G=i.data;(le=(V=this._options.callbacks)==null?void 0:V.onUserTranscript)==null||le.call(V,G);break}case Tn.BOT_TRANSCRIPTION:(K=(se=this._options.callbacks)==null?void 0:se.onBotTranscript)==null||K.call(se,i.data);break;case Tn.BOT_LLM_TEXT:(X=(L=this._options.callbacks)==null?void 0:L.onBotLlmText)==null||X.call(L,i.data);break;case Tn.BOT_LLM_STARTED:(A=(H=this._options.callbacks)==null?void 0:H.onBotLlmStarted)==null||A.call(H);break;case Tn.BOT_LLM_STOPPED:(T=(S=this._options.callbacks)==null?void 0:S.onBotLlmStopped)==null||T.call(S);break;case Tn.BOT_TTS_TEXT:(P=(E=this._options.callbacks)==null?void 0:E.onBotTtsText)==null||P.call(E,i.data);break;case Tn.BOT_TTS_STARTED:(_=(te=this._options.callbacks)==null?void 0:te.onBotTtsStarted)==null||_.call(te);break;case Tn.BOT_TTS_STOPPED:(me=(re=this._options.callbacks)==null?void 0:re.onBotTtsStopped)==null||me.call(re);break;case Tn.BOT_LLM_SEARCH_RESPONSE:(w=(g=this._options.callbacks)==null?void 0:g.onBotLlmSearchResponse)==null||w.call(g,i.data),this.emit(Et.BotLlmSearchResponse,i.data);break;case Tn.METRICS:this.emit(Et.Metrics,i.data),(q=(C=this._options.callbacks)==null?void 0:C.onMetrics)==null||q.call(C,i.data);break;case Tn.STORAGE_ITEM_STORED:(j=(ce=this._options.callbacks)==null?void 0:ce.onStorageItemStored)==null||j.call(ce,i.data);break;case Tn.SERVER_MESSAGE:(ne=(U=this._options.callbacks)==null?void 0:U.onServerMessage)==null||ne.call(U,i.data),this.emit(Et.ServerMessage,i.data);break;default:{let G=!1;for(const ie of Object.values(this._helpers))ie.getMessageTypes().includes(i.type)&&(G=!0,ie.handleMessage(i));G||(R=(ge=this._options.callbacks)==null?void 0:ge.onGenericMessage)==null||R.call(ge,i.data)}}}registerHelper(i,o){if(this._helpers[i])throw new Error(`Helper with name '${i}' already registered`);if(!(o instanceof s2))throw new Error("Helper must be an instance of RTVIClientHelper");return o.service=i,o.client=this,this._helpers[i]=o,this._helpers[i]}getHelper(i){const o=this._helpers[i];if(!o){Cn.debug(`Helper targeting service '${i}' not found`);return}return o}unregisterHelper(i){this._helpers[i]&&delete this._helpers[i]}}ad([nf],xl.prototype,"getConfig",null),ad([nf],xl.prototype,"updateConfig",null),ad([nf],xl.prototype,"describeConfig",null),ad([nf],xl.prototype,"describeActions",null),ad([gk("connected","ready")],xl.prototype,"transportExpiry",null),ad([nf],xl.prototype,"sendMessage",null),ad([nf],xl.prototype,"disconnectBot",null);var o2={};Mi(o2,"LLMMessageType",()=>jc),Mi(o2,"LLMActionType",()=>sd),Mi(o2,"LLMHelper",()=>Sk);var jc;(function(r){r.LLM_FUNCTION_CALL="llm-function-call",r.LLM_FUNCTION_CALL_START="llm-function-call-start",r.LLM_FUNCTION_CALL_RESULT="llm-function-call-result",r.LLM_JSON_COMPLETION="llm-json-completion"})(jc||(jc={}));var sd;(function(r){r.APPEND_TO_MESSAGES="append_to_messages",r.GET_CONTEXT="get_context",r.SET_CONTEXT="set_context",r.RUN="run"})(sd||(sd={}));class Sk extends s2{constructor(i){super(i),this._functionCallCallback=null}getMessageTypes(){return Object.values(jc)}async getContext(){if(this._client.state!=="ready")throw new Oc("getContext called while transport not in ready state");return(await this._client.action({service:this._service,action:sd.GET_CONTEXT})).data.result}async setContext(i,o=!1){if(this._client.state!=="ready")throw new Oc("setContext called while transport not in ready state");return!!(await this._client.action({service:this._service,action:sd.SET_CONTEXT,arguments:[{name:"messages",value:i.messages},{name:"interrupt",value:o}]})).data.result}async appendToMessages(i,o=!1){if(this._client.state!=="ready")throw new Oc("setContext called while transport not in ready state");return!!(await this._client.action({service:this._service,action:sd.APPEND_TO_MESSAGES,arguments:[{name:"messages",value:[i]},{name:"run_immediately",value:o}]})).data.result}async run(i=!1){if(this._client.state==="ready")return this._client.action({service:this._service,action:sd.RUN,arguments:[{name:"interrupt",value:i}]})}handleFunctionCall(i){this._functionCallCallback=i}handleMessage(i){var o,c,d,p,y,x;switch(i.type){case jc.LLM_JSON_COMPLETION:(c=(o=this._options.callbacks)==null?void 0:o.onLLMJsonCompletion)==null||c.call(o,i.data),this._client.emit(Et.LLMJsonCompletion,i.data);break;case jc.LLM_FUNCTION_CALL:{const b=i.data;if((p=(d=this._options.callbacks)==null?void 0:d.onLLMFunctionCall)==null||p.call(d,i.data),this._client.emit(Et.LLMFunctionCall,i.data),this._functionCallCallback){const k={functionName:b.function_name,arguments:b.args};if(this._client.state==="ready")this._functionCallCallback(k).then(O=>{this._client.sendMessage(new Yi(jc.LLM_FUNCTION_CALL_RESULT,{function_name:b.function_name,tool_call_id:b.tool_call_id,arguments:b.args,result:O}))});else throw new Oc("Attempted to send a function call result from bot while transport not in ready state")}break}case jc.LLM_FUNCTION_CALL_START:{const b=i.data;(x=(y=this._options.callbacks)==null?void 0:y.onLLMFunctionCallStart)==null||x.call(y,b.function_name),this._client.emit(Et.LLMFunctionCallStart,b.function_name);break}}}}var wk={};Mi(wk,"Transport",()=>G3);class G3{constructor(){this._state="disconnected",this._expiry=void 0}get expiry(){return this._expiry}}const qg={},Y3=(r,i)=>r.unstable_is?r.unstable_is(i):i===r,X3=r=>"init"in r,l2=r=>!!r.write,F3=r=>"v"in r||"e"in r,uy=r=>{if("e"in r)throw r.e;if((qg?"production":void 0)!=="production"&&!("v"in r))throw new Error("[Bug] atom state is not initialized");return r.v},dy=new WeakMap,Z3=r=>{var i;return hy(r)&&!!((i=dy.get(r))!=null&&i[0])},Ck=r=>{const i=dy.get(r);i!=null&&i[0]&&(i[0]=!1,i[1].forEach(o=>o()))},Q3=(r,i)=>{let o=dy.get(r);if(!o){o=[!0,new Set],dy.set(r,o);const c=()=>{o[0]=!1};r.then(c,c)}o[1].add(i)},hy=r=>typeof(r==null?void 0:r.then)=="function",J3=(r,i,o)=>{o.p.has(r)||(o.p.add(r),i.then(()=>{o.p.delete(r)},()=>{o.p.delete(r)}))},c2=(r,i,o)=>{const c=o(r),d="v"in c,p=c.v;if(hy(i))for(const y of c.d.keys())J3(r,i,o(y));c.v=i,delete c.e,(!d||!Object.is(p,c.v))&&(++c.n,hy(p)&&Ck(p))},W3=(r,i,o)=>{var c;const d=new Set;for(const p of((c=o.get(r))==null?void 0:c.t)||[])o.has(p)&&d.add(p);for(const p of i.p)d.add(p);return d},Tk=()=>{const r=new Set,i=()=>{r.forEach(o=>o())};return i.add=o=>(r.add(o),()=>{r.delete(o)}),i},u2=()=>{const r={},i=new WeakMap,o=c=>{var d,p;(d=i.get(r))==null||d.forEach(y=>y(c)),(p=i.get(c))==null||p.forEach(y=>y())};return o.add=(c,d)=>{const p=c||r,y=(i.has(p)?i:i.set(p,new Set)).get(p);return y.add(d),()=>{y==null||y.delete(d),y.size||i.delete(p)}},o},kk=r=>(r.c||(r.c=u2()),r.m||(r.m=u2()),r.u||(r.u=u2()),r.f||(r.f=Tk()),r),Mk=Symbol(),K3=(r=new WeakMap,i=new WeakMap,o=new WeakMap,c=new Set,d=new Set,p=new Set,y={},x=(Z,...J)=>Z.read(...J),b=(Z,...J)=>Z.write(...J),k=(Z,J)=>{var D;return(D=Z.unstable_onInit)==null?void 0:D.call(Z,J)},O=(Z,J)=>{var D;return(D=Z.onMount)==null?void 0:D.call(Z,J)},...N)=>{const Z=N[0]||(V=>{if((qg?"production":void 0)!=="production"&&!V)throw new Error("Atom is undefined or null");let le=r.get(V);return le||(le={d:new Map,p:new Set,n:0},r.set(V,le),k==null||k(V,z)),le}),J=N[1]||(()=>{const V=[],le=se=>{try{se()}catch(K){V.push(K)}};do{y.f&&le(y.f);const se=new Set,K=se.add.bind(se);c.forEach(L=>{var X;return(X=i.get(L))==null?void 0:X.l.forEach(K)}),c.clear(),p.forEach(K),p.clear(),d.forEach(K),d.clear(),se.forEach(le),c.size&&D()}while(c.size||p.size||d.size);if(V.length)throw new AggregateError(V)}),D=N[2]||(()=>{const V=[],le=new WeakSet,se=new WeakSet,K=Array.from(c);for(;K.length;){const L=K[K.length-1],X=Z(L);if(se.has(L)){K.pop();continue}if(le.has(L)){if(o.get(L)===X.n)V.push([L,X]);else if((qg?"production":void 0)!=="production"&&o.has(L))throw new Error("[Bug] invalidated atom exists");se.add(L),K.pop();continue}le.add(L);for(const H of W3(L,X,i))le.has(H)||K.push(H)}for(let L=V.length-1;L>=0;--L){const[X,H]=V[L];let A=!1;for(const S of H.d.keys())if(S!==X&&c.has(S)){A=!0;break}A&&(F(X),B(X)),o.delete(X)}}),F=N[3]||(V=>{var le;const se=Z(V);if(F3(se)&&(i.has(V)&&o.get(V)!==se.n||Array.from(se.d).every(([E,P])=>F(E).n===P)))return se;se.d.clear();let K=!0;const L=()=>{i.has(V)&&(B(V),D(),J())},X=E=>{var P;if(Y3(V,E)){const _=Z(E);if(!F3(_))if(X3(E))c2(E,E.init,Z);else throw new Error("no atom init");return uy(_)}const te=F(E);try{return uy(te)}finally{se.d.set(E,te.n),Z3(se.v)&&J3(V,se.v,te),(P=i.get(E))==null||P.t.add(V),K||L()}};let H,A;const S={get signal(){return H||(H=new AbortController),H.signal},get setSelf(){return(qg?"production":void 0)!=="production"&&!l2(V)&&console.warn("setSelf function cannot be used with read-only atom"),!A&&l2(V)&&(A=(...E)=>{if((qg?"production":void 0)!=="production"&&K&&console.warn("setSelf function cannot be called in sync"),!K)try{return ee(V,...E)}finally{D(),J()}}),A}},T=se.n;try{const E=x(V,X,S);return c2(V,E,Z),hy(E)&&(Q3(E,()=>H==null?void 0:H.abort()),E.then(L,L)),se}catch(E){return delete se.v,se.e=E,++se.n,se}finally{K=!1,T!==se.n&&o.get(V)===T&&(o.set(V,se.n),c.add(V),(le=y.c)==null||le.call(y,V))}}),ae=N[4]||(V=>{const le=[V];for(;le.length;){const se=le.pop(),K=Z(se);for(const L of W3(se,K,i)){const X=Z(L);o.set(L,X.n),le.push(L)}}}),ee=N[5]||((V,...le)=>{let se=!0;const K=X=>uy(F(X)),L=(X,...H)=>{var A;const S=Z(X);try{if(Y3(V,X)){if(!X3(X))throw new Error("atom not writable");const T=S.n,E=H[0];c2(X,E,Z),B(X),T!==S.n&&(c.add(X),(A=y.c)==null||A.call(y,X),ae(X));return}else return ee(X,...H)}finally{se||(D(),J())}};try{return b(V,K,L,...le)}finally{se=!1}}),B=N[6]||(V=>{var le;const se=Z(V),K=i.get(V);if(K&&!Z3(se.v)){for(const[L,X]of se.d)if(!K.d.has(L)){const H=Z(L);Y(L).t.add(V),K.d.add(L),X!==H.n&&(c.add(L),(le=y.c)==null||le.call(y,L),ae(L))}for(const L of K.d||[])if(!se.d.has(L)){K.d.delete(L);const X=$(L);X==null||X.t.delete(V)}}}),Y=N[7]||(V=>{var le;const se=Z(V);let K=i.get(V);if(!K){F(V);for(const L of se.d.keys())Y(L).t.add(V);if(K={l:new Set,d:new Set(se.d.keys()),t:new Set},i.set(V,K),(le=y.m)==null||le.call(y,V),l2(V)){const L=()=>{let X=!0;const H=(...A)=>{try{return ee(V,...A)}finally{X||(D(),J())}};try{const A=O(V,H);A&&(K.u=()=>{X=!0;try{A()}finally{X=!1}})}finally{X=!1}};d.add(L)}}return K}),$=N[8]||(V=>{var le;const se=Z(V);let K=i.get(V);if(K&&!K.l.size&&!Array.from(K.t).some(L=>{var X;return(X=i.get(L))==null?void 0:X.d.has(V)})){K.u&&p.add(K.u),K=void 0,i.delete(V),(le=y.u)==null||le.call(y,V);for(const L of se.d.keys()){const X=$(L);X==null||X.t.delete(V)}return}return K}),Q=[r,i,o,c,d,p,y,x,b,k,O,Z,J,D,F,ae,ee,B,Y,$],z={get:V=>uy(F(V)),set:(V,...le)=>{try{return ee(V,...le)}finally{D(),J()}},sub:(V,le)=>{const K=Y(V).l;return K.add(le),J(),()=>{K.delete(le),$(V),J()}}};return Object.defineProperty(z,Mk,{value:Q}),z},Ak=kk,e6=Q3,d2={};let Ek=0;function os(r,i){const o=`atom${++Ek}`,c={toString(){return(d2?"production":void 0)!=="production"&&this.debugLabel?o+":"+this.debugLabel:o}};return typeof r=="function"?c.read=r:(c.init=r,c.read=_k,c.write=Ok),i&&(c.write=i),c}function _k(r){return r(this)}function Ok(r,i,o){return i(this,typeof o=="function"?o(r(this)):o)}const Dk=()=>{let r=0;const i=Ak({}),o=new WeakMap,c=new WeakMap,d=K3(o,c,void 0,void 0,void 0,void 0,i,void 0,(x,b,k,...O)=>r?k(x,...O):x.write(b,k,...O)),p=new Set;return i.m.add(void 0,x=>{p.add(x);const b=o.get(x);b.m=c.get(x)}),i.u.add(void 0,x=>{p.delete(x);const b=o.get(x);delete b.m}),Object.assign(d,{dev4_get_internal_weak_map:()=>o,dev4_get_mounted_atoms:()=>p,dev4_restore_atoms:x=>{const b={read:()=>null,write:(k,O)=>{++r;try{for(const[N,Z]of x)"init"in N&&O(N,Z)}finally{--r}}};d.set(b)}})};function h2(){return(d2?"production":void 0)!=="production"?Dk():K3()}let Gg;function jk(){return Gg||(Gg=h2(),(d2?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Gg),globalThis.__JOTAI_DEFAULT_STORE__!==Gg&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Gg}const Lk={},t6=Pe.createContext(void 0);function n6(r){const i=Pe.useContext(t6);return(r==null?void 0:r.store)||i||jk()}function Rk({children:r,store:i}){const o=Pe.useRef(void 0);return!i&&!o.current&&(o.current=h2()),Pe.createElement(t6.Provider,{value:i||o.current},r)}const f2=r=>typeof(r==null?void 0:r.then)=="function",p2=r=>{r.status||(r.status="pending",r.then(i=>{r.status="fulfilled",r.value=i},i=>{r.status="rejected",r.reason=i}))},Nk=Pe.use||(r=>{if(r.status==="pending")throw r;if(r.status==="fulfilled")return r.value;throw r.status==="rejected"?r.reason:(p2(r),r)}),g2=new WeakMap,i6=(r,i)=>{let o=g2.get(r);return o||(o=new Promise((c,d)=>{let p=r;const y=k=>O=>{p===k&&c(O)},x=k=>O=>{p===k&&d(O)},b=()=>{try{const k=i();f2(k)?(g2.set(k,o),p=k,k.then(y(k),x(k)),e6(k,b)):c(k)}catch(k){d(k)}};r.then(y(r),x(r)),e6(r,b)}),g2.set(r,o)),o};function a6(r,i){const{delay:o,unstable_promiseStatus:c=!Pe.use}=i||{},d=n6(i),[[p,y,x],b]=Pe.useReducer(O=>{const N=d.get(r);return Object.is(O[0],N)&&O[1]===d&&O[2]===r?O:[N,d,r]},void 0,()=>[d.get(r),d,r]);let k=p;if((y!==d||x!==r)&&(b(),k=d.get(r)),Pe.useEffect(()=>{const O=d.sub(r,()=>{if(c)try{const N=d.get(r);f2(N)&&p2(i6(N,()=>d.get(r)))}catch{}if(typeof o=="number"){setTimeout(b,o);return}b()});return b(),O},[d,r,o,c]),Pe.useDebugValue(k),f2(k)){const O=i6(k,()=>d.get(r));return c&&p2(O),Nk(O)}return k}function s6(r,i){const o=n6(i);return Pe.useCallback((...d)=>{if((Lk?"production":void 0)!=="production"&&!("write"in r))throw new Error("not writable atom");return o.set(r,...d)},[o,r])}function zk(r,i){return[a6(r,i),s6(r,i)]}const Bk={};function Uk(r,i){let o=null;const c=new Map,d=new Set,p=x=>{let b;if(i===void 0)b=c.get(x);else for(const[O,N]of c)if(i(O,x)){b=N;break}if(b!==void 0)if(o!=null&&o(b[1],x))p.remove(x);else return b[0];const k=r(x);return c.set(x,[k,Date.now()]),y("CREATE",x,k),k},y=(x,b,k)=>{for(const O of d)O({type:x,param:b,atom:k})};return p.unstable_listen=x=>(d.add(x),()=>{d.delete(x)}),p.getParams=()=>c.keys(),p.remove=x=>{if(i===void 0){if(!c.has(x))return;const[b]=c.get(x);c.delete(x),y("REMOVE",x,b)}else for(const[b,[k]]of c)if(i(b,x)){c.delete(b),y("REMOVE",b,k);break}},p.setShouldRemove=x=>{if(o=x,!!o)for(const[b,[k,O]]of c)o(O,b)&&(c.delete(b),y("REMOVE",b,k))},p}const Hk=r=>typeof(r==null?void 0:r.then)=="function";function Pk(r=()=>{try{return window.localStorage}catch(o){(Bk?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(o);return}},i){var o;let c,d;const p={getItem:(b,k)=>{var O,N;const Z=D=>{if(D=D||"",c!==D){try{d=JSON.parse(D,i==null?void 0:i.reviver)}catch{return k}c=D}return d},J=(N=(O=r())==null?void 0:O.getItem(b))!=null?N:null;return Hk(J)?J.then(Z):Z(J)},setItem:(b,k)=>{var O;return(O=r())==null?void 0:O.setItem(b,JSON.stringify(k,void 0))},removeItem:b=>{var k;return(k=r())==null?void 0:k.removeItem(b)}},y=b=>(k,O,N)=>b(k,Z=>{let J;try{J=JSON.parse(Z||"")}catch{J=N}O(J)});let x;try{x=(o=r())==null?void 0:o.subscribe}catch{}return!x&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(x=(b,k)=>{if(!(r()instanceof window.Storage))return()=>{};const O=N=>{N.storageArea===r()&&N.key===b&&k(N.newValue)};return window.addEventListener("storage",O),()=>{window.removeEventListener("storage",O)}}),x&&(p.subscribe=y(x)),p}Pk();function Vk(r,i){const o=Pe.useMemo(()=>os(null,(c,d,...p)=>r(c,d,...p)),[r]);return s6(o,i)}const $k=h2(),r6=Pe.createContext({}),o6=({children:r,client:i,jotaiStore:o=$k})=>W.jsx(Rk,{store:o,children:W.jsx(r6.Provider,{value:{client:i},children:r})});o6.displayName="RTVIClientProvider";const Yg=()=>{const{client:r}=Pe.useContext(r6);return r},pi=(r,i)=>{const o=Yg();Pe.useEffect(()=>{if(o)return o.on(r,i),()=>{o.off(r,i)}},[r,i,o])},Ik=os(null),qk=os(null),Gk=os(null),Yk=os(null),Xk=os(null),Fk=os(null),l6=Uk(({local:r,trackType:i})=>{if(r)switch(i){case"audio":return Ik;case"screenAudio":return Gk;case"screenVideo":return Yk;case"video":return qk}return i==="audio"?Xk:Fk}),m2=(r,i)=>{const o=Yg(),c=a6(l6({local:i==="local",trackType:r})),d=Vk(Pe.useCallback((p,y,x,b,k)=>{const O=l6({local:k,trackType:b}),N=p(O);(N==null?void 0:N.id)!==x.id&&y(O,x)},[i,c,r]));return pi(Et.TrackStarted,Pe.useCallback((p,y)=>{d(p,p.kind,!!(y!=null&&y.local))},[])),pi(Et.ScreenTrackStarted,Pe.useCallback((p,y)=>{const x=p.kind==="audio"?"screenAudio":"screenVideo";d(p,x,!!(y!=null&&y.local))},[])),Pe.useEffect(()=>{var x;if(!o)return;const p=o.tracks(),y=(x=p==null?void 0:p[i])==null?void 0:x[r];y&&d(y,r,i==="local")},[i,r,d,o]),c},c6=()=>{const r=Pe.useRef(null),i=m2("audio","bot");return Pe.useEffect(()=>{!r.current||!i||r.current.srcObject&&r.current.srcObject.getAudioTracks()[0].id===i.id||(r.current.srcObject=new MediaStream([i]))},[i]),pi(Et.SpeakerUpdated,Pe.useCallback(o=>{r.current&&typeof r.current.setSinkId=="function"&&r.current.setSinkId(o.deviceId)},[])),W.jsx(W.Fragment,{children:W.jsx("audio",{ref:r,autoPlay:!0})})};c6.displayName="RTVIClientAudio";function Zk(...r){return Pe.useCallback(i=>{for(let o=0;o<r.length;o++){const c=r[o];typeof c=="function"?c(i):c&&typeof c=="object"&&(c.current=i)}},r)}var Qk=Zk;const Jk=Pe.forwardRef(function({participant:i="local",fit:o="contain",mirror:c,onResize:d,style:p={},trackType:y="video",...x},b){const k=m2(y,i),O=Pe.useRef(null),N=Qk(O,b);return Pe.useEffect(function(){const J=O.current;if(!J)return;const D=()=>{const Y=J.play();Y!==void 0&&Y.then(()=>{J.controls=!1}).catch($=>{J.controls=!0,console.warn("Failed to play video",$)})},F=()=>{J.paused&&D()},ae=()=>{J.style.transform="scale(1)"},ee=()=>{J.style.transform="",setTimeout(()=>{J.paused&&D()},100)},B=()=>{document.visibilityState!=="hidden"&&J.paused&&D()};return J.addEventListener("canplay",F),J.addEventListener("enterpictureinpicture",ae),J.addEventListener("leavepictureinpicture",ee),document.addEventListener("visibilitychange",B),()=>{J.removeEventListener("canplay",F),J.removeEventListener("enterpictureinpicture",ae),J.removeEventListener("leavepictureinpicture",ee),document.removeEventListener("visibilitychange",B)}},[]),Pe.useEffect(function(){const J=O.current;if(!(!J||!k))return J.srcObject=new MediaStream([k]),J.load(),()=>{J.srcObject=null,J.load()}},[k,k==null?void 0:k.id]),Pe.useEffect(function(){const J=O.current;if(!d||!J)return;let D;function F(){D&&cancelAnimationFrame(D),D=requestAnimationFrame(()=>{const ae=O.current;if(!ae||document.hidden)return;const ee=ae.videoWidth,B=ae.videoHeight;ee&&B&&(d==null||d({aspectRatio:ee/B,height:B,width:ee}))})}return F(),J.addEventListener("loadedmetadata",F),J.addEventListener("resize",F),()=>{D&&cancelAnimationFrame(D),J.removeEventListener("loadedmetadata",F),J.removeEventListener("resize",F)}},[d]),W.jsx("video",{autoPlay:!0,muted:!0,playsInline:!0,ref:N,style:{objectFit:o,transform:c?"scale(-1, 1)":"",...p},...x})});Jk.displayName="RTVIClientVideo",os([]),os([]),os([]),os({}),os({}),os({});const Wk=os("disconnected"),u6=()=>{const[r,i]=zk(Wk);return pi(Et.TransportStateChanged,i),r},Kk=Pe.memo(({backgroundColor:r="transparent",barColor:i="black",barWidth:o=30,barGap:c=12,barMaxHeight:d=120,participantType:p})=>{const y=Pe.useRef(null),x=m2("audio",p);return Pe.useEffect(()=>{if(!y.current)return;const b=5*o+4*c,k=d,O=y.current,N=2,Z=()=>{O.width=b*N,O.height=k*N,O.style.width=`${b}px`,O.style.height=`${k}px`,J.lineCap="round",J.scale(N,N)},J=O.getContext("2d");if(Z(),!x)return;const D=new AudioContext,F=D.createMediaStreamSource(new MediaStream([x])),ae=D.createAnalyser();ae.fftSize=1024,F.connect(ae);const ee=new Uint8Array(ae.frequencyBinCount);J.lineCap="round";const B=[{startFreq:85,endFreq:255,smoothValue:0},{startFreq:255,endFreq:500,smoothValue:0},{startFreq:500,endFreq:2e3,smoothValue:0},{startFreq:2e3,endFreq:4e3,smoothValue:0},{startFreq:4e3,endFreq:8e3,smoothValue:0}],Y=z=>{const V=D.sampleRate/2;return Math.round(z/V*(ae.frequencyBinCount-1))};function $(){ae.getByteFrequencyData(ee),J.clearRect(0,0,O.width/N,O.height/N),J.fillStyle=r,J.fillRect(0,0,O.width/N,O.height/N);let z=!1;const V=B.length*o+(B.length-1)*c,le=(O.width/N-V)/2,se=o/2;B.forEach((K,L)=>{const X=Y(K.startFreq),H=Y(K.endFreq),A=ee.slice(X,H),S=A.reduce((re,me)=>re+me,0)/A.length,T=.2;S<1?K.smoothValue=Math.max(K.smoothValue-T*5,0):(K.smoothValue=K.smoothValue+(S-K.smoothValue)*T,z=!0);const E=le+L*(o+c),P=Math.min(K.smoothValue/255*d,d),te=Math.max(O.height/N/2-P/2,se),_=Math.min(O.height/N/2+P/2,O.height/N-se);K.smoothValue>0?(J.beginPath(),J.moveTo(E+o/2,te),J.lineTo(E+o/2,_),J.lineWidth=o,J.strokeStyle=i,J.stroke()):(J.beginPath(),J.arc(E+o/2,O.height/N/2,se,0,2*Math.PI),J.fillStyle=i,J.fill(),J.closePath())}),z||Q(se,i),requestAnimationFrame($)}function Q(z,V){const le=B.length*o+(B.length-1)*c,se=(O.width/N-le)/2,K=O.height/N/2;B.forEach((L,X)=>{const H=se+X*(o+c);J.beginPath(),J.arc(H+o/2,K,z,0,2*Math.PI),J.fillStyle=V,J.fill(),J.closePath()})}return $(),window.addEventListener("resize",Z),()=>{D.close(),window.removeEventListener("resize",Z)}},[r,i,c,d,o,x]),W.jsx("canvas",{ref:y,style:{display:"block",width:"100%",height:"100%"}})});Kk.displayName="VoiceVisualizer";function d6(r,i){if(r==null)return{};var o,c,d=function(y,x){if(y==null)return{};var b={};for(var k in y)if({}.hasOwnProperty.call(y,k)){if(x.indexOf(k)!==-1)continue;b[k]=y[k]}return b}(r,i);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(r);for(c=0;c<p.length;c++)o=p[c],i.indexOf(o)===-1&&{}.propertyIsEnumerable.call(r,o)&&(d[o]=r[o])}return d}function As(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function Un(r){return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Un(r)}function h6(r){var i=function(o,c){if(Un(o)!="object"||!o)return o;var d=o[Symbol.toPrimitive];if(d!==void 0){var p=d.call(o,c);if(Un(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(r,"string");return Un(i)=="symbol"?i:i+""}function f6(r,i){for(var o=0;o<i.length;o++){var c=i[o];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(r,h6(c.key),c)}}function Es(r,i,o){return i&&f6(r.prototype,i),o&&f6(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}function fy(r,i){if(i&&(Un(i)=="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(r)}function $r(r){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},$r(r)}function Xg(r,i){return Xg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Xg(r,i)}function py(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(i&&i.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),i&&Xg(r,i)}function Eo(r,i,o){return(i=h6(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r}function p6(r,i,o,c,d,p,y){try{var x=r[p](y),b=x.value}catch(k){return void o(k)}x.done?i(b):Promise.resolve(b).then(c,d)}function tn(r){return function(){var i=this,o=arguments;return new Promise(function(c,d){var p=r.apply(i,o);function y(b){p6(p,c,d,y,x,"next",b)}function x(b){p6(p,c,d,y,x,"throw",b)}y(void 0)})}}function g6(r,i){(i==null||i>r.length)&&(i=r.length);for(var o=0,c=Array(i);o<i;o++)c[o]=r[o];return c}function $a(r,i){return function(o){if(Array.isArray(o))return o}(r)||function(o,c){var d=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(d!=null){var p,y,x,b,k=[],O=!0,N=!1;try{if(x=(d=d.call(o)).next,c===0){if(Object(d)!==d)return;O=!1}else for(;!(O=(p=x.call(d)).done)&&(k.push(p.value),k.length!==c);O=!0);}catch(Z){N=!0,y=Z}finally{try{if(!O&&d.return!=null&&(b=d.return(),Object(b)!==b))return}finally{if(N)throw y}}return k}}(r,i)||function(o,c){if(o){if(typeof o=="string")return g6(o,c);var d={}.toString.call(o).slice(8,-1);return d==="Object"&&o.constructor&&(d=o.constructor.name),d==="Map"||d==="Set"?Array.from(o):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?g6(o,c):void 0}}(r,i)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
100
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function e9(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var m6,y2={exports:{}},sf=typeof Reflect=="object"?Reflect:null,y6=sf&&typeof sf.apply=="function"?sf.apply:function(r,i,o){return Function.prototype.apply.call(r,i,o)};m6=sf&&typeof sf.ownKeys=="function"?sf.ownKeys:Object.getOwnPropertySymbols?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:function(r){return Object.getOwnPropertyNames(r)};var v6=Number.isNaN||function(r){return r!=r};function Qn(){Qn.init.call(this)}y2.exports=Qn,y2.exports.once=function(r,i){return new Promise(function(o,c){function d(y){r.removeListener(i,p),c(y)}function p(){typeof r.removeListener=="function"&&r.removeListener("error",d),o([].slice.call(arguments))}M6(r,i,p,{once:!0}),i!=="error"&&function(y,x,b){typeof y.on=="function"&&M6(y,"error",x,b)}(r,d,{once:!0})})},Qn.EventEmitter=Qn,Qn.prototype._events=void 0,Qn.prototype._eventsCount=0,Qn.prototype._maxListeners=void 0;var b6=10;function gy(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}function x6(r){return r._maxListeners===void 0?Qn.defaultMaxListeners:r._maxListeners}function S6(r,i,o,c){var d,p,y,x;if(gy(o),(p=r._events)===void 0?(p=r._events=Object.create(null),r._eventsCount=0):(p.newListener!==void 0&&(r.emit("newListener",i,o.listener?o.listener:o),p=r._events),y=p[i]),y===void 0)y=p[i]=o,++r._eventsCount;else if(typeof y=="function"?y=p[i]=c?[o,y]:[y,o]:c?y.unshift(o):y.push(o),(d=x6(r))>0&&y.length>d&&!y.warned){y.warned=!0;var b=new Error("Possible EventEmitter memory leak detected. "+y.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");b.name="MaxListenersExceededWarning",b.emitter=r,b.type=i,b.count=y.length,x=b,console&&console.warn&&console.warn(x)}return r}function t9(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function w6(r,i,o){var c={fired:!1,wrapFn:void 0,target:r,type:i,listener:o},d=t9.bind(c);return d.listener=o,c.wrapFn=d,d}function C6(r,i,o){var c=r._events;if(c===void 0)return[];var d=c[i];return d===void 0?[]:typeof d=="function"?o?[d.listener||d]:[d]:o?function(p){for(var y=new Array(p.length),x=0;x<y.length;++x)y[x]=p[x].listener||p[x];return y}(d):k6(d,d.length)}function T6(r){var i=this._events;if(i!==void 0){var o=i[r];if(typeof o=="function")return 1;if(o!==void 0)return o.length}return 0}function k6(r,i){for(var o=new Array(i),c=0;c<i;++c)o[c]=r[c];return o}function M6(r,i,o,c){if(typeof r.on=="function")c.once?r.once(i,o):r.on(i,o);else{if(typeof r.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r);r.addEventListener(i,function d(p){c.once&&r.removeEventListener(i,d),o(p)})}}Object.defineProperty(Qn,"defaultMaxListeners",{enumerable:!0,get:function(){return b6},set:function(r){if(typeof r!="number"||r<0||v6(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");b6=r}}),Qn.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Qn.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||v6(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this},Qn.prototype.getMaxListeners=function(){return x6(this)},Qn.prototype.emit=function(r){for(var i=[],o=1;o<arguments.length;o++)i.push(arguments[o]);var c=r==="error",d=this._events;if(d!==void 0)c=c&&d.error===void 0;else if(!c)return!1;if(c){var p;if(i.length>0&&(p=i[0]),p instanceof Error)throw p;var y=new Error("Unhandled error."+(p?" ("+p.message+")":""));throw y.context=p,y}var x=d[r];if(x===void 0)return!1;if(typeof x=="function")y6(x,this,i);else{var b=x.length,k=k6(x,b);for(o=0;o<b;++o)y6(k[o],this,i)}return!0},Qn.prototype.addListener=function(r,i){return S6(this,r,i,!1)},Qn.prototype.on=Qn.prototype.addListener,Qn.prototype.prependListener=function(r,i){return S6(this,r,i,!0)},Qn.prototype.once=function(r,i){return gy(i),this.on(r,w6(this,r,i)),this},Qn.prototype.prependOnceListener=function(r,i){return gy(i),this.prependListener(r,w6(this,r,i)),this},Qn.prototype.removeListener=function(r,i){var o,c,d,p,y;if(gy(i),(c=this._events)===void 0)return this;if((o=c[r])===void 0)return this;if(o===i||o.listener===i)--this._eventsCount==0?this._events=Object.create(null):(delete c[r],c.removeListener&&this.emit("removeListener",r,o.listener||i));else if(typeof o!="function"){for(d=-1,p=o.length-1;p>=0;p--)if(o[p]===i||o[p].listener===i){y=o[p].listener,d=p;break}if(d<0)return this;d===0?o.shift():function(x,b){for(;b+1<x.length;b++)x[b]=x[b+1];x.pop()}(o,d),o.length===1&&(c[r]=o[0]),c.removeListener!==void 0&&this.emit("removeListener",r,y||i)}return this},Qn.prototype.off=Qn.prototype.removeListener,Qn.prototype.removeAllListeners=function(r){var i,o,c;if((o=this._events)===void 0)return this;if(o.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):o[r]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete o[r]),this;if(arguments.length===0){var d,p=Object.keys(o);for(c=0;c<p.length;++c)(d=p[c])!=="removeListener"&&this.removeAllListeners(d);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(i=o[r])=="function")this.removeListener(r,i);else if(i!==void 0)for(c=i.length-1;c>=0;c--)this.removeListener(r,i[c]);return this},Qn.prototype.listeners=function(r){return C6(this,r,!0)},Qn.prototype.rawListeners=function(r){return C6(this,r,!1)},Qn.listenerCount=function(r,i){return typeof r.listenerCount=="function"?r.listenerCount(i):T6.call(r,i)},Qn.prototype.listenerCount=T6,Qn.prototype.eventNames=function(){return this._eventsCount>0?m6(this._events):[]};var v2=y2.exports,my=e9(v2),A6=Object.prototype.hasOwnProperty;function E6(r,i,o){for(o of r.keys())if(Ia(o,i))return o}function Ia(r,i){var o,c,d;if(r===i)return!0;if(r&&i&&(o=r.constructor)===i.constructor){if(o===Date)return r.getTime()===i.getTime();if(o===RegExp)return r.toString()===i.toString();if(o===Array){if((c=r.length)===i.length)for(;c--&&Ia(r[c],i[c]););return c===-1}if(o===Set){if(r.size!==i.size)return!1;for(c of r)if((d=c)&&typeof d=="object"&&!(d=E6(i,d))||!i.has(d))return!1;return!0}if(o===Map){if(r.size!==i.size)return!1;for(c of r)if((d=c[0])&&typeof d=="object"&&!(d=E6(i,d))||!Ia(c[1],i.get(d)))return!1;return!0}if(o===ArrayBuffer)r=new Uint8Array(r),i=new Uint8Array(i);else if(o===DataView){if((c=r.byteLength)===i.byteLength)for(;c--&&r.getInt8(c)===i.getInt8(c););return c===-1}if(ArrayBuffer.isView(r)){if((c=r.byteLength)===i.byteLength)for(;c--&&r[c]===i[c];);return c===-1}if(!o||typeof r=="object"){for(o in c=0,r)if(A6.call(r,o)&&++c&&!A6.call(i,o)||!(o in i)||!Ia(r[o],i[o]))return!1;return Object.keys(i).length===c}}return r!=r&&i!=i}const n9={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},_6={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Oi={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},qa={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Lc={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class dt{static getFirstMatch(i,o){const c=o.match(i);return c&&c.length>0&&c[1]||""}static getSecondMatch(i,o){const c=o.match(i);return c&&c.length>1&&c[2]||""}static matchAndReturnConst(i,o,c){if(i.test(o))return c}static getWindowsVersionName(i){switch(i){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(i){const o=i.split(".").splice(0,2).map(c=>parseInt(c,10)||0);if(o.push(0),o[0]===10)switch(o[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(i){const o=i.split(".").splice(0,2).map(c=>parseInt(c,10)||0);if(o.push(0),!(o[0]===1&&o[1]<5))return o[0]===1&&o[1]<6?"Cupcake":o[0]===1&&o[1]>=6?"Donut":o[0]===2&&o[1]<2?"Eclair":o[0]===2&&o[1]===2?"Froyo":o[0]===2&&o[1]>2?"Gingerbread":o[0]===3?"Honeycomb":o[0]===4&&o[1]<1?"Ice Cream Sandwich":o[0]===4&&o[1]<4?"Jelly Bean":o[0]===4&&o[1]>=4?"KitKat":o[0]===5?"Lollipop":o[0]===6?"Marshmallow":o[0]===7?"Nougat":o[0]===8?"Oreo":o[0]===9?"Pie":void 0}static getVersionPrecision(i){return i.split(".").length}static compareVersions(i,o,c=!1){const d=dt.getVersionPrecision(i),p=dt.getVersionPrecision(o);let y=Math.max(d,p),x=0;const b=dt.map([i,o],k=>{const O=y-dt.getVersionPrecision(k),N=k+new Array(O+1).join(".0");return dt.map(N.split("."),Z=>new Array(20-Z.length).join("0")+Z).reverse()});for(c&&(x=y-Math.min(d,p)),y-=1;y>=x;){if(b[0][y]>b[1][y])return 1;if(b[0][y]===b[1][y]){if(y===x)return 0;y-=1}else if(b[0][y]<b[1][y])return-1}}static map(i,o){const c=[];let d;if(Array.prototype.map)return Array.prototype.map.call(i,o);for(d=0;d<i.length;d+=1)c.push(o(i[d]));return c}static find(i,o){let c,d;if(Array.prototype.find)return Array.prototype.find.call(i,o);for(c=0,d=i.length;c<d;c+=1){const p=i[c];if(o(p,c))return p}}static assign(i,...o){const c=i;let d,p;if(Object.assign)return Object.assign(i,...o);for(d=0,p=o.length;d<p;d+=1){const y=o[d];typeof y=="object"&&y!==null&&Object.keys(y).forEach(x=>{c[x]=y[x]})}return i}static getBrowserAlias(i){return n9[i]}static getBrowserTypeByAlias(i){return _6[i]||""}}const Wn=/version\/(\d+(\.?_?\d+)+)/i,i9=[{test:[/googlebot/i],describe(r){const i={name:"Googlebot"},o=dt.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/opera/i],describe(r){const i={name:"Opera"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/opr\/|opios/i],describe(r){const i={name:"Opera"},o=dt.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/SamsungBrowser/i],describe(r){const i={name:"Samsung Internet for Android"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/Whale/i],describe(r){const i={name:"NAVER Whale Browser"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/MZBrowser/i],describe(r){const i={name:"MZ Browser"},o=dt.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/focus/i],describe(r){const i={name:"Focus"},o=dt.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/swing/i],describe(r){const i={name:"Swing"},o=dt.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/coast/i],describe(r){const i={name:"Opera Coast"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(r){const i={name:"Opera Touch"},o=dt.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/yabrowser/i],describe(r){const i={name:"Yandex Browser"},o=dt.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/ucbrowser/i],describe(r){const i={name:"UC Browser"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/Maxthon|mxios/i],describe(r){const i={name:"Maxthon"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/epiphany/i],describe(r){const i={name:"Epiphany"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/puffin/i],describe(r){const i={name:"Puffin"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/sleipnir/i],describe(r){const i={name:"Sleipnir"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/k-meleon/i],describe(r){const i={name:"K-Meleon"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/micromessenger/i],describe(r){const i={name:"WeChat"},o=dt.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/qqbrowser/i],describe(r){const i={name:/qqbrowserlite/i.test(r)?"QQ Browser Lite":"QQ Browser"},o=dt.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/msie|trident/i],describe(r){const i={name:"Internet Explorer"},o=dt.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/\sedg\//i],describe(r){const i={name:"Microsoft Edge"},o=dt.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/edg([ea]|ios)/i],describe(r){const i={name:"Microsoft Edge"},o=dt.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/vivaldi/i],describe(r){const i={name:"Vivaldi"},o=dt.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/seamonkey/i],describe(r){const i={name:"SeaMonkey"},o=dt.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/sailfish/i],describe(r){const i={name:"Sailfish"},o=dt.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,r);return o&&(i.version=o),i}},{test:[/silk/i],describe(r){const i={name:"Amazon Silk"},o=dt.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/phantom/i],describe(r){const i={name:"PhantomJS"},o=dt.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/slimerjs/i],describe(r){const i={name:"SlimerJS"},o=dt.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(r){const i={name:"BlackBerry"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/(web|hpw)[o0]s/i],describe(r){const i={name:"WebOS Browser"},o=dt.getFirstMatch(Wn,r)||dt.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/bada/i],describe(r){const i={name:"Bada"},o=dt.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/tizen/i],describe(r){const i={name:"Tizen"},o=dt.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/qupzilla/i],describe(r){const i={name:"QupZilla"},o=dt.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/firefox|iceweasel|fxios/i],describe(r){const i={name:"Firefox"},o=dt.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/electron/i],describe(r){const i={name:"Electron"},o=dt.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/MiuiBrowser/i],describe(r){const i={name:"Miui"},o=dt.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/chromium/i],describe(r){const i={name:"Chromium"},o=dt.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,r)||dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/chrome|crios|crmo/i],describe(r){const i={name:"Chrome"},o=dt.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/GSA/i],describe(r){const i={name:"Google Search"},o=dt.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test(r){const i=!r.test(/like android/i),o=r.test(/android/i);return i&&o},describe(r){const i={name:"Android Browser"},o=dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/playstation 4/i],describe(r){const i={name:"PlayStation 4"},o=dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/safari|applewebkit/i],describe(r){const i={name:"Safari"},o=dt.getFirstMatch(Wn,r);return o&&(i.version=o),i}},{test:[/.*/i],describe(r){const i=r.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:dt.getFirstMatch(i,r),version:dt.getSecondMatch(i,r)}}}];var a9=[{test:[/Roku\/DVP/],describe(r){const i=dt.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,r);return{name:qa.Roku,version:i}}},{test:[/windows phone/i],describe(r){const i=dt.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,r);return{name:qa.WindowsPhone,version:i}}},{test:[/windows /i],describe(r){const i=dt.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,r),o=dt.getWindowsVersionName(i);return{name:qa.Windows,version:i,versionName:o}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(r){const i={name:qa.iOS},o=dt.getSecondMatch(/(Version\/)(\d[\d.]+)/,r);return o&&(i.version=o),i}},{test:[/macintosh/i],describe(r){const i=dt.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,r).replace(/[_\s]/g,"."),o=dt.getMacOSVersionName(i),c={name:qa.MacOS,version:i};return o&&(c.versionName=o),c}},{test:[/(ipod|iphone|ipad)/i],describe(r){const i=dt.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,r).replace(/[_\s]/g,".");return{name:qa.iOS,version:i}}},{test(r){const i=!r.test(/like android/i),o=r.test(/android/i);return i&&o},describe(r){const i=dt.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,r),o=dt.getAndroidVersionName(i),c={name:qa.Android,version:i};return o&&(c.versionName=o),c}},{test:[/(web|hpw)[o0]s/i],describe(r){const i=dt.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,r),o={name:qa.WebOS};return i&&i.length&&(o.version=i),o}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(r){const i=dt.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,r)||dt.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,r)||dt.getFirstMatch(/\bbb(\d+)/i,r);return{name:qa.BlackBerry,version:i}}},{test:[/bada/i],describe(r){const i=dt.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,r);return{name:qa.Bada,version:i}}},{test:[/tizen/i],describe(r){const i=dt.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,r);return{name:qa.Tizen,version:i}}},{test:[/linux/i],describe:()=>({name:qa.Linux})},{test:[/CrOS/],describe:()=>({name:qa.ChromeOS})},{test:[/PlayStation 4/],describe(r){const i=dt.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,r);return{name:qa.PlayStation4,version:i}}}],s9=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(r){const i=dt.getFirstMatch(/(can-l01)/i,r)&&"Nova",o={type:Oi.mobile,vendor:"Huawei"};return i&&(o.model=i),o}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:Oi.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:Oi.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:Oi.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:Oi.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:Oi.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:Oi.tablet})},{test(r){const i=r.test(/ipod|iphone/i),o=r.test(/like (ipod|iphone)/i);return i&&!o},describe(r){const i=dt.getFirstMatch(/(ipod|iphone)/i,r);return{type:Oi.mobile,vendor:"Apple",model:i}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:Oi.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:Oi.mobile})},{test:r=>r.getBrowserName(!0)==="blackberry",describe:()=>({type:Oi.mobile,vendor:"BlackBerry"})},{test:r=>r.getBrowserName(!0)==="bada",describe:()=>({type:Oi.mobile})},{test:r=>r.getBrowserName()==="windows phone",describe:()=>({type:Oi.mobile,vendor:"Microsoft"})},{test(r){const i=Number(String(r.getOSVersion()).split(".")[0]);return r.getOSName(!0)==="android"&&i>=3},describe:()=>({type:Oi.tablet})},{test:r=>r.getOSName(!0)==="android",describe:()=>({type:Oi.mobile})},{test:r=>r.getOSName(!0)==="macos",describe:()=>({type:Oi.desktop,vendor:"Apple"})},{test:r=>r.getOSName(!0)==="windows",describe:()=>({type:Oi.desktop})},{test:r=>r.getOSName(!0)==="linux",describe:()=>({type:Oi.desktop})},{test:r=>r.getOSName(!0)==="playstation 4",describe:()=>({type:Oi.tv})},{test:r=>r.getOSName(!0)==="roku",describe:()=>({type:Oi.tv})}],r9=[{test:r=>r.getBrowserName(!0)==="microsoft edge",describe(r){if(/\sedg\//i.test(r))return{name:Lc.Blink};const i=dt.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,r);return{name:Lc.EdgeHTML,version:i}}},{test:[/trident/i],describe(r){const i={name:Lc.Trident},o=dt.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:r=>r.test(/presto/i),describe(r){const i={name:Lc.Presto},o=dt.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test(r){const i=r.test(/gecko/i),o=r.test(/like gecko/i);return i&&!o},describe(r){const i={name:Lc.Gecko},o=dt.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Lc.Blink})},{test:[/(apple)?webkit/i],describe(r){const i={name:Lc.WebKit},o=dt.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,r);return o&&(i.version=o),i}}];class O6{constructor(i,o=!1){if(i==null||i==="")throw new Error("UserAgent parameter can't be empty");this._ua=i,this.parsedResult={},o!==!0&&this.parse()}getUA(){return this._ua}test(i){return i.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const i=dt.find(i9,o=>{if(typeof o.test=="function")return o.test(this);if(o.test instanceof Array)return o.test.some(c=>this.test(c));throw new Error("Browser's test function is not valid")});return i&&(this.parsedResult.browser=i.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(i){return i?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const i=dt.find(a9,o=>{if(typeof o.test=="function")return o.test(this);if(o.test instanceof Array)return o.test.some(c=>this.test(c));throw new Error("Browser's test function is not valid")});return i&&(this.parsedResult.os=i.describe(this.getUA())),this.parsedResult.os}getOSName(i){const{name:o}=this.getOS();return i?String(o).toLowerCase()||"":o||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(i=!1){const{type:o}=this.getPlatform();return i?String(o).toLowerCase()||"":o||""}parsePlatform(){this.parsedResult.platform={};const i=dt.find(s9,o=>{if(typeof o.test=="function")return o.test(this);if(o.test instanceof Array)return o.test.some(c=>this.test(c));throw new Error("Browser's test function is not valid")});return i&&(this.parsedResult.platform=i.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(i){return i?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const i=dt.find(r9,o=>{if(typeof o.test=="function")return o.test(this);if(o.test instanceof Array)return o.test.some(c=>this.test(c));throw new Error("Browser's test function is not valid")});return i&&(this.parsedResult.engine=i.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return dt.assign({},this.parsedResult)}satisfies(i){const o={};let c=0;const d={};let p=0;if(Object.keys(i).forEach(y=>{const x=i[y];typeof x=="string"?(d[y]=x,p+=1):typeof x=="object"&&(o[y]=x,c+=1)}),c>0){const y=Object.keys(o),x=dt.find(y,k=>this.isOS(k));if(x){const k=this.satisfies(o[x]);if(k!==void 0)return k}const b=dt.find(y,k=>this.isPlatform(k));if(b){const k=this.satisfies(o[b]);if(k!==void 0)return k}}if(p>0){const y=Object.keys(d),x=dt.find(y,b=>this.isBrowser(b,!0));if(x!==void 0)return this.compareVersion(d[x])}}isBrowser(i,o=!1){const c=this.getBrowserName().toLowerCase();let d=i.toLowerCase();const p=dt.getBrowserTypeByAlias(d);return o&&p&&(d=p.toLowerCase()),d===c}compareVersion(i){let o=[0],c=i,d=!1;const p=this.getBrowserVersion();if(typeof p=="string")return i[0]===">"||i[0]==="<"?(c=i.substr(1),i[1]==="="?(d=!0,c=i.substr(2)):o=[],i[0]===">"?o.push(1):o.push(-1)):i[0]==="="?c=i.substr(1):i[0]==="~"&&(d=!0,c=i.substr(1)),o.indexOf(dt.compareVersions(p,c,d))>-1}isOS(i){return this.getOSName(!0)===String(i).toLowerCase()}isPlatform(i){return this.getPlatformType(!0)===String(i).toLowerCase()}isEngine(i){return this.getEngineName(!0)===String(i).toLowerCase()}is(i,o=!1){return this.isBrowser(i,o)||this.isOS(i)||this.isPlatform(i)}some(i=[]){return i.some(o=>this.is(o))}}/*!
101
+ * Bowser - a browser detector
102
+ * https://github.com/lancedikson/bowser
103
+ * MIT License | (c) Dustin Diaz 2012-2015
104
+ * MIT License | (c) Denis Demchenko 2015-2019
105
+ */class o9{static getParser(i,o=!1){if(typeof i!="string")throw new Error("UserAgent should be a string");return new O6(i,o)}static parse(i){return new O6(i).getResult()}static get BROWSER_MAP(){return _6}static get ENGINE_MAP(){return Lc}static get OS_MAP(){return qa}static get PLATFORMS_MAP(){return Oi}}function yy(){return Date.now()+Math.random().toString()}function Fg(){throw new Error("Method must be implemented in subclass")}function D6(r,i){return i!=null&&i.proxyUrl?i.proxyUrl+(i.proxyUrl.slice(-1)==="/"?"":"/")+r.substring(8):r}function vy(r){return r!=null&&r.callObjectBundleUrlOverride?r.callObjectBundleUrlOverride:D6("https://c.daily.co/call-machine/versioned/".concat("0.77.0","/static/call-machine-object-bundle.js"),r)}function by(r){try{new URL(r)}catch{return!1}return!0}const ii=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rd="8.55.0",$n=globalThis;function xy(r,i,o){const c=$n,d=c.__SENTRY__=c.__SENTRY__||{},p=d[rd]=d[rd]||{};return p[r]||(p[r]=i())}const od=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,b2=["debug","info","warn","error","log","assert","trace"],Sy={};function Zg(r){if(!("console"in $n))return r();const i=$n.console,o={},c=Object.keys(Sy);c.forEach(d=>{const p=Sy[d];o[d]=i[d],i[d]=p});try{return r()}finally{c.forEach(d=>{i[d]=o[d]})}}const on=xy("logger",function(){let r=!1;const i={enable:()=>{r=!0},disable:()=>{r=!1},isEnabled:()=>r};return od?b2.forEach(o=>{i[o]=(...c)=>{r&&Zg(()=>{$n.console[o](`Sentry Logger [${o}]:`,...c)})}}):b2.forEach(o=>{i[o]=()=>{}}),i}),ld="?",j6=/\(error: (.*)\)/,L6=/captureMessage|captureException/;function wy(r){return r[r.length-1]||{}}const R6="<anonymous>";function Rc(r){try{return r&&typeof r=="function"&&r.name||R6}catch{return R6}}function N6(r){const i=r.exception;if(i){const o=[];try{return i.values.forEach(c=>{c.stacktrace.frames&&o.push(...c.stacktrace.frames)}),o}catch{return}}}const Cy={},z6={};function cd(r,i){Cy[r]=Cy[r]||[],Cy[r].push(i)}function ud(r,i){if(!z6[r]){z6[r]=!0;try{i()}catch(o){od&&on.error(`Error while instrumenting ${r}`,o)}}}function Ir(r,i){const o=r&&Cy[r];if(o)for(const c of o)try{c(i)}catch(d){od&&on.error(`Error while triggering instrumentation handler.
106
+ Type: ${r}
107
+ Name: ${Rc(c)}
108
+ Error:`,d)}}let x2=null;function l9(){x2=$n.onerror,$n.onerror=function(r,i,o,c,d){return Ir("error",{column:c,error:d,line:o,msg:r,url:i}),!!x2&&x2.apply(this,arguments)},$n.onerror.__SENTRY_INSTRUMENTED__=!0}let S2=null;function c9(){S2=$n.onunhandledrejection,$n.onunhandledrejection=function(r){return Ir("unhandledrejection",r),!S2||S2.apply(this,arguments)},$n.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ty(){return w2($n),$n}function w2(r){const i=r.__SENTRY__=r.__SENTRY__||{};return i.version=i.version||rd,i[rd]=i[rd]||{}}const B6=Object.prototype.toString;function C2(r){switch(B6.call(r)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return dd(r,Error)}}function rf(r,i){return B6.call(r)===`[object ${i}]`}function U6(r){return rf(r,"ErrorEvent")}function H6(r){return rf(r,"DOMError")}function Sl(r){return rf(r,"String")}function T2(r){return typeof r=="object"&&r!==null&&"__sentry_template_string__"in r&&"__sentry_template_values__"in r}function k2(r){return r===null||T2(r)||typeof r!="object"&&typeof r!="function"}function of(r){return rf(r,"Object")}function ky(r){return typeof Event<"u"&&dd(r,Event)}function My(r){return!!(r&&r.then&&typeof r.then=="function")}function dd(r,i){try{return r instanceof i}catch{return!1}}function P6(r){return!(typeof r!="object"||r===null||!r.__isVue&&!r._isVue)}const M2=$n;function V6(r,i={}){if(!r)return"<unknown>";try{let o=r;const c=5,d=[];let p=0,y=0;const x=" > ",b=x.length;let k;const O=Array.isArray(i)?i:i.keyAttrs,N=!Array.isArray(i)&&i.maxStringLength||80;for(;o&&p++<c&&(k=u9(o,O),!(k==="html"||p>1&&y+d.length*b+k.length>=N));)d.push(k),y+=k.length,o=o.parentNode;return d.reverse().join(x)}catch{return"<unknown>"}}function u9(r,i){const o=r,c=[];if(!o||!o.tagName)return"";if(M2.HTMLElement&&o instanceof HTMLElement&&o.dataset){if(o.dataset.sentryComponent)return o.dataset.sentryComponent;if(o.dataset.sentryElement)return o.dataset.sentryElement}c.push(o.tagName.toLowerCase());const d=i&&i.length?i.filter(y=>o.getAttribute(y)).map(y=>[y,o.getAttribute(y)]):null;if(d&&d.length)d.forEach(y=>{c.push(`[${y[0]}="${y[1]}"]`)});else{o.id&&c.push(`#${o.id}`);const y=o.className;if(y&&Sl(y)){const x=y.split(/\s+/);for(const b of x)c.push(`.${b}`)}}const p=["aria-label","type","name","title","alt"];for(const y of p){const x=o.getAttribute(y);x&&c.push(`[${y}="${x}"]`)}return c.join("")}function lf(r,i=0){return typeof r!="string"||i===0||r.length<=i?r:`${r.slice(0,i)}...`}function $6(r,i){if(!Array.isArray(r))return"";const o=[];for(let c=0;c<r.length;c++){const d=r[c];try{P6(d)?o.push("[VueViewModel]"):o.push(String(d))}catch{o.push("[value cannot be serialized]")}}return o.join(i)}function d9(r,i,o=!1){return!!Sl(r)&&(rf(i,"RegExp")?i.test(r):!!Sl(i)&&(o?r===i:r.includes(i)))}function Ay(r,i=[],o=!1){return i.some(c=>d9(r,c,o))}function _s(r,i,o){if(!(i in r))return;const c=r[i],d=o(c);typeof d=="function"&&I6(d,c);try{r[i]=d}catch{od&&on.log(`Failed to replace method "${i}" in object`,r)}}function hd(r,i,o){try{Object.defineProperty(r,i,{value:o,writable:!0,configurable:!0})}catch{od&&on.log(`Failed to add non-enumerable property "${i}" to object`,r)}}function I6(r,i){try{const o=i.prototype||{};r.prototype=i.prototype=o,hd(r,"__sentry_original__",i)}catch{}}function A2(r){return r.__sentry_original__}function q6(r){if(C2(r))return{message:r.message,name:r.name,stack:r.stack,...Y6(r)};if(ky(r)){const i={type:r.type,target:G6(r.target),currentTarget:G6(r.currentTarget),...Y6(r)};return typeof CustomEvent<"u"&&dd(r,CustomEvent)&&(i.detail=r.detail),i}return r}function G6(r){try{return i=r,typeof Element<"u"&&dd(i,Element)?V6(r):Object.prototype.toString.call(r)}catch{return"<unknown>"}var i}function Y6(r){if(typeof r=="object"&&r!==null){const i={};for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=r[o]);return i}return{}}function Qs(r){return E2(r,new Map)}function E2(r,i){if(function(o){if(!of(o))return!1;try{const c=Object.getPrototypeOf(o).constructor.name;return!c||c==="Object"}catch{return!0}}(r)){const o=i.get(r);if(o!==void 0)return o;const c={};i.set(r,c);for(const d of Object.getOwnPropertyNames(r))r[d]!==void 0&&(c[d]=E2(r[d],i));return c}if(Array.isArray(r)){const o=i.get(r);if(o!==void 0)return o;const c=[];return i.set(r,c),r.forEach(d=>{c.push(E2(d,i))}),c}return r}function Qg(){return Date.now()/1e3}const wl=function(){const{performance:r}=$n;if(!r||!r.now)return Qg;const i=Date.now()-r.now(),o=r.timeOrigin==null?i:r.timeOrigin;return()=>(o+r.now())/1e3}();function Js(){const r=$n,i=r.crypto||r.msCrypto;let o=()=>16*Math.random();try{if(i&&i.randomUUID)return i.randomUUID().replace(/-/g,"");i&&i.getRandomValues&&(o=()=>{const c=new Uint8Array(1);return i.getRandomValues(c),c[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,c=>(c^(15&o())>>c/4).toString(16))}function X6(r){return r.exception&&r.exception.values?r.exception.values[0]:void 0}function Nc(r){const{message:i,event_id:o}=r;if(i)return i;const c=X6(r);return c?c.type&&c.value?`${c.type}: ${c.value}`:c.type||c.value||o||"<unknown>":o||"<unknown>"}function _2(r,i,o){const c=r.exception=r.exception||{},d=c.values=c.values||[],p=d[0]=d[0]||{};p.value||(p.value=i||""),p.type||(p.type="Error")}function cf(r,i){const o=X6(r);if(!o)return;const c=o.mechanism;if(o.mechanism={type:"generic",handled:!0,...c,...i},i&&"data"in i){const d={...c&&c.data,...i.data};o.mechanism.data=d}}function F6(r){if(function(i){try{return i.__sentry_captured__}catch{}}(r))return!0;try{hd(r,"__sentry_captured__",!0)}catch{}return!1}var Cl;function fd(r){return new Ws(i=>{i(r)})}function Ey(r){return new Ws((i,o)=>{o(r)})}(()=>{const{performance:r}=$n;!r||!r.now||(r.now(),r.timing&&r.timing.navigationStart)})(),function(r){r[r.PENDING=0]="PENDING",r[r.RESOLVED=1]="RESOLVED",r[r.REJECTED=2]="REJECTED"}(Cl||(Cl={}));class Ws{constructor(i){Ws.prototype.__init.call(this),Ws.prototype.__init2.call(this),Ws.prototype.__init3.call(this),Ws.prototype.__init4.call(this),this._state=Cl.PENDING,this._handlers=[];try{i(this._resolve,this._reject)}catch(o){this._reject(o)}}then(i,o){return new Ws((c,d)=>{this._handlers.push([!1,p=>{if(i)try{c(i(p))}catch(y){d(y)}else c(p)},p=>{if(o)try{c(o(p))}catch(y){d(y)}else d(p)}]),this._executeHandlers()})}catch(i){return this.then(o=>o,i)}finally(i){return new Ws((o,c)=>{let d,p;return this.then(y=>{p=!1,d=y,i&&i()},y=>{p=!0,d=y,i&&i()}).then(()=>{p?c(d):o(d)})})}__init(){this._resolve=i=>{this._setResult(Cl.RESOLVED,i)}}__init2(){this._reject=i=>{this._setResult(Cl.REJECTED,i)}}__init3(){this._setResult=(i,o)=>{this._state===Cl.PENDING&&(My(o)?o.then(this._resolve,this._reject):(this._state=i,this._value=o,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Cl.PENDING)return;const i=this._handlers.slice();this._handlers=[],i.forEach(o=>{o[0]||(this._state===Cl.RESOLVED&&o[1](this._value),this._state===Cl.REJECTED&&o[2](this._value),o[0]=!0)})}}}function h9(r){const i=wl(),o={sid:Js(),init:!0,timestamp:i,started:i,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(c){return Qs({sid:`${c.sid}`,init:c.init,started:new Date(1e3*c.started).toISOString(),timestamp:new Date(1e3*c.timestamp).toISOString(),status:c.status,errors:c.errors,did:typeof c.did=="number"||typeof c.did=="string"?`${c.did}`:void 0,duration:c.duration,abnormal_mechanism:c.abnormal_mechanism,attrs:{release:c.release,environment:c.environment,ip_address:c.ipAddress,user_agent:c.userAgent}})}(o)};return r&&uf(o,r),o}function uf(r,i={}){if(i.user&&(!r.ipAddress&&i.user.ip_address&&(r.ipAddress=i.user.ip_address),r.did||i.did||(r.did=i.user.id||i.user.email||i.user.username)),r.timestamp=i.timestamp||wl(),i.abnormal_mechanism&&(r.abnormal_mechanism=i.abnormal_mechanism),i.ignoreDuration&&(r.ignoreDuration=i.ignoreDuration),i.sid&&(r.sid=i.sid.length===32?i.sid:Js()),i.init!==void 0&&(r.init=i.init),!r.did&&i.did&&(r.did=`${i.did}`),typeof i.started=="number"&&(r.started=i.started),r.ignoreDuration)r.duration=void 0;else if(typeof i.duration=="number")r.duration=i.duration;else{const o=r.timestamp-r.started;r.duration=o>=0?o:0}i.release&&(r.release=i.release),i.environment&&(r.environment=i.environment),!r.ipAddress&&i.ipAddress&&(r.ipAddress=i.ipAddress),!r.userAgent&&i.userAgent&&(r.userAgent=i.userAgent),typeof i.errors=="number"&&(r.errors=i.errors),i.status&&(r.status=i.status)}function Z6(){return Js()}function O2(){return Js().substring(16)}function _y(r,i,o=2){if(!i||typeof i!="object"||o<=0)return i;if(r&&i&&Object.keys(i).length===0)return r;const c={...r};for(const d in i)Object.prototype.hasOwnProperty.call(i,d)&&(c[d]=_y(c[d],i[d],o-1));return c}const D2="_sentrySpan";function Q6(r,i){i?hd(r,D2,i):delete r[D2]}function J6(r){return r[D2]}class j2{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Z6(),spanId:O2()}}clone(){const i=new j2;return i._breadcrumbs=[...this._breadcrumbs],i._tags={...this._tags},i._extra={...this._extra},i._contexts={...this._contexts},this._contexts.flags&&(i._contexts.flags={values:[...this._contexts.flags.values]}),i._user=this._user,i._level=this._level,i._session=this._session,i._transactionName=this._transactionName,i._fingerprint=this._fingerprint,i._eventProcessors=[...this._eventProcessors],i._requestSession=this._requestSession,i._attachments=[...this._attachments],i._sdkProcessingMetadata={...this._sdkProcessingMetadata},i._propagationContext={...this._propagationContext},i._client=this._client,i._lastEventId=this._lastEventId,Q6(i,J6(this)),i}setClient(i){this._client=i}setLastEventId(i){this._lastEventId=i}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(i){this._scopeListeners.push(i)}addEventProcessor(i){return this._eventProcessors.push(i),this}setUser(i){return this._user=i||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&uf(this._session,{user:i}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(i){return this._requestSession=i,this}setTags(i){return this._tags={...this._tags,...i},this._notifyScopeListeners(),this}setTag(i,o){return this._tags={...this._tags,[i]:o},this._notifyScopeListeners(),this}setExtras(i){return this._extra={...this._extra,...i},this._notifyScopeListeners(),this}setExtra(i,o){return this._extra={...this._extra,[i]:o},this._notifyScopeListeners(),this}setFingerprint(i){return this._fingerprint=i,this._notifyScopeListeners(),this}setLevel(i){return this._level=i,this._notifyScopeListeners(),this}setTransactionName(i){return this._transactionName=i,this._notifyScopeListeners(),this}setContext(i,o){return o===null?delete this._contexts[i]:this._contexts[i]=o,this._notifyScopeListeners(),this}setSession(i){return i?this._session=i:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(i){if(!i)return this;const o=typeof i=="function"?i(this):i,[c,d]=o instanceof zc?[o.getScopeData(),o.getRequestSession()]:of(o)?[i,i.requestSession]:[],{tags:p,extra:y,user:x,contexts:b,level:k,fingerprint:O=[],propagationContext:N}=c||{};return this._tags={...this._tags,...p},this._extra={...this._extra,...y},this._contexts={...this._contexts,...b},x&&Object.keys(x).length&&(this._user=x),k&&(this._level=k),O.length&&(this._fingerprint=O),N&&(this._propagationContext=N),d&&(this._requestSession=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Q6(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Z6()}),this._notifyScopeListeners(),this}addBreadcrumb(i,o){const c=typeof o=="number"?o:100;if(c<=0)return this;const d={timestamp:Qg(),...i};return this._breadcrumbs.push(d),this._breadcrumbs.length>c&&(this._breadcrumbs=this._breadcrumbs.slice(-c),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(i){return this._attachments.push(i),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:J6(this)}}setSDKProcessingMetadata(i){return this._sdkProcessingMetadata=_y(this._sdkProcessingMetadata,i,2),this}setPropagationContext(i){return this._propagationContext={spanId:O2(),...i},this}getPropagationContext(){return this._propagationContext}captureException(i,o){const c=o&&o.event_id?o.event_id:Js();if(!this._client)return on.warn("No client configured on scope - will not capture exception!"),c;const d=new Error("Sentry syntheticException");return this._client.captureException(i,{originalException:i,syntheticException:d,...o,event_id:c},this),c}captureMessage(i,o,c){const d=c&&c.event_id?c.event_id:Js();if(!this._client)return on.warn("No client configured on scope - will not capture message!"),d;const p=new Error(i);return this._client.captureMessage(i,o,{originalException:i,syntheticException:p,...c,event_id:d},this),d}captureEvent(i,o){const c=o&&o.event_id?o.event_id:Js();return this._client?(this._client.captureEvent(i,{...o,event_id:c},this),c):(on.warn("No client configured on scope - will not capture event!"),c)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(i=>{i(this)}),this._notifyingListeners=!1)}}const zc=j2;class f9{constructor(i,o){let c,d;c=i||new zc,d=o||new zc,this._stack=[{scope:c}],this._isolationScope=d}withScope(i){const o=this._pushScope();let c;try{c=i(o)}catch(d){throw this._popScope(),d}return My(c)?c.then(d=>(this._popScope(),d),d=>{throw this._popScope(),d}):(this._popScope(),c)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const i=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:i}),i}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function df(){const r=w2(Ty());return r.stack=r.stack||new f9(xy("defaultCurrentScope",()=>new zc),xy("defaultIsolationScope",()=>new zc))}function p9(r){return df().withScope(r)}function g9(r,i){const o=df();return o.withScope(()=>(o.getStackTop().scope=r,i(r)))}function W6(r){return df().withScope(()=>r(df().getIsolationScope()))}function L2(r){const i=w2(r);return i.acs?i.acs:{withIsolationScope:W6,withScope:p9,withSetScope:g9,withSetIsolationScope:(o,c)=>W6(c),getCurrentScope:()=>df().getScope(),getIsolationScope:()=>df().getIsolationScope()}}function pd(){return L2(Ty()).getCurrentScope()}function Jg(){return L2(Ty()).getIsolationScope()}function ka(){return pd().getClient()}function m9(r){const i=r.getPropagationContext(),{traceId:o,spanId:c,parentSpanId:d}=i;return Qs({trace_id:o,span_id:c,parent_span_id:d})}function y9(r){const i=r._sentryMetrics;if(!i)return;const o={};for(const[,[c,d]]of i)(o[c]||(o[c]=[])).push(Qs(d));return o}const v9=/^sentry-/;function b9(r){const i=function(c){if(!(!c||!Sl(c)&&!Array.isArray(c)))return Array.isArray(c)?c.reduce((d,p)=>{const y=K6(p);return Object.entries(y).forEach(([x,b])=>{d[x]=b}),d},{}):K6(c)}(r);if(!i)return;const o=Object.entries(i).reduce((c,[d,p])=>(d.match(v9)&&(c[d.slice(7)]=p),c),{});return Object.keys(o).length>0?o:void 0}function K6(r){return r.split(",").map(i=>i.split("=").map(o=>decodeURIComponent(o.trim()))).reduce((i,[o,c])=>(o&&c&&(i[o]=c),i),{})}let ew=!1;function x9(r){const{spanId:i,traceId:o,isRemote:c}=r.spanContext();return Qs({parent_span_id:c?i:R2(r).parent_span_id,span_id:c?O2():i,trace_id:o})}function tw(r){return typeof r=="number"?nw(r):Array.isArray(r)?r[0]+r[1]/1e9:r instanceof Date?nw(r.getTime()):wl()}function nw(r){return r>9999999999?r/1e3:r}function R2(r){if(function(i){return typeof i.getSpanJSON=="function"}(r))return r.getSpanJSON();try{const{spanId:i,traceId:o}=r.spanContext();if(function(c){const d=c;return!!(d.attributes&&d.startTime&&d.name&&d.endTime&&d.status)}(r)){const{attributes:c,startTime:d,name:p,endTime:y,parentSpanId:x,status:b}=r;return Qs({span_id:i,trace_id:o,data:c,description:p,parent_span_id:x,start_timestamp:tw(d),timestamp:tw(y)||void 0,status:S9(b),op:c["sentry.op"],origin:c["sentry.origin"],_metrics_summary:y9(r)})}return{span_id:i,trace_id:o}}catch{return{}}}function S9(r){if(r&&r.code!==0)return r.code===1?"ok":r.message||"unknown_error"}function iw(r){return r._sentryRootSpan||r}function w9(){ew||(Zg(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),ew=!0)}const N2="production";function aw(r,i){const o=i.getOptions(),{publicKey:c}=i.getDsn()||{},d=Qs({environment:o.environment||N2,release:o.release,public_key:c,trace_id:r});return i.emit("createDsc",d),d}function C9(r){const i=ka();if(!i)return{};const o=iw(r),c=o._frozenDsc;if(c)return c;const d=o.spanContext().traceState,p=d&&d.get("sentry.dsc"),y=p&&b9(p);if(y)return y;const x=aw(r.spanContext().traceId,i),b=R2(o),k=b.data||{},O=k["sentry.sample_rate"];O!=null&&(x.sample_rate=`${O}`);const N=k["sentry.source"],Z=b.description;return N!=="url"&&Z&&(x.transaction=Z),function(J){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const D=ka(),F=D&&D.getOptions();return!!F&&(F.enableTracing||"tracesSampleRate"in F||"tracesSampler"in F)}()&&(x.sampled=String(function(J){const{traceFlags:D}=J.spanContext();return D===1}(o))),i.emit("createDsc",x,o),x}const T9=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Oy(r,i=!1){const{host:o,path:c,pass:d,port:p,projectId:y,protocol:x,publicKey:b}=r;return`${x}://${b}${i&&d?`:${d}`:""}@${o}${p?`:${p}`:""}/${c&&`${c}/`}${y}`}function sw(r){return{protocol:r.protocol,publicKey:r.publicKey||"",pass:r.pass||"",host:r.host,port:r.port||"",path:r.path||"",projectId:r.projectId}}function k9(r){const i=typeof r=="string"?function(o){const c=T9.exec(o);if(!c)return void Zg(()=>{console.error(`Invalid Sentry Dsn: ${o}`)});const[d,p,y="",x="",b="",k=""]=c.slice(1);let O="",N=k;const Z=N.split("/");if(Z.length>1&&(O=Z.slice(0,-1).join("/"),N=Z.pop()),N){const J=N.match(/^\d+/);J&&(N=J[0])}return sw({host:x,pass:y,path:O,projectId:N,port:b,protocol:d,publicKey:p})}(r):sw(r);if(i&&function(o){if(!od)return!0;const{port:c,projectId:d,protocol:p}=o;return!(["protocol","publicKey","host","projectId"].find(y=>!o[y]&&(on.error(`Invalid Sentry Dsn: ${y} missing`),!0))||(d.match(/^\d+$/)?function(y){return y==="http"||y==="https"}(p)?c&&isNaN(parseInt(c,10))&&(on.error(`Invalid Sentry Dsn: Invalid port ${c}`),1):(on.error(`Invalid Sentry Dsn: Invalid protocol ${p}`),1):(on.error(`Invalid Sentry Dsn: Invalid projectId ${d}`),1)))}(i))return i}function Tl(r,i=100,o=1/0){try{return z2("",r,i,o)}catch(c){return{ERROR:`**non-serializable** (${c})`}}}function rw(r,i=3,o=102400){const c=Tl(r,i);return d=c,function(p){return~-encodeURI(p).split(/%..|./).length}(JSON.stringify(d))>o?rw(r,i-1,o):c;var d}function z2(r,i,o=1/0,c=1/0,d=function(){const p=typeof WeakSet=="function",y=p?new WeakSet:[];return[function(x){if(p)return!!y.has(x)||(y.add(x),!1);for(let b=0;b<y.length;b++)if(y[b]===x)return!0;return y.push(x),!1},function(x){if(p)y.delete(x);else for(let b=0;b<y.length;b++)if(y[b]===x){y.splice(b,1);break}}]}()){const[p,y]=d;if(i==null||["boolean","string"].includes(typeof i)||typeof i=="number"&&Number.isFinite(i))return i;const x=function(J,D){try{if(J==="domain"&&D&&typeof D=="object"&&D._events)return"[Domain]";if(J==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&D===global)return"[Global]";if(typeof window<"u"&&D===window)return"[Window]";if(typeof document<"u"&&D===document)return"[Document]";if(P6(D))return"[VueViewModel]";if(of(F=D)&&"nativeEvent"in F&&"preventDefault"in F&&"stopPropagation"in F)return"[SyntheticEvent]";if(typeof D=="number"&&!Number.isFinite(D))return`[${D}]`;if(typeof D=="function")return`[Function: ${Rc(D)}]`;if(typeof D=="symbol")return`[${String(D)}]`;if(typeof D=="bigint")return`[BigInt: ${String(D)}]`;const ae=function(ee){const B=Object.getPrototypeOf(ee);return B?B.constructor.name:"null prototype"}(D);return/^HTML(\w*)Element$/.test(ae)?`[HTMLElement: ${ae}]`:`[object ${ae}]`}catch(ae){return`**non-serializable** (${ae})`}var F}(r,i);if(!x.startsWith("[object "))return x;if(i.__sentry_skip_normalization__)return i;const b=typeof i.__sentry_override_normalization_depth__=="number"?i.__sentry_override_normalization_depth__:o;if(b===0)return x.replace("object ","");if(p(i))return"[Circular ~]";const k=i;if(k&&typeof k.toJSON=="function")try{return z2("",k.toJSON(),b-1,c,d)}catch{}const O=Array.isArray(i)?[]:{};let N=0;const Z=q6(i);for(const J in Z){if(!Object.prototype.hasOwnProperty.call(Z,J))continue;if(N>=c){O[J]="[MaxProperties ~]";break}const D=Z[J];O[J]=z2(J,D,b-1,c,d),N++}return y(i),O}function Wg(r,i=[]){return[r,i]}function M9(r,i){const[o,c]=r;return[o,[...c,i]]}function ow(r,i){const o=r[1];for(const c of o)if(i(c,c[0].type))return!0;return!1}function B2(r){return $n.__SENTRY__&&$n.__SENTRY__.encodePolyfill?$n.__SENTRY__.encodePolyfill(r):new TextEncoder().encode(r)}function A9(r){const[i,o]=r;let c=JSON.stringify(i);function d(p){typeof c=="string"?c=typeof p=="string"?c+p:[B2(c),p]:c.push(typeof p=="string"?B2(p):p)}for(const p of o){const[y,x]=p;if(d(`
109
+ ${JSON.stringify(y)}
110
+ `),typeof x=="string"||x instanceof Uint8Array)d(x);else{let b;try{b=JSON.stringify(x)}catch{b=JSON.stringify(Tl(x))}d(b)}}return typeof c=="string"?c:function(p){const y=p.reduce((k,O)=>k+O.length,0),x=new Uint8Array(y);let b=0;for(const k of p)x.set(k,b),b+=k.length;return x}(c)}function E9(r){const i=typeof r.data=="string"?B2(r.data):r.data;return[Qs({type:"attachment",length:i.length,filename:r.filename,content_type:r.contentType,attachment_type:r.attachmentType}),i]}const _9={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function lw(r){return _9[r]}function cw(r){if(!r||!r.sdk)return;const{name:i,version:o}=r.sdk;return{name:i,version:o}}function O9(r,i,o,c){const d=cw(o),p=r.type&&r.type!=="replay_event"?r.type:"event";(function(x,b){b&&(x.sdk=x.sdk||{},x.sdk.name=x.sdk.name||b.name,x.sdk.version=x.sdk.version||b.version,x.sdk.integrations=[...x.sdk.integrations||[],...b.integrations||[]],x.sdk.packages=[...x.sdk.packages||[],...b.packages||[]])})(r,o&&o.sdk);const y=function(x,b,k,O){const N=x.sdkProcessingMetadata&&x.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:x.event_id,sent_at:new Date().toISOString(),...b&&{sdk:b},...!!k&&O&&{dsn:Oy(O)},...N&&{trace:Qs({...N})}}}(r,d,c,i);return delete r.sdkProcessingMetadata,Wg(y,[[{type:p},r]])}function U2(r,i,o,c=0){return new Ws((d,p)=>{const y=r[c];if(i===null||typeof y!="function")d(i);else{const x=y({...i},o);ii&&y.id&&x===null&&on.log(`Event processor "${y.id}" dropped event`),My(x)?x.then(b=>U2(r,b,o,c+1).then(d)).then(null,p):U2(r,x,o,c+1).then(d).then(null,p)}})}let Dy,uw,H2;function D9(r,i){const{fingerprint:o,span:c,breadcrumbs:d,sdkProcessingMetadata:p}=i;(function(y,x){const{extra:b,tags:k,user:O,contexts:N,level:Z,transactionName:J}=x,D=Qs(b);D&&Object.keys(D).length&&(y.extra={...D,...y.extra});const F=Qs(k);F&&Object.keys(F).length&&(y.tags={...F,...y.tags});const ae=Qs(O);ae&&Object.keys(ae).length&&(y.user={...ae,...y.user});const ee=Qs(N);ee&&Object.keys(ee).length&&(y.contexts={...ee,...y.contexts}),Z&&(y.level=Z),J&&y.type!=="transaction"&&(y.transaction=J)})(r,i),c&&function(y,x){y.contexts={trace:x9(x),...y.contexts},y.sdkProcessingMetadata={dynamicSamplingContext:C9(x),...y.sdkProcessingMetadata};const b=iw(x),k=R2(b).description;k&&!y.transaction&&y.type==="transaction"&&(y.transaction=k)}(r,c),function(y,x){y.fingerprint=y.fingerprint?Array.isArray(y.fingerprint)?y.fingerprint:[y.fingerprint]:[],x&&(y.fingerprint=y.fingerprint.concat(x)),y.fingerprint&&!y.fingerprint.length&&delete y.fingerprint}(r,o),function(y,x){const b=[...y.breadcrumbs||[],...x];y.breadcrumbs=b.length?b:void 0}(r,d),function(y,x){y.sdkProcessingMetadata={...y.sdkProcessingMetadata,...x}}(r,p)}function dw(r,i){const{extra:o,tags:c,user:d,contexts:p,level:y,sdkProcessingMetadata:x,breadcrumbs:b,fingerprint:k,eventProcessors:O,attachments:N,propagationContext:Z,transactionName:J,span:D}=i;jy(r,"extra",o),jy(r,"tags",c),jy(r,"user",d),jy(r,"contexts",p),r.sdkProcessingMetadata=_y(r.sdkProcessingMetadata,x,2),y&&(r.level=y),J&&(r.transactionName=J),D&&(r.span=D),b.length&&(r.breadcrumbs=[...r.breadcrumbs,...b]),k.length&&(r.fingerprint=[...r.fingerprint,...k]),O.length&&(r.eventProcessors=[...r.eventProcessors,...O]),N.length&&(r.attachments=[...r.attachments,...N]),r.propagationContext={...r.propagationContext,...Z}}function jy(r,i,o){r[i]=_y(r[i],o,1)}function j9(r,i,o,c,d,p){const{normalizeDepth:y=3,normalizeMaxBreadth:x=1e3}=r,b={...i,event_id:i.event_id||o.event_id||Js(),timestamp:i.timestamp||Qg()},k=o.integrations||r.integrations.map(D=>D.name);(function(D,F){const{environment:ae,release:ee,dist:B,maxValueLength:Y=250}=F;D.environment=D.environment||ae||N2,!D.release&&ee&&(D.release=ee),!D.dist&&B&&(D.dist=B),D.message&&(D.message=lf(D.message,Y));const $=D.exception&&D.exception.values&&D.exception.values[0];$&&$.value&&($.value=lf($.value,Y));const Q=D.request;Q&&Q.url&&(Q.url=lf(Q.url,Y))})(b,r),function(D,F){F.length>0&&(D.sdk=D.sdk||{},D.sdk.integrations=[...D.sdk.integrations||[],...F])}(b,k),d&&d.emit("applyFrameMetadata",i),i.type===void 0&&function(D,F){const ae=function(ee){const B=$n._sentryDebugIds;if(!B)return{};const Y=Object.keys(B);return H2&&Y.length===uw||(uw=Y.length,H2=Y.reduce(($,Q)=>{Dy||(Dy={});const z=Dy[Q];if(z)$[z[0]]=z[1];else{const V=ee(Q);for(let le=V.length-1;le>=0;le--){const se=V[le],K=se&&se.filename,L=B[Q];if(K&&L){$[K]=L,Dy[Q]=[K,L];break}}}return $},{})),H2}(F);try{D.exception.values.forEach(ee=>{ee.stacktrace.frames.forEach(B=>{ae&&B.filename&&(B.debug_id=ae[B.filename])})})}catch{}}(b,r.stackParser);const O=function(D,F){if(!F)return D;const ae=D?D.clone():new zc;return ae.update(F),ae}(c,o.captureContext);o.mechanism&&cf(b,o.mechanism);const N=d?d.getEventProcessors():[],Z=xy("globalScope",()=>new zc).getScopeData();p&&dw(Z,p.getScopeData()),O&&dw(Z,O.getScopeData());const J=[...o.attachments||[],...Z.attachments];return J.length&&(o.attachments=J),D9(b,Z),U2([...N,...Z.eventProcessors],b,o).then(D=>(D&&function(F){const ae={};try{F.exception.values.forEach(B=>{B.stacktrace.frames.forEach(Y=>{Y.debug_id&&(Y.abs_path?ae[Y.abs_path]=Y.debug_id:Y.filename&&(ae[Y.filename]=Y.debug_id),delete Y.debug_id)})})}catch{}if(Object.keys(ae).length===0)return;F.debug_meta=F.debug_meta||{},F.debug_meta.images=F.debug_meta.images||[];const ee=F.debug_meta.images;Object.entries(ae).forEach(([B,Y])=>{ee.push({type:"sourcemap",code_file:B,debug_id:Y})})}(D),typeof y=="number"&&y>0?function(F,ae,ee){if(!F)return null;const B={...F,...F.breadcrumbs&&{breadcrumbs:F.breadcrumbs.map(Y=>({...Y,...Y.data&&{data:Tl(Y.data,ae,ee)}}))},...F.user&&{user:Tl(F.user,ae,ee)},...F.contexts&&{contexts:Tl(F.contexts,ae,ee)},...F.extra&&{extra:Tl(F.extra,ae,ee)}};return F.contexts&&F.contexts.trace&&B.contexts&&(B.contexts.trace=F.contexts.trace,F.contexts.trace.data&&(B.contexts.trace.data=Tl(F.contexts.trace.data,ae,ee))),F.spans&&(B.spans=F.spans.map(Y=>({...Y,...Y.data&&{data:Tl(Y.data,ae,ee)}}))),F.contexts&&F.contexts.flags&&B.contexts&&(B.contexts.flags=Tl(F.contexts.flags,3,ee)),B}(D,y,x):D))}function PE(r){}function hw(r,i){return pd().captureEvent(r,i)}function fw(r){const i=ka(),o=Jg(),c=pd(),{release:d,environment:p=N2}=i&&i.getOptions()||{},{userAgent:y}=$n.navigator||{},x=h9({release:d,environment:p,user:c.getUser()||o.getUser(),...y&&{userAgent:y},...r}),b=o.getSession();return b&&b.status==="ok"&&uf(b,{status:"exited"}),pw(),o.setSession(x),c.setSession(x),x}function pw(){const r=Jg(),i=pd(),o=i.getSession()||r.getSession();o&&function(c,d){let p={};c.status==="ok"&&(p={status:"exited"}),uf(c,p)}(o),gw(),r.setSession(),i.setSession()}function gw(){const r=Jg(),i=pd(),o=ka(),c=i.getSession()||r.getSession();c&&o&&o.captureSession(c)}function mw(r=!1){r?pw():gw()}function L9(r,i,o){return i||`${function(c){return`${function(d){const p=d.protocol?`${d.protocol}:`:"",y=d.port?`:${d.port}`:"";return`${p}//${d.host}${y}${d.path?`/${d.path}`:""}/api/`}(c)}${c.projectId}/envelope/`}(r)}?${function(c,d){const p={sentry_version:"7"};return c.publicKey&&(p.sentry_key=c.publicKey),d&&(p.sentry_client=`${d.name}/${d.version}`),new URLSearchParams(p).toString()}(r,o)}`}const yw=[];function vw(r,i){for(const o of i)o&&o.afterAllSetup&&o.afterAllSetup(r)}function bw(r,i,o){if(o[i.name])ii&&on.log(`Integration skipped because it was already installed: ${i.name}`);else{if(o[i.name]=i,yw.indexOf(i.name)===-1&&typeof i.setupOnce=="function"&&(i.setupOnce(),yw.push(i.name)),i.setup&&typeof i.setup=="function"&&i.setup(r),typeof i.preprocessEvent=="function"){const c=i.preprocessEvent.bind(i);r.on("preprocessEvent",(d,p)=>c(d,p,r))}if(typeof i.processEvent=="function"){const c=i.processEvent.bind(i),d=Object.assign((p,y)=>c(p,y,r),{id:i.name});r.addEventProcessor(d)}ii&&on.log(`Integration installed: ${i.name}`)}}class qr extends Error{constructor(i,o="warn"){super(i),this.message=i,this.logLevel=o}}const xw="Not capturing exception because it's already been captured.";class R9{constructor(i){if(this._options=i,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],i.dsn?this._dsn=k9(i.dsn):ii&&on.warn("No DSN provided, client will not send events."),this._dsn){const c=L9(this._dsn,i.tunnel,i._metadata?i._metadata.sdk:void 0);this._transport=i.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...i.transportOptions,url:c})}const o=["enableTracing","tracesSampleRate","tracesSampler"].find(c=>c in i&&i[c]==null);o&&Zg(()=>{console.warn(`[Sentry] Deprecation warning: \`${o}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(i,o,c){const d=Js();if(F6(i))return ii&&on.log(xw),d;const p={event_id:d,...o};return this._process(this.eventFromException(i,p).then(y=>this._captureEvent(y,p,c))),p.event_id}captureMessage(i,o,c,d){const p={event_id:Js(),...c},y=T2(i)?i:String(i),x=k2(i)?this.eventFromMessage(y,o,p):this.eventFromException(i,p);return this._process(x.then(b=>this._captureEvent(b,p,d))),p.event_id}captureEvent(i,o,c){const d=Js();if(o&&o.originalException&&F6(o.originalException))return ii&&on.log(xw),d;const p={event_id:d,...o},y=(i.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(i,p,y||c)),p.event_id}captureSession(i){typeof i.release!="string"?ii&&on.warn("Discarded session because of missing or non-string release"):(this.sendSession(i),uf(i,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(i){const o=this._transport;return o?(this.emit("flush"),this._isClientDoneProcessing(i).then(c=>o.flush(i).then(d=>c&&d))):fd(!0)}close(i){return this.flush(i).then(o=>(this.getOptions().enabled=!1,this.emit("close"),o))}getEventProcessors(){return this._eventProcessors}addEventProcessor(i){this._eventProcessors.push(i)}init(){(this._isEnabled()||this._options.integrations.some(({name:i})=>i.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(i){return this._integrations[i]}addIntegration(i){const o=this._integrations[i.name];bw(this,i,this._integrations),o||vw(this,[i])}sendEvent(i,o={}){this.emit("beforeSendEvent",i,o);let c=O9(i,this._dsn,this._options._metadata,this._options.tunnel);for(const p of o.attachments||[])c=M9(c,E9(p));const d=this.sendEnvelope(c);d&&d.then(p=>this.emit("afterSendEvent",i,p),null)}sendSession(i){const o=function(c,d,p,y){const x=cw(p);return Wg({sent_at:new Date().toISOString(),...x&&{sdk:x},...!!y&&d&&{dsn:Oy(d)}},["aggregates"in c?[{type:"sessions"},c]:[{type:"session"},c.toJSON()]])}(i,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(i,o,c){if(this._options.sendClientReports){const d=typeof c=="number"?c:1,p=`${i}:${o}`;ii&&on.log(`Recording outcome: "${p}"${d>1?` (${d} times)`:""}`),this._outcomes[p]=(this._outcomes[p]||0)+d}}on(i,o){const c=this._hooks[i]=this._hooks[i]||[];return c.push(o),()=>{const d=c.indexOf(o);d>-1&&c.splice(d,1)}}emit(i,...o){const c=this._hooks[i];c&&c.forEach(d=>d(...o))}sendEnvelope(i){return this.emit("beforeEnvelope",i),this._isEnabled()&&this._transport?this._transport.send(i).then(null,o=>(ii&&on.error("Error while sending envelope:",o),o)):(ii&&on.error("Transport disabled"),fd({}))}_setupIntegrations(){const{integrations:i}=this._options;this._integrations=function(o,c){const d={};return c.forEach(p=>{p&&bw(o,p,d)}),d}(this,i),vw(this,i)}_updateSessionFromEvent(i,o){let c=o.level==="fatal",d=!1;const p=o.exception&&o.exception.values;if(p){d=!0;for(const x of p){const b=x.mechanism;if(b&&b.handled===!1){c=!0;break}}}const y=i.status==="ok";(y&&i.errors===0||y&&c)&&(uf(i,{...c&&{status:"crashed"},errors:i.errors||Number(d||c)}),this.captureSession(i))}_isClientDoneProcessing(i){return new Ws(o=>{let c=0;const d=setInterval(()=>{this._numProcessing==0?(clearInterval(d),o(!0)):(c+=1,i&&c>=i&&(clearInterval(d),o(!1)))},1)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(i,o,c=pd(),d=Jg()){const p=this.getOptions(),y=Object.keys(this._integrations);return!o.integrations&&y.length>0&&(o.integrations=y),this.emit("preprocessEvent",i,o),i.type||d.setLastEventId(i.event_id||o.event_id),j9(p,i,o,c,this,d).then(x=>{if(x===null)return x;x.contexts={trace:m9(c),...x.contexts};const b=function(k,O){const N=O.getPropagationContext();return N.dsc||aw(N.traceId,k)}(this,c);return x.sdkProcessingMetadata={dynamicSamplingContext:b,...x.sdkProcessingMetadata},x})}_captureEvent(i,o={},c){return this._processEvent(i,o,c).then(d=>d.event_id,d=>{ii&&(d instanceof qr&&d.logLevel==="log"?on.log(d.message):on.warn(d))})}_processEvent(i,o,c){const d=this.getOptions(),{sampleRate:p}=d,y=ww(i),x=Sw(i),b=i.type||"error",k=`before send for type \`${b}\``,O=p===void 0?void 0:function(J){if(typeof J=="boolean")return Number(J);const D=typeof J=="string"?parseFloat(J):J;if(!(typeof D!="number"||isNaN(D)||D<0||D>1))return D;ii&&on.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(J)} of type ${JSON.stringify(typeof J)}.`)}(p);if(x&&typeof O=="number"&&Math.random()>O)return this.recordDroppedEvent("sample_rate","error",i),Ey(new qr(`Discarding event because it's not included in the random sample (sampling rate = ${p})`,"log"));const N=b==="replay_event"?"replay":b,Z=(i.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(i,o,c,Z).then(J=>{if(J===null)throw this.recordDroppedEvent("event_processor",N,i),new qr("An event processor returned `null`, will not send event.","log");if(o.data&&o.data.__sentry__===!0)return J;const D=function(F,ae,ee,B){const{beforeSend:Y,beforeSendTransaction:$,beforeSendSpan:Q}=ae;if(Sw(ee)&&Y)return Y(ee,B);if(ww(ee)){if(ee.spans&&Q){const z=[];for(const V of ee.spans){const le=Q(V);le?z.push(le):(w9(),F.recordDroppedEvent("before_send","span"))}ee.spans=z}if($){if(ee.spans){const z=ee.spans.length;ee.sdkProcessingMetadata={...ee.sdkProcessingMetadata,spanCountBeforeProcessing:z}}return $(ee,B)}}return ee}(this,d,J,o);return function(F,ae){const ee=`${ae} must return \`null\` or a valid event.`;if(My(F))return F.then(B=>{if(!of(B)&&B!==null)throw new qr(ee);return B},B=>{throw new qr(`${ae} rejected with ${B}`)});if(!of(F)&&F!==null)throw new qr(ee);return F}(D,k)}).then(J=>{if(J===null){if(this.recordDroppedEvent("before_send",N,i),y){const ae=1+(i.spans||[]).length;this.recordDroppedEvent("before_send","span",ae)}throw new qr(`${k} returned \`null\`, will not send event.`,"log")}const D=c&&c.getSession();if(!y&&D&&this._updateSessionFromEvent(D,J),y){const ae=(J.sdkProcessingMetadata&&J.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(J.spans?J.spans.length:0);ae>0&&this.recordDroppedEvent("before_send","span",ae)}const F=J.transaction_info;if(y&&F&&J.transaction!==i.transaction){const ae="custom";J.transaction_info={...F,source:ae}}return this.sendEvent(J,o),J}).then(null,J=>{throw J instanceof qr?J:(this.captureException(J,{data:{__sentry__:!0},originalException:J}),new qr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
111
+ Reason: ${J}`))})}_process(i){this._numProcessing++,i.then(o=>(this._numProcessing--,o),o=>(this._numProcessing--,o))}_clearOutcomes(){const i=this._outcomes;return this._outcomes={},Object.entries(i).map(([o,c])=>{const[d,p]=o.split(":");return{reason:d,category:p,quantity:c}})}_flushOutcomes(){ii&&on.log("Flushing outcomes...");const i=this._clearOutcomes();if(i.length===0)return void(ii&&on.log("No outcomes to send"));if(!this._dsn)return void(ii&&on.log("No dsn provided, will not send outcomes"));ii&&on.log("Sending outcomes:",i);const o=(c=i,Wg((d=this._options.tunnel&&Oy(this._dsn))?{dsn:d}:{},[[{type:"client_report"},{timestamp:p||Qg(),discarded_events:c}]]));var c,d,p;this.sendEnvelope(o)}}function Sw(r){return r.type===void 0}function ww(r){return r.type==="transaction"}function N9(r){const i=[];function o(c){return i.splice(i.indexOf(c),1)[0]||Promise.resolve(void 0)}return{$:i,add:function(c){if(!(r===void 0||i.length<r))return Ey(new qr("Not adding Promise because buffer limit was reached."));const d=c();return i.indexOf(d)===-1&&i.push(d),d.then(()=>o(d)).then(null,()=>o(d).then(null,()=>{})),d},drain:function(c){return new Ws((d,p)=>{let y=i.length;if(!y)return d(!0);const x=setTimeout(()=>{c&&c>0&&d(!1)},c);i.forEach(b=>{fd(b).then(()=>{--y||(clearTimeout(x),d(!0))},p)})})}}}function z9(r,{statusCode:i,headers:o},c=Date.now()){const d={...r},p=o&&o["x-sentry-rate-limits"],y=o&&o["retry-after"];if(p)for(const x of p.trim().split(",")){const[b,k,,,O]=x.split(":",5),N=parseInt(b,10),Z=1e3*(isNaN(N)?60:N);if(k)for(const J of k.split(";"))J==="metric_bucket"&&O&&!O.split(";").includes("custom")||(d[J]=c+Z);else d.all=c+Z}else y?d.all=c+function(x,b=Date.now()){const k=parseInt(`${x}`,10);if(!isNaN(k))return 1e3*k;const O=Date.parse(`${x}`);return isNaN(O)?6e4:O-b}(y,c):i===429&&(d.all=c+6e4);return d}function B9(r,i,o=N9(r.bufferSize||64)){let c={};return{send:function(d){const p=[];if(ow(d,(b,k)=>{const O=lw(k);if(function(N,Z,J=Date.now()){return function(D,F){return D[F]||D.all||0}(N,Z)>J}(c,O)){const N=Cw(b,k);r.recordDroppedEvent("ratelimit_backoff",O,N)}else p.push(b)}),p.length===0)return fd({});const y=Wg(d[0],p),x=b=>{ow(y,(k,O)=>{const N=Cw(k,O);r.recordDroppedEvent(b,lw(O),N)})};return o.add(()=>i({body:A9(y)}).then(b=>(b.statusCode!==void 0&&(b.statusCode<200||b.statusCode>=300)&&ii&&on.warn(`Sentry responded with status code ${b.statusCode} to sent event.`),c=z9(c,b),b),b=>{throw x("network_error"),b})).then(b=>b,b=>{if(b instanceof qr)return ii&&on.error("Skipped sending event because buffer is full."),x("queue_overflow"),fd({});throw b})},flush:d=>o.drain(d)}}function Cw(r,i){if(i==="event"||i==="transaction")return Array.isArray(r)?r[1]:void 0}const U9=100;function gd(r,i){const o=ka(),c=Jg();if(!o)return;const{beforeBreadcrumb:d=null,maxBreadcrumbs:p=U9}=o.getOptions();if(p<=0)return;const y={timestamp:Qg(),...r},x=d?Zg(()=>d(y,i)):y;x!==null&&(o.emit&&o.emit("beforeAddBreadcrumb",x,i),c.addBreadcrumb(x,p))}let Tw;const kw=new WeakMap,H9=()=>({name:"FunctionToString",setupOnce(){Tw=Function.prototype.toString;try{Function.prototype.toString=function(...r){const i=A2(this),o=kw.has(ka())&&i!==void 0?i:this;return Tw.apply(o,r)}}catch{}},setup(r){kw.set(r,!0)}}),P9=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],V9=(r={})=>({name:"InboundFilters",processEvent(i,o,c){const d=c.getOptions(),p=function(y={},x={}){return{allowUrls:[...y.allowUrls||[],...x.allowUrls||[]],denyUrls:[...y.denyUrls||[],...x.denyUrls||[]],ignoreErrors:[...y.ignoreErrors||[],...x.ignoreErrors||[],...y.disableErrorDefaults?[]:P9],ignoreTransactions:[...y.ignoreTransactions||[],...x.ignoreTransactions||[]],ignoreInternal:y.ignoreInternal===void 0||y.ignoreInternal}}(r,d);return function(y,x){return x.ignoreInternal&&function(b){try{return b.exception.values[0].type==="SentryError"}catch{}return!1}(y)?(ii&&on.warn(`Event dropped due to being internal Sentry Error.
112
+ Event: ${Nc(y)}`),!0):function(b,k){return b.type||!k||!k.length?!1:function(O){const N=[];O.message&&N.push(O.message);let Z;try{Z=O.exception.values[O.exception.values.length-1]}catch{}return Z&&Z.value&&(N.push(Z.value),Z.type&&N.push(`${Z.type}: ${Z.value}`)),N}(b).some(O=>Ay(O,k))}(y,x.ignoreErrors)?(ii&&on.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
113
+ Event: ${Nc(y)}`),!0):function(b){return b.type||!b.exception||!b.exception.values||b.exception.values.length===0?!1:!b.message&&!b.exception.values.some(k=>k.stacktrace||k.type&&k.type!=="Error"||k.value)}(y)?(ii&&on.warn(`Event dropped due to not having an error message, error type or stacktrace.
114
+ Event: ${Nc(y)}`),!0):function(b,k){if(b.type!=="transaction"||!k||!k.length)return!1;const O=b.transaction;return!!O&&Ay(O,k)}(y,x.ignoreTransactions)?(ii&&on.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
115
+ Event: ${Nc(y)}`),!0):function(b,k){if(!k||!k.length)return!1;const O=Ly(b);return!!O&&Ay(O,k)}(y,x.denyUrls)?(ii&&on.warn(`Event dropped due to being matched by \`denyUrls\` option.
116
+ Event: ${Nc(y)}.
117
+ Url: ${Ly(y)}`),!0):function(b,k){if(!k||!k.length)return!0;const O=Ly(b);return!O||Ay(O,k)}(y,x.allowUrls)?!1:(ii&&on.warn(`Event dropped due to not being matched by \`allowUrls\` option.
118
+ Event: ${Nc(y)}.
119
+ Url: ${Ly(y)}`),!0)}(i,p)?null:i}});function Ly(r){try{let i;try{i=r.exception.values[0].stacktrace.frames}catch{}return i?function(o=[]){for(let c=o.length-1;c>=0;c--){const d=o[c];if(d&&d.filename!=="<anonymous>"&&d.filename!=="[native code]")return d.filename||null}return null}(i):null}catch{return ii&&on.error(`Cannot extract url for event ${Nc(r)}`),null}}function $9(r,i,o=250,c,d,p,y){if(!(p.exception&&p.exception.values&&y&&dd(y.originalException,Error)))return;const x=p.exception.values.length>0?p.exception.values[p.exception.values.length-1]:void 0;var b,k;x&&(p.exception.values=(b=P2(r,i,d,y.originalException,c,p.exception.values,x,0),k=o,b.map(O=>(O.value&&(O.value=lf(O.value,k)),O))))}function P2(r,i,o,c,d,p,y,x){if(p.length>=o+1)return p;let b=[...p];if(dd(c[d],Error)){Mw(y,x);const k=r(i,c[d]),O=b.length;Aw(k,d,O,x),b=P2(r,i,o,c[d],d,[k,...b],k,O)}return Array.isArray(c.errors)&&c.errors.forEach((k,O)=>{if(dd(k,Error)){Mw(y,x);const N=r(i,k),Z=b.length;Aw(N,`errors[${O}]`,Z,x),b=P2(r,i,o,k,d,[N,...b],N,Z)}}),b}function Mw(r,i){r.mechanism=r.mechanism||{type:"generic",handled:!0},r.mechanism={...r.mechanism,...r.type==="AggregateError"&&{is_exception_group:!0},exception_id:i}}function Aw(r,i,o,c){r.mechanism=r.mechanism||{type:"generic",handled:!0},r.mechanism={...r.mechanism,type:"chained",source:i,exception_id:o,parent_id:c}}function V2(r){if(!r)return{};const i=r.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!i)return{};const o=i[6]||"",c=i[8]||"";return{host:i[4],path:i[5],protocol:i[2],search:o,hash:c,relative:i[5]+o+c}}function I9(){"console"in $n&&b2.forEach(function(r){r in $n.console&&_s($n.console,r,function(i){return Sy[r]=i,function(...o){Ir("console",{args:o,level:r});const c=Sy[r];c&&c.apply($n.console,o)}})})}function q9(r){return r==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(r)?r:"log"}const G9=()=>{let r;return{name:"Dedupe",processEvent(i){if(i.type)return i;try{if(function(o,c){return c?!!(function(d,p){const y=d.message,x=p.message;return!(!y&&!x||y&&!x||!y&&x||y!==x||!_w(d,p)||!Ew(d,p))}(o,c)||function(d,p){const y=Ow(p),x=Ow(d);return!(!y||!x||y.type!==x.type||y.value!==x.value||!_w(d,p)||!Ew(d,p))}(o,c)):!1}(i,r))return ii&&on.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return r=i}}};function Ew(r,i){let o=N6(r),c=N6(i);if(!o&&!c)return!0;if(o&&!c||!o&&c||c.length!==o.length)return!1;for(let d=0;d<c.length;d++){const p=c[d],y=o[d];if(p.filename!==y.filename||p.lineno!==y.lineno||p.colno!==y.colno||p.function!==y.function)return!1}return!0}function _w(r,i){let o=r.fingerprint,c=i.fingerprint;if(!o&&!c)return!0;if(o&&!c||!o&&c)return!1;try{return o.join("")===c.join("")}catch{return!1}}function Ow(r){return r.exception&&r.exception.values&&r.exception.values[0]}function Dw(r){return r===void 0?void 0:r>=400&&r<500?"warning":r>=500?"error":void 0}const $2=$n;function I2(r){return r&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(r.toString())}function Y9(){if(typeof EdgeRuntime=="string")return!0;if(!function(){if(!("fetch"in $2))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}())return!1;if(I2($2.fetch))return!0;let r=!1;const i=$2.document;if(i&&typeof i.createElement=="function")try{const o=i.createElement("iframe");o.hidden=!0,i.head.appendChild(o),o.contentWindow&&o.contentWindow.fetch&&(r=I2(o.contentWindow.fetch)),i.head.removeChild(o)}catch(o){od&&on.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",o)}return r}function X9(r,i){const o="fetch";cd(o,r),ud(o,()=>function(c,d=!1){d&&!Y9()||_s($n,"fetch",function(p){return function(...y){const x=new Error,{method:b,url:k}=function(N){if(N.length===0)return{method:"GET",url:""};if(N.length===2){const[J,D]=N;return{url:jw(J),method:q2(D,"method")?String(D.method).toUpperCase():"GET"}}const Z=N[0];return{url:jw(Z),method:q2(Z,"method")?String(Z.method).toUpperCase():"GET"}}(y),O={args:y,fetchData:{method:b,url:k},startTimestamp:1e3*wl(),virtualError:x};return c||Ir("fetch",{...O}),p.apply($n,y).then(async N=>(c?c(N):Ir("fetch",{...O,endTimestamp:1e3*wl(),response:N}),N),N=>{throw Ir("fetch",{...O,endTimestamp:1e3*wl(),error:N}),C2(N)&&N.stack===void 0&&(N.stack=x.stack,hd(N,"framesToPop",1)),N})}})}(void 0,i))}function q2(r,i){return!!r&&typeof r=="object"&&!!r[i]}function jw(r){return typeof r=="string"?r:r?q2(r,"url")?r.url:r.toString?r.toString():"":""}const Ry=$n,sa=$n;let G2=0;function Lw(){return G2>0}function hf(r,i={}){if(!function(c){return typeof c=="function"}(r))return r;try{const c=r.__sentry_wrapped__;if(c)return typeof c=="function"?c:r;if(A2(r))return r}catch{return r}const o=function(...c){try{const d=c.map(p=>hf(p,i));return r.apply(this,d)}catch(d){throw G2++,setTimeout(()=>{G2--}),function(...p){const y=L2(Ty());if(p.length===2){const[x,b]=p;return x?y.withSetScope(x,b):y.withScope(b)}y.withScope(p[0])}(p=>{var y;p.addEventProcessor(x=>(i.mechanism&&(_2(x,void 0),cf(x,i.mechanism)),x.extra={...x.extra,arguments:c},x)),y=d,pd().captureException(y,void 0)}),d}};try{for(const c in r)Object.prototype.hasOwnProperty.call(r,c)&&(o[c]=r[c])}catch{}I6(o,r),hd(r,"__sentry_wrapped__",o);try{Object.getOwnPropertyDescriptor(o,"name").configurable&&Object.defineProperty(o,"name",{get:()=>r.name})}catch{}return o}const Ny=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Y2(r,i){const o=F2(r,i),c={type:Q9(i),value:J9(i)};return o.length&&(c.stacktrace={frames:o}),c.type===void 0&&c.value===""&&(c.value="Unrecoverable error caught"),c}function F9(r,i,o,c){const d=ka(),p=d&&d.getOptions().normalizeDepth,y=function(k){for(const O in k)if(Object.prototype.hasOwnProperty.call(k,O)){const N=k[O];if(N instanceof Error)return N}}(i),x={__serialized__:rw(i,p)};if(y)return{exception:{values:[Y2(r,y)]},extra:x};const b={exception:{values:[{type:ky(i)?i.constructor.name:c?"UnhandledRejection":"Error",value:W9(i,{isUnhandledRejection:c})}]},extra:x};if(o){const k=F2(r,o);k.length&&(b.exception.values[0].stacktrace={frames:k})}return b}function X2(r,i){return{exception:{values:[Y2(r,i)]}}}function F2(r,i){const o=i.stacktrace||i.stack||"",c=function(p){return p&&Z9.test(p.message)?1:0}(i),d=function(p){return typeof p.framesToPop=="number"?p.framesToPop:0}(i);try{return r(o,c,d)}catch{}return[]}const Z9=/Minified React error #\d+;/i;function Rw(r){return typeof WebAssembly<"u"&&WebAssembly.Exception!==void 0&&r instanceof WebAssembly.Exception}function Q9(r){const i=r&&r.name;return!i&&Rw(r)?r.message&&Array.isArray(r.message)&&r.message.length==2?r.message[0]:"WebAssembly.Exception":i}function J9(r){const i=r&&r.message;return i?i.error&&typeof i.error.message=="string"?i.error.message:Rw(r)&&Array.isArray(r.message)&&r.message.length==2?r.message[1]:i:"No error message"}function Z2(r,i,o,c,d){let p;if(U6(i)&&i.error)return X2(r,i.error);if(H6(i)||rf(i,"DOMException")){const y=i;if("stack"in i)p=X2(r,i);else{const x=y.name||(H6(y)?"DOMError":"DOMException"),b=y.message?`${x}: ${y.message}`:x;p=Q2(r,b,o,c),_2(p,b)}return"code"in y&&(p.tags={...p.tags,"DOMException.code":`${y.code}`}),p}return C2(i)?X2(r,i):of(i)||ky(i)?(p=F9(r,i,o,d),cf(p,{synthetic:!0}),p):(p=Q2(r,i,o,c),_2(p,`${i}`),cf(p,{synthetic:!0}),p)}function Q2(r,i,o,c){const d={};if(c&&o){const p=F2(r,o);p.length&&(d.exception={values:[{value:i,stacktrace:{frames:p}}]}),cf(d,{synthetic:!0})}if(T2(i)){const{__sentry_template_string__:p,__sentry_template_values__:y}=i;return d.logentry={message:p,params:y},d}return d.message=i,d}function W9(r,{isUnhandledRejection:i}){const o=function(d,p=40){const y=Object.keys(q6(d));y.sort();const x=y[0];if(!x)return"[object has no keys]";if(x.length>=p)return lf(x,p);for(let b=y.length;b>0;b--){const k=y.slice(0,b).join(", ");if(!(k.length>p))return b===y.length?k:lf(k,p)}return""}(r),c=i?"promise rejection":"exception";return U6(r)?`Event \`ErrorEvent\` captured as ${c} with message \`${r.message}\``:ky(r)?`Event \`${function(d){try{const p=Object.getPrototypeOf(d);return p?p.constructor.name:void 0}catch{}}(r)}\` (type=${r.type}) captured as ${c}`:`Object captured as ${c} with keys: ${o}`}class K9 extends R9{constructor(i){const o={parentSpanIsAlwaysRootSpan:!0,...i};(function(c,d,p=[d],y="npm"){const x=c._metadata||{};x.sdk||(x.sdk={name:`sentry.javascript.${d}`,packages:p.map(b=>({name:`${y}:@sentry/${b}`,version:rd})),version:rd}),c._metadata=x})(o,"browser",["browser"],sa.SENTRY_SDK_SOURCE||"npm"),super(o),o.sendClientReports&&sa.document&&sa.document.addEventListener("visibilitychange",()=>{sa.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(i,o){return function(c,d,p,y){const x=Z2(c,d,p&&p.syntheticException||void 0,y);return cf(x),x.level="error",p&&p.event_id&&(x.event_id=p.event_id),fd(x)}(this._options.stackParser,i,o,this._options.attachStacktrace)}eventFromMessage(i,o="info",c){return function(d,p,y="info",x,b){const k=Q2(d,p,x&&x.syntheticException||void 0,b);return k.level=y,x&&x.event_id&&(k.event_id=x.event_id),fd(k)}(this._options.stackParser,i,o,c,this._options.attachStacktrace)}captureUserFeedback(i){if(!this._isEnabled())return void(Ny&&on.warn("SDK not enabled, will not capture user feedback."));const o=function(c,{metadata:d,tunnel:p,dsn:y}){const x={event_id:c.event_id,sent_at:new Date().toISOString(),...d&&d.sdk&&{sdk:{name:d.sdk.name,version:d.sdk.version}},...!!p&&!!y&&{dsn:Oy(y)}};return Wg(x,[function(k){return[{type:"user_report"},k]}(c)])}(i,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(o)}_prepareEvent(i,o,c){return i.platform=i.platform||"javascript",super._prepareEvent(i,o,c)}}const e8=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ga=$n;let Nw,J2,W2,zy;function t8(){if(!Ga.document)return;const r=Ir.bind(null,"dom"),i=zw(r,!0);Ga.document.addEventListener("click",i,!1),Ga.document.addEventListener("keypress",i,!1),["EventTarget","Node"].forEach(o=>{const c=Ga[o],d=c&&c.prototype;d&&d.hasOwnProperty&&d.hasOwnProperty("addEventListener")&&(_s(d,"addEventListener",function(p){return function(y,x,b){if(y==="click"||y=="keypress")try{const k=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},O=k[y]=k[y]||{refCount:0};if(!O.handler){const N=zw(r);O.handler=N,p.call(this,y,N,b)}O.refCount++}catch{}return p.call(this,y,x,b)}}),_s(d,"removeEventListener",function(p){return function(y,x,b){if(y==="click"||y=="keypress")try{const k=this.__sentry_instrumentation_handlers__||{},O=k[y];O&&(O.refCount--,O.refCount<=0&&(p.call(this,y,O.handler,b),O.handler=void 0,delete k[y]),Object.keys(k).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return p.call(this,y,x,b)}}))})}function zw(r,i=!1){return o=>{if(!o||o._sentryCaptured)return;const c=function(p){try{return p.target}catch{return null}}(o);if(function(p,y){return p==="keypress"&&(!y||!y.tagName||y.tagName!=="INPUT"&&y.tagName!=="TEXTAREA"&&!y.isContentEditable)}(o.type,c))return;hd(o,"_sentryCaptured",!0),c&&!c._sentryId&&hd(c,"_sentryId",Js());const d=o.type==="keypress"?"input":o.type;(function(p){if(p.type!==J2)return!1;try{if(!p.target||p.target._sentryId!==W2)return!1}catch{}return!0})(o)||(r({event:o,name:d,global:i}),J2=o.type,W2=c?c._sentryId:void 0),clearTimeout(Nw),Nw=Ga.setTimeout(()=>{W2=void 0,J2=void 0},1e3)}}function Bw(r){const i="history";cd(i,r),ud(i,n8)}function n8(){if(!function(){const o=Ry.chrome,c=o&&o.app&&o.app.runtime,d="history"in Ry&&!!Ry.history.pushState&&!!Ry.history.replaceState;return!c&&d}())return;const r=Ga.onpopstate;function i(o){return function(...c){const d=c.length>2?c[2]:void 0;if(d){const p=zy,y=String(d);zy=y,Ir("history",{from:p,to:y})}return o.apply(this,c)}}Ga.onpopstate=function(...o){const c=Ga.location.href,d=zy;if(zy=c,Ir("history",{from:d,to:c}),r)try{return r.apply(this,o)}catch{}},_s(Ga.history,"pushState",i),_s(Ga.history,"replaceState",i)}const By={};function Uw(r){By[r]=void 0}const Kg="__sentry_xhr_v3__";function i8(){if(!Ga.XMLHttpRequest)return;const r=XMLHttpRequest.prototype;r.open=new Proxy(r.open,{apply(i,o,c){const d=new Error,p=1e3*wl(),y=Sl(c[0])?c[0].toUpperCase():void 0,x=function(k){if(Sl(k))return k;try{return k.toString()}catch{}}(c[1]);if(!y||!x)return i.apply(o,c);o[Kg]={method:y,url:x,request_headers:{}},y==="POST"&&x.match(/sentry_key/)&&(o.__sentry_own_request__=!0);const b=()=>{const k=o[Kg];if(k&&o.readyState===4){try{k.status_code=o.status}catch{}Ir("xhr",{endTimestamp:1e3*wl(),startTimestamp:p,xhr:o,virtualError:d})}};return"onreadystatechange"in o&&typeof o.onreadystatechange=="function"?o.onreadystatechange=new Proxy(o.onreadystatechange,{apply:(k,O,N)=>(b(),k.apply(O,N))}):o.addEventListener("readystatechange",b),o.setRequestHeader=new Proxy(o.setRequestHeader,{apply(k,O,N){const[Z,J]=N,D=O[Kg];return D&&Sl(Z)&&Sl(J)&&(D.request_headers[Z.toLowerCase()]=J),k.apply(O,N)}}),i.apply(o,c)}}),r.send=new Proxy(r.send,{apply(i,o,c){const d=o[Kg];return d?(c[0]!==void 0&&(d.body=c[0]),Ir("xhr",{startTimestamp:1e3*wl(),xhr:o}),i.apply(o,c)):i.apply(o,c)}})}function a8(r,i=function(o){const c=By[o];if(c)return c;let d=Ga[o];if(I2(d))return By[o]=d.bind(Ga);const p=Ga.document;if(p&&typeof p.createElement=="function")try{const y=p.createElement("iframe");y.hidden=!0,p.head.appendChild(y);const x=y.contentWindow;x&&x[o]&&(d=x[o]),p.head.removeChild(y)}catch(y){e8&&on.warn(`Could not create sandbox iframe for ${o} check, bailing to window.${o}: `,y)}return d&&(By[o]=d.bind(Ga))}("fetch")){let o=0,c=0;return B9(r,function(d){const p=d.body.length;o+=p,c++;const y={body:d.body,method:"POST",referrerPolicy:"origin",headers:r.headers,keepalive:o<=6e4&&c<15,...r.fetchOptions};if(!i)return Uw("fetch"),Ey("No fetch implementation available");try{return i(r.url,y).then(x=>(o-=p,c--,{statusCode:x.status,headers:{"x-sentry-rate-limits":x.headers.get("X-Sentry-Rate-Limits"),"retry-after":x.headers.get("Retry-After")}}))}catch(x){return Uw("fetch"),o-=p,c--,Ey(x)}})}function K2(r,i,o,c){const d={filename:r,function:i==="<anonymous>"?ld:i,in_app:!0};return o!==void 0&&(d.lineno=o),c!==void 0&&(d.colno=c),d}const s8=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,r8=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o8=/\((\S*)(?::(\d+))(?::(\d+))\)/,l8=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,c8=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u8=function(...r){const i=r.sort((o,c)=>o[0]-c[0]).map(o=>o[1]);return(o,c=0,d=0)=>{const p=[],y=o.split(`
120
+ `);for(let x=c;x<y.length;x++){const b=y[x];if(b.length>1024)continue;const k=j6.test(b)?b.replace(j6,"$1"):b;if(!k.match(/\S*Error: /)){for(const O of i){const N=O(k);if(N){p.push(N);break}}if(p.length>=50+d)break}}return function(x){if(!x.length)return[];const b=Array.from(x);return/sentryWrapped/.test(wy(b).function||"")&&b.pop(),b.reverse(),L6.test(wy(b).function||"")&&(b.pop(),L6.test(wy(b).function||"")&&b.pop()),b.slice(0,50).map(k=>({...k,filename:k.filename||wy(b).filename,function:k.function||ld}))}(p.slice(d))}}([30,r=>{const i=s8.exec(r);if(i){const[,c,d,p]=i;return K2(c,ld,+d,+p)}const o=r8.exec(r);if(o){if(o[2]&&o[2].indexOf("eval")===0){const p=o8.exec(o[2]);p&&(o[2]=p[1],o[3]=p[2],o[4]=p[3])}const[c,d]=Hw(o[1]||ld,o[2]);return K2(d,c,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}}],[50,r=>{const i=l8.exec(r);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){const d=c8.exec(i[3]);d&&(i[1]=i[1]||"eval",i[3]=d[1],i[4]=d[2],i[5]="")}let o=i[3],c=i[1]||ld;return[c,o]=Hw(c,o),K2(o,c,i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}}]),Hw=(r,i)=>{const o=r.indexOf("safari-extension")!==-1,c=r.indexOf("safari-web-extension")!==-1;return o||c?[r.indexOf("@")!==-1?r.split("@")[0]:ld,o?`safari-extension:${i}`:`safari-web-extension:${i}`]:[r,i]},Pw=1024,d8=(r={})=>{const i={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...r};return{name:"Breadcrumbs",setup(o){var c;i.console&&function(d){const p="console";cd(p,d),ud(p,I9)}(function(d){return function(p){if(ka()!==d)return;const y={category:"console",data:{arguments:p.args,logger:"console"},level:q9(p.level),message:$6(p.args," ")};if(p.level==="assert"){if(p.args[0]!==!1)return;y.message=`Assertion failed: ${$6(p.args.slice(1)," ")||"console.assert"}`,y.data.arguments=p.args.slice(1)}gd(y,{input:p.args,level:p.level})}}(o)),i.dom&&(c=function(d,p){return function(y){if(ka()!==d)return;let x,b,k=typeof p=="object"?p.serializeAttribute:void 0,O=typeof p=="object"&&typeof p.maxStringLength=="number"?p.maxStringLength:void 0;O&&O>Pw&&(Ny&&on.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${O} was configured. Sentry will use 1024 instead.`),O=Pw),typeof k=="string"&&(k=[k]);try{const Z=y.event,J=function(D){return!!D&&!!D.target}(Z)?Z.target:Z;x=V6(J,{keyAttrs:k,maxStringLength:O}),b=function(D){if(!M2.HTMLElement)return null;let F=D;for(let ae=0;ae<5;ae++){if(!F)return null;if(F instanceof HTMLElement){if(F.dataset.sentryComponent)return F.dataset.sentryComponent;if(F.dataset.sentryElement)return F.dataset.sentryElement}F=F.parentNode}return null}(J)}catch{x="<unknown>"}if(x.length===0)return;const N={category:`ui.${y.name}`,message:x};b&&(N.data={"ui.component_name":b}),gd(N,{event:y.event,name:y.name,global:y.global})}}(o,i.dom),cd("dom",c),ud("dom",t8)),i.xhr&&function(d){cd("xhr",d),ud("xhr",i8)}(function(d){return function(p){if(ka()!==d)return;const{startTimestamp:y,endTimestamp:x}=p,b=p.xhr[Kg];if(!y||!x||!b)return;const{method:k,url:O,status_code:N,body:Z}=b,J={method:k,url:O,status_code:N},D={xhr:p.xhr,input:Z,startTimestamp:y,endTimestamp:x};gd({category:"xhr",data:J,type:"http",level:Dw(N)},D)}}(o)),i.fetch&&X9(function(d){return function(p){if(ka()!==d)return;const{startTimestamp:y,endTimestamp:x}=p;if(x&&(!p.fetchData.url.match(/sentry_key/)||p.fetchData.method!=="POST"))if(p.error)gd({category:"fetch",data:p.fetchData,level:"error",type:"http"},{data:p.error,input:p.args,startTimestamp:y,endTimestamp:x});else{const b=p.response,k={...p.fetchData,status_code:b&&b.status},O={input:p.args,response:b,startTimestamp:y,endTimestamp:x};gd({category:"fetch",data:k,type:"http",level:Dw(k.status_code)},O)}}}(o)),i.history&&Bw(function(d){return function(p){if(ka()!==d)return;let y=p.from,x=p.to;const b=V2(sa.location.href);let k=y?V2(y):void 0;const O=V2(x);k&&k.path||(k=b),b.protocol===O.protocol&&b.host===O.host&&(x=O.relative),b.protocol===k.protocol&&b.host===k.host&&(y=k.relative),gd({category:"navigation",data:{from:y,to:x}})}}(o)),i.sentry&&o.on("beforeSendEvent",function(d){return function(p){ka()===d&&gd({category:"sentry."+(p.type==="transaction"?"transaction":"event"),event_id:p.event_id,level:p.level,message:Nc(p)},{event:p})}}(o))}}},h8=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],f8=(r={})=>{const i={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...r};return{name:"BrowserApiErrors",setupOnce(){i.setTimeout&&_s(sa,"setTimeout",Vw),i.setInterval&&_s(sa,"setInterval",Vw),i.requestAnimationFrame&&_s(sa,"requestAnimationFrame",p8),i.XMLHttpRequest&&"XMLHttpRequest"in sa&&_s(XMLHttpRequest.prototype,"send",g8);const o=i.eventTarget;o&&(Array.isArray(o)?o:h8).forEach(m8)}}};function Vw(r){return function(...i){const o=i[0];return i[0]=hf(o,{mechanism:{data:{function:Rc(r)},handled:!1,type:"instrument"}}),r.apply(this,i)}}function p8(r){return function(i){return r.apply(this,[hf(i,{mechanism:{data:{function:"requestAnimationFrame",handler:Rc(r)},handled:!1,type:"instrument"}})])}}function g8(r){return function(...i){const o=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(c=>{c in o&&typeof o[c]=="function"&&_s(o,c,function(d){const p={mechanism:{data:{function:c,handler:Rc(d)},handled:!1,type:"instrument"}},y=A2(d);return y&&(p.mechanism.data.handler=Rc(y)),hf(d,p)})}),r.apply(this,i)}}function m8(r){const i=sa[r],o=i&&i.prototype;o&&o.hasOwnProperty&&o.hasOwnProperty("addEventListener")&&(_s(o,"addEventListener",function(c){return function(d,p,y){try{typeof p.handleEvent=="function"&&(p.handleEvent=hf(p.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Rc(p),target:r},handled:!1,type:"instrument"}}))}catch{}return c.apply(this,[d,hf(p,{mechanism:{data:{function:"addEventListener",handler:Rc(p),target:r},handled:!1,type:"instrument"}}),y])}}),_s(o,"removeEventListener",function(c){return function(d,p,y){try{const x=p.__sentry_wrapped__;x&&c.call(this,d,x,y)}catch{}return c.call(this,d,p,y)}}))}const y8=()=>({name:"BrowserSession",setupOnce(){sa.document!==void 0?(fw({ignoreDuration:!0}),mw(),Bw(({from:r,to:i})=>{r!==void 0&&r!==i&&(fw({ignoreDuration:!0}),mw())})):Ny&&on.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),v8=(r={})=>{const i={onerror:!0,onunhandledrejection:!0,...r};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(o){i.onerror&&(function(c){(function(d){const p="error";cd(p,d),ud(p,l9)})(d=>{const{stackParser:p,attachStacktrace:y}=Iw();if(ka()!==c||Lw())return;const{msg:x,url:b,line:k,column:O,error:N}=d,Z=function(J,D,F,ae){const ee=J.exception=J.exception||{},B=ee.values=ee.values||[],Y=B[0]=B[0]||{},$=Y.stacktrace=Y.stacktrace||{},Q=$.frames=$.frames||[],z=ae,V=F,le=Sl(D)&&D.length>0?D:function(){try{return M2.document.location.href}catch{return""}}();return Q.length===0&&Q.push({colno:z,filename:le,function:ld,in_app:!0,lineno:V}),J}(Z2(p,N||x,void 0,y,!1),b,k,O);Z.level="error",hw(Z,{originalException:N,mechanism:{handled:!1,type:"onerror"}})})}(o),$w("onerror")),i.onunhandledrejection&&(function(c){(function(d){const p="unhandledrejection";cd(p,d),ud(p,c9)})(d=>{const{stackParser:p,attachStacktrace:y}=Iw();if(ka()!==c||Lw())return;const x=function(k){if(k2(k))return k;try{if("reason"in k)return k.reason;if("detail"in k&&"reason"in k.detail)return k.detail.reason}catch{}return k}(d),b=k2(x)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(x)}`}]}}:Z2(p,x,void 0,y,!0);b.level="error",hw(b,{originalException:x,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(o),$w("onunhandledrejection"))}}};function $w(r){Ny&&on.log(`Global Handler attached: ${r}`)}function Iw(){const r=ka();return r&&r.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const b8=()=>({name:"HttpContext",preprocessEvent(r){if(!sa.navigator&&!sa.location&&!sa.document)return;const i=r.request&&r.request.url||sa.location&&sa.location.href,{referrer:o}=sa.document||{},{userAgent:c}=sa.navigator||{},d={...r.request&&r.request.headers,...o&&{Referer:o},...c&&{"User-Agent":c}},p={...r.request,...i&&{url:i},headers:d};r.request=p}}),x8=(r={})=>{const i=r.limit||5,o=r.key||"cause";return{name:"LinkedErrors",preprocessEvent(c,d,p){const y=p.getOptions();$9(Y2,y.stackParser,y.maxValueLength,o,i,c,d)}}};var qw="new",Gw="loading",Yw="loaded",ex="joining-meeting",md="joined-meeting",yd="left-meeting",Bc="error",S8="playable",tx="unknown",w8="full",C8="base",Xw="no-room",T8="end-of-life",k8="connection-error",M8="iframe-ready-for-launch-config",A8="iframe-launch-config",E8="theme-updated",_8="loading",O8="load-attempt-failed",Fw="loaded",D8="started-camera",j8="camera-error",L8="joining-meeting",R8="joined-meeting",N8="left-meeting",z8="participant-joined",B8="participant-updated",U8="participant-left",H8="participant-counts-updated",P8="access-state-updated",V8="meeting-session-summary-updated",$8="meeting-session-state-updated",I8="waiting-participant-added",q8="waiting-participant-updated",G8="waiting-participant-removed",Y8="track-started",X8="track-stopped",F8="transcription-started",Z8="transcription-stopped",Q8="transcription-error",Zw="recording-started",Qw="recording-stopped",J8="recording-stats",W8="recording-error",K8="recording-upload-completed",eM="recording-data",tM="app-message",nM="transcription-message",iM="remote-media-player-started",aM="remote-media-player-updated",sM="remote-media-player-stopped",rM="local-screen-share-started",oM="local-screen-share-stopped",lM="local-screen-share-canceled",cM="active-speaker-change",uM="active-speaker-mode-change",dM="network-quality-change",hM="network-connection",fM="cpu-load-change",pM="face-counts-updated",Uy="fullscreen",Hy="exited-fullscreen",gM="live-streaming-started",mM="live-streaming-updated",yM="live-streaming-stopped",vM="live-streaming-error",bM="lang-updated",xM="receive-settings-updated",Jw="input-settings-updated",Ww="nonfatal-error",Kw="error",nx=4096,e4=102400,ix="iframe-call-message",t4="local-screen-start",n4="daily-method-update-live-streaming-endpoints",Py="transmit-log",kl="daily-custom-track",Vy={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},i4={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},ax={PLAY:"play",PAUSE:"pause"},sx=["jpg","png","jpeg"],SM="add-endpoints",wM="remove-endpoints",a4="sip-call-transfer";function Ks(){return!Dn()&&typeof window<"u"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function Dn(){return typeof navigator<"u"&&navigator.product&&navigator.product==="ReactNative"}function s4(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function CM(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&(function(r,i){if(!r||!i)return!0;switch(r){case"Chrome":return i.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(i.major===13&&i.minor===0&&i.point===0);case"Firefox":return i.major>=67}return!0}(vd(),$y())||Dn())}function r4(){if(Dn()||!document)return!1;var r=document.createElement("iframe");return!!r.requestFullscreen||!!r.webkitRequestFullscreen}var TM=function(){try{var r=document.createElement("canvas"),i=(navigator.webdriver?r.getContext("webgl2"):r.getContext("webgl2",{failIfMajorPerformanceCaveat:!0}))!=null;return r.remove(),i}catch{return!1}}();function o4(){var r=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!Dn()&&!!TM&&(r?function(){return d4()?!1:["Chrome","Firefox"].includes(vd())}():function(){if(d4())return!1;var i=vd();if(i==="Safari"){var o=ox();if(o.major<15||o.major===15&&o.minor<4)return!1}return i==="Chrome"?rx().major>=77:i==="Firefox"?lx().major>=97:["Chrome","Firefox","Safari"].includes(i)}())}function l4(){if(Dn()||u4()||typeof AudioWorkletNode>"u")return!1;switch(vd()){case"Chrome":case"Firefox":return!0;case"Safari":var r=$y();return r.major>17||r.major===17&&r.minor>=4}return!1}function c4(){return s4()&&!function(){var r,i=vd();if(!Ks())return!0;switch(i){case"Chrome":return(r=rx()).major&&r.major>0&&r.major<75;case"Firefox":return(r=lx()).major<91;case"Safari":return(r=ox()).major<13||r.major===13&&r.minor<1;default:return!0}}()}function u4(){return Ks().match(/Linux; Android/)}function d4(){var r,i=Ks(),o=i.match(/Mac/)&&(!Dn()&&typeof window<"u"&&(r=window)!==null&&r!==void 0&&(r=r.navigator)!==null&&r!==void 0&&r.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(i.match(/Mobi/)||i.match(/Android/)||o)||!!Ks().match(/DailyAnd\//)||void 0}function vd(){if(typeof window<"u"){var r=Ks();return h4()?"Safari":r.indexOf("Edge")>-1?"Edge":r.match(/Chrome\//)?"Chrome":r.indexOf("Safari")>-1||f4()?"Safari":r.indexOf("Firefox")>-1?"Firefox":r.indexOf("MSIE")>-1||r.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function $y(){switch(vd()){case"Chrome":return rx();case"Safari":return ox();case"Firefox":return lx();case"Edge":return function(){var r=0,i=0;if(typeof window<"u"){var o=Ks().match(/Edge\/(\d+).(\d+)/);if(o)try{r=parseInt(o[1]),i=parseInt(o[2])}catch{}}return{major:r,minor:i}}()}}function rx(){var r=0,i=0,o=0,c=0,d=!1;if(typeof window<"u"){var p=Ks(),y=p.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(y)try{r=parseInt(y[1]),i=parseInt(y[2]),o=parseInt(y[3]),c=parseInt(y[4]),d=p.indexOf("OPR/")>-1}catch{}}return{major:r,minor:i,build:o,patch:c,opera:d}}function h4(){return!!Ks().match(/iPad|iPhone|iPod/i)&&s4()}function f4(){return Ks().indexOf("AppleWebKit/605.1.15")>-1}function ox(){var r=0,i=0,o=0;if(typeof window<"u"){var c=Ks().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(c)try{r=parseInt(c[1]),i=parseInt(c[2]),o=parseInt(c[4])}catch{}else(h4()||f4())&&(r=14,i=0,o=3)}return{major:r,minor:i,point:o}}function lx(){var r=0,i=0;if(typeof window<"u"){var o=Ks().match(/Firefox\/(\d+).(\d+)/);if(o)try{r=parseInt(o[1]),i=parseInt(o[2])}catch{}}return{major:r,minor:i}}var p4=function(){return Es(function r(){As(this,r)},[{key:"addListenerForMessagesFromCallMachine",value:function(r,i,o){Fg()}},{key:"addListenerForMessagesFromDailyJs",value:function(r,i,o){Fg()}},{key:"sendMessageToCallMachine",value:function(r,i,o,c){Fg()}},{key:"sendMessageToDailyJs",value:function(r,i){Fg()}},{key:"removeListener",value:function(r){Fg()}}])}();function g4(r,i){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);i&&(c=c.filter(function(d){return Object.getOwnPropertyDescriptor(r,d).enumerable})),o.push.apply(o,c)}return o}function cx(r){for(var i=1;i<arguments.length;i++){var o=arguments[i]!=null?arguments[i]:{};i%2?g4(Object(o),!0).forEach(function(c){Eo(r,c,o[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):g4(Object(o)).forEach(function(c){Object.defineProperty(r,c,Object.getOwnPropertyDescriptor(o,c))})}return r}function m4(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m4=function(){return!!r})()}var kM=function(){function r(){var i,o,c,d;return As(this,r),o=this,c=$r(c=r),(i=fy(o,m4()?Reflect.construct(c,[],$r(o).constructor):c.apply(o,d)))._wrappedListeners={},i._messageCallbacks={},i}return py(r,p4),Es(r,[{key:"addListenerForMessagesFromCallMachine",value:function(i,o,c){var d=this,p=function(y){if(y.data&&y.data.what==="iframe-call-message"&&(!y.data.callClientId||y.data.callClientId===o)&&(!y.data.from||y.data.from!=="module")){var x=cx({},y.data);if(delete x.from,x.callbackStamp&&d._messageCallbacks[x.callbackStamp]){var b=x.callbackStamp;d._messageCallbacks[b].call(c,x),delete d._messageCallbacks[b]}delete x.what,delete x.callbackStamp,i.call(c,x)}};this._wrappedListeners[i]=p,window.addEventListener("message",p)}},{key:"addListenerForMessagesFromDailyJs",value:function(i,o,c){var d=function(p){var y;if(!(!p.data||p.data.what!==ix||!p.data.action||p.data.from&&p.data.from!=="module"||p.data.callClientId&&o&&p.data.callClientId!==o||p!=null&&(y=p.data)!==null&&y!==void 0&&y.callFrameId)){var x=p.data;i.call(c,x)}};this._wrappedListeners[i]=d,window.addEventListener("message",d)}},{key:"sendMessageToCallMachine",value:function(i,o,c,d){if(!c)throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var p=cx({},i);if(p.what=ix,p.from="module",p.callClientId=c,o){var y=yy();this._messageCallbacks[y]=o,p.callbackStamp=y}var x=d?d.contentWindow:window,b=this._callMachineTargetOrigin(d);b&&x.postMessage(p,b)}},{key:"sendMessageToDailyJs",value:function(i,o){i.what=ix,i.callClientId=o,i.from="embedded",window.postMessage(i,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(i){var o=this._wrappedListeners[i];o&&(window.removeEventListener("message",o),delete this._wrappedListeners[i])}},{key:"forwardPackagedMessageToCallMachine",value:function(i,o,c){var d=cx({},i);d.callClientId=c;var p=o?o.contentWindow:window,y=this._callMachineTargetOrigin(o);y&&p.postMessage(d,y)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(i,o){var c=function(d){if(d.data&&d.data.what==="iframe-call-message"&&(!d.data.callClientId||d.data.callClientId===o)&&(!d.data.from||d.data.from!=="module")){var p=d.data;i(p)}};return this._wrappedListeners[i]=c,window.addEventListener("message",c),i}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(i){var o=this._wrappedListeners[i];o&&(window.removeEventListener("message",o),delete this._wrappedListeners[i])}},{key:"_callMachineTargetOrigin",value:function(i){return i?i.src?new URL(i.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return window.location.protocol==="file:"?"*":window.location.origin}}])}();function y4(r,i){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);i&&(c=c.filter(function(d){return Object.getOwnPropertyDescriptor(r,d).enumerable})),o.push.apply(o,c)}return o}function v4(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(v4=function(){return!!r})()}var MM=function(){function r(){var i,o,c,d;return As(this,r),o=this,c=$r(c=r),i=fy(o,v4()?Reflect.construct(c,[],$r(o).constructor):c.apply(o,d)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new v2.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new v2.EventEmitter,i._wrappedListeners={},i._messageCallbacks={},i}return py(r,p4),Es(r,[{key:"addListenerForMessagesFromCallMachine",value:function(i,o,c){this._addListener(i,global.callMachineToDailyJsEmitter,o,c,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(i,o,c){this._addListener(i,global.dailyJsToCallMachineEmitter,o,c,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(i,o,c){this._sendMessage(i,global.dailyJsToCallMachineEmitter,c,o,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(i,o){this._sendMessage(i,global.callMachineToDailyJsEmitter,o,null,"sending message to daily-js")}},{key:"removeListener",value:function(i){var o=this._wrappedListeners[i];o&&(global.callMachineToDailyJsEmitter.removeListener("message",o),global.dailyJsToCallMachineEmitter.removeListener("message",o),delete this._wrappedListeners[i])}},{key:"_addListener",value:function(i,o,c,d,p){var y=this,x=function(b){if(b.callClientId===c){if(b.callbackStamp&&y._messageCallbacks[b.callbackStamp]){var k=b.callbackStamp;y._messageCallbacks[k].call(d,b),delete y._messageCallbacks[k]}i.call(d,b)}};this._wrappedListeners[i]=x,o.addListener("message",x)}},{key:"_sendMessage",value:function(i,o,c,d,p){var y=function(b){for(var k=1;k<arguments.length;k++){var O=arguments[k]!=null?arguments[k]:{};k%2?y4(Object(O),!0).forEach(function(N){Eo(b,N,O[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(O)):y4(Object(O)).forEach(function(N){Object.defineProperty(b,N,Object.getOwnPropertyDescriptor(O,N))})}return b}({},i);if(y.callClientId=c,d){var x=yy();this._messageCallbacks[x]=d,y.callbackStamp=x}o.emit("message",y)}}])}(),ux="replace",dx="shallow-merge",b4=[ux,dx],AM=function(){function r(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.data,c=i.mergeStrategy,d=c===void 0?ux:c;As(this,r),r._validateMergeStrategy(d),r._validateData(o,d),this.mergeStrategy=d,this.data=o}return Es(r,[{key:"isNoOp",value:function(){return r.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(i,o){return Object.keys(i).length===0&&o===dx}},{key:"_validateMergeStrategy",value:function(i){if(!b4.includes(i))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(b4,"]"))}},{key:"_validateData",value:function(i,o){if(!function(x){if(x==null||Un(x)!=="object")return!1;var b=Object.getPrototypeOf(x);return b==null||b===Object.prototype}(i))throw Error("Meeting session data must be a plain (map-like) object");var c;try{if(c=JSON.stringify(i),o===ux){var d=JSON.parse(c);Ia(d,i)||console.warn("The meeting session data provided will be modified when serialized.",d,i)}else if(o===dx){for(var p in i)if(Object.hasOwnProperty.call(i,p)&&i[p]!==void 0){var y=JSON.parse(JSON.stringify(i[p]));Ia(i[p],y)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",y,i[p])}}}catch(x){throw Error("Meeting session data must be serializable to JSON: ".concat(x))}if(c.length>e4)throw Error("Meeting session data is too large (".concat(c.length," characters). Maximum size suppported is ").concat(e4,"."))}}])}();function x4(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x4=function(){return!!r})()}function hx(r){var i=typeof Map=="function"?new Map:void 0;return hx=function(o){if(o===null||!function(d){try{return Function.toString.call(d).indexOf("[native code]")!==-1}catch{return typeof d=="function"}}(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(i!==void 0){if(i.has(o))return i.get(o);i.set(o,c)}function c(){return function(d,p,y){if(x4())return Reflect.construct.apply(null,arguments);var x=[null];x.push.apply(x,p);var b=new(d.bind.apply(d,x));return y&&Xg(b,y.prototype),b}(o,arguments,$r(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Xg(c,o)},hx(r)}function S4(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(S4=function(){return!!r})()}function w4(r){var i,o=(i=window._daily)===null||i===void 0?void 0:i.pendings;if(o){var c=o.indexOf(r);c!==-1&&o.splice(c,1)}}var EM=function(){return Es(function r(i){As(this,r),this._currentLoad=null,this._callClientId=i},[{key:"load",value:function(){var r,i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0,d=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void c(!0);r=this._callClientId,window._daily.pendings.push(r),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new _M(o,function(){c(!1)},function(p,y){y||w4(i._callClientId),d(p,y)}),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),w4(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),_M=function(){return Es(function r(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,c=arguments.length>2?arguments[2]:void 0;As(this,r),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=i,this._successCallback=o,this._failureCallback=c},[{key:"start",value:function(){var r=this;if(!this._currentAttempt){var i=function(o){r._currentAttempt.cancelled||(r._attemptsRemaining--,r._failureCallback(o,r._attemptsRemaining>0),r._attemptsRemaining<=0||setTimeout(function(){r._currentAttempt.cancelled||(r._currentAttempt=new C4(r._dailyConfig,r._successCallback,i),r._currentAttempt.start())},3e3))};this._currentAttempt=new C4(this._dailyConfig,this._successCallback,i),this._currentAttempt.start()}}},{key:"cancel",value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:"cancelled",get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:"succeeded",get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}])}(),fx=function(){function r(){return As(this,r),i=this,c=arguments,o=$r(o=r),fy(i,S4()?Reflect.construct(o,c||[],$r(i).constructor):o.apply(i,c));var i,o,c}return py(r,hx(Error)),Es(r)}(),Iy=2e4,C4=function(){return Es(function i(o,c,d){As(this,i),this._loadAttemptImpl=Dn()||!o.avoidEval?new OM(o,c,d):new DM(o,c,d)},[{key:"start",value:(r=tn(function*(){return this._loadAttemptImpl.start()}),function(){return r.apply(this,arguments)})},{key:"cancel",value:function(){this._loadAttemptImpl.cancel()}},{key:"cancelled",get:function(){return this._loadAttemptImpl.cancelled}},{key:"succeeded",get:function(){return this._loadAttemptImpl.succeeded}}]);var r}(),OM=function(){return Es(function d(p,y,x){As(this,d),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache=typeof iOSCallObjectBundleCache<"u"&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=p,this._successCallback=y,this._failureCallback=x},[{key:"start",value:(c=tn(function*(){var d=vy(this._dailyConfig);!(yield this._tryLoadFromIOSCache(d))&&this._loadFromNetwork(d)}),function(){return c.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(o=tn(function*(d){if(!this._iosCache)return!1;try{var p=yield this._iosCache.get(d);return!!this.cancelled||!!p&&(p.code?(Function('"use strict";'+p.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=p.refetchHeaders,!1))}catch{return!1}}),function(d){return o.apply(this,arguments)})},{key:"_loadFromNetwork",value:(i=tn(function*(d){var p=this;this._networkTimeout=setTimeout(function(){p._networkTimedOut=!0,p._failureCallback({msg:"Timed out (>".concat(Iy," ms) when loading call object bundle ").concat(d),type:"timeout"})},Iy);try{var y=this._refetchHeaders?{headers:this._refetchHeaders}:{},x=yield fetch(d,y);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new fx;var b=yield this._getBundleCodeFromResponse(d,x);if(this.cancelled)throw new fx;Function('"use strict";'+b)(),this._iosCache&&this._iosCache.set(d,b,x.headers),this.succeeded=!0,this._successCallback()}catch(k){if(clearTimeout(this._networkTimeout),k instanceof fx||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(d,": ").concat(k),type:k.message})}}),function(d){return i.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(r=tn(function*(d,p){if(p.ok)return yield p.text();if(this._iosCache&&p.status===304)return(yield this._iosCache.renew(d,p.headers)).code;throw new Error("Received ".concat(p.status," response"))}),function(d,p){return r.apply(this,arguments)})}]);var r,i,o,c}(),DM=function(){return Es(function r(i,o,c){As(this,r),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=i,this._successCallback=o,this._failureCallback=c,this._attemptId=yy(),this._networkTimeout=null,this._scriptElement=null},[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var r=vy(this._dailyConfig);(typeof document>"u"?"undefined":Un(document))==="object"?this._startLoading(r):this._failureCallback({msg:"Call object bundle must be loaded in a DOM/web context",type:"missing context"})}},{key:"cancel",value:function(){this._stopLoading(),this.cancelled=!0}},{key:"_startLoading",value:function(r){var i=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout(function(){i._stopLoading(),i._failureCallback({msg:"Timed out (>".concat(Iy," ms) when loading call object bundle ").concat(r),type:"timeout"})},Iy);var o=document.getElementsByTagName("head")[0],c=document.createElement("script");this._scriptElement=c,c.onload=function(){i._stopLoading(),i.succeeded=!0,i._successCallback()},c.onerror=function(d){i._stopLoading(),i._failureCallback({msg:"Failed to load call object bundle ".concat(d.target.src),type:d.message})},c.src=r,o.appendChild(c)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}])}(),qy=function(r,i,o){return LM(r.local,i,o)===!0},jM=function(r,i,o){return r.local.streams&&r.local.streams[i]&&r.local.streams[i].stream&&r.local.streams[i].stream["get".concat(o==="video"?"Video":"Audio","Tracks")]()[0]},ff=function(r,i,o,c){var d=RM(r,i,o,c);return d&&d.pendingTrack},LM=function(r,i,o){if(!r)return!1;var c=function(p){switch(p){case"avatar":return!0;case"staged":return p;default:return!!p}},d=r.public.subscribedTracks;return d&&d[i]?["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(o)===-1&&d[i].custom?[!0,"staged"].includes(d[i].custom)?c(d[i].custom):c(d[i].custom[o]):c(d[i][o]):!d||c(d.ALL)},RM=function(r,i,o,c){var d=Object.values(r.streams||{}).filter(function(p){return p.participantId===i&&p.type===o&&p.pendingTrack&&p.pendingTrack.kind===c}).sort(function(p,y){return new Date(y.starttime)-new Date(p.starttime)});return d&&d[0]},NM=function(r,i){var o=r.local.public.customTracks;if(o&&o[i])return o[i].track};function T4(r,i){for(var o=i.getState(),c=0,d=["cam","screen"];c<d.length;c++)for(var p=d[c],y=0,x=["video","audio"];y<x.length;y++){var b=x[y],k=p==="cam"?b:"screen".concat(b.charAt(0).toUpperCase()+b.slice(1)),O=r.tracks[k];if(O){var N=r.local?jM(o,p,b):ff(o,r.session_id,p,b);O.state==="playable"&&(O.track=N),O.persistentTrack=N}}}function k4(r,i){try{var o=i.getState();for(var c in r.tracks)if(!zM(c)){var d=r.tracks[c].kind;if(d){var p=r.tracks[c];if(p){var y=r.local?NM(o,c):ff(o,r.session_id,c,d);p.state==="playable"&&(r.tracks[c].track=y),p.persistentTrack=y}}else console.error("unknown type for custom track")}}catch(x){console.error(x)}}function zM(r){return["video","audio","screenVideo","screenAudio"].includes(r)}function M4(r,i,o){var c=o.getState();if(r.local){if(r.audio)try{r.audioTrack=c.local.streams.cam.stream.getAudioTracks()[0],r.audioTrack||(r.audio=!1)}catch{}if(r.video)try{r.videoTrack=c.local.streams.cam.stream.getVideoTracks()[0],r.videoTrack||(r.video=!1)}catch{}if(r.screen)try{r.screenVideoTrack=c.local.streams.screen.stream.getVideoTracks()[0],r.screenAudioTrack=c.local.streams.screen.stream.getAudioTracks()[0],r.screenVideoTrack||r.screenAudioTrack||(r.screen=!1)}catch{}}else{var d=!0;try{var p=c.participants[r.session_id];p&&p.public&&p.public.rtcType&&p.public.rtcType.impl==="peer-to-peer"&&p.private&&!["connected","completed"].includes(p.private.peeringState)&&(d=!1)}catch(O){console.error(O)}if(!d)return r.audio=!1,r.audioTrack=!1,r.video=!1,r.videoTrack=!1,r.screen=!1,void(r.screenTrack=!1);try{if(c.streams,r.audio&&qy(c,r.session_id,"cam-audio")){var y=ff(c,r.session_id,"cam","audio");y&&(i&&i.audioTrack&&i.audioTrack.id===y.id?r.audioTrack=y:y.muted||(r.audioTrack=y)),r.audioTrack||(r.audio=!1)}if(r.video&&qy(c,r.session_id,"cam-video")){var x=ff(c,r.session_id,"cam","video");x&&(i&&i.videoTrack&&i.videoTrack.id===x.id?r.videoTrack=x:x.muted||(r.videoTrack=x)),r.videoTrack||(r.video=!1)}if(r.screen&&qy(c,r.session_id,"screen-audio")){var b=ff(c,r.session_id,"screen","audio");b&&(i&&i.screenAudioTrack&&i.screenAudioTrack.id===b.id?r.screenAudioTrack=b:b.muted||(r.screenAudioTrack=b))}if(r.screen&&qy(c,r.session_id,"screen-video")){var k=ff(c,r.session_id,"screen","video");k&&(i&&i.screenVideoTrack&&i.screenVideoTrack.id===k.id?r.screenVideoTrack=k:k.muted||(r.screenVideoTrack=k))}r.screenVideoTrack||r.screenAudioTrack||(r.screen=!1)}catch(O){console.error("unexpected error matching up tracks",O)}}}function BM(r,i){var o=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!o){if(Array.isArray(r)||(o=function(b,k){if(b){if(typeof b=="string")return A4(b,k);var O={}.toString.call(b).slice(8,-1);return O==="Object"&&b.constructor&&(O=b.constructor.name),O==="Map"||O==="Set"?Array.from(b):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?A4(b,k):void 0}}(r))||i){o&&(r=o);var c=0,d=function(){};return{s:d,n:function(){return c>=r.length?{done:!0}:{done:!1,value:r[c++]}},e:function(b){throw b},f:d}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
121
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p,y=!0,x=!1;return{s:function(){o=o.call(r)},n:function(){var b=o.next();return y=b.done,b},e:function(b){x=!0,p=b},f:function(){try{y||o.return==null||o.return()}finally{if(x)throw p}}}}function A4(r,i){(i==null||i>r.length)&&(i=r.length);for(var o=0,c=Array(i);o<i;o++)c[o]=r[o];return c}var _o=new Map,pf=null;function UM(r,i){var o=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!o){if(Array.isArray(r)||(o=function(b,k){if(b){if(typeof b=="string")return E4(b,k);var O={}.toString.call(b).slice(8,-1);return O==="Object"&&b.constructor&&(O=b.constructor.name),O==="Map"||O==="Set"?Array.from(b):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?E4(b,k):void 0}}(r))||i){o&&(r=o);var c=0,d=function(){};return{s:d,n:function(){return c>=r.length?{done:!0}:{done:!1,value:r[c++]}},e:function(b){throw b},f:d}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
122
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p,y=!0,x=!1;return{s:function(){o=o.call(r)},n:function(){var b=o.next();return y=b.done,b},e:function(b){x=!0,p=b},f:function(){try{y||o.return==null||o.return()}finally{if(x)throw p}}}}function E4(r,i){(i==null||i>r.length)&&(i=r.length);for(var o=0,c=Array(i);o<i;o++)c[o]=r[o];return c}var Oo=new Map,em=null;function HM(r){_4()?function(i){_o.has(i)||(_o.set(i,{}),navigator.mediaDevices.enumerateDevices().then(function(o){_o.has(i)&&(_o.get(i).lastDevicesString=JSON.stringify(o),pf||(pf=function(){var c=tn(function*(){var d,p=yield navigator.mediaDevices.enumerateDevices(),y=BM(_o.keys());try{for(y.s();!(d=y.n()).done;){var x=d.value,b=JSON.stringify(p);b!==_o.get(x).lastDevicesString&&(_o.get(x).lastDevicesString=b,x(p))}}catch(k){y.e(k)}finally{y.f()}});return function(){return c.apply(this,arguments)}}(),navigator.mediaDevices.addEventListener("devicechange",pf)))}).catch(function(){}))}(r):function(i){Oo.has(i)||(Oo.set(i,{}),navigator.mediaDevices.enumerateDevices().then(function(o){Oo.has(i)&&(Oo.get(i).lastDevicesString=JSON.stringify(o),em||(em=setInterval(tn(function*(){var c,d=yield navigator.mediaDevices.enumerateDevices(),p=UM(Oo.keys());try{for(p.s();!(c=p.n()).done;){var y=c.value,x=JSON.stringify(d);x!==Oo.get(y).lastDevicesString&&(Oo.get(y).lastDevicesString=x,y(d))}}catch(b){p.e(b)}finally{p.f()}}),3e3)))}))}(r)}function PM(r){_4()?function(i){_o.has(i)&&(_o.delete(i),_o.size===0&&pf&&(navigator.mediaDevices.removeEventListener("devicechange",pf),pf=null))}(r):function(i){Oo.has(i)&&(Oo.delete(i),Oo.size===0&&em&&(clearInterval(em),em=null))}(r)}function _4(){var r;return Dn()||((r=navigator.mediaDevices)===null||r===void 0?void 0:r.ondevicechange)!==void 0}var VM=new Set;function $M(r,i){return r&&r.readyState==="live"&&!function(o,c){return o.muted&&!VM.has(o.id)}(r)}function O4(r,i){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);i&&(c=c.filter(function(d){return Object.getOwnPropertyDescriptor(r,d).enumerable})),o.push.apply(o,c)}return o}function Uc(r){for(var i=1;i<arguments.length;i++){var o=arguments[i]!=null?arguments[i]:{};i%2?O4(Object(o),!0).forEach(function(c){Eo(r,c,o[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):O4(Object(o)).forEach(function(c){Object.defineProperty(r,c,Object.getOwnPropertyDescriptor(o,c))})}return r}var tm=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),IM=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),nm=Object.values(tm),D4=["v","a","sv","sa","cv","ca"];Object.freeze(nm.reduce(function(r,i,o){return r[i]=D4[o],r},{})),Object.freeze(D4.reduce(function(r,i,o){return r[i]=nm[o],r},{}));var qM=[tm.VIDEO,tm.AUDIO,tm.SCREEN_VIDEO,tm.SCREEN_AUDIO],j4=Object.values(IM),L4=["p","s","t"];Object.freeze(j4.reduce(function(r,i,o){return r[i]=L4[o],r},{})),Object.freeze(L4.reduce(function(r,i,o){return r[i]=j4[o],r},{}));var GM=function(){function r(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.base,c=i.byUserId,d=i.byParticipantId;As(this,r),this.base=o,this.byUserId=c,this.byParticipantId=d}return Es(r,[{key:"clone",value:function(){var i=new r;if(this.base instanceof pa?i.base=this.base.clone():i.base=this.base,this.byUserId!==void 0)for(var o in i.byUserId={},this.byUserId){var c=this.byUserId[o];i.byUserId[o]=c instanceof pa?c.clone():c}if(this.byParticipantId!==void 0)for(var d in i.byParticipantId={},this.byParticipantId){var p=this.byParticipantId[d];i.byParticipantId[d]=p instanceof pa?p.clone():p}return i}},{key:"toJSONObject",value:function(){var i={};if(typeof this.base=="boolean"?i.base=this.base:this.base instanceof pa&&(i.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var o in i.byUserId={},this.byUserId){var c=this.byUserId[o];i.byUserId[o]=c instanceof pa?c.toJSONObject():c}if(this.byParticipantId!==void 0)for(var d in i.byParticipantId={},this.byParticipantId){var p=this.byParticipantId[d];i.byParticipantId[d]=p instanceof pa?p.toJSONObject():p}return i}},{key:"toMinifiedJSONObject",value:function(){var i={};if(this.base!==void 0&&(typeof this.base=="boolean"?i.b=this.base:i.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var o in i.u={},this.byUserId){var c=this.byUserId[o];i.u[o]=typeof c=="boolean"?c:c.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var d in i.p={},this.byParticipantId){var p=this.byParticipantId[d];i.p[d]=typeof p=="boolean"?p:p.toMinifiedJSONObject()}return i}},{key:"normalize",value:function(){return this.base instanceof pa&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map(function(i){var o=$a(i,2),c=o[0],d=o[1];return[c,d instanceof pa?d.normalize():d]}))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map(function(i){var o=$a(i,2),c=o[0],d=o[1];return[c,d instanceof pa?d.normalize():d]}))),this}}],[{key:"fromJSONObject",value:function(i){var o,c,d;if(i.base!==void 0&&(o=typeof i.base=="boolean"?i.base:pa.fromJSONObject(i.base)),i.byUserId!==void 0)for(var p in c={},i.byUserId){var y=i.byUserId[p];c[p]=typeof y=="boolean"?y:pa.fromJSONObject(y)}if(i.byParticipantId!==void 0)for(var x in d={},i.byParticipantId){var b=i.byParticipantId[x];d[x]=typeof b=="boolean"?b:pa.fromJSONObject(b)}return new r({base:o,byUserId:c,byParticipantId:d})}},{key:"fromMinifiedJSONObject",value:function(i){var o,c,d;if(i.b!==void 0&&(o=typeof i.b=="boolean"?i.b:pa.fromMinifiedJSONObject(i.b)),i.u!==void 0)for(var p in c={},i.u){var y=i.u[p];c[p]=typeof y=="boolean"?y:pa.fromMinifiedJSONObject(y)}if(i.p!==void 0)for(var x in d={},i.p){var b=i.p[x];d[x]=typeof b=="boolean"?b:pa.fromMinifiedJSONObject(b)}return new r({base:o,byUserId:c,byParticipantId:d})}},{key:"validateJSONObject",value:function(i){if(Un(i)!=="object")return[!1,"canReceive must be an object"];for(var o=["base","byUserId","byParticipantId"],c=0,d=Object.keys(i);c<d.length;c++){var p=d[c];if(!o.includes(p))return[!1,"canReceive can only contain keys (".concat(o.join(", "),")")];if(p==="base"){var y=$a(pa.validateJSONObject(i.base,!0),2),x=y[0],b=y[1];if(!x)return[!1,b]}else{if(Un(i[p])!=="object")return[!1,"invalid (non-object) value for field '".concat(p,"' in canReceive")];for(var k=0,O=Object.values(i[p]);k<O.length;k++){var N=O[k],Z=$a(pa.validateJSONObject(N),2),J=Z[0],D=Z[1];if(!J)return[!1,D]}}}return[!0]}}])}(),pa=function(){function r(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.video,c=i.audio,d=i.screenVideo,p=i.screenAudio,y=i.customVideo,x=i.customAudio;As(this,r),this.video=o,this.audio=c,this.screenVideo=d,this.screenAudio=p,this.customVideo=y,this.customAudio=x}return Es(r,[{key:"clone",value:function(){var i=new r;return this.video!==void 0&&(i.video=this.video),this.audio!==void 0&&(i.audio=this.audio),this.screenVideo!==void 0&&(i.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(i.screenAudio=this.screenAudio),this.customVideo!==void 0&&(i.customVideo=Uc({},this.customVideo)),this.customAudio!==void 0&&(i.customAudio=Uc({},this.customAudio)),i}},{key:"toJSONObject",value:function(){var i={};return this.video!==void 0&&(i.video=this.video),this.audio!==void 0&&(i.audio=this.audio),this.screenVideo!==void 0&&(i.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(i.screenAudio=this.screenAudio),this.customVideo!==void 0&&(i.customVideo=Uc({},this.customVideo)),this.customAudio!==void 0&&(i.customAudio=Uc({},this.customAudio)),i}},{key:"toMinifiedJSONObject",value:function(){var i={};return this.video!==void 0&&(i.v=this.video),this.audio!==void 0&&(i.a=this.audio),this.screenVideo!==void 0&&(i.sv=this.screenVideo),this.screenAudio!==void 0&&(i.sa=this.screenAudio),this.customVideo!==void 0&&(i.cv=Uc({},this.customVideo)),this.customAudio!==void 0&&(i.ca=Uc({},this.customAudio)),i}},{key:"normalize",value:function(){function i(o,c){return o&&Object.keys(o).length===1&&o["*"]===c}return!(this.video!==!0||this.audio!==!0||this.screenVideo!==!0||this.screenAudio!==!0||!i(this.customVideo,!0)||!i(this.customAudio,!0))||(this.video!==!1||this.audio!==!1||this.screenVideo!==!1||this.screenAudio!==!1||!i(this.customVideo,!1)||!i(this.customAudio,!1))&&this}}],[{key:"fromBoolean",value:function(i){return new r({video:i,audio:i,screenVideo:i,screenAudio:i,customVideo:{"*":i},customAudio:{"*":i}})}},{key:"fromJSONObject",value:function(i){return new r({video:i.video,audio:i.audio,screenVideo:i.screenVideo,screenAudio:i.screenAudio,customVideo:i.customVideo!==void 0?Uc({},i.customVideo):void 0,customAudio:i.customAudio!==void 0?Uc({},i.customAudio):void 0})}},{key:"fromMinifiedJSONObject",value:function(i){return new r({video:i.v,audio:i.a,screenVideo:i.sv,screenAudio:i.sa,customVideo:i.cv,customAudio:i.ca})}},{key:"validateJSONObject",value:function(i,o){if(typeof i=="boolean")return[!0];if(Un(i)!=="object")return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var c=Object.keys(i),d=0,p=c;d<p.length;d++){var y=p[d];if(!nm.includes(y))return[!1,"invalid media type '".concat(y,"' in canReceive")];if(qM.includes(y)){if(typeof i[y]!="boolean")return[!1,"invalid (non-boolean) value for media type '".concat(y,"' in canReceive")]}else{if(Un(i[y])!=="object")return[!1,"invalid (non-object) value for media type '".concat(y,"' in canReceive")];for(var x=0,b=Object.values(i[y]);x<b.length;x++)if(typeof b[x]!="boolean")return[!1,"invalid (non-boolean) value for entry within '".concat(y,"' in canReceive")];if(o&&i[y]["*"]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '`.concat(y,"'")]}}return o&&c.length!==nm.length?[!1,'canReceive "base" permission must specify all media types: '.concat(nm.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])}(),YM=["result"],XM=["preserveIframe"];function R4(r,i){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);i&&(c=c.filter(function(d){return Object.getOwnPropertyDescriptor(r,d).enumerable})),o.push.apply(o,c)}return o}function $t(r){for(var i=1;i<arguments.length;i++){var o=arguments[i]!=null?arguments[i]:{};i%2?R4(Object(o),!0).forEach(function(c){Eo(r,c,o[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):R4(Object(o)).forEach(function(c){Object.defineProperty(r,c,Object.getOwnPropertyDescriptor(o,c))})}return r}function N4(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N4=function(){return!!r})()}function z4(r,i){var o=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!o){if(Array.isArray(r)||(o=function(b,k){if(b){if(typeof b=="string")return B4(b,k);var O={}.toString.call(b).slice(8,-1);return O==="Object"&&b.constructor&&(O=b.constructor.name),O==="Map"||O==="Set"?Array.from(b):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?B4(b,k):void 0}}(r))||i){o&&(r=o);var c=0,d=function(){};return{s:d,n:function(){return c>=r.length?{done:!0}:{done:!1,value:r[c++]}},e:function(b){throw b},f:d}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
123
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p,y=!0,x=!1;return{s:function(){o=o.call(r)},n:function(){var b=o.next();return y=b.done,b},e:function(b){x=!0,p=b},f:function(){try{y||o.return==null||o.return()}finally{if(x)throw p}}}}function B4(r,i){(i==null||i>r.length)&&(i=r.length);for(var o=0,c=Array(i);o<i;o++)c[o]=r[o];return c}var bd={},U4="video",FM="voice",H4=Dn()?{data:{}}:{data:{},topology:"none"},P4={present:0,hidden:0},V4={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},px=Object.keys(V4),$4=["state","volume","simulcastEncodings"],I4={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},Gy={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},gx={id:{allow:"string",controlledBy:"'*' | 'owners' | string[]",csp:"string",iconURL:"string",label:"string",loading:"'eager' | 'lazy'",location:"'main' | 'sidebar'",name:"string",referrerPolicy:"string",sandbox:"string",src:"string",srcdoc:"string",shared:"string[] | 'owners' | boolean"}},xd={customIntegrations:{validate:W4,help:Q4()},customTrayButtons:{validate:J4,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(Gy))},url:{validate:function(r){return typeof r=="string"},help:"url should be a string"},baseUrl:{validate:function(r){return typeof r=="string"},help:"baseUrl should be a string"},token:{validate:function(r){return typeof r=="string"},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(r,i){try{return i.validateDailyConfig(r),!0}catch(o){console.error("Failed to validate dailyConfig",o)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(r){return K4(r,I4)},help:"reactNativeConfig should look like ".concat(JSON.stringify(I4),", all fields optional")},lang:{validate:function(r){return["da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(r)},help:"language not supported. Options are: da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(r){try{return q4(r),!0}catch(i){return console.error(i),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(r,i){if(typeof r=="boolean")return i._preloadCache.allowLocalVideo=r,!0;var o;if(r instanceof MediaStreamTrack)i._sharedTracks.videoTrack=r,o={customTrack:kl};else{if(delete i._sharedTracks.videoTrack,typeof r!="string")return console.error("videoSource must be a MediaStreamTrack, boolean, or a string"),!1;o={deviceId:r}}return i._updatePreloadCacheInputSettings({video:{settings:o}},!1),!0}},audioSource:{validate:function(r,i){if(typeof r=="boolean")return i._preloadCache.allowLocalAudio=r,!0;var o;if(r instanceof MediaStreamTrack)i._sharedTracks.audioTrack=r,o={customTrack:kl};else{if(delete i._sharedTracks.audioTrack,typeof r!="string")return console.error("audioSource must be a MediaStreamTrack, boolean, or a string"),!1;o={deviceId:r}}return i._updatePreloadCacheInputSettings({audio:{settings:o}},!1),!0}},subscribeToTracksAutomatically:{validate:function(r,i){return i._preloadCache.subscribeToTracksAutomatically=r,!0}},theme:{validate:function(r){var i=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],o=function(c){for(var d=0,p=Object.keys(c);d<p.length;d++){var y=p[d];if(!i.includes(y))return console.error('unsupported color "'.concat(y,'". Valid colors: ').concat(i.join(", "))),!1;if(!c[y].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(y,' theme color should be provided in valid hex color format. Received: "').concat(c[y],'"')),!1}return!0};return Un(r)==="object"&&("light"in r&&"dark"in r||"colors"in r)?"light"in r&&"dark"in r?"colors"in r.light?"colors"in r.dark?o(r.light.colors)&&o(r.dark.colors):(console.error('Dark theme is missing "colors" property.',r),!1):(console.error('Light theme is missing "colors" property.',r),!1):o(r.colors):(console.error('Theme must contain either both "light" and "dark" properties, or "colors".',r),!1)},help:"unsupported theme configuration. Check error logs for detailed info."},layoutConfig:{validate:function(r){if("grid"in r){var i=r.grid;if("maxTilesPerPage"in i){if(!Number.isInteger(i.maxTilesPerPage))return console.error("grid.maxTilesPerPage should be an integer. You passed ".concat(i.maxTilesPerPage,".")),!1;if(i.maxTilesPerPage>49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in i){if(!Number.isInteger(i.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(i.minTilesPerPage,".")),!1;if(i.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in i&&i.minTilesPerPage>i.maxTilesPerPage)return console.error("grid.minTilesPerPage can't be higher than grid.maxTilesPerPage."),!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(r){return G4(r,{allowAllParticipantsKey:!1})},help:Z4({allowAllParticipantsKey:!1})},sendSettings:{validate:function(r,i){return!!function(o,c){try{return c.validateUpdateSendSettings(o),!0}catch(d){return console.error("Failed to validate send settings",d),!1}}(r,i)&&(i._preloadCache.sendSettings=r,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(r,i){var o;return!!Y4(r)&&(i._inputSettings||(i._inputSettings={}),X4(r,(o=i.properties)===null||o===void 0?void 0:o.dailyConfig,i._sharedTracks),i._updatePreloadCacheInputSettings(r,!0),!0)},help:vx()},layout:{validate:function(r){return r==="custom-v1"||r==="browser"||r==="none"},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},Yy={styles:{validate:function(r){for(var i in r)if(i!=="cam"&&i!=="screen")return!1;if(r.cam){for(var o in r.cam)if(o!=="div"&&o!=="video")return!1}if(r.screen){for(var c in r.screen)if(c!=="div"&&c!=="video")return!1}return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(r,i){if(i._preloadCache.subscribeToTracksAutomatically)return!1;var o=[!0,!1,"staged"];if(o.includes(r)||!Dn()&&r==="avatar")return!0;var c=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],d=function(p){var y=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var x in p)if(x==="custom"){if(!o.includes(p[x])&&!d(p[x],!0))return!1}else{var b=!y&&!c.includes(x),k=!o.includes(p[x]);if(b||k)return!1}return!0};return d(r)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(Dn()?"":" | 'avatar'"," | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }")},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(r){return r===!1},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(r){for(var i=0,o=Object.entries(r);i<o.length;i++){var c=$a(o[i],2),d=c[0],p=c[1];switch(d){case"hasPresence":if(typeof p!="boolean")return!1;break;case"canSend":if(p instanceof Set||p instanceof Array||Array.isArray(p)){var y,x=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],b=z4(p);try{for(b.s();!(y=b.n()).done;){var k=y.value;if(!x.includes(k))return!1}}catch(ee){b.e(ee)}finally{b.f()}}else if(typeof p!="boolean")return!1;(p instanceof Array||Array.isArray(p))&&(r.canSend=new Set(p));break;case"canReceive":var O=$a(GM.validateJSONObject(p),2),N=O[0],Z=O[1];if(!N)return console.error(Z),!1;break;case"canAdmin":if(p instanceof Set||p instanceof Array||Array.isArray(p)){var J,D=["participants","streaming","transcription"],F=z4(p);try{for(F.s();!(J=F.n()).done;){var ae=J.value;if(!D.includes(ae))return!1}}catch(ee){F.e(ee)}finally{F.f()}}else if(typeof p!="boolean")return!1;(p instanceof Array||Array.isArray(p))&&(r.canAdmin=new Set(p));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=function(){var r=tn(function*(i){return new Promise(function(o,c){var d=[];i.forEach(function(p){return Promise.resolve(p).then(function(y){o(y)}).catch(function(y){d.push(y),d.length===i.length&&c(d)})})})});return function(i){return r.apply(this,arguments)}}());var ZM=function(){function r(g){var w,C,q,ce,j,U,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(As(this,r),q=this,ce=$r(ce=r),Eo(C=fy(q,N4()?Reflect.construct(ce,[],$r(q).constructor):ce.apply(q,j)),"startListeningForDeviceChanges",function(){HM(C.handleDeviceChange)}),Eo(C,"stopListeningForDeviceChanges",function(){PM(C.handleDeviceChange)}),Eo(C,"handleDeviceChange",function(R){R=R.map(function(G){return JSON.parse(JSON.stringify(G))}),C.emitDailyJSEvent({action:"available-devices-updated",availableDevices:R})}),Eo(C,"handleNativeAppStateChange",function(){var R=tn(function*(G){if(G==="destroyed")return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield C.destroy());var ie=G==="active";C.disableReactNativeAutoDeviceManagement("video")||(ie?C.camUnmutedBeforeLosingNativeActiveState&&C.setLocalVideo(!0):(C.camUnmutedBeforeLosingNativeActiveState=C.localVideo(),C.camUnmutedBeforeLosingNativeActiveState&&C.setLocalVideo(!1)))});return function(G){return R.apply(this,arguments)}}()),Eo(C,"handleNativeAudioFocusChange",function(R){C.disableReactNativeAutoDeviceManagement("audio")||(C._hasNativeAudioFocus=R,C.toggleParticipantAudioBasedOnNativeAudioFocus(),C._hasNativeAudioFocus?C.micUnmutedBeforeLosingNativeAudioFocus&&C.setLocalAudio(!0):(C.micUnmutedBeforeLosingNativeAudioFocus=C.localAudio(),C.setLocalAudio(!1)))}),Eo(C,"handleNativeSystemScreenCaptureStop",function(){C.stopScreenShare()}),C.strictMode=ne.strictMode===void 0||ne.strictMode,C.allowMultipleCallInstances=(w=ne.allowMultipleCallInstances)!==null&&w!==void 0&&w,Object.keys(bd).length&&(C._logDuplicateInstanceAttempt(),!C.allowMultipleCallInstances)){if(C.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed");console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),C.callClientId=yy(),bd[(U=C).callClientId]=U,window._daily.instances[C.callClientId]={},C._sharedTracks={},window._daily.instances[C.callClientId].tracks=C._sharedTracks,ne.dailyJsVersion=r.version(),C._iframe=g,C._callObjectMode=ne.layout==="none"&&!C._iframe,C._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},ne.showLocalVideo!==void 0?C._callObjectMode?console.error("showLocalVideo is not available in call object mode"):C._showLocalVideo=!!ne.showLocalVideo:C._showLocalVideo=!0,ne.showParticipantsBar!==void 0?C._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):C._showParticipantsBar=!!ne.showParticipantsBar:C._showParticipantsBar=!0,ne.customIntegrations!==void 0?C._callObjectMode?console.error("customIntegrations is not available in call object mode"):C._customIntegrations=ne.customIntegrations:C._customIntegrations={},ne.customTrayButtons!==void 0?C._callObjectMode?console.error("customTrayButtons is not available in call object mode"):C._customTrayButtons=ne.customTrayButtons:C._customTrayButtons={},ne.activeSpeakerMode!==void 0?C._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):C._activeSpeakerMode=!!ne.activeSpeakerMode:C._activeSpeakerMode=!1,ne.receiveSettings?C._callObjectMode?C._receiveSettings=ne.receiveSettings:console.error("receiveSettings is only available in call object mode"):C._receiveSettings={},C.validateProperties(ne),C.properties=$t({},ne),C._inputSettings||(C._inputSettings={}),C._callObjectLoader=C._callObjectMode?new EM(C.callClientId):null,C._callState=qw,C._isPreparingToJoin=!1,C._accessState={access:tx},C._meetingSessionSummary={},C._finalSummaryOfPrevSession={},C._meetingSessionState=bx(H4,C._callObjectMode),C._nativeInCallAudioMode=U4,C._participants={},C._isScreenSharing=!1,C._participantCounts=P4,C._rmpPlayerState={},C._waitingParticipants={},C._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},C._activeSpeaker={},C._localAudioLevel=0,C._isLocalAudioLevelObserverRunning=!1,C._remoteParticipantsAudioLevel={},C._isRemoteParticipantsAudioLevelObserverRunning=!1,C._maxAppMessageSize=nx,C._messageChannel=Dn()?new MM:new kM,C._iframe&&(C._iframe.requestFullscreen?C._iframe.addEventListener("fullscreenchange",function(){document.fullscreenElement===C._iframe?(C.emitDailyJSEvent({action:Uy}),C.sendMessageToCallMachine({action:Uy})):(C.emitDailyJSEvent({action:Hy}),C.sendMessageToCallMachine({action:Hy}))}):C._iframe.webkitRequestFullscreen&&C._iframe.addEventListener("webkitfullscreenchange",function(){document.webkitFullscreenElement===C._iframe?(C.emitDailyJSEvent({action:Uy}),C.sendMessageToCallMachine({action:Uy})):(C.emitDailyJSEvent({action:Hy}),C.sendMessageToCallMachine({action:Hy}))})),Dn()){var ge=C.nativeUtils();ge.addAudioFocusChangeListener&&ge.removeAudioFocusChangeListener&&ge.addAppStateChangeListener&&ge.removeAppStateChangeListener&&ge.addSystemScreenCaptureStopListener&&ge.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),C._hasNativeAudioFocus=!0,ge.addAudioFocusChangeListener(C.handleNativeAudioFocusChange),ge.addAppStateChangeListener(C.handleNativeAppStateChange),ge.addSystemScreenCaptureStopListener(C.handleNativeSystemScreenCaptureStop)}return C._callObjectMode&&C.startListeningForDeviceChanges(),C._messageChannel.addListenerForMessagesFromCallMachine(C.handleMessageFromCallMachine,C.callClientId,C),C}return py(r,my),Es(r,[{key:"destroy",value:(me=tn(function*(){var g;try{yield this.leave()}catch{}var w=this._iframe;if(w){var C=w.parentElement;C&&C.removeChild(w)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),Dn()){var q=this.nativeUtils();q.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),q.removeAppStateChangeListener(this.handleNativeAppStateChange),q.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete bd[this.callClientId],!((g=window)===null||g===void 0||(g=g._daily)===null||g===void 0)&&g.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)}),function(){return me.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(g){var w=g.bodyClass,C=g.cssFile,q=g.cssText;return En(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(C),bodyClass:w,cssText:q}),this}},{key:"iframe",value:function(){return En(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return Gr(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return Gr(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(g,w){for(var C in w){if(!Yy[C])throw new Error("unrecognized updateParticipant property ".concat(C));if(Yy[C].validate&&!Yy[C].validate(w[C],this,this._participants[g]))throw new Error(Yy[C].help)}}},{key:"updateParticipant",value:function(g,w){return this._participants.local&&this._participants.local.session_id===g&&(g="local"),g&&w&&(this.validateParticipantProperties(g,w),this.sendMessageToCallMachine({action:"update-participant",id:g,properties:w})),this}},{key:"updateParticipants",value:function(g){var w=this._participants.local&&this._participants.local.session_id;for(var C in g)C===w&&(C="local"),C&&g[C]&&this.validateParticipantProperties(C,g[C]);return this.sendMessageToCallMachine({action:"update-participants",participants:g}),this}},{key:"updateWaitingParticipant",value:(re=tn(function*(){var g=this,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Gr(this._callObjectMode,"updateWaitingParticipant()"),Kn(this._callState,"updateWaitingParticipant()"),typeof w!="string"||Un(C)!=="object")throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise(function(q,ce){g.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:w,updates:C},function(j){j.error&&ce(j.error),j.id||ce(new Error("unknown error in updateWaitingParticipant()")),q({id:j.id})})})}),function(){return re.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(_=tn(function*(){var g=this,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Gr(this._callObjectMode,"updateWaitingParticipants()"),Kn(this._callState,"updateWaitingParticipants()"),Un(w)!=="object")throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise(function(C,q){g.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:w},function(ce){ce.error&&q(ce.error),ce.ids||q(new Error("unknown error in updateWaitingParticipants()")),C({ids:ce.ids})})})}),function(){return _.apply(this,arguments)})},{key:"requestAccess",value:(te=tn(function*(){var g=this,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=w.access,q=C===void 0?{level:w8}:C,ce=w.name,j=ce===void 0?"":ce;return Gr(this._callObjectMode,"requestAccess()"),Kn(this._callState,"requestAccess()"),new Promise(function(U,ne){g.sendMessageToCallMachine({action:"daily-method-request-access",access:q,name:j},function(ge){ge.error&&ne(ge.error),ge.access||ne(new Error("unknown error in requestAccess()")),U({access:ge.access,granted:ge.granted})})})}),function(){return te.apply(this,arguments)})},{key:"localAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.audio.state):null}},{key:"localVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.video.state):null}},{key:"setLocalAudio",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"forceDiscardTrack"in w&&(Dn()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),w={}):g&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),w={})),this.sendMessageToCallMachine({action:"local-audio",state:g,options:w}),this}},{key:"localScreenAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenAudio.state):null}},{key:"localScreenVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenVideo.state):null}},{key:"updateScreenShare",value:function(g){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:g}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(g){return this.sendMessageToCallMachine({action:"local-video",state:g}),this}},{key:"_setAllowLocalAudio",value:function(g){if(this._preloadCache.allowLocalAudio=g,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:g}),this}},{key:"_setAllowLocalVideo",value:function(g){if(this._preloadCache.allowLocalVideo=g,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:g}),this}},{key:"getReceiveSettings",value:(P=tn(function*(g){var w=this,C=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,q=C!==void 0&&C;if(Gr(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(Un(g)){case"string":return new Promise(function(ce){w.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:g,showInheritedValues:q},function(j){ce(j.receiveSettings)})});case"undefined":return this._receiveSettings;default:throw new Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments')}}),function(g){return P.apply(this,arguments)})},{key:"updateReceiveSettings",value:(E=tn(function*(g){var w=this;if(Gr(this._callObjectMode,"updateReceiveSettings()"),!G4(g,{allowAllParticipantsKey:!0}))throw new Error(Z4({allowAllParticipantsKey:!0}));return Kn(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise(function(C){w.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:g},function(q){C({receiveSettings:q.receiveSettings})})})}),function(g){return E.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(g,w){if(g){var C={};if(g.audio){var q,ce,j;g.audio.settings&&(!Object.keys(g.audio.settings).length&&w||(C.audio={settings:$t({},g.audio.settings)})),w&&(q=C.audio)!==null&&q!==void 0&&(q=q.settings)!==null&&q!==void 0&&q.customTrack&&(C.audio.settings={customTrack:this._sharedTracks.audioTrack});var U=((ce=g.audio.processor)===null||ce===void 0?void 0:ce.type)==="none"&&((j=g.audio.processor)===null||j===void 0?void 0:j._isDefaultWhenNone);if(g.audio.processor&&!U){var ne=$t({},g.audio.processor);delete ne._isDefaultWhenNone,C.audio=$t($t({},C.audio),{},{processor:ne})}}if(g.video){var ge,R,G;g.video.settings&&(!Object.keys(g.video.settings).length&&w||(C.video={settings:$t({},g.video.settings)})),w&&(ge=C.video)!==null&&ge!==void 0&&(ge=ge.settings)!==null&&ge!==void 0&&ge.customTrack&&(C.video.settings={customTrack:this._sharedTracks.videoTrack});var ie=((R=g.video.processor)===null||R===void 0?void 0:R.type)==="none"&&((G=g.video.processor)===null||G===void 0?void 0:G._isDefaultWhenNone);if(g.video.processor&&!ie){var ue=$t({},g.video.processor);delete ue._isDefaultWhenNone,C.video=$t($t({},C.video),{},{processor:ue})}}return C}}},{key:"getInputSettings",value:function(){var g=this;return En(),new Promise(function(w){w(g._getInputSettings())})}},{key:"_getInputSettings",value:function(){var g,w,C,q,ce,j,U={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(g=((C=this._inputSettings)===null||C===void 0?void 0:C.video)||U,w=((q=this._inputSettings)===null||q===void 0?void 0:q.audio)||U):(g=((ce=this._preloadCache)===null||ce===void 0||(ce=ce.inputSettings)===null||ce===void 0?void 0:ce.video)||U,w=((j=this._preloadCache)===null||j===void 0||(j=j.inputSettings)===null||j===void 0?void 0:j.audio)||U);var ne={audio:w,video:g};return this._prepInputSettingsForSharing(ne,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(g,w){var C=this._inputSettings||{},q={};if(g.video){var ce,j,U;q.video={},g.video.settings?(q.video.settings={},w||g.video.settings.customTrack||(U=C.video)===null||U===void 0||!U.settings?q.video.settings=g.video.settings:q.video.settings=$t($t({},C.video.settings),g.video.settings),Object.keys(q.video.settings).length||delete q.video.settings):(ce=C.video)!==null&&ce!==void 0&&ce.settings&&(q.video.settings=C.video.settings),g.video.processor?q.video.processor=g.video.processor:(j=C.video)!==null&&j!==void 0&&j.processor&&(q.video.processor=C.video.processor)}else C.video&&(q.video=C.video);if(g.audio){var ne,ge,R;q.audio={},g.audio.settings?(q.audio.settings={},w||g.audio.settings.customTrack||(R=C.audio)===null||R===void 0||!R.settings?q.audio.settings=g.audio.settings:q.audio.settings=$t($t({},C.audio.settings),g.audio.settings),Object.keys(q.audio.settings).length||delete q.audio.settings):(ne=C.audio)!==null&&ne!==void 0&&ne.settings&&(q.audio.settings=C.audio.settings),g.audio.processor?q.audio.processor=g.audio.processor:(ge=C.audio)!==null&&ge!==void 0&&ge.processor&&(q.audio.processor=C.audio.processor)}else C.audio&&(q.audio=C.audio);this._maybeUpdateInputSettings(q)}},{key:"_devicesFromInputSettings",value:function(g){var w,C,q=(g==null||(w=g.video)===null||w===void 0||(w=w.settings)===null||w===void 0?void 0:w.deviceId)||null,ce=(g==null||(C=g.audio)===null||C===void 0||(C=C.settings)===null||C===void 0?void 0:C.deviceId)||null,j=this._preloadCache.outputDeviceId||null;return{camera:q?{deviceId:q}:{},mic:ce?{deviceId:ce}:{},speaker:j?{deviceId:j}:{}}}},{key:"updateInputSettings",value:(T=tn(function*(g){var w=this;return En(),Y4(g)?g.video||g.audio?(X4(g,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(g,!0),this._getInputSettings()):new Promise(function(C,q){w.sendMessageToCallMachine({action:"update-input-settings",inputSettings:g},function(ce){if(ce.error)q(ce.error);else{if(ce.returnPreloadCache)return w._updatePreloadCacheInputSettings(g,!0),void C(w._getInputSettings());w._maybeUpdateInputSettings(ce.inputSettings),C(w._prepInputSettingsForSharing(ce.inputSettings,!0))}})})):this._getInputSettings():(console.error(vx()),Promise.reject(vx()))}),function(g){return T.apply(this,arguments)})},{key:"setBandwidth",value:function(g){var w=g.kbs,C=g.trackConstraints;if(En(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:w,trackConstraints:C}),this}},{key:"getDailyLang",value:function(){var g=this;if(En(),this._callMachineInitialized)return new Promise(function(w){g.sendMessageToCallMachine({action:"get-daily-lang"},function(C){delete C.action,delete C.callbackStamp,w(C)})})}},{key:"setDailyLang",value:function(g){return En(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:g}),this}},{key:"setProxyUrl",value:function(g){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:g}),this}},{key:"setIceConfig",value:function(g){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:g}),this}},{key:"meetingSessionSummary",value:function(){return[yd,Bc].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(S=tn(function*(){var g=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),Kn(this._callState,"getMeetingSession()"),new Promise(function(w){g.sendMessageToCallMachine({action:"get-meeting-session"},function(C){delete C.action,delete C.callbackStamp,w(C)})})}),function(){return S.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return Kn(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"replace";Gr(this._callObjectMode,"setMeetingSessionData()"),Kn(this._callState,"setMeetingSessionData");try{(function(C,q){new AM({data:C,mergeStrategy:q})})(g,w)}catch(C){throw console.error(C),C}try{this.sendMessageToCallMachine({action:"set-session-data",data:g,mergeStrategy:w})}catch(C){throw new Error("Error setting meeting session data: ".concat(C))}}},{key:"setUserName",value:function(g,w){var C=this;return this.properties.userName=g,new Promise(function(q){C.sendMessageToCallMachine({action:"set-user-name",name:g??"",thisMeetingOnly:Dn()||!!w&&!!w.thisMeetingOnly},function(ce){delete ce.action,delete ce.callbackStamp,q(ce)})})}},{key:"setUserData",value:(A=tn(function*(g){var w=this;try{q4(g)}catch(C){throw console.error(C),C}if(this.properties.userData=g,this._callMachineInitialized)return new Promise(function(C){try{w.sendMessageToCallMachine({action:"set-user-data",userData:g},function(q){delete q.action,delete q.callbackStamp,C(q)})}catch(q){throw new Error("Error setting user data: ".concat(q))}})}),function(g){return A.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(g){if(g&&(g<100||typeof g!="number"))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(g){var w=this;if(typeof AudioWorkletNode>"u"&&!Dn())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(g),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise(function(C,q){w.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:g},function(ce){w._isLocalAudioLevelObserverRunning=!ce.error,ce.error?q({error:ce.error}):C()})});this._preloadCache.localAudioLevelObserver={enabled:!0,interval:g}}},{key:"isLocalAudioLevelObserverRunning",value:function(){return this._isLocalAudioLevelObserverRunning}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(g){var w=this;if(this.validateAudioLevelInterval(g),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise(function(C,q){w.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:g},function(ce){w._isRemoteParticipantsAudioLevelObserverRunning=!ce.error,ce.error?q({error:ce.error}):C()})});this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:g}}},{key:"isRemoteParticipantsAudioLevelObserverRunning",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(H=tn(function*(){var g=this,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Gr(this._callObjectMode,"startCamera()"),mx(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(w)}catch(C){return Promise.reject(C)}else{if(this._didPreAuth){if(w.url&&w.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(w.token&&w.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(w),this.properties=$t($t({},this.properties),w)}return new Promise(function(C){g._preloadCache.inputSettings=g._prepInputSettingsForSharing(g._inputSettings,!1),g.sendMessageToCallMachine({action:"start-camera",properties:gf(g.properties,g.callClientId),preloadCache:gf(g._preloadCache,g.callClientId)},function(q){C({camera:q.camera,mic:q.mic,speaker:q.speaker})})})}),function(){return H.apply(this,arguments)})},{key:"validateCustomTrack",value:function(g,w,C){if(C&&C.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(w&&w!=="music"&&w!=="speech"&&!(w instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(C&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(C))throw new Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(g instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var g=this,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName};return En(),Kn(this._callState,"startCustomTrack()"),this.validateCustomTrack(w.track,w.mode,w.trackName),new Promise(function(C,q){g._sharedTracks.customTrack=w.track,w.track=kl,g.sendMessageToCallMachine({action:"start-custom-track",properties:w},function(ce){ce.error?q({error:ce.error}):C(ce.mediaTag)})})}},{key:"stopCustomTrack",value:function(g){var w=this;return En(),Kn(this._callState,"stopCustomTrack()"),new Promise(function(C){w.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:g},function(q){C(q.mediaTag)})})}},{key:"setCamera",value:function(g){var w=this;return im(),Fy(this._callMachineInitialized,"setCamera()"),new Promise(function(C){w.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:g},function(q){C({device:q.device})})})}},{key:"setAudioDevice",value:(X=tn(function*(g){return im(),this.nativeUtils().setAudioDevice(g),{deviceId:yield this.nativeUtils().getAudioDevice()}}),function(g){return X.apply(this,arguments)})},{key:"cycleCamera",value:function(){var g=this,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise(function(C){g.sendMessageToCallMachine({action:"cycle-camera",properties:w},function(q){C({device:q.device})})})}},{key:"cycleMic",value:function(){var g=this;return En(),new Promise(function(w){g.sendMessageToCallMachine({action:"cycle-mic"},function(C){w({device:C.device})})})}},{key:"getCameraFacingMode",value:function(){var g=this;return im(),new Promise(function(w){g.sendMessageToCallMachine({action:"get-camera-facing-mode"},function(C){w(C.facingMode)})})}},{key:"setInputDevicesAsync",value:(L=tn(function*(g){var w=this,C=g.audioDeviceId,q=g.videoDeviceId,ce=g.audioSource,j=g.videoSource;if(En(),ce!==void 0&&(C=ce),j!==void 0&&(q=j),typeof C=="boolean"&&(this._setAllowLocalAudio(C),C=void 0),typeof q=="boolean"&&(this._setAllowLocalVideo(q),q=void 0),!C&&!q)return yield this.getInputDevices();var U={};return C&&(C instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=C,C=kl,U.audio={settings:{customTrack:C}}):(delete this._sharedTracks.audioTrack,U.audio={settings:{deviceId:C}})),q&&(q instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=q,q=kl,U.video={settings:{customTrack:q}}):(delete this._sharedTracks.videoTrack,U.video={settings:{deviceId:q}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(U,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise(function(ne){w.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:C,videoDeviceId:q},function(ge){if(delete ge.action,delete ge.callbackStamp,ge.returnPreloadCache)return w._updatePreloadCacheInputSettings(U,!1),void ne(w._devicesFromInputSettings(w._inputSettings));ne(ge)})})}),function(g){return L.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(K=tn(function*(g){var w=this,C=g.outputDeviceId;return En(),C&&(this._preloadCache.outputDeviceId=C),this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(q){w.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:C},function(ce){delete ce.action,delete ce.callbackStamp,ce.returnPreloadCache?q(w._devicesFromInputSettings(w._inputSettings)):q(ce)})})}),function(g){return K.apply(this,arguments)})},{key:"getInputDevices",value:(se=tn(function*(){var g=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(w){g.sendMessageToCallMachine({action:"get-input-devices"},function(C){C.returnPreloadCache?w(g._devicesFromInputSettings(g._inputSettings)):w({camera:C.camera,mic:C.mic,speaker:C.speaker})})})}),function(){return se.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return im(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(g){if(im(),[U4,FM].includes(g)){if(g!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=g,!this.disableReactNativeAutoDeviceManagement("audio")&&Xy(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",g)}},{key:"preAuth",value:(le=tn(function*(){var g=this,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Gr(this._callObjectMode,"preAuth()"),mx(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(w)),!w.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(w),this.properties=$t($t({},this.properties),w),new Promise(function(C,q){g._preloadCache.inputSettings=g._prepInputSettingsForSharing(g._inputSettings,!1),g.sendMessageToCallMachine({action:"daily-method-preauth",properties:gf(g.properties,g.callClientId),preloadCache:gf(g._preloadCache,g.callClientId)},function(ce){return ce.error?q(ce.error):ce.access?(g._didPreAuth=!0,void C({access:ce.access})):q(new Error("unknown error in preAuth()"))})})}),function(){return le.apply(this,arguments)})},{key:"load",value:(V=tn(function*(g){var w=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(g&&(this.validateProperties(g),this.properties=$t($t({},this.properties),g)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(Gw),this.emitDailyJSEvent({action:_8}),this._callObjectMode?new Promise(function(C,q){w._callObjectLoader.cancel();var ce=Date.now();w._callObjectLoader.load(w.properties.dailyConfig,function(j){w._bundleLoadTime=j?"no-op":Date.now()-ce,w._updateCallState(Yw),j&&w.emitDailyJSEvent({action:Fw}),C()},function(j,U){if(w.emitDailyJSEvent({action:O8}),!U){w._updateCallState(Bc),w.resetMeetingDependentVars();var ne={action:Kw,errorMsg:j.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:j,bundleUrl:vy(w.properties.dailyConfig)}}};w._maybeSendToSentry(ne),w.emitDailyJSEvent(ne),q(j.msg)}})}):(this._iframe.src=D6(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise(function(C,q){w._loadedCallback=function(ce){w._callState!==Bc?(w._updateCallState(Yw),(w.properties.cssFile||w.properties.cssText)&&w.loadCss(w.properties),C()):q(ce)}}))}}),function(g){return V.apply(this,arguments)})},{key:"join",value:(z=tn(function*(){var g=this,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var C=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(w)}catch(q){return this.updateIsPreparingToJoin(!1),Promise.reject(q)}}else{if(C=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(w.url&&w.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(w.token&&w.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(w.url&&!this._callObjectMode&&w.url&&w.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(w.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(w),this.properties=$t($t({},this.properties),w)}return w.showLocalVideo!==void 0&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!w.showLocalVideo),w.showParticipantsBar!==void 0&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!w.showParticipantsBar),this._callState===md||this._callState===ex?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(ex,!1),this.emitDailyJSEvent({action:L8}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:gf(this.properties,this.callClientId),preloadCache:gf(this._preloadCache,this.callClientId)}),new Promise(function(q,ce){g._joinedCallback=function(j,U){if(g._callState!==Bc){if(g._updateCallState(md),j)for(var ne in j){if(g._callObjectMode){var ge=g._callMachine().store;T4(j[ne],ge),k4(j[ne],ge),M4(j[ne],g._participants[ne],ge)}g._participants[ne]=$t({},j[ne]),g.toggleParticipantAudioBasedOnNativeAudioFocus()}C&&g.loadCss(g.properties),q(j)}else ce(U)}}))}),function(){return z.apply(this,arguments)})},{key:"leave",value:(Q=tn(function*(){var g=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise(function(w){g._callState===yd||g._callState===Bc?w():g._callObjectLoader&&!g._callObjectLoader.loaded?(g._callObjectLoader.cancel(),g._updateCallState(yd),g.resetMeetingDependentVars(),g.emitDailyJSEvent({action:yd}),w()):(g._resolveLeave=w,g.sendMessageToCallMachine({action:"leave-meeting"}))})}),function(){return Q.apply(this,arguments)})},{key:"startScreenShare",value:($=tn(function*(){var g=this,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Fy(this._callMachineInitialized,"startScreenShare()"),w.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",w.screenVideoSendSettings),w.mediaStream&&(this._sharedTracks.screenMediaStream=w.mediaStream,w.mediaStream=kl),typeof DailyNativeUtils<"u"&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var C=this.nativeUtils();if(yield C.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:Ww,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});C.setSystemScreenCaptureStartCallback(function(){C.setSystemScreenCaptureStartCallback(null),g.sendMessageToCallMachine({action:t4,captureOptions:w})}),C.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:t4,captureOptions:w})}),function(){return $.apply(this,arguments)})},{key:"stopScreenShare",value:function(){Fy(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},w=g.type;if(w&&w!=="cloud"&&w!=="raw-tracks"&&w!=="local")throw new Error("invalid type: ".concat(w,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine($t({action:"local-recording-start"},g))}},{key:"updateRecording",value:function(g){var w=g.layout,C=w===void 0?{preset:"default"}:w,q=g.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:C,instanceId:q})}},{key:"stopRecording",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine($t({action:"local-recording-stop"},g))}},{key:"startLiveStreaming",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine($t({action:"daily-method-start-live-streaming"},g))}},{key:"updateLiveStreaming",value:function(g){var w=g.layout,C=w===void 0?{preset:"default"}:w,q=g.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:C,instanceId:q})}},{key:"addLiveStreamingEndpoints",value:function(g){var w=g.endpoints,C=g.instanceId;this.sendMessageToCallMachine({action:n4,endpointsOp:SM,endpoints:w,instanceId:C})}},{key:"removeLiveStreamingEndpoints",value:function(g){var w=g.endpoints,C=g.instanceId;this.sendMessageToCallMachine({action:n4,endpointsOp:wM,endpoints:w,instanceId:C})}},{key:"stopLiveStreaming",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine($t({action:"daily-method-stop-live-streaming"},g))}},{key:"validateDailyConfig",value:function(g){g.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(g.camSimulcastEncodings)),g.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),u4()&&g.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,C=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(g){if(!(g instanceof Array||Array.isArray(g)))throw new Error("encodings must be an Array");if(!nC(g.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var q=0;q<g.length;q++){var ce=g[q];for(var j in this._validateEncodingLayerHasValidProperties(ce),ce)if(px.includes(j)){if(typeof ce[j]!="number")throw new Error("".concat(j," must be a number"));if(w){var U=w[j],ne=U.min,ge=U.max;if(!nC(ce[j],ne,ge))throw new Error("".concat(j," value not in range. valid range: ").concat(ne," to ").concat(ge))}}else if(!["active","scalabilityMode"].includes(j))throw new Error("Invalid key ".concat(j,", valid keys are:")+Object.values(px));if(C&&!ce.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(Y=tn(function*(g){var w=this,C=g.url,q=g.settings,ce=q===void 0?{state:ax.PLAY}:q;try{(function(j){if(typeof j!="string")throw new Error('url parameter must be "string" type')})(C),tC(ce),function(j){for(var U in j)if(!$4.includes(U))throw new Error("Invalid key ".concat(U,", valid keys are: ").concat($4));j.simulcastEncodings&&this.validateSimulcastEncodings(j.simulcastEncodings,V4,!0)}(ce)}catch(j){throw console.error("invalid argument Error: ".concat(j)),console.error(`startRemoteMediaPlayer arguments must be of the form:
124
+ { url: "playback url",
125
+ settings?:
126
+ {state: "play"|"pause", simulcastEncodings?: [{}] } }`),j}return new Promise(function(j,U){w.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:C,settings:ce},function(ne){ne.error?U({error:ne.error,errorMsg:ne.errorMsg}):j({session_id:ne.session_id,remoteMediaPlayerState:{state:ne.state,settings:ne.settings}})})})}),function(g){return Y.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(B=tn(function*(g){var w=this;if(typeof g!="string")throw new Error(" remotePlayerID must be of type string");return new Promise(function(C,q){w.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:g},function(ce){ce.error?q({error:ce.error,errorMsg:ce.errorMsg}):C()})})}),function(g){return B.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(ee=tn(function*(g){var w=this,C=g.session_id,q=g.settings;try{tC(q)}catch(ce){throw console.error("invalid argument Error: ".concat(ce)),console.error(`updateRemoteMediaPlayer arguments must be of the form:
127
+ session_id: "participant session",
128
+ { settings?: {state: "play"|"pause"} }`),ce}return new Promise(function(ce,j){w.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:C,settings:q},function(U){U.error?j({error:U.error,errorMsg:U.errorMsg}):ce({session_id:U.session_id,remoteMediaPlayerState:{state:U.state,settings:U.settings}})})})}),function(g){return ee.apply(this,arguments)})},{key:"startTranscription",value:function(g){Kn(this._callState,"startTranscription()"),this.sendMessageToCallMachine($t({action:"daily-method-start-transcription"},g))}},{key:"updateTranscription",value:function(g){if(Kn(this._callState,"updateTranscription()"),!g)throw new Error("updateTranscription Error: options is mandatory");if(Un(g)!=="object")throw new Error("updateTranscription Error: options must be object type");if(g.participants&&!Array.isArray(g.participants))throw new Error("updateTranscription Error: participants must be an array");this.sendMessageToCallMachine($t({action:"daily-method-update-transcription"},g))}},{key:"stopTranscription",value:function(g){if(Kn(this._callState,"stopTranscription()"),g&&Un(g)!=="object")throw new Error("stopTranscription Error: options must be object type");if(g&&!g.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine($t({action:"daily-method-stop-transcription"},g))}},{key:"startDialOut",value:(ae=tn(function*(g){var w=this;Kn(this._callState,"startDialOut()");var C=function(q){if(q){if(!Array.isArray(q))throw new Error("Error starting dial out: audio codec must be an array");if(q.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");q.forEach(function(ce){if(typeof ce!="string")throw new Error("Error starting dial out: audio codec must be a string");if(ce!=="OPUS"&&ce!=="PCMU"&&ce!=="PCMA"&&ce!=="G722")throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")})}};if(!g.sipUri&&!g.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(g.sipUri&&g.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");if(g.sipUri){if(typeof g.sipUri!="string")throw new Error("Error starting dial out: sipUri must be a string");if(!g.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(g.video&&typeof g.video!="boolean")throw new Error("Error starting dial out: video must be a boolean value");(function(q){if(q&&(C(q.audio),q.video)){if(!Array.isArray(q.video))throw new Error("Error starting dial out: video codec must be an array");if(q.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");q.video.forEach(function(ce){if(typeof ce!="string")throw new Error("Error starting dial out: video codec must be a string");if(ce!=="H264"&&ce!=="VP8")throw new Error("Error starting dial out: video codec must be H264 or VP8")})}})(g.codecs)}if(g.phoneNumber){if(typeof g.phoneNumber!="string")throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(g.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");g.codecs&&C(g.codecs.audio)}if(g.callerId){if(typeof g.callerId!="string")throw new Error("Error starting dial out: callerId must be a string");if(g.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(g.displayName){if(typeof g.displayName!="string")throw new Error("Error starting dial out: displayName must be a string");if(g.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(g.userId){if(typeof g.userId!="string")throw new Error("Error starting dial out: userId must be a string");if(g.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}return new Promise(function(q,ce){w.sendMessageToCallMachine($t({action:"dialout-start"},g),function(j){j.error?ce(j.error):q(j)})})}),function(g){return ae.apply(this,arguments)})},{key:"stopDialOut",value:function(g){var w=this;return Kn(this._callState,"stopDialOut()"),new Promise(function(C,q){w.sendMessageToCallMachine($t({action:"dialout-stop"},g),function(ce){ce.error?q(ce.error):C(ce)})})}},{key:"sipCallTransfer",value:(F=tn(function*(g){var w=this;if(Kn(this._callState,"sipCallTransfer()"),!g)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return g.useSipRefer=!1,eC(g,"sipCallTransfer"),new Promise(function(C,q){w.sendMessageToCallMachine($t({action:a4},g),function(ce){ce.error?q(ce.error):C(ce)})})}),function(g){return F.apply(this,arguments)})},{key:"sipRefer",value:(D=tn(function*(g){var w=this;if(Kn(this._callState,"sipRefer()"),!g)throw new Error("sessionId and toEndPoint are mandatory parameter");return g.useSipRefer=!0,eC(g,"sipRefer"),new Promise(function(C,q){w.sendMessageToCallMachine($t({action:a4},g),function(ce){ce.error?q(ce.error):C(ce)})})}),function(g){return D.apply(this,arguments)})},{key:"sendDTMF",value:(J=tn(function*(g){var w=this;return Kn(this._callState,"sendDTMF()"),function(C){var q=C.sessionId,ce=C.tones;if(!q||!ce)throw new Error("sessionId and tones are mandatory parameter");if(typeof q!="string"||typeof ce!="string")throw new Error("sessionId and tones should be of string type");if(ce.length>20)throw new Error("tones string must be upto 20 characters");var j=/[^0-9A-D*#]/g,U=ce.match(j);if(U&&U[0])throw new Error("".concat(U[0]," is not valid DTMF tone"))}(g),new Promise(function(C,q){w.sendMessageToCallMachine($t({action:"send-dtmf"},g),function(ce){ce.error?q(ce.error):C(ce)})})}),function(g){return J.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var g=this;return this._callState!==md?Promise.resolve($t({stats:{latest:{}}},this._network)):new Promise(function(w){g.sendMessageToCallMachine({action:"get-calc-stats"},function(C){w($t($t({},g._network),{},{stats:C.stats}))})})}},{key:"testWebsocketConnectivity",value:(Z=tn(function*(){var g=this;if(yx(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(w){return Promise.reject(w)}return new Promise(function(w,C){g.sendMessageToCallMachine({action:"test-websocket-connectivity"},function(q){q.error?C(q.error):w(q.results)})})}),function(){return Z.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(g){return g?g instanceof MediaStreamTrack?!!$M(g)||(console.error("Video track is not playable. This test needs a live video track."),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error("Missing video track. You must provide a video track in order to run this test."),!1)}},{key:"testCallQuality",value:(N=tn(function*(){var g=this;En(),Gr(this._callObjectMode,"testCallQuality()"),Fy(this._callMachineInitialized,"testCallQuality()",null,!0),mx(this._callState,this._isPreparingToJoin,"testCallQuality()");var w=this._testCallAlreadyInProgress,C=function(ce){w||(g._testCallInProgress=ce)};if(C(!0),this.needsLoad())try{var q=this._callState;yield this.load(),this._callState=q}catch(ce){return C(!1),Promise.reject(ce)}return new Promise(function(ce){g.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:g.properties.dailyJsVersion},function(j){var U=j.results,ne=U.result,ge=d6(U,YM);if(ne==="failed"){var R,G=$t({},ge);(R=ge.error)!==null&&R!==void 0&&R.details?(ge.error.details=JSON.parse(ge.error.details),G.error=$t($t({},G.error),{},{details:$t({},G.error.details)}),G.error.details.duringTest="testCallQuality"):(G.error=G.error?$t({},G.error):{},G.error.details={duringTest:"testCallQuality"}),g._maybeSendToSentry(G)}C(!1),ce($t({result:ne},ge))})})}),function(){return N.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(O=tn(function*(g){var w;Dn()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),w=yield this.testPeerToPeerCallQuality(g)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),w=yield this.testCallQuality());var C={result:w.result,secondsElapsed:w.secondsElapsed};return w.data&&(C.data={maxRTT:w.data.maxRoundTripTime,packetLoss:w.data.avgRecvPacketLoss}),C}),function(g){return O.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(k=tn(function*(g){var w=this;if(yx(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(ce){return Promise.reject(ce)}var C=g.videoTrack,q=g.duration;if(!this._validateVideoTrackForNetworkTests(C))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=C,new Promise(function(ce,j){w.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:q},function(U){U.error?j(U.error):ce(U.results)})})}),function(g){return k.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){Dn()?(console.warn("stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead"),this.stopTestPeerToPeerCallQuality()):(console.warn("stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead"),this.stopTestCallQuality())}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(b=tn(function*(g){var w=this;if(yx(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(C){return Promise.reject(C)}if(!this._validateVideoTrackForNetworkTests(g))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=g,new Promise(function(C,q){w.sendMessageToCallMachine({action:"test-network-connectivity"},function(ce){ce.error?q(ce.error):C(ce.results)})})}),function(g){return b.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var g=this;return new Promise(function(w){g._callState===md?g.sendMessageToCallMachine({action:"get-cpu-load-stats"},function(C){w(C.cpuStats)}):w({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})})}},{key:"_validateEncodingLayerHasValidProperties",value:function(g){var w;if(!(((w=Object.keys(g))===null||w===void 0?void 0:w.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(px))}},{key:"_validateVideoSendSettings",value:function(g,w){var C=g==="screenVideo"?["default-screen-video","detail-optimized","motion-optimized","motion-and-detail-balanced"]:["default-video","bandwidth-optimized","bandwidth-and-quality-balanced","quality-optimized","adaptive-2-layers","adaptive-3-layers"],q="Video send settings should be either an object or one of the supported presets: ".concat(C.join());if(typeof w=="string"){if(!C.includes(w))throw new Error(q)}else{if(Un(w)!=="object")throw new Error(q);if(!w.maxQuality&&!w.encodings&&w.allowAdaptiveLayers===void 0)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(w.maxQuality&&["low","medium","high"].indexOf(w.maxQuality)===-1)throw new Error("maxQuality must be either low, medium or high");if(w.encodings){var ce=!1;switch(Object.keys(w.encodings).length){case 1:ce=!w.encodings.low;break;case 2:ce=!w.encodings.low||!w.encodings.medium;break;case 3:ce=!w.encodings.low||!w.encodings.medium||!w.encodings.high;break;default:ce=!0}if(ce)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");w.encodings.low&&this._validateEncodingLayerHasValidProperties(w.encodings.low),w.encodings.medium&&this._validateEncodingLayerHasValidProperties(w.encodings.medium),w.encodings.high&&this._validateEncodingLayerHasValidProperties(w.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(g){var w=this;if(!g||Object.keys(g).length===0)throw new Error("Send settings must contain at least information for one track!");Object.entries(g).forEach(function(C){var q=$a(C,2),ce=q[0],j=q[1];w._validateVideoSendSettings(ce,j)})}},{key:"updateSendSettings",value:function(g){var w=this;return this.validateUpdateSendSettings(g),this.needsLoad()?(this._preloadCache.sendSettings=g,{sendSettings:this._preloadCache.sendSettings}):new Promise(function(C,q){w.sendMessageToCallMachine({action:"update-send-settings",sendSettings:g},function(ce){ce.error?q(ce.error):C(ce.sendSettings)})})}},{key:"getSendSettings",value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:"getLocalAudioLevel",value:function(){return this._localAudioLevel}},{key:"getRemoteParticipantsAudioLevel",value:function(){return this._remoteParticipantsAudioLevel}},{key:"getActiveSpeaker",value:function(){return En(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(g){return En(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:g}),this}},{key:"activeSpeakerMode",value:function(){return En(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(g){return Kn(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=g,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:g}),this}},{key:"enumerateDevices",value:(x=tn(function*(){var g=this;if(this._callObjectMode){var w=yield navigator.mediaDevices.enumerateDevices();return vd()==="Firefox"&&$y().major>115&&$y().major<123&&(w=w.filter(function(C){return C.kind!=="audiooutput"})),{devices:w.map(function(C){var q=JSON.parse(JSON.stringify(C));if(!Dn()&&C.kind==="videoinput"&&C.getCapabilities){var ce,j=C.getCapabilities();q.facing=(j==null||(ce=j.facingMode)===null||ce===void 0?void 0:ce.length)>=1?j.facingMode[0]:void 0}return q})}}return new Promise(function(C){g.sendMessageToCallMachine({action:"enumerate-devices"},function(q){C({devices:q.devices})})})}),function(){return x.apply(this,arguments)})},{key:"sendAppMessage",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";if(Kn(this._callState,"sendAppMessage()"),JSON.stringify(g).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:g,to:w}),this}},{key:"addFakeParticipant",value:function(g){return En(),Kn(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine($t({action:"add-fake-participant"},g)),this}},{key:"setShowNamesMode",value:function(g){return Os(this._callObjectMode,"setShowNamesMode()"),En(),g&&g!=="always"&&g!=="never"?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:g}),this)}},{key:"setShowLocalVideo",value:function(){var g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Os(this._callObjectMode,"setShowLocalVideo()"),En(),Kn(this._callState,"setShowLocalVideo()"),typeof g!="boolean"?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:g}),this._showLocalVideo=g,this)}},{key:"showLocalVideo",value:function(){return Os(this._callObjectMode,"showLocalVideo()"),En(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Os(this._callObjectMode,"setShowParticipantsBar()"),En(),Kn(this._callState,"setShowParticipantsBar()"),typeof g!="boolean"?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:g}),this._showParticipantsBar=g,this)}},{key:"showParticipantsBar",value:function(){return Os(this._callObjectMode,"showParticipantsBar()"),En(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return En(),Os(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(g){return En(),Os(this._callObjectMode,"setCustomIntegrations()"),Kn(this._callState,"setCustomIntegrations()"),W4(g)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:g}),this._customIntegrations=g,this):this}},{key:"startCustomIntegrations",value:function(g){var w=this;if(En(),Os(this._callObjectMode,"startCustomIntegrations()"),Kn(this._callState,"startCustomIntegrations()"),Array.isArray(g)&&g.some(function(ce){return typeof ce!="string"})||!Array.isArray(g)&&typeof g!="string")return console.error("startCustomIntegrations() only accepts string | string[]"),this;var C=typeof g=="string"?[g]:g,q=C.filter(function(ce){return!(ce in w._customIntegrations)});return q.length?(console.error(`Can't find custom integration(s): "`.concat(q.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:C}),this)}},{key:"stopCustomIntegrations",value:function(g){var w=this;if(En(),Os(this._callObjectMode,"stopCustomIntegrations()"),Kn(this._callState,"stopCustomIntegrations()"),Array.isArray(g)&&g.some(function(ce){return typeof ce!="string"})||!Array.isArray(g)&&typeof g!="string")return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var C=typeof g=="string"?[g]:g,q=C.filter(function(ce){return!(ce in w._customIntegrations)});return q.length?(console.error(`Can't find custom integration(s): "`.concat(q.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:C}),this)}},{key:"customTrayButtons",value:function(){return Os(this._callObjectMode,"customTrayButtons()"),En(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(g){return Os(this._callObjectMode,"updateCustomTrayButtons()"),En(),Kn(this._callState,"updateCustomTrayButtons()"),J4(g)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:g}),this._customTrayButtons=g,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(Gy))),this)}},{key:"theme",value:function(){return Os(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(g){var w=this;return Os(this._callObjectMode,"setTheme()"),new Promise(function(C,q){try{w.validateProperties({theme:g}),w.properties.theme=$t({},g),w.sendMessageToCallMachine({action:"set-theme",theme:w.properties.theme});try{w.emitDailyJSEvent({action:E8,theme:w.properties.theme})}catch(ce){console.log("could not emit 'theme-updated'",ce)}C(w.properties.theme)}catch(ce){q(ce)}})}},{key:"requestFullscreen",value:(y=tn(function*(){if(En(),this._iframe&&!document.fullscreenElement&&r4())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(g){console.log("could not make video call fullscreen",g)}}),function(){return y.apply(this,arguments)})},{key:"exitFullscreen",value:function(){En(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(p=tn(function*(){var g=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise(function(w){g.sendMessageToCallMachine({action:"get-sidebar-view"},function(C){w(C.view)})})}),function(){return p.apply(this,arguments)})},{key:"setSidebarView",value:function(g){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:g}),this)}},{key:"room",value:(d=tn(function*(){var g=this,w=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,C=w===void 0||w;return this._accessState.access===tx||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise(function(q){g.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:C},function(ce){delete ce.action,delete ce.callbackStamp,q(ce)})})}),function(){return d.apply(this,arguments)})},{key:"geo",value:(c=tn(function*(){try{var g=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield g.json()).geo}}catch(w){return console.error("geo lookup failed",w),{current:""}}}),function(){return c.apply(this,arguments)})},{key:"setNetworkTopology",value:(o=tn(function*(g){var w=this;return En(),Kn(this._callState,"setNetworkTopology()"),new Promise(function(C,q){w.sendMessageToCallMachine({action:"set-network-topology",opts:g},function(ce){ce.error?q({error:ce.error}):C({workerId:ce.workerId})})})}),function(g){return o.apply(this,arguments)})},{key:"getNetworkTopology",value:(i=tn(function*(){var g=this;return new Promise(function(w,C){g.needsLoad()&&w({topology:"none"}),g.sendMessageToCallMachine({action:"get-network-topology"},function(q){q.error?C({error:q.error}):w({topology:q.topology})})})}),function(){return i.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(g){if(En(),typeof g!="number"&&g!==!0&&g!==!1)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(g));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:g})}},{key:"on",value:function(g,w){return my.prototype.on.call(this,g,w)}},{key:"once",value:function(g,w){return my.prototype.once.call(this,g,w)}},{key:"off",value:function(g,w){return my.prototype.off.call(this,g,w)}},{key:"validateProperties",value:function(g){var w,C;if(g!=null&&(w=g.dailyConfig)!==null&&w!==void 0&&w.userMediaAudioConstraints){var q,ce;Dn()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var j=g.inputSettings||{};j.audio=((q=g.inputSettings)===null||q===void 0?void 0:q.audio)||{},j.audio.settings=((ce=g.inputSettings)===null||ce===void 0||(ce=ce.audio)===null||ce===void 0?void 0:ce.settings)||{},j.audio.settings=$t($t({},j.audio.settings),g.dailyConfig.userMediaAudioConstraints),g.inputSettings=j,delete g.dailyConfig.userMediaAudioConstraints}if(g!=null&&(C=g.dailyConfig)!==null&&C!==void 0&&C.userMediaVideoConstraints){var U,ne;Dn()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var ge=g.inputSettings||{};ge.video=((U=g.inputSettings)===null||U===void 0?void 0:U.video)||{},ge.video.settings=((ne=g.inputSettings)===null||ne===void 0||(ne=ne.video)===null||ne===void 0?void 0:ne.settings)||{},ge.video.settings=$t($t({},ge.video.settings),g.dailyConfig.userMediaVideoConstraints),g.inputSettings=ge,delete g.dailyConfig.userMediaVideoConstraints}for(var R in g){if(!xd[R])throw new Error("unrecognized property '".concat(R,"'"));if(xd[R].validate&&!xd[R].validate(g[R],this))throw new Error("property '".concat(R,"': ").concat(xd[R].help))}}},{key:"assembleMeetingUrl",value:function(){var g,w,C=$t($t({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(g=this.properties.dailyConfig)!==null&&g!==void 0&&g.proxyUrl?encodeURIComponent((w=this.properties.dailyConfig)===null||w===void 0?void 0:w.proxyUrl):void 0}),q=C.url.match(/\?/)?"&":"?";return C.url+q+Object.keys(xd).filter(function(ce){return xd[ce].queryString&&C[ce]!==void 0}).map(function(ce){return"".concat(xd[ce].queryString,"=").concat(C[ce])}).join("&")}},{key:"needsLoad",value:function(){return[qw,Gw,yd,Bc].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(g,w){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(g,w,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(g){this._messageChannel.forwardPackagedMessageToCallMachine(g,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(g){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(g,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(g){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(g)}},{key:"handleMessageFromCallMachine",value:function(g){switch(g.action){case M8:this.sendMessageToCallMachine($t({action:A8},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var w={action:Py,level:"log",code:1011,stats:{event:"bundle load",time:this._bundleLoadTime==="no-op"?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime==="no-op",url:vy(this.properties.dailyConfig)}};this.sendMessageToCallMachine(w),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case Fw:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(g);break;case R8:var C,q=$t({},g);delete q.internal,this._maxAppMessageSize=((C=g.internal)===null||C===void 0?void 0:C._maxAppMessageSize)||nx,this._joinedCallback&&(this._joinedCallback(g.participants),this._joinedCallback=null),this.emitDailyJSEvent(q);break;case z8:case B8:if(this._callState===yd)return;if(g.participant&&g.participant.session_id){var ce=g.participant.local?"local":g.participant.session_id;if(this._callObjectMode){var j=this._callMachine().store;T4(g.participant,j),k4(g.participant,j),M4(g.participant,this._participants[ce],j)}try{this.maybeParticipantTracksStopped(this._participants[ce],g.participant),this.maybeParticipantTracksStarted(this._participants[ce],g.participant),this.maybeEventRecordingStopped(this._participants[ce],g.participant),this.maybeEventRecordingStarted(this._participants[ce],g.participant)}catch(be){console.error("track events error",be)}this.compareEqualForParticipantUpdateEvent(g.participant,this._participants[ce])||(this._participants[ce]=$t({},g.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(g))}break;case U8:if(g.participant&&g.participant.session_id){var U=this._participants[g.participant.session_id];U&&this.maybeParticipantTracksStopped(U,null),delete this._participants[g.participant.session_id],this.emitDailyJSEvent(g)}break;case H8:Ia(this._participantCounts,g.participantCounts)||(this._participantCounts=g.participantCounts,this.emitDailyJSEvent(g));break;case P8:var ne={access:g.access};g.awaitingAccess&&(ne.awaitingAccess=g.awaitingAccess),Ia(this._accessState,ne)||(this._accessState=ne,this.emitDailyJSEvent(g));break;case V8:if(g.meetingSession){this._meetingSessionSummary=g.meetingSession,this.emitDailyJSEvent(g);var ge=$t($t({},g),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(ge)}break;case Kw:var R;this._iframe&&!g.preserveIframe&&(this._iframe.src=""),this._updateCallState(Bc),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(g.errorMsg),this._loadedCallback=null),g.preserveIframe;var G=d6(g,XM);G!=null&&(R=G.error)!==null&&R!==void 0&&R.details&&(G.error.details=JSON.parse(G.error.details)),this._maybeSendToSentry(g),this._joinedCallback&&(this._joinedCallback(null,G),this._joinedCallback=null),this.emitDailyJSEvent(G);break;case N8:this._callState!==Bc&&this._updateCallState(yd),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(g);break;case"selected-devices-updated":g.devices&&this.emitDailyJSEvent(g);break;case dM:var ie=g.state,ue=g.threshold,de=g.quality,ye=ie.state,Se=ie.reasons;ye===this._network.networkState&&Ia(Se,this._network.networkStateReasons)&&ue===this._network.threshold&&de===this._network.quality||(this._network.networkState=ye,this._network.networkStateReasons=Se,this._network.quality=de,this._network.threshold=ue,g.networkState=ye,Se.length&&(g.networkStateReasons=Se),delete g.state,this.emitDailyJSEvent(g));break;case fM:g&&g.cpuLoadState&&this.emitDailyJSEvent(g);break;case pM:g&&g.faceCounts!==void 0&&this.emitDailyJSEvent(g);break;case cM:var Ce=g.activeSpeaker;this._activeSpeaker.peerId!==Ce.peerId&&(this._activeSpeaker.peerId=Ce.peerId,this.emitDailyJSEvent({action:g.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var Ae=g.show;this._showLocalVideo=Ae,this.emitDailyJSEvent({action:g.action,show:Ae});break;case uM:var Ne=g.enabled;this._activeSpeakerMode!==Ne&&(this._activeSpeakerMode=Ne,this.emitDailyJSEvent({action:g.action,enabled:this._activeSpeakerMode}));break;case I8:case q8:case G8:this._waitingParticipants=g.allWaitingParticipants,this.emitDailyJSEvent({action:g.action,participant:g.participant});break;case xM:Ia(this._receiveSettings,g.receiveSettings)||(this._receiveSettings=g.receiveSettings,this.emitDailyJSEvent({action:g.action,receiveSettings:g.receiveSettings}));break;case Jw:this._maybeUpdateInputSettings(g.inputSettings);break;case"send-settings-updated":Ia(this._sendSettings,g.sendSettings)||(this._sendSettings=g.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:g.action,sendSettings:g.sendSettings}));break;case"local-audio-level":this._localAudioLevel=g.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(g);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=g.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(g);break;case iM:var Re=g.session_id;this._rmpPlayerState[Re]=g.playerState,this.emitDailyJSEvent(g);break;case sM:delete this._rmpPlayerState[g.session_id],this.emitDailyJSEvent(g);break;case aM:var fe=g.session_id,pe=this._rmpPlayerState[fe];pe&&this.compareEqualForRMPUpdateEvent(pe,g.remoteMediaPlayerState)||(this._rmpPlayerState[fe]=g.remoteMediaPlayerState,this.emitDailyJSEvent(g));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(g);break;case $8:var ve=this._meetingSessionState.topology!==(g.meetingSessionState&&g.meetingSessionState.topology);this._meetingSessionState=bx(g.meetingSessionState,this._callObjectMode),(this._callObjectMode||ve)&&this.emitDailyJSEvent(g);break;case rM:this._isScreenSharing=!0,this.emitDailyJSEvent(g);break;case oM:case lM:this._isScreenSharing=!1,this.emitDailyJSEvent(g);break;case Zw:case Qw:case J8:case W8:case K8:case F8:case Z8:case Q8:case D8:case j8:case tM:case nM:case"test-completed":case hM:case eM:case gM:case mM:case yM:case vM:case Ww:case bM:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(g);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(g,w){var C="record";g&&(w.local||w[C]!==!1||g[C]===w[C]||this.emitDailyJSEvent({action:Qw}))}},{key:"maybeEventRecordingStarted",value:function(g,w){var C="record";g&&(w.local||w[C]!==!0||g[C]===w[C]||this.emitDailyJSEvent({action:Zw}))}},{key:"_trackStatePlayable",value:function(g){return!(!g||g.state!==S8)}},{key:"_trackChanged",value:function(g,w){return(g==null?void 0:g.id)!==(w==null?void 0:w.id)}},{key:"maybeEventTrackStopped",value:function(g,w,C){var q,ce,j=(q=w==null?void 0:w.tracks[g])!==null&&q!==void 0?q:null,U=(ce=C==null?void 0:C.tracks[g])!==null&&ce!==void 0?ce:null,ne=j==null?void 0:j.track;if(ne){var ge=this._trackStatePlayable(j),R=this._trackStatePlayable(U),G=this._trackChanged(ne,U==null?void 0:U.track);ge&&(R&&!G||this.emitDailyJSEvent({action:X8,track:ne,participant:C??w,type:g}))}}},{key:"maybeEventTrackStarted",value:function(g,w,C){var q,ce,j=(q=w==null?void 0:w.tracks[g])!==null&&q!==void 0?q:null,U=(ce=C==null?void 0:C.tracks[g])!==null&&ce!==void 0?ce:null,ne=U==null?void 0:U.track;if(ne){var ge=this._trackStatePlayable(j),R=this._trackStatePlayable(U),G=this._trackChanged(j==null?void 0:j.track,ne);R&&(ge&&!G||this.emitDailyJSEvent({action:Y8,track:ne,participant:C,type:g}))}}},{key:"maybeParticipantTracksStopped",value:function(g,w){if(g)for(var C in g.tracks)this.maybeEventTrackStopped(C,g,w)}},{key:"maybeParticipantTracksStarted",value:function(g,w){if(w)for(var C in w.tracks)this.maybeEventTrackStarted(C,g,w)}},{key:"compareEqualForRMPUpdateEvent",value:function(g,w){var C,q;return g.state===w.state&&((C=g.settings)===null||C===void 0?void 0:C.volume)===((q=w.settings)===null||q===void 0?void 0:q.volume)}},{key:"emitDailyJSEvent",value:function(g){try{g.callClientId=this.callClientId,this.emit(g.action,g)}catch(w){console.log("could not emit",g,w)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(g,w){return!!Ia(g,w)&&(!g.videoTrack||!w.videoTrack||g.videoTrack.id===w.videoTrack.id&&g.videoTrack.muted===w.videoTrack.muted&&g.videoTrack.enabled===w.videoTrack.enabled)&&(!g.audioTrack||!w.audioTrack||g.audioTrack.id===w.audioTrack.id&&g.audioTrack.muted===w.audioTrack.muted&&g.audioTrack.enabled===w.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return Dn()?typeof DailyNativeUtils>"u"?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(g){this._updateCallState(this._callState,g)}},{key:"_updateCallState",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(g!==this._callState||w!==this._isPreparingToJoin){var C=this._callState,q=this._isPreparingToJoin;this._callState=g,this._isPreparingToJoin=w;var ce=this._callState===md;this.updateShowAndroidOngoingMeetingNotification(ce);var j=Xy(C,q),U=Xy(this._callState,this._isPreparingToJoin);j!==U&&(this.updateKeepDeviceAwake(U),this.updateDeviceAudioMode(U),this.updateNoOpRecordingEnsuringBackgroundContinuity(U))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=P4,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:tx},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=bx(H4,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=nx,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(g){Dn()&&this.nativeUtils().setKeepDeviceAwake(g,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(g){if(Dn()&&!this.disableReactNativeAutoDeviceManagement("audio")){var w=g?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(w)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(g){if(Dn()&&this.nativeUtils().setShowOngoingMeetingNotification){var w,C,q,ce;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var j=this.properties.reactNativeConfig.androidInCallNotification;w=j.title,C=j.subtitle,q=j.iconName,ce=j.disableForCustomOverride}ce&&(g=!1),this.nativeUtils().setShowOngoingMeetingNotification(g,w,C,q,this.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(g){Dn()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(g)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var g;if(Dn()){var w=(g=this._callMachine())===null||g===void 0||(g=g.store)===null||g===void 0?void 0:g.getState();for(var C in w==null?void 0:w.streams){var q=w.streams[C];q&&q.pendingTrack&&q.pendingTrack.kind==="audio"&&(q.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(g){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[g]}},{key:"absoluteUrl",value:function(g){if(g!==void 0){var w=document.createElement("a");return w.href=g,w.href}}},{key:"sayHello",value:function(){var g="hello, world.";return console.log(g),g}},{key:"_logUseAfterDestroy",value:function(){var g=Object.values(bd)[0];if(this.needsLoad())if(g&&!g.needsLoad()){var w={action:Py,level:"error",code:this.strictMode?9995:9997};g.sendMessageToCallMachine(w)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.");else{var C={action:Py,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(C,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var g=0,w=Object.values(bd);g<w.length;g++){var C=w[g];C._callMachineInitialized?(C.sendMessageToCallMachine({action:Py,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),C._delayDuplicateInstanceLog=!1):C._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(g){var w,C,q,ce;if(!((w=g.error)!==null&&w!==void 0&&w.type&&(![k8,T8,Xw].includes(g.error.type)||g.error.type===Xw&&g.error.msg.includes("deleted")))){var j=(C=this.properties)!==null&&C!==void 0&&C.url?new URL(this.properties.url):void 0,U="production";j&&j.host.includes(".staging.daily")&&(U="staging");var ne,ge,R,G,ie,ue=function(Re){const fe=[V9(),H9(),f8(),d8(),v8(),x8(),G9(),b8()];return Re.autoSessionTracking!==!1&&fe.push(y8()),fe}({}).filter(function(Re){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(Re.name)}),de=new K9({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:a8,stackParser:u8,integrations:ue,environment:U}),ye=new zc;if(ye.setClient(de),de.init(),this.session_id&&ye.setExtra("sessionId",this.session_id),this.properties){var Se=$t({},this.properties);Se.userName=Se.userName?"[Filtered]":void 0,Se.userData=Se.userData?"[Filtered]":void 0,Se.token=Se.token?"[Filtered]":void 0,ye.setExtra("properties",Se)}if(j){var Ce=j.searchParams.get("domain");if(!Ce){var Ae=j.host.match(/(.*?)\./);Ce=Ae&&Ae[1]||""}Ce&&ye.setTag("domain",Ce)}g.error&&(ye.setTag("fatalErrorType",g.error.type),ye.setExtra("errorDetails",g.error.details),!((ne=g.error.details)===null||ne===void 0)&&ne.uri&&ye.setTag("serverAddress",g.error.details.uri),!((ge=g.error.details)===null||ge===void 0)&&ge.workerGroup&&ye.setTag("workerGroup",g.error.details.workerGroup),!((R=g.error.details)===null||R===void 0)&&R.geoGroup&&ye.setTag("geoGroup",g.error.details.geoGroup),!((G=g.error.details)===null||G===void 0)&&G.on&&ye.setTag("connectionAttempt",g.error.details.on),(ie=g.error.details)!==null&&ie!==void 0&&ie.bundleUrl&&(ye.setTag("bundleUrl",g.error.details.bundleUrl),ye.setTag("bundleError",g.error.details.sourceError.type))),ye.setTags({callMode:this._callObjectMode?Dn()?"reactNative":(q=this.properties)!==null&&q!==void 0&&(q=q.dailyConfig)!==null&&q!==void 0&&(q=q.callMode)!==null&&q!==void 0&&q.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:r.version()});var Ne=((ce=g.error)===null||ce===void 0?void 0:ce.msg)||g.errorMsg;ye.captureException(new Error(Ne))}}},{key:"_callMachine",value:function(){var g;return(g=window._daily)===null||g===void 0||(g=g.instances)===null||g===void 0||(g=g[this.callClientId])===null||g===void 0?void 0:g.callMachine}},{key:"_maybeUpdateInputSettings",value:function(g){if(!Ia(this._inputSettings,g)){var w=this._getInputSettings();this._inputSettings=g;var C=this._getInputSettings();Ia(w,C)||this.emitDailyJSEvent({action:Jw,inputSettings:C})}}}],[{key:"supportedBrowser",value:function(){if(Dn())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var g=o9.getParser(Ks());return{supported:!!c4(),mobile:g.getPlatformType()==="mobile",name:g.getBrowserName(),version:g.getBrowserVersion(),supportsFullscreen:!!r4(),supportsScreenShare:!!CM(),supportsSfu:!!c4(),supportsVideoProcessing:o4(),supportsAudioProcessing:l4()}}},{key:"version",value:function(){return"0.77.0"}},{key:"createCallObject",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return g.layout="none",new r(null,g)}},{key:"wrap",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(En(),!g||!g.contentWindow||typeof g.src!="string")throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return w.layout||(w.customLayout?w.layout="custom-v1":w.layout="browser"),new r(g,w)}},{key:"createFrame",value:function(g,w){var C,q;En(),g&&w?(C=g,q=w):g&&g.append?(C=g,q={}):(C=document.body,q=g||{});var ce=q.iframeStyle;ce||(ce=C===document.body?{position:"fixed",border:"1px solid black",backgroundColor:"white",width:"375px",height:"450px",right:"1em",bottom:"1em"}:{border:0,width:"100%",height:"100%"});var j=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?j.allow="microphone, camera":j.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",j.style.visibility="hidden",C.appendChild(j),j.style.visibility=null,Object.keys(ce).forEach(function(U){return j.style[U]=ce[U]}),q.layout||(q.customLayout?q.layout="custom-v1":q.layout="browser");try{return new r(j,q)}catch(U){throw C.removeChild(j),U}}},{key:"createTransparentFrame",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};En();var w=document.createElement("iframe");return w.allow="microphone; camera; autoplay",w.style.cssText=`
129
+ position: fixed;
130
+ top: 0;
131
+ left: 0;
132
+ width: 100%;
133
+ height: 100%;
134
+ border: 0;
135
+ pointer-events: none;
136
+ `,document.body.appendChild(w),g.layout||(g.layout="custom-v1"),r.wrap(w,g)}},{key:"getCallInstance",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return g?bd[g]:Object.values(bd)[0]}}]);var i,o,c,d,p,y,x,b,k,O,N,Z,J,D,F,ae,ee,B,Y,$,Q,z,V,le,se,K,L,X,H,A,S,T,E,P,te,_,re,me}();function gf(r,i){var o={};for(var c in r)if(r[c]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",c),o[c]=kl;else if(c==="dailyConfig"){if(r[c].modifyLocalSdpHook){var d=window._daily.instances[i].customCallbacks||{};d.modifyLocalSdpHook=r[c].modifyLocalSdpHook,window._daily.instances[i].customCallbacks=d,delete r[c].modifyLocalSdpHook}if(r[c].modifyRemoteSdpHook){var p=window._daily.instances[i].customCallbacks||{};p.modifyRemoteSdpHook=r[c].modifyRemoteSdpHook,window._daily.instances[i].customCallbacks=p,delete r[c].modifyRemoteSdpHook}o[c]=r[c]}else o[c]=r[c];return o}function Kn(r){var i=arguments.length>2?arguments[2]:void 0;if(r!==md){var o="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw i&&(o+=" ".concat(i)),console.error(o),new Error(o)}}function Xy(r,i){return[ex,md].includes(r)||i}function mx(r,i){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"This daily-js method",c=arguments.length>3?arguments[3]:void 0;if(Xy(r,i)){var d="".concat(o," not supported after joining a meeting.");throw c&&(d+=" ".concat(c)),console.error(d),new Error(d)}}function Fy(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method",o=arguments.length>2?arguments[2]:void 0;if(!r){var c="".concat(i,arguments.length>3&&arguments[3]!==void 0&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw o&&(c+=" ".concat(o)),console.error(c),new Error(c)}}function yx(r){if(r){var i="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(i),new Error(i)}}function Gr(r){if(!r){var i="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(i),new Error(i)}}function Os(r){if(r){var i="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(i),new Error(i)}}function En(){if(Dn())throw new Error("This daily-js method is not currently supported in React Native")}function im(){if(!Dn())throw new Error("This daily-js method is only supported in React Native")}function q4(r){if(r===void 0)return!0;var i;if(typeof r=="string")i=r;else try{i=JSON.stringify(r),Ia(JSON.parse(i),r)||console.warn("The userData provided will be modified when serialized.")}catch(o){throw Error("userData must be serializable to JSON: ".concat(o))}if(i.length>4096)throw Error("userData is too large (".concat(i.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function G4(r,i){for(var o=i.allowAllParticipantsKey,c=function(N){var Z=["local"];return o||Z.push("*"),N&&!Z.includes(N)},d=function(N){return!!(N.layer===void 0||Number.isInteger(N.layer)&&N.layer>=0||N.layer==="inherit")},p=function(N){return!!N&&!(N.video&&!d(N.video))&&!(N.screenVideo&&!d(N.screenVideo))},y=0,x=Object.entries(r);y<x.length;y++){var b=$a(x[y],2),k=b[0],O=b[1];if(!c(k)||!p(O))return!1}return!0}function Y4(r){if(Un(r)!=="object")return!1;for(var i=0,o=Object.entries(r);i<o.length;i++){var c=$a(o[i],2),d=c[0],p=c[1];switch(d){case"video":if(Un(p)!=="object")return!1;for(var y=0,x=Object.entries(p);y<x.length;y++){var b=$a(x[y],2),k=b[0],O=b[1];switch(k){case"processor":if(!JM(O))return!1;break;case"settings":if(!F4(O))return!1;break;default:return!1}}break;case"audio":if(Un(p)!=="object")return!1;for(var N=0,Z=Object.entries(p);N<Z.length;N++){var J=$a(Z[N],2),D=J[0],F=J[1];switch(D){case"processor":if(!QM(F))return!1;break;case"settings":if(!F4(F))return!1;break;default:return!1}}break;default:return!1}}return!0}function X4(r,i,o){var c,d=[];r.video&&r.video.processor&&(o4((c=i==null?void 0:i.useLegacyVideoProcessor)!==null&&c!==void 0&&c)||(r.video.settings?delete r.video.processor:delete r.video,d.push("video"))),r.audio&&r.audio.processor&&(l4()||(r.audio.settings?delete r.audio.processor:delete r.audio,d.push("audio"))),d.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(d.join(", "))),r.audio&&r.audio.settings&&(r.audio.settings.customTrack?(o.audioTrack=r.audio.settings.customTrack,r.audio.settings={customTrack:kl}):delete o.audioTrack),r.video&&r.video.settings&&(r.video.settings.customTrack?(o.videoTrack=r.video.settings.customTrack,r.video.settings={customTrack:kl}):delete o.videoTrack)}function QM(r){if(Dn())return console.warn("Video processing is not yet supported in React Native"),!1;var i=["type"];return!!r&&Un(r)==="object"&&(Object.keys(r).filter(function(o){return!i.includes(o)}).forEach(function(o){console.warn("invalid key inputSettings -> audio -> processor : ".concat(o)),delete r[o]}),!!function(o){return typeof o!="string"?!1:Object.values(i4).includes(o)?!0:(console.error("inputSettings audio processor type invalid"),!1)}(r.type))}function JM(r){if(Dn())return console.warn("Video processing is not yet supported in React Native"),!1;var i=["type","config"];return!r||Un(r)!=="object"||!function(o){return typeof o!="string"?!1:Object.values(Vy).includes(o)?!0:(console.error("inputSettings video processor type invalid"),!1)}(r.type)||r.config&&(Un(r.config)!=="object"||!function(o,c){var d=Object.keys(c);if(d.length===0)return!0;var p="invalid object in inputSettings -> video -> processor -> config";switch(o){case Vy.BGBLUR:return d.length>1||d[0]!=="strength"?(console.error(p),!1):!(typeof c.strength!="number"||c.strength<=0||c.strength>1||isNaN(c.strength))||(console.error("".concat(p,"; expected: {0 < strength <= 1}, got: ").concat(c.strength)),!1);case Vy.BGIMAGE:return!(c.source!==void 0&&!function(y){if(y.source==="default")return y.type="default",!0;if(y.source instanceof ArrayBuffer)return!0;if(by(y.source))return y.type="url",!!function(k){var O=new URL(k),N=O.pathname;if(O.protocol==="data:")try{var Z=N.substring(N.indexOf(":")+1,N.indexOf(";")).split("/")[1];return sx.includes(Z)}catch(D){return console.error("failed to deduce blob content type",D),!1}var J=N.split(".").at(-1).toLowerCase().trim();return sx.includes(J)}(y.source)||(console.error("invalid image type; supported types: [".concat(sx.join(", "),"]")),!1);return x=y.source,b=Number(x),isNaN(b)||!Number.isInteger(b)||b<=0||b>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(y.type="daily-preselect",!0);var x,b}(c));default:return!0}}(r.type,r.config))?!1:(Object.keys(r).filter(function(o){return!i.includes(o)}).forEach(function(o){console.warn("invalid key inputSettings -> video -> processor : ".concat(o)),delete r[o]}),!0)}function F4(r){return Un(r)==="object"&&(!r.customTrack||r.customTrack instanceof MediaStreamTrack)}function vx(){var r=Object.values(Vy).join(" | "),i=Object.values(i4).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(r," ], config?: {} } }, audio?: { processor: {type: [ ").concat(i," ] } } }")}function Z4(r){var i=r.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(C8).concat(i?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function Q4(){return"customIntegrations should be an object of type ".concat(JSON.stringify(gx),".")}function J4(r){if(r&&Un(r)!=="object"||Array.isArray(r))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(Gy),".")),!1;if(r)for(var i=0,o=Object.entries(r);i<o.length;i++)for(var c=$a(o[i],1)[0],d=0,p=Object.entries(r[c]);d<p.length;d++){var y=$a(p[d],2),x=y[0],b=y[1],k=Gy.id[x];if(!k)return console.error("customTrayButton does not support key ".concat(x)),!1;switch(x){case"iconPath":case"iconPathDarkMode":if(!by(b))return console.error("customTrayButton ".concat(x," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(b))return console.error("customTrayButton ".concat(x," should be ").concat(k,". Got: ").concat(b)),!1;break;default:if(Un(b)!==k)return console.error("customTrayButton ".concat(x," should be a ").concat(k,".")),!1}}return!0}function W4(r){if(!r||r&&Un(r)!=="object"||Array.isArray(r))return console.error(Q4()),!1;for(var i=function(N){return"".concat(N," should be ").concat(gx.id[N])},o=function(N,Z){return console.error("customIntegration ".concat(N,": ").concat(Z))},c=0,d=Object.entries(r);c<d.length;c++){var p=$a(d[c],1)[0];if(!("label"in r[p]))return o(p,"label is required"),!1;if(!("location"in r[p]))return o(p,"location is required"),!1;if(!("src"in r[p])&&!("srcdoc"in r[p]))return o(p,"src or srcdoc is required"),!1;for(var y=0,x=Object.entries(r[p]);y<x.length;y++){var b=$a(x[y],2),k=b[0],O=b[1];switch(k){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if(typeof O!="string")return o(p,i(k)),!1;break;case"iconURL":if(!by(O))return o(p,"".concat(k," should be a url")),!1;break;case"src":if("srcdoc"in r[p])return o(p,"cannot have both src and srcdoc"),!1;if(!by(O))return o(p,'src "'.concat(O,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in r[p])return o(p,"cannot have both src and srcdoc"),!1;if(typeof O!="string")return o(p,i(k)),!1;break;case"location":if(!["main","sidebar"].includes(O))return o(p,i(k)),!1;break;case"controlledBy":if(O!=="*"&&O!=="owners"&&(!Array.isArray(O)||O.some(function(N){return typeof N!="string"})))return o(p,i(k)),!1;break;case"shared":if((!Array.isArray(O)||O.some(function(N){return typeof N!="string"}))&&O!=="owners"&&typeof O!="boolean")return o(p,i(k)),!1;break;default:if(!gx.id[k])return console.error("customIntegration does not support key ".concat(k)),!1}}}return!0}function K4(r,i){if(i===void 0)return!1;switch(Un(i)){case"string":return Un(r)===i;case"object":if(Un(r)!=="object")return!1;for(var o in r)if(!K4(r[o],i[o]))return!1;return!0;default:return!1}}function eC(r,i){var o=r.sessionId,c=r.toEndPoint,d=r.callerId,p=r.useSipRefer;if(!o||!c)throw new Error("".concat(i,"() requires a sessionId and toEndPoint"));if(typeof o!="string"||typeof c!="string")throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(p&&!c.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!c.startsWith("sip:")&&!c.startsWith("+"))throw new Error("toEndPoint: ".concat(c,' must starts with either "sip:" or "+"'));if(d&&typeof d!="string")throw new Error("callerId must be of type string");if(d&&!c.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function tC(r){if(Un(r)!=="object")throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(r.state&&!Object.values(ax).includes(r.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(ax));if(r.volume){if(typeof r.volume!="number")throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(r.volume<0||r.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function nC(r,i,o){return!(typeof r!="number"||r<i||r>o)}function bx(r,i){return r&&!i&&delete r.data,r}function WM(r){return r&&r.__esModule?r.default:r}function iC(r,i,o,c){Object.defineProperty(r,i,{get:o,set:c,enumerable:!0,configurable:!0})}var aC={};iC(aC,"DailyRTVIMessageType",()=>am),iC(aC,"DailyTransport",()=>Pc);class Yr{static floatTo16BitPCM(i){const o=new ArrayBuffer(i.length*2),c=new DataView(o);let d=0;for(let p=0;p<i.length;p++,d+=2){let y=Math.max(-1,Math.min(1,i[p]));c.setInt16(d,y<0?y*32768:y*32767,!0)}return o}static mergeBuffers(i,o){const c=new Uint8Array(i.byteLength+o.byteLength);return c.set(new Uint8Array(i),0),c.set(new Uint8Array(o),i.byteLength),c.buffer}_packData(i,o){return[new Uint8Array([o,o>>8]),new Uint8Array([o,o>>8,o>>16,o>>24])][i]}pack(i,o){if(o!=null&&o.bitsPerSample)if(o!=null&&o.channels){if(!(o!=null&&o.data))throw new Error('Missing "data"')}else throw new Error('Missing "channels"');else throw new Error('Missing "bitsPerSample"');const{bitsPerSample:c,channels:d,data:p}=o,y=["RIFF",this._packData(1,52),"WAVE","fmt ",this._packData(1,16),this._packData(0,1),this._packData(0,d.length),this._packData(1,i),this._packData(1,i*d.length*c/8),this._packData(0,d.length*c/8),this._packData(0,c),"data",this._packData(1,d[0].length*d.length*c/8),p],x=new Blob(y,{type:"audio/mpeg"}),b=URL.createObjectURL(x);return{blob:x,url:b,channelCount:d.length,sampleRate:i,duration:p.byteLength/(d.length*i*2)}}}globalThis.WavPacker=Yr;const sC=[4186.01,4434.92,4698.63,4978.03,5274.04,5587.65,5919.91,6271.93,6644.88,7040,7458.62,7902.13],KM=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],Hc=[],xx=[];for(let r=1;r<=8;r++)for(let i=0;i<sC.length;i++){const o=sC[i];Hc.push(o/Math.pow(2,8-r)),xx.push(KM[i]+r)}const Zy=[32,2e3],rC=Hc.filter((r,i)=>Hc[i]>Zy[0]&&Hc[i]<Zy[1]),eA=xx.filter((r,i)=>Hc[i]>Zy[0]&&Hc[i]<Zy[1]);class mf{static getFrequencies(i,o,c,d="frequency",p=-100,y=-30){c||(c=new Float32Array(i.frequencyBinCount),i.getFloatFrequencyData(c));const x=o/2,b=1/c.length*x;let k,O,N;if(d==="music"||d==="voice"){const D=d==="voice"?rC:Hc,F=Array(D.length).fill(p);for(let ae=0;ae<c.length;ae++){const ee=ae*b,B=c[ae];for(let Y=D.length-1;Y>=0;Y--)if(ee>D[Y]){F[Y]=Math.max(F[Y],B);break}}k=F,O=d==="voice"?rC:Hc,N=d==="voice"?eA:xx}else k=Array.from(c),O=k.map((D,F)=>b*F),N=O.map(D=>`${D.toFixed(2)} Hz`);const Z=k.map(D=>Math.max(0,Math.min((D-p)/(y-p),1)));return{values:new Float32Array(Z),frequencies:O,labels:N}}constructor(i,o=null){if(this.fftResults=[],o){const{length:c,sampleRate:d}=o,p=new OfflineAudioContext({length:c,sampleRate:d}),y=p.createBufferSource();y.buffer=o;const x=p.createAnalyser();x.fftSize=8192,x.smoothingTimeConstant=.1,y.connect(x);const b=1/60,k=c/d,O=N=>{const Z=b*N;Z<k&&p.suspend(Z).then(()=>{const J=new Float32Array(x.frequencyBinCount);x.getFloatFrequencyData(J),this.fftResults.push(J),O(N+1)}),N===1?p.startRendering():p.resume()};y.start(0),O(1),this.audio=i,this.context=p,this.analyser=x,this.sampleRate=d,this.audioBuffer=o}else{const c=new AudioContext,d=c.createMediaElementSource(i),p=c.createAnalyser();p.fftSize=8192,p.smoothingTimeConstant=.1,d.connect(p),p.connect(c.destination),this.audio=i,this.context=c,this.analyser=p,this.sampleRate=this.context.sampleRate,this.audioBuffer=null}}getFrequencies(i="frequency",o=-100,c=-30){let d=null;if(this.audioBuffer&&this.fftResults.length){const p=this.audio.currentTime/this.audio.duration,y=Math.min(p*this.fftResults.length|0,this.fftResults.length-1);d=this.fftResults[y]}return mf.getFrequencies(this.analyser,this.sampleRate,d,i,o,c)}async resumeIfSuspended(){return this.context.state==="suspended"&&await this.context.resume(),!0}}globalThis.AudioAnalysis=mf;const tA=`
137
+ class StreamProcessor extends AudioWorkletProcessor {
138
+ constructor() {
139
+ super();
140
+ this.hasStarted = false;
141
+ this.hasInterrupted = false;
142
+ this.outputBuffers = [];
143
+ this.bufferLength = 128;
144
+ this.write = { buffer: new Float32Array(this.bufferLength), trackId: null };
145
+ this.writeOffset = 0;
146
+ this.trackSampleOffsets = {};
147
+ this.port.onmessage = (event) => {
148
+ if (event.data) {
149
+ const payload = event.data;
150
+ if (payload.event === 'write') {
151
+ const int16Array = payload.buffer;
152
+ const float32Array = new Float32Array(int16Array.length);
153
+ for (let i = 0; i < int16Array.length; i++) {
154
+ float32Array[i] = int16Array[i] / 0x8000; // Convert Int16 to Float32
155
+ }
156
+ this.writeData(float32Array, payload.trackId);
157
+ } else if (
158
+ payload.event === 'offset' ||
159
+ payload.event === 'interrupt'
160
+ ) {
161
+ const requestId = payload.requestId;
162
+ const trackId = this.write.trackId;
163
+ const offset = this.trackSampleOffsets[trackId] || 0;
164
+ this.port.postMessage({
165
+ event: 'offset',
166
+ requestId,
167
+ trackId,
168
+ offset,
169
+ });
170
+ if (payload.event === 'interrupt') {
171
+ this.hasInterrupted = true;
172
+ }
173
+ } else {
174
+ throw new Error(\`Unhandled event "\${payload.event}"\`);
175
+ }
176
+ }
177
+ };
178
+ }
179
+
180
+ writeData(float32Array, trackId = null) {
181
+ let { buffer } = this.write;
182
+ let offset = this.writeOffset;
183
+ for (let i = 0; i < float32Array.length; i++) {
184
+ buffer[offset++] = float32Array[i];
185
+ if (offset >= buffer.length) {
186
+ this.outputBuffers.push(this.write);
187
+ this.write = { buffer: new Float32Array(this.bufferLength), trackId };
188
+ buffer = this.write.buffer;
189
+ offset = 0;
190
+ }
191
+ }
192
+ this.writeOffset = offset;
193
+ return true;
194
+ }
195
+
196
+ process(inputs, outputs, parameters) {
197
+ const output = outputs[0];
198
+ const outputChannelData = output[0];
199
+ const outputBuffers = this.outputBuffers;
200
+ if (this.hasInterrupted) {
201
+ this.port.postMessage({ event: 'stop' });
202
+ return false;
203
+ } else if (outputBuffers.length) {
204
+ this.hasStarted = true;
205
+ const { buffer, trackId } = outputBuffers.shift();
206
+ for (let i = 0; i < outputChannelData.length; i++) {
207
+ outputChannelData[i] = buffer[i] || 0;
208
+ }
209
+ if (trackId) {
210
+ this.trackSampleOffsets[trackId] =
211
+ this.trackSampleOffsets[trackId] || 0;
212
+ this.trackSampleOffsets[trackId] += buffer.length;
213
+ }
214
+ return true;
215
+ } else if (this.hasStarted) {
216
+ this.port.postMessage({ event: 'stop' });
217
+ return false;
218
+ } else {
219
+ return true;
220
+ }
221
+ }
222
+ }
223
+
224
+ registerProcessor('stream_processor', StreamProcessor);
225
+ `,nA=new Blob([tA],{type:"application/javascript"}),iA=URL.createObjectURL(nA);class aA{constructor({sampleRate:i=44100}={}){this.scriptSrc=iA,this.sampleRate=i,this.context=null,this.stream=null,this.analyser=null,this.trackSampleOffsets={},this.interruptedTrackIds={}}async connect(){this.context=new AudioContext({sampleRate:this.sampleRate}),this._speakerID&&this.context.setSinkId(this._speakerID),this.context.state==="suspended"&&await this.context.resume();try{await this.context.audioWorklet.addModule(this.scriptSrc)}catch(o){throw console.error(o),new Error(`Could not add audioWorklet module: ${this.scriptSrc}`)}const i=this.context.createAnalyser();return i.fftSize=8192,i.smoothingTimeConstant=.1,this.analyser=i,!0}getFrequencies(i="frequency",o=-100,c=-30){if(!this.analyser)throw new Error("Not connected, please call .connect() first");return mf.getFrequencies(this.analyser,this.sampleRate,null,i,o,c)}async updateSpeaker(i){const o=this._speakerID;if(this._speakerID=i,this.context)try{i==="default"?await this.context.setSinkId():await this.context.setSinkId(i)}catch(c){console.error(`Could not set sinkId to ${i}: ${c}`),this._speakerID=o}}_start(){const i=new AudioWorkletNode(this.context,"stream_processor");return i.connect(this.context.destination),i.port.onmessage=o=>{const{event:c}=o.data;if(c==="stop")i.disconnect(),this.stream=null;else if(c==="offset"){const{requestId:d,trackId:p,offset:y}=o.data,x=y/this.sampleRate;this.trackSampleOffsets[d]={trackId:p,offset:y,currentTime:x}}},this.analyser.disconnect(),i.connect(this.analyser),this.stream=i,!0}add16BitPCM(i,o="default"){if(typeof o!="string")throw new Error("trackId must be a string");if(this.interruptedTrackIds[o])return;this.stream||this._start();let c;if(i instanceof Int16Array)c=i;else if(i instanceof ArrayBuffer)c=new Int16Array(i);else throw new Error("argument must be Int16Array or ArrayBuffer");return this.stream.port.postMessage({event:"write",buffer:c,trackId:o}),c}async getTrackSampleOffset(i=!1){if(!this.stream)return null;const o=crypto.randomUUID();this.stream.port.postMessage({event:i?"interrupt":"offset",requestId:o});let c;for(;!c;)c=this.trackSampleOffsets[o],await new Promise(p=>setTimeout(()=>p(),1));const{trackId:d}=c;return i&&d&&(this.interruptedTrackIds[d]=!0),c}async interrupt(){return this.getTrackSampleOffset(!0)}}globalThis.WavStreamPlayer=aA;const sA=`
226
+ class AudioProcessor extends AudioWorkletProcessor {
227
+
228
+ constructor() {
229
+ super();
230
+ this.port.onmessage = this.receive.bind(this);
231
+ this.initialize();
232
+ }
233
+
234
+ initialize() {
235
+ this.foundAudio = false;
236
+ this.recording = false;
237
+ this.chunks = [];
238
+ }
239
+
240
+ /**
241
+ * Concatenates sampled chunks into channels
242
+ * Format is chunk[Left[], Right[]]
243
+ */
244
+ readChannelData(chunks, channel = -1, maxChannels = 9) {
245
+ let channelLimit;
246
+ if (channel !== -1) {
247
+ if (chunks[0] && chunks[0].length - 1 < channel) {
248
+ throw new Error(
249
+ \`Channel \${channel} out of range: max \${chunks[0].length}\`
250
+ );
251
+ }
252
+ channelLimit = channel + 1;
253
+ } else {
254
+ channel = 0;
255
+ channelLimit = Math.min(chunks[0] ? chunks[0].length : 1, maxChannels);
256
+ }
257
+ const channels = [];
258
+ for (let n = channel; n < channelLimit; n++) {
259
+ const length = chunks.reduce((sum, chunk) => {
260
+ return sum + chunk[n].length;
261
+ }, 0);
262
+ const buffers = chunks.map((chunk) => chunk[n]);
263
+ const result = new Float32Array(length);
264
+ let offset = 0;
265
+ for (let i = 0; i < buffers.length; i++) {
266
+ result.set(buffers[i], offset);
267
+ offset += buffers[i].length;
268
+ }
269
+ channels[n] = result;
270
+ }
271
+ return channels;
272
+ }
273
+
274
+ /**
275
+ * Combines parallel audio data into correct format,
276
+ * channels[Left[], Right[]] to float32Array[LRLRLRLR...]
277
+ */
278
+ formatAudioData(channels) {
279
+ if (channels.length === 1) {
280
+ // Simple case is only one channel
281
+ const float32Array = channels[0].slice();
282
+ const meanValues = channels[0].slice();
283
+ return { float32Array, meanValues };
284
+ } else {
285
+ const float32Array = new Float32Array(
286
+ channels[0].length * channels.length
287
+ );
288
+ const meanValues = new Float32Array(channels[0].length);
289
+ for (let i = 0; i < channels[0].length; i++) {
290
+ const offset = i * channels.length;
291
+ let meanValue = 0;
292
+ for (let n = 0; n < channels.length; n++) {
293
+ float32Array[offset + n] = channels[n][i];
294
+ meanValue += channels[n][i];
295
+ }
296
+ meanValues[i] = meanValue / channels.length;
297
+ }
298
+ return { float32Array, meanValues };
299
+ }
300
+ }
301
+
302
+ /**
303
+ * Converts 32-bit float data to 16-bit integers
304
+ */
305
+ floatTo16BitPCM(float32Array) {
306
+ const buffer = new ArrayBuffer(float32Array.length * 2);
307
+ const view = new DataView(buffer);
308
+ let offset = 0;
309
+ for (let i = 0; i < float32Array.length; i++, offset += 2) {
310
+ let s = Math.max(-1, Math.min(1, float32Array[i]));
311
+ view.setInt16(offset, s < 0 ? s * 0x8000 : s * 0x7fff, true);
312
+ }
313
+ return buffer;
314
+ }
315
+
316
+ /**
317
+ * Retrieves the most recent amplitude values from the audio stream
318
+ * @param {number} channel
319
+ */
320
+ getValues(channel = -1) {
321
+ const channels = this.readChannelData(this.chunks, channel);
322
+ const { meanValues } = this.formatAudioData(channels);
323
+ return { meanValues, channels };
324
+ }
325
+
326
+ /**
327
+ * Exports chunks as an audio/wav file
328
+ */
329
+ export() {
330
+ const channels = this.readChannelData(this.chunks);
331
+ const { float32Array, meanValues } = this.formatAudioData(channels);
332
+ const audioData = this.floatTo16BitPCM(float32Array);
333
+ return {
334
+ meanValues: meanValues,
335
+ audio: {
336
+ bitsPerSample: 16,
337
+ channels: channels,
338
+ data: audioData,
339
+ },
340
+ };
341
+ }
342
+
343
+ receive(e) {
344
+ const { event, id } = e.data;
345
+ let receiptData = {};
346
+ switch (event) {
347
+ case 'start':
348
+ this.recording = true;
349
+ break;
350
+ case 'stop':
351
+ this.recording = false;
352
+ break;
353
+ case 'clear':
354
+ this.initialize();
355
+ break;
356
+ case 'export':
357
+ receiptData = this.export();
358
+ break;
359
+ case 'read':
360
+ receiptData = this.getValues();
361
+ break;
362
+ default:
363
+ break;
364
+ }
365
+ // Always send back receipt
366
+ this.port.postMessage({ event: 'receipt', id, data: receiptData });
367
+ }
368
+
369
+ sendChunk(chunk) {
370
+ const channels = this.readChannelData([chunk]);
371
+ const { float32Array, meanValues } = this.formatAudioData(channels);
372
+ const rawAudioData = this.floatTo16BitPCM(float32Array);
373
+ const monoAudioData = this.floatTo16BitPCM(meanValues);
374
+ this.port.postMessage({
375
+ event: 'chunk',
376
+ data: {
377
+ mono: monoAudioData,
378
+ raw: rawAudioData,
379
+ },
380
+ });
381
+ }
382
+
383
+ process(inputList, outputList, parameters) {
384
+ // Copy input to output (e.g. speakers)
385
+ // Note that this creates choppy sounds with Mac products
386
+ const sourceLimit = Math.min(inputList.length, outputList.length);
387
+ for (let inputNum = 0; inputNum < sourceLimit; inputNum++) {
388
+ const input = inputList[inputNum];
389
+ const output = outputList[inputNum];
390
+ const channelCount = Math.min(input.length, output.length);
391
+ for (let channelNum = 0; channelNum < channelCount; channelNum++) {
392
+ input[channelNum].forEach((sample, i) => {
393
+ output[channelNum][i] = sample;
394
+ });
395
+ }
396
+ }
397
+ const inputs = inputList[0];
398
+ // There's latency at the beginning of a stream before recording starts
399
+ // Make sure we actually receive audio data before we start storing chunks
400
+ let sliceIndex = 0;
401
+ if (!this.foundAudio) {
402
+ for (const channel of inputs) {
403
+ sliceIndex = 0; // reset for each channel
404
+ if (this.foundAudio) {
405
+ break;
406
+ }
407
+ if (channel) {
408
+ for (const value of channel) {
409
+ if (value !== 0) {
410
+ // find only one non-zero entry in any channel
411
+ this.foundAudio = true;
412
+ break;
413
+ } else {
414
+ sliceIndex++;
415
+ }
416
+ }
417
+ }
418
+ }
419
+ }
420
+ if (inputs && inputs[0] && this.foundAudio && this.recording) {
421
+ // We need to copy the TypedArray, because the \`process\`
422
+ // internals will reuse the same buffer to hold each input
423
+ const chunk = inputs.map((input) => input.slice(sliceIndex));
424
+ this.chunks.push(chunk);
425
+ this.sendChunk(chunk);
426
+ }
427
+ return true;
428
+ }
429
+ }
430
+
431
+ registerProcessor('audio_processor', AudioProcessor);
432
+ `,rA=new Blob([sA],{type:"application/javascript"}),oC=URL.createObjectURL(rA);class oA{constructor({sampleRate:i=44100,outputToSpeakers:o=!1,debug:c=!1}={}){this.scriptSrc=oC,this.sampleRate=i,this.outputToSpeakers=o,this.debug=!!c,this._deviceChangeCallback=null,this._devices=[],this.deviceSelection=null,this.stream=null,this.processor=null,this.source=null,this.node=null,this.recording=!1,this._lastEventId=0,this.eventReceipts={},this.eventTimeout=5e3,this._chunkProcessor=()=>{},this._chunkProcessorSize=void 0,this._chunkProcessorBuffer={raw:new ArrayBuffer(0),mono:new ArrayBuffer(0)}}static async decode(i,o=44100,c=-1){const d=new AudioContext({sampleRate:o});let p,y;if(i instanceof Blob){if(c!==-1)throw new Error('Can not specify "fromSampleRate" when reading from Blob');y=i,p=await y.arrayBuffer()}else if(i instanceof ArrayBuffer){if(c!==-1)throw new Error('Can not specify "fromSampleRate" when reading from ArrayBuffer');p=i,y=new Blob([p],{type:"audio/wav"})}else{let O,N;if(i instanceof Int16Array){N=i,O=new Float32Array(i.length);for(let F=0;F<i.length;F++)O[F]=i[F]/32768}else if(i instanceof Float32Array)O=i;else if(i instanceof Array)O=new Float32Array(i);else throw new Error('"audioData" must be one of: Blob, Float32Arrray, Int16Array, ArrayBuffer, Array<number>');if(c===-1)throw new Error('Must specify "fromSampleRate" when reading from Float32Array, In16Array or Array');if(c<3e3)throw new Error('Minimum "fromSampleRate" is 3000 (3kHz)');N||(N=Yr.floatTo16BitPCM(O));const Z={bitsPerSample:16,channels:[O],data:N};y=new Yr().pack(c,Z).blob,p=await y.arrayBuffer()}const x=await d.decodeAudioData(p),b=x.getChannelData(0),k=URL.createObjectURL(y);return{blob:y,url:k,values:b,audioBuffer:x}}log(){return this.debug&&this.log(...arguments),!0}getSampleRate(){return this.sampleRate}getStatus(){return this.processor?this.recording?"recording":"paused":"ended"}async _event(i,o={},c=null){if(c=c||this.processor,!c)throw new Error("Can not send events without recording first");const d={event:i,id:this._lastEventId++,data:o};c.port.postMessage(d);const p=new Date().valueOf();for(;!this.eventReceipts[d.id];){if(new Date().valueOf()-p>this.eventTimeout)throw new Error(`Timeout waiting for "${i}" event`);await new Promise(x=>setTimeout(()=>x(!0),1))}const y=this.eventReceipts[d.id];return delete this.eventReceipts[d.id],y}listenForDeviceChange(i){if(i===null&&this._deviceChangeCallback)navigator.mediaDevices.removeEventListener("devicechange",this._deviceChangeCallback),this._deviceChangeCallback=null;else if(i!==null){let o=0,c=[];const d=y=>y.map(x=>x.deviceId).sort().join(","),p=async()=>{let y=++o;const x=await this.listDevices();y===o&&d(c)!==d(x)&&(c=x,i(x.slice()))};navigator.mediaDevices.addEventListener("devicechange",p),p(),this._deviceChangeCallback=p}return!0}async requestPermission(){const i=await navigator.permissions.query({name:"microphone"});if(i.state==="denied")window.alert("You must grant microphone access to use this feature.");else if(i.state==="prompt")try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(d=>d.stop())}catch{window.alert("You must grant microphone access to use this feature.")}return!0}async listDevices(){if(!navigator.mediaDevices||!("enumerateDevices"in navigator.mediaDevices))throw new Error("Could not request user devices");return await this.requestPermission(),(await navigator.mediaDevices.enumerateDevices()).filter(c=>c.kind==="audioinput")}async begin(i){var x;if(this.processor)throw new Error("Already connected: please call .end() to start a new session");if(!navigator.mediaDevices||!("getUserMedia"in navigator.mediaDevices))throw new Error("Could not request user media");i=i??((x=this.deviceSelection)==null?void 0:x.deviceId);try{const b={audio:!0};i&&(b.audio={deviceId:{exact:i}}),this.stream=await navigator.mediaDevices.getUserMedia(b)}catch{throw new Error("Could not start media stream")}this.listDevices().then(b=>{i=this.stream.getAudioTracks()[0].getSettings().deviceId,console.log("find current device",b,i,this.stream.getAudioTracks()[0].getSettings()),this.deviceSelection=b.find(k=>k.deviceId===i),console.log("current device",this.deviceSelection)});const o=new AudioContext({sampleRate:this.sampleRate}),c=o.createMediaStreamSource(this.stream);try{await o.audioWorklet.addModule(this.scriptSrc)}catch(b){throw console.error(b),new Error(`Could not add audioWorklet module: ${this.scriptSrc}`)}const d=new AudioWorkletNode(o,"audio_processor");d.port.onmessage=b=>{const{event:k,id:O,data:N}=b.data;if(k==="receipt")this.eventReceipts[O]=N;else if(k==="chunk")if(this._chunkProcessorSize){const Z=this._chunkProcessorBuffer;this._chunkProcessorBuffer={raw:Yr.mergeBuffers(Z.raw,N.raw),mono:Yr.mergeBuffers(Z.mono,N.mono)},this._chunkProcessorBuffer.mono.byteLength>=this._chunkProcessorSize&&(this._chunkProcessor(this._chunkProcessorBuffer),this._chunkProcessorBuffer={raw:new ArrayBuffer(0),mono:new ArrayBuffer(0)})}else this._chunkProcessor(N)};const p=c.connect(d),y=o.createAnalyser();return y.fftSize=8192,y.smoothingTimeConstant=.1,p.connect(y),this.outputToSpeakers&&(console.warn(`Warning: Output to speakers may affect sound quality,
433
+ especially due to system audio feedback preventative measures.
434
+ use only for debugging`),y.connect(o.destination)),this.source=c,this.node=p,this.analyser=y,this.processor=d,console.log("begin completed"),!0}getFrequencies(i="frequency",o=-100,c=-30){if(!this.processor)throw new Error("Session ended: please call .begin() first");return mf.getFrequencies(this.analyser,this.sampleRate,null,i,o,c)}async pause(){if(this.processor){if(!this.recording)throw new Error("Already paused: please call .record() first")}else throw new Error("Session ended: please call .begin() first");return this._chunkProcessorBuffer.raw.byteLength&&this._chunkProcessor(this._chunkProcessorBuffer),this.log("Pausing ..."),await this._event("stop"),this.recording=!1,!0}async record(i=()=>{},o=8192){if(this.processor){if(this.recording)throw new Error("Already recording: please call .pause() first");if(typeof i!="function")throw new Error("chunkProcessor must be a function")}else throw new Error("Session ended: please call .begin() first");return this._chunkProcessor=i,this._chunkProcessorSize=o,this._chunkProcessorBuffer={raw:new ArrayBuffer(0),mono:new ArrayBuffer(0)},this.log("Recording ..."),await this._event("start"),this.recording=!0,!0}async clear(){if(!this.processor)throw new Error("Session ended: please call .begin() first");return await this._event("clear"),!0}async read(){if(!this.processor)throw new Error("Session ended: please call .begin() first");return this.log("Reading ..."),await this._event("read")}async save(i=!1){if(!this.processor)throw new Error("Session ended: please call .begin() first");if(!i&&this.recording)throw new Error("Currently recording: please call .pause() first, or call .save(true) to force");this.log("Exporting ...");const o=await this._event("export");return new Yr().pack(this.sampleRate,o.audio)}async end(){if(!this.processor)throw new Error("Session ended: please call .begin() first");const i=this.processor;this.log("Stopping ..."),await this._event("stop"),this.recording=!1,this.stream.getTracks().forEach(y=>y.stop()),this.log("Exporting ...");const c=await this._event("export",{},i);return this.processor.disconnect(),this.source.disconnect(),this.node.disconnect(),this.analyser.disconnect(),this.stream=null,this.processor=null,this.source=null,this.node=null,new Yr().pack(this.sampleRate,c.audio)}async quit(){return this.listenForDeviceChange(null),this.deviceSelection=null,this.processor&&await this.end(),!0}}globalThis.WavRecorder=oA;class lA{constructor({sampleRate:i=44100,outputToSpeakers:o=!1,debug:c=!1}={}){this.scriptSrc=oC,this.sampleRate=i,this.outputToSpeakers=o,this.debug=!!c,this.stream=null,this.processor=null,this.source=null,this.node=null,this.recording=!1,this._lastEventId=0,this.eventReceipts={},this.eventTimeout=5e3,this._chunkProcessor=()=>{},this._chunkProcessorSize=void 0,this._chunkProcessorBuffer={raw:new ArrayBuffer(0),mono:new ArrayBuffer(0)}}log(){return this.debug&&this.log(...arguments),!0}getSampleRate(){return this.sampleRate}getStatus(){return this.processor?this.recording?"recording":"paused":"ended"}async _event(i,o={},c=null){if(c=c||this.processor,!c)throw new Error("Can not send events without recording first");const d={event:i,id:this._lastEventId++,data:o};c.port.postMessage(d);const p=new Date().valueOf();for(;!this.eventReceipts[d.id];){if(new Date().valueOf()-p>this.eventTimeout)throw new Error(`Timeout waiting for "${i}" event`);await new Promise(x=>setTimeout(()=>x(!0),1))}const y=this.eventReceipts[d.id];return delete this.eventReceipts[d.id],y}async begin(i){if(this.processor)throw new Error("Already connected: please call .end() to start a new session");if(!i||i.kind!=="audio")throw new Error("No audio track provided");this.stream=new MediaStream([i]);const o=new AudioContext({sampleRate:this.sampleRate}),c=o.createMediaStreamSource(this.stream);try{await o.audioWorklet.addModule(this.scriptSrc)}catch(x){throw console.error(x),new Error(`Could not add audioWorklet module: ${this.scriptSrc}`)}const d=new AudioWorkletNode(o,"audio_processor");d.port.onmessage=x=>{const{event:b,id:k,data:O}=x.data;if(b==="receipt")this.eventReceipts[k]=O;else if(b==="chunk")if(this._chunkProcessorSize){const N=this._chunkProcessorBuffer;this._chunkProcessorBuffer={raw:Yr.mergeBuffers(N.raw,O.raw),mono:Yr.mergeBuffers(N.mono,O.mono)},this._chunkProcessorBuffer.mono.byteLength>=this._chunkProcessorSize&&(this._chunkProcessor(this._chunkProcessorBuffer),this._chunkProcessorBuffer={raw:new ArrayBuffer(0),mono:new ArrayBuffer(0)})}else this._chunkProcessor(O)};const p=c.connect(d),y=o.createAnalyser();return y.fftSize=8192,y.smoothingTimeConstant=.1,p.connect(y),this.outputToSpeakers&&(console.warn(`Warning: Output to speakers may affect sound quality,
435
+ especially due to system audio feedback preventative measures.
436
+ use only for debugging`),y.connect(o.destination)),this.source=c,this.node=p,this.analyser=y,this.processor=d,!0}getFrequencies(i="frequency",o=-100,c=-30){if(!this.processor)throw new Error("Session ended: please call .begin() first");return mf.getFrequencies(this.analyser,this.sampleRate,null,i,o,c)}async pause(){if(this.processor){if(!this.recording)throw new Error("Already paused: please call .record() first")}else throw new Error("Session ended: please call .begin() first");return this._chunkProcessorBuffer.raw.byteLength&&this._chunkProcessor(this._chunkProcessorBuffer),this.log("Pausing ..."),await this._event("stop"),this.recording=!1,!0}async record(i=()=>{},o=8192){if(this.processor){if(this.recording)throw new Error("Already recording: HELLO please call .pause() first");if(typeof i!="function")throw new Error("chunkProcessor must be a function")}else throw new Error("Session ended: please call .begin() first");return this._chunkProcessor=i,this._chunkProcessorSize=o,this._chunkProcessorBuffer={raw:new ArrayBuffer(0),mono:new ArrayBuffer(0)},this.log("Recording ..."),await this._event("start"),this.recording=!0,!0}async clear(){if(!this.processor)throw new Error("Session ended: please call .begin() first");return await this._event("clear"),!0}async read(){if(!this.processor)throw new Error("Session ended: please call .begin() first");return this.log("Reading ..."),await this._event("read")}async save(i=!1){if(!this.processor)throw new Error("Session ended: please call .begin() first");if(!i&&this.recording)throw new Error("Currently recording: please call .pause() first, or call .save(true) to force");this.log("Exporting ...");const o=await this._event("export");return new Yr().pack(this.sampleRate,o.audio)}async end(){if(!this.processor)throw new Error("Session ended: please call .begin() first");const i=this.processor;this.log("Stopping ..."),await this._event("stop"),this.recording=!1,this.log("Exporting ...");const o=await this._event("export",{},i);return this.processor.disconnect(),this.source.disconnect(),this.node.disconnect(),this.analyser.disconnect(),this.stream=null,this.processor=null,this.source=null,this.node=null,new Yr().pack(this.sampleRate,o.audio)}async quit(){return this.listenForDeviceChange(null),this.processor&&await this.end(),!0}}globalThis.WavRecorder=WavRecorder;var lC={};lC=JSON.parse('{"name":"@pipecat-ai/daily-transport","version":"0.3.10","license":"BSD-2-Clause","main":"dist/index.js","module":"dist/index.module.js","types":"dist/index.d.ts","source":"src/index.ts","repository":{"type":"git","url":"git+https://github.com/pipecat-ai/pipecat-client-web-transports.git"},"files":["dist","package.json","README.md"],"scripts":{"build":"parcel build --no-cache","dev":"parcel watch","lint":"eslint . --ext ts --report-unused-disable-directives --max-warnings 0"},"devDependencies":{"@pipecat-ai/client-js":"^0.3.5","eslint":"9.11.1","eslint-config-prettier":"^9.1.0","eslint-plugin-simple-import-sort":"^12.1.1"},"peerDependencies":{"@pipecat-ai/client-js":"~0.3.5"},"dependencies":{"@daily-co/daily-js":"^0.77.0"},"description":"Pipecat Daily Transport Package","author":"Daily.co","bugs":{"url":"https://github.com/pipecat-ai/pipecat-client-web-transports/issues"},"homepage":"https://github.com/pipecat-ai/pipecat-client-web-transports/blob/main/transports/daily-webrtc/README.md"}');var am;(function(r){r.AUDIO_BUFFERING_STARTED="audio-buffering-started",r.AUDIO_BUFFERING_STOPPED="audio-buffering-stopped"})(am||(am={}));class cA{constructor(i){this._daily=i,this._proxy=new Proxy(this._daily,{get:(o,c,d)=>{if(typeof o[c]=="function"){let p;switch(String(c)){case"preAuth":p="Calls to preAuth() are disabled. Please use Transport.preAuth()";break;case"startCamera":p="Calls to startCamera() are disabled. Please use RTVIClient.initDevices()";break;case"join":p="Calls to join() are disabled. Please use RTVIClient.connect()";break;case"leave":p="Calls to leave() are disabled. Please use RTVIClient.disconnect()";break;case"destroy":p="Calls to destroy() are disabled.";break}return p?()=>{throw new Error(p)}:(...y)=>o[c](...y)}return Reflect.get(o,c,d)}})}get proxy(){return this._proxy}}class Pc extends G3{constructor({dailyFactoryOptions:i={},bufferLocalAudioUntilBotReady:o=!1}={}){super(),this._botId="",this._selectedCam={},this._selectedMic={},this._selectedSpeaker={},this._currentAudioTrack=null,this._audioQueue=[],this._callbacks={},this._dailyFactoryOptions=i,this._bufferLocalAudioUntilBotReady=o,this._daily=ZM.createCallObject({...this._dailyFactoryOptions,allowMultipleCallInstances:!0}),this._dailyWrapper=new cA(this._daily)}setupRecorder(){this._mediaStreamRecorder=new lA({sampleRate:Pc.RECORDER_SAMPLE_RATE})}handleUserAudioStream(i){this._audioQueue.push(i)}flushAudioQueue(){if(this._audioQueue.length!==0)for(Cn.debug(`Will flush audio queue: ${this._audioQueue.length}`);this._audioQueue.length>0;){const o=[];for(;o.length<10&&this._audioQueue.length>0;){const c=this._audioQueue.shift();c&&o.push(c)}o.length>0&&this._sendAudioBatch(o)}}_sendAudioBatch(i){const c={id:"raw-audio-batch",label:"rtvi-ai",type:"raw-audio-batch",data:{base64AudioBatch:i.map(d=>{const p=new Uint8Array(d);return btoa(String.fromCharCode(...p))}),sampleRate:Pc.RECORDER_SAMPLE_RATE,numChannels:1}};this.sendMessage(c)}initialize(i,o){this._bufferLocalAudioUntilBotReady&&this.setupRecorder(),this._callbacks=i.callbacks??{},this._onMessage=o,(this._dailyFactoryOptions.startVideoOff==null||i.enableCam!=null)&&(this._dailyFactoryOptions.startVideoOff=!(i.enableCam??!1)),(this._dailyFactoryOptions.startAudioOff==null||i.enableMic!=null)&&(this._dailyFactoryOptions.startAudioOff=!(i.enableMic??!0)),this.attachEventListeners(),this.state="disconnected",Cn.debug("[RTVI Transport] Initialized",WM(lC).version)}get dailyCallClient(){return this._dailyWrapper.proxy}get state(){return this._state}set state(i){var o,c;this._state!==i&&(this._state=i,(c=(o=this._callbacks).onTransportStateChanged)==null||c.call(o,i))}async getAllCams(){const{devices:i}=await this._daily.enumerateDevices();return i.filter(o=>o.kind==="videoinput")}updateCam(i){this._daily.setInputDevicesAsync({videoDeviceId:i}).then(o=>{this._selectedCam=o.camera})}get selectedCam(){return this._selectedCam}async getAllMics(){const{devices:i}=await this._daily.enumerateDevices();return i.filter(o=>o.kind==="audioinput")}updateMic(i){this._daily.setInputDevicesAsync({audioDeviceId:i}).then(o=>{this._selectedMic=o.mic})}get selectedMic(){return this._selectedMic}async getAllSpeakers(){const{devices:i}=await this._daily.enumerateDevices();return i.filter(o=>o.kind==="audiooutput")}updateSpeaker(i){this._daily.setOutputDeviceAsync({outputDeviceId:i}).then(o=>{this._selectedSpeaker=o.speaker})}get selectedSpeaker(){return this._selectedSpeaker}enableMic(i){this._daily.setLocalAudio(i)}get isMicEnabled(){return this._daily.localAudio()}enableCam(i){this._daily.setLocalVideo(i)}get isCamEnabled(){return this._daily.localVideo()}enableScreenShare(i){i?this._daily.startScreenShare():this._daily.stopScreenShare()}get isSharingScreen(){return this._daily.localScreenAudio()||this._daily.localScreenVideo()}tracks(){var d,p,y,x,b,k,O,N,Z,J,D,F,ae,ee,B,Y;const i=this._daily.participants()??{},o=i==null?void 0:i[this._botId],c={local:{audio:(y=(p=(d=i==null?void 0:i.local)==null?void 0:d.tracks)==null?void 0:p.audio)==null?void 0:y.persistentTrack,screenAudio:(k=(b=(x=i==null?void 0:i.local)==null?void 0:x.tracks)==null?void 0:b.screenAudio)==null?void 0:k.persistentTrack,screenVideo:(Z=(N=(O=i==null?void 0:i.local)==null?void 0:O.tracks)==null?void 0:N.screenVideo)==null?void 0:Z.persistentTrack,video:(F=(D=(J=i==null?void 0:i.local)==null?void 0:J.tracks)==null?void 0:D.video)==null?void 0:F.persistentTrack}};return o&&(c.bot={audio:(ee=(ae=o==null?void 0:o.tracks)==null?void 0:ae.audio)==null?void 0:ee.persistentTrack,video:(Y=(B=o==null?void 0:o.tracks)==null?void 0:B.video)==null?void 0:Y.persistentTrack}),c}async startRecording(){try{Cn.info("[RTVI Transport] Initializing recording"),await this._mediaStreamRecorder.record(i=>{this.handleUserAudioStream(i.mono)},Pc.RECORDER_CHUNK_SIZE),this._onMessage({type:am.AUDIO_BUFFERING_STARTED,data:{}}),Cn.info("[RTVI Transport] Recording Initialized")}catch(i){i.message.includes("Already recording")||Cn.error("Error starting recording",i)}}async preAuth(i){this._dailyFactoryOptions=i,await this._daily.preAuth(i)}async initDevices(){var y,x,b,k,O,N,Z,J,D,F,ae,ee;if(!this._daily)throw new Zs("Transport instance not initialized");this.state="initializing";const i=await this._daily.startCamera(this._dailyFactoryOptions),{devices:o}=await this._daily.enumerateDevices(),c=o.filter(B=>B.kind==="videoinput"),d=o.filter(B=>B.kind==="audioinput"),p=o.filter(B=>B.kind==="audiooutput");this._selectedCam=i.camera,this._selectedMic=i.mic,this._selectedSpeaker=i.speaker,(x=(y=this._callbacks).onAvailableCamsUpdated)==null||x.call(y,c),(k=(b=this._callbacks).onAvailableMicsUpdated)==null||k.call(b,d),(N=(O=this._callbacks).onAvailableSpeakersUpdated)==null||N.call(O,p),(J=(Z=this._callbacks).onCamUpdated)==null||J.call(Z,i.camera),(F=(D=this._callbacks).onMicUpdated)==null||F.call(D,i.mic),(ee=(ae=this._callbacks).onSpeakerUpdated)==null||ee.call(ae,i.speaker),this._daily.isLocalAudioLevelObserverRunning()||await this._daily.startLocalAudioLevelObserver(100),this._daily.isRemoteParticipantsAudioLevelObserverRunning()||await this._daily.startRemoteParticipantsAudioLevelObserver(100),this.state="initialized"}async connect(i,o){var d,p,y;if(!this._daily)throw new Zs("Transport instance not initialized");if(o.signal.aborted)return;this.state="connecting";const c=this._dailyFactoryOptions;c.url=i.room_url??c.url,i.token!=null&&(c.token=i.token);try{await this._daily.join(c);const x=await this._daily.room();x&&"id"in x&&(this._expiry=(d=x.config)==null?void 0:d.exp)}catch(x){throw Cn.error("Failed to join room",x),this.state="error",new P3}o.signal.aborted||(this.state="connected",(y=(p=this._callbacks).onConnected)==null||y.call(p))}async sendReadyMessage(){return new Promise(i=>{const o=()=>{const p=navigator.userAgent;return/iPad|iPhone|iPod/.test(p)||/Macintosh/.test(p)&&"ontouchend"in document},c=()=>{this.state="ready",this.flushAudioQueue(),this.sendMessage(Yi.clientReady()),this.stopRecording(),i()},d=p=>{var y;(y=p.participant)!=null&&y.local||(this._daily.off("track-started",d),o()?(Cn.debug("[RTVI Transport] iOS device detected, adding 0.5 second delay before sending ready message"),setTimeout(c,500)):c())};this._daily.on("track-started",d)})}stopRecording(){this._mediaStreamRecorder&&this._mediaStreamRecorder.getStatus()!=="ended"&&(this._mediaStreamRecorder.end(),this._onMessage({type:am.AUDIO_BUFFERING_STOPPED,data:{}}))}attachEventListeners(){this._daily.on("available-devices-updated",this.handleAvailableDevicesUpdated.bind(this)),this._daily.on("selected-devices-updated",this.handleSelectedDevicesUpdated.bind(this)),this._daily.on("track-started",this.handleTrackStarted.bind(this)),this._daily.on("track-stopped",this.handleTrackStopped.bind(this)),this._daily.on("participant-joined",this.handleParticipantJoined.bind(this)),this._daily.on("participant-left",this.handleParticipantLeft.bind(this)),this._daily.on("local-audio-level",this.handleLocalAudioLevel.bind(this)),this._daily.on("remote-participants-audio-level",this.handleRemoteAudioLevel.bind(this)),this._daily.on("app-message",this.handleAppMessage.bind(this)),this._daily.on("left-meeting",this.handleLeftMeeting.bind(this)),this._daily.on("error",this.handleFatalError.bind(this)),this._daily.on("nonfatal-error",this.handleNonFatalError.bind(this))}async disconnect(){this.state="disconnecting",this._daily.stopLocalAudioLevelObserver(),this._daily.stopRemoteParticipantsAudioLevelObserver(),this._audioQueue=[],this._currentAudioTrack=null,this.stopRecording(),await this._daily.leave()}sendMessage(i){this._daily.sendAppMessage(i,"*")}handleAppMessage(i){i.data.label==="rtvi-ai"&&this._onMessage({id:i.data.id,type:i.data.type,data:i.data.data})}handleAvailableDevicesUpdated(i){var o,c,d,p,y,x;(c=(o=this._callbacks).onAvailableCamsUpdated)==null||c.call(o,i.availableDevices.filter(b=>b.kind==="videoinput")),(p=(d=this._callbacks).onAvailableMicsUpdated)==null||p.call(d,i.availableDevices.filter(b=>b.kind==="audioinput")),(x=(y=this._callbacks).onAvailableSpeakersUpdated)==null||x.call(y,i.availableDevices.filter(b=>b.kind==="audiooutput"))}handleSelectedDevicesUpdated(i){var o,c,d,p,y,x,b,k,O;((o=this._selectedCam)==null?void 0:o.deviceId)!==i.devices.camera&&(this._selectedCam=i.devices.camera,(d=(c=this._callbacks).onCamUpdated)==null||d.call(c,i.devices.camera)),((p=this._selectedMic)==null?void 0:p.deviceId)!==i.devices.mic&&(this._selectedMic=i.devices.mic,(x=(y=this._callbacks).onMicUpdated)==null||x.call(y,i.devices.mic)),((b=this._selectedSpeaker)==null?void 0:b.deviceId)!==i.devices.speaker&&(this._selectedSpeaker=i.devices.speaker,(O=(k=this._callbacks).onSpeakerUpdated)==null||O.call(k,i.devices.speaker))}async handleLocalAudioTrack(i){if(this.state=="ready"||!this._bufferLocalAudioUntilBotReady)return;switch(this._mediaStreamRecorder.getStatus()){case"ended":await this._mediaStreamRecorder.begin(i),await this.startRecording();break;case"paused":await this.startRecording();break;case"recording":default:this._currentAudioTrack!==i?(await this._mediaStreamRecorder.end(),await this._mediaStreamRecorder.begin(i),await this.startRecording()):Cn.warn("track-started event received for current track and already recording");break}this._currentAudioTrack=i}handleTrackStarted(i){var o,c,d,p,y;i.type==="screenAudio"||i.type==="screenVideo"?(c=(o=this._callbacks).onScreenTrackStarted)==null||c.call(o,i.track,i.participant?Sd(i.participant):void 0):((d=i.participant)!=null&&d.local&&i.track.kind==="audio"&&this.handleLocalAudioTrack(i.track),(y=(p=this._callbacks).onTrackStarted)==null||y.call(p,i.track,i.participant?Sd(i.participant):void 0))}handleTrackStopped(i){var o,c,d,p;i.type==="screenAudio"||i.type==="screenVideo"?(c=(o=this._callbacks).onScreenTrackStopped)==null||c.call(o,i.track,i.participant?Sd(i.participant):void 0):(p=(d=this._callbacks).onTrackStopped)==null||p.call(d,i.track,i.participant?Sd(i.participant):void 0)}handleParticipantJoined(i){var c,d,p,y;const o=Sd(i.participant);(d=(c=this._callbacks).onParticipantJoined)==null||d.call(c,o),!o.local&&(this._botId=i.participant.session_id,(y=(p=this._callbacks).onBotConnected)==null||y.call(p,o))}handleParticipantLeft(i){var c,d,p,y;const o=Sd(i.participant);(d=(c=this._callbacks).onParticipantLeft)==null||d.call(c,o),!o.local&&(this._botId="",(y=(p=this._callbacks).onBotDisconnected)==null||y.call(p,o))}handleLocalAudioLevel(i){var o,c;(c=(o=this._callbacks).onLocalAudioLevel)==null||c.call(o,i.audioLevel)}handleRemoteAudioLevel(i){var d,p;const o=this._daily.participants(),c=Object.keys(i.participantsAudioLevel);for(let y=0;y<c.length;y++){const x=c[y],b=i.participantsAudioLevel[x];(p=(d=this._callbacks).onRemoteAudioLevel)==null||p.call(d,b,Sd(o[x]))}}handleLeftMeeting(){var i,o;this.state="disconnected",this._botId="",(o=(i=this._callbacks).onDisconnected)==null||o.call(i)}handleFatalError(i){var o,c;Cn.error("Daily fatal error",i.errorMsg),this.state="error",this._botId="",(c=(o=this._callbacks).onError)==null||c.call(o,Yi.error(i.errorMsg,!0))}handleNonFatalError(i){var o,c;switch(i.type){case"screen-share-error":(c=(o=this._callbacks).onScreenShareError)==null||c.call(o,i.errorMsg);break}}}Pc.RECORDER_SAMPLE_RATE=16e3,Pc.RECORDER_CHUNK_SIZE=512;const Sd=r=>({id:r.user_id,local:r.local,name:r.user_name}),uA=new Pc,dA=new xl({transport:uA,params:{baseUrl:"https://genius.juspay.in/api/v3/voice/backend",endpoints:{connect:"/connect"}},enableMic:!0,enableCam:!1});function hA({children:r}){return W.jsx(o6,{client:dA,children:r})}const cC=Pe.createContext(void 0);function fA({children:r}){const[i,o]=Pe.useState(!1);return W.jsx(cC.Provider,{value:{isMuted:i,setIsMuted:o},children:r})}function pA(){const r=Pe.useContext(cC);if(r===void 0)throw new Error("useMute must be used within a MuteProvider");return r}const uC=Pe.createContext(void 0);function gA({children:r}){const[i,o]=Pe.useState(void 0);return W.jsx(uC.Provider,{value:{initialHistory:i,setInitialHistory:o},children:r})}function dC(){const r=Pe.useContext(uC);if(!r)throw new Error("useConversationHistoryContext must be used within a ConversationHistoryProvider");return r}function mA(){const r=Yg(),{setInitialHistory:i}=dC(),o=Pe.useCallback(async(c,d)=>{if(!r){console.error("RTVI client is not initialized");return}const p=r.params.endpoints?{...r.params.endpoints}:void 0;try{const y=c,x="/connect";let b=x;x.includes("?")?b=`${x}&token=${y}`:b=`${x}?token=${y}`,console.log(`Auto-connecting with endpoint: ${b}`),r.params.endpoints?r.params.endpoints.connect=b:r.params.endpoints={connect:b};let k;d&&(Array.isArray(d)?k=d:"conversations"in d&&Array.isArray(d.conversations)&&(k=d.conversations,console.log("Extracting conversations from agentResponse:",k))),k&&Array.isArray(k)&&k.length>0&&(console.log("Setting chat history in client params:",k),r.params.requestData={...r.params.requestData||{},chatHistory:k},i(k)),console.log(`Client connect endpoint is now: ${r.params.endpoints.connect}`),await r.connect()}catch(y){console.error("Auto-connection error:",y)}finally{r&&r.params&&(r.params.endpoints=p,console.log("Restored client endpoints to:",r.params.endpoints))}},[r,i]);return Pe.useEffect(()=>{const c=d=>{d.data&&d.data.type==="AUTH_TOKEN"&&d.data.token&&(console.log("AUTH_TOKEN received:",d.data),d.data.agentResponse&&console.log("Chat history received:",d.data.agentResponse),o(d.data.token,d.data.agentResponse))};return window.addEventListener("message",c),window.parent!==window&&(window.parent.postMessage({type:"RTVI_CLIENT_READY"},"*"),console.log("RTVI_CLIENT_READY message sent to parent")),()=>{window.removeEventListener("message",c)}},[r,o]),null}const Sx="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.00052%200.764648C6.00053%200.772166%206.00053%200.779674%206.00052%200.787173C6.0026%204.52815%207.05588%205.99955%2011.2354%205.99955C7.05588%205.99955%206.0026%207.47095%206.00052%2011.2119C5.99844%207.47095%204.94517%205.99955%200.765625%205.99955C4.94517%205.99955%205.99844%204.52815%206.00052%200.787173C6.00052%200.779674%206.00052%200.772166%206.00052%200.764648Z'%20fill='white'%20stroke='white'%20stroke-width='1.04698'%20stroke-linejoin='round'/%3e%3c/svg%3e";function hC({toolCalls:r,isVisible:i,isActive:o=!1}){const[c,d]=Pe.useState(!1);if(!i)return null;const p=b=>b.split("_").map(k=>k.charAt(0).toUpperCase()+k.slice(1)).join(" "),y=b=>Object.entries(b).filter(([k,O])=>O!=null).map(([k,O])=>{let N=O;return typeof O=="object"?N=JSON.stringify(O,null,2):typeof O=="string"&&O.length>50&&(N=O.substring(0,50)+"..."),{key:k,value:N}}),x=b=>b?typeof b=="string"?W.jsx("div",{className:"tool-result-text",children:b}):typeof b=="object"?b.error||b.status==="error"?W.jsxs("div",{className:"tool-result-error",children:[W.jsx("span",{className:"error-label",children:"Error:"})," ",b.error||b.message||"Unknown error"]}):W.jsx("div",{className:"tool-result-object",children:W.jsx("pre",{children:JSON.stringify(b,null,2)})}):W.jsx("div",{className:"tool-result-text",children:String(b)}):null;return W.jsxs("div",{className:"thinking-loader",children:[W.jsx("div",{className:"thinking-header",onClick:()=>r.length>0&&d(!c),children:o?W.jsxs(W.Fragment,{children:[W.jsxs("div",{className:"thinking-dots",children:[W.jsx("span",{}),W.jsx("span",{}),W.jsx("span",{})]}),W.jsx("span",{className:"thinking-text",children:"Thinking"})]}):W.jsxs(W.Fragment,{children:[W.jsxs("span",{className:"thinking-text",children:["Used ",r.length," tool",r.length>1?"s":""]}),r.length>0&&W.jsx("svg",{className:`chevron ${c?"expanded":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:W.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),c&&r.length>0&&W.jsx("div",{className:"tool-calls-dropdown",children:r.map((b,k)=>W.jsxs("div",{className:"tool-call-item",children:[W.jsxs("div",{className:"tool-call-header-item",children:[W.jsx("div",{className:"tool-status",children:b.status==="pending"?W.jsx("div",{className:"spinner"}):W.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:W.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"#10b981",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),W.jsx("span",{className:"tool-name",children:p(b.functionName)}),b.duration&&W.jsxs("span",{className:"tool-duration",children:[(b.duration/1e3).toFixed(2),"s"]})]}),Object.keys(b.arguments).length>0&&W.jsxs("div",{className:"tool-arguments",children:[W.jsx("div",{className:"section-label",children:"Input:"}),W.jsx("div",{className:"arguments-list",children:y(b.arguments).map(({key:O,value:N})=>W.jsxs("div",{className:"argument-item",children:[W.jsxs("span",{className:"argument-key",children:[O,":"]}),W.jsx("span",{className:"argument-value",children:N})]},O))})]}),b.result&&W.jsxs("div",{className:"tool-result",children:[W.jsx("div",{className:"section-label",children:"Output:"}),x(b.result)]}),k<r.length-1&&W.jsx("div",{className:"tool-divider"})]},b.toolCallId))})]})}function yA(){const[r,i]=Pe.useState([]),[o,c]=Pe.useState([]),[d,p]=Pe.useState({}),[y,x]=Pe.useState(!1),b=Pe.useRef(null),k=u6(),O=Yg(),N=k==="connecting"||k==="connected",[Z,J]=Pe.useState(!1),[D,F]=Pe.useState(!1),ae=Pe.useRef(null),ee=Pe.useRef({llm:!1,tts:!1}),B=Pe.useRef(null),Y=Pe.useRef(null),$=Pe.useRef(0),Q=Pe.useRef(!1),z=Pe.useRef(!1),V=Pe.useRef(null),le=Pe.useRef(new Set),se=Pe.useRef(null);Pe.useEffect(()=>{const S=b.current;S&&(S.scrollTop=S.scrollHeight)},[r]),Pe.useEffect(()=>()=>{L()},[]),Pe.useEffect(()=>{if(O){const S=Object.keys(Et);console.log("Available RTVI Events:",S)}},[O]),pi(Et.ServerMessage,S=>{if(console.log("🔧 Server message received:",S),S.type==="tool-call-start"){const{toolCallId:T,functionName:E,arguments:P,timestamp:te}=S.payload;c(_=>[..._,{toolCallId:T,functionName:E,arguments:P,timestamp:te,status:"pending"}]),x(!0),console.log(`🔧 Tool call started: ${E}`)}else if(S.type==="tool-call-result"){const{toolCallId:T,result:E,duration:P}=S.payload;c(te=>te.map(_=>_.toolCallId===T?{..._,result:E,duration:P,status:"complete"}:_)),console.log(`🔧 Tool call completed: ${T}`)}}),pi(Et.UserStartedSpeaking,()=>{console.log("🎤 SimpleChat: User started speaking"),J(!0),D&&(console.log("🚫 Bot interrupted by user"),z.current=!0)}),pi(Et.UserStoppedSpeaking,()=>{console.log("🎤 SimpleChat: User stopped speaking"),J(!1)}),pi(Et.BotStartedSpeaking,()=>{console.log("🤖 SimpleChat: Bot started speaking"),F(!0),z.current=!1}),pi(Et.BotStoppedSpeaking,()=>{console.log("🤖 SimpleChat: Bot stopped speaking"),F(!1),z.current=!1,V.current=null});const K=()=>{setTimeout(()=>{if(!ee.current.llm&&!ee.current.tts&&ae.current){const S=ae.current;console.log("✅ Bot fully done - removing cursor for message:",S),i(T=>{console.log("Current messages:",T.map(P=>({id:P.id,isStreaming:P.isStreaming})));const E=T.map(P=>P.id===S?(console.log(`Found message to update: ${P.id}`),{...P,isStreaming:!1}):P);return console.log("Updated messages:",E.map(P=>({id:P.id,isStreaming:P.isStreaming}))),E}),ae.current=null,$.current=Date.now()}},100)};pi(Et.BotLlmStarted,()=>{if(console.log("🤖 Bot LLM started"),ee.current.llm=!0,x(!0),Q.current=!0,z.current=!1,le.current.clear(),ae.current)console.log("ℹ️ Message already exists from early text event");else{const S=new Date,T=`bot-${S.getTime()}`;ae.current=T,i(E=>[...E,{id:T,sender:"bot",text:"",spokenText:"",timestamp:S,isStreaming:!0}])}}),pi(Et.BotLlmStopped,()=>{console.log("🤖 Bot LLM stopped"),ee.current.llm=!1,x(!1),K()}),pi(Et.BotTtsStarted,()=>{console.log("🤖 Bot TTS started"),ee.current.tts=!0}),pi(Et.BotTtsStopped,()=>{console.log("🤖 Bot TTS stopped"),ee.current.tts=!1,V.current=null,K()}),pi(Et.UserTranscript,S=>{S.timestamp&&typeof S.timestamp=="string"&&S.timestamp.includes("|")?(console.log("📝 Enhanced transcript event received:",JSON.stringify(S,null,2)),H(S)):console.log("📝 Ignoring regular RTVI transcript event (no custom data)")}),pi(Et.BotTranscript,S=>{console.log("🤖 Bot transcript event (ignoring - using streaming instead):",JSON.stringify(S,null,2))}),pi(Et.BotLlmText,S=>{if(console.log("🤖 Bot LLM text event:",JSON.stringify(S,null,2)),x(!1),Q.current=!0,S.text)if(ae.current)i(T=>T.map(E=>E.id===ae.current?{...E,text:E.text+S.text}:E));else{const T=Date.now();if(T-$.current<500)console.log("⚠️ Quick successive bot message detected, checking for recent message to append"),i(P=>{const te=P[P.length-1];if(te&&te.sender==="bot")return console.log("📝 Appending to recent bot message"),ae.current=te.id,ee.current.llm=!0,P.map(_=>_.id===te.id?{..._,text:_.text+" "+S.text,isStreaming:!0}:_);{console.log("⚠️ No recent bot message found, creating new");const _=new Date,re=`bot-${_.getTime()}`;return ae.current=re,ee.current.llm=!0,$.current=T,o.length>0&&(p(me=>({...me,[re]:[...o]})),c([])),[...P,{id:re,sender:"bot",text:S.text,spokenText:"",timestamp:_,isStreaming:!0}]}});else{console.log("⚠️ LLM text arrived before BotLlmStarted - creating message");const P=new Date,te=`bot-${P.getTime()}`;ae.current=te,ee.current.llm=!0,$.current=T,o.length>0&&(p(_=>({..._,[te]:[...o]})),c([])),i(_=>[..._,{id:te,sender:"bot",text:S.text,spokenText:"",timestamp:P,isStreaming:!0}])}}}),pi(Et.BotTtsText,S=>{if(console.log("🤖 Bot TTS text event:",JSON.stringify(S,null,2)),!S.text)return;let T=null;S.message_id?T=S.message_id:S.id&&(T=S.id);const E=`${T||"unknown"}-${S.text}`;if(le.current.has(E)){console.log("🚫 Skipping duplicate TTS segment:",E);return}if(le.current.add(E),T&&V.current&&T!==V.current&&(console.log(`🔄 TTS message ID changed from ${V.current} to ${T}`),z.current)){console.log("🆕 Creating new bot message due to TTS message ID change during interruption");const P=new Date,te=`bot-${P.getTime()}`;ae.current=te,V.current=T,ee.current.tts=!0,i(_=>[..._,{id:te,sender:"bot",text:S.text,spokenText:S.text,timestamp:P,isStreaming:!0}]);return}if(T&&(V.current=T),ae.current)i(P=>P.map(te=>te.id===ae.current?{...te,spokenText:(te.spokenText||"")+S.text}:te));else{console.log("⚠️ TTS text arrived before BotLlmStarted - ignoring (no LLM text event)");return}});const L=()=>{se.current&&(clearTimeout(se.current),se.current=null)},X=()=>{L(),se.current=setTimeout(()=>{console.log("⏰ Pending timeout triggered - finalizing user message"),i(S=>S.map(T=>{var E;return T.id===B.current&&T.isPending?(console.log(`🔒 Auto-finalizing pending message: ${T.id}`),{...T,isPending:!1,segments:(E=T.segments)==null?void 0:E.map(P=>({...P,isFinal:!0}))}):T})),se.current=null},2500)},H=S=>{if(console.log("📝 Enhanced transcript handler called with:",S),L(),!S.text){console.log("🚫 Filtered: No text in transcript");return}const T=S.text.trim();if(T==="<noise>"){console.log("🚫 Filtered: Noise transcript blocked -",T);return}let E="unknown",P=!1,te=S.timestamp;if(S.timestamp&&typeof S.timestamp=="string"&&S.timestamp.includes("|"))try{const me=S.timestamp.split("|");me.length>=3&&(te=me[0],E=me[1],P=me[2].toLowerCase()==="true",console.log(`📝 Parsed from timestamp - messageId: ${E}, isFinal: ${P}`))}catch(me){console.warn("📝 Failed to parse attributes from timestamp:",me);return}else{console.log("📝 No custom timestamp data found, skipping transcript");return}const _=E!==Y.current,re=Q.current||!B.current;_?(console.log(`🆕 New conversation turn detected: ${E}`),console.log(`📦 Need new message box: ${re} (bot started: ${Q.current})`),D&&(console.log("🚫 Bot interrupted by user transcript"),z.current=!0),Y.current=E,re?(console.log("📦 Creating new user message box"),Q.current=!1,i(me=>{const g=me.map(ce=>({...ce,isPending:!1})),w=te?new Date(parseInt(te)):new Date,C=`user-${w.getTime()}`;B.current=C;const q={id:C,sender:"user",text:S.text,timestamp:w,isPending:!P,segments:[{messageId:E,text:S.text,isFinal:P}]};return console.log(`➕ Created new message box: ${C}`),P||X(),[...g,q]})):(console.log("📝 Appending new conversation turn to existing message box"),i(me=>me.map(g=>{if(g.id===B.current){const w=g.segments?g.segments.map(ce=>({...ce,isFinal:!0})):[];w.push({messageId:E,text:S.text,isFinal:P});const C=w.map(ce=>ce.text).join(" "),q=!P;return q&&X(),{...g,text:C,segments:w,isPending:q}}return g})))):(console.log(`🔄 Updating existing segment for ${E}, isFinal: ${P}`),i(me=>me.map(g=>{if(g.id===B.current&&g.segments){const w=g.segments.map(j=>j.messageId===E?{...j,text:S.text,isFinal:P}:j),C=w.map(j=>j.text).join(" "),ce=!w.every(j=>j.isFinal);return ce&&X(),{...g,text:C,segments:w,isPending:ce}}return g})))},A=r.length===0;return W.jsxs("div",{className:"simple-chat",children:[A?W.jsxs("div",{className:"welcome-container",children:[W.jsxs("div",{className:"welcome-header",children:[W.jsx("div",{className:"sparkle-icon",children:W.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 21 21",fill:"none",children:[W.jsx("path",{d:"M10.1611 0.999981C10.1611 1.0132 10.1611 1.0264 10.1611 1.03959C10.1647 7.58616 12.008 10.1611 19.3221 10.1611C12.008 10.1611 10.1647 12.736 10.1611 19.2825C10.1574 12.736 8.31411 10.1611 0.999981 10.1611C8.31411 10.1611 10.1574 7.58616 10.1611 1.03959C10.161 1.0264 10.161 1.0132 10.1611 0.999981Z",fill:"white"}),W.jsx("path",{d:"M10.1611 0.999981C10.1648 7.57577 8.32884 10.1611 0.999981 10.1611C8.32884 10.1611 10.1648 12.7463 10.1611 19.3221C10.1573 12.7463 11.9933 10.1611 19.3221 10.1611C11.9933 10.1611 10.1573 7.57577 10.1611 0.999981Z",stroke:"white",strokeLinejoin:"round",strokeWidth:"1.83221"})]})}),W.jsxs("div",{children:[W.jsxs("h1",{className:"welcome-title",children:["Meet Genius ",W.jsx("span",{className:"wave-emoji",children:"👋"})]}),W.jsxs("p",{className:"welcome-subtitle",children:["Your go-to for all payment",W.jsx("br",{}),"related inquiries!"]})]})]}),W.jsxs("div",{className:"option-cards",children:[W.jsxs("div",{className:"option-card",children:[W.jsx("div",{className:"card-icon-wrapper purple",children:W.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.600846 0C0.932683 0 1.20169 0.269007 1.20169 0.600845V9.49335C1.20169 9.83976 1.20216 10.0634 1.21607 10.2337C1.2294 10.3969 1.25204 10.4574 1.26718 10.4871C1.32478 10.6002 1.4167 10.6921 1.52976 10.7497C1.55947 10.7649 1.61998 10.7875 1.78321 10.8008C1.95345 10.8147 2.17713 10.8152 2.52355 10.8152H11.4161C11.7479 10.8152 12.0169 11.0842 12.0169 11.416C12.0169 11.7479 11.7479 12.0169 11.4161 12.0169H2.50038C2.18365 12.0169 1.91041 12.0169 1.68535 11.9985C1.44781 11.9791 1.21155 11.9363 0.984201 11.8204C0.645034 11.6476 0.369281 11.3719 0.196466 11.0327C0.0806263 10.8053 0.0377765 10.5691 0.0183686 10.3315C-1.95383e-05 10.1065 -1.02271e-05 9.83324 5.16793e-07 9.5165L1.0898e-06 0.600845C1.0898e-06 0.269007 0.269008 0 0.600846 0ZM11.1156 1.50211C11.4475 1.50211 11.7165 1.77112 11.7165 2.10296V9.31309C11.7165 9.64493 11.4475 9.91394 11.1156 9.91394C10.7838 9.91394 10.5148 9.64493 10.5148 9.31309V2.10296C10.5148 1.77112 10.7838 1.50211 11.1156 1.50211ZM8.41183 3.30465C8.74366 3.30465 9.01267 3.57365 9.01267 3.90549V9.31309C9.01267 9.64493 8.74366 9.91394 8.41183 9.91394C8.07999 9.91394 7.81098 9.64493 7.81098 9.31309V3.90549C7.81098 3.57365 8.07999 3.30465 8.41183 3.30465ZM5.70803 5.10718C6.03986 5.10718 6.30887 5.37619 6.30887 5.70802V9.31309C6.30887 9.64493 6.03986 9.91394 5.70803 9.91394C5.37619 9.91394 5.10718 9.64493 5.10718 9.31309V5.70802C5.10718 5.37619 5.37619 5.10718 5.70803 5.10718ZM3.00422 6.90971C3.33606 6.90971 3.60507 7.17872 3.60507 7.51056V9.31309C3.60507 9.64493 3.33606 9.91394 3.00422 9.91394C2.67239 9.91394 2.40338 9.64493 2.40338 9.31309V7.51056C2.40338 7.17872 2.67239 6.90971 3.00422 6.90971Z",fill:"white"})})}),W.jsx("h3",{className:"card-title",children:"Payments Data"}),W.jsx("p",{className:"card-description",children:`Ask about your payment data! Eg. "What's the Success Rate today?"`})]}),W.jsxs("div",{className:"option-card",children:[W.jsx("div",{className:"card-icon-wrapper blue",children:W.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.46009 2.59139e-07H7.35512C7.83878 -7.40487e-06 8.23796 -1.37075e-05 8.56313 0.0265541C8.90087 0.054148 9.21133 0.11337 9.50294 0.261953C9.95516 0.492373 10.3228 0.860044 10.5533 1.31227C10.7018 1.60388 10.7611 1.91434 10.7887 2.25207C10.8152 2.57724 10.8152 2.97641 10.8152 3.46007V9.75851C10.8152 10.2422 10.8152 10.6413 10.7887 10.9665C10.7611 11.3042 10.7018 11.6147 10.5533 11.9063C10.3228 12.3585 9.95516 12.7262 9.50294 12.9566C9.21133 13.1052 8.90087 13.1644 8.56313 13.192C8.23796 13.2186 7.83879 13.2186 7.35514 13.2186H3.46007C2.97641 13.2186 2.57724 13.2186 2.25207 13.192C1.91434 13.1644 1.60388 13.1052 1.31227 12.9566C0.860043 12.7262 0.492373 12.3585 0.261953 11.9063C0.11337 11.6147 0.054148 11.3042 0.0265541 10.9665C-1.37075e-05 10.6413 -7.40487e-06 10.2422 2.59139e-07 9.7585V3.46009C-7.40487e-06 2.97642 -1.37075e-05 2.57725 0.0265541 2.25207C0.054148 1.91434 0.11337 1.60388 0.261953 1.31227C0.492373 0.860043 0.860043 0.492373 1.31227 0.261953C1.60388 0.11337 1.91434 0.054148 2.25207 0.0265541C2.57725 -1.37075e-05 2.97642 -7.40487e-06 3.46009 2.59139e-07ZM2.34993 1.22425C2.08651 1.24577 1.9518 1.28479 1.85782 1.33267C1.63171 1.44788 1.44788 1.63171 1.33267 1.85782C1.28479 1.9518 1.24577 2.08651 1.22425 2.34993C1.20216 2.62036 1.20169 2.97023 1.20169 3.4849V9.73368C1.20169 10.2484 1.20216 10.5982 1.22425 10.8687C1.24577 11.1321 1.28479 11.2668 1.33267 11.3608C1.44788 11.5869 1.63171 11.7707 1.85782 11.8859C1.9518 11.9338 2.08651 11.9728 2.34993 11.9943C2.62036 12.0164 2.97023 12.0169 3.4849 12.0169H7.33031C7.84498 12.0169 8.19484 12.0164 8.46528 11.9943C8.7287 11.9728 8.86341 11.9338 8.95738 11.8859C9.18349 11.7707 9.36733 11.5869 9.48254 11.3608C9.53042 11.2668 9.56943 11.1321 9.59095 10.8687C9.61305 10.5982 9.61351 10.2484 9.61351 9.73368V3.4849C9.61351 2.97023 9.61305 2.62036 9.59095 2.34993C9.56943 2.08651 9.53042 1.9518 9.48254 1.85782C9.36733 1.63171 9.18349 1.44788 8.95738 1.33267C8.86341 1.28479 8.7287 1.24577 8.46528 1.22425C8.19484 1.20216 7.84498 1.20169 7.33031 1.20169H3.4849C2.97023 1.20169 2.62036 1.20216 2.34993 1.22425ZM2.40338 3.60507C2.40338 3.27323 2.67239 3.00422 3.00422 3.00422H7.81098C8.14282 3.00422 8.41183 3.27323 8.41183 3.60507C8.41183 3.93691 8.14282 4.20591 7.81098 4.20591H3.00422C2.67239 4.20591 2.40338 3.93691 2.40338 3.60507ZM2.40338 6.00845C2.40338 5.67661 2.67239 5.4076 3.00422 5.4076H6.60929C6.94113 5.4076 7.21014 5.67661 7.21014 6.00845C7.21014 6.34029 6.94113 6.60929 6.60929 6.60929H3.00422C2.67239 6.60929 2.40338 6.34029 2.40338 6.00845ZM2.40338 8.41183C2.40338 8.07999 2.67239 7.81098 3.00422 7.81098H4.20591C4.53775 7.81098 4.80676 8.07999 4.80676 8.41183C4.80676 8.74366 4.53775 9.01267 4.20591 9.01267H3.00422C2.67239 9.01267 2.40338 8.74366 2.40338 8.41183Z",fill:"white"})})}),W.jsx("h3",{className:"card-title",children:"Documentation Info"}),W.jsx("p",{className:"card-description",children:"Need help with integrations or docs? Genius has your back!"})]}),W.jsxs("div",{className:"option-card",children:[W.jsx("div",{className:"card-icon-wrapper red",children:W.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[W.jsx("path",{d:"M1 1V11C1 11.5523 1.44772 12 2 12H13",stroke:"white",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),W.jsx("path",{d:"M4 7L7 10L9 8L12 11",stroke:"white",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),W.jsx("path",{d:"M10 10L12 11L12 8.5",stroke:"white",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),W.jsx("h3",{className:"card-title",children:"SR Drop Analysis"}),W.jsx("p",{className:"card-description",children:"Detect & analyze success rate drops with instant RCA insights"})]})]})]}):W.jsxs("div",{ref:b,className:"messages-container",children:[r.map(S=>S.sender==="bot"&&d[S.id]&&d[S.id].length>0?W.jsx("div",{className:"bot-message-group",children:W.jsxs("div",{className:"message bot",children:[W.jsx("div",{className:"message-icon",children:W.jsx("img",{src:Sx,alt:"",width:"16",height:"16"})}),W.jsxs("div",{className:"bot-content-wrapper",children:[W.jsx(hC,{toolCalls:d[S.id],isVisible:!0,isActive:!1}),W.jsxs("div",{className:"message-bubble",children:[S.spokenText!==void 0?W.jsxs(W.Fragment,{children:[W.jsx("span",{className:"spoken-text",children:S.spokenText}),W.jsx("span",{className:"unspoken-text",children:S.text.substring(S.spokenText.length)})]}):S.text,S.isStreaming&&W.jsx("span",{className:"streaming-cursor"},`cursor-${S.id}`)]})]})]})},S.id):W.jsx("div",{children:W.jsxs("div",{className:`message ${S.sender}`,children:[S.sender==="bot"&&W.jsx("div",{className:"message-icon",children:W.jsx("img",{src:Sx,alt:"",width:"16",height:"16"})}),W.jsxs("div",{className:`message-bubble ${S.isPending?"pending":""}`,children:[S.isPending&&!S.text?W.jsx("div",{className:"pending-message",children:W.jsxs("span",{className:"loading-dots",children:[W.jsx("span",{}),W.jsx("span",{}),W.jsx("span",{})]})}):S.sender==="bot"&&S.spokenText!==void 0?W.jsxs(W.Fragment,{children:[W.jsx("span",{className:"spoken-text",children:S.spokenText}),W.jsx("span",{className:"unspoken-text",children:S.text.substring(S.spokenText.length)})]}):S.text,S.isStreaming&&W.jsx("span",{className:"streaming-cursor"},`cursor-${S.id}`)]})]})},S.id)),y&&W.jsxs("div",{className:"message bot",children:[W.jsx("div",{className:"message-icon",children:W.jsx("img",{src:Sx,alt:"",width:"16",height:"16"})}),W.jsx(hC,{toolCalls:o,isVisible:!0,isActive:!0})]})]}),N&&W.jsx("div",{className:"connecting-pill",children:W.jsx("span",{children:"Waiting for Genius..."})})]})}function vA(){const r=Yg(),o=u6()==="ready",{isMuted:c,setIsMuted:d}=pA(),[p,y]=Pe.useState(!1),[x,b]=Pe.useState(!1);pi(Et.UserStartedSpeaking,()=>{console.log("🎤 BottomBar: User started speaking - showing glow"),y(!0),b(!0)}),pi(Et.UserStoppedSpeaking,()=>{console.log("🎤 BottomBar: User stopped speaking - starting fade out"),y(!1)});const k=Pe.useCallback(()=>{const N=window.sendConversationHistory;N&&typeof N=="function"&&N(),window.postMessage({type:"CLOSE_VOICE_ASSISTANT"},"*")},[]),O=Pe.useCallback(async()=>{if(!r||!o){console.warn("Cannot toggle mute: client not ready");return}const N=!c;console.log(`🎤 BottomBar: Toggling mute from ${c} to ${N}`);try{let Z=!1;if(typeof r.enableMic=="function"&&(await r.enableMic(!N),console.log(`✅ RTVI client.enableMic(${!N})`),Z=!0),!Z&&r.transport){const J=r.transport;typeof J.setLocalAudio=="function"?(await J.setLocalAudio(!N),console.log(`✅ transport.setLocalAudio(${!N})`),Z=!0):J.room&&typeof J.room.setLocalAudio=="function"&&(await J.room.setLocalAudio(!N),console.log(`✅ transport.room.setLocalAudio(${!N})`),Z=!0)}Z||console.warn("⚠️ No mic control method found, but updating UI state"),d(N),console.log(`🎤 Microphone is now ${N?"MUTED":"UNMUTED"}`)}catch(Z){console.error("Failed to toggle microphone:",Z),d(N)}},[r,o,c,d]);return o?W.jsxs("div",{className:"bottom-bar-container",children:[x&&W.jsx("div",{className:`bottom-bar-glow ${p?"speaking":"fade-out"}`,onAnimationEnd:()=>{p||b(!1)},children:W.jsx("div",{className:"glow-bar"})}),W.jsxs("div",{className:"bottom-bar",children:[W.jsx("button",{className:"bar-button x-button",onClick:k,children:W.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.250586 0.250586C0.584702 -0.0835288 1.12641 -0.0835288 1.46052 0.250586L5.98889 4.77895L10.5173 0.250586C10.8514 -0.0835288 11.3931 -0.0835288 11.7272 0.250586C12.0613 0.584702 12.0613 1.12641 11.7272 1.46052L7.19883 5.98889L11.7272 10.5173C12.0613 10.8514 12.0613 11.3931 11.7272 11.7272C11.3931 12.0613 10.8514 12.0613 10.5173 11.7272L5.98889 7.19883L1.46052 11.7272C1.12641 12.0613 0.584702 12.0613 0.250586 11.7272C-0.0835288 11.3931 -0.0835288 10.8514 0.250586 10.5173L4.77895 5.98889L0.250586 1.46052C-0.0835288 1.12641 -0.0835288 0.584702 0.250586 0.250586Z",fill:"#F04438"})})}),W.jsx("span",{className:"bar-text",children:c?"Muted":p?"Listening...":"Start Speaking"}),W.jsxs("div",{className:"control-buttons",children:[W.jsx("button",{className:"bar-button",children:W.jsx("svg",{width:"15",height:"16",viewBox:"0 0 15 16",fill:"none",children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7 2.31609L5.28369 4.7324C5.27367 4.74243 5.26339 4.75275 5.25287 4.76333C5.13828 4.87853 4.994 5.02359 4.81745 5.13178C4.66436 5.2256 4.49745 5.29473 4.32285 5.33665C4.12151 5.38499 3.91692 5.38444 3.75444 5.38401C3.73951 5.38397 3.72495 5.38393 3.71077 5.38393H2.22445C1.97075 5.38393 1.83194 5.38459 1.73219 5.39274C1.72822 5.39307 1.72446 5.39339 1.72091 5.39372C1.72058 5.39727 1.72026 5.40103 1.71993 5.405C1.71178 5.50475 1.71112 5.64356 1.71112 5.89726V10.0039C1.71112 10.2576 1.71178 10.3964 1.71993 10.4962C1.72026 10.5002 1.72058 10.5039 1.72091 10.5075C1.72446 10.5078 1.72822 10.5081 1.73219 10.5084C1.83194 10.5166 1.97075 10.5173 2.22445 10.5173H3.71077C3.72495 10.5173 3.73951 10.5172 3.75444 10.5172C3.91692 10.5167 4.12151 10.5162 4.32285 10.5645C4.49745 10.6065 4.66436 10.6756 4.81745 10.7694C4.994 10.8776 5.13829 11.0227 5.25287 11.1379C5.2634 11.1484 5.27367 11.1588 5.28369 11.1688L7.7 13.5851V2.31609ZM8.02709 0.00396307C8.43663 -0.028268 8.83684 0.137506 9.10364 0.449882C9.34254 0.729603 9.38049 1.06606 9.39496 1.22937C9.41119 1.41243 9.41115 1.63981 9.41112 1.87113C9.41112 1.88174 9.41112 1.89236 9.41112 1.90299L9.41112 14.0301C9.41115 14.2614 9.41119 14.4888 9.39496 14.6718C9.38049 14.8351 9.34254 15.1716 9.10364 15.4513C8.83684 15.7637 8.43663 15.9295 8.02709 15.8972C7.66037 15.8684 7.39563 15.6573 7.26991 15.552C7.129 15.4341 6.96824 15.2733 6.8047 15.1097L4.07375 12.3787C3.9945 12.2995 3.9548 12.2601 3.92476 12.2326C3.92397 12.2319 3.92321 12.2312 3.92248 12.2306C3.9215 12.2305 3.92048 12.2305 3.91942 12.2304C3.87879 12.2286 3.82285 12.2284 3.71077 12.2284L2.19717 12.2284C1.98124 12.2284 1.77095 12.2284 1.59285 12.2139C1.39728 12.1979 1.16651 12.1602 0.934287 12.0419C0.61232 11.8778 0.350554 11.6161 0.186504 11.2941C0.0681833 11.0619 0.030481 10.8311 0.014502 10.6355C-4.86477e-05 10.4574 -2.3456e-05 10.2471 2.14354e-06 10.0312L4.38733e-06 5.89726C4.38733e-06 5.88815 3.26543e-06 5.87906 2.14354e-06 5.86997C-2.3456e-05 5.65404 -4.86477e-05 5.44375 0.014502 5.26566C0.030481 5.07009 0.0681833 4.83932 0.186504 4.6071C0.350554 4.28513 0.612321 4.02337 0.934287 3.85932C1.16651 3.74099 1.39728 3.70329 1.59285 3.68731C1.77094 3.67276 1.98123 3.67279 2.19716 3.67281C2.20625 3.67281 2.21534 3.67282 2.22445 3.67282H3.71077C3.82285 3.67282 3.87879 3.67261 3.91942 3.67075C3.92048 3.6707 3.9215 3.67066 3.92248 3.67061C3.92321 3.66995 3.92397 3.66926 3.92476 3.66854C3.9548 3.64112 3.9945 3.60171 4.07375 3.52246L6.78217 0.814043C6.78968 0.806531 6.79719 0.799021 6.80469 0.791516C6.96824 0.627921 7.12899 0.46712 7.26991 0.349145C7.39563 0.243896 7.66037 0.0328248 8.02709 0.00396307ZM12.1258 3.82666C12.5134 3.55633 13.0467 3.65136 13.317 4.03891C14.0905 5.14789 14.5443 6.49753 14.5443 7.95059C14.5443 9.40365 14.0905 10.7533 13.317 11.8623C13.0467 12.2498 12.5134 12.3449 12.1258 12.0745C11.7383 11.8042 11.6432 11.2709 11.9136 10.8834C12.4933 10.0522 12.8332 9.04238 12.8332 7.95059C12.8332 6.85881 12.4933 5.84897 11.9136 5.01783C11.6432 4.63029 11.7383 4.09698 12.1258 3.82666Z",fill:"#5F5F5F"})})}),W.jsxs("button",{className:`bar-button mic-button ${c?"muted":""}`,onClick:O,children:[W.jsx("svg",{width:"14",height:"19",viewBox:"0 0 14 19",fill:"none",children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.42222 3.42222C3.42222 1.53218 4.9544 0 6.84444 0C8.73449 0 10.2667 1.53218 10.2667 3.42222V9.41111C10.2667 11.3012 8.73449 12.8333 6.84444 12.8333C4.9544 12.8333 3.42222 11.3012 3.42222 9.41111V3.42222ZM6.84444 1.71111C5.89942 1.71111 5.13333 2.4772 5.13333 3.42222V9.41111C5.13333 10.3561 5.89942 11.1222 6.84444 11.1222C7.78947 11.1222 8.55556 10.3561 8.55556 9.41111V3.42222C8.55556 2.4772 7.78947 1.71111 6.84444 1.71111ZM0.855556 6.84444C1.32807 6.84444 1.71111 7.22749 1.71111 7.7V9.41111C1.71111 12.2462 4.00938 14.5444 6.84444 14.5444C9.67951 14.5444 11.9778 12.2462 11.9778 9.41111V7.7C11.9778 7.22749 12.3608 6.84444 12.8333 6.84444C13.3058 6.84444 13.6889 7.22749 13.6889 7.7V9.41111C13.6889 12.9015 11.0763 15.7816 7.7 16.2026V17.1111H10.2667C10.7392 17.1111 11.1222 17.4942 11.1222 17.9667C11.1222 18.4392 10.7392 18.8222 10.2667 18.8222H3.42222C2.94971 18.8222 2.56667 18.4392 2.56667 17.9667C2.56667 17.4942 2.94971 17.1111 3.42222 17.1111H5.98889V16.2026C2.6126 15.7816 0 12.9015 0 9.41111V7.7C0 7.22749 0.383045 6.84444 0.855556 6.84444Z",fill:"#5F5F5F"})}),W.jsxs("div",{className:"mic-tooltip",children:[W.jsx("span",{children:"Mute in noisy places."}),W.jsx("div",{className:"tooltip-arrow"})]})]})]})]})]}):null}function bA(r){const[i,o]=Pe.useState(r||[]),c=Pe.useRef({}),d=Pe.useRef([]);pi(Et.UserTranscript,y=>{y.final&&y.text&&(c.current={userMessage:y.text,response:[]},d.current=[],console.log("📝 [ConversationHistory] Started new entry with user message:",y.text))}),pi(Et.BotTranscript,y=>{y.text&&c.current.userMessage&&(c.current.botMessage=y.text,console.log("🤖 [ConversationHistory] Added bot message:",y.text))}),pi(Et.BotLlmText,y=>{y.text&&c.current.userMessage&&!c.current.botMessage&&(c.current.botMessage=y.text,console.log("🤖 [ConversationHistory] Added bot message from LLM:",y.text))}),pi(Et.ServerMessage,y=>{if(y.type==="tool-call-start"){const{functionName:x,arguments:b}=y.payload,N={payload_type:{q_api:"q_api",sr_analysis:"sr_analysis",field_value_discovery:"field_value_discovery",mid_lookup:"mid_lookup",math:"math"}[x]||x,input:b,output:null};d.current.push(N),console.log(`🔧 [ConversationHistory] Tool call started: ${x}`,b)}else if(y.type==="tool-call-result"){const{result:x}=y.payload,b=d.current.slice().reverse().find(k=>k.output===null);b&&(b.output=x,console.log("🔧 [ConversationHistory] Tool call result added:",x))}}),pi(Et.BotStoppedSpeaking,()=>{if(c.current.userMessage&&c.current.botMessage){c.current.response=[...d.current,{payload_type:"output_text",input:{},output:null}];const y={userMessage:c.current.userMessage,botMessage:c.current.botMessage,response:c.current.response};o(x=>[...x,y]),console.log("✅ [ConversationHistory] Conversation entry completed:",y),c.current={},d.current=[]}});const p=Pe.useCallback(()=>{window.parent!==window&&(console.log("📤 [ConversationHistory] Sending conversation history to parent:",i),window.parent.postMessage({type:"CONVERSATION_HISTORY",payload:i},"*"))},[i]);return Pe.useEffect(()=>{const y=()=>{p()};window.addEventListener("beforeunload",y);const x=()=>{document.visibilityState==="hidden"&&p()};return document.addEventListener("visibilitychange",x),()=>{window.removeEventListener("beforeunload",y),document.removeEventListener("visibilitychange",x)}},[p]),Pe.useEffect(()=>{i.length>0&&p()},[i,p]),{conversationHistory:i,sendDataToParent:p}}function xA(){const{initialHistory:r}=dC(),{sendDataToParent:i}=bA(r);return window.sendConversationHistory=i,W.jsxs("div",{className:"app",children:[W.jsx(mA,{}),W.jsx(yA,{}),W.jsx(vA,{}),W.jsx(c6,{})]})}function fC(){return W.jsx(hA,{children:W.jsx(gA,{children:W.jsx(fA,{children:W.jsx(xA,{})})})})}const yf=r=>{const i=r.toLowerCase();return i.includes("rate")||i.includes("percentage")||i.includes("percent")?"percentage":i.includes("volume")||i.includes("count")||i.includes("total")||i.includes("amount")||i.includes("transaction")||i.includes("order")||i.includes("number")||i.includes("quantity")?"volume":i.includes("latency")||i.includes("time")||i.includes("duration")?"latency":"default"},Ml=(r,i)=>{switch(i){case"percentage":return`${r}%`;case"volume":return r>=1e7?`${(r/1e7).toFixed(1)} Cr`:r>=1e5?`${(r/1e5).toFixed(1)} L`:r>=1e3?`${(r/1e3).toFixed(1)} K`:r.toLocaleString("en-IN");case"latency":return`${r.toFixed(2)} s`;default:return r.toString()}},wx=(r,i,o)=>{const c=[...r].sort((N,Z)=>new Date(N[i]).getTime()-new Date(Z[i]).getTime()),d=Object.keys(r[0]).filter(N=>N!==i&&N!==o);if(d.length===0){const N=[...new Set(c.map(J=>J[i]))],Z=N.map(J=>{const D=c.find(F=>F[i]===J);return D?Number(D[o]||0):null});return{hasDimensions:!1,series:[{type:"line",name:o.replace(/_/g," "),data:Z,connectNulls:!0}],categories:N.map(J=>new Date(J).toLocaleTimeString([],{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"}))}}const p=d[0],y=c.reduce((N,Z)=>{const J=Z[p];return N[J]||(N[J]=[]),N[J].push(Z),N},{}),x=[...new Set(c.map(N=>N[i]))],b=["#7856FF","#FEBBB2","#72BEF4","#1E90FF","#E377C2","#7FE1D8","#CB80DC","#5CB7AF","#1F77B4","#9467BD","#0F7EA0","#17BECF","#7F7F7F","#BCBD22","#A0872C","#006400","#B3596E","#4B0082","#4B6D8C"],k=Object.entries(y).map(([N,Z],J)=>{const D=new Map;Z.forEach(ae=>{D.set(ae[i],ae[o])});const F=x.map(ae=>{const ee=D.get(ae);return ee!==void 0?Number(ee):null});return{type:"line",name:N,color:b[J%b.length],data:F,connectNulls:!0}}),O=x.map(N=>new Date(N).toLocaleTimeString([],{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"}));return{hasDimensions:!0,series:k,categories:O}},pC=()=>{try{const r=localStorage.getItem("login")||"";return r?`Basic ${btoa(r+":")}`:(console.warn("No token found in localStorage"),"")}catch(r){return console.error("Error getting auth header:",r),""}},SA=({config:r={}})=>{const{onClose:i,onExpand:o,onMessage:c,placeholder:d="Ask Genius",welcomeMessage:p="Your go-to for all payment related inquiries!",suggestions:y=["Today's Success Rate","Last Week Volume","Today's Success Rate","Weekly Updates"],endpoint:x="https://genius.juspay.in/api/v3/analytics/"}=r,[b,k]=Pe.useState(""),[O,N]=Pe.useState(!0),[Z,J]=Pe.useState([]),[D,F]=Pe.useState(!1),[ae,ee]=Pe.useState(!1),[B,Y]=Pe.useState(!1),[$,Q]=Pe.useState(!1),[z,V]=Pe.useState(""),[le,se]=Pe.useState(!1),[K,L]=Pe.useState(null),[X,H]=Pe.useState(""),[A,S]=Pe.useState([]),[T,E]=Pe.useState(!1),[P,te]=Pe.useState(null),[_,re]=Pe.useState(!1),[me,g]=Pe.useState(null),w=Pe.useRef(null),C=Pe.useRef(null),q=Pe.useRef(null),ce=Pe.useRef(null),j=Pe.useRef(null);On.setOptions({breaks:!0,gfm:!0,pedantic:!1});const U=Pe.useCallback(Me=>{Me.stopPropagation();const ze=Me.currentTarget,{scrollTop:Xe,scrollHeight:Ve,clientHeight:Ie}=ze;Ve>Ie?(Me.deltaY<0&&Xe===0||Me.deltaY>0&&Xe+Ie>=Ve)&&Me.preventDefault():Me.preventDefault()},[]);Pe.useEffect(()=>{if(!O)return;const Me=document.body,ze=Me.style.overflow,Xe=Me.style.paddingRight;Me.style.overflow="hidden";const Ve=window.innerWidth-document.documentElement.clientWidth;Ve>0&&(Me.style.paddingRight=`${Ve}px`);const Ie=Ge=>{const pt=Ge.target,mt=q.current;mt&&!mt.contains(pt)&&(Ge.preventDefault(),Ge.stopPropagation())};return document.addEventListener("wheel",Ie,{passive:!1}),()=>{Me.style.overflow=ze,Me.style.paddingRight=Xe,document.removeEventListener("wheel",Ie)}},[O]),Pe.useEffect(()=>{if($){const Me=document.body,ze=Me.style.overflow;return Me.style.overflow="hidden",()=>{Me.style.overflow=ze}}},[$]);const ne=Pe.useCallback(()=>{i&&i()},[i]);Pe.useEffect(()=>{const Me=ze=>{ze.key==="Escape"&&ne()};return document.addEventListener("keydown",Me),()=>{document.removeEventListener("keydown",Me)}},[ne]),Pe.useEffect(()=>{(async()=>{try{await Ao.init(),await ge()}catch(ze){console.error("Failed to initialize chat history database:",ze)}})()},[]),Pe.useEffect(()=>{if(!le&&P){const Me=setTimeout(()=>{const{srOutput:ze,srPayload:Xe,userEmail:Ve}=P,Ie=(Date.now()+Math.random()).toString();J(Ge=>[...Ge,{id:Ie,content:"",role:"assistant",timestamp:new Date,srDropRCA:!0,srAnalysisData:ze,srAnalysisPayload:Xe,userEmail:Ve}]),te(null)},100);return()=>clearTimeout(Me)}},[le,P]);const ge=async()=>{try{E(!0);const Me=await Ao.loadSessions();console.log("Loaded chat sessions:",Me),S(Me)}catch(Me){console.error("Failed to load chat sessions:",Me)}finally{E(!1)}},R=async Me=>{try{console.log("Loading session messages for:",Me);const ze=await Ao.loadMessages(Me);console.log("Raw messages from DB:",ze);const Xe=[];for(const Ve of ze)if(Ve.role==="user"){const Ie={id:Ve.id,content:Ve.content,role:Ve.role,timestamp:Ve.timestamp,isFromHistory:!0};Xe.push(Ie)}else if(Ve.role==="assistant"){if(Ve.finalOutputData){console.log("Processing finalOutputData:",Ve.finalOutputData);const Ie=Ve.finalOutputData;if(Ie.responses&&Array.isArray(Ie.responses)){for(const Ge of Ie.responses)if(Ge.payload_type==="q_api"&&Ge.output)try{const pt=JSON.parse(Ge.output),mt=Ge.input?_c(Ge.input,"q_api"):"";if(pt.length>0){const ct=pt[0],_t=Object.keys(ct).find(Rt=>Rt.includes("_time"));if(_t){const Vt=Object.keys(ct).filter(xt=>xt!==_t&&!["gateway","payment_gateway","dimension","group","category"].includes(xt))[0];if(Vt){const xt=wx(pt,_t,Vt),lt={chart:{type:"line"},title:{text:`${Vt.replace(/_/g," ")}`},credits:{enabled:!1},xAxis:{categories:xt.categories,labels:{formatter:function(){const ht=String(this.value),ft=new Date(ht);return ft.getHours()===0&&ft.getMinutes()===0?`${ft.getDate()}. ${ft.toLocaleString("default",{month:"short"})}`:ht.split(", ")[1]},style:{color:"#9aa0a6"},rotation:0,align:"center"}},yAxis:{title:{text:""},gridLineColor:"#e0e0e0",gridLineDashStyle:"Dash",labels:{formatter:function(){var Ct;const ht=((Ct=this.chart.options.title)==null?void 0:Ct.text)||"",ft=yf(ht.replace(/ /g,"_"));return Ml(Number(this.value),ft)},style:{color:"#9aa0a6"}}},legend:{enabled:xt.hasDimensions,align:"left",verticalAlign:"top",layout:"horizontal",y:10,itemStyle:{fontSize:"12px"},symbolRadius:0,symbolHeight:0,symbolWidth:0,useHTML:!0,labelFormatter:function(){const ht=this.color||"#000",ft="name"in this?this.name:"";return'<span style="display: inline-flex; align-items: center;"><span style="background-color: '+ht+'; width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 5px;"></span>'+ft+"</span>"}},plotOptions:{series:{marker:{enabled:!1,symbol:"circle",radius:4,states:{hover:{enabled:!0,radius:5}}},states:{hover:{lineWidthPlus:1}}}},tooltip:{shared:!0,useHTML:!0,backgroundColor:"rgba(255, 255, 255, 0)",borderWidth:0,shadow:!1,style:{padding:"0px"},formatter:function(){var wt;const ht=yf(Vt),ft=Ot=>Ot.replace(/_/g," ").replace(/\b\w/g,Ht=>Ht.toUpperCase()),Ct=Ot=>{const Ht=new Date(Ot),Dt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],vt=["January","February","March","April","May","June","July","August","September","October","November","December"],nt=Dt[Ht.getDay()],Ut=Ht.getDate(),kt=vt[Ht.getMonth()],Tt=Ht.getFullYear();let jt=Ht.getHours();const nn=Ht.getMinutes(),It=jt>=12?"PM":"AM";jt=jt%12,jt=jt||12;const Yt=nn<10?"0"+nn:nn;return`${nt}, ${Ut} ${kt}, ${Tt} ${jt}:${Yt} ${It}`};let ut='<div style="border-radius: 12px; border: 1px solid #EAECF0; background: #FFF; box-shadow: 0px 6px 15px 0px rgba(0, 0, 0, 0.15), 0px 3px 2px -5px rgba(0, 0, 0, 0.04); padding: 16px;">';ut+='<div style="display: flex; font-family: Inter, sans-serif; gap: 16px; align-items: stretch;">';const bt=this.points?this.points[0].color:this.color||"#3BA974";if(ut+=`<div style="background:${bt}; width: 4px; flex-shrink: 0; border-radius: 4px; align-self: stretch;"></div>`,ut+='<div style="display: flex; flex-direction: column; gap: 12px;">',ut+='<div style="display: flex; flex-direction: column; gap: 4px;">',ut+=`<div style="color: #525252; font-feature-settings: 'clig' off, 'liga' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 600; line-height: 18px;">${ft(Vt)}</div>`,ut+="</div>",ut+='<div class="flex flex-col gap-1" style="display: flex; flex-direction: column; gap: 6px;">',this.points)[...this.points].sort((Ht,Dt)=>(Dt.y||0)-(Ht.y||0)).forEach(Ht=>{var Tt,jt;const Dt=Ml(Ht.y||0,ht),vt=((Tt=Ht.series)==null?void 0:Tt.name)==="Overall",nt=vt?"bg-jp-2-gray-30 text-jp-2-gray-700":"bg-jp-2-green-50 text-jp-2-green-200",Ut=vt?"#E8E8E8":"#D4F4E5",kt=vt?"#424242":"#008242";ut+='<div class="flex items-center" style="display: flex; align-items: center;">',ut+=`<div class="${nt} rounded p-1 font-semibold mr-1.5 my-1" style="background-color: ${Ut}; color: ${kt}; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${Dt}</div>`,ut+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((jt=Ht.series)==null?void 0:jt.name)||""}</div>`,ut+="</div>"});else{const Ot=Ml(this.y||0,ht);ut+='<div class="flex items-center" style="display: flex; align-items: center;">',ut+=`<div class="bg-jp-2-green-50 text-jp-2-green-200 rounded p-1 font-semibold mr-1.5 my-1" style="background-color: #D4F4E5; color: #008242; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${Ot}</div>`,ut+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((wt=this.series)==null?void 0:wt.name)||""}</div>`,ut+="</div>"}const yt=this.x?Ct(String(this.x)):"";return ut+=`<div class="font-medium text-jp-2-gray-300" style="font-weight: 500; color: #9AA0A6; font-size: 12px; margin-top: 4px;">${yt}</div>`,ut+="</div>",ut+="</div>",ut+="</div>",ut+="</div>",ut},xDateFormat:"%a, %d %B, %Y %H:%M"},series:xt.series};Xe.push({id:`${Ve.id}-chart`,content:"",role:"assistant",timestamp:Ve.timestamp,description:mt,chartData:lt,isFromHistory:!0})}}else if(pt.length===1){const Rt=Object.keys(ct)[0];if(Rt){const Vt={metric:Rt.replace(/_/g," "),value:ct[Rt]===null?"N/A":ct[Rt]};Xe.push({id:`${Ve.id}-stat`,content:"",role:"assistant",timestamp:Ve.timestamp,description:mt,singleStat:Vt,isFromHistory:!0})}}else Xe.push({id:`${Ve.id}-table`,content:"",role:"assistant",timestamp:Ve.timestamp,description:mt,tableData:pt,isFromHistory:!0})}}catch(pt){console.error("Error parsing stored response output:",pt)}}}if(!Ve.finalOutputData){if(Ve.chartData){const Ie={id:`${Ve.id}-legacy-chart`,content:"",role:"assistant",timestamp:Ve.timestamp,chartData:Ve.chartData,description:Ve.description,isFromHistory:!0};Xe.push(Ie)}if(Ve.singleStat){const Ie={id:`${Ve.id}-legacy-stat`,content:"",role:"assistant",timestamp:Ve.timestamp,singleStat:Ve.singleStat,description:Ve.description,isFromHistory:!0};Xe.push(Ie)}if(Ve.tableData){const Ie={id:`${Ve.id}-legacy-table`,content:"",role:"assistant",timestamp:Ve.timestamp,tableData:Ve.tableData,description:Ve.description,isFromHistory:!0};Xe.push(Ie)}}if(Ve.content){const Ie={id:Ve.id,content:Ve.content,role:Ve.role,timestamp:Ve.timestamp,isFromHistory:!0};Xe.push(Ie)}}console.log("Reconstructed messages:",Xe),J(Xe),V(Me),Q(!1)}catch(ze){console.error("Failed to load session messages:",ze)}},G=async(Me,ze,Xe,Ve)=>{const Ie=Ve||z;if(Ie)try{await Ao.saveMessage(Ie,Me,ze,Xe),await ge()}catch(Ge){console.error("Failed to save message to history:",Ge)}},ie=()=>{var Me;(Me=C.current)==null||Me.scrollIntoView({behavior:"smooth"})};Pe.useEffect(()=>{ie()},[Z]);const ue=()=>{N(!O),o&&o()};Pe.useEffect(()=>{if(B){const Me=localStorage.getItem("login")||"";Me?(window.postMessage({type:"AUTH_TOKEN",token:Me},"*"),console.log("Sent auth token to Voice Assistant")):console.warn("No auth token found in localStorage");const ze=Xe=>{var Ve;((Ve=Xe.data)==null?void 0:Ve.type)==="CLOSE_VOICE_ASSISTANT"&&Y(!1)};return window.addEventListener("message",ze),()=>{window.removeEventListener("message",ze)}}},[B]);const de=Me=>{var ze;k(Me),(ze=w.current)==null||ze.focus()},ye=()=>{b.trim()||(Y(!0),J(Me=>Me.map(ze=>({...ze,skipAnimation:!0}))))},Se=()=>{Y(!1)},Ce=()=>{Q(!0),ge()},Ae=()=>{Q(!1)},Ne=Me=>{R(Me.sessionId)},Re=async(Me,ze)=>{ze.stopPropagation();try{await Ao.deleteSession(Me),await ge()}catch(Xe){console.error("Failed to delete session:",Xe)}},fe=()=>{J([]),V(""),k(""),H(""),K&&(K.abort(),L(null)),F(!1),ee(!1),se(!1)},pe=()=>{if(K){K.abort(),L(null),F(!1),ee(!1);const Me={id:(Date.now()+Math.random()).toString(),content:"Request cancelled. You can retry your query.",role:"assistant",timestamp:new Date};J(ze=>[...ze,Me])}},ve=Me=>{const Xe=new Date().getTime()-Me.getTime(),Ve=Math.floor(Xe/6e4),Ie=Math.floor(Xe/36e5),Ge=Math.floor(Xe/864e5);return Ve<1?"Just now":Ve<60?`${Ve} min ago`:Ie<24?`${Ie} hour${Ie>1?"s":""} ago`:Ge<7?`${Ge} day${Ge>1?"s":""} ago`:Me.toLocaleDateString()},be=async()=>{var Me;if(X&&!D&&!le){const ze=X;J(Ve=>{let Ie=-1;for(let Ge=Ve.length-1;Ge>=0;Ge--)if(Ve[Ge].role==="user"){Ie=Ge;break}return Ie>=0?Ve.slice(0,Ie+1):Ve}),F(!0),ee(!0);const Xe=new AbortController;L(Xe);try{const Ve=pC();if(!Ve)throw new Error("Authentication token not found");const Ie={"Content-Type":"application/json",Authorization:Ve},Ge=new Date,pt=Ge.getFullYear()+"-"+String(Ge.getMonth()+1).padStart(2,"0")+"-"+String(Ge.getDate()).padStart(2,"0")+"T"+String(Ge.getHours()).padStart(2,"0")+":"+String(Ge.getMinutes()).padStart(2,"0")+":"+String(Ge.getSeconds()).padStart(2,"0")+"Z",mt=await fetch(x,{method:"POST",headers:{...Ie,Accept:"text/event-stream"},body:JSON.stringify({query:ze,current_timestamp:pt,session_id:z,regenerate:!0}),signal:Xe.signal});if(console.log("🔍 DEBUG: Response status:",mt.status),console.log("🔍 DEBUG: Response headers:",Object.fromEntries(mt.headers.entries())),!mt.ok)throw new Error(`API request failed with status ${mt.status}`);const ct=(Me=mt.body)==null?void 0:Me.getReader();if(!ct)throw new Error("Failed to get response reader");const _t=new TextDecoder;let Rt=null,Vt="",xt=0,lt="",ht=null;const ft={},Ct=z,ut=bt=>{var Ht;if(!bt.trim())return;const yt=bt.split(`
437
+ `);let wt="",Ot="";if(yt.forEach(Dt=>{Dt.startsWith("event: ")?wt=Dt.substring(7).trim():Dt.startsWith("data: ")&&(Ot&&(Ot+=`
438
+ `),Ot+=Dt.substring(6))}),console.log("🔍 DEBUG: Event type:",wt,"Data content:",Ot),Ot)try{const Dt=JSON.parse(Ot);if(console.log("🔍 DEBUG: Parsed data:",Dt),wt==="session_id"&&Dt.session_id)V(Dt.session_id);else if(wt==="agent_text_output"||wt==="final_output"){ee(!1);const vt=Dt.message||"";if(Vt=vt,Rt)J(nt=>nt.map(Ut=>Ut.id===Rt?{...Ut,content:vt,feedbackId:wt==="final_output"&&Dt.feedback_id?Dt.feedback_id:Ut.feedbackId}:Ut));else{const nt={id:(Date.now()+Math.random()).toString(),content:vt,role:"assistant",timestamp:new Date,feedbackId:wt==="final_output"&&Dt.feedback_id?Dt.feedback_id:void 0};Rt=nt.id,J(Ut=>[...Ut,nt])}wt==="final_output"&&(console.log("Final output received, will save after all data is processed"),Vt=vt,ft.finalOutputData=Dt,ht&&(te(ht),ht=null))}else if(wt==="tool_output"&&Dt.tool_name==="sr_analysis"){let vt={};try{vt=typeof Dt.output=="string"?JSON.parse(Dt.output):Dt.output}catch{vt={}}vt.is_SR_drop===!0&&(ht={srOutput:vt,srPayload:Dt.input?typeof Dt.input=="string"?JSON.parse(Dt.input):Dt.input:{},userEmail:vt.parent_email||""})}else if(wt==="tool_output"&&(Dt.tool_name==="q_api_gemini"||(Ht=Dt.tool_name)!=null&&Ht.startsWith("q_api"))){const vt=JSON.parse(Dt.output),nt=Dt.input?_c(Dt.input,Dt.tool_name):"";if(vt.length>0){const Ut=vt[0],kt=Object.keys(Ut).find(Tt=>Tt.includes("_time"));if(kt){const jt=Object.keys(Ut).filter(nn=>nn!==kt&&!["gateway","payment_gateway","dimension","group","category"].includes(nn))[0];if(jt){const nn=wx(vt,kt,jt),It={chart:{type:"line"},title:{text:`${jt.replace(/_/g," ")}`},credits:{enabled:!1},xAxis:{categories:nn.categories,labels:{formatter:function(){const At=String(this.value),Lt=new Date(At);return Lt.getHours()===0&&Lt.getMinutes()===0?`${Lt.getDate()}. ${Lt.toLocaleString("default",{month:"short"})}`:At.split(", ")[1]},style:{color:"#9aa0a6"},rotation:0,align:"center"}},yAxis:{title:{text:""},gridLineColor:"#e0e0e0",gridLineDashStyle:"Dash",labels:{formatter:function(){var en;const At=((en=this.chart.options.title)==null?void 0:en.text)||"",Lt=yf(At.replace(/ /g,"_"));return Ml(Number(this.value),Lt)},style:{color:"#9aa0a6"}}},legend:{enabled:nn.hasDimensions,align:"left",verticalAlign:"top",layout:"horizontal",y:10,itemStyle:{fontSize:"12px"},symbolRadius:0,symbolHeight:0,symbolWidth:0,useHTML:!0,labelFormatter:function(){const At=this.color||"#000",Lt="name"in this?this.name:"";return'<span style="display: inline-flex; align-items: center;"><span style="background-color: '+At+'; width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 5px;"></span>'+Lt+"</span>"}},plotOptions:{series:{marker:{enabled:!1,symbol:"circle",radius:4,states:{hover:{enabled:!0,radius:5}}},states:{hover:{lineWidthPlus:1}}}},tooltip:{shared:!0,useHTML:!0,backgroundColor:"rgba(255, 255, 255, 0)",borderWidth:0,shadow:!1,style:{padding:"0px"},formatter:function(){var jn;const At=yf(jt),Lt=Xt=>Xt.replace(/_/g," ").replace(/\b\w/g,Qt=>Qt.toUpperCase()),en=Xt=>{const Qt=new Date(Xt),hn=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],gi=["January","February","March","April","May","June","July","August","September","October","November","December"],ga=hn[Qt.getDay()],ma=Qt.getDate(),ci=gi[Qt.getMonth()],Xi=Qt.getFullYear();let ui=Qt.getHours();const Ui=Qt.getMinutes(),mi=ui>=12?"PM":"AM";ui=ui%12,ui=ui||12;const Xr=Ui<10?"0"+Ui:Ui;return`${ga}, ${ma} ${ci}, ${Xi} ${ui}:${Xr} ${mi}`};let Jt='<div style="border-radius: 12px; border: 1px solid #EAECF0; background: #FFF; box-shadow: 0px 6px 15px 0px rgba(0, 0, 0, 0.15), 0px 3px 2px -5px rgba(0, 0, 0, 0.04); padding: 16px;">';Jt+='<div style="display: flex; font-family: Inter, sans-serif; gap: 16px; align-items: stretch;">';const an=this.points?this.points[0].color:this.color||"#3BA974";if(Jt+=`<div style="background:${an}; width: 4px; flex-shrink: 0; border-radius: 4px; align-self: stretch;"></div>`,Jt+='<div style="display: flex; flex-direction: column; gap: 12px;">',Jt+='<div style="display: flex; flex-direction: column; gap: 4px;">',Jt+=`<div style="color: #525252; font-feature-settings: 'clig' off, 'liga' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 600; line-height: 18px;">${Lt(jt)}</div>`,Jt+="</div>",Jt+='<div class="flex flex-col gap-1" style="display: flex; flex-direction: column; gap: 6px;">',this.points)[...this.points].sort((Qt,hn)=>(hn.y||0)-(Qt.y||0)).forEach(Qt=>{var Xi,ui;const hn=Ml(Qt.y||0,At),gi=((Xi=Qt.series)==null?void 0:Xi.name)==="Overall",ga=gi?"bg-jp-2-gray-30 text-jp-2-gray-700":"bg-jp-2-green-50 text-jp-2-green-200",ma=gi?"#E8E8E8":"#D4F4E5",ci=gi?"#424242":"#008242";Jt+='<div class="flex items-center" style="display: flex; align-items: center;">',Jt+=`<div class="${ga} rounded p-1 font-semibold mr-1.5 my-1" style="background-color: ${ma}; color: ${ci}; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${hn}</div>`,Jt+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((ui=Qt.series)==null?void 0:ui.name)||""}</div>`,Jt+="</div>"});else{const Xt=Ml(this.y||0,At);Jt+='<div class="flex items-center" style="display: flex; align-items: center;">',Jt+=`<div class="bg-jp-2-green-50 text-jp-2-green-200 rounded p-1 font-semibold mr-1.5 my-1" style="background-color: #D4F4E5; color: #008242; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${Xt}</div>`,Jt+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((jn=this.series)==null?void 0:jn.name)||""}</div>`,Jt+="</div>"}const ai=this.x?en(String(this.x)):"";return Jt+=`<div class="font-medium text-jp-2-gray-300" style="font-weight: 500; color: #9AA0A6; font-size: 12px; margin-top: 4px;">${ai}</div>`,Jt+="</div>",Jt+="</div>",Jt+="</div>",Jt+="</div>",Jt},xDateFormat:"%a, %d %B, %Y %H:%M"},series:nn.series},Yt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:nt,chartData:It};J(At=>[...At,Yt]),ft.chartData=It,ft.description=nt}}else if(vt.length===1){const Tt=Object.keys(Ut)[0];if(Tt){const jt={metric:Tt.replace(/_/g," "),value:Ut[Tt]===null?"N/A":Ut[Tt]},nn={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:nt,singleStat:jt};J(It=>[...It,nn]),ft.singleStat=jt,ft.description=nt}}else{const Tt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:nt,tableData:vt};J(jt=>[...jt,Tt]),ft.tableData=vt,ft.description=nt}}}}catch(Dt){console.error("Error parsing SSE data:",Dt,"Raw data:",Ot)}};for(;;){const{done:bt,value:yt}=await ct.read();if(bt){console.log("🔍 DEBUG: Stream ended. Total chunks received:",xt),lt.trim()&&lt.split(`
439
+
440
+ `).filter(vt=>vt.trim()).forEach(vt=>ut(vt)),Ct&&Vt&&(console.log("Saving complete conversation to IndexedDB:",{sessionId:Ct,userMessage:ze,botResponse:Vt,metadata:ft}),G(ze,Vt,ft,Ct).catch(Dt=>{console.error("Failed to save message to IndexedDB:",Dt)}));break}xt++;const wt=_t.decode(yt,{stream:!0});console.log("🔍 DEBUG: Raw chunk #"+xt+":",wt),lt+=wt;const Ot=lt.split(`
441
+
442
+ `),Ht=Ot.slice(0,-1);lt=Ot[Ot.length-1],console.log("🔍 DEBUG: Complete events:",Ht.length,"Buffer remaining:",lt.length),Ht.forEach(Dt=>ut(Dt))}}catch(Ve){if(Ve instanceof Error&&Ve.name==="AbortError"){console.log("Request was aborted");return}console.error("Error sending message:",Ve);let Ie="Unable to connect to Genius Analytics. Please check your network connection and try again.";Ve instanceof Error&&Ve.message.includes("Authentication token not found")?Ie="Session expired or not authenticated. Please log in to continue using Genius Analytics.":Ve instanceof Error&&Ve.message.includes("status 401")?Ie="Invalid authentication credentials. Please log in with valid credentials.":Ve instanceof Error&&Ve.message.includes("status 403")?Ie="Access denied. You don't have permission to access this data.":Ve instanceof Error&&Ve.message.includes("status 404")?Ie="Analytics service not found. Please contact support if this issue persists.":Ve instanceof Error&&Ve.message.includes("status 500")?Ie="Server error occurred. Our team has been notified. Please try again later.":Ve instanceof Error&&Ve.message.includes("Failed to fetch")&&(Ie="Network error. Please check your internet connection and ensure the analytics service is accessible.");const Ge={id:(Date.now()+1).toString(),content:Ie,role:"assistant",timestamp:new Date};J(pt=>[...pt,Ge])}finally{F(!1),ee(!1),L(null)}}},ke=async()=>{var Ve;if(!b.trim()||D||le)return;const Me=b.trim();H(Me);const ze={id:Date.now().toString(),content:Me,role:"user",timestamp:new Date};J(Ie=>[...Ie,ze]),k(""),F(!0),ee(!0),c&&c(ze);const Xe=new AbortController;L(Xe);try{const Ie=pC();if(!Ie)throw new Error("Authentication token not found");const Ge={"Content-Type":"application/json",Authorization:Ie},pt=new Date,mt=pt.getFullYear()+"-"+String(pt.getMonth()+1).padStart(2,"0")+"-"+String(pt.getDate()).padStart(2,"0")+"T"+String(pt.getHours()).padStart(2,"0")+":"+String(pt.getMinutes()).padStart(2,"0")+":"+String(pt.getSeconds()).padStart(2,"0")+"Z",ct=await fetch(x,{method:"POST",headers:{...Ge,Accept:"text/event-stream"},body:JSON.stringify({query:Me,current_timestamp:mt,session_id:z}),signal:Xe.signal});if(console.log("🔍 DEBUG: Response status:",ct.status),console.log("🔍 DEBUG: Response headers:",Object.fromEntries(ct.headers.entries())),!ct.ok)throw new Error(`API request failed with status ${ct.status}`);const _t=(Ve=ct.body)==null?void 0:Ve.getReader();if(!_t)throw new Error("Failed to get response reader");const Rt=new TextDecoder;let Vt=null,xt="",lt=0,ht="",ft=null;const Ct={};let ut=z;const bt=yt=>{var Dt;if(!yt.trim())return;const wt=yt.split(`
443
+ `);let Ot="",Ht="";if(wt.forEach(vt=>{vt.startsWith("event: ")?Ot=vt.substring(7).trim():vt.startsWith("data: ")&&(Ht&&(Ht+=`
444
+ `),Ht+=vt.substring(6))}),console.log("🔍 DEBUG: Event type:",Ot,"Data content:",Ht),Ht)try{const vt=JSON.parse(Ht);if(console.log("🔍 DEBUG: Parsed data:",vt),Ot==="session_id"&&vt.session_id)V(vt.session_id),ut=vt.session_id;else if(Ot==="agent_text_output"||Ot==="final_output"){ee(!1);const nt=vt.message||"";if(xt=nt,Vt)J(Ut=>Ut.map(kt=>kt.id===Vt?{...kt,content:nt,feedbackId:Ot==="final_output"&&vt.feedback_id?vt.feedback_id:kt.feedbackId}:kt));else{const Ut={id:(Date.now()+Math.random()).toString(),content:nt,role:"assistant",timestamp:new Date,feedbackId:Ot==="final_output"&&vt.feedback_id?vt.feedback_id:void 0};Vt=Ut.id,J(kt=>[...kt,Ut])}Ot==="final_output"&&(console.log("Final output received, will save after all data is processed"),xt=nt,Ct.finalOutputData=vt,ft&&(te(ft),ft=null))}else if(Ot==="tool_output"&&(vt.tool_name==="q_api_gemini"||(Dt=vt.tool_name)!=null&&Dt.startsWith("q_api"))){const nt=JSON.parse(vt.output),Ut=vt.input?_c(vt.input,vt.tool_name):"";if(nt.length>0){const kt=nt[0],Tt=Object.keys(kt).find(jt=>jt.includes("_time"));if(Tt){const nn=Object.keys(kt).filter(It=>It!==Tt&&!["gateway","payment_gateway","dimension","group","category"].includes(It))[0];if(nn){const It=wx(nt,Tt,nn),Yt={chart:{type:"line"},title:{text:`${nn.replace(/_/g," ")}`},xAxis:{categories:It.categories,labels:{formatter:function(){const Lt=String(this.value),en=new Date(Lt);return en.getHours()===0&&en.getMinutes()===0?`${en.getDate()}. ${en.toLocaleString("default",{month:"short"})}`:Lt.split(", ")[1]},style:{color:"#9aa0a6"}}},yAxis:{title:{text:""},gridLineColor:"#e0e0e0",gridLineDashStyle:"Dash",labels:{formatter:function(){var Jt;const Lt=((Jt=this.chart.options.title)==null?void 0:Jt.text)||"",en=yf(Lt.replace(/ /g,"_"));return Ml(Number(this.value),en)},style:{color:"#9aa0a6"}}},legend:{enabled:It.hasDimensions,align:"left",verticalAlign:"top",layout:"horizontal",y:10,itemStyle:{fontSize:"12px"},symbolRadius:0,symbolHeight:0,symbolWidth:0,useHTML:!0,labelFormatter:function(){const Lt=this.color||"#000",en="name"in this?this.name:"";return'<span style="display: inline-flex; align-items: center;"><span style="background-color: '+Lt+'; width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 5px;"></span>'+en+"</span>"}},plotOptions:{series:{marker:{enabled:!1,symbol:"circle",radius:4,states:{hover:{enabled:!0,radius:5}}},states:{hover:{lineWidthPlus:1}}}},tooltip:{shared:!0,useHTML:!0,backgroundColor:"rgba(255, 255, 255, 0)",borderWidth:0,shadow:!1,style:{padding:"0px"},formatter:function(){var Xt;const Lt=yf(nn),en=Qt=>Qt.replace(/_/g," ").replace(/\b\w/g,hn=>hn.toUpperCase()),Jt=Qt=>{const hn=new Date(Qt),gi=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ga=["January","February","March","April","May","June","July","August","September","October","November","December"],ma=gi[hn.getDay()],ci=hn.getDate(),Xi=ga[hn.getMonth()],ui=hn.getFullYear();let Ui=hn.getHours();const mi=hn.getMinutes(),Xr=Ui>=12?"PM":"AM";Ui=Ui%12,Ui=Ui||12;const wd=mi<10?"0"+mi:mi;return`${ma}, ${ci} ${Xi}, ${ui} ${Ui}:${wd} ${Xr}`};let an='<div style="border-radius: 12px; border: 1px solid #EAECF0; background: #FFF; box-shadow: 0px 6px 15px 0px rgba(0, 0, 0, 0.15), 0px 3px 2px -5px rgba(0, 0, 0, 0.04); padding: 16px;">';an+='<div style="display: flex; font-family: Inter, sans-serif; gap: 16px; align-items: stretch;">';const ai=this.points?this.points[0].color:this.color||"#3BA974";if(an+=`<div style="background:${ai}; width: 4px; flex-shrink: 0; border-radius: 4px; align-self: stretch;"></div>`,an+='<div style="display: flex; flex-direction: column; gap: 12px;">',an+='<div style="display: flex; flex-direction: column; gap: 4px;">',an+=`<div style="color: #525252; font-feature-settings: 'clig' off, 'liga' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 600; line-height: 18px;">${en(nn)}</div>`,an+="</div>",an+='<div class="flex flex-col gap-1" style="display: flex; flex-direction: column; gap: 6px;">',this.points)[...this.points].sort((hn,gi)=>(gi.y||0)-(hn.y||0)).forEach(hn=>{var ui,Ui;const gi=Ml(hn.y||0,Lt),ga=((ui=hn.series)==null?void 0:ui.name)==="Overall",ma=ga?"bg-jp-2-gray-30 text-jp-2-gray-700":"bg-jp-2-green-50 text-jp-2-green-200",ci=ga?"#E8E8E8":"#D4F4E5",Xi=ga?"#424242":"#008242";an+='<div class="flex items-center" style="display: flex; align-items: center;">',an+=`<div class="${ma} rounded p-1 font-semibold mr-1.5 my-1" style="background-color: ${ci}; color: ${Xi}; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${gi}</div>`,an+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((Ui=hn.series)==null?void 0:Ui.name)||""}</div>`,an+="</div>"});else{const Qt=Ml(this.y||0,Lt);an+='<div class="flex items-center" style="display: flex; align-items: center;">',an+=`<div class="bg-jp-2-green-50 text-jp-2-green-200 rounded p-1 font-semibold mr-1.5 my-1" style="background-color: #D4F4E5; color: #008242; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${Qt}</div>`,an+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((Xt=this.series)==null?void 0:Xt.name)||""}</div>`,an+="</div>"}const jn=this.x?Jt(String(this.x)):"";return an+=`<div class="font-medium text-jp-2-gray-300" style="font-weight: 500; color: #9AA0A6; font-size: 12px; margin-top: 4px;">${jn}</div>`,an+="</div>",an+="</div>",an+="</div>",an+="</div>",an},xDateFormat:"%a, %d %B, %Y %H:%M"},series:It.series},At={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:Ut,chartData:Yt};J(Lt=>[...Lt,At]),Ct.chartData=Yt,Ct.description=Ut}}else if(nt.length===1){const jt=Object.keys(kt)[0];if(jt){const nn={metric:jt.replace(/_/g," "),value:kt[jt]===null?"N/A":kt[jt]},It={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:Ut,singleStat:nn};J(Yt=>[...Yt,It]),Ct.singleStat=nn,Ct.description=Ut}}else{const jt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:Ut,tableData:nt};J(nn=>[...nn,jt]),Ct.tableData=nt,Ct.description=Ut}}}else if(Ot==="tool_output"&&vt.tool_name==="sr_analysis"){let nt={};try{nt=typeof vt.output=="string"?JSON.parse(vt.output):vt.output}catch{nt={}}nt.is_SR_drop===!0&&(ft={srOutput:nt,srPayload:vt.input?typeof vt.input=="string"?JSON.parse(vt.input):vt.input:{},userEmail:nt.parent_email||""})}}catch(vt){console.error("Error parsing SSE data:",vt,"Raw data:",Ht)}};for(;;){const{done:yt,value:wt}=await _t.read();if(yt){console.log("🔍 DEBUG: Stream ended. Total chunks received:",lt),ht.trim()&&ht.split(`
445
+
446
+ `).filter(nt=>nt.trim()).forEach(nt=>bt(nt)),ut&&xt&&(console.log("Saving complete conversation to IndexedDB:",{sessionId:ut,userMessage:Me,botResponse:xt,metadata:Ct}),G(Me,xt,Ct,ut).catch(vt=>{console.error("Failed to save message to IndexedDB:",vt)}));break}lt++;const Ot=Rt.decode(wt,{stream:!0});console.log("🔍 DEBUG: Raw chunk #"+lt+":",Ot),ht+=Ot;const Ht=ht.split(`
447
+
448
+ `),Dt=Ht.slice(0,-1);ht=Ht[Ht.length-1],console.log("🔍 DEBUG: Complete events:",Dt.length,"Buffer remaining:",ht.length),Dt.forEach(vt=>bt(vt))}}catch(Ie){if(Ie instanceof Error&&Ie.name==="AbortError"){console.log("Request was aborted");return}console.error("Error sending message:",Ie);let Ge="Unable to connect to Genius Analytics. Please check your network connection and try again.";Ie instanceof Error&&Ie.message.includes("Authentication token not found")?Ge="Session expired or not authenticated. Please log in to continue using Genius Analytics.":Ie instanceof Error&&Ie.message.includes("status 401")?Ge="Invalid authentication credentials. Please log in with valid credentials.":Ie instanceof Error&&Ie.message.includes("status 403")?Ge="Access denied. You don't have permission to access this data.":Ie instanceof Error&&Ie.message.includes("status 404")?Ge="Analytics service not found. Please contact support if this issue persists.":Ie instanceof Error&&Ie.message.includes("status 500")?Ge="Server error occurred. Our team has been notified. Please try again later.":Ie instanceof Error&&Ie.message.includes("Failed to fetch")&&(Ge="Network error. Please check your internet connection and ensure the analytics service is accessible.");const pt={id:(Date.now()+1).toString(),content:Ge,role:"assistant",timestamp:new Date};J(mt=>[...mt,pt])}finally{F(!1),ee(!1),L(null)}},Ee=Me=>{Me.key==="Enter"&&!Me.shiftKey&&(Me.preventDefault(),D?pe():ke())},_e=W.jsx("div",{className:"genius-dashboard-input-area",children:!B&&W.jsxs("div",{className:`genius-dashboard-input-container ${Z.length>0?"single-line":""}`,children:[Z.length===0?W.jsx("textarea",{ref:w,placeholder:d,value:b,onChange:Me=>k(Me.target.value),onKeyDown:Ee,className:"genius-dashboard-input",rows:2}):W.jsx("input",{ref:w,type:"text",placeholder:d,value:b,onChange:Me=>k(Me.target.value),onKeyDown:Ee,className:"genius-dashboard-input single-line-input"}),W.jsx("div",{className:"genius-dashboard-input-actions",children:W.jsxs("div",{className:"genius-dashboard-voice-container",children:[W.jsx("button",{className:"genius-dashboard-microphone-button","aria-label":"Voice input",onClick:ye,disabled:D||le,children:W.jsx(yT,{})}),D?W.jsx("button",{className:"genius-dashboard-cancel-button","aria-label":"Cancel",onClick:pe,children:W.jsx(v3,{})}):W.jsxs("div",{className:"genius-dashboard-send-retry-container",children:[X&&W.jsx(W.Fragment,{}),W.jsx("button",{className:"genius-dashboard-send-button","aria-label":"Send",onClick:ke,disabled:le,children:W.jsx(vT,{})})]})]})})]})}),Le=r&&r.userEmail||"",Be=Me=>{g(Me),re(!0),J(ze=>ze.map(Xe=>({...Xe,skipAnimation:!0})))},$e=async Me=>{const ze=localStorage.getItem("login")||"",Xe=Z.find(Ve=>Ve.id===me);if(!(!(Xe!=null&&Xe.feedbackId)||!ze))try{const Ve=x.replace(/\/api\/v3\/analytics\/?$/,""),Ie=`Basic ${btoa(ze+":")}`,Ge=await fetch(`${Ve}/api/v3/analytics/feedback`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:Ie},body:JSON.stringify({id:Xe.feedbackId,feedbackEnum:"DISLIKE",feedbackText:Me})});Ge.ok?(J(pt=>pt.map(mt=>mt.id===me?{...mt,hasDisliked:!0,skipAnimation:!0}:mt)),re(!1),g(null),console.log("Dislike feedback submitted successfully")):console.error("Failed to submit dislike feedback",Ge.status,Ge.statusText)}catch(Ve){console.error("Error submitting dislike feedback:",Ve)}};return W.jsxs(W.Fragment,{children:[W.jsx("div",{className:`genius-dashboard-backdrop ${O?"visible":""}`}),W.jsxs("div",{className:`genius-dashboard-container ${O?"expanded":""}`,ref:q,children:[$&&W.jsx("div",{className:"genius-dashboard-history-overlay",children:W.jsxs("div",{className:"genius-dashboard-history-container",children:[W.jsxs("div",{className:"genius-dashboard-history-header",children:[W.jsxs("div",{className:"genius-dashboard-history-header-left",children:[W.jsx("button",{className:"genius-dashboard-history-back",onClick:Ae,"aria-label":"Back",children:W.jsx(m3,{})}),W.jsx("h2",{children:"Chat History"})]}),W.jsxs("div",{className:"genius-dashboard-history-actions",children:[W.jsx("button",{className:"genius-dashboard-history-action","aria-label":"New Chat",onClick:()=>{fe(),Ae()},children:W.jsx(Qb,{})}),W.jsx("button",{className:"genius-dashboard-history-action","aria-label":"Close",onClick:ne,children:W.jsx(p3,{})})]})]}),W.jsx("div",{className:"genius-dashboard-history-list",ref:j,onWheel:U,children:T?W.jsx("div",{className:"genius-dashboard-history-loading",children:"Loading history..."}):A.length===0?W.jsx("div",{className:"genius-dashboard-history-empty",children:"No chat history found"}):A.map(Me=>W.jsxs("div",{className:"genius-dashboard-history-item",onClick:()=>Ne(Me),children:[W.jsxs("div",{className:"genius-dashboard-history-item-content",children:[W.jsx("div",{className:"genius-dashboard-history-item-title",children:Me.title}),W.jsxs("div",{className:"genius-dashboard-history-item-date",children:[ve(Me.timestamp)," • ",Me.messageCount," messages"]})]}),W.jsx("button",{className:"genius-dashboard-history-item-delete",onClick:ze=>Re(Me.sessionId,ze),"aria-label":"Delete session",children:W.jsx(y3,{})})]},Me.sessionId))})]})}),W.jsxs("div",{className:"genius-dashboard-top-bar",children:[W.jsx("div",{className:"genius-dashboard-icons-left",children:W.jsx("button",{className:`genius-dashboard-icon-container ${_?"with-text":""}`,onClick:_?()=>re(!1):ue,"aria-label":_?"Back":O?"Collapse":"Expand",children:_?W.jsxs(W.Fragment,{children:[W.jsx(b3,{}),W.jsx("span",{className:"genius-dashboard-back-text",children:"Back"})]}):O?W.jsx(gT,{}):W.jsx(pT,{})})}),W.jsxs("div",{className:"genius-dashboard-icons-right",children:[Z.length>0&&!_&&W.jsx("button",{className:"genius-dashboard-icon-container","aria-label":"Edit",onClick:fe,children:W.jsx(Qb,{})}),W.jsx("button",{className:"genius-dashboard-icon-container","aria-label":"History",onClick:()=>{_&&re(!1),B&&Y(!1),Ce()},children:W.jsx(mT,{})}),W.jsx("button",{className:"genius-dashboard-icon-container",onClick:ne,"aria-label":"Close",children:W.jsx(p3,{})})]})]}),W.jsxs("div",{className:"genius-dashboard-body",children:[_?W.jsx("div",{className:"genius-dashboard-feedback-overlay",children:W.jsx(A3,{feedbackType:"DISLIKE",onFeedbackClick:$e,onBack:()=>re(!1),onClose:()=>re(!1),onHistoryClick:()=>{re(!1),Ce()}})}):B?W.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"#fff",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden"},children:[W.jsx("button",{className:"genius-dashboard-close-voice-button",onClick:Se,"aria-label":"Close voice mode",style:{position:"absolute",top:"16px",right:"16px",zIndex:1001,background:"#fff",border:"1px solid #e1e1e1",borderRadius:"50%",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},children:W.jsx(g3,{})}),W.jsxs("div",{className:"genius-voice-assistant-wrapper",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",position:"relative",overflow:"hidden"},children:[W.jsx("style",{children:`
449
+ .genius-voice-assistant-wrapper .bottom-bar-container {
450
+ position: absolute !important;
451
+ bottom: 20px !important;
452
+ left: 50% !important;
453
+ transform: translateX(-50%) !important;
454
+ width: calc(100% - 32px) !important;
455
+ max-width: 350px !important;
456
+ z-index: 10 !important;
457
+ }
458
+ .genius-voice-assistant-wrapper .app {
459
+ height: 100% !important;
460
+ position: relative !important;
461
+ }
462
+ .genius-voice-assistant-wrapper .simple-chat {
463
+ height: calc(100% - 100px) !important;
464
+ }
465
+ `}),W.jsx(fC,{})]})]}):Z.length===0?W.jsxs(W.Fragment,{children:[W.jsxs("div",{className:"genius-dashboard-branding",children:[W.jsx("div",{className:"genius-dashboard-logo-container",children:W.jsx("div",{className:"genius-dashboard-logo",children:W.jsx(ey,{})})}),W.jsxs("div",{className:"genius-dashboard-welcome",children:[W.jsx("h2",{children:"Meet Genius 👋"}),W.jsx("p",{children:p})]})]}),!$&&_e,W.jsx("div",{className:"genius-dashboard-suggestions",children:y.map((Me,ze)=>W.jsxs("button",{className:"genius-dashboard-suggestion",onClick:()=>de(Me),children:[Me==="Weekly Updates"&&W.jsx(xT,{}),W.jsx("span",{children:Me})]},ze))})]}):W.jsxs(W.Fragment,{children:[W.jsx("div",{className:"genius-dashboard-conversation",ref:ce,onWheel:U,children:W.jsxs("div",{className:"genius-dashboard-messages-container",children:[Z.map((Me,ze)=>Me.srDropRCA?W.jsx(JT,{data:Me.srAnalysisData||{},updatedPayload:Me.srAnalysisPayload||{},userEmail:Me.userEmail||Le},Me.id):Me.role==="assistant"?W.jsx(C3,{message:Me,showIcon:ze===0||Z[ze-1].role!=="assistant",onTypingStateChange:se,skipAnimation:Me.isFromHistory,onRetry:be,isLastMessage:!!Me.content&&ze===Z.length-1&&!ae,onDislike:()=>Be(Me.id),endpoint:x},Me.id):W.jsx("div",{className:`genius-dashboard-message ${Me.role}`,children:W.jsx("div",{className:"genius-dashboard-message-bubble",children:W.jsx("div",{className:"genius-dashboard-message-content",dangerouslySetInnerHTML:{__html:Me.content}})})},Me.id)),ae&&W.jsxs("div",{className:"genius-dashboard-message assistant",children:[W.jsx("div",{className:"genius-dashboard-assistant-icon",children:W.jsx(ey,{})}),W.jsx("div",{className:"genius-dashboard-thinking",children:"Thinking"})]}),W.jsx("div",{ref:C})]})}),!$&&_e]}),Z.length===0&&W.jsxs("div",{className:"genius-dashboard-security-info",children:[W.jsx(bT,{}),W.jsx("span",{children:"Your transaction data is secure, private, and never stored or shared."})]})]})]})]})},Do=r=>{const i=r.toLowerCase();return i.includes("rate")||i.includes("percentage")||i.includes("percent")?"percentage":i.includes("volume")||i.includes("count")||i.includes("total")||i.includes("amount")?"volume":i.includes("latency")||i.includes("time")||i.includes("duration")?"latency":"default"},Ya=(r,i)=>{switch(i){case"percentage":return`${r}%`;case"volume":return r>=1e7?`${(r/1e7).toFixed(2)} Cr`:r>=1e5?`${(r/1e5).toFixed(2)} L`:r>=1e3?`${(r/1e3).toFixed(2)} K`:r.toString();case"latency":return`${r.toFixed(2)} s`;default:return r.toString()}},sm=(r,i,o)=>{const c=[...r].sort((N,Z)=>new Date(N[i]).getTime()-new Date(Z[i]).getTime()),d=Object.keys(r[0]).filter(N=>N!==i&&N!==o);if(d.length===0){const N=[...new Set(c.map(J=>J[i]))],Z=N.map(J=>{const D=c.find(F=>F[i]===J);return D?Number(D[o]||0):null});return{hasDimensions:!1,series:[{type:"line",name:o.replace(/_/g," "),data:Z,connectNulls:!0}],categories:N.map(J=>new Date(J).toLocaleTimeString([],{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"}))}}const p=d[0],y=c.reduce((N,Z)=>{const J=Z[p];return N[J]||(N[J]=[]),N[J].push(Z),N},{}),x=[...new Set(c.map(N=>N[i]))],b=["#7856FF","#FEBBB2","#72BEF4","#1E90FF","#E377C2","#7FE1D8","#CB80DC","#5CB7AF","#1F77B4","#9467BD","#0F7EA0","#17BECF","#7F7F7F","#BCBD22","#A0872C","#006400","#B3596E","#4B0082","#4B6D8C"],k=Object.entries(y).map(([N,Z],J)=>{const D=new Map;Z.forEach(ae=>{D.set(ae[i],ae[o])});const F=x.map(ae=>{const ee=D.get(ae);return ee!==void 0?Number(ee):null});return{type:"line",name:N,color:b[J%b.length],data:F,connectNulls:!0}}),O=x.map(N=>new Date(N).toLocaleTimeString([],{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"}));return{hasDimensions:!0,series:k,categories:O}},gC=()=>{try{const r=localStorage.getItem("login")||"";return r?`Basic ${btoa(r+":")}`:(console.warn("No token found in localStorage"),"")}catch(r){return console.error("Error getting auth header:",r),""}},mC=({config:r={}})=>{const{welcomeMessage:i="Your go-to for all payment related inquiries!",placeholder:o="Ask Genius",suggestions:c=["How to integrate?","Pricing Plan","Supported Gateways"],theme:d={},endpoint:p="https://genius.juspay.in/api/v3/analytics/",onMessage:y,onClose:x}=r;On.setOptions({breaks:!0,gfm:!0,pedantic:!1});const[b,k]=Pe.useState([]),[O,N]=Pe.useState(""),[Z,J]=Pe.useState(!1),[D,F]=Pe.useState(!1),[ae,ee]=Pe.useState(!1),[B,Y]=Pe.useState(null),[$,Q]=Pe.useState(""),[z,V]=Pe.useState(!1),[le,se]=Pe.useState([]),[K,L]=Pe.useState(!1),[X,H]=Pe.useState(""),[A,S]=Pe.useState(!1),[T,E]=Pe.useState(null),[P,te]=Pe.useState(!1),_=Pe.useRef(null),re=Pe.useRef(null),me=Pe.useRef(null);Pe.useEffect(()=>{(async()=>{try{await Ao.init(),await g()}catch(pe){console.error("Failed to initialize chat history database:",pe)}})()},[]);const g=async()=>{try{L(!0);const fe=await Ao.loadSessions();console.log("Loaded chat sessions:",fe),se(fe)}catch(fe){console.error("Failed to load chat sessions:",fe)}finally{L(!1)}},w=async fe=>{try{console.log("Loading session messages for:",fe);const pe=await Ao.loadMessages(fe);console.log("Raw messages from DB:",pe);const ve=[];for(const be of pe)if(be.role==="user"){const ke={id:be.id,content:be.content,role:be.role,timestamp:be.timestamp,isFromHistory:!0};ve.push(ke)}else if(be.role==="assistant"){if(be.finalOutputData){console.log("Processing finalOutputData:",be.finalOutputData);const ke=be.finalOutputData;if(ke.responses&&Array.isArray(ke.responses)){for(const Ee of ke.responses)if(Ee.payload_type==="q_api"&&Ee.output)try{const _e=JSON.parse(Ee.output),Le=Ee.input?_c(Ee.input,"q_api"):"";if(_e.length>0){const Be=_e[0],$e=Object.keys(Be).find(Me=>Me.includes("_time"));if($e){const ze=Object.keys(Be).filter(Xe=>Xe!==$e&&!["gateway","payment_gateway","dimension","group","category"].includes(Xe))[0];if(ze){const Xe=sm(_e,$e,ze),Ve=Do(ze),Ie={chart:{type:"line"},title:{text:`${ze.replace(/_/g," ")}`},credits:{enabled:!1},xAxis:{categories:Xe.categories,labels:{formatter:function(){const Ge=String(this.value),pt=new Date(Ge);return pt.getHours()===0&&pt.getMinutes()===0?`${pt.getDate()}. ${pt.toLocaleString("default",{month:"short"})}`:Ge.split(", ")[1]},style:{color:"#9aa0a6"},rotation:0,align:"center",step:4}},yAxis:{title:{text:""},gridLineColor:"#e0e0e0",gridLineDashStyle:"Dash",labels:{formatter:function(){return Ya(Number(this.value),Ve)},style:{color:"#9aa0a6"}}},legend:{enabled:Xe.hasDimensions,align:"left",verticalAlign:"top",layout:"horizontal",y:10,itemStyle:{fontSize:"11px"},symbolRadius:0,symbolHeight:0,symbolWidth:0,useHTML:!0,labelFormatter:function(){return'<span style="display: inline-flex; align-items: center;"><span style="background-color: '+this.color+'; width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 4px;"></span>'+this.name+"</span>"}},plotOptions:{series:{marker:{enabled:!1,symbol:"circle",radius:3,states:{hover:{enabled:!0,radius:4}}},states:{hover:{lineWidthPlus:1}}}},tooltip:{shared:!0,useHTML:!0,backgroundColor:"rgba(255, 255, 255, 0)",borderWidth:0,shadow:!1,style:{padding:"0px"},formatter:function(){var Vt;const Ge=Do(ze),pt=xt=>xt.replace(/_/g," ").replace(/\b\w/g,lt=>lt.toUpperCase()),mt=xt=>{const lt=new Date(xt),ht=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ft=["January","February","March","April","May","June","July","August","September","October","November","December"],Ct=ht[lt.getDay()],ut=lt.getDate(),bt=ft[lt.getMonth()],yt=lt.getFullYear();let wt=lt.getHours();const Ot=lt.getMinutes(),Ht=wt>=12?"PM":"AM";wt=wt%12,wt=wt||12;const Dt=Ot<10?"0"+Ot:Ot;return`${Ct}, ${ut} ${bt}, ${yt} ${wt}:${Dt} ${Ht}`};let ct='<div style="border-radius: 12px; border: 1px solid #EAECF0; background: #FFF; box-shadow: 0px 6px 15px 0px rgba(0, 0, 0, 0.15), 0px 3px 2px -5px rgba(0, 0, 0, 0.04); padding: 16px;">';ct+='<div style="display: flex; font-family: Inter, sans-serif; gap: 16px; align-items: stretch;">';const _t=this.points?this.points[0].color:this.color||"#3BA974";if(ct+=`<div style="background:${_t}; width: 4px; flex-shrink: 0; border-radius: 4px; align-self: stretch;"></div>`,ct+='<div style="display: flex; flex-direction: column; gap: 12px;">',ct+='<div style="display: flex; flex-direction: column; gap: 4px;">',ct+=`<div style="color: #525252; font-feature-settings: 'clig' off, 'liga' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 600; line-height: 18px;">${pt(ze)}</div>`,ct+="</div>",ct+='<div class="flex flex-col gap-1" style="display: flex; flex-direction: column; gap: 6px;">',this.points)[...this.points].sort((lt,ht)=>(ht.y||0)-(lt.y||0)).forEach(lt=>{var yt,wt;const ht=Ya(lt.y||0,Ge),ft=((yt=lt.series)==null?void 0:yt.name)==="Overall",Ct=ft?"bg-jp-2-gray-30 text-jp-2-gray-700":"bg-jp-2-green-50 text-jp-2-green-200",ut=ft?"#E8E8E8":"#D4F4E5",bt=ft?"#424242":"#008242";ct+='<div class="flex items-center" style="display: flex; align-items: center;">',ct+=`<div class="${Ct} rounded p-1 font-semibold mr-1.5 my-1" style="background-color: ${ut}; color: ${bt}; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${ht}</div>`,ct+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((wt=lt.series)==null?void 0:wt.name)||""}</div>`,ct+="</div>"});else{const xt=Ya(this.y||0,Ge);ct+='<div class="flex items-center" style="display: flex; align-items: center;">',ct+=`<div class="bg-jp-2-green-50 text-jp-2-green-200 rounded p-1 font-semibold mr-1.5 my-1" style="background-color: #D4F4E5; color: #008242; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${xt}</div>`,ct+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((Vt=this.series)==null?void 0:Vt.name)||""}</div>`,ct+="</div>"}const Rt=this.x?mt(String(this.x)):"";return ct+=`<div class="font-medium text-jp-2-gray-300" style="font-weight: 500; color: #9AA0A6; font-size: 12px; margin-top: 4px;">${Rt}</div>`,ct+="</div>",ct+="</div>",ct+="</div>",ct+="</div>",ct},xDateFormat:"%a, %d %B, %Y %H:%M"},series:Xe.series};ve.push({id:`${be.id}-chart`,content:"",role:"assistant",timestamp:be.timestamp,description:Le,chartData:Ie,isFromHistory:!0})}}else if(_e.length===1){const Me=Object.keys(Be)[0];if(Me){const ze={metric:Me.replace(/_/g," "),value:Be[Me]===null?"N/A":Be[Me]};ve.push({id:`${be.id}-stat`,content:"",role:"assistant",timestamp:be.timestamp,description:Le,singleStat:ze,isFromHistory:!0})}}else ve.push({id:`${be.id}-table`,content:"",role:"assistant",timestamp:be.timestamp,description:Le,tableData:_e,isFromHistory:!0})}}catch(_e){console.error("Error parsing stored response output:",_e)}}}if(be.chartData){const ke={id:`${be.id}-legacy-chart`,content:"",role:"assistant",timestamp:be.timestamp,chartData:be.chartData,description:be.description,isFromHistory:!0};ve.push(ke)}if(be.singleStat){const ke={id:`${be.id}-legacy-stat`,content:"",role:"assistant",timestamp:be.timestamp,singleStat:be.singleStat,description:be.description,isFromHistory:!0};ve.push(ke)}if(be.tableData){const ke={id:`${be.id}-legacy-table`,content:"",role:"assistant",timestamp:be.timestamp,tableData:be.tableData,description:be.description,isFromHistory:!0};ve.push(ke)}if(be.content){const ke={id:be.id,content:be.content,role:be.role,timestamp:be.timestamp,isFromHistory:!0};ve.push(ke)}}console.log("Reconstructed messages:",ve),k(ve),Q(fe),V(!1)}catch(pe){console.error("Failed to load session messages:",pe)}},C=async(fe,pe,ve,be)=>{const ke=be||$;if(ke)try{await Ao.saveMessage(ke,fe,pe,ve),await g()}catch(Ee){console.error("Failed to save message to history:",Ee)}},q=fe=>{const ve=new Date().getTime()-fe.getTime(),be=Math.floor(ve/6e4),ke=Math.floor(ve/36e5),Ee=Math.floor(ve/864e5);return be<1?"Just now":be<60?`${be} min ago`:ke<24?`${ke} hour${ke>1?"s":""} ago`:Ee<7?`${Ee} day${Ee>1?"s":""} ago`:fe.toLocaleDateString()},ce=()=>{V(!0),g()},j=()=>{V(!1)},U=fe=>{w(fe.sessionId)},ne=async(fe,pe)=>{pe.stopPropagation();try{await Ao.deleteSession(fe),await g()}catch(ve){console.error("Failed to delete session:",ve)}},ge=()=>{k([]),Q(""),N(""),B&&(B.abort(),Y(null)),J(!1),F(!1),ee(!1),V(!1)},R=()=>{var fe;(fe=_.current)==null||fe.scrollIntoView({behavior:"smooth"})};Pe.useEffect(()=>{R()},[b]),Pe.useEffect(()=>{D&&setTimeout(()=>R(),100)},[D]),Pe.useEffect(()=>{if(P){const fe=localStorage.getItem("login")||"";fe?(window.postMessage({type:"AUTH_TOKEN",token:fe},"*"),console.log("Sent auth token to Voice Assistant")):console.warn("No auth token found in localStorage");const pe=ve=>{var be;((be=ve.data)==null?void 0:be.type)==="CLOSE_VOICE_ASSISTANT"&&te(!1)};return window.addEventListener("message",pe),()=>{window.removeEventListener("message",pe)}}},[P]),Pe.useEffect(()=>{me.current&&me.current.focus()},[]);const G=()=>{if(B){B.abort(),Y(null),J(!1),F(!1);const fe={id:(Date.now()+Math.random()).toString(),content:"Request cancelled. You can retry your query.",role:"assistant",timestamp:new Date};k(pe=>[...pe,fe])}},ie=async()=>{if(X&&!Z&&!ae){const fe=X;k(ve=>{let be=-1;for(let ke=ve.length-1;ke>=0;ke--)if(ve[ke].role==="user"){be=ke;break}return be>=0?ve.slice(0,be+1):ve}),J(!0),F(!0),setTimeout(()=>R(),100);const pe=new AbortController;Y(pe);try{const ve=gC();if(!ve)throw new Error("Authentication token not found");const be={"Content-Type":"application/json",Accept:"text/event-stream",Authorization:ve},ke=new Date,Ee=ke.getFullYear()+"-"+String(ke.getMonth()+1).padStart(2,"0")+"-"+String(ke.getDate()).padStart(2,"0")+"T"+String(ke.getHours()).padStart(2,"0")+":"+String(ke.getMinutes()).padStart(2,"0")+":"+String(ke.getSeconds()).padStart(2,"0")+"Z",_e=await fetch(p,{method:"POST",headers:{...be,Accept:"text/event-stream"},body:JSON.stringify({query:fe,current_timestamp:Ee,session_id:$,regenerate:!0}),signal:pe.signal});if(!_e.ok)throw new Error(`API request failed with status ${_e.status}`);if(_e.body){const Le=_e.body.getReader(),Be=new TextDecoder;let $e=null,Me="",ze="";for(;;){const{done:Xe,value:Ve}=await Le.read();if(Xe){ze.trim()&&ze.split(`
466
+
467
+ `).filter(ct=>ct).forEach(ct=>{var Vt,xt;const _t=(Vt=ct.match(/event: (.*)/))==null?void 0:Vt[1],Rt=ct.match(/data: (.*)/);if(Rt)try{const lt=JSON.parse(Rt[1]);if(_t==="session_id"&&lt.session_id)Q(lt.session_id);else if(_t==="agent_text_output"||_t==="final_output"){F(!1);const ht=lt.message||"";if(Me=ht,$e)k(ft=>ft.map(Ct=>Ct.id===$e?{...Ct,content:ht,feedbackId:_t==="final_output"&&lt.feedback_id?lt.feedback_id:Ct.feedbackId}:Ct));else{$e=(Date.now()+Math.random()).toString();const ft={id:$e,content:ht,role:"assistant",timestamp:new Date,feedbackId:_t==="final_output"&&lt.feedback_id?lt.feedback_id:void 0};k(Ct=>[...Ct,ft])}if(_t==="final_output"){console.log("Saving retry to IndexedDB:",{sessionId:$||lt.session_id,userMessage:fe,botResponse:ht,fullData:lt});const ft=$||lt.session_id;ft&&ht&&C(fe,ht,{finalOutputData:lt},ft).catch(ut=>{console.error("Failed to save message to IndexedDB:",ut)})}}else if(_t==="tool_output"&&(lt.tool_name==="q_api_gemini"||(xt=lt.tool_name)!=null&&xt.startsWith("q_api"))){const ht=JSON.parse(lt.output),ft=lt.input?_c(lt.input,lt.tool_name):"";if(ht.length>0){const Ct=ht[0],ut=Object.keys(Ct).find(bt=>bt.includes("_time"));if(ut){const yt=Object.keys(Ct).filter(wt=>wt!==ut&&!["gateway","payment_gateway","dimension","group","category"].includes(wt))[0];if(yt){const wt=sm(ht,ut,yt),Ot=Do(yt),Ht={chart:{type:"line"},title:{text:`${yt.replace(/_/g," ")}`},credits:{enabled:!1},xAxis:{categories:wt.categories,labels:{formatter:function(){const nt=String(this.value),Ut=new Date(nt);return Ut.getHours()===0&&Ut.getMinutes()===0?`${Ut.getDate()}. ${Ut.toLocaleString("default",{month:"short"})}`:nt.split(", ")[1]},style:{color:"#9aa0a6"},rotation:0,align:"center",step:4}},yAxis:{title:{text:""},gridLineColor:"#e0e0e0",gridLineDashStyle:"Dash",labels:{formatter:function(){return Ya(Number(this.value),Ot)},style:{color:"#9aa0a6"}}},legend:{enabled:wt.hasDimensions,align:"left",verticalAlign:"top",layout:"horizontal",y:10,itemStyle:{fontSize:"11px"},symbolRadius:0,symbolHeight:0,symbolWidth:0,useHTML:!0,labelFormatter:function(){return'<span style="display: inline-flex; align-items: center;"><span style="background-color: '+this.color+'; width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 4px;"></span>'+this.name+"</span>"}},plotOptions:{series:{marker:{enabled:!1,symbol:"circle",radius:3,states:{hover:{enabled:!0,radius:4}}},states:{hover:{lineWidthPlus:1}}}},tooltip:{shared:!0,useHTML:!0,backgroundColor:"rgba(255, 255, 255, 0)",borderWidth:0,shadow:!1,style:{padding:"0px"},formatter:function(){var It;const nt=Do(yt),Ut=Yt=>Yt.replace(/_/g," ").replace(/\b\w/g,At=>At.toUpperCase()),kt=Yt=>{const At=new Date(Yt),Lt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],en=["January","February","March","April","May","June","July","August","September","October","November","December"],Jt=Lt[At.getDay()],an=At.getDate(),ai=en[At.getMonth()],jn=At.getFullYear();let Xt=At.getHours();const Qt=At.getMinutes(),hn=Xt>=12?"PM":"AM";Xt=Xt%12,Xt=Xt||12;const gi=Qt<10?"0"+Qt:Qt;return`${Jt}, ${an} ${ai}, ${jn} ${Xt}:${gi} ${hn}`};let Tt='<div style="border-radius: 12px; border: 1px solid #EAECF0; background: #FFF; box-shadow: 0px 6px 15px 0px rgba(0, 0, 0, 0.15), 0px 3px 2px -5px rgba(0, 0, 0, 0.04); padding: 16px;">';Tt+='<div style="display: flex; font-family: Inter, sans-serif; gap: 16px; align-items: stretch;">';const jt=this.points?this.points[0].color:this.color||"#3BA974";if(Tt+=`<div style="background:${jt}; width: 4px; flex-shrink: 0; border-radius: 4px; align-self: stretch;"></div>`,Tt+='<div style="display: flex; flex-direction: column; gap: 12px;">',Tt+='<div style="display: flex; flex-direction: column; gap: 4px;">',Tt+=`<div style="color: #525252; font-feature-settings: 'clig' off, 'liga' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 600; line-height: 18px;">${Ut(yt)}</div>`,Tt+="</div>",Tt+='<div class="flex flex-col gap-1" style="display: flex; flex-direction: column; gap: 6px;">',this.points)[...this.points].sort((At,Lt)=>(Lt.y||0)-(At.y||0)).forEach(At=>{var jn,Xt;const Lt=Ya(At.y||0,nt),en=((jn=At.series)==null?void 0:jn.name)==="Overall",Jt=en?"bg-jp-2-gray-30 text-jp-2-gray-700":"bg-jp-2-green-50 text-jp-2-green-200",an=en?"#E8E8E8":"#D4F4E5",ai=en?"#424242":"#008242";Tt+='<div class="flex items-center" style="display: flex; align-items: center;">',Tt+=`<div class="${Jt} rounded p-1 font-semibold mr-1.5 my-1" style="background-color: ${an}; color: ${ai}; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${Lt}</div>`,Tt+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((Xt=At.series)==null?void 0:Xt.name)||""}</div>`,Tt+="</div>"});else{const Yt=Ya(this.y||0,nt);Tt+='<div class="flex items-center" style="display: flex; align-items: center;">',Tt+=`<div class="bg-jp-2-green-50 text-jp-2-green-200 rounded p-1 font-semibold mr-1.5 my-1" style="background-color: #D4F4E5; color: #008242; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${Yt}</div>`,Tt+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((It=this.series)==null?void 0:It.name)||""}</div>`,Tt+="</div>"}const nn=this.x?kt(String(this.x)):"";return Tt+=`<div class="font-medium text-jp-2-gray-300" style="font-weight: 500; color: #9AA0A6; font-size: 12px; margin-top: 4px;">${nn}</div>`,Tt+="</div>",Tt+="</div>",Tt+="</div>",Tt+="</div>",Tt},xDateFormat:"%a, %d %B, %Y %H:%M"},series:wt.series},Dt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:ft,chartData:Ht};k(nt=>[...nt,Dt]);const vt=$||lt.session_id;vt&&C(fe,Me,{chartData:Ht,description:ft},vt)}}else if(ht.length===1){const bt=Object.keys(Ct)[0];if(bt){const yt={metric:bt.replace(/_/g," "),value:Ct[bt]===null?"N/A":Ct[bt]},wt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:ft,singleStat:yt};k(Ht=>[...Ht,wt]);const Ot=$||lt.session_id;Ot&&C(fe,Me,{singleStat:yt,description:ft},Ot)}}else{const bt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:ft,tableData:ht};k(wt=>[...wt,bt]);const yt=$||lt.session_id;yt&&C(fe,Me,{tableData:ht,description:ft},yt)}}}}catch(lt){console.error("Error parsing event data:",lt)}});break}const Ie=Be.decode(Ve,{stream:!0});ze+=Ie;const Ge=ze.split(`
468
+
469
+ `),pt=Ge.slice(0,-1);ze=Ge[Ge.length-1],pt.forEach(mt=>{var Rt,Vt;const ct=(Rt=mt.match(/event: (.*)/))==null?void 0:Rt[1],_t=mt.match(/data: (.*)/);if(_t)try{const xt=JSON.parse(_t[1]);if(ct==="session_id"&&xt.session_id)Q(xt.session_id);else if(ct==="agent_text_output"||ct==="final_output"){F(!1);const lt=xt.message||"";if(Me=lt,$e)k(ht=>ht.map(ft=>ft.id===$e?{...ft,content:lt,feedbackId:ct==="final_output"&&xt.feedback_id?xt.feedback_id:ft.feedbackId}:ft));else{$e=(Date.now()+Math.random()).toString();const ht={id:$e,content:lt,role:"assistant",timestamp:new Date,feedbackId:ct==="final_output"&&xt.feedback_id?xt.feedback_id:void 0};k(ft=>[...ft,ht])}if(ct==="final_output"){console.log("Saving retry to IndexedDB:",{sessionId:$||xt.session_id,userMessage:fe,botResponse:lt,fullData:xt});const ht=$||xt.session_id;ht&&lt&&C(fe,lt,{finalOutputData:xt},ht).catch(Ct=>{console.error("Failed to save message to IndexedDB:",Ct)})}}else if(ct==="tool_output"&&(xt.tool_name==="q_api_gemini"||(Vt=xt.tool_name)!=null&&Vt.startsWith("q_api"))){const lt=JSON.parse(xt.output),ht=xt.input?_c(xt.input,xt.tool_name):"";if(lt.length>0){const ft=lt[0],Ct=Object.keys(ft).find(ut=>ut.includes("_time"));if(Ct){const bt=Object.keys(ft).filter(yt=>yt!==Ct&&!["gateway","payment_gateway","dimension","group","category"].includes(yt))[0];if(bt){const yt=sm(lt,Ct,bt),wt=Do(bt),Ot={chart:{type:"line"},title:{text:`${bt.replace(/_/g," ")}`},credits:{enabled:!1},xAxis:{categories:yt.categories,labels:{formatter:function(){const vt=String(this.value),nt=new Date(vt);return nt.getHours()===0&&nt.getMinutes()===0?`${nt.getDate()}. ${nt.toLocaleString("default",{month:"short"})}`:vt.split(", ")[1]},style:{color:"#9aa0a6"},rotation:0,align:"center",step:4}},yAxis:{title:{text:""},gridLineColor:"#e0e0e0",gridLineDashStyle:"Dash",labels:{formatter:function(){return Ya(Number(this.value),wt)},style:{color:"#9aa0a6"}}},legend:{enabled:yt.hasDimensions,align:"center",verticalAlign:"top",layout:"horizontal",y:10,itemStyle:{fontSize:"11px"},symbolRadius:0,symbolHeight:0,symbolWidth:0,useHTML:!0,labelFormatter:function(){return'<span style="display: inline-flex; align-items: center;"><span style="background-color: '+this.color+'; width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 4px;"></span>'+this.name+"</span>"}},plotOptions:{series:{marker:{enabled:!1,symbol:"circle",radius:3,states:{hover:{enabled:!0,radius:4}}},states:{hover:{lineWidthPlus:1}}}},tooltip:{shared:!0,useHTML:!0,backgroundColor:"rgba(255, 255, 255, 0)",borderWidth:0,shadow:!1,style:{padding:"0px"},formatter:function(){var nn;const vt=Do(bt),nt=It=>It.replace(/_/g," ").replace(/\b\w/g,Yt=>Yt.toUpperCase()),Ut=It=>{const Yt=new Date(It),At=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Lt=["January","February","March","April","May","June","July","August","September","October","November","December"],en=At[Yt.getDay()],Jt=Yt.getDate(),an=Lt[Yt.getMonth()],ai=Yt.getFullYear();let jn=Yt.getHours();const Xt=Yt.getMinutes(),Qt=jn>=12?"PM":"AM";jn=jn%12,jn=jn||12;const hn=Xt<10?"0"+Xt:Xt;return`${en}, ${Jt} ${an}, ${ai} ${jn}:${hn} ${Qt}`};let kt='<div style="border-radius: 12px; border: 1px solid #EAECF0; background: #FFF; box-shadow: 0px 6px 15px 0px rgba(0, 0, 0, 0.15), 0px 3px 2px -5px rgba(0, 0, 0, 0.04); padding: 16px;">';kt+='<div style="display: flex; font-family: Inter, sans-serif; gap: 16px; align-items: stretch;">';const Tt=this.points?this.points[0].color:this.color||"#3BA974";if(kt+=`<div style="background:${Tt}; width: 4px; flex-shrink: 0; border-radius: 4px; align-self: stretch;"></div>`,kt+='<div style="display: flex; flex-direction: column; gap: 12px;">',kt+='<div style="display: flex; flex-direction: column; gap: 4px;">',kt+=`<div style="color: #525252; font-feature-settings: 'clig' off, 'liga' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 600; line-height: 18px;">${nt(bt)}</div>`,kt+="</div>",kt+='<div class="flex flex-col gap-1" style="display: flex; flex-direction: column; gap: 6px;">',this.points)[...this.points].sort((Yt,At)=>(At.y||0)-(Yt.y||0)).forEach(Yt=>{var ai,jn;const At=Ya(Yt.y||0,vt),Lt=((ai=Yt.series)==null?void 0:ai.name)==="Overall",en=Lt?"bg-jp-2-gray-30 text-jp-2-gray-700":"bg-jp-2-green-50 text-jp-2-green-200",Jt=Lt?"#E8E8E8":"#D4F4E5",an=Lt?"#424242":"#008242";kt+='<div class="flex items-center" style="display: flex; align-items: center;">',kt+=`<div class="${en} rounded p-1 font-semibold mr-1.5 my-1" style="background-color: ${Jt}; color: ${an}; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${At}</div>`,kt+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((jn=Yt.series)==null?void 0:jn.name)||""}</div>`,kt+="</div>"});else{const It=Ya(this.y||0,vt);kt+='<div class="flex items-center" style="display: flex; align-items: center;">',kt+=`<div class="bg-jp-2-green-50 text-jp-2-green-200 rounded p-1 font-semibold mr-1.5 my-1" style="background-color: #D4F4E5; color: #008242; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${It}</div>`,kt+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((nn=this.series)==null?void 0:nn.name)||""}</div>`,kt+="</div>"}const jt=this.x?Ut(String(this.x)):"";return kt+=`<div class="font-medium text-jp-2-gray-300" style="font-weight: 500; color: #9AA0A6; font-size: 12px; margin-top: 4px;">${jt}</div>`,kt+="</div>",kt+="</div>",kt+="</div>",kt+="</div>",kt},xDateFormat:"%a, %d %B, %Y %H:%M"},series:yt.series},Ht={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:ht,chartData:Ot};k(vt=>[...vt,Ht]);const Dt=$||xt.session_id;Dt&&C(fe,Me,{chartData:Ot,description:ht},Dt)}}else if(lt.length===1){const ut=Object.keys(ft)[0];if(ut){const bt={metric:ut.replace(/_/g," "),value:ft[ut]===null?"N/A":ft[ut]},yt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:ht,singleStat:bt};k(Ot=>[...Ot,yt]);const wt=$||xt.session_id;wt&&C(fe,Me,{singleStat:bt,description:ht},wt)}}else{const ut={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:ht,tableData:lt};k(yt=>[...yt,ut]);const bt=$||xt.session_id;bt&&C(fe,Me,{tableData:lt,description:ht},bt)}}}}catch(xt){console.error("Error parsing event data:",xt)}})}}else{const Le=await _e.json(),Be={id:(Date.now()+1).toString(),content:Le.message||"Sorry, I couldn't process that.",role:"assistant",timestamp:new Date};k($e=>[...$e,Be])}}catch(ve){if(ve instanceof Error&&ve.name==="AbortError"){console.log("Request was aborted");return}console.error("Error sending message:",ve);let be="Sorry, I couldn't connect to the service. Please ensure the backend is running.";ve instanceof Error&&ve.message.includes("Authentication token not found")&&(be="Authentication token not found. Please ensure you are logged in.");const ke={id:(Date.now()+1).toString(),content:be,role:"assistant",timestamp:new Date};k(Ee=>[...Ee,ke])}finally{J(!1),F(!1),Y(null)}}},ue=async()=>{if(!O.trim()||Z||ae)return;const fe=O.trim();H(fe);const pe={id:Date.now().toString(),content:fe,role:"user",timestamp:new Date};k(be=>[...be,pe]),N(""),J(!0),F(!0),setTimeout(()=>R(),100),y&&y(pe);const ve=new AbortController;Y(ve);try{const be=gC();if(!be)throw new Error("Authentication token not found");const ke={"Content-Type":"application/json",Accept:"text/event-stream",Authorization:be},Ee=new Date,_e=Ee.getFullYear()+"-"+String(Ee.getMonth()+1).padStart(2,"0")+"-"+String(Ee.getDate()).padStart(2,"0")+"T"+String(Ee.getHours()).padStart(2,"0")+":"+String(Ee.getMinutes()).padStart(2,"0")+":"+String(Ee.getSeconds()).padStart(2,"0")+"Z",Le=await fetch(p,{method:"POST",headers:{...ke,Accept:"text/event-stream"},body:JSON.stringify({query:pe.content,current_timestamp:_e,session_id:$}),signal:ve.signal});if(!Le.ok)throw new Error(`API request failed with status ${Le.status}`);if(Le.body){const Be=Le.body.getReader(),$e=new TextDecoder;let Me=null,ze="",Xe="";for(;;){const{done:Ve,value:Ie}=await Be.read();if(Ve){Xe.trim()&&Xe.split(`
470
+
471
+ `).filter(_t=>_t).forEach(_t=>{var xt,lt;const Rt=(xt=_t.match(/event: (.*)/))==null?void 0:xt[1],Vt=_t.match(/data: (.*)/);if(Vt)try{const ht=JSON.parse(Vt[1]);if(Rt==="session_id"&&ht.session_id)Q(ht.session_id);else if(Rt==="agent_text_output"||Rt==="final_output"){F(!1);const ft=ht.message||"";if(ze=ft,Me)k(Ct=>Ct.map(ut=>ut.id===Me?{...ut,content:ft,feedbackId:Rt==="final_output"&&ht.feedback_id?ht.feedback_id:ut.feedbackId}:ut));else{Me=(Date.now()+Math.random()).toString();const Ct={id:Me,content:ft,role:"assistant",timestamp:new Date,feedbackId:Rt==="final_output"&&ht.feedback_id?ht.feedback_id:void 0};k(ut=>[...ut,Ct])}if(Rt==="final_output"){console.log("Saving to IndexedDB:",{sessionId:$||ht.session_id,userMessage:pe.content,botResponse:ft,fullData:ht});const Ct=$||ht.session_id;if(Ct&&ft){const ut={finalOutputData:ht};C(pe.content,ft,ut,Ct).catch(bt=>{console.error("Failed to save message to IndexedDB:",bt)})}}}else if(Rt==="tool_output"&&(ht.tool_name==="q_api_gemini"||(lt=ht.tool_name)!=null&&lt.startsWith("q_api"))){const ft=JSON.parse(ht.output),Ct=ht.input?_c(ht.input,ht.tool_name):"";if(ft.length>0){const ut=ft[0],bt=Object.keys(ut).find(yt=>yt.includes("_time"));if(bt){const wt=Object.keys(ut).filter(Ot=>Ot!==bt&&!["gateway","payment_gateway","dimension","group","category"].includes(Ot))[0];if(wt){const Ot=sm(ft,bt,wt),Ht=Do(wt),Dt={chart:{type:"line"},title:{text:`${wt.replace(/_/g," ")}`},credits:{enabled:!1},xAxis:{categories:Ot.categories,labels:{formatter:function(){const Ut=String(this.value),kt=new Date(Ut);return kt.getHours()===0&&kt.getMinutes()===0?`${kt.getDate()}. ${kt.toLocaleString("default",{month:"short"})}`:Ut.split(", ")[1]},style:{color:"#9aa0a6"},rotation:0,align:"center",step:4}},yAxis:{title:{text:""},gridLineColor:"#e0e0e0",gridLineDashStyle:"Dash",labels:{formatter:function(){return Ya(Number(this.value),Ht)},style:{color:"#9aa0a6"}}},legend:{enabled:Ot.hasDimensions,align:"center",verticalAlign:"top",layout:"horizontal",y:10,itemStyle:{fontSize:"11px"},symbolRadius:0,symbolHeight:0,symbolWidth:0,useHTML:!0,labelFormatter:function(){return'<span style="display: inline-flex; align-items: center;"><span style="background-color: '+this.color+'; width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 4px;"></span>'+this.name+"</span>"}},plotOptions:{series:{marker:{enabled:!1,symbol:"circle",radius:3,states:{hover:{enabled:!0,radius:4}}},states:{hover:{lineWidthPlus:1}}}},tooltip:{shared:!0,useHTML:!0,backgroundColor:"rgba(255, 255, 255, 0)",borderWidth:0,shadow:!1,style:{padding:"0px"},formatter:function(){var Yt;const Ut=Do(wt),kt=At=>At.replace(/_/g," ").replace(/\b\w/g,Lt=>Lt.toUpperCase()),Tt=At=>{const Lt=new Date(At),en=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Jt=["January","February","March","April","May","June","July","August","September","October","November","December"],an=en[Lt.getDay()],ai=Lt.getDate(),jn=Jt[Lt.getMonth()],Xt=Lt.getFullYear();let Qt=Lt.getHours();const hn=Lt.getMinutes(),gi=Qt>=12?"PM":"AM";Qt=Qt%12,Qt=Qt||12;const ga=hn<10?"0"+hn:hn;return`${an}, ${ai} ${jn}, ${Xt} ${Qt}:${ga} ${gi}`};let jt='<div style="border-radius: 12px; border: 1px solid #EAECF0; background: #FFF; box-shadow: 0px 6px 15px 0px rgba(0, 0, 0, 0.15), 0px 3px 2px -5px rgba(0, 0, 0, 0.04); padding: 16px;">';jt+='<div style="display: flex; font-family: Inter, sans-serif; gap: 16px; align-items: stretch;">';const nn=this.points?this.points[0].color:this.color||"#3BA974";if(jt+=`<div style="background:${nn}; width: 4px; flex-shrink: 0; border-radius: 4px; align-self: stretch;"></div>`,jt+='<div style="display: flex; flex-direction: column; gap: 12px;">',jt+='<div style="display: flex; flex-direction: column; gap: 4px;">',jt+=`<div style="color: #525252; font-feature-settings: 'clig' off, 'liga' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 600; line-height: 18px;">${kt(wt)}</div>`,jt+="</div>",jt+='<div class="flex flex-col gap-1" style="display: flex; flex-direction: column; gap: 6px;">',this.points)[...this.points].sort((Lt,en)=>(en.y||0)-(Lt.y||0)).forEach(Lt=>{var Xt,Qt;const en=Ya(Lt.y||0,Ut),Jt=((Xt=Lt.series)==null?void 0:Xt.name)==="Overall",an=Jt?"bg-jp-2-gray-30 text-jp-2-gray-700":"bg-jp-2-green-50 text-jp-2-green-200",ai=Jt?"#E8E8E8":"#D4F4E5",jn=Jt?"#424242":"#008242";jt+='<div class="flex items-center" style="display: flex; align-items: center;">',jt+=`<div class="${an} rounded p-1 font-semibold mr-1.5 my-1" style="background-color: ${ai}; color: ${jn}; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${en}</div>`,jt+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((Qt=Lt.series)==null?void 0:Qt.name)||""}</div>`,jt+="</div>"});else{const At=Ya(this.y||0,Ut);jt+='<div class="flex items-center" style="display: flex; align-items: center;">',jt+=`<div class="bg-jp-2-green-50 text-jp-2-green-200 rounded p-1 font-semibold mr-1.5 my-1" style="background-color: #D4F4E5; color: #008242; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${At}</div>`,jt+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((Yt=this.series)==null?void 0:Yt.name)||""}</div>`,jt+="</div>"}const It=this.x?Tt(String(this.x)):"";return jt+=`<div class="font-medium text-jp-2-gray-300" style="font-weight: 500; color: #9AA0A6; font-size: 12px; margin-top: 4px;">${It}</div>`,jt+="</div>",jt+="</div>",jt+="</div>",jt+="</div>",jt},xDateFormat:"%a, %d %B, %Y %H:%M"},series:Ot.series},vt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:Ct,chartData:Dt};k(Ut=>[...Ut,vt]);const nt=$||ht.session_id;nt&&C(pe.content,ze,{chartData:Dt,description:Ct},nt)}}else if(ft.length===1){const yt=Object.keys(ut)[0];if(yt){const wt={metric:yt.replace(/_/g," "),value:ut[yt]===null?"N/A":ut[yt]},Ot={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:Ct,singleStat:wt};k(Dt=>[...Dt,Ot]);const Ht=$||ht.session_id;Ht&&C(pe.content,ze,{singleStat:wt,description:Ct},Ht)}}else{const yt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:Ct,tableData:ft};k(Ot=>[...Ot,yt]);const wt=$||ht.session_id;wt&&C(pe.content,ze,{tableData:ft,description:Ct},wt)}}}}catch(ht){console.error("Error parsing event data:",ht)}});break}const Ge=$e.decode(Ie,{stream:!0});Xe+=Ge;const pt=Xe.split(`
472
+
473
+ `),mt=pt.slice(0,-1);Xe=pt[pt.length-1],mt.forEach(ct=>{var Vt,xt;const _t=(Vt=ct.match(/event: (.*)/))==null?void 0:Vt[1],Rt=ct.match(/data: (.*)/);if(Rt)try{const lt=JSON.parse(Rt[1]);if(_t==="session_id"&&lt.session_id)Q(lt.session_id);else if(_t==="agent_text_output"||_t==="final_output"){F(!1);const ht=lt.message||"";if(ze=ht,Me)k(ft=>ft.map(Ct=>Ct.id===Me?{...Ct,content:ht,feedbackId:_t==="final_output"&&lt.feedback_id?lt.feedback_id:Ct.feedbackId}:Ct));else{Me=(Date.now()+Math.random()).toString();const ft={id:Me,content:ht,role:"assistant",timestamp:new Date,feedbackId:_t==="final_output"&&lt.feedback_id?lt.feedback_id:void 0};k(Ct=>[...Ct,ft])}if(_t==="final_output"){console.log("Saving to IndexedDB:",{sessionId:$||lt.session_id,userMessage:pe.content,botResponse:ht,fullData:lt});const ft=$||lt.session_id;if(ft&&ht){const Ct={finalOutputData:lt};C(pe.content,ht,Ct,ft).catch(ut=>{console.error("Failed to save message to IndexedDB:",ut)})}}}else if(_t==="tool_output"&&(lt.tool_name==="q_api_gemini"||(xt=lt.tool_name)!=null&&xt.startsWith("q_api"))){const ht=JSON.parse(lt.output),ft=lt.input?_c(lt.input,lt.tool_name):"";if(ht.length>0){const Ct=ht[0],ut=Object.keys(Ct).find(bt=>bt.includes("_time"));if(ut){const yt=Object.keys(Ct).filter(wt=>wt!==ut&&!["gateway","payment_gateway","dimension","group","category"].includes(wt))[0];if(yt){const wt=sm(ht,ut,yt),Ot=Do(yt),Ht={chart:{type:"line"},title:{text:`${yt.replace(/_/g," ")}`},credits:{enabled:!1},xAxis:{categories:wt.categories,labels:{formatter:function(){const nt=String(this.value),Ut=new Date(nt);return Ut.getHours()===0&&Ut.getMinutes()===0?`${Ut.getDate()}. ${Ut.toLocaleString("default",{month:"short"})}`:nt.split(", ")[1]},style:{color:"#9aa0a6"},rotation:0,align:"center",step:4}},yAxis:{title:{text:""},gridLineColor:"#e0e0e0",gridLineDashStyle:"Dash",labels:{formatter:function(){return Ya(Number(this.value),Ot)},style:{color:"#9aa0a6"}}},legend:{enabled:wt.hasDimensions,align:"center",verticalAlign:"top",layout:"horizontal",y:10,itemStyle:{fontSize:"11px"},symbolRadius:0,symbolHeight:0,symbolWidth:0,useHTML:!0,labelFormatter:function(){return'<span style="display: inline-flex; align-items: center;"><span style="background-color: '+this.color+'; width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 4px;"></span>'+this.name+"</span>"}},plotOptions:{series:{marker:{enabled:!1,symbol:"circle",radius:3,states:{hover:{enabled:!0,radius:4}}},states:{hover:{lineWidthPlus:1}}}},tooltip:{shared:!0,useHTML:!0,backgroundColor:"rgba(255, 255, 255, 0)",borderWidth:0,shadow:!1,style:{padding:"0px"},formatter:function(){var It;const nt=Do(yt),Ut=Yt=>Yt.replace(/_/g," ").replace(/\b\w/g,At=>At.toUpperCase()),kt=Yt=>{const At=new Date(Yt),Lt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],en=["January","February","March","April","May","June","July","August","September","October","November","December"],Jt=Lt[At.getDay()],an=At.getDate(),ai=en[At.getMonth()],jn=At.getFullYear();let Xt=At.getHours();const Qt=At.getMinutes(),hn=Xt>=12?"PM":"AM";Xt=Xt%12,Xt=Xt||12;const gi=Qt<10?"0"+Qt:Qt;return`${Jt}, ${an} ${ai}, ${jn} ${Xt}:${gi} ${hn}`};let Tt='<div style="border-radius: 12px; border: 1px solid #EAECF0; background: #FFF; box-shadow: 0px 6px 15px 0px rgba(0, 0, 0, 0.15), 0px 3px 2px -5px rgba(0, 0, 0, 0.04); padding: 16px;">';Tt+='<div style="display: flex; font-family: Inter, sans-serif; gap: 16px; align-items: stretch;">';const jt=this.points?this.points[0].color:this.color||"#3BA974";if(Tt+=`<div style="background:${jt}; width: 4px; flex-shrink: 0; border-radius: 4px; align-self: stretch;"></div>`,Tt+='<div style="display: flex; flex-direction: column; gap: 12px;">',Tt+='<div style="display: flex; flex-direction: column; gap: 4px;">',Tt+=`<div style="color: #525252; font-feature-settings: 'clig' off, 'liga' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 600; line-height: 18px;">${Ut(yt)}</div>`,Tt+="</div>",Tt+='<div class="flex flex-col gap-1" style="display: flex; flex-direction: column; gap: 6px;">',this.points)[...this.points].sort((At,Lt)=>(Lt.y||0)-(At.y||0)).forEach(At=>{var jn,Xt;const Lt=Ya(At.y||0,nt),en=((jn=At.series)==null?void 0:jn.name)==="Overall",Jt=en?"bg-jp-2-gray-30 text-jp-2-gray-700":"bg-jp-2-green-50 text-jp-2-green-200",an=en?"#E8E8E8":"#D4F4E5",ai=en?"#424242":"#008242";Tt+='<div class="flex items-center" style="display: flex; align-items: center;">',Tt+=`<div class="${Jt} rounded p-1 font-semibold mr-1.5 my-1" style="background-color: ${an}; color: ${ai}; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${Lt}</div>`,Tt+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((Xt=At.series)==null?void 0:Xt.name)||""}</div>`,Tt+="</div>"});else{const Yt=Ya(this.y||0,nt);Tt+='<div class="flex items-center" style="display: flex; align-items: center;">',Tt+=`<div class="bg-jp-2-green-50 text-jp-2-green-200 rounded p-1 font-semibold mr-1.5 my-1" style="background-color: #D4F4E5; color: #008242; border-radius: 4px; padding: 4px 8px; font-weight: 600; margin-right: 8px; font-size: 12px;">${Yt}</div>`,Tt+=`<div class="text-jp-2-gray-200 font-medium" style="color: #70747E; font-weight: 500; font-size: 12px;">${((It=this.series)==null?void 0:It.name)||""}</div>`,Tt+="</div>"}const nn=this.x?kt(String(this.x)):"";return Tt+=`<div class="font-medium text-jp-2-gray-300" style="font-weight: 500; color: #9AA0A6; font-size: 12px; margin-top: 4px;">${nn}</div>`,Tt+="</div>",Tt+="</div>",Tt+="</div>",Tt+="</div>",Tt},xDateFormat:"%a, %d %B, %Y %H:%M"},series:wt.series},Dt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:ft,chartData:Ht};k(nt=>[...nt,Dt]);const vt=$||lt.session_id;vt&&C(pe.content,ze,{chartData:Ht,description:ft},vt)}}else if(ht.length===1){const bt=Object.keys(Ct)[0];if(bt){const yt={metric:bt.replace(/_/g," "),value:Ct[bt]===null?"N/A":Ct[bt]},wt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:ft,singleStat:yt};k(Ht=>[...Ht,wt]);const Ot=$||lt.session_id;Ot&&C(pe.content,ze,{singleStat:yt,description:ft},Ot)}}else{const bt={id:(Date.now()+Math.random()).toString(),content:"",role:"assistant",timestamp:new Date,description:ft,tableData:ht};k(wt=>[...wt,bt]);const yt=$||lt.session_id;yt&&C(pe.content,ze,{tableData:ht,description:ft},yt)}}}}catch(lt){console.error("Error parsing event data:",lt)}})}}else{const Be=await Le.json(),$e={id:(Date.now()+1).toString(),content:Be.message||"Sorry, I couldn't process that.",role:"assistant",timestamp:new Date};k(Me=>[...Me,$e])}}catch(be){if(be instanceof Error&&be.name==="AbortError"){console.log("Request was aborted");return}console.error("Error sending message:",be);let ke="Sorry, I couldn't connect to the service. Please ensure the backend is running.";be instanceof Error&&be.message.includes("Authentication token not found")&&(ke="Authentication token not found. Please ensure you are logged in.");const Ee={id:(Date.now()+1).toString(),content:ke,role:"assistant",timestamp:new Date};k(_e=>[..._e,Ee])}finally{J(!1),F(!1),Y(null)}},de=fe=>{var pe;N(fe),(pe=me.current)==null||pe.focus()},ye=fe=>{fe.key==="Enter"&&!fe.shiftKey&&(fe.preventDefault(),Z?G():ue())},Se=()=>{x&&x()},Ce=()=>{O.trim()||(te(!0),k(fe=>fe.map(pe=>({...pe,skipAnimation:!0}))))},Ae=()=>{te(!1)},Ne=fe=>{E(fe),S(!0),k(pe=>pe.map(ve=>({...ve,skipAnimation:!0})))},Re=async fe=>{const pe=localStorage.getItem("login")||"",ve=b.find(be=>be.id===T);if(!(!(ve!=null&&ve.feedbackId)||!pe))try{const be=p.replace(/\/api\/v3\/analytics\/?$/,""),ke=`Basic ${btoa(pe+":")}`,Ee=await fetch(`${be}/api/v3/analytics/feedback`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:ke},body:JSON.stringify({id:ve.feedbackId,feedbackEnum:"DISLIKE",feedbackText:fe})});Ee.ok?(k(_e=>_e.map(Le=>Le.id===T?{...Le,hasDisliked:!0,skipAnimation:!0}:Le)),S(!1),E(null),console.log("Dislike feedback submitted successfully")):console.error("Failed to submit dislike feedback",Ee.status,Ee.statusText)}catch(be){console.error("Error submitting dislike feedback:",be)}};return W.jsxs("div",{className:"genius-chatbot-mobile-wrapper",children:[z&&W.jsx("div",{className:"genius-chatbot-mobile-history-overlay",children:W.jsxs("div",{className:"genius-chatbot-mobile-history-container",children:[W.jsxs("div",{className:"genius-chatbot-mobile-history-header",children:[W.jsxs("div",{className:"genius-chatbot-mobile-history-header-left",children:[W.jsx("button",{className:"genius-chatbot-mobile-history-back",onClick:j,"aria-label":"Back",children:W.jsx(m3,{})}),W.jsx("h2",{children:"Chat History"})]}),W.jsxs("div",{className:"genius-chatbot-mobile-history-actions",children:[W.jsx("button",{className:"genius-chatbot-mobile-history-action","aria-label":"New Chat",onClick:ge,children:W.jsx(Qb,{})}),W.jsx("button",{className:"genius-chatbot-mobile-history-action","aria-label":"Close",onClick:Se,children:W.jsx(Ub,{})})]})]}),W.jsx("div",{className:"genius-chatbot-mobile-history-list",children:K?W.jsx("div",{className:"genius-chatbot-mobile-history-loading",children:"Loading history..."}):le.length===0?W.jsx("div",{className:"genius-chatbot-mobile-history-empty",children:"No chat history found"}):le.map(fe=>W.jsxs("div",{className:"genius-chatbot-mobile-history-item",onClick:()=>U(fe),children:[W.jsxs("div",{className:"genius-chatbot-mobile-history-item-content",children:[W.jsx("div",{className:"genius-chatbot-mobile-history-item-title",children:fe.title}),W.jsxs("div",{className:"genius-chatbot-mobile-history-item-date",children:[q(fe.timestamp)," • ",fe.messageCount," messages"]})]}),W.jsx("button",{className:"genius-chatbot-mobile-history-item-delete",onClick:pe=>ne(fe.sessionId,pe),"aria-label":"Delete session",children:W.jsx(y3,{})})]},fe.sessionId))})]})}),W.jsxs("div",{className:"genius-chatbot-mobile-container",style:d,children:[W.jsxs("div",{className:"genius-chatbot-mobile-header",children:[W.jsx("div",{className:"genius-chatbot-mobile-header-icons",children:A?W.jsx("button",{className:"genius-chatbot-mobile-icon-button-header",onClick:()=>S(!1),"aria-label":"Back",children:W.jsx(b3,{})}):W.jsx("button",{className:"genius-chatbot-mobile-icon-button-header",onClick:ce,"aria-label":"View history",children:W.jsx(ZS,{})})}),W.jsx("button",{className:"genius-chatbot-mobile-icon-button-header",onClick:Se,"aria-label":"Close chat",children:W.jsx(Ub,{})})]}),W.jsxs("div",{className:"genius-chatbot-mobile-body",children:[A?W.jsx("div",{className:"genius-chatbot-mobile-feedback-overlay",children:W.jsx(A3,{feedbackType:"DISLIKE",onFeedbackClick:Re,onBack:()=>S(!1),onClose:()=>S(!1),onHistoryClick:()=>{S(!1),ce()}})}):P?W.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"#fff",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden"},children:[W.jsx("button",{className:"genius-chatbot-mobile-close-voice-button",onClick:Ae,"aria-label":"Close voice mode",style:{position:"absolute",top:"16px",right:"16px",zIndex:1001,background:"#fff",border:"1px solid #e1e1e1",borderRadius:"50%",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},children:W.jsx(g3,{})}),W.jsxs("div",{className:"genius-voice-assistant-wrapper",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",position:"relative",overflow:"hidden"},children:[W.jsx("style",{children:`
474
+ .genius-voice-assistant-wrapper .bottom-bar-container {
475
+ position: absolute !important;
476
+ bottom: 20px !important;
477
+ left: 50% !important;
478
+ transform: translateX(-50%) !important;
479
+ width: calc(100% - 32px) !important;
480
+ max-width: 350px !important;
481
+ z-index: 10 !important;
482
+ }
483
+ .genius-voice-assistant-wrapper .app {
484
+ height: 100% !important;
485
+ position: relative !important;
486
+ }
487
+ .genius-voice-assistant-wrapper .simple-chat {
488
+ height: calc(100% - 100px) !important;
489
+ }
490
+ `}),W.jsx(fC,{})]})]}):b.length===0?W.jsxs(W.Fragment,{children:[W.jsx("div",{className:"genius-chatbot-mobile-content",children:W.jsx("div",{className:"genius-chatbot-mobile-welcome",children:W.jsxs("div",{className:"genius-chatbot-mobile-branding",children:[W.jsx("div",{className:"genius-chatbot-mobile-logo-container",children:W.jsx("div",{className:"genius-chatbot-mobile-logo",children:W.jsx("div",{className:"genius-chatbot-mobile-logo-icon",children:W.jsx(Hb,{})})})}),W.jsx("div",{className:"genius-chatbot-mobile-welcome-text",children:W.jsxs("h2",{className:"genius-chatbot-mobile-welcome-title",children:["Meet Genius 👋",W.jsx("br",{}),W.jsx("span",{className:"genius-chatbot-mobile-welcome-subtitle",children:i})]})})]})})}),c.length>0&&W.jsx("div",{className:"genius-chatbot-mobile-suggestions",children:c.map((fe,pe)=>W.jsxs("button",{className:"genius-chatbot-mobile-suggestion",onClick:()=>de(fe),type:"button",children:[fe==="Weekly Updates"&&W.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[W.jsx("path",{d:"M11.3333 2.66667H13.3333C13.687 2.66667 14.0261 2.80714 14.2761 3.05719C14.5262 3.30724 14.6667 3.64638 14.6667 4V13.3333C14.6667 13.687 14.5262 14.0261 14.2761 14.2761C14.0261 14.5262 13.687 14.6667 13.3333 14.6667H2.66667C2.31304 14.6667 1.97391 14.5262 1.72386 14.2761C1.47381 14.0261 1.33333 13.687 1.33333 13.3333V4C1.33333 3.64638 1.47381 3.30724 1.72386 3.05719C1.97391 2.80714 2.31304 2.66667 2.66667 2.66667H4.66667",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"}),W.jsx("path",{d:"M10.6667 1.33333V4M5.33333 1.33333V4M1.33333 6.66667H14.6667",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})]}),W.jsx("span",{children:fe})]},pe))})]}):W.jsx("div",{className:"genius-chatbot-mobile-content",ref:re,children:W.jsxs("div",{className:"genius-chatbot-mobile-messages",children:[b.map((fe,pe)=>fe.role==="assistant"?W.jsx(C3,{message:fe,showIcon:pe===0||b[pe-1].role!=="assistant",onTypingStateChange:ee,skipAnimation:fe.isFromHistory||fe.skipAnimation,onRetry:ie,isLastMessage:!!fe.content&&pe===b.length-1&&!D,onDislike:()=>Ne(fe.id),endpoint:p},fe.id):W.jsx("div",{className:`genius-dashboard-message ${fe.role}`,children:W.jsx("div",{className:"genius-dashboard-message-bubble",children:W.jsx("div",{className:"genius-dashboard-message-content",dangerouslySetInnerHTML:{__html:fe.content}})})},fe.id)),D&&W.jsxs("div",{className:"genius-dashboard-message assistant",children:[W.jsx("div",{className:"genius-dashboard-assistant-icon",children:W.jsx(ey,{})}),W.jsx("div",{className:"genius-dashboard-thinking",children:"Thinking"})]}),W.jsx("div",{ref:_})]})}),!A&&!P&&W.jsx("div",{className:"genius-chatbot-mobile-input-section",children:W.jsxs("div",{className:"genius-chatbot-mobile-input-container",children:[W.jsx("textarea",{ref:me,className:"genius-chatbot-mobile-input",placeholder:o,value:O,onChange:fe=>N(fe.target.value),onKeyDown:ye,disabled:!1,rows:1}),W.jsxs("div",{className:"genius-chatbot-mobile-input-row",children:[W.jsx("div",{style:{flex:1}}),W.jsxs("div",{className:"genius-chatbot-mobile-input-actions",children:[W.jsx("button",{className:"genius-chatbot-mobile-icon-button",onClick:Ce,"aria-label":"Voice input",type:"button",children:W.jsx(D7,{})}),Z?W.jsx("button",{className:"genius-chatbot-mobile-cancel-button",onClick:G,"aria-label":"Cancel",type:"button",children:W.jsx(v3,{})}):W.jsx("button",{className:"genius-chatbot-mobile-send-button",onClick:ue,"aria-label":"Send message",type:"button",disabled:!O.trim()||ae,children:W.jsx(QS,{})})]})]})]})})]})]})]})},Cx=({config:r={}})=>{const{apiKey:i="",baseUrl:o="",endpoints:c={},welcomeMessage:d="Your go-to for all payment related inquiries!",placeholder:p="Ask Genius",suggestions:y=["How to integrate?","Pricing Plan","Supported Gateways"],theme:x={},position:b="bottom-right",onMessage:k,onClose:O,onExpand:N,useStreaming:Z=!0,variant:J="default"}=r,[D,F]=Pe.useState(!1);Pe.useEffect(()=>{const G=()=>{F(window.innerWidth<=768)};return G(),window.addEventListener("resize",G),()=>{window.removeEventListener("resize",G)}},[]),On.setOptions({breaks:!0,gfm:!0,pedantic:!1});const[ae,ee]=Pe.useState([]),[B,Y]=Pe.useState(""),[$,Q]=Pe.useState(!1),[z,V]=Pe.useState(!0),[le,se]=Pe.useState(!1),[K,L]=Pe.useState(new Set),[X,H]=Pe.useState(!1),A=Pe.useRef(null),S=Pe.useRef(null),T=Pe.useRef(null),E=Pe.useRef(!1),P=Pe.useRef(0),te=Pe.useRef(null),_=()=>{if(!S.current)return!0;const{scrollTop:G,scrollHeight:ie,clientHeight:ue}=S.current;return ie-G-ue<100},re=(G=!1)=>{!S.current||!A.current||(G||!E.current||_())&&(A.current.scrollIntoView({behavior:"smooth",block:"end"}),E.current=!1)},me=()=>{S.current&&(te.current&&clearTimeout(te.current),te.current=setTimeout(()=>{_()?(E.current=!1,H(!1)):(E.current=!0,H(!0))},100))};Pe.useEffect(()=>{ae.length>P.current&&(P.current===0||!E.current)&&setTimeout(()=>re(),100),P.current=ae.length},[ae]),Pe.useEffect(()=>{const G=ie=>{ie.key==="Escape"&&j()};return document.addEventListener("keydown",G),()=>{document.removeEventListener("keydown",G),te.current&&clearTimeout(te.current)}},[]),Pe.useEffect(()=>{const G=()=>{window.innerWidth<=768&&z&&V(!1)};return window.addEventListener("resize",G),G(),()=>{window.removeEventListener("resize",G)}},[z]);const g=()=>{B.trim()||se(!0)},w=()=>{se(!1)},C=async()=>{var ue,de;if(!B.trim()||$)return;const G={id:Date.now().toString(),content:B,role:"user",timestamp:new Date};ee(ye=>[...ye,G]),Y(""),Q(!0),E.current=!1,setTimeout(()=>re(!0),100),k&&k(G);let ie;if(Z&&c.stream)ie=c.stream;else if(!Z&&c.chat)ie=c.chat;else if(o)ie=Z?`${o}/chat/stream`:`${o}/chat`;else{const ye="https://genius.juspay.in";ie=Z?`${ye}/chat/stream`:`${ye}/chat`}try{const ye={"Content-Type":"application/json",Accept:"text/event-stream"};i&&(ye.Authorization=`Bearer ${i}`);const Se=await fetch(ie,{method:"POST",headers:ye,body:JSON.stringify({message:G.content,conversation_id:"demo-session"})});if(!Se.ok)throw new Error(`API request failed with status ${Se.status}`);if(Z&&Se.body){console.log("Starting streaming response handling...");const Ce=Se.body.getReader(),Ae=new TextDecoder,Ne={id:(Date.now()+1).toString(),content:"",role:"assistant",timestamp:new Date,sources:[]};ee(pe=>[...pe,Ne]);let Re="",fe=0;for(;;){const{done:pe,value:ve}=await Ce.read();if(pe){console.log("Stream reading complete");break}const be=Ae.decode(ve,{stream:!0});Re+=be,console.log(`Received chunk ${++fe}, buffer length: ${Re.length}`);const ke=Re.split(`
491
+ `);Re=ke.pop()||"";for(const Ee of ke)if(Ee.trim()!=="")if(Ee.startsWith("data: ")){const _e=Ee.slice(6);if(_e==="[DONE]"){console.log("Received [DONE] signal");continue}try{const Le=JSON.parse(_e);if(console.log("Parsed SSE data:",Le),Le.text)Ne.content+=Le.text,console.log(`Updated content, total length: ${Ne.content.length}`),ee(Be=>Be.map($e=>$e.id===Ne.id?{...$e,content:Ne.content}:$e));else if(Le.type==="metadata"&&(Le.metrics&&console.log("Response metrics:",Le.metrics),Le.grounding_metadata)){const Be=[],$e=new Set;Le.grounding_metadata.forEach(Me=>{var ze;Me.title&&!$e.has(Me.title)&&($e.add(Me.title),Be.push({text:Me.text||((ze=Me.rag_chunk)==null?void 0:ze.text)||"",title:Me.title,uri:Me.uri||""}))}),Ne.sources=Be,console.log(`Added ${Be.length} sources`),ee(Me=>Me.map(ze=>ze.id===Ne.id?{...ze,sources:Ne.sources}:ze))}}catch(Le){console.error("Error parsing SSE data:",Le,"Line:",Ee)}}else console.log("Non-data line:",Ee)}}else{const Ce=await Se.json(),Ae=[];if((ue=Ce.grounding_metadata)!=null&&ue.grounding_metadata){const Re=new Set;Ce.grounding_metadata.grounding_metadata.forEach(fe=>{var pe;fe.title&&!Re.has(fe.title)&&(Re.add(fe.title),Ae.push({text:fe.text||((pe=fe.rag_chunk)==null?void 0:pe.text)||"",title:fe.title,uri:fe.uri||""}))})}const Ne={id:(Date.now()+1).toString(),content:Ce.response||Ce.message||"Sorry, I couldn't process that.",role:"assistant",timestamp:new Date,sources:Ae};ee(Re=>[...Re,Ne]),(de=Ce.grounding_metadata)!=null&&de.metrics&&console.log("Response metrics:",Ce.grounding_metadata.metrics)}}catch(ye){console.error("Error sending message:",ye);const Se={id:(Date.now()+1).toString(),content:"Sorry, I couldn't connect to the service. Please ensure the backend is running on port 8001.",role:"assistant",timestamp:new Date};ee(Ce=>[...Ce,Se])}Q(!1)},q=G=>{var ie;Y(G),(ie=T.current)==null||ie.focus()},ce=G=>{G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),C())},j=()=>{O&&O()},U=()=>{V(!z),N&&N()},ne=G=>{L(ie=>{const ue=new Set(ie);return ue.has(G)?ue.delete(G):ue.add(G),ue})},ge=G=>{let ie=On.parse(G);return ie=ie.replace(/<table>/g,'<div class="genius-chatbot-table-wrapper"><table>').replace(/<\/table>/g,"</table></div>"),ie=ie.replace(/<a\s+href=/g,'<a target="_blank" rel="noopener noreferrer" href='),{__html:ie}},R={...x};return le?W.jsx(JS,{onEnd:w}):J==="dashboard"?D?W.jsx(mC,{config:r}):W.jsx(SA,{config:r}):W.jsx("div",{className:`genius-chatbot-wrapper ${b} ${z?"expanded":""}`,children:W.jsxs("div",{className:"genius-chatbot-container",style:R,children:[W.jsxs("div",{className:"genius-chatbot-header",children:[W.jsxs("div",{className:"genius-chatbot-header-icons",children:[W.jsx("button",{className:"genius-chatbot-icon-button",onClick:U,"aria-label":z?"Collapse chat":"Expand chat",children:W.jsx("div",{className:"genius-chatbot-icon",children:z?W.jsx(_7,{}):W.jsx(E7,{})})}),W.jsx("button",{className:"genius-chatbot-icon-button","aria-label":"View history",children:W.jsx("div",{className:"genius-chatbot-icon",children:W.jsx(ZS,{})})})]}),W.jsx("button",{className:"genius-chatbot-icon-button",onClick:j,"aria-label":"Close chat",children:W.jsx("div",{className:"genius-chatbot-icon",children:W.jsx(Ub,{})})})]}),W.jsx("div",{className:"genius-chatbot-body",children:W.jsxs("div",{className:"genius-chatbot-content",children:[ae.length===0?W.jsxs("div",{className:"genius-chatbot-branding",children:[W.jsx("div",{className:"genius-chatbot-logo-container",children:W.jsx("div",{className:"genius-chatbot-logo",children:W.jsx("div",{className:"genius-chatbot-logo-icon",children:W.jsx(Hb,{})})})}),W.jsxs("div",{className:"genius-chatbot-welcome",children:[W.jsxs("h2",{className:"genius-chatbot-welcome-title",children:["Meet Genius",W.jsx("span",{className:"genius-chatbot-welcome-emoji",children:"👋"})]}),W.jsx("p",{className:"genius-chatbot-welcome-subtitle",children:d})]})]}):W.jsxs("div",{className:"genius-chatbot-messages-container",ref:S,onScroll:me,children:[ae.map(G=>W.jsxs("div",{className:`genius-chatbot-message ${G.role}`,children:[W.jsx("div",{className:"genius-chatbot-message-content",dangerouslySetInnerHTML:ge(G.content)}),G.role==="assistant"&&G.sources&&G.sources.length>0&&W.jsxs("div",{className:"genius-chatbot-sources",children:[W.jsxs("button",{className:"genius-chatbot-sources-header",onClick:()=>ne(G.id),type:"button",children:[W.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:K.has(G.id)?"rotate(45deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:W.jsx("path",{d:"M6 1V11M1 6H11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),W.jsxs("span",{children:["Sources (",G.sources.length,")"]}),W.jsx("svg",{className:"genius-chatbot-sources-chevron",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:K.has(G.id)?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:W.jsx("path",{d:"M3.5 5.25L7 8.75L10.5 5.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),K.has(G.id)&&W.jsx("div",{className:"genius-chatbot-sources-list",children:G.sources.map((ie,ue)=>W.jsxs("div",{className:"genius-chatbot-source-item",children:[W.jsx("div",{className:"genius-chatbot-source-number",children:ue+1}),W.jsxs("div",{className:"genius-chatbot-source-content",children:[W.jsx("div",{className:"genius-chatbot-source-title",children:ie.title.replace(/_/g," ").replace(".md","")}),ie.uri&&W.jsx("div",{className:"genius-chatbot-source-uri",children:ie.uri.split("/").pop()})]})]},ue))})]})]},G.id)),$&&W.jsx("div",{className:"genius-chatbot-message assistant",children:W.jsx("span",{children:"Thinking..."})}),W.jsx("div",{ref:A})]}),X&&W.jsx("button",{className:"genius-chatbot-scroll-button",onClick:()=>{E.current=!1,re(!0)},"aria-label":"Scroll to bottom",children:W.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[W.jsx("path",{d:"M10 14L6 10L7.4 8.6L10 11.2L12.6 8.6L14 10L10 14Z",fill:"currentColor"}),W.jsx("path",{d:"M10 10L6 6L7.4 4.6L10 7.2L12.6 4.6L14 6L10 10Z",fill:"currentColor"})]})}),W.jsxs("div",{className:"genius-chatbot-input-section",children:[ae.length===0&&y.length>0&&W.jsx("div",{className:"genius-chatbot-suggestions",children:y.map((G,ie)=>W.jsx("button",{className:"genius-chatbot-suggestion",onClick:()=>q(G),type:"button",children:G},ie))}),W.jsx("div",{className:"genius-chatbot-input-container",children:W.jsxs("div",{className:"genius-chatbot-input-content",children:[W.jsx("div",{className:"genius-chatbot-input-row",children:W.jsx("input",{ref:T,type:"text",className:"genius-chatbot-input",placeholder:p,value:B,onChange:G=>Y(G.target.value),onKeyDown:ce,disabled:$})}),W.jsx("div",{className:"genius-chatbot-input-actions",children:W.jsx("button",{className:"genius-chatbot-send-button",onClick:B.trim()?C:g,"aria-label":B.trim()?"Send message":"Voice input",type:"button",children:W.jsx("div",{className:"genius-chatbot-send-icon",children:B.trim()?W.jsx(QS,{}):W.jsx(O7,{})})})})]})})]})]})})]})})},yC=Pe.createContext(void 0),vC=()=>{const r=Pe.useContext(yC);if(!r)throw new Error("useGeniusChatbot must be used within a GeniusChatbotProvider");return r},wA=({children:r,config:i={},defaultOpen:o=!1})=>{const[c,d]=Pe.useState(o),p=()=>d(!0),y=()=>d(!1),x=()=>d(!c),b=()=>{y(),i.onClose&&i.onClose()};return W.jsxs(yC.Provider,{value:{isOpen:c,openChatbot:p,closeChatbot:y,toggleChatbot:x},children:[r,c&&W.jsx(Cx,{config:{...i,onClose:b}})]})},CA=()=>W.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:W.jsxs("g",{children:[W.jsx("path",{d:"M8 1C8 1.01048 8 1.021 8 1.03141C8.00279 5.97901 9.43359 8 15 8C9.43359 8 8.00279 10.021 8 14.9686C8 14.979 8 14.9895 8 15C8 14.9895 8 14.979 8 14.9686C7.99721 10.021 6.56641 8 1 8C6.56641 8 7.99721 5.97901 8 1.03141C8 1.021 8 1.01048 8 1Z",fill:"currentColor"}),W.jsx("path",{d:"M8 1C8.00284 5.95317 6.59995 8 1 8C6.59995 8 8.00284 10.0468 8 15C7.99716 10.0468 9.39995 8 15 8C9.39995 8 7.99716 5.95317 8 1Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})]})}),TA=({position:r="bottom-right",offsetX:i=20,offsetY:o=20})=>{const{openChatbot:c,isOpen:d}=vC(),p={position:"fixed",...r.includes("bottom")?{bottom:o}:{top:o},...r.includes("right")?{right:i}:{left:i}};return d?null:W.jsxs("button",{className:"genius-toggle-button",onClick:c,"aria-label":"Open Genius chatbot",style:p,children:[W.jsx("span",{className:"genius-toggle-text",children:"Genius"}),W.jsx("div",{className:"genius-toggle-logo",children:W.jsx(CA,{})})]})};var Qy={exports:{}},rm={},Jy={exports:{}},Tx={};/**
492
+ * @license React
493
+ * scheduler.production.js
494
+ *
495
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
496
+ *
497
+ * This source code is licensed under the MIT license found in the
498
+ * LICENSE file in the root directory of this source tree.
499
+ */var bC;function kA(){return bC||(bC=1,function(r){function i(T,E){var P=T.length;T.push(E);e:for(;0<P;){var te=P-1>>>1,_=T[te];if(0<d(_,E))T[te]=E,T[P]=_,P=te;else break e}}function o(T){return T.length===0?null:T[0]}function c(T){if(T.length===0)return null;var E=T[0],P=T.pop();if(P!==E){T[0]=P;e:for(var te=0,_=T.length,re=_>>>1;te<re;){var me=2*(te+1)-1,g=T[me],w=me+1,C=T[w];if(0>d(g,P))w<_&&0>d(C,g)?(T[te]=C,T[w]=P,te=w):(T[te]=g,T[me]=P,te=me);else if(w<_&&0>d(C,P))T[te]=C,T[w]=P,te=w;else break e}}return E}function d(T,E){var P=T.sortIndex-E.sortIndex;return P!==0?P:T.id-E.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;r.unstable_now=function(){return p.now()}}else{var y=Date,x=y.now();r.unstable_now=function(){return y.now()-x}}var b=[],k=[],O=1,N=null,Z=3,J=!1,D=!1,F=!1,ae=!1,ee=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function $(T){for(var E=o(k);E!==null;){if(E.callback===null)c(k);else if(E.startTime<=T)c(k),E.sortIndex=E.expirationTime,i(b,E);else break;E=o(k)}}function Q(T){if(F=!1,$(T),!D)if(o(b)!==null)D=!0,z||(z=!0,X());else{var E=o(k);E!==null&&S(Q,E.startTime-T)}}var z=!1,V=-1,le=5,se=-1;function K(){return ae?!0:!(r.unstable_now()-se<le)}function L(){if(ae=!1,z){var T=r.unstable_now();se=T;var E=!0;try{e:{D=!1,F&&(F=!1,B(V),V=-1),J=!0;var P=Z;try{t:{for($(T),N=o(b);N!==null&&!(N.expirationTime>T&&K());){var te=N.callback;if(typeof te=="function"){N.callback=null,Z=N.priorityLevel;var _=te(N.expirationTime<=T);if(T=r.unstable_now(),typeof _=="function"){N.callback=_,$(T),E=!0;break t}N===o(b)&&c(b),$(T)}else c(b);N=o(b)}if(N!==null)E=!0;else{var re=o(k);re!==null&&S(Q,re.startTime-T),E=!1}}break e}finally{N=null,Z=P,J=!1}E=void 0}}finally{E?X():z=!1}}}var X;if(typeof Y=="function")X=function(){Y(L)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,A=H.port2;H.port1.onmessage=L,X=function(){A.postMessage(null)}}else X=function(){ee(L,0)};function S(T,E){V=ee(function(){T(r.unstable_now())},E)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(T){T.callback=null},r.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<T?Math.floor(1e3/T):5},r.unstable_getCurrentPriorityLevel=function(){return Z},r.unstable_next=function(T){switch(Z){case 1:case 2:case 3:var E=3;break;default:E=Z}var P=Z;Z=E;try{return T()}finally{Z=P}},r.unstable_requestPaint=function(){ae=!0},r.unstable_runWithPriority=function(T,E){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var P=Z;Z=T;try{return E()}finally{Z=P}},r.unstable_scheduleCallback=function(T,E,P){var te=r.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?te+P:te):P=te,T){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=P+_,T={id:O++,callback:E,priorityLevel:T,startTime:P,expirationTime:_,sortIndex:-1},P>te?(T.sortIndex=P,i(k,T),o(b)===null&&T===o(k)&&(F?(B(V),V=-1):F=!0,S(Q,P-te))):(T.sortIndex=_,i(b,T),D||J||(D=!0,z||(z=!0,X()))),T},r.unstable_shouldYield=K,r.unstable_wrapCallback=function(T){var E=Z;return function(){var P=Z;Z=E;try{return T.apply(this,arguments)}finally{Z=P}}}}(Tx)),Tx}var kx={};/**
500
+ * @license React
501
+ * scheduler.development.js
502
+ *
503
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
504
+ *
505
+ * This source code is licensed under the MIT license found in the
506
+ * LICENSE file in the root directory of this source tree.
507
+ */var xC;function MA(){return xC||(xC=1,function(r){process.env.NODE_ENV!=="production"&&function(){function i(){if(Q=!1,se){var T=r.unstable_now();X=T;var E=!0;try{e:{Y=!1,$&&($=!1,V(K),K=-1),B=!0;var P=ee;try{t:{for(y(T),ae=c(J);ae!==null&&!(ae.expirationTime>T&&b());){var te=ae.callback;if(typeof te=="function"){ae.callback=null,ee=ae.priorityLevel;var _=te(ae.expirationTime<=T);if(T=r.unstable_now(),typeof _=="function"){ae.callback=_,y(T),E=!0;break t}ae===c(J)&&d(J),y(T)}else d(J);ae=c(J)}if(ae!==null)E=!0;else{var re=c(D);re!==null&&k(x,re.startTime-T),E=!1}}break e}finally{ae=null,ee=P,B=!1}E=void 0}}finally{E?H():se=!1}}}function o(T,E){var P=T.length;T.push(E);e:for(;0<P;){var te=P-1>>>1,_=T[te];if(0<p(_,E))T[te]=E,T[P]=_,P=te;else break e}}function c(T){return T.length===0?null:T[0]}function d(T){if(T.length===0)return null;var E=T[0],P=T.pop();if(P!==E){T[0]=P;e:for(var te=0,_=T.length,re=_>>>1;te<re;){var me=2*(te+1)-1,g=T[me],w=me+1,C=T[w];if(0>p(g,P))w<_&&0>p(C,g)?(T[te]=C,T[w]=P,te=w):(T[te]=g,T[me]=P,te=me);else if(w<_&&0>p(C,P))T[te]=C,T[w]=P,te=w;else break e}}return E}function p(T,E){var P=T.sortIndex-E.sortIndex;return P!==0?P:T.id-E.id}function y(T){for(var E=c(D);E!==null;){if(E.callback===null)d(D);else if(E.startTime<=T)d(D),E.sortIndex=E.expirationTime,o(J,E);else break;E=c(D)}}function x(T){if($=!1,y(T),!Y)if(c(J)!==null)Y=!0,se||(se=!0,H());else{var E=c(D);E!==null&&k(x,E.startTime-T)}}function b(){return Q?!0:!(r.unstable_now()-X<L)}function k(T,E){K=z(function(){T(r.unstable_now())},E)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var O=performance;r.unstable_now=function(){return O.now()}}else{var N=Date,Z=N.now();r.unstable_now=function(){return N.now()-Z}}var J=[],D=[],F=1,ae=null,ee=3,B=!1,Y=!1,$=!1,Q=!1,z=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null,se=!1,K=-1,L=5,X=-1;if(typeof le=="function")var H=function(){le(i)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,S=A.port2;A.port1.onmessage=i,H=function(){S.postMessage(null)}}else H=function(){z(i,0)};r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(T){T.callback=null},r.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<T?Math.floor(1e3/T):5},r.unstable_getCurrentPriorityLevel=function(){return ee},r.unstable_next=function(T){switch(ee){case 1:case 2:case 3:var E=3;break;default:E=ee}var P=ee;ee=E;try{return T()}finally{ee=P}},r.unstable_requestPaint=function(){Q=!0},r.unstable_runWithPriority=function(T,E){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var P=ee;ee=T;try{return E()}finally{ee=P}},r.unstable_scheduleCallback=function(T,E,P){var te=r.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?te+P:te):P=te,T){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=P+_,T={id:F++,callback:E,priorityLevel:T,startTime:P,expirationTime:_,sortIndex:-1},P>te?(T.sortIndex=P,o(D,T),c(J)===null&&T===c(D)&&($?(V(K),K=-1):$=!0,k(x,P-te))):(T.sortIndex=_,o(J,T),Y||B||(Y=!0,se||(se=!0,H()))),T},r.unstable_shouldYield=b,r.unstable_wrapCallback=function(T){var E=ee;return function(){var P=ee;ee=E;try{return T.apply(this,arguments)}finally{ee=P}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()}(kx)),kx}var SC;function wC(){return SC||(SC=1,process.env.NODE_ENV==="production"?Jy.exports=kA():Jy.exports=MA()),Jy.exports}/**
508
+ * @license React
509
+ * react-dom-client.production.js
510
+ *
511
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
512
+ *
513
+ * This source code is licensed under the MIT license found in the
514
+ * LICENSE file in the root directory of this source tree.
515
+ */var CC;function AA(){if(CC)return rm;CC=1;var r=wC(),i=Pe,o=ed;function c(n){var s="https://react.dev/errors/"+n;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function p(n){var s=n,l=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(l=s.return),n=s.return;while(n)}return s.tag===3?l:null}function y(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function x(n){if(p(n)!==n)throw Error(c(188))}function b(n){var s=n.alternate;if(!s){if(s=p(n),s===null)throw Error(c(188));return s!==n?null:n}for(var l=n,h=s;;){var v=l.return;if(v===null)break;var M=v.alternate;if(M===null){if(h=v.return,h!==null){l=h;continue}break}if(v.child===M.child){for(M=v.child;M;){if(M===l)return x(v),n;if(M===h)return x(v),s;M=M.sibling}throw Error(c(188))}if(l.return!==h.return)l=v,h=M;else{for(var he=!1,xe=v.child;xe;){if(xe===l){he=!0,l=v,h=M;break}if(xe===h){he=!0,h=v,l=M;break}xe=xe.sibling}if(!he){for(xe=M.child;xe;){if(xe===l){he=!0,l=M,h=v;break}if(xe===h){he=!0,h=M,l=v;break}xe=xe.sibling}if(!he)throw Error(c(189))}}if(l.alternate!==h)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?n:s}function k(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=k(n),s!==null)return s;n=n.sibling}return null}var O=Object.assign,N=Symbol.for("react.element"),Z=Symbol.for("react.transitional.element"),J=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),B=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function X(n){return n===null||typeof n!="object"?null:(n=L&&n[L]||n["@@iterator"],typeof n=="function"?n:null)}var H=Symbol.for("react.client.reference");function A(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===H?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case D:return"Fragment";case ae:return"Profiler";case F:return"StrictMode";case Q:return"Suspense";case z:return"SuspenseList";case se:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case J:return"Portal";case Y:return(n.displayName||"Context")+".Provider";case B:return(n._context.displayName||"Context")+".Consumer";case $:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case V:return s=n.displayName||null,s!==null?s:A(n.type)||"Memo";case le:s=n._payload,n=n._init;try{return A(n(s))}catch{}}return null}var S=Array.isArray,T=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},te=[],_=-1;function re(n){return{current:n}}function me(n){0>_||(n.current=te[_],te[_]=null,_--)}function g(n,s){_++,te[_]=n.current,n.current=s}var w=re(null),C=re(null),q=re(null),ce=re(null);function j(n,s){switch(g(q,s),g(C,n),g(w,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?po(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=po(s),n=Ou(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}me(w),g(w,n)}function U(){me(w),me(C),me(q)}function ne(n){n.memoizedState!==null&&g(ce,n);var s=w.current,l=Ou(s,n.type);s!==l&&(g(C,n),g(w,l))}function ge(n){C.current===n&&(me(w),me(C)),ce.current===n&&(me(ce),Ha._currentValue=P)}var R=Object.prototype.hasOwnProperty,G=r.unstable_scheduleCallback,ie=r.unstable_cancelCallback,ue=r.unstable_shouldYield,de=r.unstable_requestPaint,ye=r.unstable_now,Se=r.unstable_getCurrentPriorityLevel,Ce=r.unstable_ImmediatePriority,Ae=r.unstable_UserBlockingPriority,Ne=r.unstable_NormalPriority,Re=r.unstable_LowPriority,fe=r.unstable_IdlePriority,pe=r.log,ve=r.unstable_setDisableYieldValue,be=null,ke=null;function Ee(n){if(typeof pe=="function"&&ve(n),ke&&typeof ke.setStrictMode=="function")try{ke.setStrictMode(be,n)}catch{}}var _e=Math.clz32?Math.clz32:$e,Le=Math.log,Be=Math.LN2;function $e(n){return n>>>=0,n===0?32:31-(Le(n)/Be|0)|0}var Me=256,ze=4194304;function Xe(n){var s=n&42;if(s!==0)return s;switch(n&-n){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:return 64;case 128:return 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 n&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Ve(n,s,l){var h=n.pendingLanes;if(h===0)return 0;var v=0,M=n.suspendedLanes,he=n.pingedLanes;n=n.warmLanes;var xe=h&134217727;return xe!==0?(h=xe&~M,h!==0?v=Xe(h):(he&=xe,he!==0?v=Xe(he):l||(l=xe&~n,l!==0&&(v=Xe(l))))):(xe=h&~M,xe!==0?v=Xe(xe):he!==0?v=Xe(he):l||(l=h&~n,l!==0&&(v=Xe(l)))),v===0?0:s!==0&&s!==v&&(s&M)===0&&(M=v&-v,l=s&-s,M>=l||M===32&&(l&4194048)!==0)?s:v}function Ie(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function Ge(n,s){switch(n){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pt(){var n=Me;return Me<<=1,(Me&4194048)===0&&(Me=256),n}function mt(){var n=ze;return ze<<=1,(ze&62914560)===0&&(ze=4194304),n}function ct(n){for(var s=[],l=0;31>l;l++)s.push(n);return s}function _t(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Rt(n,s,l,h,v,M){var he=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var xe=n.entanglements,Oe=n.expirationTimes,Fe=n.hiddenUpdates;for(l=he&~l;0<l;){var st=31-_e(l),ot=1<<st;xe[st]=0,Oe[st]=-1;var Qe=Fe[st];if(Qe!==null)for(Fe[st]=null,st=0;st<Qe.length;st++){var We=Qe[st];We!==null&&(We.lane&=-536870913)}l&=~ot}h!==0&&Vt(n,h,0),M!==0&&v===0&&n.tag!==0&&(n.suspendedLanes|=M&~(he&~s))}function Vt(n,s,l){n.pendingLanes|=s,n.suspendedLanes&=~s;var h=31-_e(s);n.entangledLanes|=s,n.entanglements[h]=n.entanglements[h]|1073741824|l&4194090}function xt(n,s){var l=n.entangledLanes|=s;for(n=n.entanglements;l;){var h=31-_e(l),v=1<<h;v&s|n[h]&s&&(n[h]|=s),l&=~v}}function lt(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function ht(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ft(){var n=E.p;return n!==0?n:(n=window.event,n===void 0?32:o1(n.type))}function Ct(n,s){var l=E.p;try{return E.p=n,s()}finally{E.p=l}}var ut=Math.random().toString(36).slice(2),bt="__reactFiber$"+ut,yt="__reactProps$"+ut,wt="__reactContainer$"+ut,Ot="__reactEvents$"+ut,Ht="__reactListeners$"+ut,Dt="__reactHandles$"+ut,vt="__reactResources$"+ut,nt="__reactMarker$"+ut;function Ut(n){delete n[bt],delete n[yt],delete n[Ot],delete n[Ht],delete n[Dt]}function kt(n){var s=n[bt];if(s)return s;for(var l=n.parentNode;l;){if(s=l[wt]||l[bt]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(n=ea(n);n!==null;){if(l=n[bt])return l;n=ea(n)}return s}n=l,l=n.parentNode}return null}function Tt(n){if(n=n[bt]||n[wt]){var s=n.tag;if(s===5||s===6||s===13||s===26||s===27||s===3)return n}return null}function jt(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(c(33))}function nn(n){var s=n[vt];return s||(s=n[vt]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function It(n){n[nt]=!0}var Yt=new Set,At={};function Lt(n,s){en(n,s),en(n+"Capture",s)}function en(n,s){for(At[n]=s,n=0;n<s.length;n++)Yt.add(s[n])}var Jt=RegExp("^[: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]*$"),an={},ai={};function jn(n){return R.call(ai,n)?!0:R.call(an,n)?!1:Jt.test(n)?ai[n]=!0:(an[n]=!0,!1)}function Xt(n,s,l){if(jn(s))if(l===null)n.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+l)}}function Qt(n,s,l){if(l===null)n.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttribute(s,""+l)}}function hn(n,s,l,h){if(h===null)n.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(s,l,""+h)}}var gi,ga;function ma(n){if(gi===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);gi=s&&s[1]||"",ga=-1<l.stack.indexOf(`
516
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
517
+ `+gi+n+ga}var ci=!1;function Xi(n,s){if(!n||ci)return"";ci=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var ot=function(){throw Error()};if(Object.defineProperty(ot.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ot,[])}catch(We){var Qe=We}Reflect.construct(n,[],ot)}else{try{ot.call()}catch(We){Qe=We}n.call(ot.prototype)}}else{try{throw Error()}catch(We){Qe=We}(ot=n())&&typeof ot.catch=="function"&&ot.catch(function(){})}}catch(We){if(We&&Qe&&typeof We.stack=="string")return[We.stack,Qe.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var M=h.DetermineComponentFrameRoot(),he=M[0],xe=M[1];if(he&&xe){var Oe=he.split(`
518
+ `),Fe=xe.split(`
519
+ `);for(v=h=0;h<Oe.length&&!Oe[h].includes("DetermineComponentFrameRoot");)h++;for(;v<Fe.length&&!Fe[v].includes("DetermineComponentFrameRoot");)v++;if(h===Oe.length||v===Fe.length)for(h=Oe.length-1,v=Fe.length-1;1<=h&&0<=v&&Oe[h]!==Fe[v];)v--;for(;1<=h&&0<=v;h--,v--)if(Oe[h]!==Fe[v]){if(h!==1||v!==1)do if(h--,v--,0>v||Oe[h]!==Fe[v]){var st=`
520
+ `+Oe[h].replace(" at new "," at ");return n.displayName&&st.includes("<anonymous>")&&(st=st.replace("<anonymous>",n.displayName)),st}while(1<=h&&0<=v);break}}}finally{ci=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?ma(l):""}function ui(n){switch(n.tag){case 26:case 27:case 5:return ma(n.type);case 16:return ma("Lazy");case 13:return ma("Suspense");case 19:return ma("SuspenseList");case 0:case 15:return Xi(n.type,!1);case 11:return Xi(n.type.render,!1);case 1:return Xi(n.type,!0);case 31:return ma("Activity");default:return""}}function Ui(n){try{var s="";do s+=ui(n),n=n.return;while(n);return s}catch(l){return`
521
+ Error generating stack: `+l.message+`
522
+ `+l.stack}}function mi(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Xr(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function wd(n){var s=Xr(n)?"checked":"value",l=Object.getOwnPropertyDescriptor(n.constructor.prototype,s),h=""+n[s];if(!n.hasOwnProperty(s)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var v=l.get,M=l.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return v.call(this)},set:function(he){h=""+he,M.call(this,he)}}),Object.defineProperty(n,s,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(he){h=""+he},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function jo(n){n._valueTracker||(n._valueTracker=wd(n))}function Al(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return n&&(h=Xr(n)?n.checked?"true":"false":n.value),n=h,n!==l?(s.setValue(n),!0):!1}function Vc(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Ax=/[\n"\\]/g;function ls(n){return n.replace(Ax,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function vf(n,s,l,h,v,M,he,xe){n.name="",he!=null&&typeof he!="function"&&typeof he!="symbol"&&typeof he!="boolean"?n.type=he:n.removeAttribute("type"),s!=null?he==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+mi(s)):n.value!==""+mi(s)&&(n.value=""+mi(s)):he!=="submit"&&he!=="reset"||n.removeAttribute("value"),s!=null?Cd(n,he,mi(s)):l!=null?Cd(n,he,mi(l)):h!=null&&n.removeAttribute("value"),v==null&&M!=null&&(n.defaultChecked=!!M),v!=null&&(n.checked=v&&typeof v!="function"&&typeof v!="symbol"),xe!=null&&typeof xe!="function"&&typeof xe!="symbol"&&typeof xe!="boolean"?n.name=""+mi(xe):n.removeAttribute("name")}function bf(n,s,l,h,v,M,he,xe){if(M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(n.type=M),s!=null||l!=null){if(!(M!=="submit"&&M!=="reset"||s!=null))return;l=l!=null?""+mi(l):"",s=s!=null?""+mi(s):l,xe||s===n.value||(n.value=s),n.defaultValue=s}h=h??v,h=typeof h!="function"&&typeof h!="symbol"&&!!h,n.checked=xe?n.checked:!!h,n.defaultChecked=!!h,he!=null&&typeof he!="function"&&typeof he!="symbol"&&typeof he!="boolean"&&(n.name=he)}function Cd(n,s,l){s==="number"&&Vc(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function El(n,s,l,h){if(n=n.options,s){s={};for(var v=0;v<l.length;v++)s["$"+l[v]]=!0;for(l=0;l<n.length;l++)v=s.hasOwnProperty("$"+n[l].value),n[l].selected!==v&&(n[l].selected=v),v&&h&&(n[l].defaultSelected=!0)}else{for(l=""+mi(l),s=null,v=0;v<n.length;v++){if(n[v].value===l){n[v].selected=!0,h&&(n[v].defaultSelected=!0);return}s!==null||n[v].disabled||(s=n[v])}s!==null&&(s.selected=!0)}}function lm(n,s,l){if(s!=null&&(s=""+mi(s),s!==n.value&&(n.value=s),l==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=l!=null?""+mi(l):""}function cm(n,s,l,h){if(s==null){if(h!=null){if(l!=null)throw Error(c(92));if(S(h)){if(1<h.length)throw Error(c(93));h=h[0]}l=h}l==null&&(l=""),s=l}l=mi(s),n.defaultValue=l,h=n.textContent,h===l&&h!==""&&h!==null&&(n.value=h)}function $c(n,s){if(s){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=s;return}}n.textContent=s}var Wy=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function xf(n,s,l){var h=s.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?h?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":h?n.setProperty(s,l):typeof l!="number"||l===0||Wy.has(s)?s==="float"?n.cssFloat=l:n[s]=(""+l).trim():n[s]=l+"px"}function Td(n,s,l){if(s!=null&&typeof s!="object")throw Error(c(62));if(n=n.style,l!=null){for(var h in l)!l.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?n.setProperty(h,""):h==="float"?n.cssFloat="":n[h]="");for(var v in s)h=s[v],s.hasOwnProperty(v)&&l[v]!==h&&xf(n,v,h)}else for(var M in s)s.hasOwnProperty(M)&&xf(n,M,s[M])}function _l(n){if(n.indexOf("-")===-1)return!1;switch(n){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 Ex=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ky=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function kd(n){return Ky.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}var Ol=null;function Sf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ic=null,qc=null;function ev(n){var s=Tt(n);if(s&&(n=s.stateNode)){var l=n[yt]||null;e:switch(n=s.stateNode,s.type){case"input":if(vf(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),s=l.name,l.type==="radio"&&s!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+ls(""+s)+'"][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==n&&h.form===n.form){var v=h[yt]||null;if(!v)throw Error(c(90));vf(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<l.length;s++)h=l[s],h.form===n.form&&Al(h)}break e;case"textarea":lm(n,l.value,l.defaultValue);break e;case"select":s=l.value,s!=null&&El(n,!!l.multiple,s,!1)}}}var um=!1;function Gc(n,s,l){if(um)return n(s,l);um=!0;try{var h=n(s);return h}finally{if(um=!1,(Ic!==null||qc!==null)&&(lc(),Ic&&(s=Ic,n=qc,qc=Ic=null,ev(s),n)))for(s=0;s<n.length;s++)ev(n[s])}}function Dl(n,s){var l=n.stateNode;if(l===null)return null;var h=l[yt]||null;if(h===null)return null;l=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(n=n.type,h=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!h;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(c(231,s,typeof l));return l}var er=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wf=!1;if(er)try{var Fr={};Object.defineProperty(Fr,"passive",{get:function(){wf=!0}}),window.addEventListener("test",Fr,Fr),window.removeEventListener("test",Fr,Fr)}catch{wf=!1}var Zr=null,Yc=null,jl=null;function dm(){if(jl)return jl;var n,s=Yc,l=s.length,h,v="value"in Zr?Zr.value:Zr.textContent,M=v.length;for(n=0;n<l&&s[n]===v[n];n++);var he=l-n;for(h=1;h<=he&&s[l-h]===v[M-h];h++);return jl=v.slice(n,1<h?1-h:void 0)}function Fi(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function Cf(){return!0}function Tf(){return!1}function ya(n){function s(l,h,v,M,he){this._reactName=l,this._targetInst=v,this.type=h,this.nativeEvent=M,this.target=he,this.currentTarget=null;for(var xe in n)n.hasOwnProperty(xe)&&(l=n[xe],this[xe]=l?l(M):M[xe]);return this.isDefaultPrevented=(M.defaultPrevented!=null?M.defaultPrevented:M.returnValue===!1)?Cf:Tf,this.isPropagationStopped=Tf,this}return O(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Cf)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Cf)},persist:function(){},isPersistent:Cf}),s}var Lo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kf=ya(Lo),Md=O({},Lo,{view:0,detail:0}),tv=ya(Md),hm,Mf,Ad,Ll=O({},Md,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qr,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Ad&&(Ad&&n.type==="mousemove"?(hm=n.screenX-Ad.screenX,Mf=n.screenY-Ad.screenY):Mf=hm=0,Ad=n),hm)},movementY:function(n){return"movementY"in n?n.movementY:Mf}}),fm=ya(Ll),nv=O({},Ll,{dataTransfer:0}),iv=ya(nv),_x=O({},Md,{relatedTarget:0}),pm=ya(_x),Ox=O({},Lo,{animationName:0,elapsedTime:0,pseudoElement:0}),Dx=ya(Ox),jx=O({},Lo,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Ed=ya(jx),av=O({},Lo,{data:0}),gm=ya(av),sv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rv={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"},mm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ov(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=mm[n])?!!s[n]:!1}function Qr(){return ov}var Rl=O({},Md,{key:function(n){if(n.key){var s=sv[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=Fi(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?rv[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qr,charCode:function(n){return n.type==="keypress"?Fi(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Fi(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Ds=ya(Rl),Xa=O({},Ll,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_d=ya(Xa),Af=O({},Md,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qr}),ym=ya(Af),Ma=O({},Lo,{propertyName:0,elapsedTime:0,pseudoElement:0}),lv=ya(Ma),Ef=O({},Ll,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),Nl=ya(Ef),vm=O({},Lo,{newState:0,oldState:0}),cv=ya(vm),uv=[9,13,27,32],Od=er&&"CompositionEvent"in window,Dd=null;er&&"documentMode"in document&&(Dd=document.documentMode);var bm=er&&"TextEvent"in window&&!Dd,tr=er&&(!Od||Dd&&8<Dd&&11>=Dd),xm=" ",_f=!1;function jd(n,s){switch(n){case"keyup":return uv.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ro(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var No=!1;function Sm(n,s){switch(n){case"compositionend":return Ro(s);case"keypress":return s.which!==32?null:(_f=!0,xm);case"textInput":return n=s.data,n===xm&&_f?null:n;default:return null}}function zl(n,s){if(No)return n==="compositionend"||!Od&&jd(n,s)?(n=dm(),jl=Yc=Zr=null,No=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return tr&&s.locale!=="ko"?null:s.data;default:return null}}var dv={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 Of(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!dv[n.type]:s==="textarea"}function Df(n,s,l,h){Ic?qc?qc.push(h):qc=[h]:Ic=h,s=_u(s,"onChange"),0<s.length&&(l=new kf("onChange","change",null,l,h),n.push({event:l,listeners:s}))}var js=null,Ls=null;function wm(n){hc(n,0)}function nr(n){var s=jt(n);if(Al(s))return n}function Cm(n,s){if(n==="change")return s}var Tm=!1;if(er){var Bl;if(er){var Ul="oninput"in document;if(!Ul){var km=document.createElement("div");km.setAttribute("oninput","return;"),Ul=typeof km.oninput=="function"}Bl=Ul}else Bl=!1;Tm=Bl&&(!document.documentMode||9<document.documentMode)}function Xc(){js&&(js.detachEvent("onpropertychange",Mm),Ls=js=null)}function Mm(n){if(n.propertyName==="value"&&nr(Ls)){var s=[];Df(s,Ls,n,Sf(n)),Gc(wm,s)}}function jf(n,s,l){n==="focusin"?(Xc(),js=s,Ls=l,js.attachEvent("onpropertychange",Mm)):n==="focusout"&&Xc()}function zo(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return nr(Ls)}function Jr(n,s){if(n==="click")return nr(s)}function Am(n,s){if(n==="input"||n==="change")return nr(s)}function Em(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var Zi=typeof Object.is=="function"?Object.is:Em;function Bo(n,s){if(Zi(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var l=Object.keys(n),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var v=l[h];if(!R.call(s,v)||!Zi(n[v],s[v]))return!1}return!0}function Uo(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function ei(n,s){var l=Uo(n);n=0;for(var h;l;){if(l.nodeType===3){if(h=n+l.textContent.length,n<=s&&h>=s)return{node:l,offset:s-n};n=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Uo(l)}}function Ld(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?Ld(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function _m(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=Vc(n.document);s instanceof n.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)n=s.contentWindow;else break;s=Vc(n.document)}return s}function Rd(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}var Hl=er&&"documentMode"in document&&11>=document.documentMode,ir=null,Rs=null,Ho=null,Pl=!1;function Lf(n,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Pl||ir==null||ir!==Vc(h)||(h=ir,"selectionStart"in h&&Rd(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ho&&Bo(Ho,h)||(Ho=h,h=_u(Rs,"onSelect"),0<h.length&&(s=new kf("onSelect","select",null,s,l),n.push({event:s,listeners:h}),s.target=ir)))}function Wr(n,s){var l={};return l[n.toLowerCase()]=s.toLowerCase(),l["Webkit"+n]="webkit"+s,l["Moz"+n]="moz"+s,l}var Vl={animationend:Wr("Animation","AnimationEnd"),animationiteration:Wr("Animation","AnimationIteration"),animationstart:Wr("Animation","AnimationStart"),transitionrun:Wr("Transition","TransitionRun"),transitionstart:Wr("Transition","TransitionStart"),transitioncancel:Wr("Transition","TransitionCancel"),transitionend:Wr("Transition","TransitionEnd")},cs={},Ns={};er&&(Ns=document.createElement("div").style,"AnimationEvent"in window||(delete Vl.animationend.animation,delete Vl.animationiteration.animation,delete Vl.animationstart.animation),"TransitionEvent"in window||delete Vl.transitionend.transition);function ar(n){if(cs[n])return cs[n];if(!Vl[n])return n;var s=Vl[n],l;for(l in s)if(s.hasOwnProperty(l)&&l in Ns)return cs[n]=s[l];return n}var hv=ar("animationend"),Om=ar("animationiteration"),fv=ar("animationstart"),Dm=ar("transitionrun"),Rf=ar("transitionstart"),pv=ar("transitioncancel"),jm=ar("transitionend"),Lm=new Map,Fc="abort auxClick beforeToggle 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(" ");Fc.push("scrollEnd");function us(n,s){Lm.set(n,s),Lt(s,[n])}var Rm=new WeakMap;function Fa(n,s){if(typeof n=="object"&&n!==null){var l=Rm.get(n);return l!==void 0?l:(s={value:n,source:s,stack:Ui(s)},Rm.set(n,s),s)}return{value:n,source:s,stack:Ui(s)}}var Aa=[],Po=0,sr=0;function zs(){for(var n=Po,s=sr=Po=0;s<n;){var l=Aa[s];Aa[s++]=null;var h=Aa[s];Aa[s++]=null;var v=Aa[s];Aa[s++]=null;var M=Aa[s];if(Aa[s++]=null,h!==null&&v!==null){var he=h.pending;he===null?v.next=v:(v.next=he.next,he.next=v),h.pending=v}M!==0&&Qc(l,v,M)}}function Vo(n,s,l,h){Aa[Po++]=n,Aa[Po++]=s,Aa[Po++]=l,Aa[Po++]=h,sr|=h,n.lanes|=h,n=n.alternate,n!==null&&(n.lanes|=h)}function Zc(n,s,l,h){return Vo(n,s,l,h),Nd(n)}function rr(n,s){return Vo(n,null,null,s),Nd(n)}function Qc(n,s,l){n.lanes|=l;var h=n.alternate;h!==null&&(h.lanes|=l);for(var v=!1,M=n.return;M!==null;)M.childLanes|=l,h=M.alternate,h!==null&&(h.childLanes|=l),M.tag===22&&(n=M.stateNode,n===null||n._visibility&1||(v=!0)),n=M,M=M.return;return n.tag===3?(M=n.stateNode,v&&s!==null&&(v=31-_e(l),n=M.hiddenUpdates,h=n[v],h===null?n[v]=[s]:h.push(s),s.lane=l|536870912),M):null}function Nd(n){if(50<Cu)throw Cu=0,R0=null,Error(c(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var Jc={};function gv(n,s,l,h){this.tag=n,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ea(n,s,l,h){return new gv(n,s,l,h)}function zd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Bs(n,s){var l=n.alternate;return l===null?(l=Ea(n.tag,s,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=s,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,s=n.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function gn(n,s){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,s=l.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),n}function gt(n,s,l,h,v,M){var he=0;if(h=n,typeof n=="function")zd(n)&&(he=1);else if(typeof n=="string")he=Zv(n,l,w.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case se:return n=Ea(31,l,s,v),n.elementType=se,n.lanes=M,n;case D:return ds(l.children,v,M,s);case F:he=8,v|=24;break;case ae:return n=Ea(12,l,s,v|2),n.elementType=ae,n.lanes=M,n;case Q:return n=Ea(13,l,s,v),n.elementType=Q,n.lanes=M,n;case z:return n=Ea(19,l,s,v),n.elementType=z,n.lanes=M,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case ee:case Y:he=10;break e;case B:he=9;break e;case $:he=11;break e;case V:he=14;break e;case le:he=16,h=null;break e}he=29,l=Error(c(130,n===null?"null":typeof n,"")),h=null}return s=Ea(he,l,s,v),s.elementType=n,s.type=h,s.lanes=M,s}function ds(n,s,l,h){return n=Ea(7,n,h,s),n.lanes=l,n}function Wc(n,s,l){return n=Ea(6,n,null,s),n.lanes=l,n}function di(n,s,l){return s=Ea(4,n.children!==null?n.children:[],n.key,s),s.lanes=l,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var $o=[],Io=0,Bd=null,Kc=0,hs=[],_a=0,Kr=null,Us=1,yi="";function kn(n,s){$o[Io++]=Kc,$o[Io++]=Bd,Bd=n,Kc=s}function Nf(n,s,l){hs[_a++]=Us,hs[_a++]=yi,hs[_a++]=Kr,Kr=n;var h=Us;n=yi;var v=32-_e(h)-1;h&=~(1<<v),l+=1;var M=32-_e(s)+v;if(30<M){var he=v-v%5;M=(h&(1<<he)-1).toString(32),h>>=he,v-=he,Us=1<<32-_e(s)+v|l<<v|h,yi=M+n}else Us=1<<M|l<<v|h,yi=n}function $l(n){n.return!==null&&(kn(n,1),Nf(n,1,0))}function or(n){for(;n===Bd;)Bd=$o[--Io],$o[Io]=null,Kc=$o[--Io],$o[Io]=null;for(;n===Kr;)Kr=hs[--_a],hs[_a]=null,yi=hs[--_a],hs[_a]=null,Us=hs[--_a],hs[_a]=null}var ki=null,Ln=null,_n=!1,fs=null,ps=!1,Il=Error(c(519));function eo(n){var s=Error(c(418,""));throw nu(Fa(s,n)),Il}function Ud(n){var s=n.stateNode,l=n.type,h=n.memoizedProps;switch(s[bt]=n,s[yt]=h,l){case"dialog":cn("cancel",s),cn("close",s);break;case"iframe":case"object":case"embed":cn("load",s);break;case"video":case"audio":for(l=0;l<Ch.length;l++)cn(Ch[l],s);break;case"source":cn("error",s);break;case"img":case"image":case"link":cn("error",s),cn("load",s);break;case"details":cn("toggle",s);break;case"input":cn("invalid",s),bf(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0),jo(s);break;case"select":cn("invalid",s);break;case"textarea":cn("invalid",s),cm(s,h.value,h.defaultValue,h.children),jo(s)}l=h.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||s.textContent===""+l||h.suppressHydrationWarning===!0||F0(s.textContent,l)?(h.popover!=null&&(cn("beforetoggle",s),cn("toggle",s)),h.onScroll!=null&&cn("scroll",s),h.onScrollEnd!=null&&cn("scrollend",s),h.onClick!=null&&(s.onclick=Gp),s=!0):s=!1,s||eo(n)}function Nm(n){for(ki=n.return;ki;)switch(ki.tag){case 5:case 13:ps=!1;return;case 27:case 3:ps=!0;return;default:ki=ki.return}}function eu(n){if(n!==ki)return!1;if(!_n)return Nm(n),_n=!0,!1;var s=n.tag,l;if((l=s!==3&&s!==27)&&((l=s===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||Ar(n.type,n.memoizedProps)),l=!l),l&&Ln&&eo(n),Nm(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));e:{for(n=n.nextSibling,s=0;n;){if(n.nodeType===8)if(l=n.data,l==="/$"){if(s===0){Ln=qs(n.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++;n=n.nextSibling}Ln=null}}else s===27?(s=Ln,ol(n.type)?(n=ll,ll=null,Ln=n):Ln=s):Ln=ki?qs(n.stateNode.nextSibling):null;return!0}function tu(){Ln=ki=null,_n=!1}function zm(){var n=fs;return n!==null&&(Na===null?Na=n:Na.push.apply(Na,n),fs=null),n}function nu(n){fs===null?fs=[n]:fs.push(n)}var Hd=re(null),to=null,Hs=null;function no(n,s,l){g(Hd,s._currentValue),s._currentValue=l}function lr(n){n._currentValue=Hd.current,me(Hd)}function zf(n,s,l){for(;n!==null;){var h=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),n===l)break;n=n.return}}function Bm(n,s,l,h){var v=n.child;for(v!==null&&(v.return=n);v!==null;){var M=v.dependencies;if(M!==null){var he=v.child;M=M.firstContext;e:for(;M!==null;){var xe=M;M=v;for(var Oe=0;Oe<s.length;Oe++)if(xe.context===s[Oe]){M.lanes|=l,xe=M.alternate,xe!==null&&(xe.lanes|=l),zf(M.return,l,n),h||(he=null);break e}M=xe.next}}else if(v.tag===18){if(he=v.return,he===null)throw Error(c(341));he.lanes|=l,M=he.alternate,M!==null&&(M.lanes|=l),zf(he,l,n),he=null}else he=v.child;if(he!==null)he.return=v;else for(he=v;he!==null;){if(he===n){he=null;break}if(v=he.sibling,v!==null){v.return=he.return,he=v;break}he=he.return}v=he}}function iu(n,s,l,h){n=null;for(var v=s,M=!1;v!==null;){if(!M){if((v.flags&524288)!==0)M=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var he=v.alternate;if(he===null)throw Error(c(387));if(he=he.memoizedProps,he!==null){var xe=v.type;Zi(v.pendingProps.value,he.value)||(n!==null?n.push(xe):n=[xe])}}else if(v===ce.current){if(he=v.alternate,he===null)throw Error(c(387));he.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(n!==null?n.push(Ha):n=[Ha])}v=v.return}n!==null&&Bm(s,n,l,h),s.flags|=262144}function Pd(n){for(n=n.firstContext;n!==null;){if(!Zi(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function qo(n){to=n,Hs=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Hi(n){return Um(to,n)}function Vd(n,s){return to===null&&qo(n),Um(n,s)}function Um(n,s){var l=s._currentValue;if(s={context:s,memoizedValue:l,next:null},Hs===null){if(n===null)throw Error(c(308));Hs=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else Hs=Hs.next=s;return l}var au=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(l,h){n.push(h)}};this.abort=function(){s.aborted=!0,n.forEach(function(l){return l()})}},Bf=r.unstable_scheduleCallback,mv=r.unstable_NormalPriority,Di={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function su(){return{controller:new au,data:new Map,refCount:0}}function cr(n){n.refCount--,n.refCount===0&&Bf(mv,function(){n.controller.abort()})}var Go=null,$d=0,gs=0,ji=null;function Uf(n,s){if(Go===null){var l=Go=[];$d=0,gs=dc(),ji={status:"pending",value:void 0,then:function(h){l.push(h)}}}return $d++,s.then(Hf,Hf),s}function Hf(){if(--$d===0&&Go!==null){ji!==null&&(ji.status="fulfilled");var n=Go;Go=null,gs=0,ji=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function yv(n,s){var l=[],h={status:"pending",value:null,reason:null,then:function(v){l.push(v)}};return n.then(function(){h.status="fulfilled",h.value=s;for(var v=0;v<l.length;v++)(0,l[v])(s)},function(v){for(h.status="rejected",h.reason=v,v=0;v<l.length;v++)(0,l[v])(void 0)}),h}var Pf=T.S;T.S=function(n,s){typeof s=="object"&&s!==null&&typeof s.then=="function"&&Uf(n,s),Pf!==null&&Pf(n,s)};var ur=re(null);function Id(){var n=ur.current;return n!==null?n:Zn.pooledCache}function ql(n,s){s===null?g(ur,ur.current):g(ur,s.pool)}function Vf(){var n=Id();return n===null?null:{parent:Di._currentValue,pool:n}}var Yo=Error(c(460)),$f=Error(c(474)),qd=Error(c(542)),If={then:function(){}};function qf(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Gd(){}function Hm(n,s,l){switch(l=n[l],l===void 0?n.push(s):l!==s&&(s.then(Gd,Gd),s=l),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Vm(n),n;default:if(typeof s.status=="string")s.then(Gd,Gd);else{if(n=Zn,n!==null&&100<n.shellSuspendCounter)throw Error(c(482));n=s,n.status="pending",n.then(function(h){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=h}},function(h){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,Vm(n),n}throw Gl=s,Yo}}var Gl=null;function Pm(){if(Gl===null)throw Error(c(459));var n=Gl;return Gl=null,n}function Vm(n){if(n===Yo||n===qd)throw Error(c(483))}var dr=!1;function Gf(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yf(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Oa(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function hr(n,s,l){var h=n.updateQueue;if(h===null)return null;if(h=h.shared,(Pn&2)!==0){var v=h.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),h.pending=s,s=Nd(n),Qc(n,null,l),s}return Vo(n,h,s,l),Nd(n)}function Yl(n,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194048)!==0)){var h=s.lanes;h&=n.pendingLanes,l|=h,s.lanes=l,xt(n,l)}}function $m(n,s){var l=n.updateQueue,h=n.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var v=null,M=null;if(l=l.firstBaseUpdate,l!==null){do{var he={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};M===null?v=M=he:M=M.next=he,l=l.next}while(l!==null);M===null?v=M=s:M=M.next=s}else v=M=s;l={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:M,shared:h.shared,callbacks:h.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=s:n.next=s,l.lastBaseUpdate=s}var Im=!1;function ru(){if(Im){var n=ji;if(n!==null)throw n}}function io(n,s,l,h){Im=!1;var v=n.updateQueue;dr=!1;var M=v.firstBaseUpdate,he=v.lastBaseUpdate,xe=v.shared.pending;if(xe!==null){v.shared.pending=null;var Oe=xe,Fe=Oe.next;Oe.next=null,he===null?M=Fe:he.next=Fe,he=Oe;var st=n.alternate;st!==null&&(st=st.updateQueue,xe=st.lastBaseUpdate,xe!==he&&(xe===null?st.firstBaseUpdate=Fe:xe.next=Fe,st.lastBaseUpdate=Oe))}if(M!==null){var ot=v.baseState;he=0,st=Fe=Oe=null,xe=M;do{var Qe=xe.lane&-536870913,We=Qe!==xe.lane;if(We?(xn&Qe)===Qe:(h&Qe)===Qe){Qe!==0&&Qe===gs&&(Im=!0),st!==null&&(st=st.next={lane:0,tag:xe.tag,payload:xe.payload,callback:null,next:null});e:{var qt=n,Gt=xe;Qe=s;var Nn=l;switch(Gt.tag){case 1:if(qt=Gt.payload,typeof qt=="function"){ot=qt.call(Nn,ot,Qe);break e}ot=qt;break e;case 3:qt.flags=qt.flags&-65537|128;case 0:if(qt=Gt.payload,Qe=typeof qt=="function"?qt.call(Nn,ot,Qe):qt,Qe==null)break e;ot=O({},ot,Qe);break e;case 2:dr=!0}}Qe=xe.callback,Qe!==null&&(n.flags|=64,We&&(n.flags|=8192),We=v.callbacks,We===null?v.callbacks=[Qe]:We.push(Qe))}else We={lane:Qe,tag:xe.tag,payload:xe.payload,callback:xe.callback,next:null},st===null?(Fe=st=We,Oe=ot):st=st.next=We,he|=Qe;if(xe=xe.next,xe===null){if(xe=v.shared.pending,xe===null)break;We=xe,xe=We.next,We.next=null,v.lastBaseUpdate=We,v.shared.pending=null}}while(!0);st===null&&(Oe=ot),v.baseState=Oe,v.firstBaseUpdate=Fe,v.lastBaseUpdate=st,M===null&&(v.shared.lanes=0),uo|=he,n.lanes=he,n.memoizedState=ot}}function Xf(n,s){if(typeof n!="function")throw Error(c(191,n));n.call(s)}function Yd(n,s){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)Xf(l[n],s)}var Xl=re(null),Xd=re(0);function Pi(n,s){n=co,g(Xd,n),g(Xl,s),co=n|s.baseLanes}function ou(){g(Xd,co),g(Xl,Xl.current)}function lu(){co=Xd.current,me(Xl),me(Xd)}var ms=0,ln=null,Hn=null,hi=null,Fd=!1,Za=!1,Xo=!1,Ps=0,Qa=0,ao=null,qm=0;function fi(){throw Error(c(321))}function Ff(n,s){if(s===null)return!1;for(var l=0;l<s.length&&l<n.length;l++)if(!Zi(n[l],s[l]))return!1;return!0}function Zf(n,s,l,h,v,M){return ms=M,ln=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,T.H=n===null||n.memoizedState===null?s0:r0,Xo=!1,M=l(h,v),Xo=!1,Za&&(M=Gm(s,l,h,v)),Fo(n),M}function Fo(n){T.H=hp;var s=Hn!==null&&Hn.next!==null;if(ms=0,hi=Hn=ln=null,Fd=!1,Qa=0,ao=null,s)throw Error(c(300));n===null||Li||(n=n.dependencies,n!==null&&Pd(n)&&(Li=!0))}function Gm(n,s,l,h){ln=n;var v=0;do{if(Za&&(ao=null),Qa=0,Za=!1,25<=v)throw Error(c(301));if(v+=1,hi=Hn=null,n.updateQueue!=null){var M=n.updateQueue;M.lastEffect=null,M.events=null,M.stores=null,M.memoCache!=null&&(M.memoCache.index=0)}T.H=so,M=s(l,h)}while(Za);return M}function vv(){var n=T.H,s=n.useState()[0];return s=typeof s.then=="function"?Qd(s):s,n=n.useState()[0],(Hn!==null?Hn.memoizedState:null)!==n&&(ln.flags|=1024),s}function Qf(){var n=Ps!==0;return Ps=0,n}function cu(n,s,l){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~l}function Jf(n){if(Fd){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Fd=!1}ms=0,hi=Hn=ln=null,Za=!1,Qa=Ps=0,ao=null}function ra(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hi===null?ln.memoizedState=hi=n:hi=hi.next=n,hi}function vi(){if(Hn===null){var n=ln.alternate;n=n!==null?n.memoizedState:null}else n=Hn.next;var s=hi===null?ln.memoizedState:hi.next;if(s!==null)hi=s,Hn=n;else{if(n===null)throw ln.alternate===null?Error(c(467)):Error(c(310));Hn=n,n={memoizedState:Hn.memoizedState,baseState:Hn.baseState,baseQueue:Hn.baseQueue,queue:Hn.queue,next:null},hi===null?ln.memoizedState=hi=n:hi=hi.next=n}return hi}function Zd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qd(n){var s=Qa;return Qa+=1,ao===null&&(ao=[]),n=Hm(ao,n,s),s=ln,(hi===null?s.memoizedState:hi.next)===null&&(s=s.alternate,T.H=s===null||s.memoizedState===null?s0:r0),n}function Ai(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Qd(n);if(n.$$typeof===Y)return Hi(n)}throw Error(c(438,String(n)))}function Wf(n){var s=null,l=ln.updateQueue;if(l!==null&&(s=l.memoCache),s==null){var h=ln.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),l===null&&(l=Zd(),ln.updateQueue=l),l.memoCache=s,l=s.data[s.index],l===void 0)for(l=s.data[s.index]=Array(n),h=0;h<n;h++)l[h]=K;return s.index++,l}function fr(n,s){return typeof s=="function"?s(n):s}function Jd(n){var s=vi();return Kf(s,Hn,n)}function Kf(n,s,l){var h=n.queue;if(h===null)throw Error(c(311));h.lastRenderedReducer=l;var v=n.baseQueue,M=h.pending;if(M!==null){if(v!==null){var he=v.next;v.next=M.next,M.next=he}s.baseQueue=v=M,h.pending=null}if(M=n.baseState,v===null)n.memoizedState=M;else{s=v.next;var xe=he=null,Oe=null,Fe=s,st=!1;do{var ot=Fe.lane&-536870913;if(ot!==Fe.lane?(xn&ot)===ot:(ms&ot)===ot){var Qe=Fe.revertLane;if(Qe===0)Oe!==null&&(Oe=Oe.next={lane:0,revertLane:0,action:Fe.action,hasEagerState:Fe.hasEagerState,eagerState:Fe.eagerState,next:null}),ot===gs&&(st=!0);else if((ms&Qe)===Qe){Fe=Fe.next,Qe===gs&&(st=!0);continue}else ot={lane:0,revertLane:Fe.revertLane,action:Fe.action,hasEagerState:Fe.hasEagerState,eagerState:Fe.eagerState,next:null},Oe===null?(xe=Oe=ot,he=M):Oe=Oe.next=ot,ln.lanes|=Qe,uo|=Qe;ot=Fe.action,Xo&&l(M,ot),M=Fe.hasEagerState?Fe.eagerState:l(M,ot)}else Qe={lane:ot,revertLane:Fe.revertLane,action:Fe.action,hasEagerState:Fe.hasEagerState,eagerState:Fe.eagerState,next:null},Oe===null?(xe=Oe=Qe,he=M):Oe=Oe.next=Qe,ln.lanes|=ot,uo|=ot;Fe=Fe.next}while(Fe!==null&&Fe!==s);if(Oe===null?he=M:Oe.next=xe,!Zi(M,n.memoizedState)&&(Li=!0,st&&(l=ji,l!==null)))throw l;n.memoizedState=M,n.baseState=he,n.baseQueue=Oe,h.lastRenderedState=M}return v===null&&(h.lanes=0),[n.memoizedState,h.dispatch]}function ep(n){var s=vi(),l=s.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=n;var h=l.dispatch,v=l.pending,M=s.memoizedState;if(v!==null){l.pending=null;var he=v=v.next;do M=n(M,he.action),he=he.next;while(he!==v);Zi(M,s.memoizedState)||(Li=!0),s.memoizedState=M,s.baseQueue===null&&(s.baseState=M),l.lastRenderedState=M}return[M,h]}function Wd(n,s,l){var h=ln,v=vi(),M=_n;if(M){if(l===void 0)throw Error(c(407));l=l()}else l=s();var he=!Zi((Hn||v).memoizedState,l);he&&(v.memoizedState=l,Li=!0),v=v.queue;var xe=Xm.bind(null,h,v,n);if(Yn(2048,8,xe,[n]),v.getSnapshot!==s||he||hi!==null&&hi.memoizedState.tag&1){if(h.flags|=2048,Da(9,th(),Ym.bind(null,h,v,l,s),null),Zn===null)throw Error(c(349));M||(ms&124)!==0||tp(h,s,l)}return l}function tp(n,s,l){n.flags|=16384,n={getSnapshot:s,value:l},s=ln.updateQueue,s===null?(s=Zd(),ln.updateQueue=s,s.stores=[n]):(l=s.stores,l===null?s.stores=[n]:l.push(n))}function Ym(n,s,l,h){s.value=l,s.getSnapshot=h,Fm(s)&&np(n)}function Xm(n,s,l){return l(function(){Fm(s)&&np(n)})}function Fm(n){var s=n.getSnapshot;n=n.value;try{var l=s();return!Zi(n,l)}catch{return!0}}function np(n){var s=rr(n,2);s!==null&&Ka(s,n,2)}function Kd(n){var s=ra();if(typeof n=="function"){var l=n;if(n=l(),Xo){Ee(!0);try{l()}finally{Ee(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fr,lastRenderedState:n},s}function ip(n,s,l,h){return n.baseState=l,Kf(n,Hn,typeof h=="function"?h:fr)}function bv(n,s,l,h,v){if(Jl(n))throw Error(c(485));if(n=s.action,n!==null){var M={payload:v,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(he){M.listeners.push(he)}};T.T!==null?l(!0):M.isTransition=!1,h(M),l=s.pending,l===null?(M.next=s.pending=M,ap(s,M)):(M.next=l.next,s.pending=l.next=M)}}function ap(n,s){var l=s.action,h=s.payload,v=n.state;if(s.isTransition){var M=T.T,he={};T.T=he;try{var xe=l(v,h),Oe=T.S;Oe!==null&&Oe(he,xe),eh(n,s,xe)}catch(Fe){rp(n,s,Fe)}finally{T.T=M}}else try{M=l(v,h),eh(n,s,M)}catch(Fe){rp(n,s,Fe)}}function eh(n,s,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(h){sp(n,s,h)},function(h){return rp(n,s,h)}):sp(n,s,l)}function sp(n,s,l){s.status="fulfilled",s.value=l,Zm(s),n.state=l,s=n.pending,s!==null&&(l=s.next,l===s?n.pending=null:(l=l.next,s.next=l,ap(n,l)))}function rp(n,s,l){var h=n.pending;if(n.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=l,Zm(s),s=s.next;while(s!==h)}n.action=null}function Zm(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function op(n,s){return s}function Qm(n,s){if(_n){var l=Zn.formState;if(l!==null){e:{var h=ln;if(_n){if(Ln){t:{for(var v=Ln,M=ps;v.nodeType!==8;){if(!M){v=null;break t}if(v=qs(v.nextSibling),v===null){v=null;break t}}M=v.data,v=M==="F!"||M==="F"?v:null}if(v){Ln=qs(v.nextSibling),h=v.data==="F!";break e}}eo(h)}h=!1}h&&(s=l[0])}}return l=ra(),l.memoizedState=l.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:op,lastRenderedState:s},l.queue=h,l=i0.bind(null,ln,h),h.dispatch=l,h=Kd(!1),M=ah.bind(null,ln,!1,h.queue),h=ra(),v={state:s,dispatch:null,action:n,pending:null},h.queue=v,l=bv.bind(null,ln,v,M,l),v.dispatch=l,h.memoizedState=n,[s,l,!1]}function pr(n){var s=vi();return lp(s,Hn,n)}function lp(n,s,l){if(s=Kf(n,s,op)[0],n=Jd(fr)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=Qd(s)}catch(he){throw he===Yo?qd:he}else h=s;s=vi();var v=s.queue,M=v.dispatch;return l!==s.memoizedState&&(ln.flags|=2048,Da(9,th(),Lx.bind(null,v,l),null)),[h,M,n]}function Lx(n,s){n.action=s}function cp(n){var s=vi(),l=Hn;if(l!==null)return lp(s,l,n);vi(),s=s.memoizedState,l=vi();var h=l.queue.dispatch;return l.memoizedState=n,[s,h,!1]}function Da(n,s,l,h){return n={tag:n,create:l,deps:h,inst:s,next:null},s=ln.updateQueue,s===null&&(s=Zd(),ln.updateQueue=s),l=s.lastEffect,l===null?s.lastEffect=n.next=n:(h=l.next,l.next=n,n.next=h,s.lastEffect=n),n}function th(){return{destroy:void 0,resource:void 0}}function nh(){return vi().memoizedState}function Zo(n,s,l,h){var v=ra();h=h===void 0?null:h,ln.flags|=n,v.memoizedState=Da(1|s,th(),l,h)}function Yn(n,s,l,h){var v=vi();h=h===void 0?null:h;var M=v.memoizedState.inst;Hn!==null&&h!==null&&Ff(h,Hn.memoizedState.deps)?v.memoizedState=Da(s,M,l,h):(ln.flags|=n,v.memoizedState=Da(1|s,M,l,h))}function xv(n,s){Zo(8390656,8,n,s)}function Sv(n,s){Yn(2048,8,n,s)}function Jm(n,s){return Yn(4,2,n,s)}function Vs(n,s){return Yn(4,4,n,s)}function Wm(n,s){if(typeof s=="function"){n=n();var l=s(n);return function(){typeof l=="function"?l():s(null)}}if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function up(n,s,l){l=l!=null?l.concat([n]):null,Yn(4,4,Wm.bind(null,s,n),l)}function Fl(){}function Zl(n,s){var l=vi();s=s===void 0?null:s;var h=l.memoizedState;return s!==null&&Ff(s,h[1])?h[0]:(l.memoizedState=[n,s],n)}function Km(n,s){var l=vi();s=s===void 0?null:s;var h=l.memoizedState;if(s!==null&&Ff(s,h[1]))return h[0];if(h=n(),Xo){Ee(!0);try{n()}finally{Ee(!1)}}return l.memoizedState=[h,s],h}function ih(n,s,l){return l===void 0||(ms&1073741824)!==0?n.memoizedState=s:(n.memoizedState=l,n=N0(),ln.lanes|=n,uo|=n,l)}function e0(n,s,l,h){return Zi(l,s)?l:Xl.current!==null?(n=ih(n,l,h),Zi(n,s)||(Li=!0),n):(ms&42)===0?(Li=!0,n.memoizedState=l):(n=N0(),ln.lanes|=n,uo|=n,s)}function wv(n,s,l,h,v){var M=E.p;E.p=M!==0&&8>M?M:8;var he=T.T,xe={};T.T=xe,ah(n,!1,s,l);try{var Oe=v(),Fe=T.S;if(Fe!==null&&Fe(xe,Oe),Oe!==null&&typeof Oe=="object"&&typeof Oe.then=="function"){var st=yv(Oe,h);Ql(n,s,st,Wa(n))}else Ql(n,s,h,Wa(n))}catch(ot){Ql(n,s,{then:function(){},status:"rejected",reason:ot},Wa())}finally{E.p=M,T.T=he}}function Rx(){}function dp(n,s,l,h){if(n.tag!==5)throw Error(c(476));var v=Cv(n).queue;wv(n,v,s,P,l===null?Rx:function(){return uu(n),l(h)})}function Cv(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fr,lastRenderedState:P},next:null};var l={};return s.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fr,lastRenderedState:l},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function uu(n){var s=Cv(n).next.queue;Ql(n,s,{},Wa())}function ys(){return Hi(Ha)}function t0(){return vi().memoizedState}function Tv(){return vi().memoizedState}function kv(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var l=Wa();n=Oa(l);var h=hr(s,n,l);h!==null&&(Ka(h,s,l),Yl(h,s,l)),s={cache:su()},n.payload=s;return}s=s.return}}function n0(n,s,l){var h=Wa();l={lane:h,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},Jl(n)?Mv(s,l):(l=Zc(n,s,l,h),l!==null&&(Ka(l,n,h),a0(l,s,h)))}function i0(n,s,l){var h=Wa();Ql(n,s,l,h)}function Ql(n,s,l,h){var v={lane:h,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(Jl(n))Mv(s,v);else{var M=n.alternate;if(n.lanes===0&&(M===null||M.lanes===0)&&(M=s.lastRenderedReducer,M!==null))try{var he=s.lastRenderedState,xe=M(he,l);if(v.hasEagerState=!0,v.eagerState=xe,Zi(xe,he))return Vo(n,s,v,0),Zn===null&&zs(),!1}catch{}finally{}if(l=Zc(n,s,v,h),l!==null)return Ka(l,n,h),a0(l,s,h),!0}return!1}function ah(n,s,l,h){if(h={lane:2,revertLane:dc(),action:h,hasEagerState:!1,eagerState:null,next:null},Jl(n)){if(s)throw Error(c(479))}else s=Zc(n,l,h,2),s!==null&&Ka(s,n,2)}function Jl(n){var s=n.alternate;return n===ln||s!==null&&s===ln}function Mv(n,s){Za=Fd=!0;var l=n.pending;l===null?s.next=s:(s.next=l.next,l.next=s),n.pending=s}function a0(n,s,l){if((l&4194048)!==0){var h=s.lanes;h&=n.pendingLanes,l|=h,s.lanes=l,xt(n,l)}}var hp={readContext:Hi,use:Ai,useCallback:fi,useContext:fi,useEffect:fi,useImperativeHandle:fi,useLayoutEffect:fi,useInsertionEffect:fi,useMemo:fi,useReducer:fi,useRef:fi,useState:fi,useDebugValue:fi,useDeferredValue:fi,useTransition:fi,useSyncExternalStore:fi,useId:fi,useHostTransitionStatus:fi,useFormState:fi,useActionState:fi,useOptimistic:fi,useMemoCache:fi,useCacheRefresh:fi},s0={readContext:Hi,use:Ai,useCallback:function(n,s){return ra().memoizedState=[n,s===void 0?null:s],n},useContext:Hi,useEffect:xv,useImperativeHandle:function(n,s,l){l=l!=null?l.concat([n]):null,Zo(4194308,4,Wm.bind(null,s,n),l)},useLayoutEffect:function(n,s){return Zo(4194308,4,n,s)},useInsertionEffect:function(n,s){Zo(4,2,n,s)},useMemo:function(n,s){var l=ra();s=s===void 0?null:s;var h=n();if(Xo){Ee(!0);try{n()}finally{Ee(!1)}}return l.memoizedState=[h,s],h},useReducer:function(n,s,l){var h=ra();if(l!==void 0){var v=l(s);if(Xo){Ee(!0);try{l(s)}finally{Ee(!1)}}}else v=s;return h.memoizedState=h.baseState=v,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:v},h.queue=n,n=n.dispatch=n0.bind(null,ln,n),[h.memoizedState,n]},useRef:function(n){var s=ra();return n={current:n},s.memoizedState=n},useState:function(n){n=Kd(n);var s=n.queue,l=i0.bind(null,ln,s);return s.dispatch=l,[n.memoizedState,l]},useDebugValue:Fl,useDeferredValue:function(n,s){var l=ra();return ih(l,n,s)},useTransition:function(){var n=Kd(!1);return n=wv.bind(null,ln,n.queue,!0,!1),ra().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,l){var h=ln,v=ra();if(_n){if(l===void 0)throw Error(c(407));l=l()}else{if(l=s(),Zn===null)throw Error(c(349));(xn&124)!==0||tp(h,s,l)}v.memoizedState=l;var M={value:l,getSnapshot:s};return v.queue=M,xv(Xm.bind(null,h,M,n),[n]),h.flags|=2048,Da(9,th(),Ym.bind(null,h,M,l,s),null),l},useId:function(){var n=ra(),s=Zn.identifierPrefix;if(_n){var l=yi,h=Us;l=(h&~(1<<32-_e(h)-1)).toString(32)+l,s="«"+s+"R"+l,l=Ps++,0<l&&(s+="H"+l.toString(32)),s+="»"}else l=qm++,s="«"+s+"r"+l.toString(32)+"»";return n.memoizedState=s},useHostTransitionStatus:ys,useFormState:Qm,useActionState:Qm,useOptimistic:function(n){var s=ra();s.memoizedState=s.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=l,s=ah.bind(null,ln,!0,l),l.dispatch=s,[n,s]},useMemoCache:Wf,useCacheRefresh:function(){return ra().memoizedState=kv.bind(null,ln)}},r0={readContext:Hi,use:Ai,useCallback:Zl,useContext:Hi,useEffect:Sv,useImperativeHandle:up,useInsertionEffect:Jm,useLayoutEffect:Vs,useMemo:Km,useReducer:Jd,useRef:nh,useState:function(){return Jd(fr)},useDebugValue:Fl,useDeferredValue:function(n,s){var l=vi();return e0(l,Hn.memoizedState,n,s)},useTransition:function(){var n=Jd(fr)[0],s=vi().memoizedState;return[typeof n=="boolean"?n:Qd(n),s]},useSyncExternalStore:Wd,useId:t0,useHostTransitionStatus:ys,useFormState:pr,useActionState:pr,useOptimistic:function(n,s){var l=vi();return ip(l,Hn,n,s)},useMemoCache:Wf,useCacheRefresh:Tv},so={readContext:Hi,use:Ai,useCallback:Zl,useContext:Hi,useEffect:Sv,useImperativeHandle:up,useInsertionEffect:Jm,useLayoutEffect:Vs,useMemo:Km,useReducer:ep,useRef:nh,useState:function(){return ep(fr)},useDebugValue:Fl,useDeferredValue:function(n,s){var l=vi();return Hn===null?ih(l,n,s):e0(l,Hn.memoizedState,n,s)},useTransition:function(){var n=ep(fr)[0],s=vi().memoizedState;return[typeof n=="boolean"?n:Qd(n),s]},useSyncExternalStore:Wd,useId:t0,useHostTransitionStatus:ys,useFormState:cp,useActionState:cp,useOptimistic:function(n,s){var l=vi();return Hn!==null?ip(l,Hn,n,s):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:Wf,useCacheRefresh:Tv},Wl=null,du=0;function fp(n){var s=du;return du+=1,Wl===null&&(Wl=[]),Hm(Wl,n,s)}function Kl(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function oa(n,s){throw s.$$typeof===N?Error(c(525)):(n=Object.prototype.toString.call(s),Error(c(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n)))}function o0(n){var s=n._init;return s(n._payload)}function ja(n){function s(qe,He){if(n){var Ye=qe.deletions;Ye===null?(qe.deletions=[He],qe.flags|=16):Ye.push(He)}}function l(qe,He){if(!n)return null;for(;He!==null;)s(qe,He),He=He.sibling;return null}function h(qe){for(var He=new Map;qe!==null;)qe.key!==null?He.set(qe.key,qe):He.set(qe.index,qe),qe=qe.sibling;return He}function v(qe,He){return qe=Bs(qe,He),qe.index=0,qe.sibling=null,qe}function M(qe,He,Ye){return qe.index=Ye,n?(Ye=qe.alternate,Ye!==null?(Ye=Ye.index,Ye<He?(qe.flags|=67108866,He):Ye):(qe.flags|=67108866,He)):(qe.flags|=1048576,He)}function he(qe){return n&&qe.alternate===null&&(qe.flags|=67108866),qe}function xe(qe,He,Ye,rt){return He===null||He.tag!==6?(He=Wc(Ye,qe.mode,rt),He.return=qe,He):(He=v(He,Ye),He.return=qe,He)}function Oe(qe,He,Ye,rt){var Nt=Ye.type;return Nt===D?st(qe,He,Ye.props.children,rt,Ye.key):He!==null&&(He.elementType===Nt||typeof Nt=="object"&&Nt!==null&&Nt.$$typeof===le&&o0(Nt)===He.type)?(He=v(He,Ye.props),Kl(He,Ye),He.return=qe,He):(He=gt(Ye.type,Ye.key,Ye.props,null,qe.mode,rt),Kl(He,Ye),He.return=qe,He)}function Fe(qe,He,Ye,rt){return He===null||He.tag!==4||He.stateNode.containerInfo!==Ye.containerInfo||He.stateNode.implementation!==Ye.implementation?(He=di(Ye,qe.mode,rt),He.return=qe,He):(He=v(He,Ye.children||[]),He.return=qe,He)}function st(qe,He,Ye,rt,Nt){return He===null||He.tag!==7?(He=ds(Ye,qe.mode,rt,Nt),He.return=qe,He):(He=v(He,Ye),He.return=qe,He)}function ot(qe,He,Ye){if(typeof He=="string"&&He!==""||typeof He=="number"||typeof He=="bigint")return He=Wc(""+He,qe.mode,Ye),He.return=qe,He;if(typeof He=="object"&&He!==null){switch(He.$$typeof){case Z:return Ye=gt(He.type,He.key,He.props,null,qe.mode,Ye),Kl(Ye,He),Ye.return=qe,Ye;case J:return He=di(He,qe.mode,Ye),He.return=qe,He;case le:var rt=He._init;return He=rt(He._payload),ot(qe,He,Ye)}if(S(He)||X(He))return He=ds(He,qe.mode,Ye,null),He.return=qe,He;if(typeof He.then=="function")return ot(qe,fp(He),Ye);if(He.$$typeof===Y)return ot(qe,Vd(qe,He),Ye);oa(qe,He)}return null}function Qe(qe,He,Ye,rt){var Nt=He!==null?He.key:null;if(typeof Ye=="string"&&Ye!==""||typeof Ye=="number"||typeof Ye=="bigint")return Nt!==null?null:xe(qe,He,""+Ye,rt);if(typeof Ye=="object"&&Ye!==null){switch(Ye.$$typeof){case Z:return Ye.key===Nt?Oe(qe,He,Ye,rt):null;case J:return Ye.key===Nt?Fe(qe,He,Ye,rt):null;case le:return Nt=Ye._init,Ye=Nt(Ye._payload),Qe(qe,He,Ye,rt)}if(S(Ye)||X(Ye))return Nt!==null?null:st(qe,He,Ye,rt,null);if(typeof Ye.then=="function")return Qe(qe,He,fp(Ye),rt);if(Ye.$$typeof===Y)return Qe(qe,He,Vd(qe,Ye),rt);oa(qe,Ye)}return null}function We(qe,He,Ye,rt,Nt){if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return qe=qe.get(Ye)||null,xe(He,qe,""+rt,Nt);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case Z:return qe=qe.get(rt.key===null?Ye:rt.key)||null,Oe(He,qe,rt,Nt);case J:return qe=qe.get(rt.key===null?Ye:rt.key)||null,Fe(He,qe,rt,Nt);case le:var mn=rt._init;return rt=mn(rt._payload),We(qe,He,Ye,rt,Nt)}if(S(rt)||X(rt))return qe=qe.get(Ye)||null,st(He,qe,rt,Nt,null);if(typeof rt.then=="function")return We(qe,He,Ye,fp(rt),Nt);if(rt.$$typeof===Y)return We(qe,He,Ye,Vd(He,rt),Nt);oa(He,rt)}return null}function qt(qe,He,Ye,rt){for(var Nt=null,mn=null,Pt=He,Zt=He=0,Ii=null;Pt!==null&&Zt<Ye.length;Zt++){Pt.index>Zt?(Ii=Pt,Pt=null):Ii=Pt.sibling;var An=Qe(qe,Pt,Ye[Zt],rt);if(An===null){Pt===null&&(Pt=Ii);break}n&&Pt&&An.alternate===null&&s(qe,Pt),He=M(An,He,Zt),mn===null?Nt=An:mn.sibling=An,mn=An,Pt=Ii}if(Zt===Ye.length)return l(qe,Pt),_n&&kn(qe,Zt),Nt;if(Pt===null){for(;Zt<Ye.length;Zt++)Pt=ot(qe,Ye[Zt],rt),Pt!==null&&(He=M(Pt,He,Zt),mn===null?Nt=Pt:mn.sibling=Pt,mn=Pt);return _n&&kn(qe,Zt),Nt}for(Pt=h(Pt);Zt<Ye.length;Zt++)Ii=We(Pt,qe,Zt,Ye[Zt],rt),Ii!==null&&(n&&Ii.alternate!==null&&Pt.delete(Ii.key===null?Zt:Ii.key),He=M(Ii,He,Zt),mn===null?Nt=Ii:mn.sibling=Ii,mn=Ii);return n&&Pt.forEach(function(fl){return s(qe,fl)}),_n&&kn(qe,Zt),Nt}function Gt(qe,He,Ye,rt){if(Ye==null)throw Error(c(151));for(var Nt=null,mn=null,Pt=He,Zt=He=0,Ii=null,An=Ye.next();Pt!==null&&!An.done;Zt++,An=Ye.next()){Pt.index>Zt?(Ii=Pt,Pt=null):Ii=Pt.sibling;var fl=Qe(qe,Pt,An.value,rt);if(fl===null){Pt===null&&(Pt=Ii);break}n&&Pt&&fl.alternate===null&&s(qe,Pt),He=M(fl,He,Zt),mn===null?Nt=fl:mn.sibling=fl,mn=fl,Pt=Ii}if(An.done)return l(qe,Pt),_n&&kn(qe,Zt),Nt;if(Pt===null){for(;!An.done;Zt++,An=Ye.next())An=ot(qe,An.value,rt),An!==null&&(He=M(An,He,Zt),mn===null?Nt=An:mn.sibling=An,mn=An);return _n&&kn(qe,Zt),Nt}for(Pt=h(Pt);!An.done;Zt++,An=Ye.next())An=We(Pt,qe,Zt,An.value,rt),An!==null&&(n&&An.alternate!==null&&Pt.delete(An.key===null?Zt:An.key),He=M(An,He,Zt),mn===null?Nt=An:mn.sibling=An,mn=An);return n&&Pt.forEach(function(Yx){return s(qe,Yx)}),_n&&kn(qe,Zt),Nt}function Nn(qe,He,Ye,rt){if(typeof Ye=="object"&&Ye!==null&&Ye.type===D&&Ye.key===null&&(Ye=Ye.props.children),typeof Ye=="object"&&Ye!==null){switch(Ye.$$typeof){case Z:e:{for(var Nt=Ye.key;He!==null;){if(He.key===Nt){if(Nt=Ye.type,Nt===D){if(He.tag===7){l(qe,He.sibling),rt=v(He,Ye.props.children),rt.return=qe,qe=rt;break e}}else if(He.elementType===Nt||typeof Nt=="object"&&Nt!==null&&Nt.$$typeof===le&&o0(Nt)===He.type){l(qe,He.sibling),rt=v(He,Ye.props),Kl(rt,Ye),rt.return=qe,qe=rt;break e}l(qe,He);break}else s(qe,He);He=He.sibling}Ye.type===D?(rt=ds(Ye.props.children,qe.mode,rt,Ye.key),rt.return=qe,qe=rt):(rt=gt(Ye.type,Ye.key,Ye.props,null,qe.mode,rt),Kl(rt,Ye),rt.return=qe,qe=rt)}return he(qe);case J:e:{for(Nt=Ye.key;He!==null;){if(He.key===Nt)if(He.tag===4&&He.stateNode.containerInfo===Ye.containerInfo&&He.stateNode.implementation===Ye.implementation){l(qe,He.sibling),rt=v(He,Ye.children||[]),rt.return=qe,qe=rt;break e}else{l(qe,He);break}else s(qe,He);He=He.sibling}rt=di(Ye,qe.mode,rt),rt.return=qe,qe=rt}return he(qe);case le:return Nt=Ye._init,Ye=Nt(Ye._payload),Nn(qe,He,Ye,rt)}if(S(Ye))return qt(qe,He,Ye,rt);if(X(Ye)){if(Nt=X(Ye),typeof Nt!="function")throw Error(c(150));return Ye=Nt.call(Ye),Gt(qe,He,Ye,rt)}if(typeof Ye.then=="function")return Nn(qe,He,fp(Ye),rt);if(Ye.$$typeof===Y)return Nn(qe,He,Vd(qe,Ye),rt);oa(qe,Ye)}return typeof Ye=="string"&&Ye!==""||typeof Ye=="number"||typeof Ye=="bigint"?(Ye=""+Ye,He!==null&&He.tag===6?(l(qe,He.sibling),rt=v(He,Ye),rt.return=qe,qe=rt):(l(qe,He),rt=Wc(Ye,qe.mode,rt),rt.return=qe,qe=rt),he(qe)):l(qe,He)}return function(qe,He,Ye,rt){try{du=0;var Nt=Nn(qe,He,Ye,rt);return Wl=null,Nt}catch(Pt){if(Pt===Yo||Pt===qd)throw Pt;var mn=Ea(29,Pt,null,qe.mode);return mn.lanes=rt,mn.return=qe,mn}finally{}}}var ec=ja(!0),gr=ja(!1),Ja=re(null),la=null;function ro(n){var s=n.alternate;g(Xn,Xn.current&1),g(Ja,n),la===null&&(s===null||Xl.current!==null||s.memoizedState!==null)&&(la=n)}function mr(n){if(n.tag===22){if(g(Xn,Xn.current),g(Ja,n),la===null){var s=n.alternate;s!==null&&s.memoizedState!==null&&(la=n)}}else yr()}function yr(){g(Xn,Xn.current),g(Ja,Ja.current)}function $s(n){me(Ja),la===n&&(la=null),me(Xn)}var Xn=re(0);function sh(n){for(var s=n;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||Eh(l)))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}function Qo(n,s,l,h){s=n.memoizedState,l=l(h,s),l=l==null?s:O({},s,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var pp={enqueueSetState:function(n,s,l){n=n._reactInternals;var h=Wa(),v=Oa(h);v.payload=s,l!=null&&(v.callback=l),s=hr(n,v,h),s!==null&&(Ka(s,n,h),Yl(s,n,h))},enqueueReplaceState:function(n,s,l){n=n._reactInternals;var h=Wa(),v=Oa(h);v.tag=1,v.payload=s,l!=null&&(v.callback=l),s=hr(n,v,h),s!==null&&(Ka(s,n,h),Yl(s,n,h))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var l=Wa(),h=Oa(l);h.tag=2,s!=null&&(h.callback=s),s=hr(n,h,l),s!==null&&(Ka(s,n,l),Yl(s,n,l))}};function hu(n,s,l,h,v,M,he){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(h,M,he):s.prototype&&s.prototype.isPureReactComponent?!Bo(l,h)||!Bo(v,M):!0}function tc(n,s,l,h){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==n&&pp.enqueueReplaceState(s,s.state,null)}function Jo(n,s){var l=s;if("ref"in s){l={};for(var h in s)h!=="ref"&&(l[h]=s[h])}if(n=n.defaultProps){l===s&&(l=O({},l));for(var v in n)l[v]===void 0&&(l[v]=n[v])}return l}var rh=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)};function fu(n){rh(n)}function l0(n){console.error(n)}function oh(n){rh(n)}function lh(n,s){try{var l=n.onUncaughtError;l(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function c0(n,s,l){try{var h=n.onCaughtError;h(l.value,{componentStack:l.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function u0(n,s,l){return l=Oa(l),l.tag=3,l.payload={element:null},l.callback=function(){lh(n,s)},l}function d0(n){return n=Oa(n),n.tag=3,n}function La(n,s,l,h){var v=l.type.getDerivedStateFromError;if(typeof v=="function"){var M=h.value;n.payload=function(){return v(M)},n.callback=function(){c0(s,l,h)}}var he=l.stateNode;he!==null&&typeof he.componentDidCatch=="function"&&(n.callback=function(){c0(s,l,h),typeof v!="function"&&(tl===null?tl=new Set([this]):tl.add(this));var xe=h.stack;this.componentDidCatch(h.value,{componentStack:xe!==null?xe:""})})}function Av(n,s,l,h,v){if(l.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=l.alternate,s!==null&&iu(s,l,v,!0),l=Ja.current,l!==null){switch(l.tag){case 13:return la===null?uc():l.alternate===null&&wi===0&&(wi=3),l.flags&=-257,l.flags|=65536,l.lanes=v,h===If?l.flags|=16384:(s=l.updateQueue,s===null?l.updateQueue=new Set([h]):s.add(h),Pp(n,h,v)),!1;case 22:return l.flags|=65536,h===If?l.flags|=16384:(s=l.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},l.updateQueue=s):(l=s.retryQueue,l===null?s.retryQueue=new Set([h]):l.add(h)),Pp(n,h,v)),!1}throw Error(c(435,l.tag))}return Pp(n,h,v),uc(),!1}if(_n)return s=Ja.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,h!==Il&&(n=Error(c(422),{cause:h}),nu(Fa(n,l)))):(h!==Il&&(s=Error(c(423),{cause:h}),nu(Fa(s,l))),n=n.current.alternate,n.flags|=65536,v&=-v,n.lanes|=v,h=Fa(h,l),v=u0(n.stateNode,h,v),$m(n,v),wi!==4&&(wi=2)),!1;var M=Error(c(520),{cause:h});if(M=Fa(M,l),xu===null?xu=[M]:xu.push(M),wi!==4&&(wi=2),s===null)return!0;h=Fa(h,l),l=s;do{switch(l.tag){case 3:return l.flags|=65536,n=v&-v,l.lanes|=n,n=u0(l.stateNode,h,n),$m(l,n),!1;case 1:if(s=l.type,M=l.stateNode,(l.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||M!==null&&typeof M.componentDidCatch=="function"&&(tl===null||!tl.has(M))))return l.flags|=65536,v&=-v,l.lanes|=v,v=d0(v),La(v,n,l,h),$m(l,v),!1}l=l.return}while(l!==null);return!1}var bi=Error(c(461)),Li=!1;function Vi(n,s,l,h){s.child=n===null?gr(s,null,l,h):ec(s,n.child,l,h)}function Ev(n,s,l,h,v){l=l.render;var M=s.ref;if("ref"in h){var he={};for(var xe in h)xe!=="ref"&&(he[xe]=h[xe])}else he=h;return qo(s),h=Zf(n,s,l,he,M,v),xe=Qf(),n!==null&&!Li?(cu(n,s,v),vr(n,s,v)):(_n&&xe&&$l(s),s.flags|=1,Vi(n,s,h,v),s.child)}function oo(n,s,l,h,v){if(n===null){var M=l.type;return typeof M=="function"&&!zd(M)&&M.defaultProps===void 0&&l.compare===null?(s.tag=15,s.type=M,nc(n,s,M,h,v)):(n=gt(l.type,null,h,s,s.mode,v),n.ref=s.ref,n.return=s,s.child=n)}if(M=n.child,!Tp(n,v)){var he=M.memoizedProps;if(l=l.compare,l=l!==null?l:Bo,l(he,h)&&n.ref===s.ref)return vr(n,s,v)}return s.flags|=1,n=Bs(M,h),n.ref=s.ref,n.return=s,s.child=n}function nc(n,s,l,h,v){if(n!==null){var M=n.memoizedProps;if(Bo(M,h)&&n.ref===s.ref)if(Li=!1,s.pendingProps=h=M,Tp(n,v))(n.flags&131072)!==0&&(Li=!0);else return s.lanes=n.lanes,vr(n,s,v)}return mp(n,s,l,h,v)}function gp(n,s,l){var h=s.pendingProps,v=h.children,M=n!==null?n.memoizedState:null;if(h.mode==="hidden"){if((s.flags&128)!==0){if(h=M!==null?M.baseLanes|l:l,n!==null){for(v=s.child=n.child,M=0;v!==null;)M=M|v.lanes|v.childLanes,v=v.sibling;s.childLanes=M&~h}else s.childLanes=0,s.child=null;return ic(n,s,h,l)}if((l&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&ql(s,M!==null?M.cachePool:null),M!==null?Pi(s,M):ou(),mr(s);else return s.lanes=s.childLanes=536870912,ic(n,s,M!==null?M.baseLanes|l:l,l)}else M!==null?(ql(s,M.cachePool),Pi(s,M),yr(),s.memoizedState=null):(n!==null&&ql(s,null),ou(),yr());return Vi(n,s,v,l),s.child}function ic(n,s,l,h){var v=Id();return v=v===null?null:{parent:Di._currentValue,pool:v},s.memoizedState={baseLanes:l,cachePool:v},n!==null&&ql(s,null),ou(),mr(s),n!==null&&iu(n,s,h,!0),null}function ch(n,s){var l=s.ref;if(l===null)n!==null&&n.ref!==null&&(s.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(c(284));(n===null||n.ref!==l)&&(s.flags|=4194816)}}function mp(n,s,l,h,v){return qo(s),l=Zf(n,s,l,h,void 0,v),h=Qf(),n!==null&&!Li?(cu(n,s,v),vr(n,s,v)):(_n&&h&&$l(s),s.flags|=1,Vi(n,s,l,v),s.child)}function h0(n,s,l,h,v,M){return qo(s),s.updateQueue=null,l=Gm(s,h,l,v),Fo(n),h=Qf(),n!==null&&!Li?(cu(n,s,M),vr(n,s,M)):(_n&&h&&$l(s),s.flags|=1,Vi(n,s,l,M),s.child)}function yp(n,s,l,h,v){if(qo(s),s.stateNode===null){var M=Jc,he=l.contextType;typeof he=="object"&&he!==null&&(M=Hi(he)),M=new l(h,M),s.memoizedState=M.state!==null&&M.state!==void 0?M.state:null,M.updater=pp,s.stateNode=M,M._reactInternals=s,M=s.stateNode,M.props=h,M.state=s.memoizedState,M.refs={},Gf(s),he=l.contextType,M.context=typeof he=="object"&&he!==null?Hi(he):Jc,M.state=s.memoizedState,he=l.getDerivedStateFromProps,typeof he=="function"&&(Qo(s,l,he,h),M.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof M.getSnapshotBeforeUpdate=="function"||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(he=M.state,typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount(),he!==M.state&&pp.enqueueReplaceState(M,M.state,null),io(s,h,M,v),ru(),M.state=s.memoizedState),typeof M.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(n===null){M=s.stateNode;var xe=s.memoizedProps,Oe=Jo(l,xe);M.props=Oe;var Fe=M.context,st=l.contextType;he=Jc,typeof st=="object"&&st!==null&&(he=Hi(st));var ot=l.getDerivedStateFromProps;st=typeof ot=="function"||typeof M.getSnapshotBeforeUpdate=="function",xe=s.pendingProps!==xe,st||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(xe||Fe!==he)&&tc(s,M,h,he),dr=!1;var Qe=s.memoizedState;M.state=Qe,io(s,h,M,v),ru(),Fe=s.memoizedState,xe||Qe!==Fe||dr?(typeof ot=="function"&&(Qo(s,l,ot,h),Fe=s.memoizedState),(Oe=dr||hu(s,l,Oe,h,Qe,Fe,he))?(st||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount()),typeof M.componentDidMount=="function"&&(s.flags|=4194308)):(typeof M.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=Fe),M.props=h,M.state=Fe,M.context=he,h=Oe):(typeof M.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{M=s.stateNode,Yf(n,s),he=s.memoizedProps,st=Jo(l,he),M.props=st,ot=s.pendingProps,Qe=M.context,Fe=l.contextType,Oe=Jc,typeof Fe=="object"&&Fe!==null&&(Oe=Hi(Fe)),xe=l.getDerivedStateFromProps,(Fe=typeof xe=="function"||typeof M.getSnapshotBeforeUpdate=="function")||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(he!==ot||Qe!==Oe)&&tc(s,M,h,Oe),dr=!1,Qe=s.memoizedState,M.state=Qe,io(s,h,M,v),ru();var We=s.memoizedState;he!==ot||Qe!==We||dr||n!==null&&n.dependencies!==null&&Pd(n.dependencies)?(typeof xe=="function"&&(Qo(s,l,xe,h),We=s.memoizedState),(st=dr||hu(s,l,st,h,Qe,We,Oe)||n!==null&&n.dependencies!==null&&Pd(n.dependencies))?(Fe||typeof M.UNSAFE_componentWillUpdate!="function"&&typeof M.componentWillUpdate!="function"||(typeof M.componentWillUpdate=="function"&&M.componentWillUpdate(h,We,Oe),typeof M.UNSAFE_componentWillUpdate=="function"&&M.UNSAFE_componentWillUpdate(h,We,Oe)),typeof M.componentDidUpdate=="function"&&(s.flags|=4),typeof M.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof M.componentDidUpdate!="function"||he===n.memoizedProps&&Qe===n.memoizedState||(s.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||he===n.memoizedProps&&Qe===n.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=We),M.props=h,M.state=We,M.context=Oe,h=st):(typeof M.componentDidUpdate!="function"||he===n.memoizedProps&&Qe===n.memoizedState||(s.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||he===n.memoizedProps&&Qe===n.memoizedState||(s.flags|=1024),h=!1)}return M=h,ch(n,s),h=(s.flags&128)!==0,M||h?(M=s.stateNode,l=h&&typeof l.getDerivedStateFromError!="function"?null:M.render(),s.flags|=1,n!==null&&h?(s.child=ec(s,n.child,null,v),s.child=ec(s,null,l,v)):Vi(n,s,l,v),s.memoizedState=M.state,n=s.child):n=vr(n,s,v),n}function vp(n,s,l,h){return tu(),s.flags|=256,Vi(n,s,l,h),s.child}var bp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function f0(n){return{baseLanes:n,cachePool:Vf()}}function p0(n,s,l){return n=n!==null?n.childLanes&~l:0,s&&(n|=xs),n}function g0(n,s,l){var h=s.pendingProps,v=!1,M=(s.flags&128)!==0,he;if((he=M)||(he=n!==null&&n.memoizedState===null?!1:(Xn.current&2)!==0),he&&(v=!0,s.flags&=-129),he=(s.flags&32)!==0,s.flags&=-33,n===null){if(_n){if(v?ro(s):yr(),_n){var xe=Ln,Oe;if(Oe=xe){e:{for(Oe=xe,xe=ps;Oe.nodeType!==8;){if(!xe){xe=null;break e}if(Oe=qs(Oe.nextSibling),Oe===null){xe=null;break e}}xe=Oe}xe!==null?(s.memoizedState={dehydrated:xe,treeContext:Kr!==null?{id:Us,overflow:yi}:null,retryLane:536870912,hydrationErrors:null},Oe=Ea(18,null,null,0),Oe.stateNode=xe,Oe.return=s,s.child=Oe,ki=s,Ln=null,Oe=!0):Oe=!1}Oe||eo(s)}if(xe=s.memoizedState,xe!==null&&(xe=xe.dehydrated,xe!==null))return Eh(xe)?s.lanes=32:s.lanes=536870912,null;$s(s)}return xe=h.children,h=h.fallback,v?(yr(),v=s.mode,xe=Sp({mode:"hidden",children:xe},v),h=ds(h,v,l,null),xe.return=s,h.return=s,xe.sibling=h,s.child=xe,v=s.child,v.memoizedState=f0(l),v.childLanes=p0(n,he,l),s.memoizedState=bp,h):(ro(s),xp(s,xe))}if(Oe=n.memoizedState,Oe!==null&&(xe=Oe.dehydrated,xe!==null)){if(M)s.flags&256?(ro(s),s.flags&=-257,s=Wo(n,s,l)):s.memoizedState!==null?(yr(),s.child=n.child,s.flags|=128,s=null):(yr(),v=h.fallback,xe=s.mode,h=Sp({mode:"visible",children:h.children},xe),v=ds(v,xe,l,null),v.flags|=2,h.return=s,v.return=s,h.sibling=v,s.child=h,ec(s,n.child,null,l),h=s.child,h.memoizedState=f0(l),h.childLanes=p0(n,he,l),s.memoizedState=bp,s=v);else if(ro(s),Eh(xe)){if(he=xe.nextSibling&&xe.nextSibling.dataset,he)var Fe=he.dgst;he=Fe,h=Error(c(419)),h.stack="",h.digest=he,nu({value:h,source:null,stack:null}),s=Wo(n,s,l)}else if(Li||iu(n,s,l,!1),he=(l&n.childLanes)!==0,Li||he){if(he=Zn,he!==null&&(h=l&-l,h=(h&42)!==0?1:lt(h),h=(h&(he.suspendedLanes|l))!==0?0:h,h!==0&&h!==Oe.retryLane))throw Oe.retryLane=h,rr(n,h),Ka(he,n,h),bi;xe.data==="$?"||uc(),s=Wo(n,s,l)}else xe.data==="$?"?(s.flags|=192,s.child=n.child,s=null):(n=Oe.treeContext,Ln=qs(xe.nextSibling),ki=s,_n=!0,fs=null,ps=!1,n!==null&&(hs[_a++]=Us,hs[_a++]=yi,hs[_a++]=Kr,Us=n.id,yi=n.overflow,Kr=s),s=xp(s,h.children),s.flags|=4096);return s}return v?(yr(),v=h.fallback,xe=s.mode,Oe=n.child,Fe=Oe.sibling,h=Bs(Oe,{mode:"hidden",children:h.children}),h.subtreeFlags=Oe.subtreeFlags&65011712,Fe!==null?v=Bs(Fe,v):(v=ds(v,xe,l,null),v.flags|=2),v.return=s,h.return=s,h.sibling=v,s.child=h,h=v,v=s.child,xe=n.child.memoizedState,xe===null?xe=f0(l):(Oe=xe.cachePool,Oe!==null?(Fe=Di._currentValue,Oe=Oe.parent!==Fe?{parent:Fe,pool:Fe}:Oe):Oe=Vf(),xe={baseLanes:xe.baseLanes|l,cachePool:Oe}),v.memoizedState=xe,v.childLanes=p0(n,he,l),s.memoizedState=bp,h):(ro(s),l=n.child,n=l.sibling,l=Bs(l,{mode:"visible",children:h.children}),l.return=s,l.sibling=null,n!==null&&(he=s.deletions,he===null?(s.deletions=[n],s.flags|=16):he.push(n)),s.child=l,s.memoizedState=null,l)}function xp(n,s){return s=Sp({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function Sp(n,s){return n=Ea(22,n,null,s),n.lanes=0,n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},n}function Wo(n,s,l){return ec(s,n.child,null,l),n=xp(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function uh(n,s,l){n.lanes|=s;var h=n.alternate;h!==null&&(h.lanes|=s),zf(n.return,s,l)}function wp(n,s,l,h,v){var M=n.memoizedState;M===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:v}:(M.isBackwards=s,M.rendering=null,M.renderingStartTime=0,M.last=h,M.tail=l,M.tailMode=v)}function Cp(n,s,l){var h=s.pendingProps,v=h.revealOrder,M=h.tail;if(Vi(n,s,h.children,l),h=Xn.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&uh(n,l,s);else if(n.tag===19)uh(n,l,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}h&=1}switch(g(Xn,h),v){case"forwards":for(l=s.child,v=null;l!==null;)n=l.alternate,n!==null&&sh(n)===null&&(v=l),l=l.sibling;l=v,l===null?(v=s.child,s.child=null):(v=l.sibling,l.sibling=null),wp(s,!1,v,l,M);break;case"backwards":for(l=null,v=s.child,s.child=null;v!==null;){if(n=v.alternate,n!==null&&sh(n)===null){s.child=v;break}n=v.sibling,v.sibling=l,l=v,v=n}wp(s,!0,l,null,M);break;case"together":wp(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function vr(n,s,l){if(n!==null&&(s.dependencies=n.dependencies),uo|=s.lanes,(l&s.childLanes)===0)if(n!==null){if(iu(n,s,l,!1),(l&s.childLanes)===0)return null}else return null;if(n!==null&&s.child!==n.child)throw Error(c(153));if(s.child!==null){for(n=s.child,l=Bs(n,n.pendingProps),s.child=l,l.return=s;n.sibling!==null;)n=n.sibling,l=l.sibling=Bs(n,n.pendingProps),l.return=s;l.sibling=null}return s.child}function Tp(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&Pd(n)))}function _v(n,s,l){switch(s.tag){case 3:j(s,s.stateNode.containerInfo),no(s,Di,n.memoizedState.cache),tu();break;case 27:case 5:ne(s);break;case 4:j(s,s.stateNode.containerInfo);break;case 10:no(s,s.type,s.memoizedProps.value);break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(ro(s),s.flags|=128,null):(l&s.child.childLanes)!==0?g0(n,s,l):(ro(s),n=vr(n,s,l),n!==null?n.sibling:null);ro(s);break;case 19:var v=(n.flags&128)!==0;if(h=(l&s.childLanes)!==0,h||(iu(n,s,l,!1),h=(l&s.childLanes)!==0),v){if(h)return Cp(n,s,l);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),g(Xn,Xn.current),h)break;return null;case 22:case 23:return s.lanes=0,gp(n,s,l);case 24:no(s,Di,n.memoizedState.cache)}return vr(n,s,l)}function Ov(n,s,l){if(n!==null)if(n.memoizedProps!==s.pendingProps)Li=!0;else{if(!Tp(n,l)&&(s.flags&128)===0)return Li=!1,_v(n,s,l);Li=(n.flags&131072)!==0}else Li=!1,_n&&(s.flags&1048576)!==0&&Nf(s,Kc,s.index);switch(s.lanes=0,s.tag){case 16:e:{n=s.pendingProps;var h=s.elementType,v=h._init;if(h=v(h._payload),s.type=h,typeof h=="function")zd(h)?(n=Jo(h,n),s.tag=1,s=yp(null,s,h,n,l)):(s.tag=0,s=mp(null,s,h,n,l));else{if(h!=null){if(v=h.$$typeof,v===$){s.tag=11,s=Ev(null,s,h,n,l);break e}else if(v===V){s.tag=14,s=oo(null,s,h,n,l);break e}}throw s=A(h)||h,Error(c(306,s,""))}}return s;case 0:return mp(n,s,s.type,s.pendingProps,l);case 1:return h=s.type,v=Jo(h,s.pendingProps),yp(n,s,h,v,l);case 3:e:{if(j(s,s.stateNode.containerInfo),n===null)throw Error(c(387));h=s.pendingProps;var M=s.memoizedState;v=M.element,Yf(n,s),io(s,h,null,l);var he=s.memoizedState;if(h=he.cache,no(s,Di,h),h!==M.cache&&Bm(s,[Di],l,!0),ru(),h=he.element,M.isDehydrated)if(M={element:h,isDehydrated:!1,cache:he.cache},s.updateQueue.baseState=M,s.memoizedState=M,s.flags&256){s=vp(n,s,h,l);break e}else if(h!==v){v=Fa(Error(c(424)),s),nu(v),s=vp(n,s,h,l);break e}else{switch(n=s.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(Ln=qs(n.firstChild),ki=s,_n=!0,fs=null,ps=!0,l=gr(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(tu(),h===v){s=vr(n,s,l);break e}Vi(n,s,h,l)}s=s.child}return s;case 26:return ch(n,s),n===null?(l=Yv(s.type,null,s.pendingProps,null))?s.memoizedState=l:_n||(l=s.type,n=s.pendingProps,h=ws(q.current).createElement(l),h[bt]=s,h[yt]=n,Wt(h,l,n),It(h),s.stateNode=h):s.memoizedState=Yv(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return ne(s),n===null&&_n&&(h=s.stateNode=Mt(s.type,s.pendingProps,q.current),ki=s,ps=!0,v=Ln,ol(s.type)?(ll=v,Ln=qs(h.firstChild)):Ln=v),Vi(n,s,s.pendingProps.children,l),ch(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&_n&&((v=h=Ln)&&(h=ju(h,s.type,s.pendingProps,ps),h!==null?(s.stateNode=h,ki=s,Ln=qs(h.firstChild),ps=!1,v=!0):v=!1),v||eo(s)),ne(s),v=s.type,M=s.pendingProps,he=n!==null?n.memoizedProps:null,h=M.children,Ar(v,M)?h=null:he!==null&&Ar(v,he)&&(s.flags|=32),s.memoizedState!==null&&(v=Zf(n,s,vv,null,null,l),Ha._currentValue=v),ch(n,s),Vi(n,s,h,l),s.child;case 6:return n===null&&_n&&((n=l=Ln)&&(l=Ix(l,s.pendingProps,ps),l!==null?(s.stateNode=l,ki=s,Ln=null,n=!0):n=!1),n||eo(s)),null;case 13:return g0(n,s,l);case 4:return j(s,s.stateNode.containerInfo),h=s.pendingProps,n===null?s.child=ec(s,null,h,l):Vi(n,s,h,l),s.child;case 11:return Ev(n,s,s.type,s.pendingProps,l);case 7:return Vi(n,s,s.pendingProps,l),s.child;case 8:return Vi(n,s,s.pendingProps.children,l),s.child;case 12:return Vi(n,s,s.pendingProps.children,l),s.child;case 10:return h=s.pendingProps,no(s,s.type,h.value),Vi(n,s,h.children,l),s.child;case 9:return v=s.type._context,h=s.pendingProps.children,qo(s),v=Hi(v),h=h(v),s.flags|=1,Vi(n,s,h,l),s.child;case 14:return oo(n,s,s.type,s.pendingProps,l);case 15:return nc(n,s,s.type,s.pendingProps,l);case 19:return Cp(n,s,l);case 31:return h=s.pendingProps,l=s.mode,h={mode:h.mode,children:h.children},n===null?(l=Sp(h,l),l.ref=s.ref,s.child=l,l.return=s,s=l):(l=Bs(n.child,h),l.ref=s.ref,s.child=l,l.return=s,s=l),s;case 22:return gp(n,s,l);case 24:return qo(s),h=Hi(Di),n===null?(v=Id(),v===null&&(v=Zn,M=su(),v.pooledCache=M,M.refCount++,M!==null&&(v.pooledCacheLanes|=l),v=M),s.memoizedState={parent:h,cache:v},Gf(s),no(s,Di,v)):((n.lanes&l)!==0&&(Yf(n,s),io(s,null,null,l),ru()),v=n.memoizedState,M=s.memoizedState,v.parent!==h?(v={parent:h,cache:h},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),no(s,Di,h)):(h=M.cache,no(s,Di,h),h!==v.cache&&Bm(s,[Di],l,!0))),Vi(n,s,s.pendingProps.children,l),s.child;case 29:throw s.pendingProps}throw Error(c(156,s.tag))}function br(n){n.flags|=4}function pu(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!W0(s)){if(s=Ja.current,s!==null&&((xn&4194048)===xn?la!==null:(xn&62914560)!==xn&&(xn&536870912)===0||s!==la))throw Gl=If,$f;n.flags|=8192}}function dh(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?mt():536870912,n.lanes|=s,bu|=s)}function gu(n,s){if(!_n)switch(n.tailMode){case"hidden":s=n.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:h.sibling=null}}function Ft(n){var s=n.alternate!==null&&n.alternate.child===n.child,l=0,h=0;if(s)for(var v=n.child;v!==null;)l|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=n,v=v.sibling;else for(v=n.child;v!==null;)l|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=n,v=v.sibling;return n.subtreeFlags|=h,n.childLanes=l,s}function m0(n,s,l){var h=s.pendingProps;switch(or(s),s.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ft(s),null;case 1:return Ft(s),null;case 3:return l=s.stateNode,h=null,n!==null&&(h=n.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),lr(Di),U(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(eu(s)?br(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,zm())),Ft(s),null;case 26:return l=s.memoizedState,n===null?(br(s),l!==null?(Ft(s),pu(s,l)):(Ft(s),s.flags&=-16777217)):l?l!==n.memoizedState?(br(s),Ft(s),pu(s,l)):(Ft(s),s.flags&=-16777217):(n.memoizedProps!==h&&br(s),Ft(s),s.flags&=-16777217),null;case 27:ge(s),l=q.current;var v=s.type;if(n!==null&&s.stateNode!=null)n.memoizedProps!==h&&br(s);else{if(!h){if(s.stateNode===null)throw Error(c(166));return Ft(s),null}n=w.current,eu(s)?Ud(s):(n=Mt(v,h,l),s.stateNode=n,br(s))}return Ft(s),null;case 5:if(ge(s),l=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==h&&br(s);else{if(!h){if(s.stateNode===null)throw Error(c(166));return Ft(s),null}if(n=w.current,eu(s))Ud(s);else{switch(v=ws(q.current),n){case 1:n=v.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:n=v.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":n=v.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":n=v.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":n=v.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof h.is=="string"?v.createElement("select",{is:h.is}):v.createElement("select"),h.multiple?n.multiple=!0:h.size&&(n.size=h.size);break;default:n=typeof h.is=="string"?v.createElement(l,{is:h.is}):v.createElement(l)}}n[bt]=s,n[yt]=h;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)n.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===s)break e;for(;v.sibling===null;){if(v.return===null||v.return===s)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}s.stateNode=n;e:switch(Wt(n,l,h),l){case"button":case"input":case"select":case"textarea":n=!!h.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&br(s)}}return Ft(s),s.flags&=-16777217,null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==h&&br(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(c(166));if(n=q.current,eu(s)){if(n=s.stateNode,l=s.memoizedProps,h=null,v=ki,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}n[bt]=s,n=!!(n.nodeValue===l||h!==null&&h.suppressHydrationWarning===!0||F0(n.nodeValue,l)),n||eo(s)}else n=ws(n).createTextNode(h),n[bt]=s,s.stateNode=n}return Ft(s),null;case 13:if(h=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(v=eu(s),h!==null&&h.dehydrated!==null){if(n===null){if(!v)throw Error(c(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(c(317));v[bt]=s}else tu(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ft(s),v=!1}else v=zm(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?($s(s),s):($s(s),null)}if($s(s),(s.flags&128)!==0)return s.lanes=l,s;if(l=h!==null,n=n!==null&&n.memoizedState!==null,l){h=s.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool);var M=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(M=h.memoizedState.cachePool.pool),M!==v&&(h.flags|=2048)}return l!==n&&l&&(s.child.flags|=8192),dh(s,s.updateQueue),Ft(s),null;case 4:return U(),n===null&&Y0(s.stateNode.containerInfo),Ft(s),null;case 10:return lr(s.type),Ft(s),null;case 19:if(me(Xn),v=s.memoizedState,v===null)return Ft(s),null;if(h=(s.flags&128)!==0,M=v.rendering,M===null)if(h)gu(v,!1);else{if(wi!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(M=sh(n),M!==null){for(s.flags|=128,gu(v,!1),n=M.updateQueue,s.updateQueue=n,dh(s,n),s.subtreeFlags=0,n=l,l=s.child;l!==null;)gn(l,n),l=l.sibling;return g(Xn,Xn.current&1|2),s.child}n=n.sibling}v.tail!==null&&ye()>Lp&&(s.flags|=128,h=!0,gu(v,!1),s.lanes=4194304)}else{if(!h)if(n=sh(M),n!==null){if(s.flags|=128,h=!0,n=n.updateQueue,s.updateQueue=n,dh(s,n),gu(v,!0),v.tail===null&&v.tailMode==="hidden"&&!M.alternate&&!_n)return Ft(s),null}else 2*ye()-v.renderingStartTime>Lp&&l!==536870912&&(s.flags|=128,h=!0,gu(v,!1),s.lanes=4194304);v.isBackwards?(M.sibling=s.child,s.child=M):(n=v.last,n!==null?n.sibling=M:s.child=M,v.last=M)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=ye(),s.sibling=null,n=Xn.current,g(Xn,h?n&1|2:n&1),s):(Ft(s),null);case 22:case 23:return $s(s),lu(),h=s.memoizedState!==null,n!==null?n.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(l&536870912)!==0&&(s.flags&128)===0&&(Ft(s),s.subtreeFlags&6&&(s.flags|=8192)):Ft(s),l=s.updateQueue,l!==null&&dh(s,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==l&&(s.flags|=2048),n!==null&&me(ur),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),lr(Di),Ft(s),null;case 25:return null;case 30:return null}throw Error(c(156,s.tag))}function Nx(n,s){switch(or(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return lr(Di),U(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return ge(s),null;case 13:if($s(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(c(340));tu()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return me(Xn),null;case 4:return U(),null;case 10:return lr(s.type),null;case 22:case 23:return $s(s),lu(),n!==null&&me(ur),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return lr(Di),null;case 25:return null;default:return null}}function y0(n,s){switch(or(s),s.tag){case 3:lr(Di),U();break;case 26:case 27:case 5:ge(s);break;case 4:U();break;case 13:$s(s);break;case 19:me(Xn);break;case 10:lr(s.type);break;case 22:case 23:$s(s),lu(),n!==null&&me(ur);break;case 24:lr(Di)}}function hh(n,s){try{var l=s.updateQueue,h=l!==null?l.lastEffect:null;if(h!==null){var v=h.next;l=v;do{if((l.tag&n)===n){h=void 0;var M=l.create,he=l.inst;h=M(),he.destroy=h}l=l.next}while(l!==v)}}catch(xe){In(s,s.return,xe)}}function Ko(n,s,l){try{var h=s.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var M=v.next;h=M;do{if((h.tag&n)===n){var he=h.inst,xe=he.destroy;if(xe!==void 0){he.destroy=void 0,v=s;var Oe=l,Fe=xe;try{Fe()}catch(st){In(v,Oe,st)}}}h=h.next}while(h!==M)}}catch(st){In(s,s.return,st)}}function kp(n){var s=n.updateQueue;if(s!==null){var l=n.stateNode;try{Yd(s,l)}catch(h){In(n,n.return,h)}}}function v0(n,s,l){l.props=Jo(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(h){In(n,s,h)}}function mu(n,s){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var h=n.stateNode;break;case 30:h=n.stateNode;break;default:h=n.stateNode}typeof l=="function"?n.refCleanup=l(h):l.current=h}}catch(v){In(n,s,v)}}function Is(n,s){var l=n.ref,h=n.refCleanup;if(l!==null)if(typeof h=="function")try{h()}catch(v){In(n,s,v)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(v){In(n,s,v)}else l.current=null}function yu(n){var s=n.type,l=n.memoizedProps,h=n.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":l.autoFocus&&h.focus();break e;case"img":l.src?h.src=l.src:l.srcSet&&(h.srcset=l.srcSet)}}catch(v){In(n,n.return,v)}}function b0(n,s,l){try{var h=n.stateNode;Px(h,n.type,l,s),h[yt]=s}catch(v){In(n,n.return,v)}}function Dv(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ol(n.type)||n.tag===4}function vs(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Dv(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ol(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function ac(n,s,l){var h=n.tag;if(h===5||h===6)n=n.stateNode,s?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,s):(s=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,s.appendChild(n),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=Gp));else if(h!==4&&(h===27&&ol(n.type)&&(l=n.stateNode,s=null),n=n.child,n!==null))for(ac(n,s,l),n=n.sibling;n!==null;)ac(n,s,l),n=n.sibling}function Mp(n,s,l){var h=n.tag;if(h===5||h===6)n=n.stateNode,s?l.insertBefore(n,s):l.appendChild(n);else if(h!==4&&(h===27&&ol(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(Mp(n,s,l),n=n.sibling;n!==null;)Mp(n,s,l),n=n.sibling}function Ap(n){var s=n.stateNode,l=n.memoizedProps;try{for(var h=n.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);Wt(s,h,l),s[bt]=n,s[yt]=l}catch(M){In(n,n.return,M)}}var xr=!1,xi=!1,Ep=!1,_p=typeof WeakSet=="function"?WeakSet:Set,Ri=null;function x0(n,s){if(n=n.containerInfo,kh=Dh,n=_m(n),Rd(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var v=h.anchorOffset,M=h.focusNode;h=h.focusOffset;try{l.nodeType,M.nodeType}catch{l=null;break e}var he=0,xe=-1,Oe=-1,Fe=0,st=0,ot=n,Qe=null;t:for(;;){for(var We;ot!==l||v!==0&&ot.nodeType!==3||(xe=he+v),ot!==M||h!==0&&ot.nodeType!==3||(Oe=he+h),ot.nodeType===3&&(he+=ot.nodeValue.length),(We=ot.firstChild)!==null;)Qe=ot,ot=We;for(;;){if(ot===n)break t;if(Qe===l&&++Fe===v&&(xe=he),Qe===M&&++st===h&&(Oe=he),(We=ot.nextSibling)!==null)break;ot=Qe,Qe=ot.parentNode}ot=We}l=xe===-1||Oe===-1?null:{start:xe,end:Oe}}else l=null}l=l||{start:0,end:0}}else l=null;for(Mh={focusedElem:n,selectionRange:l},Dh=!1,Ri=s;Ri!==null;)if(s=Ri,n=s.child,(s.subtreeFlags&1024)!==0&&n!==null)n.return=s,Ri=n;else for(;Ri!==null;){switch(s=Ri,M=s.alternate,n=s.flags,s.tag){case 0:break;case 11:case 15:break;case 1:if((n&1024)!==0&&M!==null){n=void 0,l=s,v=M.memoizedProps,M=M.memoizedState,h=l.stateNode;try{var qt=Jo(l.type,v,l.elementType===l.type);n=h.getSnapshotBeforeUpdate(qt,M),h.__reactInternalSnapshotBeforeUpdate=n}catch(Gt){In(l,l.return,Gt)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,l=n.nodeType,l===9)Ah(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Ah(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(c(163))}if(n=s.sibling,n!==null){n.return=s.return,Ri=n;break}Ri=s.return}}function S0(n,s,l){var h=l.flags;switch(l.tag){case 0:case 11:case 15:wr(n,l),h&4&&hh(5,l);break;case 1:if(wr(n,l),h&4)if(n=l.stateNode,s===null)try{n.componentDidMount()}catch(he){In(l,l.return,he)}else{var v=Jo(l.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(v,s,n.__reactInternalSnapshotBeforeUpdate)}catch(he){In(l,l.return,he)}}h&64&&kp(l),h&512&&mu(l,l.return);break;case 3:if(wr(n,l),h&64&&(n=l.updateQueue,n!==null)){if(s=null,l.child!==null)switch(l.child.tag){case 27:case 5:s=l.child.stateNode;break;case 1:s=l.child.stateNode}try{Yd(n,s)}catch(he){In(l,l.return,he)}}break;case 27:s===null&&h&4&&Ap(l);case 26:case 5:wr(n,l),s===null&&h&4&&yu(l),h&512&&mu(l,l.return);break;case 12:wr(n,l);break;case 13:wr(n,l),h&4&&Op(n,l),h&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=zx.bind(null,l),qx(n,l))));break;case 22:if(h=l.memoizedState!==null||xr,!h){s=s!==null&&s.memoizedState!==null||xi,v=xr;var M=xi;xr=h,(xi=s)&&!M?el(n,l,(l.subtreeFlags&8772)!==0):wr(n,l),xr=v,xi=M}break;case 30:break;default:wr(n,l)}}function w0(n){var s=n.alternate;s!==null&&(n.alternate=null,w0(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&Ut(s)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var si=null,Qi=!1;function Sr(n,s,l){for(l=l.child;l!==null;)vn(n,s,l),l=l.sibling}function vn(n,s,l){if(ke&&typeof ke.onCommitFiberUnmount=="function")try{ke.onCommitFiberUnmount(be,l)}catch{}switch(l.tag){case 26:xi||Is(l,s),Sr(n,s,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:xi||Is(l,s);var h=si,v=Qi;ol(l.type)&&(si=l.stateNode,Qi=!1),Sr(n,s,l),Ba(l.stateNode),si=h,Qi=v;break;case 5:xi||Is(l,s);case 6:if(h=si,v=Qi,si=null,Sr(n,s,l),si=h,Qi=v,si!==null)if(Qi)try{(si.nodeType===9?si.body:si.nodeName==="HTML"?si.ownerDocument.body:si).removeChild(l.stateNode)}catch(M){In(l,s,M)}else try{si.removeChild(l.stateNode)}catch(M){In(l,s,M)}break;case 18:si!==null&&(Qi?(n=si,Xp(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),Or(n)):Xp(si,l.stateNode));break;case 4:h=si,v=Qi,si=l.stateNode.containerInfo,Qi=!0,Sr(n,s,l),si=h,Qi=v;break;case 0:case 11:case 14:case 15:xi||Ko(2,l,s),xi||Ko(4,l,s),Sr(n,s,l);break;case 1:xi||(Is(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"&&v0(l,s,h)),Sr(n,s,l);break;case 21:Sr(n,s,l);break;case 22:xi=(h=xi)||l.memoizedState!==null,Sr(n,s,l),xi=h;break;default:Sr(n,s,l)}}function Op(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Or(n)}catch(l){In(s,s.return,l)}}function C0(n){switch(n.tag){case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new _p),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new _p),s;default:throw Error(c(435,n.tag))}}function Dp(n,s){var l=C0(n);s.forEach(function(h){var v=Bx.bind(null,n,h);l.has(h)||(l.add(h),h.then(v,v))})}function va(n,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var v=l[h],M=n,he=s,xe=he;e:for(;xe!==null;){switch(xe.tag){case 27:if(ol(xe.type)){si=xe.stateNode,Qi=!1;break e}break;case 5:si=xe.stateNode,Qi=!1;break e;case 3:case 4:si=xe.stateNode.containerInfo,Qi=!0;break e}xe=xe.return}if(si===null)throw Error(c(160));vn(M,he,v),si=null,Qi=!1,M=v.alternate,M!==null&&(M.return=null),v.return=null}if(s.subtreeFlags&13878)for(s=s.child;s!==null;)fh(s,n),s=s.sibling}var ba=null;function fh(n,s){var l=n.alternate,h=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:va(s,n),$i(n),h&4&&(Ko(3,n,n.return),hh(3,n),Ko(5,n,n.return));break;case 1:va(s,n),$i(n),h&512&&(xi||l===null||Is(l,l.return)),h&64&&xr&&(n=n.updateQueue,n!==null&&(h=n.callbacks,h!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?h:l.concat(h))));break;case 26:var v=ba;if(va(s,n),$i(n),h&512&&(xi||l===null||Is(l,l.return)),h&4){var M=l!==null?l.memoizedState:null;if(h=n.memoizedState,l===null)if(h===null)if(n.stateNode===null){e:{h=n.type,l=n.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":M=v.getElementsByTagName("title")[0],(!M||M[nt]||M[bt]||M.namespaceURI==="http://www.w3.org/2000/svg"||M.hasAttribute("itemprop"))&&(M=v.createElement(h),v.head.insertBefore(M,v.querySelector("head > title"))),Wt(M,h,l),M[bt]=n,It(M),h=M;break e;case"link":var he=Q0("link","href",v).get(h+(l.href||""));if(he){for(var xe=0;xe<he.length;xe++)if(M=he[xe],M.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&M.getAttribute("rel")===(l.rel==null?null:l.rel)&&M.getAttribute("title")===(l.title==null?null:l.title)&&M.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){he.splice(xe,1);break t}}M=v.createElement(h),Wt(M,h,l),v.head.appendChild(M);break;case"meta":if(he=Q0("meta","content",v).get(h+(l.content||""))){for(xe=0;xe<he.length;xe++)if(M=he[xe],M.getAttribute("content")===(l.content==null?null:""+l.content)&&M.getAttribute("name")===(l.name==null?null:l.name)&&M.getAttribute("property")===(l.property==null?null:l.property)&&M.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&M.getAttribute("charset")===(l.charSet==null?null:l.charSet)){he.splice(xe,1);break t}}M=v.createElement(h),Wt(M,h,l),v.head.appendChild(M);break;default:throw Error(c(468,h))}M[bt]=n,It(M),h=M}n.stateNode=h}else J0(v,n.type,n.stateNode);else n.stateNode=Fv(v,h,n.memoizedProps);else M!==h?(M===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):M.count--,h===null?J0(v,n.type,n.stateNode):Fv(v,h,n.memoizedProps)):h===null&&n.stateNode!==null&&b0(n,n.memoizedProps,l.memoizedProps)}break;case 27:va(s,n),$i(n),h&512&&(xi||l===null||Is(l,l.return)),l!==null&&h&4&&b0(n,n.memoizedProps,l.memoizedProps);break;case 5:if(va(s,n),$i(n),h&512&&(xi||l===null||Is(l,l.return)),n.flags&32){v=n.stateNode;try{$c(v,"")}catch(We){In(n,n.return,We)}}h&4&&n.stateNode!=null&&(v=n.memoizedProps,b0(n,v,l!==null?l.memoizedProps:v)),h&1024&&(Ep=!0);break;case 6:if(va(s,n),$i(n),h&4){if(n.stateNode===null)throw Error(c(162));h=n.memoizedProps,l=n.stateNode;try{l.nodeValue=h}catch(We){In(n,n.return,We)}}break;case 3:if(dl=null,v=ba,ba=Fp(s.containerInfo),va(s,n),ba=v,$i(n),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Or(s.containerInfo)}catch(We){In(n,n.return,We)}Ep&&(Ep=!1,T0(n));break;case 4:h=ba,ba=Fp(n.stateNode.containerInfo),va(s,n),$i(n),ba=h;break;case 12:va(s,n),$i(n);break;case 13:va(s,n),$i(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(j0=ye()),h&4&&(h=n.updateQueue,h!==null&&(n.updateQueue=null,Dp(n,h)));break;case 22:v=n.memoizedState!==null;var Oe=l!==null&&l.memoizedState!==null,Fe=xr,st=xi;if(xr=Fe||v,xi=st||Oe,va(s,n),xi=st,xr=Fe,$i(n),h&8192)e:for(s=n.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(l===null||Oe||xr||xi||ri(n)),l=null,s=n;;){if(s.tag===5||s.tag===26){if(l===null){Oe=l=s;try{if(M=Oe.stateNode,v)he=M.style,typeof he.setProperty=="function"?he.setProperty("display","none","important"):he.display="none";else{xe=Oe.stateNode;var ot=Oe.memoizedProps.style,Qe=ot!=null&&ot.hasOwnProperty("display")?ot.display:null;xe.style.display=Qe==null||typeof Qe=="boolean"?"":(""+Qe).trim()}}catch(We){In(Oe,Oe.return,We)}}}else if(s.tag===6){if(l===null){Oe=s;try{Oe.stateNode.nodeValue=v?"":Oe.memoizedProps}catch(We){In(Oe,Oe.return,We)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===n)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break e;for(;s.sibling===null;){if(s.return===null||s.return===n)break e;l===s&&(l=null),s=s.return}l===s&&(l=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=n.updateQueue,h!==null&&(l=h.retryQueue,l!==null&&(h.retryQueue=null,Dp(n,l))));break;case 19:va(s,n),$i(n),h&4&&(h=n.updateQueue,h!==null&&(n.updateQueue=null,Dp(n,h)));break;case 30:break;case 21:break;default:va(s,n),$i(n)}}function $i(n){var s=n.flags;if(s&2){try{for(var l,h=n.return;h!==null;){if(Dv(h)){l=h;break}h=h.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var v=l.stateNode,M=vs(n);Mp(n,M,v);break;case 5:var he=l.stateNode;l.flags&32&&($c(he,""),l.flags&=-33);var xe=vs(n);Mp(n,xe,he);break;case 3:case 4:var Oe=l.stateNode.containerInfo,Fe=vs(n);ac(n,Fe,Oe);break;default:throw Error(c(161))}}catch(st){In(n,n.return,st)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function T0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;T0(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function wr(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)S0(n,s.alternate,s),s=s.sibling}function ri(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:Ko(4,s,s.return),ri(s);break;case 1:Is(s,s.return);var l=s.stateNode;typeof l.componentWillUnmount=="function"&&v0(s,s.return,l),ri(s);break;case 27:Ba(s.stateNode);case 26:case 5:Is(s,s.return),ri(s);break;case 22:s.memoizedState===null&&ri(s);break;case 30:ri(s);break;default:ri(s)}n=n.sibling}}function el(n,s,l){for(l=l&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,v=n,M=s,he=M.flags;switch(M.tag){case 0:case 11:case 15:el(v,M,l),hh(4,M);break;case 1:if(el(v,M,l),h=M,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(Fe){In(h,h.return,Fe)}if(h=M,v=h.updateQueue,v!==null){var xe=h.stateNode;try{var Oe=v.shared.hiddenCallbacks;if(Oe!==null)for(v.shared.hiddenCallbacks=null,v=0;v<Oe.length;v++)Xf(Oe[v],xe)}catch(Fe){In(h,h.return,Fe)}}l&&he&64&&kp(M),mu(M,M.return);break;case 27:Ap(M);case 26:case 5:el(v,M,l),l&&h===null&&he&4&&yu(M),mu(M,M.return);break;case 12:el(v,M,l);break;case 13:el(v,M,l),l&&he&4&&Op(v,M);break;case 22:M.memoizedState===null&&el(v,M,l),mu(M,M.return);break;case 30:break;default:el(v,M,l)}s=s.sibling}}function bs(n,s){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&cr(l))}function jp(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&cr(n))}function Ji(n,s,l,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)k0(n,s,l,h),s=s.sibling}function k0(n,s,l,h){var v=s.flags;switch(s.tag){case 0:case 11:case 15:Ji(n,s,l,h),v&2048&&hh(9,s);break;case 1:Ji(n,s,l,h);break;case 3:Ji(n,s,l,h),v&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&cr(n)));break;case 12:if(v&2048){Ji(n,s,l,h),n=s.stateNode;try{var M=s.memoizedProps,he=M.id,xe=M.onPostCommit;typeof xe=="function"&&xe(he,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(Oe){In(s,s.return,Oe)}}else Ji(n,s,l,h);break;case 13:Ji(n,s,l,h);break;case 23:break;case 22:M=s.stateNode,he=s.alternate,s.memoizedState!==null?M._visibility&2?Ji(n,s,l,h):Rn(n,s):M._visibility&2?Ji(n,s,l,h):(M._visibility|=2,lo(n,s,l,h,(s.subtreeFlags&10256)!==0)),v&2048&&bs(he,s);break;case 24:Ji(n,s,l,h),v&2048&&jp(s.alternate,s);break;default:Ji(n,s,l,h)}}function lo(n,s,l,h,v){for(v=v&&(s.subtreeFlags&10256)!==0,s=s.child;s!==null;){var M=n,he=s,xe=l,Oe=h,Fe=he.flags;switch(he.tag){case 0:case 11:case 15:lo(M,he,xe,Oe,v),hh(8,he);break;case 23:break;case 22:var st=he.stateNode;he.memoizedState!==null?st._visibility&2?lo(M,he,xe,Oe,v):Rn(M,he):(st._visibility|=2,lo(M,he,xe,Oe,v)),v&&Fe&2048&&bs(he.alternate,he);break;case 24:lo(M,he,xe,Oe,v),v&&Fe&2048&&jp(he.alternate,he);break;default:lo(M,he,xe,Oe,v)}s=s.sibling}}function Rn(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var l=n,h=s,v=h.flags;switch(h.tag){case 22:Rn(l,h),v&2048&&bs(h.alternate,h);break;case 24:Rn(l,h),v&2048&&jp(h.alternate,h);break;default:Rn(l,h)}s=s.sibling}}var sc=8192;function Si(n){if(n.subtreeFlags&sc)for(n=n.child;n!==null;)jv(n),n=n.sibling}function jv(n){switch(n.tag){case 26:Si(n),n.flags&sc&&n.memoizedState!==null&&Jv(ba,n.memoizedState,n.memoizedProps);break;case 5:Si(n);break;case 3:case 4:var s=ba;ba=Fp(n.stateNode.containerInfo),Si(n),ba=s;break;case 22:n.memoizedState===null&&(s=n.alternate,s!==null&&s.memoizedState!==null?(s=sc,sc=16777216,Si(n),sc=s):Si(n));break;default:Si(n)}}function M0(n){var s=n.alternate;if(s!==null&&(n=s.child,n!==null)){s.child=null;do s=n.sibling,n.sibling=null,n=s;while(n!==null)}}function rc(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var h=s[l];Ri=h,E0(h,n)}M0(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)A0(n),n=n.sibling}function A0(n){switch(n.tag){case 0:case 11:case 15:rc(n),n.flags&2048&&Ko(9,n,n.return);break;case 3:rc(n);break;case 12:rc(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,xa(n)):rc(n);break;default:rc(n)}}function xa(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var h=s[l];Ri=h,E0(h,n)}M0(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:Ko(8,s,s.return),xa(s);break;case 22:l=s.stateNode,l._visibility&2&&(l._visibility&=-3,xa(s));break;default:xa(s)}n=n.sibling}}function E0(n,s){for(;Ri!==null;){var l=Ri;switch(l.tag){case 0:case 11:case 15:Ko(8,l,s);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var h=l.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:cr(l.memoizedState.cache)}if(h=l.child,h!==null)h.return=l,Ri=h;else e:for(l=n;Ri!==null;){h=Ri;var v=h.sibling,M=h.return;if(w0(h),h===l){Ri=null;break e}if(v!==null){v.return=M,Ri=v;break e}Ri=M}}}var _0={getCacheForType:function(n){var s=Hi(Di),l=s.data.get(n);return l===void 0&&(l=n(),s.data.set(n,l)),l}},Lv=typeof WeakMap=="function"?WeakMap:Map,Pn=0,Zn=null,bn=null,xn=0,Vn=0,Ra=null,Cr=!1,vu=!1,O0=!1,co=0,wi=0,uo=0,oc=0,Tr=0,xs=0,bu=0,xu=null,Na=null,D0=!1,j0=0,Lp=1/0,Su=null,tl=null,Wi=0,kr=null,wu=null,Ki=0,Rp=0,Np=null,L0=null,Cu=0,R0=null;function Wa(){if((Pn&2)!==0&&xn!==0)return xn&-xn;if(T.T!==null){var n=gs;return n!==0?n:dc()}return ft()}function N0(){xs===0&&(xs=(xn&536870912)===0||_n?pt():536870912);var n=Ja.current;return n!==null&&(n.flags|=32),xs}function Ka(n,s,l){(n===Zn&&(Vn===2||Vn===9)||n.cancelPendingCommit!==null)&&(Mr(n,0),ho(n,xn,xs,!1)),_t(n,l),((Pn&2)===0||n!==Zn)&&(n===Zn&&((Pn&2)===0&&(oc|=l),wi===4&&ho(n,xn,xs,!1)),za(n))}function Tu(n,s,l){if((Pn&6)!==0)throw Error(c(327));var h=!l&&(s&124)===0&&(s&n.expiredLanes)===0||Ie(n,s),v=h?B0(n,s):zp(n,s,!0),M=h;do{if(v===0){vu&&!h&&ho(n,s,0,!1);break}else{if(l=n.current.alternate,M&&!Rv(l)){v=zp(n,s,!1),M=!1;continue}if(v===2){if(M=s,n.errorRecoveryDisabledLanes&M)var he=0;else he=n.pendingLanes&-536870913,he=he!==0?he:he&536870912?536870912:0;if(he!==0){s=he;e:{var xe=n;v=xu;var Oe=xe.current.memoizedState.isDehydrated;if(Oe&&(Mr(xe,he).flags|=256),he=zp(xe,he,!1),he!==2){if(O0&&!Oe){xe.errorRecoveryDisabledLanes|=M,oc|=M,v=4;break e}M=Na,Na=v,M!==null&&(Na===null?Na=M:Na.push.apply(Na,M))}v=he}if(M=!1,v!==2)continue}}if(v===1){Mr(n,0),ho(n,s,0,!0);break}e:{switch(h=n,M=v,M){case 0:case 1:throw Error(c(345));case 4:if((s&4194048)!==s)break;case 6:ho(h,s,xs,!Cr);break e;case 2:Na=null;break;case 3:case 5:break;default:throw Error(c(329))}if((s&62914560)===s&&(v=j0+300-ye(),10<v)){if(ho(h,s,xs,!Cr),Ve(h,0,!0)!==0)break e;h.timeoutHandle=Yp(ph.bind(null,h,l,Na,Su,D0,s,xs,oc,bu,Cr,M,2,-0,0),v);break e}ph(h,l,Na,Su,D0,s,xs,oc,bu,Cr,M,0,-0,0)}}break}while(!0);za(n)}function ph(n,s,l,h,v,M,he,xe,Oe,Fe,st,ot,Qe,We){if(n.timeoutHandle=-1,ot=s.subtreeFlags,(ot&8192||(ot&16785408)===16785408)&&(zu={stylesheets:null,count:0,unsuspend:Qv},jv(s),ot=K0(),ot!==null)){n.cancelPendingCommit=ot(Bv.bind(null,n,s,M,l,h,v,he,xe,Oe,st,1,Qe,We)),ho(n,M,he,!Fe);return}Bv(n,s,M,l,h,v,he,xe,Oe)}function Rv(n){for(var s=n;;){var l=s.tag;if((l===0||l===11||l===15)&&s.flags&16384&&(l=s.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var h=0;h<l.length;h++){var v=l[h],M=v.getSnapshot;v=v.value;try{if(!Zi(M(),v))return!1}catch{return!1}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ho(n,s,l,h){s&=~Tr,s&=~oc,n.suspendedLanes|=s,n.pingedLanes&=~s,h&&(n.warmLanes|=s),h=n.expirationTimes;for(var v=s;0<v;){var M=31-_e(v),he=1<<M;h[M]=-1,v&=~he}l!==0&&Vt(n,l,s)}function lc(){return(Pn&6)===0?(vh(0),!1):!0}function nl(){if(bn!==null){if(Vn===0)var n=bn.return;else n=bn,Hs=to=null,Jf(n),Wl=null,du=0,n=bn;for(;n!==null;)y0(n.alternate,n),n=n.return;bn=null}}function Mr(n,s){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,Vx(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),nl(),Zn=n,bn=l=Bs(n.current,null),xn=s,Vn=0,Ra=null,Cr=!1,vu=Ie(n,s),O0=!1,bu=xs=Tr=oc=uo=wi=0,Na=xu=null,D0=!1,(s&8)!==0&&(s|=s&32);var h=n.entangledLanes;if(h!==0)for(n=n.entanglements,h&=s;0<h;){var v=31-_e(h),M=1<<v;s|=n[v],h&=~M}return co=s,zs(),l}function z0(n,s){ln=null,T.H=hp,s===Yo||s===qd?(s=Pm(),Vn=3):s===$f?(s=Pm(),Vn=4):Vn=s===bi?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Ra=s,bn===null&&(wi=1,lh(n,Fa(s,n.current)))}function Nv(){var n=T.H;return T.H=hp,n===null?hp:n}function cc(){var n=T.A;return T.A=_0,n}function uc(){wi=4,Cr||(xn&4194048)!==xn&&Ja.current!==null||(vu=!0),(uo&134217727)===0&&(oc&134217727)===0||Zn===null||ho(Zn,xn,xs,!1)}function zp(n,s,l){var h=Pn;Pn|=2;var v=Nv(),M=cc();(Zn!==n||xn!==s)&&(Su=null,Mr(n,s)),s=!1;var he=wi;e:do try{if(Vn!==0&&bn!==null){var xe=bn,Oe=Ra;switch(Vn){case 8:nl(),he=6;break e;case 3:case 2:case 9:case 6:Ja.current===null&&(s=!0);var Fe=Vn;if(Vn=0,Ra=null,ku(n,xe,Oe,Fe),l&&vu){he=0;break e}break;default:Fe=Vn,Vn=0,Ra=null,ku(n,xe,Oe,Fe)}}Bp(),he=wi;break}catch(st){z0(n,st)}while(!0);return s&&n.shellSuspendCounter++,Hs=to=null,Pn=h,T.H=v,T.A=M,bn===null&&(Zn=null,xn=0,zs()),he}function Bp(){for(;bn!==null;)H0(bn)}function B0(n,s){var l=Pn;Pn|=2;var h=Nv(),v=cc();Zn!==n||xn!==s?(Su=null,Lp=ye()+500,Mr(n,s)):vu=Ie(n,s);e:do try{if(Vn!==0&&bn!==null){s=bn;var M=Ra;t:switch(Vn){case 1:Vn=0,Ra=null,ku(n,s,M,1);break;case 2:case 9:if(qf(M)){Vn=0,Ra=null,P0(s);break}s=function(){Vn!==2&&Vn!==9||Zn!==n||(Vn=7),za(n)},M.then(s,s);break e;case 3:Vn=7;break e;case 4:Vn=5;break e;case 7:qf(M)?(Vn=0,Ra=null,P0(s)):(Vn=0,Ra=null,ku(n,s,M,7));break;case 5:var he=null;switch(bn.tag){case 26:he=bn.memoizedState;case 5:case 27:var xe=bn;if(!he||W0(he)){Vn=0,Ra=null;var Oe=xe.sibling;if(Oe!==null)bn=Oe;else{var Fe=xe.return;Fe!==null?(bn=Fe,gh(Fe)):bn=null}break t}}Vn=0,Ra=null,ku(n,s,M,5);break;case 6:Vn=0,Ra=null,ku(n,s,M,6);break;case 8:nl(),wi=6;break e;default:throw Error(c(462))}}U0();break}catch(st){z0(n,st)}while(!0);return Hs=to=null,T.H=h,T.A=v,Pn=l,bn!==null?0:(Zn=null,xn=0,zs(),wi)}function U0(){for(;bn!==null&&!ue();)H0(bn)}function H0(n){var s=Ov(n.alternate,n,co);n.memoizedProps=n.pendingProps,s===null?gh(n):bn=s}function P0(n){var s=n,l=s.alternate;switch(s.tag){case 15:case 0:s=h0(l,s,s.pendingProps,s.type,void 0,xn);break;case 11:s=h0(l,s,s.pendingProps,s.type.render,s.ref,xn);break;case 5:Jf(s);default:y0(l,s),s=bn=gn(s,co),s=Ov(l,s,co)}n.memoizedProps=n.pendingProps,s===null?gh(n):bn=s}function ku(n,s,l,h){Hs=to=null,Jf(s),Wl=null,du=0;var v=s.return;try{if(Av(n,v,s,l,xn)){wi=1,lh(n,Fa(l,n.current)),bn=null;return}}catch(M){if(v!==null)throw bn=v,M;wi=1,lh(n,Fa(l,n.current)),bn=null;return}s.flags&32768?(_n||h===1?n=!0:vu||(xn&536870912)!==0?n=!1:(Cr=n=!0,(h===2||h===9||h===3||h===6)&&(h=Ja.current,h!==null&&h.tag===13&&(h.flags|=16384))),zv(s,n)):gh(s)}function gh(n){var s=n;do{if((s.flags&32768)!==0){zv(s,Cr);return}n=s.return;var l=m0(s.alternate,s,co);if(l!==null){bn=l;return}if(s=s.sibling,s!==null){bn=s;return}bn=s=n}while(s!==null);wi===0&&(wi=5)}function zv(n,s){do{var l=Nx(n.alternate,n);if(l!==null){l.flags&=32767,bn=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!s&&(n=n.sibling,n!==null)){bn=n;return}bn=n=l}while(n!==null);wi=6,bn=null}function Bv(n,s,l,h,v,M,he,xe,Oe){n.cancelPendingCommit=null;do Hp();while(Wi!==0);if((Pn&6)!==0)throw Error(c(327));if(s!==null){if(s===n.current)throw Error(c(177));if(M=s.lanes|s.childLanes,M|=sr,Rt(n,l,M,he,xe,Oe),n===Zn&&(bn=Zn=null,xn=0),wu=s,kr=n,Ki=l,Rp=M,Np=v,L0=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,Ux(Ne,function(){return V0(),null})):(n.callbackNode=null,n.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=T.T,T.T=null,v=E.p,E.p=2,he=Pn,Pn|=4;try{x0(n,s,l)}finally{Pn=he,E.p=v,T.T=h}}Wi=1,Uv(),mh(),Up()}}function Uv(){if(Wi===1){Wi=0;var n=kr,s=wu,l=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||l){l=T.T,T.T=null;var h=E.p;E.p=2;var v=Pn;Pn|=4;try{fh(s,n);var M=Mh,he=_m(n.containerInfo),xe=M.focusedElem,Oe=M.selectionRange;if(he!==xe&&xe&&xe.ownerDocument&&Ld(xe.ownerDocument.documentElement,xe)){if(Oe!==null&&Rd(xe)){var Fe=Oe.start,st=Oe.end;if(st===void 0&&(st=Fe),"selectionStart"in xe)xe.selectionStart=Fe,xe.selectionEnd=Math.min(st,xe.value.length);else{var ot=xe.ownerDocument||document,Qe=ot&&ot.defaultView||window;if(Qe.getSelection){var We=Qe.getSelection(),qt=xe.textContent.length,Gt=Math.min(Oe.start,qt),Nn=Oe.end===void 0?Gt:Math.min(Oe.end,qt);!We.extend&&Gt>Nn&&(he=Nn,Nn=Gt,Gt=he);var qe=ei(xe,Gt),He=ei(xe,Nn);if(qe&&He&&(We.rangeCount!==1||We.anchorNode!==qe.node||We.anchorOffset!==qe.offset||We.focusNode!==He.node||We.focusOffset!==He.offset)){var Ye=ot.createRange();Ye.setStart(qe.node,qe.offset),We.removeAllRanges(),Gt>Nn?(We.addRange(Ye),We.extend(He.node,He.offset)):(Ye.setEnd(He.node,He.offset),We.addRange(Ye))}}}}for(ot=[],We=xe;We=We.parentNode;)We.nodeType===1&&ot.push({element:We,left:We.scrollLeft,top:We.scrollTop});for(typeof xe.focus=="function"&&xe.focus(),xe=0;xe<ot.length;xe++){var rt=ot[xe];rt.element.scrollLeft=rt.left,rt.element.scrollTop=rt.top}}Dh=!!kh,Mh=kh=null}finally{Pn=v,E.p=h,T.T=l}}n.current=s,Wi=2}}function mh(){if(Wi===2){Wi=0;var n=kr,s=wu,l=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||l){l=T.T,T.T=null;var h=E.p;E.p=2;var v=Pn;Pn|=4;try{S0(n,s.alternate,s)}finally{Pn=v,E.p=h,T.T=l}}Wi=3}}function Up(){if(Wi===4||Wi===3){Wi=0,de();var n=kr,s=wu,l=Ki,h=L0;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Wi=5:(Wi=0,wu=kr=null,Hv(n,n.pendingLanes));var v=n.pendingLanes;if(v===0&&(tl=null),ht(l),s=s.stateNode,ke&&typeof ke.onCommitFiberRoot=="function")try{ke.onCommitFiberRoot(be,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=T.T,v=E.p,E.p=2,T.T=null;try{for(var M=n.onRecoverableError,he=0;he<h.length;he++){var xe=h[he];M(xe.value,{componentStack:xe.stack})}}finally{T.T=s,E.p=v}}(Ki&3)!==0&&Hp(),za(n),v=n.pendingLanes,(l&4194090)!==0&&(v&42)!==0?n===R0?Cu++:(Cu=0,R0=n):Cu=0,vh(0)}}function Hv(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,cr(s)))}function Hp(n){return Uv(),mh(),Up(),V0()}function V0(){if(Wi!==5)return!1;var n=kr,s=Rp;Rp=0;var l=ht(Ki),h=T.T,v=E.p;try{E.p=32>l?32:l,T.T=null,l=Np,Np=null;var M=kr,he=Ki;if(Wi=0,wu=kr=null,Ki=0,(Pn&6)!==0)throw Error(c(331));var xe=Pn;if(Pn|=4,A0(M.current),k0(M,M.current,he,l),Pn=xe,vh(0,!1),ke&&typeof ke.onPostCommitFiberRoot=="function")try{ke.onPostCommitFiberRoot(be,M)}catch{}return!0}finally{E.p=v,T.T=h,Hv(n,s)}}function $0(n,s,l){s=Fa(l,s),s=u0(n.stateNode,s,2),n=hr(n,s,2),n!==null&&(_t(n,2),za(n))}function In(n,s,l){if(n.tag===3)$0(n,n,l);else for(;s!==null;){if(s.tag===3){$0(s,n,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(tl===null||!tl.has(h))){n=Fa(l,n),l=d0(2),h=hr(s,l,2),h!==null&&(La(l,h,s,n),_t(h,2),za(h));break}}s=s.return}}function Pp(n,s,l){var h=n.pingCache;if(h===null){h=n.pingCache=new Lv;var v=new Set;h.set(s,v)}else v=h.get(s),v===void 0&&(v=new Set,h.set(s,v));v.has(l)||(O0=!0,v.add(l),n=I0.bind(null,n,s,l),s.then(n,n))}function I0(n,s,l){var h=n.pingCache;h!==null&&h.delete(s),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,Zn===n&&(xn&l)===l&&(wi===4||wi===3&&(xn&62914560)===xn&&300>ye()-j0?(Pn&2)===0&&Mr(n,0):Tr|=l,bu===xn&&(bu=0)),za(n)}function q0(n,s){s===0&&(s=mt()),n=rr(n,s),n!==null&&(_t(n,s),za(n))}function zx(n){var s=n.memoizedState,l=0;s!==null&&(l=s.retryLane),q0(n,l)}function Bx(n,s){var l=0;switch(n.tag){case 13:var h=n.stateNode,v=n.memoizedState;v!==null&&(l=v.retryLane);break;case 19:h=n.stateNode;break;case 22:h=n.stateNode._retryCache;break;default:throw Error(c(314))}h!==null&&h.delete(s),q0(n,l)}function Ux(n,s){return G(n,s)}var Vp=null,il=null,yh=!1,Mu=!1,$p=!1,al=0;function za(n){n!==il&&n.next===null&&(il===null?Vp=il=n:il=il.next=n),Mu=!0,yh||(yh=!0,$v())}function vh(n,s){if(!$p&&Mu){$p=!0;do for(var l=!1,h=Vp;h!==null;){if(n!==0){var v=h.pendingLanes;if(v===0)var M=0;else{var he=h.suspendedLanes,xe=h.pingedLanes;M=(1<<31-_e(42|n)+1)-1,M&=v&~(he&~xe),M=M&201326741?M&201326741|1:M?M|2:0}M!==0&&(l=!0,xh(h,M))}else M=xn,M=Ve(h,h===Zn?M:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(M&3)===0||Ie(h,M)||(l=!0,xh(h,M));h=h.next}while(l);$p=!1}}function Pv(){bh()}function bh(){Mu=yh=!1;var n=0;al!==0&&(go()&&(n=al),al=0);for(var s=ye(),l=null,h=Vp;h!==null;){var v=h.next,M=G0(h,s);M===0?(h.next=null,l===null?Vp=v:l.next=v,v===null&&(il=l)):(l=h,(n!==0||(M&3)!==0)&&(Mu=!0)),h=v}vh(n)}function G0(n,s){for(var l=n.suspendedLanes,h=n.pingedLanes,v=n.expirationTimes,M=n.pendingLanes&-62914561;0<M;){var he=31-_e(M),xe=1<<he,Oe=v[he];Oe===-1?((xe&l)===0||(xe&h)!==0)&&(v[he]=Ge(xe,s)):Oe<=s&&(n.expiredLanes|=xe),M&=~xe}if(s=Zn,l=xn,l=Ve(n,n===s?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),h=n.callbackNode,l===0||n===s&&(Vn===2||Vn===9)||n.cancelPendingCommit!==null)return h!==null&&h!==null&&ie(h),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||Ie(n,l)){if(s=l&-l,s===n.callbackPriority)return s;switch(h!==null&&ie(h),ht(l)){case 2:case 8:l=Ae;break;case 32:l=Ne;break;case 268435456:l=fe;break;default:l=Ne}return h=Vv.bind(null,n),l=G(l,h),n.callbackPriority=s,n.callbackNode=l,s}return h!==null&&h!==null&&ie(h),n.callbackPriority=2,n.callbackNode=null,2}function Vv(n,s){if(Wi!==0&&Wi!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(Hp()&&n.callbackNode!==l)return null;var h=xn;return h=Ve(n,n===Zn?h:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),h===0?null:(Tu(n,h,s),G0(n,ye()),n.callbackNode!=null&&n.callbackNode===l?Vv.bind(null,n):null)}function xh(n,s){if(Hp())return null;Tu(n,s,!0)}function $v(){$x(function(){(Pn&6)!==0?G(Ce,Pv):bh()})}function dc(){return al===0&&(al=pt()),al}function Ip(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:kd(""+n)}function Sh(n,s){var l=s.ownerDocument.createElement("input");return l.name=s.name,l.value=s.value,n.id&&l.setAttribute("form",n.id),s.parentNode.insertBefore(l,s),n=new FormData(n),l.parentNode.removeChild(l),n}function Iv(n,s,l,h,v){if(s==="submit"&&l&&l.stateNode===v){var M=Ip((v[yt]||null).action),he=h.submitter;he&&(s=(s=he[yt]||null)?Ip(s.formAction):he.getAttribute("formAction"),s!==null&&(M=s,he=null));var xe=new kf("action","action",null,h,v);n.push({event:xe,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(al!==0){var Oe=he?Sh(v,he):new FormData(v);dp(l,{pending:!0,data:Oe,method:v.method,action:M},null,Oe)}}else typeof M=="function"&&(xe.preventDefault(),Oe=he?Sh(v,he):new FormData(v),dp(l,{pending:!0,data:Oe,method:v.method,action:M},M,Oe))},currentTarget:v}]})}}for(var Ci=0;Ci<Fc.length;Ci++){var wh=Fc[Ci],Hx=wh.toLowerCase(),pn=wh[0].toUpperCase()+wh.slice(1);us(Hx,"on"+pn)}us(hv,"onAnimationEnd"),us(Om,"onAnimationIteration"),us(fv,"onAnimationStart"),us("dblclick","onDoubleClick"),us("focusin","onFocus"),us("focusout","onBlur"),us(Dm,"onTransitionRun"),us(Rf,"onTransitionStart"),us(pv,"onTransitionCancel"),us(jm,"onTransitionEnd"),en("onMouseEnter",["mouseout","mouseover"]),en("onMouseLeave",["mouseout","mouseover"]),en("onPointerEnter",["pointerout","pointerover"]),en("onPointerLeave",["pointerout","pointerover"]),Lt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Lt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Lt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Lt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Lt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Lt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ch="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(" "),sl=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ch));function hc(n,s){s=(s&4)!==0;for(var l=0;l<n.length;l++){var h=n[l],v=h.event;h=h.listeners;e:{var M=void 0;if(s)for(var he=h.length-1;0<=he;he--){var xe=h[he],Oe=xe.instance,Fe=xe.currentTarget;if(xe=xe.listener,Oe!==M&&v.isPropagationStopped())break e;M=xe,v.currentTarget=Fe;try{M(v)}catch(st){rh(st)}v.currentTarget=null,M=Oe}else for(he=0;he<h.length;he++){if(xe=h[he],Oe=xe.instance,Fe=xe.currentTarget,xe=xe.listener,Oe!==M&&v.isPropagationStopped())break e;M=xe,v.currentTarget=Fe;try{M(v)}catch(st){rh(st)}v.currentTarget=null,M=Oe}}}}function cn(n,s){var l=s[Ot];l===void 0&&(l=s[Ot]=new Set);var h=n+"__bubble";l.has(h)||(qp(s,n,2,!1),l.add(h))}function Au(n,s,l){var h=0;s&&(h|=4),qp(l,n,h,s)}var Eu="_reactListening"+Math.random().toString(36).slice(2);function Y0(n){if(!n[Eu]){n[Eu]=!0,Yt.forEach(function(l){l!=="selectionchange"&&(sl.has(l)||Au(l,!1,n),Au(l,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[Eu]||(s[Eu]=!0,Au("selectionchange",!1,s))}}function qp(n,s,l,h){switch(o1(s)){case 2:var v=Wv;break;case 8:v=Kv;break;default:v=s1}l=v.bind(null,s,l,n),v=void 0,!wf||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),h?v!==void 0?n.addEventListener(s,l,{capture:!0,passive:v}):n.addEventListener(s,l,!0):v!==void 0?n.addEventListener(s,l,{passive:v}):n.addEventListener(s,l,!1)}function Ss(n,s,l,h,v){var M=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var he=h.tag;if(he===3||he===4){var xe=h.stateNode.containerInfo;if(xe===v)break;if(he===4)for(he=h.return;he!==null;){var Oe=he.tag;if((Oe===3||Oe===4)&&he.stateNode.containerInfo===v)return;he=he.return}for(;xe!==null;){if(he=kt(xe),he===null)return;if(Oe=he.tag,Oe===5||Oe===6||Oe===26||Oe===27){h=M=he;continue e}xe=xe.parentNode}}h=h.return}Gc(function(){var Fe=M,st=Sf(l),ot=[];e:{var Qe=Lm.get(n);if(Qe!==void 0){var We=kf,qt=n;switch(n){case"keypress":if(Fi(l)===0)break e;case"keydown":case"keyup":We=Ds;break;case"focusin":qt="focus",We=pm;break;case"focusout":qt="blur",We=pm;break;case"beforeblur":case"afterblur":We=pm;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":We=fm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":We=iv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":We=ym;break;case hv:case Om:case fv:We=Dx;break;case jm:We=lv;break;case"scroll":case"scrollend":We=tv;break;case"wheel":We=Nl;break;case"copy":case"cut":case"paste":We=Ed;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":We=_d;break;case"toggle":case"beforetoggle":We=cv}var Gt=(s&4)!==0,Nn=!Gt&&(n==="scroll"||n==="scrollend"),qe=Gt?Qe!==null?Qe+"Capture":null:Qe;Gt=[];for(var He=Fe,Ye;He!==null;){var rt=He;if(Ye=rt.stateNode,rt=rt.tag,rt!==5&&rt!==26&&rt!==27||Ye===null||qe===null||(rt=Dl(He,qe),rt!=null&&Gt.push(fo(He,rt,Ye))),Nn)break;He=He.return}0<Gt.length&&(Qe=new We(Qe,qt,null,l,st),ot.push({event:Qe,listeners:Gt}))}}if((s&7)===0){e:{if(Qe=n==="mouseover"||n==="pointerover",We=n==="mouseout"||n==="pointerout",Qe&&l!==Ol&&(qt=l.relatedTarget||l.fromElement)&&(kt(qt)||qt[wt]))break e;if((We||Qe)&&(Qe=st.window===st?st:(Qe=st.ownerDocument)?Qe.defaultView||Qe.parentWindow:window,We?(qt=l.relatedTarget||l.toElement,We=Fe,qt=qt?kt(qt):null,qt!==null&&(Nn=p(qt),Gt=qt.tag,qt!==Nn||Gt!==5&&Gt!==27&&Gt!==6)&&(qt=null)):(We=null,qt=Fe),We!==qt)){if(Gt=fm,rt="onMouseLeave",qe="onMouseEnter",He="mouse",(n==="pointerout"||n==="pointerover")&&(Gt=_d,rt="onPointerLeave",qe="onPointerEnter",He="pointer"),Nn=We==null?Qe:jt(We),Ye=qt==null?Qe:jt(qt),Qe=new Gt(rt,He+"leave",We,l,st),Qe.target=Nn,Qe.relatedTarget=Ye,rt=null,kt(st)===Fe&&(Gt=new Gt(qe,He+"enter",qt,l,st),Gt.target=Ye,Gt.relatedTarget=Nn,rt=Gt),Nn=rt,We&&qt)t:{for(Gt=We,qe=qt,He=0,Ye=Gt;Ye;Ye=rl(Ye))He++;for(Ye=0,rt=qe;rt;rt=rl(rt))Ye++;for(;0<He-Ye;)Gt=rl(Gt),He--;for(;0<Ye-He;)qe=rl(qe),Ye--;for(;He--;){if(Gt===qe||qe!==null&&Gt===qe.alternate)break t;Gt=rl(Gt),qe=rl(qe)}Gt=null}else Gt=null;We!==null&&Th(ot,Qe,We,Gt,!1),qt!==null&&Nn!==null&&Th(ot,Nn,qt,Gt,!0)}}e:{if(Qe=Fe?jt(Fe):window,We=Qe.nodeName&&Qe.nodeName.toLowerCase(),We==="select"||We==="input"&&Qe.type==="file")var Nt=Cm;else if(Of(Qe))if(Tm)Nt=Am;else{Nt=zo;var mn=jf}else We=Qe.nodeName,!We||We.toLowerCase()!=="input"||Qe.type!=="checkbox"&&Qe.type!=="radio"?Fe&&_l(Fe.elementType)&&(Nt=Cm):Nt=Jr;if(Nt&&(Nt=Nt(n,Fe))){Df(ot,Nt,l,st);break e}mn&&mn(n,Qe,Fe),n==="focusout"&&Fe&&Qe.type==="number"&&Fe.memoizedProps.value!=null&&Cd(Qe,"number",Qe.value)}switch(mn=Fe?jt(Fe):window,n){case"focusin":(Of(mn)||mn.contentEditable==="true")&&(ir=mn,Rs=Fe,Ho=null);break;case"focusout":Ho=Rs=ir=null;break;case"mousedown":Pl=!0;break;case"contextmenu":case"mouseup":case"dragend":Pl=!1,Lf(ot,l,st);break;case"selectionchange":if(Hl)break;case"keydown":case"keyup":Lf(ot,l,st)}var Pt;if(Od)e:{switch(n){case"compositionstart":var Zt="onCompositionStart";break e;case"compositionend":Zt="onCompositionEnd";break e;case"compositionupdate":Zt="onCompositionUpdate";break e}Zt=void 0}else No?jd(n,l)&&(Zt="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(Zt="onCompositionStart");Zt&&(tr&&l.locale!=="ko"&&(No||Zt!=="onCompositionStart"?Zt==="onCompositionEnd"&&No&&(Pt=dm()):(Zr=st,Yc="value"in Zr?Zr.value:Zr.textContent,No=!0)),mn=_u(Fe,Zt),0<mn.length&&(Zt=new gm(Zt,n,null,l,st),ot.push({event:Zt,listeners:mn}),Pt?Zt.data=Pt:(Pt=Ro(l),Pt!==null&&(Zt.data=Pt)))),(Pt=bm?Sm(n,l):zl(n,l))&&(Zt=_u(Fe,"onBeforeInput"),0<Zt.length&&(mn=new gm("onBeforeInput","beforeinput",null,l,st),ot.push({event:mn,listeners:Zt}),mn.data=Pt)),Iv(ot,n,Fe,l,st)}hc(ot,s)})}function fo(n,s,l){return{instance:n,listener:s,currentTarget:l}}function _u(n,s){for(var l=s+"Capture",h=[];n!==null;){var v=n,M=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||M===null||(v=Dl(n,l),v!=null&&h.unshift(fo(n,v,M)),v=Dl(n,s),v!=null&&h.push(fo(n,v,M))),n.tag===3)return h;n=n.return}return[]}function rl(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Th(n,s,l,h,v){for(var M=s._reactName,he=[];l!==null&&l!==h;){var xe=l,Oe=xe.alternate,Fe=xe.stateNode;if(xe=xe.tag,Oe!==null&&Oe===h)break;xe!==5&&xe!==26&&xe!==27||Fe===null||(Oe=Fe,v?(Fe=Dl(l,M),Fe!=null&&he.unshift(fo(l,Fe,Oe))):v||(Fe=Dl(l,M),Fe!=null&&he.push(fo(l,Fe,Oe)))),l=l.return}he.length!==0&&n.push({event:s,listeners:he})}var es=/\r\n?/g,X0=/\u0000|\uFFFD/g;function qv(n){return(typeof n=="string"?n:""+n).replace(es,`
523
+ `).replace(X0,"")}function F0(n,s){return s=qv(s),qv(n)===s}function Gp(){}function sn(n,s,l,h,v,M){switch(l){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||$c(n,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&$c(n,""+h);break;case"className":Qt(n,"class",h);break;case"tabIndex":Qt(n,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Qt(n,l,h);break;case"style":Td(n,h,M);break;case"data":if(s!=="object"){Qt(n,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||l!=="href")){n.removeAttribute(l);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){n.removeAttribute(l);break}h=kd(""+h),n.setAttribute(l,h);break;case"action":case"formAction":if(typeof h=="function"){n.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof M=="function"&&(l==="formAction"?(s!=="input"&&sn(n,s,"name",v.name,v,null),sn(n,s,"formEncType",v.formEncType,v,null),sn(n,s,"formMethod",v.formMethod,v,null),sn(n,s,"formTarget",v.formTarget,v,null)):(sn(n,s,"encType",v.encType,v,null),sn(n,s,"method",v.method,v,null),sn(n,s,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){n.removeAttribute(l);break}h=kd(""+h),n.setAttribute(l,h);break;case"onClick":h!=null&&(n.onclick=Gp);break;case"onScroll":h!=null&&cn("scroll",n);break;case"onScrollEnd":h!=null&&cn("scrollend",n);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(c(61));if(l=h.__html,l!=null){if(v.children!=null)throw Error(c(60));n.innerHTML=l}}break;case"multiple":n.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":n.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){n.removeAttribute("xlink:href");break}l=kd(""+h),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?n.setAttribute(l,""+h):n.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":h===!0?n.setAttribute(l,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?n.setAttribute(l,h):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?n.setAttribute(l,h):n.removeAttribute(l);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?n.removeAttribute(l):n.setAttribute(l,h);break;case"popover":cn("beforetoggle",n),cn("toggle",n),Xt(n,"popover",h);break;case"xlinkActuate":hn(n,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":hn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":hn(n,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":hn(n,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":hn(n,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":hn(n,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":hn(n,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":hn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":hn(n,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Xt(n,"is",h);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Ex.get(l)||l,Xt(n,l,h))}}function Ke(n,s,l,h,v,M){switch(l){case"style":Td(n,h,M);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(c(61));if(l=h.__html,l!=null){if(v.children!=null)throw Error(c(60));n.innerHTML=l}}break;case"children":typeof h=="string"?$c(n,h):(typeof h=="number"||typeof h=="bigint")&&$c(n,""+h);break;case"onScroll":h!=null&&cn("scroll",n);break;case"onScrollEnd":h!=null&&cn("scrollend",n);break;case"onClick":h!=null&&(n.onclick=Gp);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!At.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(v=l.endsWith("Capture"),s=l.slice(2,v?l.length-7:void 0),M=n[yt]||null,M=M!=null?M[l]:null,typeof M=="function"&&n.removeEventListener(s,M,v),typeof h=="function")){typeof M!="function"&&M!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(s,h,v);break e}l in n?n[l]=h:h===!0?n.setAttribute(l,""):Xt(n,l,h)}}}function Wt(n,s,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":cn("error",n),cn("load",n);var h=!1,v=!1,M;for(M in l)if(l.hasOwnProperty(M)){var he=l[M];if(he!=null)switch(M){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,s));default:sn(n,s,M,he,l,null)}}v&&sn(n,s,"srcSet",l.srcSet,l,null),h&&sn(n,s,"src",l.src,l,null);return;case"input":cn("invalid",n);var xe=M=he=v=null,Oe=null,Fe=null;for(h in l)if(l.hasOwnProperty(h)){var st=l[h];if(st!=null)switch(h){case"name":v=st;break;case"type":he=st;break;case"checked":Oe=st;break;case"defaultChecked":Fe=st;break;case"value":M=st;break;case"defaultValue":xe=st;break;case"children":case"dangerouslySetInnerHTML":if(st!=null)throw Error(c(137,s));break;default:sn(n,s,h,st,l,null)}}bf(n,M,xe,Oe,Fe,he,v,!1),jo(n);return;case"select":cn("invalid",n),h=he=M=null;for(v in l)if(l.hasOwnProperty(v)&&(xe=l[v],xe!=null))switch(v){case"value":M=xe;break;case"defaultValue":he=xe;break;case"multiple":h=xe;default:sn(n,s,v,xe,l,null)}s=M,l=he,n.multiple=!!h,s!=null?El(n,!!h,s,!1):l!=null&&El(n,!!h,l,!0);return;case"textarea":cn("invalid",n),M=v=h=null;for(he in l)if(l.hasOwnProperty(he)&&(xe=l[he],xe!=null))switch(he){case"value":h=xe;break;case"defaultValue":v=xe;break;case"children":M=xe;break;case"dangerouslySetInnerHTML":if(xe!=null)throw Error(c(91));break;default:sn(n,s,he,xe,l,null)}cm(n,h,v,M),jo(n);return;case"option":for(Oe in l)if(l.hasOwnProperty(Oe)&&(h=l[Oe],h!=null))switch(Oe){case"selected":n.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:sn(n,s,Oe,h,l,null)}return;case"dialog":cn("beforetoggle",n),cn("toggle",n),cn("cancel",n),cn("close",n);break;case"iframe":case"object":cn("load",n);break;case"video":case"audio":for(h=0;h<Ch.length;h++)cn(Ch[h],n);break;case"image":cn("error",n),cn("load",n);break;case"details":cn("toggle",n);break;case"embed":case"source":case"link":cn("error",n),cn("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Fe in l)if(l.hasOwnProperty(Fe)&&(h=l[Fe],h!=null))switch(Fe){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,s));default:sn(n,s,Fe,h,l,null)}return;default:if(_l(s)){for(st in l)l.hasOwnProperty(st)&&(h=l[st],h!==void 0&&Ke(n,s,st,h,l,void 0));return}}for(xe in l)l.hasOwnProperty(xe)&&(h=l[xe],h!=null&&sn(n,s,xe,h,l,null))}function Px(n,s,l,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,M=null,he=null,xe=null,Oe=null,Fe=null,st=null;for(We in l){var ot=l[We];if(l.hasOwnProperty(We)&&ot!=null)switch(We){case"checked":break;case"value":break;case"defaultValue":Oe=ot;default:h.hasOwnProperty(We)||sn(n,s,We,null,h,ot)}}for(var Qe in h){var We=h[Qe];if(ot=l[Qe],h.hasOwnProperty(Qe)&&(We!=null||ot!=null))switch(Qe){case"type":M=We;break;case"name":v=We;break;case"checked":Fe=We;break;case"defaultChecked":st=We;break;case"value":he=We;break;case"defaultValue":xe=We;break;case"children":case"dangerouslySetInnerHTML":if(We!=null)throw Error(c(137,s));break;default:We!==ot&&sn(n,s,Qe,We,h,ot)}}vf(n,he,xe,Oe,Fe,st,M,v);return;case"select":We=he=xe=Qe=null;for(M in l)if(Oe=l[M],l.hasOwnProperty(M)&&Oe!=null)switch(M){case"value":break;case"multiple":We=Oe;default:h.hasOwnProperty(M)||sn(n,s,M,null,h,Oe)}for(v in h)if(M=h[v],Oe=l[v],h.hasOwnProperty(v)&&(M!=null||Oe!=null))switch(v){case"value":Qe=M;break;case"defaultValue":xe=M;break;case"multiple":he=M;default:M!==Oe&&sn(n,s,v,M,h,Oe)}s=xe,l=he,h=We,Qe!=null?El(n,!!l,Qe,!1):!!h!=!!l&&(s!=null?El(n,!!l,s,!0):El(n,!!l,l?[]:"",!1));return;case"textarea":We=Qe=null;for(xe in l)if(v=l[xe],l.hasOwnProperty(xe)&&v!=null&&!h.hasOwnProperty(xe))switch(xe){case"value":break;case"children":break;default:sn(n,s,xe,null,h,v)}for(he in h)if(v=h[he],M=l[he],h.hasOwnProperty(he)&&(v!=null||M!=null))switch(he){case"value":Qe=v;break;case"defaultValue":We=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(c(91));break;default:v!==M&&sn(n,s,he,v,h,M)}lm(n,Qe,We);return;case"option":for(var qt in l)if(Qe=l[qt],l.hasOwnProperty(qt)&&Qe!=null&&!h.hasOwnProperty(qt))switch(qt){case"selected":n.selected=!1;break;default:sn(n,s,qt,null,h,Qe)}for(Oe in h)if(Qe=h[Oe],We=l[Oe],h.hasOwnProperty(Oe)&&Qe!==We&&(Qe!=null||We!=null))switch(Oe){case"selected":n.selected=Qe&&typeof Qe!="function"&&typeof Qe!="symbol";break;default:sn(n,s,Oe,Qe,h,We)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Gt in l)Qe=l[Gt],l.hasOwnProperty(Gt)&&Qe!=null&&!h.hasOwnProperty(Gt)&&sn(n,s,Gt,null,h,Qe);for(Fe in h)if(Qe=h[Fe],We=l[Fe],h.hasOwnProperty(Fe)&&Qe!==We&&(Qe!=null||We!=null))switch(Fe){case"children":case"dangerouslySetInnerHTML":if(Qe!=null)throw Error(c(137,s));break;default:sn(n,s,Fe,Qe,h,We)}return;default:if(_l(s)){for(var Nn in l)Qe=l[Nn],l.hasOwnProperty(Nn)&&Qe!==void 0&&!h.hasOwnProperty(Nn)&&Ke(n,s,Nn,void 0,h,Qe);for(st in h)Qe=h[st],We=l[st],!h.hasOwnProperty(st)||Qe===We||Qe===void 0&&We===void 0||Ke(n,s,st,Qe,h,We);return}}for(var qe in l)Qe=l[qe],l.hasOwnProperty(qe)&&Qe!=null&&!h.hasOwnProperty(qe)&&sn(n,s,qe,null,h,Qe);for(ot in h)Qe=h[ot],We=l[ot],!h.hasOwnProperty(ot)||Qe===We||Qe==null&&We==null||sn(n,s,ot,Qe,h,We)}var kh=null,Mh=null;function ws(n){return n.nodeType===9?n:n.ownerDocument}function po(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ou(n,s){if(n===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&s==="foreignObject"?0:n}function Ar(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Du=null;function go(){var n=window.event;return n&&n.type==="popstate"?n===Du?!1:(Du=n,!0):(Du=null,!1)}var Yp=typeof setTimeout=="function"?setTimeout:void 0,Vx=typeof clearTimeout=="function"?clearTimeout:void 0,Gv=typeof Promise=="function"?Promise:void 0,$x=typeof queueMicrotask=="function"?queueMicrotask:typeof Gv<"u"?function(n){return Gv.resolve(null).then(n).catch(Er)}:Yp;function Er(n){setTimeout(function(){throw n})}function ol(n){return n==="head"}function Xp(n,s){var l=s,h=0,v=0;do{var M=l.nextSibling;if(n.removeChild(l),M&&M.nodeType===8)if(l=M.data,l==="/$"){if(0<h&&8>h){l=h;var he=n.ownerDocument;if(l&1&&Ba(he.documentElement),l&2&&Ba(he.body),l&4)for(l=he.head,Ba(l),he=l.firstChild;he;){var xe=he.nextSibling,Oe=he.nodeName;he[nt]||Oe==="SCRIPT"||Oe==="STYLE"||Oe==="LINK"&&he.rel.toLowerCase()==="stylesheet"||l.removeChild(he),he=xe}}if(v===0){n.removeChild(M),Or(s);return}v--}else l==="$"||l==="$?"||l==="$!"?v++:h=l.charCodeAt(0)-48;else h=0;l=M}while(l);Or(s)}function Ah(n){var s=n.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var l=s;switch(s=s.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Ah(l),Ut(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function ju(n,s,l,h){for(;n.nodeType===1;){var v=l;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(h){if(!n[nt])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(M=n.getAttribute("rel"),M==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(M!==v.rel||n.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||n.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||n.getAttribute("title")!==(v.title==null?null:v.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(M=n.getAttribute("src"),(M!==(v.src==null?null:v.src)||n.getAttribute("type")!==(v.type==null?null:v.type)||n.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&M&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var M=v.name==null?null:""+v.name;if(v.type==="hidden"&&n.getAttribute("name")===M)return n}else return n;if(n=qs(n.nextSibling),n===null)break}return null}function Ix(n,s,l){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=qs(n.nextSibling),n===null))return null;return n}function Eh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState==="complete"}function qx(n,s){var l=n.ownerDocument;if(n.data!=="$?"||l.readyState==="complete")s();else{var h=function(){s(),l.removeEventListener("DOMContentLoaded",h)};l.addEventListener("DOMContentLoaded",h),n._reactRetry=h}}function qs(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?"||s==="F!"||s==="F")break;if(s==="/$")return null}}return n}var ll=null;function ea(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return n;s--}else l==="/$"&&s++}n=n.previousSibling}return null}function Mt(n,s,l){switch(s=ws(l),n){case"html":if(n=s.documentElement,!n)throw Error(c(452));return n;case"head":if(n=s.head,!n)throw Error(c(453));return n;case"body":if(n=s.body,!n)throw Error(c(454));return n;default:throw Error(c(451))}}function Ba(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);Ut(n)}var Ti=new Map,ca=new Set;function Fp(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var mo=E.d;E.d={f:Zp,r:Qp,D:yo,C:Jp,L:cl,m:ua,X:ul,S:Ua,M:Z0};function Zp(){var n=mo.f(),s=lc();return n||s}function Qp(n){var s=Tt(n);s!==null&&s.tag===5&&s.type==="form"?uu(s):mo.r(n)}var ta=typeof document>"u"?null:document;function Gs(n,s,l){var h=ta;if(h&&typeof s=="string"&&s){var v=ls(s);v='link[rel="'+n+'"][href="'+v+'"]',typeof l=="string"&&(v+='[crossorigin="'+l+'"]'),ca.has(v)||(ca.add(v),n={rel:n,crossOrigin:l,href:s},h.querySelector(v)===null&&(s=h.createElement("link"),Wt(s,"link",n),It(s),h.head.appendChild(s)))}}function yo(n){mo.D(n),Gs("dns-prefetch",n,null)}function Jp(n,s){mo.C(n,s),Gs("preconnect",n,s)}function cl(n,s,l){mo.L(n,s,l);var h=ta;if(h&&n&&s){var v='link[rel="preload"][as="'+ls(s)+'"]';s==="image"&&l&&l.imageSrcSet?(v+='[imagesrcset="'+ls(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(v+='[imagesizes="'+ls(l.imageSizes)+'"]')):v+='[href="'+ls(n)+'"]';var M=v;switch(s){case"style":M=Lu(n);break;case"script":M=Cs(n)}Ti.has(M)||(n=O({rel:"preload",href:s==="image"&&l&&l.imageSrcSet?void 0:n,as:s},l),Ti.set(M,n),h.querySelector(v)!==null||s==="style"&&h.querySelector(Ru(M))||s==="script"&&h.querySelector(fc(M))||(s=h.createElement("link"),Wt(s,"link",n),It(s),h.head.appendChild(s)))}}function ua(n,s){mo.m(n,s);var l=ta;if(l&&n){var h=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+ls(h)+'"][href="'+ls(n)+'"]',M=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":M=Cs(n)}if(!Ti.has(M)&&(n=O({rel:"modulepreload",href:n},s),Ti.set(M,n),l.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(fc(M)))return}h=l.createElement("link"),Wt(h,"link",n),It(h),l.head.appendChild(h)}}}function Ua(n,s,l){mo.S(n,s,l);var h=ta;if(h&&n){var v=nn(h).hoistableStyles,M=Lu(n);s=s||"default";var he=v.get(M);if(!he){var xe={loading:0,preload:null};if(he=h.querySelector(Ru(M)))xe.loading=5;else{n=O({rel:"stylesheet",href:n,"data-precedence":s},l),(l=Ti.get(M))&&Kp(n,l);var Oe=he=h.createElement("link");It(Oe),Wt(Oe,"link",n),Oe._p=new Promise(function(Fe,st){Oe.onload=Fe,Oe.onerror=st}),Oe.addEventListener("load",function(){xe.loading|=1}),Oe.addEventListener("error",function(){xe.loading|=2}),xe.loading|=4,Wp(he,s,h)}he={type:"stylesheet",instance:he,count:1,state:xe},v.set(M,he)}}}function ul(n,s){mo.X(n,s);var l=ta;if(l&&n){var h=nn(l).hoistableScripts,v=Cs(n),M=h.get(v);M||(M=l.querySelector(fc(v)),M||(n=O({src:n,async:!0},s),(s=Ti.get(v))&&eg(n,s),M=l.createElement("script"),It(M),Wt(M,"link",n),l.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},h.set(v,M))}}function Z0(n,s){mo.M(n,s);var l=ta;if(l&&n){var h=nn(l).hoistableScripts,v=Cs(n),M=h.get(v);M||(M=l.querySelector(fc(v)),M||(n=O({src:n,async:!0,type:"module"},s),(s=Ti.get(v))&&eg(n,s),M=l.createElement("script"),It(M),Wt(M,"link",n),l.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},h.set(v,M))}}function Yv(n,s,l,h){var v=(v=q.current)?Fp(v):null;if(!v)throw Error(c(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(s=Lu(l.href),l=nn(v).hoistableStyles,h=l.get(s),h||(h={type:"style",instance:null,count:0,state:null},l.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=Lu(l.href);var M=nn(v).hoistableStyles,he=M.get(n);if(he||(v=v.ownerDocument||v,he={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},M.set(n,he),(M=v.querySelector(Ru(n)))&&!M._p&&(he.instance=M,he.state.loading=5),Ti.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ti.set(n,l),M||Xv(v,n,l,he.state))),s&&h===null)throw Error(c(528,""));return he}if(s&&h!==null)throw Error(c(529,""));return null;case"script":return s=l.async,l=l.src,typeof l=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Cs(l),l=nn(v).hoistableScripts,h=l.get(s),h||(h={type:"script",instance:null,count:0,state:null},l.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,n))}}function Lu(n){return'href="'+ls(n)+'"'}function Ru(n){return'link[rel="stylesheet"]['+n+"]"}function Nu(n){return O({},n,{"data-precedence":n.precedence,precedence:null})}function Xv(n,s,l,h){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=n.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),Wt(s,"link",l),It(s),n.head.appendChild(s))}function Cs(n){return'[src="'+ls(n)+'"]'}function fc(n){return"script[async]"+n}function Fv(n,s,l){if(s.count++,s.instance===null)switch(s.type){case"style":var h=n.querySelector('style[data-href~="'+ls(l.href)+'"]');if(h)return s.instance=h,It(h),h;var v=O({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return h=(n.ownerDocument||n).createElement("style"),It(h),Wt(h,"style",v),Wp(h,l.precedence,n),s.instance=h;case"stylesheet":v=Lu(l.href);var M=n.querySelector(Ru(v));if(M)return s.state.loading|=4,s.instance=M,It(M),M;h=Nu(l),(v=Ti.get(v))&&Kp(h,v),M=(n.ownerDocument||n).createElement("link"),It(M);var he=M;return he._p=new Promise(function(xe,Oe){he.onload=xe,he.onerror=Oe}),Wt(M,"link",h),s.state.loading|=4,Wp(M,l.precedence,n),s.instance=M;case"script":return M=Cs(l.src),(v=n.querySelector(fc(M)))?(s.instance=v,It(v),v):(h=l,(v=Ti.get(M))&&(h=O({},l),eg(h,v)),n=n.ownerDocument||n,v=n.createElement("script"),It(v),Wt(v,"link",h),n.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(c(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,Wp(h,l.precedence,n));return s.instance}function Wp(n,s,l){for(var h=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,M=v,he=0;he<h.length;he++){var xe=h[he];if(xe.dataset.precedence===s)M=xe;else if(M!==v)break}M?M.parentNode.insertBefore(n,M.nextSibling):(s=l.nodeType===9?l.head:l,s.insertBefore(n,s.firstChild))}function Kp(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function eg(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var dl=null;function Q0(n,s,l){if(dl===null){var h=new Map,v=dl=new Map;v.set(l,h)}else v=dl,h=v.get(l),h||(h=new Map,v.set(l,h));if(h.has(n))return h;for(h.set(n,null),l=l.getElementsByTagName(n),v=0;v<l.length;v++){var M=l[v];if(!(M[nt]||M[bt]||n==="link"&&M.getAttribute("rel")==="stylesheet")&&M.namespaceURI!=="http://www.w3.org/2000/svg"){var he=M.getAttribute(s)||"";he=n+he;var xe=h.get(he);xe?xe.push(M):h.set(he,[M])}}return h}function J0(n,s,l){n=n.ownerDocument||n,n.head.insertBefore(l,s==="title"?n.querySelector("head > title"):null)}function Zv(n,s,l){if(l===1||s.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return n=s.disabled,typeof s.precedence=="string"&&n==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function W0(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}var zu=null;function Qv(){}function Jv(n,s,l){if(zu===null)throw Error(c(475));var h=zu;if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var v=Lu(l.href),M=n.querySelector(Ru(v));if(M){n=M._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(h.count++,h=_h.bind(h),n.then(h,h)),s.state.loading|=4,s.instance=M,It(M);return}M=n.ownerDocument||n,l=Nu(l),(v=Ti.get(v))&&Kp(l,v),M=M.createElement("link"),It(M);var he=M;he._p=new Promise(function(xe,Oe){he.onload=xe,he.onerror=Oe}),Wt(M,"link",l),s.instance=M}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(s,n),(n=s.state.preload)&&(s.state.loading&3)===0&&(h.count++,s=_h.bind(h),n.addEventListener("load",s),n.addEventListener("error",s))}}function K0(){if(zu===null)throw Error(c(475));var n=zu;return n.stylesheets&&n.count===0&&Oh(n,n.stylesheets),0<n.count?function(s){var l=setTimeout(function(){if(n.stylesheets&&Oh(n,n.stylesheets),n.unsuspend){var h=n.unsuspend;n.unsuspend=null,h()}},6e4);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(l)}}:null}function _h(){if(this.count--,this.count===0){if(this.stylesheets)Oh(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Bu=null;function Oh(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Bu=new Map,s.forEach(ts,n),Bu=null,_h.call(n))}function ts(n,s){if(!(s.state.loading&4)){var l=Bu.get(n);if(l)var h=l.get(null);else{l=new Map,Bu.set(n,l);for(var v=n.querySelectorAll("link[data-precedence],style[data-precedence]"),M=0;M<v.length;M++){var he=v[M];(he.nodeName==="LINK"||he.getAttribute("media")!=="not all")&&(l.set(he.dataset.precedence,he),h=he)}h&&l.set(null,h)}v=s.instance,he=v.getAttribute("data-precedence"),M=l.get(he)||h,M===h&&l.set(null,v),l.set(he,v),this.count++,h=_h.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),M?M.parentNode.insertBefore(v,M.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(v,n.firstChild)),s.state.loading|=4}}var Ha={$$typeof:Y,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function Gx(n,s,l,h,v,M,he,xe){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ct(0),this.hiddenUpdates=ct(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=M,this.onRecoverableError=he,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=xe,this.incompleteTransitions=new Map}function e1(n,s,l,h,v,M,he,xe,Oe,Fe,st,ot){return n=new Gx(n,s,l,he,xe,Oe,Fe,ot),s=1,M===!0&&(s|=24),M=Ea(3,null,null,s),n.current=M,M.stateNode=n,s=su(),s.refCount++,n.pooledCache=s,s.refCount++,M.memoizedState={element:h,isDehydrated:l,cache:s},Gf(M),n}function t1(n){return n?(n=Jc,n):Jc}function n1(n,s,l,h,v,M){v=t1(v),h.context===null?h.context=v:h.pendingContext=v,h=Oa(s),h.payload={element:l},M=M===void 0?null:M,M!==null&&(h.callback=M),l=hr(n,h,s),l!==null&&(Ka(l,n,s),Yl(l,n,s))}function i1(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<s?l:s}}function tg(n,s){i1(n,s),(n=n.alternate)&&i1(n,s)}function a1(n){if(n.tag===13){var s=rr(n,67108864);s!==null&&Ka(s,n,67108864),tg(n,67108864)}}var Dh=!0;function Wv(n,s,l,h){var v=T.T;T.T=null;var M=E.p;try{E.p=2,s1(n,s,l,h)}finally{E.p=M,T.T=v}}function Kv(n,s,l,h){var v=T.T;T.T=null;var M=E.p;try{E.p=8,s1(n,s,l,h)}finally{E.p=M,T.T=v}}function s1(n,s,l,h){if(Dh){var v=ng(h);if(v===null)Ss(n,s,h,ig,l),pc(n,h);else if(tb(v,n,s,l,h))h.stopPropagation();else if(pc(n,h),s&4&&-1<eb.indexOf(n)){for(;v!==null;){var M=Tt(v);if(M!==null)switch(M.tag){case 3:if(M=M.stateNode,M.current.memoizedState.isDehydrated){var he=Xe(M.pendingLanes);if(he!==0){var xe=M;for(xe.pendingLanes|=2,xe.entangledLanes|=2;he;){var Oe=1<<31-_e(he);xe.entanglements[1]|=Oe,he&=~Oe}za(M),(Pn&6)===0&&(Lp=ye()+500,vh(0))}}break;case 13:xe=rr(M,2),xe!==null&&Ka(xe,M,2),lc(),tg(M,2)}if(M=ng(h),M===null&&Ss(n,s,h,ig,l),M===v)break;v=M}v!==null&&h.stopPropagation()}else Ss(n,s,h,null,l)}}function ng(n){return n=Sf(n),r1(n)}var ig=null;function r1(n){if(ig=null,n=kt(n),n!==null){var s=p(n);if(s===null)n=null;else{var l=s.tag;if(l===13){if(n=y(s),n!==null)return n;n=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null)}}return ig=n,null}function o1(n){switch(n){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Se()){case Ce:return 2;case Ae:return 8;case Ne:case Re:return 32;case fe:return 268435456;default:return 32}default:return 32}}var Uu=!1,_r=null,vo=null,bo=null,jh=new Map,Lh=new Map,hl=[],eb="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".split(" ");function pc(n,s){switch(n){case"focusin":case"focusout":_r=null;break;case"dragenter":case"dragleave":vo=null;break;case"mouseover":case"mouseout":bo=null;break;case"pointerover":case"pointerout":jh.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lh.delete(s.pointerId)}}function gc(n,s,l,h,v,M){return n===null||n.nativeEvent!==M?(n={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:M,targetContainers:[v]},s!==null&&(s=Tt(s),s!==null&&a1(s)),n):(n.eventSystemFlags|=h,s=n.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),n)}function tb(n,s,l,h,v){switch(s){case"focusin":return _r=gc(_r,n,s,l,h,v),!0;case"dragenter":return vo=gc(vo,n,s,l,h,v),!0;case"mouseover":return bo=gc(bo,n,s,l,h,v),!0;case"pointerover":var M=v.pointerId;return jh.set(M,gc(jh.get(M)||null,n,s,l,h,v)),!0;case"gotpointercapture":return M=v.pointerId,Lh.set(M,gc(Lh.get(M)||null,n,s,l,h,v)),!0}return!1}function l1(n){var s=kt(n.target);if(s!==null){var l=p(s);if(l!==null){if(s=l.tag,s===13){if(s=y(l),s!==null){n.blockedOn=s,Ct(n.priority,function(){if(l.tag===13){var h=Wa();h=lt(h);var v=rr(l,h);v!==null&&Ka(v,l,h),tg(l,h)}});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Rh(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var l=ng(n.nativeEvent);if(l===null){l=n.nativeEvent;var h=new l.constructor(l.type,l);Ol=h,l.target.dispatchEvent(h),Ol=null}else return s=Tt(l),s!==null&&a1(s),n.blockedOn=l,!1;s.shift()}return!0}function Nh(n,s,l){Rh(n)&&l.delete(s)}function Hu(){Uu=!1,_r!==null&&Rh(_r)&&(_r=null),vo!==null&&Rh(vo)&&(vo=null),bo!==null&&Rh(bo)&&(bo=null),jh.forEach(Nh),Lh.forEach(Nh)}function ag(n,s){n.blockedOn===s&&(n.blockedOn=null,Uu||(Uu=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Hu)))}var mc=null;function c1(n){mc!==n&&(mc=n,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){mc===n&&(mc=null);for(var s=0;s<n.length;s+=3){var l=n[s],h=n[s+1],v=n[s+2];if(typeof h!="function"){if(r1(h||l)===null)continue;break}var M=Tt(l);M!==null&&(n.splice(s,3),s-=3,dp(M,{pending:!0,data:v,method:l.method,action:h},h,v))}}))}function Or(n){function s(Oe){return ag(Oe,n)}_r!==null&&ag(_r,n),vo!==null&&ag(vo,n),bo!==null&&ag(bo,n),jh.forEach(s),Lh.forEach(s);for(var l=0;l<hl.length;l++){var h=hl[l];h.blockedOn===n&&(h.blockedOn=null)}for(;0<hl.length&&(l=hl[0],l.blockedOn===null);)l1(l),l.blockedOn===null&&hl.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(h=0;h<l.length;h+=3){var v=l[h],M=l[h+1],he=v[yt]||null;if(typeof M=="function")he||c1(l);else if(he){var xe=null;if(M&&M.hasAttribute("formAction")){if(v=M,he=M[yt]||null)xe=he.formAction;else if(r1(v)!==null)continue}else xe=he.action;typeof xe=="function"?l[h+1]=xe:(l.splice(h,3),h-=3),c1(l)}}}function u1(n){this._internalRoot=n}sg.prototype.render=u1.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(c(409));var l=s.current,h=Wa();n1(l,h,n,s,null,null)},sg.prototype.unmount=u1.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;n1(n.current,2,null,n,null,null),lc(),s[wt]=null}};function sg(n){this._internalRoot=n}sg.prototype.unstable_scheduleHydration=function(n){if(n){var s=ft();n={blockedOn:null,target:n,priority:s};for(var l=0;l<hl.length&&s!==0&&s<hl[l].priority;l++);hl.splice(l,0,n),l===0&&l1(n)}};var d1=i.version;if(d1!=="19.1.0")throw Error(c(527,d1,"19.1.0"));E.findDOMNode=function(n){var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(c(188)):(n=Object.keys(n).join(","),Error(c(268,n)));return n=b(s),n=n!==null?k(n):null,n=n===null?null:n.stateNode,n};var Sa={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zh.isDisabled&&zh.supportsFiber)try{be=zh.inject(Sa),ke=zh}catch{}}return rm.createRoot=function(n,s){if(!d(n))throw Error(c(299));var l=!1,h="",v=fu,M=l0,he=oh,xe=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(M=s.onCaughtError),s.onRecoverableError!==void 0&&(he=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(xe=s.unstable_transitionCallbacks)),s=e1(n,1,!1,null,null,l,h,v,M,he,xe,null),n[wt]=s.current,Y0(n),new u1(s)},rm.hydrateRoot=function(n,s,l){if(!d(n))throw Error(c(299));var h=!1,v="",M=fu,he=l0,xe=oh,Oe=null,Fe=null;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onUncaughtError!==void 0&&(M=l.onUncaughtError),l.onCaughtError!==void 0&&(he=l.onCaughtError),l.onRecoverableError!==void 0&&(xe=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(Oe=l.unstable_transitionCallbacks),l.formState!==void 0&&(Fe=l.formState)),s=e1(n,1,!0,s,l??null,h,v,M,he,xe,Oe,Fe),s.context=t1(null),l=s.current,h=Wa(),h=lt(h),v=Oa(h),v.callback=null,hr(l,v,h),l=h,s.current.lanes=l,_t(s,l),za(s),n[wt]=s.current,Y0(n),new sg(s)},rm.version="19.1.0",rm}var om={};/**
524
+ * @license React
525
+ * react-dom-client.development.js
526
+ *
527
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
528
+ *
529
+ * This source code is licensed under the MIT license found in the
530
+ * LICENSE file in the root directory of this source tree.
531
+ */var TC;function EA(){return TC||(TC=1,process.env.NODE_ENV!=="production"&&function(){function r(e,t){for(e=e.memoizedState;e!==null&&0<t;)e=e.next,t--;return e}function i(e,t,a,u){if(a>=t.length)return u;var f=t[a],m=sn(e)?e.slice():pn({},e);return m[f]=i(e[f],t,a+1,u),m}function o(e,t,a){if(t.length!==a.length)console.warn("copyWithRename() expects paths of the same length");else{for(var u=0;u<a.length-1;u++)if(t[u]!==a[u]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return c(e,t,a,0)}}function c(e,t,a,u){var f=t[u],m=sn(e)?e.slice():pn({},e);return u+1===t.length?(m[a[u]]=m[f],sn(m)?m.splice(f,1):delete m[f]):m[f]=c(e[f],t,a,u+1),m}function d(e,t,a){var u=t[a],f=sn(e)?e.slice():pn({},e);return a+1===t.length?(sn(f)?f.splice(u,1):delete f[u],f):(f[u]=d(e[u],t,a+1),f)}function p(){return!1}function y(){return null}function x(){}function b(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function k(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function O(){}function N(e){var t=[];return e.forEach(function(a){t.push(a)}),t.sort().join(", ")}function Z(e,t,a,u){return new Dd(e,t,a,u)}function J(e,t){e.context===Pu&&(In(e.current,2,t,e,null,null),nc())}function D(e,t){if(jr!==null){var a=t.staleFamilies;t=t.updatedFamilies,pu(),Od(e.current,t,a),nc()}}function F(e){jr=e}function ae(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ee(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function B(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Y(e){if(ee(e)!==e)throw Error("Unable to find node on an unmounted component.")}function $(e){var t=e.alternate;if(!t){if(t=ee(e),t===null)throw Error("Unable to find node on an unmounted component.");return t!==e?null:e}for(var a=e,u=t;;){var f=a.return;if(f===null)break;var m=f.alternate;if(m===null){if(u=f.return,u!==null){a=u;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===a)return Y(f),e;if(m===u)return Y(f),t;m=m.sibling}throw Error("Unable to find node on an unmounted component.")}if(a.return!==u.return)a=f,u=m;else{for(var I=!1,oe=f.child;oe;){if(oe===a){I=!0,a=f,u=m;break}if(oe===u){I=!0,u=f,a=m;break}oe=oe.sibling}if(!I){for(oe=m.child;oe;){if(oe===a){I=!0,a=m,u=f;break}if(oe===u){I=!0,u=m,a=f;break}oe=oe.sibling}if(!I)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(a.alternate!==u)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(a.tag!==3)throw Error("Unable to find node on an unmounted component.");return a.stateNode.current===a?e:t}function Q(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Q(e),t!==null)return t;e=e.sibling}return null}function z(e){return e===null||typeof e!="object"?null:(e=F0&&e[F0]||e["@@iterator"],typeof e=="function"?e:null)}function V(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Gp?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case cn:return"Fragment";case Eu:return"Profiler";case Au:return"StrictMode";case _u:return"Suspense";case rl:return"SuspenseList";case X0:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case hc:return"Portal";case Ss:return(e.displayName||"Context")+".Provider";case qp:return(e._context.displayName||"Context")+".Consumer";case fo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Th:return t=e.displayName||null,t!==null?t:V(e.type)||"Memo";case es:t=e._payload,e=e._init;try{return V(e(t))}catch{}}return null}function le(e){return typeof e.tag=="number"?se(e):typeof e.name=="string"?e.name:null}function se(e){var t=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(t._context.displayName||"Context")+".Consumer";case 10:return(t.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return V(t);case 8:return t===Au?"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 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;break;case 29:if(t=e._debugInfo,t!=null){for(var a=t.length-1;0<=a;a--)if(typeof t[a].name=="string")return t[a].name}if(e.return!==null)return se(e.return)}return null}function K(e){return{current:e}}function L(e,t){0>ws?console.error("Unexpected pop."):(t!==Mh[ws]&&console.error("Unexpected Fiber popped."),e.current=kh[ws],kh[ws]=null,Mh[ws]=null,ws--)}function X(e,t,a){ws++,kh[ws]=e.current,Mh[ws]=a,e.current=t}function H(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function A(e,t){X(Ar,t,e),X(Ou,e,e),X(po,null,e);var a=t.nodeType;switch(a){case 9:case 11:a=a===9?"#document":"#fragment",t=(t=t.documentElement)&&(t=t.namespaceURI)?Vn(t):Mc;break;default:if(a=t.tagName,t=t.namespaceURI)t=Vn(t),t=Ra(t,a);else switch(a){case"svg":t=Lg;break;case"math":t=Db;break;default:t=Mc}}a=a.toLowerCase(),a=lm(null,a),a={context:t,ancestorInfo:a},L(po,e),X(po,a,e)}function S(e){L(po,e),L(Ou,e),L(Ar,e)}function T(){return H(po.current)}function E(e){e.memoizedState!==null&&X(Du,e,e);var t=H(po.current),a=e.type,u=Ra(t.context,a);a=lm(t.ancestorInfo,a),u={context:u,ancestorInfo:a},t!==u&&(X(Ou,e,e),X(po,u,e))}function P(e){Ou.current===e&&(L(po,e),L(Ou,e)),Du.current===e&&(L(Du,e),I1._currentValue=ef)}function te(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function _(e){try{return re(e),!1}catch{return!0}}function re(e){return""+e}function me(e,t){if(_(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",t,te(e)),re(e)}function g(e,t){if(_(e))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",t,te(e)),re(e)}function w(e){if(_(e))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",te(e)),re(e)}function C(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{ll=t.inject(e),ea=t}catch(a){console.error("React instrumentation encountered an error: %s.",a)}return!!t.checkDCE}function q(e){if(typeof qx=="function"&&qs(e),ea&&typeof ea.setStrictMode=="function")try{ea.setStrictMode(ll,e)}catch(t){Ba||(Ba=!0,console.error("React instrumentation encountered an error: %s",t))}}function ce(e){Mt=e}function j(){Mt!==null&&typeof Mt.markCommitStopped=="function"&&Mt.markCommitStopped()}function U(e){Mt!==null&&typeof Mt.markComponentRenderStarted=="function"&&Mt.markComponentRenderStarted(e)}function ne(){Mt!==null&&typeof Mt.markComponentRenderStopped=="function"&&Mt.markComponentRenderStopped()}function ge(e){Mt!==null&&typeof Mt.markRenderStarted=="function"&&Mt.markRenderStarted(e)}function R(){Mt!==null&&typeof Mt.markRenderStopped=="function"&&Mt.markRenderStopped()}function G(e,t){Mt!==null&&typeof Mt.markStateUpdateScheduled=="function"&&Mt.markStateUpdateScheduled(e,t)}function ie(e){return e>>>=0,e===0?32:31-(Fp(e)/mo|0)|0}function ue(e){if(e&1)return"SyncHydrationLane";if(e&2)return"Sync";if(e&4)return"InputContinuousHydration";if(e&8)return"InputContinuous";if(e&16)return"DefaultHydration";if(e&32)return"Default";if(e&128)return"TransitionHydration";if(e&4194048)return"Transition";if(e&62914560)return"Retry";if(e&67108864)return"SelectiveHydration";if(e&134217728)return"IdleHydration";if(e&268435456)return"Idle";if(e&536870912)return"Offscreen";if(e&1073741824)return"Deferred"}function de(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 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 e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),e}}function ye(e,t,a){var u=e.pendingLanes;if(u===0)return 0;var f=0,m=e.suspendedLanes,I=e.pingedLanes;e=e.warmLanes;var oe=u&134217727;return oe!==0?(u=oe&~m,u!==0?f=de(u):(I&=oe,I!==0?f=de(I):a||(a=oe&~e,a!==0&&(f=de(a))))):(oe=u&~m,oe!==0?f=de(oe):I!==0?f=de(I):a||(a=u&~e,a!==0&&(f=de(a)))),f===0?0:t!==0&&t!==f&&(t&m)===0&&(m=f&-f,a=t&-t,m>=a||m===32&&(a&4194048)!==0)?t:f}function Se(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ce(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function Ae(){var e=Zp;return Zp<<=1,(Zp&4194048)===0&&(Zp=256),e}function Ne(){var e=Qp;return Qp<<=1,(Qp&62914560)===0&&(Qp=4194304),e}function Re(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function fe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pe(e,t,a,u,f,m){var I=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var oe=e.entanglements,we=e.expirationTimes,Te=e.hiddenUpdates;for(a=I&~a;0<a;){var Je=31-ca(a),tt=1<<Je;oe[Je]=0,we[Je]=-1;var Ze=Te[Je];if(Ze!==null)for(Te[Je]=null,Je=0;Je<Ze.length;Je++){var it=Ze[Je];it!==null&&(it.lane&=-536870913)}a&=~tt}u!==0&&ve(e,u,0),m!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=m&~(I&~t))}function ve(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var u=31-ca(t);e.entangledLanes|=t,e.entanglements[u]=e.entanglements[u]|1073741824|a&4194090}function be(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var u=31-ca(a),f=1<<u;f&t|e[u]&t&&(e[u]|=t),a&=~f}}function ke(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ee(e,t,a){if(Ti)for(e=e.pendingUpdatersLaneMap;0<a;){var u=31-ca(a),f=1<<u;e[u].add(t),a&=~f}}function _e(e,t){if(Ti)for(var a=e.pendingUpdatersLaneMap,u=e.memoizedUpdaters;0<t;){var f=31-ca(t);e=1<<f,f=a[f],0<f.size&&(f.forEach(function(m){var I=m.alternate;I!==null&&u.has(I)||u.add(m)}),f.clear()),t&=~e}}function Le(e){return e&=-e,ta<e?Gs<e?(e&134217727)!==0?yo:Jp:Gs:ta}function Be(){var e=Wt.p;return e!==0?e:(e=window.event,e===void 0?yo:$p(e.type))}function $e(e,t){var a=Wt.p;try{return Wt.p=e,t()}finally{Wt.p=a}}function Me(e){delete e[ua],delete e[Ua],delete e[Z0],delete e[Yv],delete e[Lu]}function ze(e){var t=e[ua];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ul]||a[ua]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Cu(e);e!==null;){if(a=e[ua])return a;e=Cu(e)}return t}e=a,a=e.parentNode}return null}function Xe(e){if(e=e[ua]||e[ul]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Ve(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function Ie(e){var t=e[Ru];return t||(t=e[Ru]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ge(e){e[Nu]=!0}function pt(e,t){mt(e,t),mt(e+"Capture",t)}function mt(e,t){Cs[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),Cs[e]=t;var a=e.toLowerCase();for(fc[a]=e,e==="onDoubleClick"&&(fc.ondblclick=e),e=0;e<t.length;e++)Xv.add(t[e])}function ct(e,t){Fv[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||console.error(e==="select"?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||t.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function _t(e){return go.call(eg,e)?!0:go.call(Kp,e)?!1:Wp.test(e)?eg[e]=!0:(Kp[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function Rt(e,t,a){if(_t(t)){if(!e.hasAttribute(t)){switch(typeof a){case"symbol":case"object":return a;case"function":return a;case"boolean":if(a===!1)return a}return a===void 0?void 0:null}return e=e.getAttribute(t),e===""&&a===!0?!0:(me(a,t),e===""+a?a:e)}}function Vt(e,t,a){if(_t(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var u=t.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(t);return}}me(a,t),e.setAttribute(t,""+a)}}function xt(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}me(a,t),e.setAttribute(t,""+a)}}function lt(e,t,a,u){if(u===null)e.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}me(u,a),e.setAttributeNS(t,a,""+u)}}function ht(){}function ft(){if(dl===0){Q0=console.log,J0=console.info,Zv=console.warn,W0=console.error,zu=console.group,Qv=console.groupCollapsed,Jv=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ht,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}dl++}function Ct(){if(dl--,dl===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:pn({},e,{value:Q0}),info:pn({},e,{value:J0}),warn:pn({},e,{value:Zv}),error:pn({},e,{value:W0}),group:pn({},e,{value:zu}),groupCollapsed:pn({},e,{value:Qv}),groupEnd:pn({},e,{value:Jv})})}0>dl&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function ut(e){if(K0===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);K0=t&&t[1]||"",_h=-1<a.stack.indexOf(`
532
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
533
+ `+K0+e+_h}function bt(e,t){if(!e||Bu)return"";var a=Oh.get(e);if(a!==void 0)return a;Bu=!0,a=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var u=null;u=Ke.H,Ke.H=null,ft();try{var f={DetermineComponentFrameRoot:function(){try{if(t){var Ze=function(){throw Error()};if(Object.defineProperty(Ze.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ze,[])}catch(zt){var it=zt}Reflect.construct(e,[],Ze)}else{try{Ze.call()}catch(zt){it=zt}e.call(Ze.prototype)}}else{try{throw Error()}catch(zt){it=zt}(Ze=e())&&typeof Ze.catch=="function"&&Ze.catch(function(){})}}catch(zt){if(zt&&it&&typeof zt.stack=="string")return[zt.stack,it.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var I=f.DetermineComponentFrameRoot(),oe=I[0],we=I[1];if(oe&&we){var Te=oe.split(`
534
+ `),Je=we.split(`
535
+ `);for(I=m=0;m<Te.length&&!Te[m].includes("DetermineComponentFrameRoot");)m++;for(;I<Je.length&&!Je[I].includes("DetermineComponentFrameRoot");)I++;if(m===Te.length||I===Je.length)for(m=Te.length-1,I=Je.length-1;1<=m&&0<=I&&Te[m]!==Je[I];)I--;for(;1<=m&&0<=I;m--,I--)if(Te[m]!==Je[I]){if(m!==1||I!==1)do if(m--,I--,0>I||Te[m]!==Je[I]){var tt=`
536
+ `+Te[m].replace(" at new "," at ");return e.displayName&&tt.includes("<anonymous>")&&(tt=tt.replace("<anonymous>",e.displayName)),typeof e=="function"&&Oh.set(e,tt),tt}while(1<=m&&0<=I);break}}}finally{Bu=!1,Ke.H=u,Ct(),Error.prepareStackTrace=a}return Te=(Te=e?e.displayName||e.name:"")?ut(Te):"",typeof e=="function"&&Oh.set(e,Te),Te}function yt(e){var t=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=t,e.startsWith(`Error: react-stack-top-frame
537
+ `)&&(e=e.slice(29)),t=e.indexOf(`
538
+ `),t!==-1&&(e=e.slice(t+1)),t=e.indexOf("react-stack-bottom-frame"),t!==-1&&(t=e.lastIndexOf(`
539
+ `,t)),t!==-1)e=e.slice(0,t);else return"";return e}function wt(e){switch(e.tag){case 26:case 27:case 5:return ut(e.type);case 16:return ut("Lazy");case 13:return ut("Suspense");case 19:return ut("SuspenseList");case 0:case 15:return bt(e.type,!1);case 11:return bt(e.type.render,!1);case 1:return bt(e.type,!0);case 31:return ut("Activity");default:return""}}function Ot(e){try{var t="";do{t+=wt(e);var a=e._debugInfo;if(a)for(var u=a.length-1;0<=u;u--){var f=a[u];if(typeof f.name=="string"){var m=t,I=f.env,oe=ut(f.name+(I?" ["+I+"]":""));t=m+oe}}e=e.return}while(e);return t}catch(we){return`
540
+ Error generating stack: `+we.message+`
541
+ `+we.stack}}function Ht(e){return(e=e?e.displayName||e.name:"")?ut(e):""}function Dt(){if(ts===null)return null;var e=ts._debugOwner;return e!=null?le(e):null}function vt(){if(ts===null)return"";var e=ts;try{var t="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:t+=ut(e.type);break;case 13:t+=ut("Suspense");break;case 19:t+=ut("SuspenseList");break;case 31:t+=ut("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||t!==""||(t+=Ht(e.type));break;case 11:e._debugOwner||t!==""||(t+=Ht(e.type.render))}for(;e;)if(typeof e.tag=="number"){var a=e;e=a._debugOwner;var u=a._debugStack;e&&u&&(typeof u!="string"&&(a._debugStack=u=yt(u)),u!==""&&(t+=`
542
+ `+u))}else if(e.debugStack!=null){var f=e.debugStack;(e=e.owner)&&f&&(t+=`
543
+ `+yt(f))}else break;var m=t}catch(I){m=`
544
+ Error generating stack: `+I.message+`
545
+ `+I.stack}return m}function nt(e,t,a,u,f,m,I){var oe=ts;Ut(e);try{return e!==null&&e._debugTask?e._debugTask.run(t.bind(null,a,u,f,m,I)):t(a,u,f,m,I)}finally{Ut(oe)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function Ut(e){Ke.getCurrentStack=e===null?null:vt,Ha=!1,ts=e}function kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return w(e),e;default:return""}}function Tt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jt(e){var t=Tt(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);w(e[t]);var u=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var f=a.get,m=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(I){w(I),u=""+I,m.call(this,I)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return u},setValue:function(I){w(I),u=""+I},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nn(e){e._valueTracker||(e._valueTracker=jt(e))}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),u="";return e&&(u=Tt(e)?e.checked?"true":"false":e.value),e=u,e!==a?(t.setValue(e),!0):!1}function Yt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function At(e){return e.replace(Gx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Lt(e,t){t.checked===void 0||t.defaultChecked===void 0||t1||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Dt()||"A component",t.type),t1=!0),t.value===void 0||t.defaultValue===void 0||e1||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Dt()||"A component",t.type),e1=!0)}function en(e,t,a,u,f,m,I,oe){e.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?(me(I,"type"),e.type=I):e.removeAttribute("type"),t!=null?I==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kt(t)):e.value!==""+kt(t)&&(e.value=""+kt(t)):I!=="submit"&&I!=="reset"||e.removeAttribute("value"),t!=null?an(e,I,kt(t)):a!=null?an(e,I,kt(a)):u!=null&&e.removeAttribute("value"),f==null&&m!=null&&(e.defaultChecked=!!m),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),oe!=null&&typeof oe!="function"&&typeof oe!="symbol"&&typeof oe!="boolean"?(me(oe,"name"),e.name=""+kt(oe)):e.removeAttribute("name")}function Jt(e,t,a,u,f,m,I,oe){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(me(m,"type"),e.type=m),t!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||t!=null))return;a=a!=null?""+kt(a):"",t=t!=null?""+kt(t):a,oe||t===e.value||(e.value=t),e.defaultValue=t}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=oe?e.checked:!!u,e.defaultChecked=!!u,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(me(I,"name"),e.name=I)}function an(e,t,a){t==="number"&&Yt(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ai(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?wh.Children.forEach(t.children,function(a){a==null||typeof a=="string"||typeof a=="number"||typeof a=="bigint"||i1||(i1=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):t.dangerouslySetInnerHTML==null||tg||(tg=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),t.selected==null||n1||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),n1=!0)}function jn(){var e=Dt();return e?`
546
+
547
+ Check the render method of \``+e+"`.":""}function Xt(e,t,a,u){if(e=e.options,t){t={};for(var f=0;f<a.length;f++)t["$"+a[f]]=!0;for(a=0;a<e.length;a++)f=t.hasOwnProperty("$"+e[a].value),e[a].selected!==f&&(e[a].selected=f),f&&u&&(e[a].defaultSelected=!0)}else{for(a=""+kt(a),t=null,f=0;f<e.length;f++){if(e[f].value===a){e[f].selected=!0,u&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function Qt(e,t){for(e=0;e<Dh.length;e++){var a=Dh[e];if(t[a]!=null){var u=sn(t[a]);t.multiple&&!u?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",a,jn()):!t.multiple&&u&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",a,jn())}}t.value===void 0||t.defaultValue===void 0||a1||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),a1=!0)}function hn(e,t){t.value===void 0||t.defaultValue===void 0||Wv||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",Dt()||"A component"),Wv=!0),t.children!=null&&t.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function gi(e,t,a){if(t!=null&&(t=""+kt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+kt(a):""}function ga(e,t,a,u){if(t==null){if(u!=null){if(a!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(sn(u)){if(1<u.length)throw Error("<textarea> can only have at most one child.");u=u[0]}a=u}a==null&&(a=""),t=a}a=kt(t),e.defaultValue=a,u=e.textContent,u===a&&u!==""&&u!==null&&(e.value=u)}function ma(e,t){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-t?ma(e.children[0],t):e}function ci(e){return" "+" ".repeat(e)}function Xi(e){return"+ "+" ".repeat(e)}function ui(e){return"- "+" ".repeat(e)}function Ui(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function mi(e,t){return Kv.test(e)?(e=JSON.stringify(e),e.length>t-2?8>t?'{"..."}':"{"+e.slice(0,t-7)+'..."}':"{"+e+"}"):e.length>t?5>t?'{"..."}':e.slice(0,t-3)+"...":e}function Xr(e,t,a){var u=120-2*a;if(t===null)return Xi(a)+mi(e,u)+`
548
+ `;if(typeof t=="string"){for(var f=0;f<t.length&&f<e.length&&t.charCodeAt(f)===e.charCodeAt(f);f++);return f>u-8&&10<f&&(e="..."+e.slice(f-8),t="..."+t.slice(f-8)),Xi(a)+mi(e,u)+`
549
+ `+ui(a)+mi(t,u)+`
550
+ `}return ci(a)+mi(e,u)+`
551
+ `}function wd(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(t,a){return a})}function jo(e,t){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>t?5>t?'"..."':e.slice(0,t-4)+'..."':e;case"object":if(e===null)return"null";if(sn(e))return"[...]";if(e.$$typeof===sl)return(t=V(e.type))?"<"+t+">":"<...>";var a=wd(e);if(a==="Object"){a="",t-=2;for(var u in e)if(e.hasOwnProperty(u)){var f=JSON.stringify(u);if(f!=='"'+u+'"'&&(u=f),t-=u.length-2,f=jo(e[u],15>t?t:15),t-=f.length,0>t){a+=a===""?"...":", ...";break}a+=(a===""?"":",")+u+":"+f}return"{"+a+"}"}return a;case"function":return(t=e.displayName||e.name)?"function "+t:"function";default:return String(e)}}function Al(e,t){return typeof e!="string"||Kv.test(e)?"{"+jo(e,t-2)+"}":e.length>t-2?5>t?'"..."':'"'+e.slice(0,t-5)+'..."':'"'+e+'"'}function Vc(e,t,a){var u=120-a.length-e.length,f=[],m;for(m in t)if(t.hasOwnProperty(m)&&m!=="children"){var I=Al(t[m],120-a.length-m.length-1);u-=m.length+I.length+2,f.push(m+"="+I)}return f.length===0?a+"<"+e+`>
552
+ `:0<u?a+"<"+e+" "+f.join(" ")+`>
553
+ `:a+"<"+e+`
554
+ `+a+" "+f.join(`
555
+ `+a+" ")+`
556
+ `+a+`>
557
+ `}function Ax(e,t,a){var u="",f=pn({},t),m;for(m in e)if(e.hasOwnProperty(m)){delete f[m];var I=120-2*a-m.length-2,oe=jo(e[m],I);t.hasOwnProperty(m)?(I=jo(t[m],I),u+=Xi(a)+m+": "+oe+`
558
+ `,u+=ui(a)+m+": "+I+`
559
+ `):u+=Xi(a)+m+": "+oe+`
560
+ `}for(var we in f)f.hasOwnProperty(we)&&(e=jo(f[we],120-2*a-we.length-2),u+=ui(a)+we+": "+e+`
561
+ `);return u}function ls(e,t,a,u){var f="",m=new Map;for(Te in a)a.hasOwnProperty(Te)&&m.set(Te.toLowerCase(),Te);if(m.size===1&&m.has("children"))f+=Vc(e,t,ci(u));else{for(var I in t)if(t.hasOwnProperty(I)&&I!=="children"){var oe=120-2*(u+1)-I.length-1,we=m.get(I.toLowerCase());if(we!==void 0){m.delete(I.toLowerCase());var Te=t[I];we=a[we];var Je=Al(Te,oe);oe=Al(we,oe),typeof Te=="object"&&Te!==null&&typeof we=="object"&&we!==null&&wd(Te)==="Object"&&wd(we)==="Object"&&(2<Object.keys(Te).length||2<Object.keys(we).length||-1<Je.indexOf("...")||-1<oe.indexOf("..."))?f+=ci(u+1)+I+`={{
562
+ `+Ax(Te,we,u+2)+ci(u+1)+`}}
563
+ `:(f+=Xi(u+1)+I+"="+Je+`
564
+ `,f+=ui(u+1)+I+"="+oe+`
565
+ `)}else f+=ci(u+1)+I+"="+Al(t[I],oe)+`
566
+ `}m.forEach(function(tt){if(tt!=="children"){var Ze=120-2*(u+1)-tt.length-1;f+=ui(u+1)+tt+"="+Al(a[tt],Ze)+`
567
+ `}}),f=f===""?ci(u)+"<"+e+`>
568
+ `:ci(u)+"<"+e+`
569
+ `+f+ci(u)+`>
570
+ `}return e=a.children,t=t.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(m="",(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(m=""+t),f+=Xr(m,""+e,u+1)):(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(f=e==null?f+Xr(""+t,null,u+1):f+Xr(""+t,void 0,u+1)),f}function vf(e,t){var a=Ui(e);if(a===null){for(a="",e=e.child;e;)a+=vf(e,t),e=e.sibling;return a}return ci(t)+"<"+a+`>
571
+ `}function bf(e,t){var a=ma(e,t);if(a!==e&&(e.children.length!==1||e.children[0]!==a))return ci(t)+`...
572
+ `+bf(a,t+1);a="";var u=e.fiber._debugInfo;if(u)for(var f=0;f<u.length;f++){var m=u[f].name;typeof m=="string"&&(a+=ci(t)+"<"+m+`>
573
+ `,t++)}if(u="",f=e.fiber.pendingProps,e.fiber.tag===6)u=Xr(f,e.serverProps,t),t++;else if(m=Ui(e.fiber),m!==null)if(e.serverProps===void 0){u=t;var I=120-2*u-m.length-2,oe="";for(Te in f)if(f.hasOwnProperty(Te)&&Te!=="children"){var we=Al(f[Te],15);if(I-=Te.length+we.length+2,0>I){oe+=" ...";break}oe+=" "+Te+"="+we}u=ci(u)+"<"+m+oe+`>
574
+ `,t++}else e.serverProps===null?(u=Vc(m,f,Xi(t)),t++):typeof e.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(u=ls(m,f,e.serverProps,t),t++);var Te="";for(f=e.fiber.child,m=0;f&&m<e.children.length;)I=e.children[m],I.fiber===f?(Te+=bf(I,t),m++):Te+=vf(f,t),f=f.sibling;for(f&&0<e.children.length&&(Te+=ci(t)+`...
575
+ `),f=e.serverTail,e.serverProps===null&&t--,e=0;e<f.length;e++)m=f[e],Te=typeof m=="string"?Te+(ui(t)+mi(m,120-2*t)+`
576
+ `):Te+Vc(m.type,m.props,ui(t));return a+u+Te}function Cd(e){try{return`
577
+
578
+ `+bf(e,0)}catch{return""}}function El(e,t,a){for(var u=t,f=null,m=0;u;)u===e&&(m=0),f={fiber:u,children:f!==null?[f]:[],serverProps:u===t?a:u===e?null:void 0,serverTail:[],distanceFromLeaf:m},m++,u=u.return;return f!==null?Cd(f).replaceAll(/^[+-]/gm,">"):""}function lm(e,t){var a=pn({},e||o1),u={tag:t};return ng.indexOf(t)!==-1&&(a.aTagInScope=null,a.buttonTagInScope=null,a.nobrTagInScope=null),ig.indexOf(t)!==-1&&(a.pTagInButtonScope=null),s1.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(a.listItemTagAutoclosing=null,a.dlItemTagAutoclosing=null),a.current=u,t==="form"&&(a.formTag=u),t==="a"&&(a.aTagInScope=u),t==="button"&&(a.buttonTagInScope=u),t==="nobr"&&(a.nobrTagInScope=u),t==="p"&&(a.pTagInButtonScope=u),t==="li"&&(a.listItemTagAutoclosing=u),(t==="dd"||t==="dt")&&(a.dlItemTagAutoclosing=u),t==="#document"||t==="html"?a.containerTagInScope=null:a.containerTagInScope||(a.containerTagInScope=u),e!==null||t!=="#document"&&t!=="html"&&t!=="body"?a.implicitRootScope===!0&&(a.implicitRootScope=!1):a.implicitRootScope=!0,a}function cm(e,t,a){switch(t){case"select":return e==="hr"||e==="option"||e==="optgroup"||e==="script"||e==="template"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":if(a)break;return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":if(!a)return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6";case"rp":case"rt":return r1.indexOf(t)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return t==null;case"head":return a||t===null;case"html":return a&&t==="#document"||t===null;case"body":return a&&(t==="#document"||t==="html")||t===null}return!0}function $c(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null}function Wy(e,t){for(;e;){switch(e.tag){case 5:case 26:case 27:if(e.type===t)return e}e=e.return}return null}function xf(e,t){t=t||o1;var a=t.current;if(t=(a=cm(e,a&&a.tag,t.implicitRootScope)?null:a)?null:$c(e,t),t=a||t,!t)return!0;var u=t.tag;if(t=String(!!a)+"|"+e+"|"+u,Uu[t])return!1;Uu[t]=!0;var f=(t=ts)?Wy(t.return,u):null,m=t!==null&&f!==null?El(f,t,null):"",I="<"+e+">";return a?(a="",u==="table"&&e==="tr"&&(a+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
579
+ This will cause a hydration error.%s`,I,u,a,m)):console.error(`In HTML, %s cannot be a descendant of <%s>.
580
+ This will cause a hydration error.%s`,I,u,m),t&&(e=t.return,f===null||e===null||f===e&&e._debugOwner===t._debugOwner||nt(f,function(){console.error(`<%s> cannot contain a nested %s.
581
+ See this log for the ancestor stack trace.`,u,I)})),!1}function Td(e,t,a){if(a||cm("#text",t,!1))return!0;if(a="#text|"+t,Uu[a])return!1;Uu[a]=!0;var u=(a=ts)?Wy(a,t):null;return a=a!==null&&u!==null?El(u,a,a.tag!==6?{children:null}:null):"",/\S/.test(e)?console.error(`In HTML, text nodes cannot be a child of <%s>.
582
+ This will cause a hydration error.%s`,t,a):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
583
+ This will cause a hydration error.%s`,t,a),!1}function _l(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}function Ex(e){return e.replace(hl,function(t,a){return a.toUpperCase()})}function Ky(e,t,a){var u=t.indexOf("--")===0;u||(-1<t.indexOf("-")?pc.hasOwnProperty(t)&&pc[t]||(pc[t]=!0,console.error("Unsupported style property %s. Did you mean %s?",t,Ex(t.replace(Lh,"ms-")))):jh.test(t)?pc.hasOwnProperty(t)&&pc[t]||(pc[t]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",t,t.charAt(0).toUpperCase()+t.slice(1))):!eb.test(a)||gc.hasOwnProperty(a)&&gc[a]||(gc[a]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,t,a.replace(eb,""))),typeof a=="number"&&(isNaN(a)?tb||(tb=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",t)):isFinite(a)||l1||(l1=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",t)))),a==null||typeof a=="boolean"||a===""?u?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":u?e.setProperty(t,a):typeof a!="number"||a===0||Rh.has(t)?t==="float"?e.cssFloat=a:(g(a,t),e[t]=(""+a).trim()):e[t]=a+"px"}function kd(e,t,a){if(t!=null&&typeof t!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(t&&Object.freeze(t),e=e.style,a!=null){if(t){var u={};if(a){for(var f in a)if(a.hasOwnProperty(f)&&!t.hasOwnProperty(f))for(var m=_r[f]||[f],I=0;I<m.length;I++)u[m[I]]=f}for(var oe in t)if(t.hasOwnProperty(oe)&&(!a||a[oe]!==t[oe]))for(f=_r[oe]||[oe],m=0;m<f.length;m++)u[f[m]]=oe;oe={};for(var we in t)for(f=_r[we]||[we],m=0;m<f.length;m++)oe[f[m]]=we;we={};for(var Te in u)if(f=u[Te],(m=oe[Te])&&f!==m&&(I=f+","+m,!we[I])){we[I]=!0,I=console;var Je=t[f];I.error.call(I,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",Je==null||typeof Je=="boolean"||Je===""?"Removing":"Updating",f,m)}}for(var tt in a)!a.hasOwnProperty(tt)||t!=null&&t.hasOwnProperty(tt)||(tt.indexOf("--")===0?e.setProperty(tt,""):tt==="float"?e.cssFloat="":e[tt]="");for(var Ze in t)Te=t[Ze],t.hasOwnProperty(Ze)&&a[Ze]!==Te&&Ky(e,Ze,Te)}else for(u in t)t.hasOwnProperty(u)&&Ky(e,u,t[u])}function Ol(e){if(e.indexOf("-")===-1)return!1;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}}function Sf(e){return ag.get(e)||e}function Ic(e,t){if(go.call(Or,t)&&Or[t])return!0;if(sg.test(t)){if(e="aria-"+t.slice(4).toLowerCase(),e=c1.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Or[t]=!0;if(t!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,e),Or[t]=!0}if(u1.test(t)){if(e=t.toLowerCase(),e=c1.hasOwnProperty(e)?e:null,e==null)return Or[t]=!0,!1;t!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,e),Or[t]=!0)}return!0}function qc(e,t){var a=[],u;for(u in t)Ic(e,u)||a.push(u);t=a.map(function(f){return"`"+f+"`"}).join(", "),a.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e):1<a.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e)}function ev(e,t,a,u){if(go.call(Sa,t)&&Sa[t])return!0;var f=t.toLowerCase();if(f==="onfocusin"||f==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Sa[t]=!0;if(typeof a=="function"&&(e==="form"&&t==="action"||e==="input"&&t==="formAction"||e==="button"&&t==="formAction"))return!0;if(u!=null){if(e=u.possibleRegistrationNames,u.registrationNameDependencies.hasOwnProperty(t))return!0;if(u=e.hasOwnProperty(f)?e[f]:null,u!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",t,u),Sa[t]=!0;if(zh.test(t))return console.error("Unknown event handler property `%s`. It will be ignored.",t),Sa[t]=!0}else if(zh.test(t))return n.test(t)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),Sa[t]=!0;if(s.test(t)||l.test(t))return!0;if(f==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Sa[t]=!0;if(f==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Sa[t]=!0;if(f==="is"&&a!==null&&a!==void 0&&typeof a!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof a),Sa[t]=!0;if(typeof a=="number"&&isNaN(a))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),Sa[t]=!0;if(mc.hasOwnProperty(f)){if(f=mc[f],f!==t)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",t,f),Sa[t]=!0}else if(t!==f)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,f),Sa[t]=!0;switch(t){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof a){case"boolean":switch(t){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return f=t.toLowerCase().slice(0,5),f==="data-"||f==="aria-"?!0:(a?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',a,t,t,a,t):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',a,t,t,a,t,t,t),Sa[t]=!0)}case"function":case"symbol":return Sa[t]=!0,!1;case"string":if(a==="false"||a==="true"){switch(t){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",a,t,a==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,a),Sa[t]=!0}}return!0}function um(e,t,a){var u=[],f;for(f in t)ev(e,f,t[f],a)||u.push(f);t=u.map(function(m){return"`"+m+"`"}).join(", "),u.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",t,e):1<u.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",t,e)}function Gc(e){return h.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Dl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function er(e){var t=Xe(e);if(t&&(e=t.stateNode)){var a=e[Ua]||null;e:switch(e=t.stateNode,t.type){case"input":if(en(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(me(t,"name"),a=a.querySelectorAll('input[name="'+At(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var u=a[t];if(u!==e&&u.form===e.form){var f=u[Ua]||null;if(!f)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");en(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<a.length;t++)u=a[t],u.form===e.form&&It(u)}break e;case"textarea":gi(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Xt(e,!!a.multiple,t,!1)}}}function wf(e,t,a){if(xe)return e(t,a);xe=!0;try{var u=e(t);return u}finally{if(xe=!1,(M!==null||he!==null)&&(nc(),M&&(t=M,e=he,he=M=null,er(t),e)))for(t=0;t<e.length;t++)er(e[t])}}function Fr(e,t){var a=e.stateNode;if(a===null)return null;var u=a[Ua]||null;if(u===null)return null;a=u[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":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof a+"` type.");return a}function Zr(){if(We)return We;var e,t=Qe,a=t.length,u,f="value"in ot?ot.value:ot.textContent,m=f.length;for(e=0;e<a&&t[e]===f[e];e++);var I=a-e;for(u=1;u<=I&&t[a-u]===f[m-u];u++);return We=f.slice(e,1<u?1-u:void 0)}function Yc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function jl(){return!0}function dm(){return!1}function Fi(e){function t(a,u,f,m,I){this._reactName=a,this._targetInst=f,this.type=u,this.nativeEvent=m,this.target=I,this.currentTarget=null;for(var oe in e)e.hasOwnProperty(oe)&&(a=e[oe],this[oe]=a?a(m):m[oe]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?jl:dm,this.isPropagationStopped=dm,this}return pn(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=jl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=jl)},persist:function(){},isPersistent:jl}),t}function Cf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=UA[e])?!!t[e]:!1}function Tf(){return Cf}function ya(e,t){switch(e){case"keyup":return QA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==_C;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}function kf(e,t){switch(e){case"compositionend":return Lo(t);case"keypress":return t.which!==DC?null:(LC=!0,jC);case"textInput":return e=t.data,e===jC&&LC?null:e;default:return null}}function Md(e,t){if(rg)return e==="compositionend"||!Xx&&ya(e,t)?(e=Zr(),We=Qe=ot=null,rg=!1,e):null;switch(e){case"paste":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 OC&&t.locale!=="ko"?null:t.data;default:return null}}function tv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!WA[e.type]:t==="textarea"}function hm(e){if(!Oe)return!1;e="on"+e;var t=e in document;return t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t=typeof t[e]=="function"),t}function Mf(e,t,a,u){M?he?he.push(u):he=[u]:M=u,t=fh(t,"onChange"),0<t.length&&(a=new Gt("onChange","change",null,a,u),e.push({event:a,listeners:t}))}function Ad(e){Sr(e,0)}function Ll(e){var t=Ve(e);if(It(t))return e}function fm(e,t){if(e==="change")return t}function nv(){f1&&(f1.detachEvent("onpropertychange",iv),p1=f1=null)}function iv(e){if(e.propertyName==="value"&&Ll(p1)){var t=[];Mf(t,p1,e,Dl(e)),wf(Ad,t)}}function _x(e,t,a){e==="focusin"?(nv(),f1=t,p1=a,f1.attachEvent("onpropertychange",iv)):e==="focusout"&&nv()}function pm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ll(p1)}function Ox(e,t){if(e==="click")return Ll(t)}function Dx(e,t){if(e==="input"||e==="change")return Ll(t)}function jx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}function Ed(e,t){if(ns(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),u=Object.keys(t);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var f=a[u];if(!go.call(t,f)||!ns(e[f],t[f]))return!1}return!0}function av(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gm(e,t){var a=av(e);e=0;for(var u;a;){if(a.nodeType===3){if(u=e+a.textContent.length,e<=t&&u>=t)return{node:a,offset:t-e};e=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=av(a)}}function sv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yt(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Yt(e.document)}return t}function mm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ov(e,t,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Zx||og==null||og!==Yt(u)||(u=og,"selectionStart"in u&&mm(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),g1&&Ed(g1,u)||(g1=u,u=fh(Fx,"onSelect"),0<u.length&&(t=new Gt("onSelect","select",null,t,a),e.push({event:t,listeners:u}),t.target=og)))}function Qr(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}function Rl(e){if(Qx[e])return Qx[e];if(!lg[e])return e;var t=lg[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in NC)return Qx[e]=t[a];return e}function Ds(e,t){PC.set(e,t),pt(t,[e])}function Xa(e,t){if(typeof e=="object"&&e!==null){var a=Wx.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Ot(t)},Wx.set(e,t),t)}return{value:e,source:t,stack:Ot(t)}}function _d(){for(var e=cg,t=Kx=cg=0;t<e;){var a=Dr[t];Dr[t++]=null;var u=Dr[t];Dr[t++]=null;var f=Dr[t];Dr[t++]=null;var m=Dr[t];if(Dr[t++]=null,u!==null&&f!==null){var I=u.pending;I===null?f.next=f:(f.next=I.next,I.next=f),u.pending=f}m!==0&&lv(a,f,m)}}function Af(e,t,a,u){Dr[cg++]=e,Dr[cg++]=t,Dr[cg++]=a,Dr[cg++]=u,Kx|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function ym(e,t,a,u){return Af(e,t,a,u),Ef(e)}function Ma(e,t){return Af(e,null,null,t),Ef(e)}function lv(e,t,a){e.lanes|=a;var u=e.alternate;u!==null&&(u.lanes|=a);for(var f=!1,m=e.return;m!==null;)m.childLanes|=a,u=m.alternate,u!==null&&(u.childLanes|=a),m.tag===22&&(e=m.stateNode,e===null||e._visibility&nb||(f=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,f&&t!==null&&(f=31-ca(a),e=m.hiddenUpdates,u=e[f],u===null?e[f]=[t]:u.push(t),t.lane=a|536870912),m):null}function Ef(e){if(B1>SE)throw Zh=B1=0,U1=_S=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Zh>wE&&(Zh=0,U1=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),e.alternate===null&&(e.flags&4098)!==0&&Is(e);for(var t=e,a=t.return;a!==null;)t.alternate===null&&(t.flags&4098)!==0&&Is(e),t=a,a=t.return;return t.tag===3?t.stateNode:null}function Nl(e){if(jr===null)return e;var t=jr(e);return t===void 0?e:t.current}function vm(e){if(jr===null)return e;var t=jr(e);return t===void 0?e!=null&&typeof e.render=="function"&&(t=Nl(e.render),e.render!==t)?(t={$$typeof:fo,render:t},e.displayName!==void 0&&(t.displayName=e.displayName),t):e:t.current}function cv(e,t){if(jr===null)return!1;var a=e.elementType;t=t.type;var u=!1,f=typeof t=="object"&&t!==null?t.$$typeof:null;switch(e.tag){case 1:typeof t=="function"&&(u=!0);break;case 0:(typeof t=="function"||f===es)&&(u=!0);break;case 11:(f===fo||f===es)&&(u=!0);break;case 14:case 15:(f===Th||f===es)&&(u=!0);break;default:return!1}return!!(u&&(e=jr(a),e!==void 0&&e===jr(t)))}function uv(e){jr!==null&&typeof WeakSet=="function"&&(ug===null&&(ug=new WeakSet),ug.add(e))}function Od(e,t,a){var u=e.alternate,f=e.child,m=e.sibling,I=e.tag,oe=e.type,we=null;switch(I){case 0:case 15:case 1:we=oe;break;case 11:we=oe.render}if(jr===null)throw Error("Expected resolveFamily to be set during hot reload.");var Te=!1;oe=!1,we!==null&&(we=jr(we),we!==void 0&&(a.has(we)?oe=!0:t.has(we)&&(I===1?oe=!0:Te=!0))),ug!==null&&(ug.has(e)||u!==null&&ug.has(u))&&(oe=!0),oe&&(e._debugNeedsRemount=!0),(oe||Te)&&(u=Ma(e,2),u!==null&&bi(u,e,2)),f===null||oe||Od(f,t,a),m!==null&&Od(m,t,a)}function Dd(e,t,a,u){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,$C||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function bm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tr(e,t){var a=e.alternate;switch(a===null?(a=Z(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a._debugOwner=e._debugOwner,a._debugStack=e._debugStack,a._debugTask=e._debugTask,a._debugHookTypes=e._debugHookTypes,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null,a.actualDuration=-0,a.actualStartTime=-1.1),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a.selfBaseDuration=e.selfBaseDuration,a.treeBaseDuration=e.treeBaseDuration,a._debugInfo=e._debugInfo,a._debugNeedsRemount=e._debugNeedsRemount,a.tag){case 0:case 15:a.type=Nl(e.type);break;case 1:a.type=Nl(e.type);break;case 11:a.type=vm(e.type)}return a}function xm(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},e.selfBaseDuration=a.selfBaseDuration,e.treeBaseDuration=a.treeBaseDuration),e}function _f(e,t,a,u,f,m){var I=0,oe=e;if(typeof e=="function")bm(e)&&(I=1),oe=Nl(oe);else if(typeof e=="string")I=T(),I=ku(e,a,I)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X0:return t=Z(31,a,t,f),t.elementType=X0,t.lanes=m,t;case cn:return Ro(a.children,f,m,t);case Au:I=8,f|=Pa,f|=xo;break;case Eu:return e=a,u=f,typeof e.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),t=Z(12,e,t,u|wa),t.elementType=Eu,t.lanes=m,t.stateNode={effectDuration:0,passiveEffectDuration:0},t;case _u:return t=Z(13,a,t,f),t.elementType=_u,t.lanes=m,t;case rl:return t=Z(19,a,t,f),t.elementType=rl,t.lanes=m,t;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y0:case Ss:I=10;break e;case qp:I=9;break e;case fo:I=11,oe=vm(oe);break e;case Th:I=14;break e;case es:I=16,oe=null;break e}oe="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(oe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?a="null":sn(e)?a="array":e!==void 0&&e.$$typeof===sl?(a="<"+(V(e.type)||"Unknown")+" />",oe=" Did you accidentally export a JSX literal instead of a component?"):a=typeof e,(I=u?le(u):null)&&(oe+=`
584
+
585
+ Check the render method of \``+I+"`."),I=29,a=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(a+"."+oe)),oe=null}return t=Z(I,a,t,f),t.elementType=e,t.type=oe,t.lanes=m,t._debugOwner=u,t}function jd(e,t,a){return t=_f(e.type,e.key,e.props,e._owner,t,a),t._debugOwner=e._owner,t._debugStack=e._debugStack,t._debugTask=e._debugTask,t}function Ro(e,t,a,u){return e=Z(7,e,u,t),e.lanes=a,e}function No(e,t,a){return e=Z(6,e,null,t),e.lanes=a,e}function Sm(e,t,a){return t=Z(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zl(e,t){js(),dg[hg++]=ab,dg[hg++]=ib,ib=e,ab=t}function dv(e,t,a){js(),Lr[Rr++]=vc,Lr[Rr++]=bc,Lr[Rr++]=Bh,Bh=e;var u=vc;e=bc;var f=32-ca(u)-1;u&=~(1<<f),a+=1;var m=32-ca(t)+f;if(30<m){var I=f-f%5;m=(u&(1<<I)-1).toString(32),u>>=I,f-=I,vc=1<<32-ca(t)+f|a<<f|u,bc=m+e}else vc=1<<m|a<<f|u,bc=e}function Of(e){js(),e.return!==null&&(zl(e,1),dv(e,1,0))}function Df(e){for(;e===ib;)ib=dg[--hg],dg[hg]=null,ab=dg[--hg],dg[hg]=null;for(;e===Bh;)Bh=Lr[--Rr],Lr[Rr]=null,bc=Lr[--Rr],Lr[Rr]=null,vc=Lr[--Rr],Lr[Rr]=null}function js(){zn||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function Ls(e,t){if(e.return===null){if(Nr===null)Nr={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t};else{if(Nr.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Nr.distanceFromLeaf>t&&(Nr.distanceFromLeaf=t)}return Nr}var a=Ls(e.return,t+1).children;return 0<a.length&&a[a.length-1].fiber===e?(a=a[a.length-1],a.distanceFromLeaf>t&&(a.distanceFromLeaf=t),a):(t={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t},a.push(t),t)}function wm(e,t){xc||(e=Ls(e,0),e.serverProps=null,t!==null&&(t=Rp(t),e.serverTail.push(t)))}function nr(e){var t="",a=Nr;throw a!==null&&(Nr=null,t=Cd(a)),Xc(Xa(Error(`Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
586
+
587
+ - A server/client branch \`if (typeof window !== 'undefined')\`.
588
+ - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
589
+ - Date formatting in a user's locale which doesn't match the server.
590
+ - External changing data without sending a snapshot of it along with the HTML.
591
+ - Invalid HTML tag nesting.
592
+
593
+ It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
594
+
595
+ https://react.dev/link/hydration-mismatch`+t),e)),eS}function Cm(e){var t=e.stateNode,a=e.type,u=e.memoizedProps;switch(t[ua]=e,t[Ua]=u,wr(a,u),a){case"dialog":vn("cancel",t),vn("close",t);break;case"iframe":case"object":case"embed":vn("load",t);break;case"video":case"audio":for(a=0;a<H1.length;a++)vn(H1[a],t);break;case"source":vn("error",t);break;case"img":case"image":case"link":vn("error",t),vn("load",t);break;case"details":vn("toggle",t);break;case"input":ct("input",u),vn("invalid",t),Lt(t,u),Jt(t,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),nn(t);break;case"option":ai(t,u);break;case"select":ct("select",u),vn("invalid",t),Qt(t,u);break;case"textarea":ct("textarea",u),vn("invalid",t),hn(t,u),ga(t,u.value,u.defaultValue,u.children),nn(t)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||u.suppressHydrationWarning===!0||k0(t.textContent,a)?(u.popover!=null&&(vn("beforetoggle",t),vn("toggle",t)),u.onScroll!=null&&vn("scroll",t),u.onScrollEnd!=null&&vn("scrollend",t),u.onClick!=null&&(t.onclick=lo),t=!0):t=!1,t||nr(e)}function Tm(e){for(is=e.return;is;)switch(is.tag){case 5:case 13:pl=!1;return;case 27:case 3:pl=!0;return;default:is=is.return}}function Bl(e){if(e!==is)return!1;if(!zn)return Tm(e),zn=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Cr(e.type,e.memoizedProps)),a=!a),a&&Ei){for(a=Ei;a;){var u=Ls(e,0),f=Rp(a);u.serverTail.push(f),a=f.type==="Suspense"?L0(a):Ki(a.nextSibling)}nr(e)}if(Tm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Ei=L0(e)}else t===27?(t=Ei,Tr(e.type)?(e=VS,VS=null,Ei=e):Ei=t):Ei=is?Ki(e.stateNode.nextSibling):null;return!0}function Ul(){Ei=is=null,xc=zn=!1}function km(){var e=Uh;return e!==null&&(rs===null?rs=e:rs.push.apply(rs,e),Uh=null),e}function Xc(e){Uh===null?Uh=[e]:Uh.push(e)}function Mm(){var e=Nr;if(e!==null){Nr=null;for(var t=Cd(e);0<e.children.length;)e=e.children[0];nt(e.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
596
+
597
+ - A server/client branch \`if (typeof window !== 'undefined')\`.
598
+ - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
599
+ - Date formatting in a user's locale which doesn't match the server.
600
+ - External changing data without sending a snapshot of it along with the HTML.
601
+ - Invalid HTML tag nesting.
602
+
603
+ It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
604
+
605
+ %s%s`,"https://react.dev/link/hydration-mismatch",t)})}}function jf(){fg=sb=null,pg=!1}function zo(e,t,a){X(tS,t._currentValue,e),t._currentValue=a,X(nS,t._currentRenderer,e),t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==YC&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=YC}function Jr(e,t){e._currentValue=tS.current;var a=nS.current;L(nS,t),e._currentRenderer=a,L(tS,t)}function Am(e,t,a){for(;e!==null;){var u=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,u!==null&&(u.childLanes|=t)):u!==null&&(u.childLanes&t)!==t&&(u.childLanes|=t),e===a)break;e=e.return}e!==a&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Em(e,t,a,u){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var m=f.dependencies;if(m!==null){var I=f.child;m=m.firstContext;e:for(;m!==null;){var oe=m;m=f;for(var we=0;we<t.length;we++)if(oe.context===t[we]){m.lanes|=a,oe=m.alternate,oe!==null&&(oe.lanes|=a),Am(m.return,a,e),u||(I=null);break e}m=oe.next}}else if(f.tag===18){if(I=f.return,I===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");I.lanes|=a,m=I.alternate,m!==null&&(m.lanes|=a),Am(I,a,e),I=null}else I=f.child;if(I!==null)I.return=f;else for(I=f;I!==null;){if(I===e){I=null;break}if(f=I.sibling,f!==null){f.return=I.return,I=f;break}I=I.return}f=I}}function Zi(e,t,a,u){e=null;for(var f=t,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var I=f.alternate;if(I===null)throw Error("Should have a current fiber. This is a bug in React.");if(I=I.memoizedProps,I!==null){var oe=f.type;ns(f.pendingProps.value,I.value)||(e!==null?e.push(oe):e=[oe])}}else if(f===Du.current){if(I=f.alternate,I===null)throw Error("Should have a current fiber. This is a bug in React.");I.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(I1):e=[I1])}f=f.return}e!==null&&Em(t,e,a,u),t.flags|=262144}function Bo(e){for(e=e.firstContext;e!==null;){if(!ns(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Uo(e){sb=e,fg=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ei(e){return pg&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),_m(sb,e)}function Ld(e,t){return sb===null&&Uo(e),_m(e,t)}function _m(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},fg===null){if(e===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");fg=t,e.dependencies={lanes:0,firstContext:t,_debugThenableState:null},e.flags|=524288}else fg=fg.next=t;return a}function Rd(){return{controller:new rE,data:new Map,refCount:0}}function Hl(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function ir(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&oE(lE,function(){e.controller.abort()})}function Rs(){var e=Hh;return Hh=0,e}function Ho(e){var t=Hh;return Hh=e,t}function Pl(e){var t=Hh;return Hh+=e,t}function Lf(e){Ts=gg(),0>e.actualStartTime&&(e.actualStartTime=Ts)}function Wr(e){if(0<=Ts){var t=gg()-Ts;e.actualDuration+=t,e.selfBaseDuration=t,Ts=-1}}function Vl(e){if(0<=Ts){var t=gg()-Ts;e.actualDuration+=t,Ts=-1}}function cs(){if(0<=Ts){var e=gg()-Ts;Ts=-1,Hh+=e}}function Ns(){Ts=gg()}function ar(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function hv(e,t){if(m1===null){var a=m1=[];iS=0,Ph=x0(),mg={status:"pending",value:void 0,then:function(u){a.push(u)}}}return iS++,t.then(Om,Om),t}function Om(){if(--iS===0&&m1!==null){mg!==null&&(mg.status="fulfilled");var e=m1;m1=null,Ph=0,mg=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fv(e,t){var a=[],u={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return e.then(function(){u.status="fulfilled",u.value=t;for(var f=0;f<a.length;f++)(0,a[f])(t)},function(f){for(u.status="rejected",u.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),u}function Dm(){var e=Vh.current;return e!==null?e:ti.pooledCache}function Rf(e,t){t===null?X(Vh,Vh.current,e):X(Vh,t.pool,e)}function pv(){var e=Dm();return e===null?null:{parent:na._currentValue,pool:e}}function jm(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function Lm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Fc(){}function us(e,t,a){Ke.actQueue!==null&&(Ke.didUsePromise=!0);var u=e.thenables;switch(a=u[a],a===void 0?u.push(t):a!==t&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),t.then(Fc,Fc),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Fa(e),e;default:if(typeof t.status=="string")t.then(Fc,Fc);else{if(e=ti,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");e=t,e.status="pending",e.then(function(f){if(t.status==="pending"){var m=t;m.status="fulfilled",m.value=f}},function(f){if(t.status==="pending"){var m=t;m.status="rejected",m.reason=f}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Fa(e),e}throw T1=t,db=!0,C1}}function Rm(){if(T1===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=T1;return T1=null,db=!1,e}function Fa(e){if(e===C1||e===ub)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function Aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Po(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function sr(e){return{lane:e,tag:JC,payload:null,callback:null,next:null}}function zs(e,t,a){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,rS===u&&!e5){var f=se(e);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
606
+
607
+ Please update the following component: %s`,f),e5=!0}return(qn&ss)!==Ys?(f=u.pending,f===null?t.next=t:(t.next=f.next,f.next=t),u.pending=t,t=Ef(e),lv(e,null,a),t):(Af(e,u,t,a),Ef(e))}function Vo(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var u=t.lanes;u&=e.pendingLanes,a|=u,t.lanes=a,be(e,a)}}function Zc(e,t){var a=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var f=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var I={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?f=m=I:m=m.next=I,a=a.next}while(a!==null);m===null?f=m=t:m=m.next=t}else f=m=t;a={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}function rr(){if(oS){var e=mg;if(e!==null)throw e}}function Qc(e,t,a,u){oS=!1;var f=e.updateQueue;Vu=!1,rS=f.shared;var m=f.firstBaseUpdate,I=f.lastBaseUpdate,oe=f.shared.pending;if(oe!==null){f.shared.pending=null;var we=oe,Te=we.next;we.next=null,I===null?m=Te:I.next=Te,I=we;var Je=e.alternate;Je!==null&&(Je=Je.updateQueue,oe=Je.lastBaseUpdate,oe!==I&&(oe===null?Je.firstBaseUpdate=Te:oe.next=Te,Je.lastBaseUpdate=we))}if(m!==null){var tt=f.baseState;I=0,Je=Te=we=null,oe=m;do{var Ze=oe.lane&-536870913,it=Ze!==oe.lane;if(it?(wn&Ze)===Ze:(u&Ze)===Ze){Ze!==0&&Ze===Ph&&(oS=!0),Je!==null&&(Je=Je.next={lane:0,tag:oe.tag,payload:oe.payload,callback:null,next:null});e:{Ze=e;var zt=oe,Kt=t,ni=a;switch(zt.tag){case WC:if(zt=zt.payload,typeof zt=="function"){pg=!0;var Mn=zt.call(ni,tt,Kt);if(Ze.mode&Pa){q(!0);try{zt.call(ni,tt,Kt)}finally{q(!1)}}pg=!1,tt=Mn;break e}tt=zt;break e;case sS:Ze.flags=Ze.flags&-65537|128;case JC:if(Mn=zt.payload,typeof Mn=="function"){if(pg=!0,zt=Mn.call(ni,tt,Kt),Ze.mode&Pa){q(!0);try{Mn.call(ni,tt,Kt)}finally{q(!1)}}pg=!1}else zt=Mn;if(zt==null)break e;tt=pn({},tt,zt);break e;case KC:Vu=!0}}Ze=oe.callback,Ze!==null&&(e.flags|=64,it&&(e.flags|=8192),it=f.callbacks,it===null?f.callbacks=[Ze]:it.push(Ze))}else it={lane:Ze,tag:oe.tag,payload:oe.payload,callback:oe.callback,next:null},Je===null?(Te=Je=it,we=tt):Je=Je.next=it,I|=Ze;if(oe=oe.next,oe===null){if(oe=f.shared.pending,oe===null)break;it=oe,oe=it.next,it.next=null,f.lastBaseUpdate=it,f.shared.pending=null}}while(!0);Je===null&&(we=tt),f.baseState=we,f.firstBaseUpdate=Te,f.lastBaseUpdate=Je,m===null&&(f.shared.lanes=0),Gu|=I,e.lanes=I,e.memoizedState=tt}rS=null}function Nd(e,t){if(typeof e!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(t)}function Jc(e,t){var a=e.shared.hiddenCallbacks;if(a!==null)for(e.shared.hiddenCallbacks=null,e=0;e<a.length;e++)Nd(a[e],t)}function gv(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Nd(a[e],t)}function Ea(e,t){var a=yl;X(hb,a,e),X(yg,t,e),yl=a|t.baseLanes}function zd(e){X(hb,yl,e),X(yg,yg.current,e)}function Bs(e){yl=hb.current,L(yg,e),L(hb,e)}function gn(){var e=et;Ur===null?Ur=[e]:Ur.push(e)}function gt(){var e=et;if(Ur!==null&&(wc++,Ur[wc]!==e)){var t=se(rn);if(!t5.has(t)&&(t5.add(t),Ur!==null)){for(var a="",u=0;u<=wc;u++){var f=Ur[u],m=u===wc?e:f;for(f=u+1+". "+f;30>f.length;)f+=" ";f+=m+`
608
+ `,a+=f}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
609
+
610
+ Previous render Next render
611
+ ------------------------------------------------------
612
+ %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
613
+ `,t,a)}}}function ds(e){e==null||sn(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",et,typeof e)}function Wc(){var e=se(rn);i5.has(e)||(i5.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function di(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
614
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
615
+ 2. You might be breaking the Rules of Hooks
616
+ 3. You might have more than one copy of React in the same app
617
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function $o(e,t){if(M1)return!1;if(t===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",et),!1;e.length!==t.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
618
+
619
+ Previous: %s
620
+ Incoming: %s`,et,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var a=0;a<t.length&&a<e.length;a++)if(!ns(e[a],t[a]))return!1;return!0}function Io(e,t,a,u,f,m){$u=m,rn=t,Ur=e!==null?e._debugHookTypes:null,wc=-1,M1=e!==null&&e.type!==t.type,(Object.prototype.toString.call(a)==="[object AsyncFunction]"||Object.prototype.toString.call(a)==="[object AsyncGeneratorFunction]")&&(m=se(rn),lS.has(m)||(lS.add(m),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",m===null?"An unknown Component":"<"+m+">"))),t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ke.H=e!==null&&e.memoizedState!==null?uS:Ur!==null?a5:cS,Ih=m=(t.mode&Pa)!==oi;var I=dS(a,u,f);if(Ih=!1,bg&&(I=Kc(t,a,u,f)),m){q(!0);try{I=Kc(t,a,u,f)}finally{q(!1)}}return Bd(e,t),I}function Bd(e,t){t._debugHookTypes=Ur,t.dependencies===null?Sc!==null&&(t.dependencies={lanes:0,firstContext:null,_debugThenableState:Sc}):t.dependencies._debugThenableState=Sc,Ke.H=gb;var a=Jn!==null&&Jn.next!==null;if($u=0,Ur=et=qi=Jn=rn=null,wc=-1,e!==null&&(e.flags&65011712)!==(t.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),fb=!1,k1=0,Sc=null,a)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||da||(e=e.dependencies,e!==null&&Bo(e)&&(da=!0)),db?(db=!1,e=!0):e=!1,e&&(t=se(t)||"Unknown",n5.has(t)||lS.has(t)||(n5.add(t),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function Kc(e,t,a,u){rn=e;var f=0;do{if(bg&&(Sc=null),k1=0,bg=!1,f>=uE)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(f+=1,M1=!1,qi=Jn=null,e.updateQueue!=null){var m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}wc=-1,Ke.H=s5,m=dS(t,a,u)}while(bg);return m}function hs(){var e=Ke.H,t=e.useState()[0];return t=typeof t.then=="function"?$l(t):t,e=e.useState()[0],(Jn!==null?Jn.memoizedState:null)!==e&&(rn.flags|=1024),t}function _a(){var e=pb!==0;return pb=0,e}function Kr(e,t,a){t.updateQueue=e.updateQueue,t.flags=(t.mode&xo)!==oi?t.flags&-402655237:t.flags&-2053,e.lanes&=~a}function Us(e){if(fb){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fb=!1}$u=0,Ur=qi=Jn=rn=null,wc=-1,et=null,bg=!1,k1=pb=0,Sc=null}function yi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qi===null?rn.memoizedState=qi=e:qi=qi.next=e,qi}function kn(){if(Jn===null){var e=rn.alternate;e=e!==null?e.memoizedState:null}else e=Jn.next;var t=qi===null?rn.memoizedState:qi.next;if(t!==null)qi=t,Jn=e;else{if(e===null)throw rn.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");Jn=e,e={memoizedState:Jn.memoizedState,baseState:Jn.baseState,baseQueue:Jn.baseQueue,queue:Jn.queue,next:null},qi===null?rn.memoizedState=qi=e:qi=qi.next=e}return qi}function Nf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $l(e){var t=k1;return k1+=1,Sc===null&&(Sc=jm()),e=us(Sc,e,t),t=rn,(qi===null?t.memoizedState:qi.next)===null&&(t=t.alternate,Ke.H=t!==null&&t.memoizedState!==null?uS:cS),e}function or(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return $l(e);if(e.$$typeof===Ss)return ei(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function ki(e){var t=null,a=rn.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var u=rn.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(t={data:u.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Nf(),rn.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0||M1)for(a=t.data[t.index]=Array(e),u=0;u<e;u++)a[u]=qv;else a.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",a.length,e);return t.index++,a}function Ln(e,t){return typeof t=="function"?t(e):t}function _n(e,t,a){var u=yi();if(a!==void 0){var f=a(t);if(Ih){q(!0);try{a(t)}finally{q(!1)}}}else f=t;return u.memoizedState=u.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},u.queue=e,e=e.dispatch=Im.bind(null,rn,e),[u.memoizedState,e]}function fs(e){var t=kn();return ps(t,Jn,e)}function ps(e,t,a){var u=e.queue;if(u===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");u.lastRenderedReducer=a;var f=e.baseQueue,m=u.pending;if(m!==null){if(f!==null){var I=f.next;f.next=m.next,m.next=I}t.baseQueue!==f&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),t.baseQueue=f=m,u.pending=null}if(m=e.baseState,f===null)e.memoizedState=m;else{t=f.next;var oe=I=null,we=null,Te=t,Je=!1;do{var tt=Te.lane&-536870913;if(tt!==Te.lane?(wn&tt)===tt:($u&tt)===tt){var Ze=Te.revertLane;if(Ze===0)we!==null&&(we=we.next={lane:0,revertLane:0,action:Te.action,hasEagerState:Te.hasEagerState,eagerState:Te.eagerState,next:null}),tt===Ph&&(Je=!0);else if(($u&Ze)===Ze){Te=Te.next,Ze===Ph&&(Je=!0);continue}else tt={lane:0,revertLane:Te.revertLane,action:Te.action,hasEagerState:Te.hasEagerState,eagerState:Te.eagerState,next:null},we===null?(oe=we=tt,I=m):we=we.next=tt,rn.lanes|=Ze,Gu|=Ze;tt=Te.action,Ih&&a(m,tt),m=Te.hasEagerState?Te.eagerState:a(m,tt)}else Ze={lane:tt,revertLane:Te.revertLane,action:Te.action,hasEagerState:Te.hasEagerState,eagerState:Te.eagerState,next:null},we===null?(oe=we=Ze,I=m):we=we.next=Ze,rn.lanes|=tt,Gu|=tt;Te=Te.next}while(Te!==null&&Te!==t);if(we===null?I=m:we.next=oe,!ns(m,e.memoizedState)&&(da=!0,Je&&(a=mg,a!==null)))throw a;e.memoizedState=m,e.baseState=I,e.baseQueue=we,u.lastRenderedState=m}return f===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function Il(e){var t=kn(),a=t.queue;if(a===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");a.lastRenderedReducer=e;var u=a.dispatch,f=a.pending,m=t.memoizedState;if(f!==null){a.pending=null;var I=f=f.next;do m=e(m,I.action),I=I.next;while(I!==f);ns(m,t.memoizedState)||(da=!0),t.memoizedState=m,t.baseQueue===null&&(t.baseState=m),a.lastRenderedState=m}return[m,u]}function eo(e,t,a){var u=rn,f=yi();if(zn){if(a===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var m=a();vg||m===a()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),vg=!0)}else{if(m=t(),vg||(a=t(),ns(m,a)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),vg=!0)),ti===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(wn&124)!==0||Nm(u,t,m)}return f.memoizedState=m,a={value:m,getSnapshot:t},f.queue=a,Uf(tu.bind(null,u,a,e),[e]),u.flags|=2048,cr(Br|ia,Go(),eu.bind(null,u,a,m,t),null),m}function Ud(e,t,a){var u=rn,f=kn(),m=zn;if(m){if(a===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");a=a()}else if(a=t(),!vg){var I=t();ns(a,I)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),vg=!0)}(I=!ns((Jn||f).memoizedState,a))&&(f.memoizedState=a,da=!0),f=f.queue;var oe=tu.bind(null,u,f,e);if(ji(2048,ia,oe,[e]),f.getSnapshot!==t||I||qi!==null&&qi.memoizedState.tag&Br){if(u.flags|=2048,cr(Br|ia,Go(),eu.bind(null,u,f,a,t),null),ti===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");m||($u&124)!==0||Nm(u,t,a)}return a}function Nm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=rn.updateQueue,t===null?(t=Nf(),rn.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function eu(e,t,a,u){t.value=a,t.getSnapshot=u,zm(t)&&nu(e)}function tu(e,t,a){return a(function(){zm(t)&&nu(e)})}function zm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ns(e,a)}catch{return!0}}function nu(e){var t=Ma(e,2);t!==null&&bi(t,e,2)}function Hd(e){var t=yi();if(typeof e=="function"){var a=e;if(e=a(),Ih){q(!0);try{a()}finally{q(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:e},t}function to(e){e=Hd(e);var t=e.queue,a=ru.bind(null,rn,t);return t.dispatch=a,[e.memoizedState,a]}function Hs(e){var t=yi();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Xf.bind(null,rn,!0,a),a.dispatch=t,[e,t]}function no(e,t){var a=kn();return lr(a,Jn,e,t)}function lr(e,t,a,u){return e.baseState=a,ps(e,Jn,typeof u=="function"?u:Ln)}function zf(e,t){var a=kn();return Jn!==null?lr(a,Jn,e,t):(a.baseState=e,[e,a.queue.dispatch])}function Bm(e,t,a,u,f){if(Yd(e))throw Error("Cannot update form state while rendering.");if(e=t.action,e!==null){var m={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(I){m.listeners.push(I)}};Ke.T!==null?a(!0):m.isTransition=!1,u(m),a=t.pending,a===null?(m.next=t.pending=m,iu(t,m)):(m.next=a.next,t.pending=a.next=m)}}function iu(e,t){var a=t.action,u=t.payload,f=e.state;if(t.isTransition){var m=Ke.T,I={};Ke.T=I,Ke.T._updatedFibers=new Set;try{var oe=a(f,u),we=Ke.S;we!==null&&we(I,oe),Pd(e,t,oe)}catch(Te){Hi(e,t,Te)}finally{Ke.T=m,m===null&&I._updatedFibers&&(e=I._updatedFibers.size,I._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{I=a(f,u),Pd(e,t,I)}catch(Te){Hi(e,t,Te)}}function Pd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?(a.then(function(u){qo(e,t,u)},function(u){return Hi(e,t,u)}),t.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):qo(e,t,a)}function qo(e,t,a){t.status="fulfilled",t.value=a,Vd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,iu(e,a)))}function Hi(e,t,a){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do t.status="rejected",t.reason=a,Vd(t),t=t.next;while(t!==u)}e.action=null}function Vd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Um(e,t){return t}function au(e,t){if(zn){var a=ti.formState;if(a!==null){e:{var u=rn;if(zn){if(Ei){t:{for(var f=Ei,m=pl;f.nodeType!==8;){if(!m){f=null;break t}if(f=Ki(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m===BS||m===i7?f:null}if(f){Ei=Ki(f.nextSibling),u=f.data===BS;break e}}nr(u)}u=!1}u&&(t=a[0])}}return a=yi(),a.memoizedState=a.baseState=t,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Um,lastRenderedState:t},a.queue=u,a=ru.bind(null,rn,u),u.dispatch=a,u=Hd(!1),m=Xf.bind(null,rn,!1,u.queue),u=yi(),f={state:t,dispatch:null,action:e,pending:null},u.queue=f,a=Bm.bind(null,rn,f,m,a),f.dispatch=a,u.memoizedState=e,[t,a,!1]}function Bf(e){var t=kn();return mv(t,Jn,e)}function mv(e,t,a){if(t=ps(e,t,Um)[0],e=fs(Ln)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var u=$l(t)}catch(I){throw I===C1?ub:I}else u=t;t=kn();var f=t.queue,m=f.dispatch;return a!==t.memoizedState&&(rn.flags|=2048,cr(Br|ia,Go(),Di.bind(null,f,a),null)),[u,m,e]}function Di(e,t){e.action=t}function su(e){var t=kn(),a=Jn;if(a!==null)return mv(t,a,e);kn(),t=t.memoizedState,a=kn();var u=a.queue.dispatch;return a.memoizedState=e,[t,u,!1]}function cr(e,t,a,u){return e={tag:e,create:a,deps:u,inst:t,next:null},t=rn.updateQueue,t===null&&(t=Nf(),rn.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(u=a.next,a.next=e,e.next=u,t.lastEffect=e),e}function Go(){return{destroy:void 0,resource:void 0}}function $d(e){var t=yi();return e={current:e},t.memoizedState=e}function gs(e,t,a,u){var f=yi();u=u===void 0?null:u,rn.flags|=e,f.memoizedState=cr(Br|t,Go(),a,u)}function ji(e,t,a,u){var f=kn();u=u===void 0?null:u;var m=f.memoizedState.inst;Jn!==null&&u!==null&&$o(u,Jn.memoizedState.deps)?f.memoizedState=cr(t,m,a,u):(rn.flags|=e,f.memoizedState=cr(Br|t,m,a,u))}function Uf(e,t){(rn.mode&xo)!==oi&&(rn.mode&VC)===oi?gs(276826112,ia,e,t):gs(8390656,ia,e,t)}function Hf(e,t){var a=4194308;return(rn.mode&xo)!==oi&&(a|=134217728),gs(a,Ca,e,t)}function yv(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return t.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(t).join(", ")+"}"),e=e(),t.current=e,function(){t.current=null}}function Pf(e,t,a){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),a=a!=null?a.concat([e]):null;var u=4194308;(rn.mode&xo)!==oi&&(u|=134217728),gs(u,Ca,yv.bind(null,t,e),a)}function ur(e,t,a){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),a=a!=null?a.concat([e]):null,ji(4,Ca,yv.bind(null,t,e),a)}function Id(e,t){return yi().memoizedState=[e,t===void 0?null:t],e}function ql(e,t){var a=kn();t=t===void 0?null:t;var u=a.memoizedState;return t!==null&&$o(t,u[1])?u[0]:(a.memoizedState=[e,t],e)}function Vf(e,t){var a=yi();t=t===void 0?null:t;var u=e();if(Ih){q(!0);try{e()}finally{q(!1)}}return a.memoizedState=[u,t],u}function Yo(e,t){var a=kn();t=t===void 0?null:t;var u=a.memoizedState;if(t!==null&&$o(t,u[1]))return u[0];if(u=e(),Ih){q(!0);try{e()}finally{q(!1)}}return a.memoizedState=[u,t],u}function $f(e,t){var a=yi();return qf(a,e,t)}function qd(e,t){var a=kn();return Gd(a,Jn.memoizedState,e,t)}function If(e,t){var a=kn();return Jn===null?qf(a,e,t):Gd(a,Jn.memoizedState,e,t)}function qf(e,t,a){return a===void 0||($u&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Av(),rn.lanes|=e,Gu|=e,a)}function Gd(e,t,a,u){return ns(a,t)?a:yg.current!==null?(e=qf(e,a,u),ns(e,t)||(da=!0),e):($u&42)===0?(da=!0,e.memoizedState=a):(e=Av(),rn.lanes|=e,Gu|=e,t)}function Hm(e,t,a,u,f){var m=Wt.p;Wt.p=m!==0&&m<Gs?m:Gs;var I=Ke.T,oe={};Ke.T=oe,Xf(e,!1,t,a),oe._updatedFibers=new Set;try{var we=f(),Te=Ke.S;if(Te!==null&&Te(oe,we),we!==null&&typeof we=="object"&&typeof we.then=="function"){var Je=fv(we,u);io(e,t,Je,La(e))}else io(e,t,u,La(e))}catch(tt){io(e,t,{then:function(){},status:"rejected",reason:tt},La(e))}finally{Wt.p=m,Ke.T=I,I===null&&oe._updatedFibers&&(e=oe._updatedFibers.size,oe._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function Gl(e,t,a,u){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var f=Pm(e).queue;Hm(e,f,t,ef,a===null?O:function(){return Vm(e),a(u)})}function Pm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ef,baseState:ef,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:ef},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Vm(e){Ke.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var t=Pm(e).next.queue;io(e,t,{},La(e))}function dr(){var e=Hd(!1);return e=Hm.bind(null,rn,e.queue,!0,!1),yi().memoizedState=e,[!1,e]}function Gf(){var e=fs(Ln)[0],t=kn().memoizedState;return[typeof e=="boolean"?e:$l(e),t]}function Yf(){var e=Il(Ln)[0],t=kn().memoizedState;return[typeof e=="boolean"?e:$l(e),t]}function Oa(){return ei(I1)}function hr(){var e=yi(),t=ti.identifierPrefix;if(zn){var a=bc,u=vc;a=(u&~(1<<32-ca(u)-1)).toString(32)+a,t="«"+t+"R"+a,a=pb++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=cE++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t}function Yl(){return yi().memoizedState=$m.bind(null,rn)}function $m(e,t){for(var a=e.return;a!==null;){switch(a.tag){case 24:case 3:var u=La(a);e=sr(u);var f=zs(a,e,u);f!==null&&(bi(f,a,u),Vo(f,a,u)),a=Rd(),t!=null&&f!==null&&console.error("The seed argument is not enabled outside experimental channels."),e.payload={cache:a};return}a=a.return}}function Im(e,t,a){var u=arguments;typeof u[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),u=La(e);var f={lane:u,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};Yd(e)?Xl(t,f):(f=ym(e,t,f,u),f!==null&&(bi(f,e,u),Xd(f,t,u))),G(e,u)}function ru(e,t,a){var u=arguments;typeof u[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),u=La(e),io(e,t,a,u),G(e,u)}function io(e,t,a,u){var f={lane:u,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Yd(e))Xl(t,f);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=t.lastRenderedReducer,m!==null)){var I=Ke.H;Ke.H=wo;try{var oe=t.lastRenderedState,we=m(oe,a);if(f.hasEagerState=!0,f.eagerState=we,ns(we,oe))return Af(e,t,f,0),ti===null&&_d(),!1}catch{}finally{Ke.H=I}}if(a=ym(e,t,f,u),a!==null)return bi(a,e,u),Xd(a,t,u),!0}return!1}function Xf(e,t,a,u){if(Ke.T===null&&Ph===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),u={lane:2,revertLane:x0(),action:u,hasEagerState:!1,eagerState:null,next:null},Yd(e)){if(t)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else t=ym(e,a,u,2),t!==null&&bi(t,e,2);G(e,2)}function Yd(e){var t=e.alternate;return e===rn||t!==null&&t===rn}function Xl(e,t){bg=fb=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Xd(e,t,a){if((a&4194048)!==0){var u=t.lanes;u&=e.pendingLanes,a|=u,t.lanes=a,be(e,a)}}function Pi(e){var t=yn;return e!=null&&(yn=t===null?e:t.concat(e)),t}function ou(e,t,a){for(var u=Object.keys(e.props),f=0;f<u.length;f++){var m=u[f];if(m!=="children"&&m!=="key"){t===null&&(t=jd(e,a.mode,0),t._debugInfo=yn,t.return=a),nt(t,function(I){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",I)},m);break}}}function lu(e){var t=A1;return A1+=1,xg===null&&(xg=jm()),us(xg,e,t)}function ms(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ln(e,t){throw t.$$typeof===Ch?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
621
+ - Multiple copies of the "react" package is used.
622
+ - A library pre-bundled an old copy of "react" or "react/jsx-runtime".
623
+ - A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function Hn(e,t){var a=se(e)||"Component";x5[a]||(x5[a]=!0,t=t.displayName||t.name||"Component",e.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
624
+ root.render(%s)`,t,t,t):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
625
+ <%s>{%s}</%s>`,t,t,a,t,a))}function hi(e,t){var a=se(e)||"Component";S5[a]||(S5[a]=!0,t=String(t),e.tag===3?console.error(`Symbols are not valid as a React child.
626
+ root.render(%s)`,t):console.error(`Symbols are not valid as a React child.
627
+ <%s>%s</%s>`,a,t,a))}function Fd(e){function t(De,je){if(e){var Ue=De.deletions;Ue===null?(De.deletions=[je],De.flags|=16):Ue.push(je)}}function a(De,je){if(!e)return null;for(;je!==null;)t(De,je),je=je.sibling;return null}function u(De){for(var je=new Map;De!==null;)De.key!==null?je.set(De.key,De):je.set(De.index,De),De=De.sibling;return je}function f(De,je){return De=tr(De,je),De.index=0,De.sibling=null,De}function m(De,je,Ue){return De.index=Ue,e?(Ue=De.alternate,Ue!==null?(Ue=Ue.index,Ue<je?(De.flags|=67108866,je):Ue):(De.flags|=67108866,je)):(De.flags|=1048576,je)}function I(De){return e&&De.alternate===null&&(De.flags|=67108866),De}function oe(De,je,Ue,at){return je===null||je.tag!==6?(je=No(Ue,De.mode,at),je.return=De,je._debugOwner=De,je._debugTask=De._debugTask,je._debugInfo=yn,je):(je=f(je,Ue),je.return=De,je._debugInfo=yn,je)}function we(De,je,Ue,at){var St=Ue.type;return St===cn?(je=Je(De,je,Ue.props.children,at,Ue.key),ou(Ue,je,De),je):je!==null&&(je.elementType===St||cv(je,Ue)||typeof St=="object"&&St!==null&&St.$$typeof===es&&Iu(St)===je.type)?(je=f(je,Ue.props),ms(je,Ue),je.return=De,je._debugOwner=Ue._owner,je._debugInfo=yn,je):(je=jd(Ue,De.mode,at),ms(je,Ue),je.return=De,je._debugInfo=yn,je)}function Te(De,je,Ue,at){return je===null||je.tag!==4||je.stateNode.containerInfo!==Ue.containerInfo||je.stateNode.implementation!==Ue.implementation?(je=Sm(Ue,De.mode,at),je.return=De,je._debugInfo=yn,je):(je=f(je,Ue.children||[]),je.return=De,je._debugInfo=yn,je)}function Je(De,je,Ue,at,St){return je===null||je.tag!==7?(je=Ro(Ue,De.mode,at,St),je.return=De,je._debugOwner=De,je._debugTask=De._debugTask,je._debugInfo=yn,je):(je=f(je,Ue),je.return=De,je._debugInfo=yn,je)}function tt(De,je,Ue){if(typeof je=="string"&&je!==""||typeof je=="number"||typeof je=="bigint")return je=No(""+je,De.mode,Ue),je.return=De,je._debugOwner=De,je._debugTask=De._debugTask,je._debugInfo=yn,je;if(typeof je=="object"&&je!==null){switch(je.$$typeof){case sl:return Ue=jd(je,De.mode,Ue),ms(Ue,je),Ue.return=De,De=Pi(je._debugInfo),Ue._debugInfo=yn,yn=De,Ue;case hc:return je=Sm(je,De.mode,Ue),je.return=De,je._debugInfo=yn,je;case es:var at=Pi(je._debugInfo);return je=Iu(je),De=tt(De,je,Ue),yn=at,De}if(sn(je)||z(je))return Ue=Ro(je,De.mode,Ue,null),Ue.return=De,Ue._debugOwner=De,Ue._debugTask=De._debugTask,De=Pi(je._debugInfo),Ue._debugInfo=yn,yn=De,Ue;if(typeof je.then=="function")return at=Pi(je._debugInfo),De=tt(De,lu(je),Ue),yn=at,De;if(je.$$typeof===Ss)return tt(De,Ld(De,je),Ue);ln(De,je)}return typeof je=="function"&&Hn(De,je),typeof je=="symbol"&&hi(De,je),null}function Ze(De,je,Ue,at){var St=je!==null?je.key:null;if(typeof Ue=="string"&&Ue!==""||typeof Ue=="number"||typeof Ue=="bigint")return St!==null?null:oe(De,je,""+Ue,at);if(typeof Ue=="object"&&Ue!==null){switch(Ue.$$typeof){case sl:return Ue.key===St?(St=Pi(Ue._debugInfo),De=we(De,je,Ue,at),yn=St,De):null;case hc:return Ue.key===St?Te(De,je,Ue,at):null;case es:return St=Pi(Ue._debugInfo),Ue=Iu(Ue),De=Ze(De,je,Ue,at),yn=St,De}if(sn(Ue)||z(Ue))return St!==null?null:(St=Pi(Ue._debugInfo),De=Je(De,je,Ue,at,null),yn=St,De);if(typeof Ue.then=="function")return St=Pi(Ue._debugInfo),De=Ze(De,je,lu(Ue),at),yn=St,De;if(Ue.$$typeof===Ss)return Ze(De,je,Ld(De,Ue),at);ln(De,Ue)}return typeof Ue=="function"&&Hn(De,Ue),typeof Ue=="symbol"&&hi(De,Ue),null}function it(De,je,Ue,at,St){if(typeof at=="string"&&at!==""||typeof at=="number"||typeof at=="bigint")return De=De.get(Ue)||null,oe(je,De,""+at,St);if(typeof at=="object"&&at!==null){switch(at.$$typeof){case sl:return Ue=De.get(at.key===null?Ue:at.key)||null,De=Pi(at._debugInfo),je=we(je,Ue,at,St),yn=De,je;case hc:return De=De.get(at.key===null?Ue:at.key)||null,Te(je,De,at,St);case es:var un=Pi(at._debugInfo);return at=Iu(at),je=it(De,je,Ue,at,St),yn=un,je}if(sn(at)||z(at))return Ue=De.get(Ue)||null,De=Pi(at._debugInfo),je=Je(je,Ue,at,St,null),yn=De,je;if(typeof at.then=="function")return un=Pi(at._debugInfo),je=it(De,je,Ue,lu(at),St),yn=un,je;if(at.$$typeof===Ss)return it(De,je,Ue,Ld(je,at),St);ln(je,at)}return typeof at=="function"&&Hn(je,at),typeof at=="symbol"&&hi(je,at),null}function zt(De,je,Ue,at){if(typeof Ue!="object"||Ue===null)return at;switch(Ue.$$typeof){case sl:case hc:x(De,je,Ue);var St=Ue.key;if(typeof St!="string")break;if(at===null){at=new Set,at.add(St);break}if(!at.has(St)){at.add(St);break}nt(je,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",St)});break;case es:Ue=Iu(Ue),zt(De,je,Ue,at)}return at}function Kt(De,je,Ue,at){for(var St=null,un=null,Bt=null,dn=je,fn=je=0,li=null;dn!==null&&fn<Ue.length;fn++){dn.index>fn?(li=dn,dn=null):li=dn.sibling;var zi=Ze(De,dn,Ue[fn],at);if(zi===null){dn===null&&(dn=li);break}St=zt(De,zi,Ue[fn],St),e&&dn&&zi.alternate===null&&t(De,dn),je=m(zi,je,fn),Bt===null?un=zi:Bt.sibling=zi,Bt=zi,dn=li}if(fn===Ue.length)return a(De,dn),zn&&zl(De,fn),un;if(dn===null){for(;fn<Ue.length;fn++)dn=tt(De,Ue[fn],at),dn!==null&&(St=zt(De,dn,Ue[fn],St),je=m(dn,je,fn),Bt===null?un=dn:Bt.sibling=dn,Bt=dn);return zn&&zl(De,fn),un}for(dn=u(dn);fn<Ue.length;fn++)li=it(dn,De,fn,Ue[fn],at),li!==null&&(St=zt(De,li,Ue[fn],St),e&&li.alternate!==null&&dn.delete(li.key===null?fn:li.key),je=m(li,je,fn),Bt===null?un=li:Bt.sibling=li,Bt=li);return e&&dn.forEach(function(Ec){return t(De,Ec)}),zn&&zl(De,fn),un}function ni(De,je,Ue,at){if(Ue==null)throw Error("An iterable object provided no iterator.");for(var St=null,un=null,Bt=je,dn=je=0,fn=null,li=null,zi=Ue.next();Bt!==null&&!zi.done;dn++,zi=Ue.next()){Bt.index>dn?(fn=Bt,Bt=null):fn=Bt.sibling;var Ec=Ze(De,Bt,zi.value,at);if(Ec===null){Bt===null&&(Bt=fn);break}li=zt(De,Ec,zi.value,li),e&&Bt&&Ec.alternate===null&&t(De,Bt),je=m(Ec,je,dn),un===null?St=Ec:un.sibling=Ec,un=Ec,Bt=fn}if(zi.done)return a(De,Bt),zn&&zl(De,dn),St;if(Bt===null){for(;!zi.done;dn++,zi=Ue.next())Bt=tt(De,zi.value,at),Bt!==null&&(li=zt(De,Bt,zi.value,li),je=m(Bt,je,dn),un===null?St=Bt:un.sibling=Bt,un=Bt);return zn&&zl(De,dn),St}for(Bt=u(Bt);!zi.done;dn++,zi=Ue.next())fn=it(Bt,De,dn,zi.value,at),fn!==null&&(li=zt(De,fn,zi.value,li),e&&fn.alternate!==null&&Bt.delete(fn.key===null?dn:fn.key),je=m(fn,je,dn),un===null?St=fn:un.sibling=fn,un=fn);return e&&Bt.forEach(function(zE){return t(De,zE)}),zn&&zl(De,dn),St}function Mn(De,je,Ue,at){if(typeof Ue=="object"&&Ue!==null&&Ue.type===cn&&Ue.key===null&&(ou(Ue,null,De),Ue=Ue.props.children),typeof Ue=="object"&&Ue!==null){switch(Ue.$$typeof){case sl:var St=Pi(Ue._debugInfo);e:{for(var un=Ue.key;je!==null;){if(je.key===un){if(un=Ue.type,un===cn){if(je.tag===7){a(De,je.sibling),at=f(je,Ue.props.children),at.return=De,at._debugOwner=Ue._owner,at._debugInfo=yn,ou(Ue,at,De),De=at;break e}}else if(je.elementType===un||cv(je,Ue)||typeof un=="object"&&un!==null&&un.$$typeof===es&&Iu(un)===je.type){a(De,je.sibling),at=f(je,Ue.props),ms(at,Ue),at.return=De,at._debugOwner=Ue._owner,at._debugInfo=yn,De=at;break e}a(De,je);break}else t(De,je);je=je.sibling}Ue.type===cn?(at=Ro(Ue.props.children,De.mode,at,Ue.key),at.return=De,at._debugOwner=De,at._debugTask=De._debugTask,at._debugInfo=yn,ou(Ue,at,De),De=at):(at=jd(Ue,De.mode,at),ms(at,Ue),at.return=De,at._debugInfo=yn,De=at)}return De=I(De),yn=St,De;case hc:e:{for(St=Ue,Ue=St.key;je!==null;){if(je.key===Ue)if(je.tag===4&&je.stateNode.containerInfo===St.containerInfo&&je.stateNode.implementation===St.implementation){a(De,je.sibling),at=f(je,St.children||[]),at.return=De,De=at;break e}else{a(De,je);break}else t(De,je);je=je.sibling}at=Sm(St,De.mode,at),at.return=De,De=at}return I(De);case es:return St=Pi(Ue._debugInfo),Ue=Iu(Ue),De=Mn(De,je,Ue,at),yn=St,De}if(sn(Ue))return St=Pi(Ue._debugInfo),De=Kt(De,je,Ue,at),yn=St,De;if(z(Ue)){if(St=Pi(Ue._debugInfo),un=z(Ue),typeof un!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Bt=un.call(Ue);return Bt===Ue?(De.tag!==0||Object.prototype.toString.call(De.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Bt)!=="[object Generator]")&&(v5||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),v5=!0):Ue.entries!==un||fS||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),fS=!0),De=ni(De,je,Bt,at),yn=St,De}if(typeof Ue.then=="function")return St=Pi(Ue._debugInfo),De=Mn(De,je,lu(Ue),at),yn=St,De;if(Ue.$$typeof===Ss)return Mn(De,je,Ld(De,Ue),at);ln(De,Ue)}return typeof Ue=="string"&&Ue!==""||typeof Ue=="number"||typeof Ue=="bigint"?(St=""+Ue,je!==null&&je.tag===6?(a(De,je.sibling),at=f(je,St),at.return=De,De=at):(a(De,je),at=No(St,De.mode,at),at.return=De,at._debugOwner=De,at._debugTask=De._debugTask,at._debugInfo=yn,De=at),I(De)):(typeof Ue=="function"&&Hn(De,Ue),typeof Ue=="symbol"&&hi(De,Ue),a(De,je))}return function(De,je,Ue,at){var St=yn;yn=null;try{A1=0;var un=Mn(De,je,Ue,at);return xg=null,un}catch(li){if(li===C1||li===ub)throw li;var Bt=Z(29,li,null,De.mode);Bt.lanes=at,Bt.return=De;var dn=Bt._debugInfo=yn;if(Bt._debugOwner=De._debugOwner,Bt._debugTask=De._debugTask,dn!=null){for(var fn=dn.length-1;0<=fn;fn--)if(typeof dn[fn].stack=="string"){Bt._debugOwner=dn[fn],Bt._debugTask=dn[fn].debugTask;break}}return Bt}finally{yn=St}}}function Za(e){var t=e.alternate;X(aa,aa.current&wg,e),X(Hr,e,e),ml===null&&(t===null||yg.current!==null||t.memoizedState!==null)&&(ml=e)}function Xo(e){if(e.tag===22){if(X(aa,aa.current,e),X(Hr,e,e),ml===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(ml=e)}}else Ps(e)}function Ps(e){X(aa,aa.current,e),X(Hr,Hr.current,e)}function Qa(e){L(Hr,e),ml===e&&(ml=null),L(aa,e)}function ao(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data===kc||kr(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function qm(e){if(e!==null&&typeof e!="function"){var t=String(e);L5.has(t)||(L5.add(t),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function fi(e,t,a,u){var f=e.memoizedState,m=a(u,f);if(e.mode&Pa){q(!0);try{m=a(u,f)}finally{q(!1)}}m===void 0&&(t=V(t)||"Component",_5.has(t)||(_5.add(t),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",t))),f=m==null?f:pn({},f,m),e.memoizedState=f,e.lanes===0&&(e.updateQueue.baseState=f)}function Ff(e,t,a,u,f,m,I){var oe=e.stateNode;if(typeof oe.shouldComponentUpdate=="function"){if(a=oe.shouldComponentUpdate(u,m,I),e.mode&Pa){q(!0);try{a=oe.shouldComponentUpdate(u,m,I)}finally{q(!1)}}return a===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",V(t)||"Component"),a}return t.prototype&&t.prototype.isPureReactComponent?!Ed(a,u)||!Ed(f,m):!0}function Zf(e,t,a,u){var f=t.state;typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,u),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,u),t.state!==f&&(e=se(e)||"Component",T5.has(e)||(T5.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),pS.enqueueReplaceState(t,t.state,null))}function Fo(e,t){var a=t;if("ref"in t){a={};for(var u in t)u!=="ref"&&(a[u]=t[u])}if(e=e.defaultProps){a===t&&(a=pn({},a));for(var f in e)a[f]===void 0&&(a[f]=e[f])}return a}function Gm(e){gS(e),console.warn(`%s
628
+
629
+ %s
630
+ `,Cg?"An error occurred in the <"+Cg+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
631
+ Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function vv(e){var t=Cg?"The above error occurred in the <"+Cg+"> component.":"The above error occurred in one of your React components.",a="React will try to recreate this component tree from scratch using the error boundary you provided, "+((mS||"Anonymous")+".");if(typeof e=="object"&&e!==null&&typeof e.environmentName=="string"){var u=e.environmentName;e=[`%o
632
+
633
+ %s
634
+
635
+ %s
636
+ `,e,t,a].slice(0),typeof e[0]=="string"?e.splice(0,1,d7+e[0],h7,Rb+u+Rb,f7):e.splice(0,0,d7,h7,Rb+u+Rb,f7),e.unshift(console),u=RE.apply(console.error,e),u()}else console.error(`%o
637
+
638
+ %s
639
+
640
+ %s
641
+ `,e,t,a)}function Qf(e){gS(e)}function cu(e,t){try{Cg=t.source?se(t.source):null,mS=null;var a=t.value;if(Ke.actQueue!==null)Ke.thrownErrors.push(a);else{var u=e.onUncaughtError;u(a,{componentStack:t.stack})}}catch(f){setTimeout(function(){throw f})}}function Jf(e,t,a){try{Cg=a.source?se(a.source):null,mS=se(t);var u=e.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function ra(e,t,a){return a=sr(a),a.tag=sS,a.payload={element:null},a.callback=function(){nt(t.source,cu,e,t)},a}function vi(e){return e=sr(e),e.tag=sS,e}function Zd(e,t,a,u){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var m=u.value;e.payload=function(){return f(m)},e.callback=function(){uv(a),nt(u.source,Jf,t,a,u)}}var I=a.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(e.callback=function(){uv(a),nt(u.source,Jf,t,a,u),typeof f!="function"&&(Xu===null?Xu=new Set([this]):Xu.add(this)),dE(this,u),typeof f=="function"||(a.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",se(a)||"Unknown")})}function Qd(e,t,a,u,f){if(a.flags|=32768,Ti&&yu(e,f),u!==null&&typeof u=="object"&&typeof u.then=="function"){if(t=a.alternate,t!==null&&Zi(t,a,f,!0),zn&&(xc=!0),a=Hr.current,a!==null){switch(a.tag){case 13:return ml===null?yp():a.alternate===null&&_i===Tc&&(_i=xS),a.flags&=-257,a.flags|=65536,a.lanes=f,u===aS?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([u]):t.add(u),m0(e,u,f)),!1;case 22:return a.flags|=65536,u===aS?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([u]):a.add(u)),m0(e,u,f)),!1}throw Error("Unexpected Suspense handler tag ("+a.tag+"). This is a bug in React.")}return m0(e,u,f),yp(),!1}if(zn)return xc=!0,t=Hr.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,u!==eS&&Xc(Xa(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:u}),a))):(u!==eS&&Xc(Xa(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:u}),a)),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,u=Xa(u,a),f=ra(e.stateNode,u,f),Zc(e,f),_i!==qh&&(_i=Ag)),!1;var m=Xa(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:u}),a);if(N1===null?N1=[m]:N1.push(m),_i!==qh&&(_i=Ag),t===null)return!0;u=Xa(u,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=f&-f,a.lanes|=e,e=ra(a.stateNode,u,e),Zc(a,e),!1;case 1:if(t=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Xu===null||!Xu.has(m))))return a.flags|=65536,f&=-f,a.lanes|=f,f=vi(f),Zd(f,e,a,u),Zc(a,f),!1}a=a.return}while(a!==null);return!1}function Ai(e,t,a,u){t.child=e===null?w5(t,null,a,u):Sg(t,e.child,a,u)}function Wf(e,t,a,u,f){a=a.render;var m=t.ref;if("ref"in u){var I={};for(var oe in u)oe!=="ref"&&(I[oe]=u[oe])}else I=u;return Uo(t),U(t),u=Io(e,t,a,I,m,f),oe=_a(),ne(),e!==null&&!da?(Kr(e,t,f),pr(e,t,f)):(zn&&oe&&Of(t),t.flags|=1,Ai(e,t,u,f),t.child)}function fr(e,t,a,u,f){if(e===null){var m=a.type;return typeof m=="function"&&!bm(m)&&m.defaultProps===void 0&&a.compare===null?(a=Nl(m),t.tag=15,t.type=a,np(t,m),Jd(e,t,a,u,f)):(e=_f(a.type,null,u,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(m=e.child,!lp(e,f)){var I=m.memoizedProps;if(a=a.compare,a=a!==null?a:Ed,a(I,u)&&e.ref===t.ref)return pr(e,t,f)}return t.flags|=1,e=tr(m,u),e.ref=t.ref,e.return=t,t.child=e}function Jd(e,t,a,u,f){if(e!==null){var m=e.memoizedProps;if(Ed(m,u)&&e.ref===t.ref&&t.type===e.type)if(da=!1,t.pendingProps=u=m,lp(e,f))(e.flags&131072)!==0&&(da=!0);else return t.lanes=e.lanes,pr(e,t,f)}return tp(e,t,a,u,f)}function Kf(e,t,a){var u=t.pendingProps,f=u.children,m=e!==null?e.memoizedState:null;if(u.mode==="hidden"){if((t.flags&128)!==0){if(u=m!==null?m.baseLanes|a:a,e!==null){for(f=t.child=e.child,m=0;f!==null;)m=m|f.lanes|f.childLanes,f=f.sibling;t.childLanes=m&~u}else t.childLanes=0,t.child=null;return ep(e,t,u,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Rf(t,m!==null?m.cachePool:null),m!==null?Ea(t,m):zd(t),Xo(t);else return t.lanes=t.childLanes=536870912,ep(e,t,m!==null?m.baseLanes|a:a,a)}else m!==null?(Rf(t,m.cachePool),Ea(t,m),Ps(t),t.memoizedState=null):(e!==null&&Rf(t,null),zd(t),Ps(t));return Ai(e,t,f,a),t.child}function ep(e,t,a,u){var f=Dm();return f=f===null?null:{parent:na._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&Rf(t,null),zd(t),Xo(t),e!==null&&Zi(e,t,u,!0),null}function Wd(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(e===null||e.ref!==a)&&(t.flags|=4194816)}}function tp(e,t,a,u,f){if(a.prototype&&typeof a.prototype.render=="function"){var m=V(a)||"Unknown";N5[m]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",m,m),N5[m]=!0)}return t.mode&Pa&&So.recordLegacyContextWarning(t,null),e===null&&(np(t,t.type),a.contextTypes&&(m=V(a)||"Unknown",B5[m]||(B5[m]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",m)))),Uo(t),U(t),a=Io(e,t,a,u,void 0,f),u=_a(),ne(),e!==null&&!da?(Kr(e,t,f),pr(e,t,f)):(zn&&u&&Of(t),t.flags|=1,Ai(e,t,a,f),t.child)}function Ym(e,t,a,u,f,m){return Uo(t),U(t),wc=-1,M1=e!==null&&e.type!==t.type,t.updateQueue=null,a=Kc(t,u,a,f),Bd(e,t),u=_a(),ne(),e!==null&&!da?(Kr(e,t,m),pr(e,t,m)):(zn&&u&&Of(t),t.flags|=1,Ai(e,t,a,m),t.child)}function Xm(e,t,a,u,f){switch(y(t)){case!1:var m=t.stateNode,I=new t.type(t.memoizedProps,m.context).state;m.updater.enqueueSetState(m,I,null);break;case!0:t.flags|=128,t.flags|=65536,m=Error("Simulated error coming from DevTools");var oe=f&-f;if(t.lanes|=oe,I=ti,I===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");oe=vi(oe),Zd(oe,I,t,Xa(m,t)),Zc(t,oe)}if(Uo(t),t.stateNode===null){if(I=Pu,m=a.contextType,"contextType"in a&&m!==null&&(m===void 0||m.$$typeof!==Ss)&&!j5.has(a)&&(j5.add(a),oe=m===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof m!="object"?" However, it is set to a "+typeof m+".":m.$$typeof===qp?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(m).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",V(a)||"Component",oe)),typeof m=="object"&&m!==null&&(I=ei(m)),m=new a(u,I),t.mode&Pa){q(!0);try{m=new a(u,I)}finally{q(!1)}}if(I=t.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=pS,t.stateNode=m,m._reactInternals=t,m._reactInternalInstance=C5,typeof a.getDerivedStateFromProps=="function"&&I===null&&(I=V(a)||"Component",k5.has(I)||(k5.add(I),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",I,m.state===null?"null":"undefined",I))),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"){var we=oe=I=null;if(typeof m.componentWillMount=="function"&&m.componentWillMount.__suppressDeprecationWarning!==!0?I="componentWillMount":typeof m.UNSAFE_componentWillMount=="function"&&(I="UNSAFE_componentWillMount"),typeof m.componentWillReceiveProps=="function"&&m.componentWillReceiveProps.__suppressDeprecationWarning!==!0?oe="componentWillReceiveProps":typeof m.UNSAFE_componentWillReceiveProps=="function"&&(oe="UNSAFE_componentWillReceiveProps"),typeof m.componentWillUpdate=="function"&&m.componentWillUpdate.__suppressDeprecationWarning!==!0?we="componentWillUpdate":typeof m.UNSAFE_componentWillUpdate=="function"&&(we="UNSAFE_componentWillUpdate"),I!==null||oe!==null||we!==null){m=V(a)||"Component";var Te=typeof a.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";A5.has(m)||(A5.add(m),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
642
+
643
+ %s uses %s but also contains the following legacy lifecycles:%s%s%s
644
+
645
+ The above lifecycles should be removed. Learn more about this warning here:
646
+ https://react.dev/link/unsafe-component-lifecycles`,m,Te,I!==null?`
647
+ `+I:"",oe!==null?`
648
+ `+oe:"",we!==null?`
649
+ `+we:""))}}m=t.stateNode,I=V(a)||"Component",m.render||(a.prototype&&typeof a.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",I):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",I)),!m.getInitialState||m.getInitialState.isReactClassApproved||m.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",I),m.getDefaultProps&&!m.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",I),m.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",I),a.childContextTypes&&!D5.has(a)&&(D5.add(a),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",I)),a.contextTypes&&!O5.has(a)&&(O5.add(a),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",I)),typeof m.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",I),a.prototype&&a.prototype.isPureReactComponent&&typeof m.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",V(a)||"A pure component"),typeof m.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",I),typeof m.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",I),typeof m.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",I),typeof m.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",I),oe=m.props!==u,m.props!==void 0&&oe&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",I),m.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",I,I),typeof m.getSnapshotBeforeUpdate!="function"||typeof m.componentDidUpdate=="function"||M5.has(a)||(M5.add(a),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",V(a))),typeof m.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",I),typeof m.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",I),typeof a.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",I),(oe=m.state)&&(typeof oe!="object"||sn(oe))&&console.error("%s.state: must be set to an object or null",I),typeof m.getChildContext=="function"&&typeof a.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",I),m=t.stateNode,m.props=u,m.state=t.memoizedState,m.refs={},Aa(t),I=a.contextType,m.context=typeof I=="object"&&I!==null?ei(I):Pu,m.state===u&&(I=V(a)||"Component",E5.has(I)||(E5.add(I),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",I))),t.mode&Pa&&So.recordLegacyContextWarning(t,m),So.recordUnsafeLifecycleWarnings(t,m),m.state=t.memoizedState,I=a.getDerivedStateFromProps,typeof I=="function"&&(fi(t,a,I,u),m.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(I=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),I!==m.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",se(t)||"Component"),pS.enqueueReplaceState(m,m.state,null)),Qc(t,u,m,f),rr(),m.state=t.memoizedState),typeof m.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&xo)!==oi&&(t.flags|=134217728),m=!0}else if(e===null){m=t.stateNode;var Je=t.memoizedProps;oe=Fo(a,Je),m.props=oe;var tt=m.context;we=a.contextType,I=Pu,typeof we=="object"&&we!==null&&(I=ei(we)),Te=a.getDerivedStateFromProps,we=typeof Te=="function"||typeof m.getSnapshotBeforeUpdate=="function",Je=t.pendingProps!==Je,we||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(Je||tt!==I)&&Zf(t,m,u,I),Vu=!1;var Ze=t.memoizedState;m.state=Ze,Qc(t,u,m,f),rr(),tt=t.memoizedState,Je||Ze!==tt||Vu?(typeof Te=="function"&&(fi(t,a,Te,u),tt=t.memoizedState),(oe=Vu||Ff(t,a,oe,u,Ze,tt,I))?(we||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&xo)!==oi&&(t.flags|=134217728)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&xo)!==oi&&(t.flags|=134217728),t.memoizedProps=u,t.memoizedState=tt),m.props=u,m.state=tt,m.context=I,m=oe):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&xo)!==oi&&(t.flags|=134217728),m=!1)}else{m=t.stateNode,Po(e,t),I=t.memoizedProps,we=Fo(a,I),m.props=we,Te=t.pendingProps,Ze=m.context,tt=a.contextType,oe=Pu,typeof tt=="object"&&tt!==null&&(oe=ei(tt)),Je=a.getDerivedStateFromProps,(tt=typeof Je=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(I!==Te||Ze!==oe)&&Zf(t,m,u,oe),Vu=!1,Ze=t.memoizedState,m.state=Ze,Qc(t,u,m,f),rr();var it=t.memoizedState;I!==Te||Ze!==it||Vu||e!==null&&e.dependencies!==null&&Bo(e.dependencies)?(typeof Je=="function"&&(fi(t,a,Je,u),it=t.memoizedState),(we=Vu||Ff(t,a,we,u,Ze,it,oe)||e!==null&&e.dependencies!==null&&Bo(e.dependencies))?(tt||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,it,oe),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,it,oe)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||I===e.memoizedProps&&Ze===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||I===e.memoizedProps&&Ze===e.memoizedState||(t.flags|=1024),t.memoizedProps=u,t.memoizedState=it),m.props=u,m.state=it,m.context=oe,m=we):(typeof m.componentDidUpdate!="function"||I===e.memoizedProps&&Ze===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||I===e.memoizedProps&&Ze===e.memoizedState||(t.flags|=1024),m=!1)}if(oe=m,Wd(e,t),I=(t.flags&128)!==0,oe||I){if(oe=t.stateNode,Ut(t),I&&typeof a.getDerivedStateFromError!="function")a=null,Ts=-1;else{if(U(t),a=l5(oe),t.mode&Pa){q(!0);try{l5(oe)}finally{q(!1)}}ne()}t.flags|=1,e!==null&&I?(t.child=Sg(t,e.child,null,f),t.child=Sg(t,null,a,f)):Ai(e,t,a,f),t.memoizedState=oe.state,e=t.child}else e=pr(e,t,f);return f=t.stateNode,m&&f.props!==u&&(Tg||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",se(t)||"a component"),Tg=!0),e}function Fm(e,t,a,u){return Ul(),t.flags|=256,Ai(e,t,a,u),t.child}function np(e,t){t&&t.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
650
+ %s.childContextTypes = ...`,t.displayName||t.name||"Component"),typeof t.getDerivedStateFromProps=="function"&&(e=V(t)||"Unknown",U5[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),U5[e]=!0)),typeof t.contextType=="object"&&t.contextType!==null&&(t=V(t)||"Unknown",z5[t]||(console.error("%s: Function components do not support contextType.",t),z5[t]=!0))}function Kd(e){return{baseLanes:e,cachePool:pv()}}function ip(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Fs),e}function bv(e,t,a){var u,f=t.pendingProps;p(t)&&(t.flags|=128);var m=!1,I=(t.flags&128)!==0;if((u=I)||(u=e!==null&&e.memoizedState===null?!1:(aa.current&E1)!==0),u&&(m=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(zn){if(m?Za(t):Ps(t),zn){var oe=Ei,we;if(!(we=!oe)){e:{var Te=oe;for(we=pl;Te.nodeType!==8;){if(!we){we=null;break e}if(Te=Ki(Te.nextSibling),Te===null){we=null;break e}}we=Te}we!==null?(js(),t.memoizedState={dehydrated:we,treeContext:Bh!==null?{id:vc,overflow:bc}:null,retryLane:536870912,hydrationErrors:null},Te=Z(18,null,null,oi),Te.stateNode=we,Te.return=t,t.child=Te,is=t,Ei=null,we=!0):we=!1,we=!we}we&&(wm(t,oe),nr(t))}if(oe=t.memoizedState,oe!==null&&(oe=oe.dehydrated,oe!==null))return kr(oe)?t.lanes=32:t.lanes=536870912,null;Qa(t)}return oe=f.children,f=f.fallback,m?(Ps(t),m=t.mode,oe=eh({mode:"hidden",children:oe},m),f=Ro(f,m,a,null),oe.return=t,f.return=t,oe.sibling=f,t.child=oe,m=t.child,m.memoizedState=Kd(a),m.childLanes=ip(e,u,a),t.memoizedState=vS,f):(Za(t),ap(t,oe))}var Je=e.memoizedState;if(Je!==null&&(oe=Je.dehydrated,oe!==null)){if(I)t.flags&256?(Za(t),t.flags&=-257,t=sp(e,t,a)):t.memoizedState!==null?(Ps(t),t.child=e.child,t.flags|=128,t=null):(Ps(t),m=f.fallback,oe=t.mode,f=eh({mode:"visible",children:f.children},oe),m=Ro(m,oe,a,null),m.flags|=2,f.return=t,m.return=t,f.sibling=m,t.child=f,Sg(t,e.child,null,a),f=t.child,f.memoizedState=Kd(a),f.childLanes=ip(e,u,a),t.memoizedState=vS,t=m);else if(Za(t),zn&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),kr(oe)){if(u=oe.nextSibling&&oe.nextSibling.dataset,u){we=u.dgst;var tt=u.msg;Te=u.stck;var Ze=u.cstck}oe=tt,u=we,f=Te,we=m=Ze,m=Error(oe||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),m.stack=f||"",m.digest=u,u=we===void 0?null:we,f={value:m,source:null,stack:u},typeof u=="string"&&Wx.set(m,f),Xc(f),t=sp(e,t,a)}else if(da||Zi(e,t,a,!1),u=(a&e.childLanes)!==0,da||u){if(u=ti,u!==null&&(f=a&-a,f=(f&42)!==0?1:ke(f),f=(f&(u.suspendedLanes|a))!==0?0:f,f!==0&&f!==Je.retryLane))throw Je.retryLane=f,Ma(e,f),bi(u,e,f),R5;oe.data===kc||yp(),t=sp(e,t,a)}else oe.data===kc?(t.flags|=192,t.child=e.child,t=null):(e=Je.treeContext,Ei=Ki(oe.nextSibling),is=t,zn=!0,Uh=null,xc=!1,Nr=null,pl=!1,e!==null&&(js(),Lr[Rr++]=vc,Lr[Rr++]=bc,Lr[Rr++]=Bh,vc=e.id,bc=e.overflow,Bh=t),t=ap(t,f.children),t.flags|=4096);return t}return m?(Ps(t),m=f.fallback,oe=t.mode,we=e.child,Te=we.sibling,f=tr(we,{mode:"hidden",children:f.children}),f.subtreeFlags=we.subtreeFlags&65011712,Te!==null?m=tr(Te,m):(m=Ro(m,oe,a,null),m.flags|=2),m.return=t,f.return=t,f.sibling=m,t.child=f,f=m,m=t.child,oe=e.child.memoizedState,oe===null?oe=Kd(a):(we=oe.cachePool,we!==null?(Te=na._currentValue,we=we.parent!==Te?{parent:Te,pool:Te}:we):we=pv(),oe={baseLanes:oe.baseLanes|a,cachePool:we}),m.memoizedState=oe,m.childLanes=ip(e,u,a),t.memoizedState=vS,f):(Za(t),a=e.child,e=a.sibling,a=tr(a,{mode:"visible",children:f.children}),a.return=t,a.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=a,t.memoizedState=null,a)}function ap(e,t){return t=eh({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function eh(e,t){return e=Z(22,e,null,t),e.lanes=0,e.stateNode={_visibility:nb,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function sp(e,t,a){return Sg(t,e.child,null,a),e=ap(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rp(e,t,a){e.lanes|=t;var u=e.alternate;u!==null&&(u.lanes|=t),Am(e.return,t,a)}function Zm(e,t){var a=sn(e);return e=!a&&typeof z(e)=="function",a||e?(a=a?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",a,t,a),!1):!0}function op(e,t,a,u,f){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:f}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=u,m.tail=a,m.tailMode=f)}function Qm(e,t,a){var u=t.pendingProps,f=u.revealOrder,m=u.tail;if(u=u.children,f!==void 0&&f!=="forwards"&&f!=="backwards"&&f!=="together"&&!H5[f])if(H5[f]=!0,typeof f=="string")switch(f.toLowerCase()){case"together":case"forwards":case"backwards":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',f,f.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',f,f.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',f)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',f);m===void 0||yS[m]||(m!=="collapsed"&&m!=="hidden"?(yS[m]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',m)):f!=="forwards"&&f!=="backwards"&&(yS[m]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',m)));e:if((f==="forwards"||f==="backwards")&&u!==void 0&&u!==null&&u!==!1)if(sn(u)){for(var I=0;I<u.length;I++)if(!Zm(u[I],I))break e}else if(I=z(u),typeof I=="function"){if(I=I.call(u))for(var oe=I.next(),we=0;!oe.done;oe=I.next()){if(!Zm(oe.value,we))break e;we++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',f);if(Ai(e,t,u,a),u=aa.current,(u&E1)!==0)u=u&wg|E1,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rp(e,a,t);else if(e.tag===19)rp(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}u&=wg}switch(X(aa,u,t),f){case"forwards":for(a=t.child,f=null;a!==null;)e=a.alternate,e!==null&&ao(e)===null&&(f=a),a=a.sibling;a=f,a===null?(f=t.child,t.child=null):(f=a.sibling,a.sibling=null),op(t,!1,f,a,m);break;case"backwards":for(a=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&ao(e)===null){t.child=f;break}e=f.sibling,f.sibling=a,a=f,f=e}op(t,!0,a,null,m);break;case"together":op(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pr(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ts=-1,Gu|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Zi(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error("Resuming work not yet implemented.");if(t.child!==null){for(e=t.child,a=tr(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=tr(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function lp(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bo(e)))}function Lx(e,t,a){switch(t.tag){case 3:A(t,t.stateNode.containerInfo),zo(t,na,e.memoizedState.cache),Ul();break;case 27:case 5:E(t);break;case 4:A(t,t.stateNode.containerInfo);break;case 10:zo(t,t.type,t.memoizedProps.value);break;case 12:(a&t.childLanes)!==0&&(t.flags|=4),t.flags|=2048;var u=t.stateNode;u.effectDuration=-0,u.passiveEffectDuration=-0;break;case 13:if(u=t.memoizedState,u!==null)return u.dehydrated!==null?(Za(t),t.flags|=128,null):(a&t.child.childLanes)!==0?bv(e,t,a):(Za(t),e=pr(e,t,a),e!==null?e.sibling:null);Za(t);break;case 19:var f=(e.flags&128)!==0;if(u=(a&t.childLanes)!==0,u||(Zi(e,t,a,!1),u=(a&t.childLanes)!==0),f){if(u)return Qm(e,t,a);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),X(aa,aa.current,t),u)break;return null;case 22:case 23:return t.lanes=0,Kf(e,t,a);case 24:zo(t,na,e.memoizedState.cache)}return pr(e,t,a)}function cp(e,t,a){if(t._debugNeedsRemount&&e!==null){a=_f(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes),a._debugStack=t._debugStack,a._debugTask=t._debugTask;var u=t.return;if(u===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,a.index=t.index,a.sibling=t.sibling,a.return=t.return,a.ref=t.ref,a._debugInfo=t._debugInfo,t===u.child)u.child=a;else{var f=u.child;if(f===null)throw Error("Expected parent to have a child.");for(;f.sibling!==t;)if(f=f.sibling,f===null)throw Error("Expected to find the previous sibling.");f.sibling=a}return t=u.deletions,t===null?(u.deletions=[e],u.flags|=16):t.push(e),a.flags|=2,a}if(e!==null)if(e.memoizedProps!==t.pendingProps||t.type!==e.type)da=!0;else{if(!lp(e,a)&&(t.flags&128)===0)return da=!1,Lx(e,t,a);da=(e.flags&131072)!==0}else da=!1,(u=zn)&&(js(),u=(t.flags&1048576)!==0),u&&(u=t.index,js(),dv(t,ab,u));switch(t.lanes=0,t.tag){case 16:e:if(u=t.pendingProps,e=Iu(t.elementType),t.type=e,typeof e=="function")bm(e)?(u=Fo(e,u),t.tag=1,t.type=e=Nl(e),t=Xm(null,t,e,u,a)):(t.tag=0,np(t,e),t.type=e=Nl(e),t=tp(null,t,e,u,a));else{if(e!=null){if(f=e.$$typeof,f===fo){t.tag=11,t.type=e=vm(e),t=Wf(null,t,e,u,a);break e}else if(f===Th){t.tag=14,t=fr(null,t,e,u,a);break e}}throw t="",e!==null&&typeof e=="object"&&e.$$typeof===es&&(t=" Did you wrap a component in React.lazy() more than once?"),e=V(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+e+". Lazy element type must resolve to a class or function."+t)}return t;case 0:return tp(e,t,t.type,t.pendingProps,a);case 1:return u=t.type,f=Fo(u,t.pendingProps),Xm(e,t,u,f,a);case 3:e:{if(A(t,t.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");u=t.pendingProps;var m=t.memoizedState;f=m.element,Po(e,t),Qc(t,u,null,a);var I=t.memoizedState;if(u=I.cache,zo(t,na,u),u!==m.cache&&Em(t,[na],a,!0),rr(),u=I.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:I.cache},t.updateQueue.baseState=m,t.memoizedState=m,t.flags&256){t=Fm(e,t,u,a);break e}else if(u!==f){f=Xa(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t),Xc(f),t=Fm(e,t,u,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ei=Ki(e.firstChild),is=t,zn=!0,Uh=null,xc=!1,Nr=null,pl=!0,e=w5(t,null,u,a),t.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling}else{if(Ul(),u===f){t=pr(e,t,a);break e}Ai(e,t,u,a)}t=t.child}return t;case 26:return Wd(e,t),e===null?(e=ho(t.type,null,t.pendingProps,null))?t.memoizedState=e:zn||(e=t.type,a=t.pendingProps,u=H(Ar.current),u=xn(u).createElement(e),u[ua]=t,u[Ua]=a,Si(u,e,a),Ge(u),t.stateNode=u):t.memoizedState=ho(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return E(t),e===null&&zn&&(u=H(Ar.current),f=T(),u=t.stateNode=N0(t.type,t.pendingProps,u,f,!1),xc||(f=Zn(u,t.type,t.pendingProps,f),f!==null&&(Ls(t,0).serverProps=f)),is=t,pl=!0,f=Ei,Tr(t.type)?(VS=f,Ei=Ki(u.firstChild)):Ei=f),Ai(e,t,t.pendingProps.children,a),Wd(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&zn&&(m=T(),u=xf(t.type,m.ancestorInfo),f=Ei,(I=!f)||(I=tl(f,t.type,t.pendingProps,pl),I!==null?(t.stateNode=I,xc||(m=Zn(I,t.type,t.pendingProps,m),m!==null&&(Ls(t,0).serverProps=m)),is=t,Ei=Ki(I.firstChild),pl=!1,m=!0):m=!1,I=!m),I&&(u&&wm(t,f),nr(t))),E(t),f=t.type,m=t.pendingProps,I=e!==null?e.memoizedProps:null,u=m.children,Cr(f,m)?u=null:I!==null&&Cr(f,I)&&(t.flags|=32),t.memoizedState!==null&&(f=Io(e,t,hs,null,null,a),I1._currentValue=f),Wd(e,t),Ai(e,t,u,a),t.child;case 6:return e===null&&zn&&(e=t.pendingProps,a=T(),u=a.ancestorInfo.current,e=u!=null?Td(e,u.tag,a.ancestorInfo.implicitRootScope):!0,a=Ei,(u=!a)||(u=Wi(a,t.pendingProps,pl),u!==null?(t.stateNode=u,is=t,Ei=null,u=!0):u=!1,u=!u),u&&(e&&wm(t,a),nr(t))),null;case 13:return bv(e,t,a);case 4:return A(t,t.stateNode.containerInfo),u=t.pendingProps,e===null?t.child=Sg(t,null,u,a):Ai(e,t,u,a),t.child;case 11:return Wf(e,t,t.type,t.pendingProps,a);case 7:return Ai(e,t,t.pendingProps,a),t.child;case 8:return Ai(e,t,t.pendingProps.children,a),t.child;case 12:return t.flags|=4,t.flags|=2048,u=t.stateNode,u.effectDuration=-0,u.passiveEffectDuration=-0,Ai(e,t,t.pendingProps.children,a),t.child;case 10:return u=t.type,f=t.pendingProps,m=f.value,"value"in f||P5||(P5=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),zo(t,u,m),Ai(e,t,f.children,a),t.child;case 9:return f=t.type._context,u=t.pendingProps.children,typeof u!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Uo(t),f=ei(f),U(t),u=dS(u,f,void 0),ne(),t.flags|=1,Ai(e,t,u,a),t.child;case 14:return fr(e,t,t.type,t.pendingProps,a);case 15:return Jd(e,t,t.type,t.pendingProps,a);case 19:return Qm(e,t,a);case 31:return u=t.pendingProps,a=t.mode,u={mode:u.mode,children:u.children},e===null?(e=eh(u,a),e.ref=t.ref,t.child=e,e.return=t,t=e):(e=tr(e.child,u),e.ref=t.ref,t.child=e,e.return=t,t=e),t;case 22:return Kf(e,t,a);case 24:return Uo(t),u=ei(na),e===null?(f=Dm(),f===null&&(f=ti,m=Rd(),f.pooledCache=m,Hl(m),m!==null&&(f.pooledCacheLanes|=a),f=m),t.memoizedState={parent:u,cache:f},Aa(t),zo(t,na,f)):((e.lanes&a)!==0&&(Po(e,t),Qc(t,null,null,a),rr()),f=e.memoizedState,m=t.memoizedState,f.parent!==u?(f={parent:u,cache:u},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),zo(t,na,u)):(u=m.cache,zo(t,na,u),u!==f.cache&&Em(t,[na],a,!0))),Ai(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Da(e){e.flags|=4}function th(e,t){if(t.type!=="stylesheet"||(t.state.loading&Pr)!==Kh)e.flags&=-16777217;else if(e.flags|=16777216,!gh(t)){if(t=Hr.current,t!==null&&((wn&4194048)===wn?ml!==null:(wn&62914560)!==wn&&(wn&536870912)===0||t!==ml))throw T1=aS,QC;e.flags|=8192}}function nh(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ne():536870912,e.lanes|=t,Xh|=t)}function Zo(e,t){if(!zn)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function Yn(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,u=0;if(t)if((e.mode&wa)!==oi){for(var f=e.selfBaseDuration,m=e.child;m!==null;)a|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,f+=m.treeBaseDuration,m=m.sibling;e.treeBaseDuration=f}else for(f=e.child;f!==null;)a|=f.lanes|f.childLanes,u|=f.subtreeFlags&65011712,u|=f.flags&65011712,f.return=e,f=f.sibling;else if((e.mode&wa)!==oi){f=e.actualDuration,m=e.selfBaseDuration;for(var I=e.child;I!==null;)a|=I.lanes|I.childLanes,u|=I.subtreeFlags,u|=I.flags,f+=I.actualDuration,m+=I.treeBaseDuration,I=I.sibling;e.actualDuration=f,e.treeBaseDuration=m}else for(f=e.child;f!==null;)a|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=u,e.childLanes=a,t}function xv(e,t,a){var u=t.pendingProps;switch(Df(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yn(t),null;case 1:return Yn(t),null;case 3:return a=t.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),t.memoizedState.cache!==u&&(t.flags|=2048),Jr(na,t),S(t),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Bl(t)?(Mm(),Da(t)):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,km())),Yn(t),null;case 26:return a=t.memoizedState,e===null?(Da(t),a!==null?(Yn(t),th(t,a)):(Yn(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Da(t),Yn(t),th(t,a)):(Yn(t),t.flags&=-16777217):(e.memoizedProps!==u&&Da(t),Yn(t),t.flags&=-16777217),null;case 27:P(t),a=H(Ar.current);var f=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==u&&Da(t);else{if(!u){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Yn(t),null}e=T(),Bl(t)?Cm(t):(e=N0(f,u,a,e,!0),t.stateNode=e,Da(t))}return Yn(t),null;case 5:if(P(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==u&&Da(t);else{if(!u){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Yn(t),null}if(f=T(),Bl(t))Cm(t);else{switch(e=H(Ar.current),xf(a,f.ancestorInfo),f=f.context,e=xn(e),f){case Lg:e=e.createElementNS(Hu,a);break;case Db:e=e.createElementNS(Nh,a);break;default:switch(a){case"svg":e=e.createElementNS(Hu,a);break;case"math":e=e.createElementNS(Nh,a);break;case"script":e=e.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof u.is=="string"?e.createElement("select",{is:u.is}):e.createElement("select"),u.multiple?e.multiple=!0:u.size&&(e.size=u.size);break;default:e=typeof u.is=="string"?e.createElement(a,{is:u.is}):e.createElement(a),a.indexOf("-")===-1&&(a!==a.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",a),Object.prototype.toString.call(e)!=="[object HTMLUnknownElement]"||go.call(s7,a)||(s7[a]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",a)))}}e[ua]=t,e[Ua]=u;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)e.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=e;e:switch(Si(e,a,u),a){case"button":case"input":case"select":case"textarea":e=!!u.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Da(t)}}return Yn(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==u&&Da(t);else{if(typeof u!="string"&&t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=H(Ar.current),a=T(),Bl(t)){e=t.stateNode,a=t.memoizedProps,f=!xc,u=null;var m=is;if(m!==null)switch(m.tag){case 3:f&&(f=Np(e,a,u),f!==null&&(Ls(t,0).serverProps=f));break;case 27:case 5:u=m.memoizedProps,f&&(f=Np(e,a,u),f!==null&&(Ls(t,0).serverProps=f))}e[ua]=t,e=!!(e.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||k0(e.nodeValue,a)),e||nr(t)}else f=a.ancestorInfo.current,f!=null&&Td(u,f.tag,a.ancestorInfo.implicitRootScope),e=xn(e).createTextNode(u),e[ua]=t,t.stateNode=e}return Yn(t),null;case 13:if(u=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Bl(t),u!==null&&u.dehydrated!==null){if(e===null){if(!f)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");f[ua]=t,Yn(t),(t.mode&wa)!==oi&&u!==null&&(f=t.child,f!==null&&(t.treeBaseDuration-=f.treeBaseDuration))}else Mm(),Ul(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4,Yn(t),(t.mode&wa)!==oi&&u!==null&&(f=t.child,f!==null&&(t.treeBaseDuration-=f.treeBaseDuration));f=!1}else f=km(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(Qa(t),t):(Qa(t),null)}return Qa(t),(t.flags&128)!==0?(t.lanes=a,(t.mode&wa)!==oi&&ar(t),t):(a=u!==null,e=e!==null&&e.memoizedState!==null,a&&(u=t.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==f&&(u.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),nh(t,t.updateQueue),Yn(t),(t.mode&wa)!==oi&&a&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return S(t),e===null&&C0(t.stateNode.containerInfo),Yn(t),null;case 10:return Jr(t.type,t),Yn(t),null;case 19:if(L(aa,t),f=t.memoizedState,f===null)return Yn(t),null;if(u=(t.flags&128)!==0,m=f.rendering,m===null)if(u)Zo(f,!1);else{if(_i!==Tc||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=ao(e),m!==null){for(t.flags|=128,Zo(f,!1),e=m.updateQueue,t.updateQueue=e,nh(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)xm(a,e),a=a.sibling;return X(aa,aa.current&wg|E1,t),t.child}e=e.sibling}f.tail!==null&&Er()>bb&&(t.flags|=128,u=!0,Zo(f,!1),t.lanes=4194304)}else{if(!u)if(e=ao(m),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,nh(t,e),Zo(f,!0),f.tail===null&&f.tailMode==="hidden"&&!m.alternate&&!zn)return Yn(t),null}else 2*Er()-f.renderingStartTime>bb&&a!==536870912&&(t.flags|=128,u=!0,Zo(f,!1),t.lanes=4194304);f.isBackwards?(m.sibling=t.child,t.child=m):(e=f.last,e!==null?e.sibling=m:t.child=m,f.last=m)}return f.tail!==null?(e=f.tail,f.rendering=e,f.tail=e.sibling,f.renderingStartTime=Er(),e.sibling=null,a=aa.current,a=u?a&wg|E1:a&wg,X(aa,a,t),e):(Yn(t),null);case 22:case 23:return Qa(t),Bs(t),u=t.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(t.flags|=8192):u&&(t.flags|=8192),u?(a&536870912)!==0&&(t.flags&128)===0&&(Yn(t),t.subtreeFlags&6&&(t.flags|=8192)):Yn(t),a=t.updateQueue,a!==null&&nh(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),u=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(u=t.memoizedState.cachePool.pool),u!==a&&(t.flags|=2048),e!==null&&L(Vh,t),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Jr(na,t),Yn(t),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Sv(e,t){switch(Df(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&wa)!==oi&&ar(t),t):null;case 3:return Jr(na,t),S(t),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return P(t),null;case 13:if(Qa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Ul()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&wa)!==oi&&ar(t),t):null;case 19:return L(aa,t),null;case 4:return S(t),null;case 10:return Jr(t.type,t),null;case 22:case 23:return Qa(t),Bs(t),e!==null&&L(Vh,t),e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&wa)!==oi&&ar(t),t):null;case 24:return Jr(na,t),null;case 25:return null;default:return null}}function Jm(e,t){switch(Df(t),t.tag){case 3:Jr(na,t),S(t);break;case 26:case 27:case 5:P(t);break;case 4:S(t);break;case 13:Qa(t);break;case 19:L(aa,t);break;case 10:Jr(t.type,t);break;case 22:case 23:Qa(t),Bs(t),e!==null&&L(Vh,t);break;case 24:Jr(na,t)}}function Vs(e){return(e.mode&wa)!==oi}function Wm(e,t){Vs(e)?(Ns(),Fl(t,e),cs()):Fl(t,e)}function up(e,t,a){Vs(e)?(Ns(),Zl(a,e,t),cs()):Zl(a,e,t)}function Fl(e,t){try{var a=t.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var f=u.next;a=f;do{if((a.tag&e)===e&&((e&ia)!==zr?Mt!==null&&typeof Mt.markComponentPassiveEffectMountStarted=="function"&&Mt.markComponentPassiveEffectMountStarted(t):(e&Ca)!==zr&&Mt!==null&&typeof Mt.markComponentLayoutEffectMountStarted=="function"&&Mt.markComponentLayoutEffectMountStarted(t),u=void 0,(e&as)!==zr&&(Dg=!0),u=nt(t,hE,a),(e&as)!==zr&&(Dg=!1),(e&ia)!==zr?Mt!==null&&typeof Mt.markComponentPassiveEffectMountStopped=="function"&&Mt.markComponentPassiveEffectMountStopped():(e&Ca)!==zr&&Mt!==null&&typeof Mt.markComponentLayoutEffectMountStopped=="function"&&Mt.markComponentLayoutEffectMountStopped(),u!==void 0&&typeof u!="function")){var m=void 0;m=(a.tag&Ca)!==0?"useLayoutEffect":(a.tag&as)!==0?"useInsertionEffect":"useEffect";var I=void 0;I=u===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof u.then=="function"?`
651
+
652
+ It looks like you wrote `+m+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
653
+
654
+ `+m+`(() => {
655
+ async function fetchData() {
656
+ // You can await here
657
+ const response = await MyAPI.getData(someId);
658
+ // ...
659
+ }
660
+ fetchData();
661
+ }, [someId]); // Or [] if effect doesn't need props or state
662
+
663
+ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+u,nt(t,function(oe,we){console.error("%s must not return anything besides a function, which is used for clean-up.%s",oe,we)},m,I)}a=a.next}while(a!==f)}}catch(oe){Ft(t,t.return,oe)}}function Zl(e,t,a){try{var u=t.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var m=f.next;u=m;do{if((u.tag&e)===e){var I=u.inst,oe=I.destroy;oe!==void 0&&(I.destroy=void 0,(e&ia)!==zr?Mt!==null&&typeof Mt.markComponentPassiveEffectUnmountStarted=="function"&&Mt.markComponentPassiveEffectUnmountStarted(t):(e&Ca)!==zr&&Mt!==null&&typeof Mt.markComponentLayoutEffectUnmountStarted=="function"&&Mt.markComponentLayoutEffectUnmountStarted(t),(e&as)!==zr&&(Dg=!0),f=t,nt(f,fE,f,a,oe),(e&as)!==zr&&(Dg=!1),(e&ia)!==zr?Mt!==null&&typeof Mt.markComponentPassiveEffectUnmountStopped=="function"&&Mt.markComponentPassiveEffectUnmountStopped():(e&Ca)!==zr&&Mt!==null&&typeof Mt.markComponentLayoutEffectUnmountStopped=="function"&&Mt.markComponentLayoutEffectUnmountStopped())}u=u.next}while(u!==m)}}catch(we){Ft(t,t.return,we)}}function Km(e,t){Vs(e)?(Ns(),Fl(t,e),cs()):Fl(t,e)}function ih(e,t,a){Vs(e)?(Ns(),Zl(a,e,t),cs()):Zl(a,e,t)}function e0(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||Tg||(a.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",se(e)||"instance"),a.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",se(e)||"instance"));try{nt(e,gv,t,a)}catch(u){Ft(e,e.return,u)}}}function wv(e,t,a){return e.getSnapshotBeforeUpdate(t,a)}function Rx(e,t){var a=t.memoizedProps,u=t.memoizedState;t=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||Tg||(t.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",se(e)||"instance"),t.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",se(e)||"instance"));try{var f=Fo(e.type,a,e.elementType===e.type),m=nt(e,wv,t,f,u);a=V5,m!==void 0||a.has(e.type)||(a.add(e.type),nt(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",se(e))})),t.__reactInternalSnapshotBeforeUpdate=m}catch(I){Ft(e,e.return,I)}}function dp(e,t,a){a.props=Fo(e.type,e.memoizedProps),a.state=e.memoizedState,Vs(e)?(Ns(),nt(e,p5,e,t,a),cs()):nt(e,p5,e,t,a)}function Cv(e){var t=e.ref;if(t!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}if(typeof t=="function")if(Vs(e))try{Ns(),e.refCleanup=t(a)}finally{cs()}else e.refCleanup=t(a);else typeof t=="string"?console.error("String refs are no longer supported."):t.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",se(e)),t.current=a}}function uu(e,t){try{nt(e,Cv,e)}catch(a){Ft(e,t,a)}}function ys(e,t){var a=e.ref,u=e.refCleanup;if(a!==null)if(typeof u=="function")try{if(Vs(e))try{Ns(),nt(e,u)}finally{cs(e)}else nt(e,u)}catch(f){Ft(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{if(Vs(e))try{Ns(),nt(e,a,null)}finally{cs(e)}else nt(e,a,null)}catch(f){Ft(e,t,f)}else a.current=null}function t0(e,t,a,u){var f=e.memoizedProps,m=f.id,I=f.onCommit;f=f.onRender,t=t===null?"mount":"update",ob&&(t="nested-update"),typeof f=="function"&&f(m,t,e.actualDuration,e.treeBaseDuration,e.actualStartTime,a),typeof I=="function"&&I(e.memoizedProps.id,t,u,a)}function Tv(e,t,a,u){var f=e.memoizedProps;e=f.id,f=f.onPostCommit,t=t===null?"mount":"update",ob&&(t="nested-update"),typeof f=="function"&&f(e,t,u,a)}function kv(e){var t=e.type,a=e.memoizedProps,u=e.stateNode;try{nt(e,co,u,t,a,e)}catch(f){Ft(e,e.return,f)}}function n0(e,t,a){try{nt(e,wi,e.stateNode,e.type,a,t,e)}catch(u){Ft(e,e.return,u)}}function i0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Tr(e.type)||e.tag===4}function Ql(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||i0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Tr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ah(e,t,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=lo));else if(u!==4&&(u===27&&Tr(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(ah(e,t,a),e=e.sibling;e!==null;)ah(e,t,a),e=e.sibling}function Jl(e,t,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(u!==4&&(u===27&&Tr(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Jl(e,t,a),e=e.sibling;e!==null;)Jl(e,t,a),e=e.sibling}function Mv(e){for(var t,a=e.return;a!==null;){if(i0(a)){t=a;break}a=a.return}if(t==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(t.tag){case 27:t=t.stateNode,a=Ql(e),Jl(e,a,t);break;case 5:a=t.stateNode,t.flags&32&&(uo(a),t.flags&=-33),t=Ql(e),Jl(e,t,a);break;case 3:case 4:t=t.stateNode.containerInfo,a=Ql(e),ah(e,a,t);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function a0(e){var t=e.stateNode,a=e.memoizedProps;try{nt(e,Ka,e.type,a,t,e)}catch(u){Ft(e,e.return,u)}}function hp(e,t){if(e=e.containerInfo,US=Nb,e=rv(e),mm(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var f=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var I=0,oe=-1,we=-1,Te=0,Je=0,tt=e,Ze=null;t:for(;;){for(var it;tt!==a||f!==0&&tt.nodeType!==3||(oe=I+f),tt!==m||u!==0&&tt.nodeType!==3||(we=I+u),tt.nodeType===3&&(I+=tt.nodeValue.length),(it=tt.firstChild)!==null;)Ze=tt,tt=it;for(;;){if(tt===e)break t;if(Ze===a&&++Te===f&&(oe=I),Ze===m&&++Je===u&&(we=I),(it=tt.nextSibling)!==null)break;tt=Ze,Ze=tt.parentNode}tt=it}a=oe===-1||we===-1?null:{start:oe,end:we}}else a=null}a=a||{start:0,end:0}}else a=null;for(HS={focusedElem:e,selectionRange:a},Nb=!1,ha=t;ha!==null;)if(t=ha,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,ha=e;else for(;ha!==null;){switch(e=t=ha,a=e.alternate,f=e.flags,e.tag){case 0:break;case 11:case 15:break;case 1:(f&1024)!==0&&a!==null&&Rx(e,a);break;case 3:if((f&1024)!==0){if(e=e.stateNode.containerInfo,a=e.nodeType,a===9)Su(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Su(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((f&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(e=t.sibling,e!==null){e.return=t.return,ha=e;break}ha=t.return}}function s0(e,t,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:gr(e,a),u&4&&Wm(a,Ca|Br);break;case 1:if(gr(e,a),u&4)if(e=a.stateNode,t===null)a.type.defaultProps||"ref"in a.memoizedProps||Tg||(e.props!==a.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",se(a)||"instance"),e.state!==a.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",se(a)||"instance")),Vs(a)?(Ns(),nt(a,hS,a,e),cs()):nt(a,hS,a,e);else{var f=Fo(a.type,t.memoizedProps);t=t.memoizedState,a.type.defaultProps||"ref"in a.memoizedProps||Tg||(e.props!==a.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",se(a)||"instance"),e.state!==a.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",se(a)||"instance")),Vs(a)?(Ns(),nt(a,d5,a,e,f,t,e.__reactInternalSnapshotBeforeUpdate),cs()):nt(a,d5,a,e,f,t,e.__reactInternalSnapshotBeforeUpdate)}u&64&&e0(a),u&512&&uu(a,a.return);break;case 3:if(t=Rs(),gr(e,a),u&64&&(u=a.updateQueue,u!==null)){if(f=null,a.child!==null)switch(a.child.tag){case 27:case 5:f=a.child.stateNode;break;case 1:f=a.child.stateNode}try{nt(a,gv,u,f)}catch(I){Ft(a,a.return,I)}}e.effectDuration+=Ho(t);break;case 27:t===null&&u&4&&a0(a);case 26:case 5:gr(e,a),t===null&&u&4&&kv(a),u&512&&uu(a,a.return);break;case 12:if(u&4){u=Rs(),gr(e,a),e=a.stateNode,e.effectDuration+=Pl(u);try{nt(a,t0,a,t,rb,e.effectDuration)}catch(I){Ft(a,a.return,I)}}else gr(e,a);break;case 13:gr(e,a),u&4&&du(e,a),u&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=hh.bind(null,a),wu(e,a))));break;case 22:if(u=a.memoizedState!==null||Cc,!u){t=t!==null&&t.memoizedState!==null||Ni,f=Cc;var m=Ni;Cc=u,(Ni=t)&&!m?mr(e,a,(a.subtreeFlags&8772)!==0):gr(e,a),Cc=f,Ni=m}break;case 30:break;default:gr(e,a)}}function r0(e){var t=e.alternate;t!==null&&(e.alternate=null,r0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Me(t)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function so(e,t,a){for(a=a.child;a!==null;)Wl(e,t,a),a=a.sibling}function Wl(e,t,a){if(ea&&typeof ea.onCommitFiberUnmount=="function")try{ea.onCommitFiberUnmount(ll,a)}catch(m){Ba||(Ba=!0,console.error("React instrumentation encountered an error: %s",m))}switch(a.tag){case 26:Ni||ys(a,t),so(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ni||ys(a,t);var u=Gi,f=ks;Tr(a.type)&&(Gi=a.stateNode,ks=!1),so(e,t,a),nt(a,Tu,a.stateNode),Gi=u,ks=f;break;case 5:Ni||ys(a,t);case 6:if(u=Gi,f=ks,Gi=null,so(e,t,a),Gi=u,ks=f,Gi!==null)if(ks)try{nt(a,bu,Gi,a.stateNode)}catch(m){Ft(a,t,m)}else try{nt(a,xs,Gi,a.stateNode)}catch(m){Ft(a,t,m)}break;case 18:Gi!==null&&(ks?(e=Gi,xu(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),dc(e)):xu(Gi,a.stateNode));break;case 4:u=Gi,f=ks,Gi=a.stateNode.containerInfo,ks=!0,so(e,t,a),Gi=u,ks=f;break;case 0:case 11:case 14:case 15:Ni||Zl(as,a,t),Ni||up(a,t,Ca),so(e,t,a);break;case 1:Ni||(ys(a,t),u=a.stateNode,typeof u.componentWillUnmount=="function"&&dp(a,t,u)),so(e,t,a);break;case 21:so(e,t,a);break;case 22:Ni=(u=Ni)||a.memoizedState!==null,so(e,t,a),Ni=u;break;default:so(e,t,a)}}function du(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{nt(t,Wa,e)}catch(a){Ft(t,t.return,a)}}function fp(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $5),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $5),t;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function Kl(e,t){var a=fp(e);t.forEach(function(u){var f=Ko.bind(null,e,u);if(!a.has(u)){if(a.add(u),Ti)if(kg!==null&&Mg!==null)yu(Mg,kg);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");u.then(f,f)}})}function oa(e,t){var a=t.deletions;if(a!==null)for(var u=0;u<a.length;u++){var f=e,m=t,I=a[u],oe=m;e:for(;oe!==null;){switch(oe.tag){case 27:if(Tr(oe.type)){Gi=oe.stateNode,ks=!1;break e}break;case 5:Gi=oe.stateNode,ks=!1;break e;case 3:case 4:Gi=oe.stateNode.containerInfo,ks=!0;break e}oe=oe.return}if(Gi===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Wl(f,m,I),Gi=null,ks=!1,f=I,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)o0(t,e),t=t.sibling}function o0(e,t){var a=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:oa(t,e),ja(e),u&4&&(Zl(as|Br,e,e.return),Fl(as|Br,e),up(e,e.return,Ca|Br));break;case 1:oa(t,e),ja(e),u&512&&(Ni||a===null||ys(a,a.return)),u&64&&Cc&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var f=Co;if(oa(t,e),ja(e),u&512&&(Ni||a===null||ys(a,a.return)),u&4)if(t=a!==null?a.memoizedState:null,u=e.memoizedState,a===null)if(u===null)if(e.stateNode===null){e:{u=e.type,a=e.memoizedProps,t=f.ownerDocument||f;t:switch(u){case"title":f=t.getElementsByTagName("title")[0],(!f||f[Nu]||f[ua]||f.namespaceURI===Hu||f.hasAttribute("itemprop"))&&(f=t.createElement(u),t.head.insertBefore(f,t.querySelector("head > title"))),Si(f,u,a),f[ua]=e,Ge(f),u=f;break e;case"link":var m=H0("link","href",t).get(u+(a.href||""));if(m){for(var I=0;I<m.length;I++)if(f=m[I],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){m.splice(I,1);break t}}f=t.createElement(u),Si(f,u,a),t.head.appendChild(f);break;case"meta":if(m=H0("meta","content",t).get(u+(a.content||""))){for(I=0;I<m.length;I++)if(f=m[I],me(a.content,"content"),f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){m.splice(I,1);break t}}f=t.createElement(u),Si(f,u,a),t.head.appendChild(f);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+u+'". This is a bug in React.')}f[ua]=e,Ge(f),u=f}e.stateNode=u}else P0(f,e.type,e.stateNode);else e.stateNode=zp(f,u,e.memoizedProps);else t!==u?(t===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):t.count--,u===null?P0(f,e.type,e.stateNode):zp(f,u,e.memoizedProps)):u===null&&e.stateNode!==null&&n0(e,e.memoizedProps,a.memoizedProps);break;case 27:oa(t,e),ja(e),u&512&&(Ni||a===null||ys(a,a.return)),a!==null&&u&4&&n0(e,e.memoizedProps,a.memoizedProps);break;case 5:if(oa(t,e),ja(e),u&512&&(Ni||a===null||ys(a,a.return)),e.flags&32){t=e.stateNode;try{nt(e,uo,t)}catch(Je){Ft(e,e.return,Je)}}u&4&&e.stateNode!=null&&(t=e.memoizedProps,n0(e,t,a!==null?a.memoizedProps:t)),u&1024&&(bS=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(oa(t,e),ja(e),u&4){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");u=e.memoizedProps,a=a!==null?a.memoizedProps:u,t=e.stateNode;try{nt(e,oc,t,a,u)}catch(Je){Ft(e,e.return,Je)}}break;case 3:if(f=Rs(),jb=null,m=Co,Co=ph(t.containerInfo),oa(t,e),Co=m,ja(e),u&4&&a!==null&&a.memoizedState.isDehydrated)try{nt(e,R0,t.containerInfo)}catch(Je){Ft(e,e.return,Je)}bS&&(bS=!1,ec(e)),t.effectDuration+=Ho(f);break;case 4:u=Co,Co=ph(e.stateNode.containerInfo),oa(t,e),ja(e),Co=u;break;case 12:u=Rs(),oa(t,e),ja(e),e.stateNode.effectDuration+=Pl(u);break;case 13:oa(t,e),ja(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(kS=Er()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Kl(e,u)));break;case 22:f=e.memoizedState!==null;var oe=a!==null&&a.memoizedState!==null,we=Cc,Te=Ni;if(Cc=we||f,Ni=Te||oe,oa(t,e),Ni=Te,Cc=we,ja(e),u&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&~nb:t._visibility|nb,f&&(a===null||oe||Cc||Ni||la(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){oe=a=t;try{m=oe.stateNode,f?nt(oe,Na,m):nt(oe,j0,oe.stateNode,oe.memoizedProps)}catch(Je){Ft(oe,oe.return,Je)}}}else if(t.tag===6){if(a===null){oe=t;try{I=oe.stateNode,f?nt(oe,D0,I):nt(oe,Lp,I,oe.memoizedProps)}catch(Je){Ft(oe,oe.return,Je)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}u&4&&(u=e.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,Kl(e,a))));break;case 19:oa(t,e),ja(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Kl(e,u)));break;case 30:break;case 21:break;default:oa(t,e),ja(e)}}function ja(e){var t=e.flags;if(t&2){try{nt(e,Mv,e)}catch(a){Ft(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ec(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ec(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function gr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)s0(e,t.alternate,t),t=t.sibling}function Ja(e){switch(e.tag){case 0:case 11:case 14:case 15:up(e,e.return,Ca),la(e);break;case 1:ys(e,e.return);var t=e.stateNode;typeof t.componentWillUnmount=="function"&&dp(e,e.return,t),la(e);break;case 27:nt(e,Tu,e.stateNode);case 26:case 5:ys(e,e.return),la(e);break;case 22:e.memoizedState===null&&la(e);break;case 30:la(e);break;default:la(e)}}function la(e){for(e=e.child;e!==null;)Ja(e),e=e.sibling}function ro(e,t,a,u){var f=a.flags;switch(a.tag){case 0:case 11:case 15:mr(e,a,u),Wm(a,Ca);break;case 1:if(mr(e,a,u),t=a.stateNode,typeof t.componentDidMount=="function"&&nt(a,hS,a,t),t=a.updateQueue,t!==null){e=a.stateNode;try{nt(a,Jc,t,e)}catch(m){Ft(a,a.return,m)}}u&&f&64&&e0(a),uu(a,a.return);break;case 27:a0(a);case 26:case 5:mr(e,a,u),u&&t===null&&f&4&&kv(a),uu(a,a.return);break;case 12:if(u&&f&4){f=Rs(),mr(e,a,u),u=a.stateNode,u.effectDuration+=Pl(f);try{nt(a,t0,a,t,rb,u.effectDuration)}catch(m){Ft(a,a.return,m)}}else mr(e,a,u);break;case 13:mr(e,a,u),u&&f&4&&du(e,a);break;case 22:a.memoizedState===null&&mr(e,a,u),uu(a,a.return);break;case 30:break;default:mr(e,a,u)}}function mr(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;)ro(e,t.alternate,t,a),t=t.sibling}function yr(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&Hl(e),a!=null&&ir(a))}function $s(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(Hl(t),e!=null&&ir(e))}function Xn(e,t,a,u){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)sh(e,t,a,u),t=t.sibling}function sh(e,t,a,u){var f=t.flags;switch(t.tag){case 0:case 11:case 15:Xn(e,t,a,u),f&2048&&Km(t,ia|Br);break;case 1:Xn(e,t,a,u);break;case 3:var m=Rs();Xn(e,t,a,u),f&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(Hl(t),a!=null&&ir(a))),e.passiveEffectDuration+=Ho(m);break;case 12:if(f&2048){f=Rs(),Xn(e,t,a,u),e=t.stateNode,e.passiveEffectDuration+=Pl(f);try{nt(t,Tv,t,t.alternate,rb,e.passiveEffectDuration)}catch(oe){Ft(t,t.return,oe)}}else Xn(e,t,a,u);break;case 13:Xn(e,t,a,u);break;case 23:break;case 22:m=t.stateNode;var I=t.alternate;t.memoizedState!==null?m._visibility&yc?Xn(e,t,a,u):hu(e,t):m._visibility&yc?Xn(e,t,a,u):(m._visibility|=yc,Qo(e,t,a,u,(t.subtreeFlags&10256)!==0)),f&2048&&yr(I,t);break;case 24:Xn(e,t,a,u),f&2048&&$s(t.alternate,t);break;default:Xn(e,t,a,u)}}function Qo(e,t,a,u,f){for(f=f&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;)pp(e,t,a,u,f),t=t.sibling}function pp(e,t,a,u,f){var m=t.flags;switch(t.tag){case 0:case 11:case 15:Qo(e,t,a,u,f),Km(t,ia);break;case 23:break;case 22:var I=t.stateNode;t.memoizedState!==null?I._visibility&yc?Qo(e,t,a,u,f):hu(e,t):(I._visibility|=yc,Qo(e,t,a,u,f)),f&&m&2048&&yr(t.alternate,t);break;case 24:Qo(e,t,a,u,f),f&&m&2048&&$s(t.alternate,t);break;default:Qo(e,t,a,u,f)}}function hu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,u=t,f=u.flags;switch(u.tag){case 22:hu(a,u),f&2048&&yr(u.alternate,u);break;case 24:hu(a,u),f&2048&&$s(u.alternate,u);break;default:hu(a,u)}t=t.sibling}}function tc(e){if(e.subtreeFlags&_1)for(e=e.child;e!==null;)Jo(e),e=e.sibling}function Jo(e){switch(e.tag){case 26:tc(e),e.flags&_1&&e.memoizedState!==null&&Bv(Co,e.memoizedState,e.memoizedProps);break;case 5:tc(e);break;case 3:case 4:var t=Co;Co=ph(e.stateNode.containerInfo),tc(e),Co=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=_1,_1=16777216,tc(e),_1=t):tc(e));break;default:tc(e)}}function rh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function fu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var u=t[a];ha=u,c0(u,e)}rh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)l0(e),e=e.sibling}function l0(e){switch(e.tag){case 0:case 11:case 15:fu(e),e.flags&2048&&ih(e,e.return,ia|Br);break;case 3:var t=Rs();fu(e),e.stateNode.passiveEffectDuration+=Ho(t);break;case 12:t=Rs(),fu(e),e.stateNode.passiveEffectDuration+=Pl(t);break;case 22:t=e.stateNode,e.memoizedState!==null&&t._visibility&yc&&(e.return===null||e.return.tag!==13)?(t._visibility&=~yc,oh(e)):fu(e);break;default:fu(e)}}function oh(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var u=t[a];ha=u,c0(u,e)}rh(e)}for(e=e.child;e!==null;)lh(e),e=e.sibling}function lh(e){switch(e.tag){case 0:case 11:case 15:ih(e,e.return,ia),oh(e);break;case 22:var t=e.stateNode;t._visibility&yc&&(t._visibility&=~yc,oh(e));break;default:oh(e)}}function c0(e,t){for(;ha!==null;){var a=ha,u=a;switch(u.tag){case 0:case 11:case 15:ih(u,t,ia);break;case 23:case 22:u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(u=u.memoizedState.cachePool.pool,u!=null&&Hl(u));break;case 24:ir(u.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,ha=u;else e:for(a=e;ha!==null;){u=ha;var f=u.sibling,m=u.return;if(r0(u),u===a){ha=null;break e}if(f!==null){f.return=m,ha=f;break e}ha=m}}}function u0(){gE.forEach(function(e){return e()})}function d0(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||Ke.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function La(e){if((qn&ss)!==Ys&&wn!==0)return wn&-wn;var t=Ke.T;return t!==null?(t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e),e=Ph,e!==0?e:x0()):Be()}function Av(){Fs===0&&(Fs=(wn&536870912)===0||zn?Ae():536870912);var e=Hr.current;return e!==null&&(e.flags|=32),Fs}function bi(e,t,a){if(Dg&&console.error("useInsertionEffect must not schedule updates."),OS&&(xb=!0),(e===ti&&(Fn===Gh||Fn===Yh)||e.cancelPendingCommit!==null)&&(ic(e,0),oo(e,wn,Fs,!1)),fe(e,a),(qn&ss)!==0&&e===ti){if(Ha)switch(t.tag){case 0:case 11:case 15:e=Sn&&se(Sn)||"Unknown",W5.has(e)||(W5.add(e),t=se(t)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",t,e,e));break;case 1:J5||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),J5=!0)}}else Ti&&Ee(e,t,a),Dv(t),e===ti&&((qn&ss)===Ys&&(Yu|=a),_i===qh&&oo(e,wn,Fs,!1)),vs(e)}function Li(e,t,a){if((qn&(ss|To))!==Ys)throw Error("Should not already be working.");var u=!a&&(t&124)===0&&(t&e.expiredLanes)===0||Se(e,t),f=u?f0(e,t):vp(e,t,!0),m=u;do{if(f===Tc){_g&&!u&&oo(e,t,0,!1);break}else{if(a=e.current.alternate,m&&!Ev(a)){f=vp(e,t,!1),m=!1;continue}if(f===Ag){if(m=t,e.errorRecoveryDisabledLanes&m)var I=0;else I=e.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){t=I;e:{f=e;var oe=I;I=N1;var we=f.current.memoizedState.isDehydrated;if(we&&(ic(f,oe).flags|=256),oe=vp(f,oe,!1),oe!==Ag){if(CS&&!we){f.errorRecoveryDisabledLanes|=m,Yu|=m,f=qh;break e}f=rs,rs=I,f!==null&&(rs===null?rs=f:rs.push.apply(rs,f))}f=oe}if(m=!1,f!==Ag)continue}}if(f===D1){ic(e,0),oo(e,t,0,!0);break}e:{switch(u=e,f){case Tc:case D1:throw Error("Root did not complete. This is a bug in React.");case qh:if((t&4194048)!==t)break;case yb:oo(u,t,Fs,!qu);break e;case Ag:rs=null;break;case xS:case I5:break;default:throw Error("Unknown root exit status.")}if(Ke.actQueue!==null)Cp(u,a,t,rs,z1,vb,Fs,Yu,Xh);else{if((t&62914560)===t&&(m=kS+G5-Er(),10<m)){if(oo(u,t,Fs,!qu),ye(u,0,!0)!==0)break e;u.timeoutHandle=r7(Vi.bind(null,u,a,rs,z1,vb,t,Fs,Yu,Xh,qu,f,bE,XC,0),m);break e}Vi(u,a,rs,z1,vb,t,Fs,Yu,Xh,qu,f,yE,XC,0)}}}break}while(!0);vs(e)}function Vi(e,t,a,u,f,m,I,oe,we,Te,Je,tt,Ze,it){if(e.timeoutHandle=Wh,tt=t.subtreeFlags,(tt&8192||(tt&16785408)===16785408)&&($1={stylesheets:null,count:0,unsuspend:zv},Jo(t),tt=Uv(),tt!==null)){e.cancelPendingCommit=tt(Cp.bind(null,e,t,m,a,u,f,I,oe,we,Je,vE,Ze,it)),oo(e,m,I,!Te);return}Cp(e,t,m,a,u,f,I,oe,we)}function Ev(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var f=a[u],m=f.getSnapshot;f=f.value;try{if(!ns(m(),f))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function oo(e,t,a,u){t&=~TS,t&=~Yu,e.suspendedLanes|=t,e.pingedLanes&=~t,u&&(e.warmLanes|=t),u=e.expirationTimes;for(var f=t;0<f;){var m=31-ca(f),I=1<<m;u[m]=-1,f&=~I}a!==0&&ve(e,a,t)}function nc(){return(qn&(ss|To))===Ys?(ac(0),!1):!0}function gp(){if(Sn!==null){if(Fn===Ms)var e=Sn.return;else e=Sn,jf(),Us(e),xg=null,A1=0,e=Sn;for(;e!==null;)Jm(e.alternate,e),e=e.return;Sn=null}}function ic(e,t){var a=e.timeoutHandle;a!==Wh&&(e.timeoutHandle=Wh,jE(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),gp(),ti=e,Sn=a=tr(e.current,null),wn=t,Fn=Ms,Xs=null,qu=!1,_g=Se(e,t),CS=!1,_i=Tc,Xh=Fs=TS=Yu=Gu=0,rs=N1=null,vb=!1,(t&8)!==0&&(t|=t&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=t;0<u;){var f=31-ca(u),m=1<<f;t|=e[f],u&=~m}return yl=t,_d(),t=GC(),1e3<t-qC&&(Ke.recentlyCreatedOwnerStacks=0,qC=t),So.discardPendingWarnings(),a}function ch(e,t){rn=null,Ke.H=gb,Ke.getCurrentStack=null,Ha=!1,ts=null,t===C1||t===ub?(t=Rm(),Fn=L1):t===QC?(t=Rm(),Fn=q5):Fn=t===R5?wS:t!==null&&typeof t=="object"&&typeof t.then=="function"?Eg:j1,Xs=t;var a=Sn;if(a===null)_i=D1,cu(e,Xa(t,e.current));else switch(a.mode&wa&&Wr(a),ne(),Fn){case j1:Mt!==null&&typeof Mt.markComponentErrored=="function"&&Mt.markComponentErrored(a,t,wn);break;case Gh:case Yh:case L1:case Eg:case R1:Mt!==null&&typeof Mt.markComponentSuspended=="function"&&Mt.markComponentSuspended(a,t,wn)}}function mp(){var e=Ke.H;return Ke.H=gb,e===null?gb:e}function h0(){var e=Ke.A;return Ke.A=pE,e}function yp(){_i=qh,qu||(wn&4194048)!==wn&&Hr.current!==null||(_g=!0),(Gu&134217727)===0&&(Yu&134217727)===0||ti===null||oo(ti,wn,Fs,!1)}function vp(e,t,a){var u=qn;qn|=ss;var f=mp(),m=h0();if(ti!==e||wn!==t){if(Ti){var I=e.memoizedUpdaters;0<I.size&&(yu(e,wn),I.clear()),_e(e,t)}z1=null,ic(e,t)}ge(t),t=!1,I=_i;e:do try{if(Fn!==Ms&&Sn!==null){var oe=Sn,we=Xs;switch(Fn){case wS:gp(),I=yb;break e;case L1:case Gh:case Yh:case Eg:Hr.current===null&&(t=!0);var Te=Fn;if(Fn=Ms,Xs=null,Wo(e,oe,we,Te),a&&_g){I=Tc;break e}break;default:Te=Fn,Fn=Ms,Xs=null,Wo(e,oe,we,Te)}}bp(),I=_i;break}catch(Je){ch(e,Je)}while(!0);return t&&e.shellSuspendCounter++,jf(),qn=u,Ke.H=f,Ke.A=m,R(),Sn===null&&(ti=null,wn=0,_d()),I}function bp(){for(;Sn!==null;)g0(Sn)}function f0(e,t){var a=qn;qn|=ss;var u=mp(),f=h0();if(ti!==e||wn!==t){if(Ti){var m=e.memoizedUpdaters;0<m.size&&(yu(e,wn),m.clear()),_e(e,t)}z1=null,bb=Er()+Y5,ic(e,t)}else _g=Se(e,t);ge(t);e:do try{if(Fn!==Ms&&Sn!==null)t:switch(t=Sn,m=Xs,Fn){case j1:Fn=Ms,Xs=null,Wo(e,t,m,j1);break;case Gh:case Yh:if(Lm(m)){Fn=Ms,Xs=null,xp(t);break}t=function(){Fn!==Gh&&Fn!==Yh||ti!==e||(Fn=R1),vs(e)},m.then(t,t);break e;case L1:Fn=R1;break e;case q5:Fn=SS;break e;case R1:Lm(m)?(Fn=Ms,Xs=null,xp(t)):(Fn=Ms,Xs=null,Wo(e,t,m,R1));break;case SS:var I=null;switch(Sn.tag){case 26:I=Sn.memoizedState;case 5:case 27:var oe=Sn;if(!I||gh(I)){Fn=Ms,Xs=null;var we=oe.sibling;if(we!==null)Sn=we;else{var Te=oe.return;Te!==null?(Sn=Te,uh(Te)):Sn=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Fn=Ms,Xs=null,Wo(e,t,m,SS);break;case Eg:Fn=Ms,Xs=null,Wo(e,t,m,Eg);break;case wS:gp(),_i=yb;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}Ke.actQueue!==null?bp():p0();break}catch(Je){ch(e,Je)}while(!0);return jf(),Ke.H=u,Ke.A=f,qn=a,Sn!==null?(Mt!==null&&typeof Mt.markRenderYielded=="function"&&Mt.markRenderYielded(),Tc):(R(),ti=null,wn=0,_d(),_i)}function p0(){for(;Sn!==null&&!Gv();)g0(Sn)}function g0(e){var t=e.alternate;(e.mode&wa)!==oi?(Lf(e),t=nt(e,cp,t,e,yl),Wr(e)):t=nt(e,cp,t,e,yl),e.memoizedProps=e.pendingProps,t===null?uh(e):Sn=t}function xp(e){var t=nt(e,Sp,e);e.memoizedProps=e.pendingProps,t===null?uh(e):Sn=t}function Sp(e){var t=e.alternate,a=(e.mode&wa)!==oi;switch(a&&Lf(e),e.tag){case 15:case 0:t=Ym(t,e,e.pendingProps,e.type,void 0,wn);break;case 11:t=Ym(t,e,e.pendingProps,e.type.render,e.ref,wn);break;case 5:Us(e);default:Jm(t,e),e=Sn=xm(e,yl),t=cp(t,e,yl)}return a&&Wr(e),t}function Wo(e,t,a,u){jf(),Us(t),xg=null,A1=0;var f=t.return;try{if(Qd(e,f,t,a,wn)){_i=D1,cu(e,Xa(a,e.current)),Sn=null;return}}catch(m){if(f!==null)throw Sn=f,m;_i=D1,cu(e,Xa(a,e.current)),Sn=null;return}t.flags&32768?(zn||u===j1?e=!0:_g||(wn&536870912)!==0?e=!1:(qu=e=!0,(u===Gh||u===Yh||u===L1||u===Eg)&&(u=Hr.current,u!==null&&u.tag===13&&(u.flags|=16384))),wp(t,e)):uh(t)}function uh(e){var t=e;do{if((t.flags&32768)!==0){wp(t,qu);return}var a=t.alternate;if(e=t.return,Lf(t),a=nt(t,xv,a,t,yl),(t.mode&wa)!==oi&&Vl(t),a!==null){Sn=a;return}if(t=t.sibling,t!==null){Sn=t;return}Sn=t=e}while(t!==null);_i===Tc&&(_i=I5)}function wp(e,t){do{var a=Sv(e.alternate,e);if(a!==null){a.flags&=32767,Sn=a;return}if((e.mode&wa)!==oi){Vl(e),a=e.actualDuration;for(var u=e.child;u!==null;)a+=u.actualDuration,u=u.sibling;e.actualDuration=a}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Sn=e;return}Sn=e=a}while(e!==null);_i=yb,Sn=null}function Cp(e,t,a,u,f,m,I,oe,we){e.cancelPendingCommit=null;do pu();while(Ta!==Fh);if(So.flushLegacyContextWarning(),So.flushPendingUnsafeLifecycleWarnings(),(qn&(ss|To))!==Ys)throw Error("Should not already be working.");if(Mt!==null&&typeof Mt.markCommitStarted=="function"&&Mt.markCommitStarted(a),t===null)j();else{if(a===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),t===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(m=t.lanes|t.childLanes,m|=Kx,pe(e,a,m,I,oe,we),e===ti&&(Sn=ti=null,wn=0),Og=t,Fu=e,Zu=a,AS=m,ES=f,Q5=u,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,b0(ju,function(){return dh(),null})):(e.callbackNode=null,e.callbackPriority=0),rb=gg(),u=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||u){u=Ke.T,Ke.T=null,f=Wt.p,Wt.p=ta,I=qn,qn|=To;try{hp(e,t,a)}finally{qn=I,Wt.p=f,Ke.T=u}}Ta=X5,vr(),Tp(),_v()}}function vr(){if(Ta===X5){Ta=Fh;var e=Fu,t=Og,a=Zu,u=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||u){u=Ke.T,Ke.T=null;var f=Wt.p;Wt.p=ta;var m=qn;qn|=To;try{kg=a,Mg=e,o0(t,e),Mg=kg=null,a=HS;var I=rv(e.containerInfo),oe=a.focusedElem,we=a.selectionRange;if(I!==oe&&oe&&oe.ownerDocument&&sv(oe.ownerDocument.documentElement,oe)){if(we!==null&&mm(oe)){var Te=we.start,Je=we.end;if(Je===void 0&&(Je=Te),"selectionStart"in oe)oe.selectionStart=Te,oe.selectionEnd=Math.min(Je,oe.value.length);else{var tt=oe.ownerDocument||document,Ze=tt&&tt.defaultView||window;if(Ze.getSelection){var it=Ze.getSelection(),zt=oe.textContent.length,Kt=Math.min(we.start,zt),ni=we.end===void 0?Kt:Math.min(we.end,zt);!it.extend&&Kt>ni&&(I=ni,ni=Kt,Kt=I);var Mn=gm(oe,Kt),De=gm(oe,ni);if(Mn&&De&&(it.rangeCount!==1||it.anchorNode!==Mn.node||it.anchorOffset!==Mn.offset||it.focusNode!==De.node||it.focusOffset!==De.offset)){var je=tt.createRange();je.setStart(Mn.node,Mn.offset),it.removeAllRanges(),Kt>ni?(it.addRange(je),it.extend(De.node,De.offset)):(je.setEnd(De.node,De.offset),it.addRange(je))}}}}for(tt=[],it=oe;it=it.parentNode;)it.nodeType===1&&tt.push({element:it,left:it.scrollLeft,top:it.scrollTop});for(typeof oe.focus=="function"&&oe.focus(),oe=0;oe<tt.length;oe++){var Ue=tt[oe];Ue.element.scrollLeft=Ue.left,Ue.element.scrollTop=Ue.top}}Nb=!!US,HS=US=null}finally{qn=m,Wt.p=f,Ke.T=u}}e.current=t,Ta=F5}}function Tp(){if(Ta===F5){Ta=Fh;var e=Fu,t=Og,a=Zu,u=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||u){u=Ke.T,Ke.T=null;var f=Wt.p;Wt.p=ta;var m=qn;qn|=To;try{Mt!==null&&typeof Mt.markLayoutEffectsStarted=="function"&&Mt.markLayoutEffectsStarted(a),kg=a,Mg=e,s0(e,t.alternate,t),Mg=kg=null,Mt!==null&&typeof Mt.markLayoutEffectsStopped=="function"&&Mt.markLayoutEffectsStopped()}finally{qn=m,Wt.p=f,Ke.T=u}}Ta=Z5}}function _v(){if(Ta===xE||Ta===Z5){Ta=Fh,$x();var e=Fu,t=Og,a=Zu,u=Q5,f=(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0;f?Ta=MS:(Ta=Fh,Og=Fu=null,br(e,e.pendingLanes),Zh=0,U1=null);var m=e.pendingLanes;if(m===0&&(Xu=null),f||mu(e),f=Le(a),t=t.stateNode,ea&&typeof ea.onCommitFiberRoot=="function")try{var I=(t.current.flags&128)===128;switch(f){case ta:var oe=Xp;break;case Gs:oe=Ah;break;case yo:oe=ju;break;case Jp:oe=Eh;break;default:oe=ju}ea.onCommitFiberRoot(ll,t,oe,I)}catch(tt){Ba||(Ba=!0,console.error("React instrumentation encountered an error: %s",tt))}if(Ti&&e.memoizedUpdaters.clear(),u0(),u!==null){I=Ke.T,oe=Wt.p,Wt.p=ta,Ke.T=null;try{var we=e.onRecoverableError;for(t=0;t<u.length;t++){var Te=u[t],Je=Ov(Te.stack);nt(Te.source,we,Te.value,Je)}}finally{Ke.T=I,Wt.p=oe}}(Zu&3)!==0&&pu(),vs(e),m=e.pendingLanes,(a&4194090)!==0&&(m&42)!==0?(lb=!0,e===_S?B1++:(B1=0,_S=e)):B1=0,ac(0),j()}}function Ov(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function br(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ir(t)))}function pu(e){return vr(),Tp(),_v(),dh()}function dh(){if(Ta!==MS)return!1;var e=Fu,t=AS;AS=0;var a=Le(Zu),u=yo>a?yo:a;a=Ke.T;var f=Wt.p;try{Wt.p=u,Ke.T=null,u=ES,ES=null;var m=Fu,I=Zu;if(Ta=Fh,Og=Fu=null,Zu=0,(qn&(ss|To))!==Ys)throw Error("Cannot flush passive effects while already rendering.");OS=!0,xb=!1,Mt!==null&&typeof Mt.markPassiveEffectsStarted=="function"&&Mt.markPassiveEffectsStarted(I);var oe=qn;if(qn|=To,l0(m.current),sh(m,m.current,I,u),Mt!==null&&typeof Mt.markPassiveEffectsStopped=="function"&&Mt.markPassiveEffectsStopped(),mu(m),qn=oe,ac(0,!1),xb?m===U1?Zh++:(Zh=0,U1=m):Zh=0,xb=OS=!1,ea&&typeof ea.onPostCommitFiberRoot=="function")try{ea.onPostCommitFiberRoot(ll,m)}catch(Te){Ba||(Ba=!0,console.error("React instrumentation encountered an error: %s",Te))}var we=m.current.stateNode;return we.effectDuration=0,we.passiveEffectDuration=0,!0}finally{Wt.p=f,Ke.T=a,br(e,t)}}function gu(e,t,a){t=Xa(a,t),t=ra(e.stateNode,t,2),e=zs(e,t,2),e!==null&&(fe(e,2),vs(e))}function Ft(e,t,a){if(Dg=!1,e.tag===3)gu(e,e,a);else{for(;t!==null;){if(t.tag===3){gu(t,e,a);return}if(t.tag===1){var u=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Xu===null||!Xu.has(u))){e=Xa(a,e),a=vi(2),u=zs(t,a,2),u!==null&&(Zd(a,u,t,e),fe(u,2),vs(u));return}}t=t.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
664
+
665
+ Error message:
666
+
667
+ %s`,a)}}function m0(e,t,a){var u=e.pingCache;if(u===null){u=e.pingCache=new mE;var f=new Set;u.set(t,f)}else f=u.get(t),f===void 0&&(f=new Set,u.set(t,f));f.has(a)||(CS=!0,f.add(a),u=Nx.bind(null,e,t,a),Ti&&yu(e,a),t.then(u,u))}function Nx(e,t,a){var u=e.pingCache;u!==null&&u.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,d0()&&Ke.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
668
+
669
+ When testing, code that resolves suspended data should be wrapped into act(...):
670
+
671
+ act(() => {
672
+ /* finish loading suspended data */
673
+ });
674
+ /* assert on the output */
675
+
676
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),ti===e&&(wn&a)===a&&(_i===qh||_i===xS&&(wn&62914560)===wn&&Er()-kS<G5?(qn&ss)===Ys&&ic(e,0):TS|=a,Xh===wn&&(Xh=0)),vs(e)}function y0(e,t){t===0&&(t=Ne()),e=Ma(e,t),e!==null&&(fe(e,t),vs(e))}function hh(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),y0(e,a)}function Ko(e,t){var a=0;switch(e.tag){case 13:var u=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}u!==null&&u.delete(t),y0(e,a)}function kp(e,t,a){if((t.subtreeFlags&67117056)!==0)for(t=t.child;t!==null;){var u=e,f=t,m=f.type===Au;m=a||m,f.tag!==22?f.flags&67108864?m&&nt(f,v0,u,f,(f.mode&VC)===oi):kp(u,f,m):f.memoizedState===null&&(m&&f.flags&8192?nt(f,v0,u,f):f.subtreeFlags&67108864&&nt(f,kp,u,f,m)),t=t.sibling}}function v0(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;q(!0);try{Ja(t),a&&lh(t),ro(e,t.alternate,t,!1),a&&pp(e,t,0,null,!1,0)}finally{q(!1)}}function mu(e){var t=!0;e.current.mode&(Pa|xo)||(t=!1),kp(e,e.current,t)}function Is(e){if((qn&ss)===Ys){var t=e.tag;if(t===3||t===1||t===0||t===11||t===14||t===15){if(t=se(e)||"ReactComponent",Sb!==null){if(Sb.has(t))return;Sb.add(t)}else Sb=new Set([t]);nt(e,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")})}}}function yu(e,t){Ti&&e.memoizedUpdaters.forEach(function(a){Ee(e,a,t)})}function b0(e,t){var a=Ke.actQueue;return a!==null?(a.push(t),CE):Yp(e,t)}function Dv(e){d0()&&Ke.actQueue===null&&nt(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
677
+
678
+ When testing, code that causes React state updates should be wrapped into act(...):
679
+
680
+ act(() => {
681
+ /* fire events that update state */
682
+ });
683
+ /* assert on the output */
684
+
685
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,se(e))})}function vs(e){e!==jg&&e.next===null&&(jg===null?wb=jg=e:jg=jg.next=e),Cb=!0,Ke.actQueue!==null?jS||(jS=!0,Ri()):DS||(DS=!0,Ri())}function ac(e,t){if(!LS&&Cb){LS=!0;do for(var a=!1,u=wb;u!==null;){if(e!==0){var f=u.pendingLanes;if(f===0)var m=0;else{var I=u.suspendedLanes,oe=u.pingedLanes;m=(1<<31-ca(42|e)+1)-1,m&=f&~(I&~oe),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,Ep(u,m))}else m=wn,m=ye(u,u===ti?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==Wh),(m&3)===0||Se(u,m)||(a=!0,Ep(u,m));u=u.next}while(a);LS=!1}}function Mp(){Ap()}function Ap(){Cb=jS=DS=!1;var e=0;Qh!==0&&(vu()&&(e=Qh),Qh=0);for(var t=Er(),a=null,u=wb;u!==null;){var f=u.next,m=xr(u,t);m===0?(u.next=null,a===null?wb=f:a.next=f,f===null&&(jg=a)):(a=u,(e!==0||(m&3)!==0)&&(Cb=!0)),u=f}ac(e)}function xr(e,t){for(var a=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var I=31-ca(m),oe=1<<I,we=f[I];we===-1?((oe&a)===0||(oe&u)!==0)&&(f[I]=Ce(oe,t)):we<=t&&(e.expiredLanes|=oe),m&=~oe}if(t=ti,a=wn,a=ye(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Wh),u=e.callbackNode,a===0||e===t&&(Fn===Gh||Fn===Yh)||e.cancelPendingCommit!==null)return u!==null&&_p(u),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Se(e,a)){if(t=a&-a,t!==e.callbackPriority||Ke.actQueue!==null&&u!==RS)_p(u);else return t;switch(Le(a)){case ta:case Gs:a=Ah;break;case yo:a=ju;break;case Jp:a=Eh;break;default:a=ju}return u=xi.bind(null,e),Ke.actQueue!==null?(Ke.actQueue.push(u),a=RS):a=Yp(a,u),e.callbackPriority=t,e.callbackNode=a,t}return u!==null&&_p(u),e.callbackPriority=2,e.callbackNode=null,2}function xi(e,t){if(lb=ob=!1,Ta!==Fh&&Ta!==MS)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(pu()&&e.callbackNode!==a)return null;var u=wn;return u=ye(e,e===ti?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Wh),u===0?null:(Li(e,u,t),xr(e,Er()),e.callbackNode!=null&&e.callbackNode===a?xi.bind(null,e):null)}function Ep(e,t){if(pu())return null;ob=lb,lb=!1,Li(e,t,!0)}function _p(e){e!==RS&&e!==null&&Vx(e)}function Ri(){Ke.actQueue!==null&&Ke.actQueue.push(function(){return Ap(),null}),LE(function(){(qn&(ss|To))!==Ys?Yp(Xp,Mp):Ap()})}function x0(){return Qh===0&&(Qh=Ae()),Qh}function S0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(me(e,"action"),Gc(""+e))}function w0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function si(e,t,a,u,f){if(t==="submit"&&a&&a.stateNode===f){var m=S0((f[Ua]||null).action),I=u.submitter;I&&(t=(t=I[Ua]||null)?S0(t.formAction):I.getAttribute("formAction"),t!==null&&(m=t,I=null));var oe=new Gt("action","action",null,u,f);e.push({event:oe,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Qh!==0){var we=I?w0(f,I):new FormData(f),Te={pending:!0,data:we,method:f.method,action:m};Object.freeze(Te),Gl(a,Te,null,we)}}else typeof m=="function"&&(oe.preventDefault(),we=I?w0(f,I):new FormData(f),Te={pending:!0,data:we,method:f.method,action:m},Object.freeze(Te),Gl(a,Te,m,we))},currentTarget:f}]})}}function Qi(e,t,a){e.currentTarget=a;try{t(e)}catch(u){gS(u)}e.currentTarget=null}function Sr(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var u=e[a];e:{var f=void 0,m=u.event;if(u=u.listeners,t)for(var I=u.length-1;0<=I;I--){var oe=u[I],we=oe.instance,Te=oe.currentTarget;if(oe=oe.listener,we!==f&&m.isPropagationStopped())break e;we!==null?nt(we,Qi,m,oe,Te):Qi(m,oe,Te),f=we}else for(I=0;I<u.length;I++){if(oe=u[I],we=oe.instance,Te=oe.currentTarget,oe=oe.listener,we!==f&&m.isPropagationStopped())break e;we!==null?nt(we,Qi,m,oe,Te):Qi(m,oe,Te),f=we}}}}function vn(e,t){NS.has(e)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var a=t[Z0];a===void 0&&(a=t[Z0]=new Set);var u=e+"__bubble";a.has(u)||(Dp(t,e,2,!1),a.add(u))}function Op(e,t,a){NS.has(e)&&!t&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var u=0;t&&(u|=4),Dp(a,e,u,t)}function C0(e){if(!e[Tb]){e[Tb]=!0,Xv.forEach(function(a){a!=="selectionchange"&&(NS.has(a)||Op(a,!1,e),Op(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Tb]||(t[Tb]=!0,Op("selectionchange",!1,t))}}function Dp(e,t,a,u){switch($p(t)){case ta:var f=Ux;break;case Gs:f=Vp;break;default:f=il}a=f.bind(null,t,a,e),f=void 0,!Fe||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),u?f!==void 0?e.addEventListener(t,a,{capture:!0,passive:f}):e.addEventListener(t,a,!0):f!==void 0?e.addEventListener(t,a,{passive:f}):e.addEventListener(t,a,!1)}function va(e,t,a,u,f){var m=u;if((t&1)===0&&(t&2)===0&&u!==null)e:for(;;){if(u===null)return;var I=u.tag;if(I===3||I===4){var oe=u.stateNode.containerInfo;if(oe===f)break;if(I===4)for(I=u.return;I!==null;){var we=I.tag;if((we===3||we===4)&&I.stateNode.containerInfo===f)return;I=I.return}for(;oe!==null;){if(I=ze(oe),I===null)return;if(we=I.tag,we===5||we===6||we===26||we===27){u=m=I;continue e}oe=oe.parentNode}}u=u.return}wf(function(){var Te=m,Je=Dl(a),tt=[];e:{var Ze=PC.get(e);if(Ze!==void 0){var it=Gt,zt=e;switch(e){case"keypress":if(Yc(a)===0)break e;case"keydown":case"keyup":it=PA;break;case"focusin":zt="focus",it=An;break;case"focusout":zt="blur",it=An;break;case"beforeblur":case"afterblur":it=An;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":it=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":it=Zt;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":it=IA;break;case zC:case BC:case UC:it=Yx;break;case HC:it=GA;break;case"scroll":case"scrollend":it=qe;break;case"wheel":it=XA;break;case"copy":case"cut":case"paste":it=LA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":it=EC;break;case"toggle":case"beforetoggle":it=ZA}var Kt=(t&4)!==0,ni=!Kt&&(e==="scroll"||e==="scrollend"),Mn=Kt?Ze!==null?Ze+"Capture":null:Ze;Kt=[];for(var De=Te,je;De!==null;){var Ue=De;if(je=Ue.stateNode,Ue=Ue.tag,Ue!==5&&Ue!==26&&Ue!==27||je===null||Mn===null||(Ue=Fr(De,Mn),Ue!=null&&Kt.push(ba(De,Ue,je))),ni)break;De=De.return}0<Kt.length&&(Ze=new it(Ze,zt,null,a,Je),tt.push({event:Ze,listeners:Kt}))}}if((t&7)===0){e:{if(Ze=e==="mouseover"||e==="pointerover",it=e==="mouseout"||e==="pointerout",Ze&&a!==v&&(zt=a.relatedTarget||a.fromElement)&&(ze(zt)||zt[ul]))break e;if((it||Ze)&&(Ze=Je.window===Je?Je:(Ze=Je.ownerDocument)?Ze.defaultView||Ze.parentWindow:window,it?(zt=a.relatedTarget||a.toElement,it=Te,zt=zt?ze(zt):null,zt!==null&&(ni=ee(zt),Kt=zt.tag,zt!==ni||Kt!==5&&Kt!==27&&Kt!==6)&&(zt=null)):(it=null,zt=Te),it!==zt)){if(Kt=mn,Ue="onMouseLeave",Mn="onMouseEnter",De="mouse",(e==="pointerout"||e==="pointerover")&&(Kt=EC,Ue="onPointerLeave",Mn="onPointerEnter",De="pointer"),ni=it==null?Ze:Ve(it),je=zt==null?Ze:Ve(zt),Ze=new Kt(Ue,De+"leave",it,a,Je),Ze.target=ni,Ze.relatedTarget=je,Ue=null,ze(Je)===Te&&(Kt=new Kt(Mn,De+"enter",zt,a,Je),Kt.target=je,Kt.relatedTarget=ni,Ue=Kt),ni=Ue,it&&zt)t:{for(Kt=it,Mn=zt,De=0,je=Kt;je;je=$i(je))De++;for(je=0,Ue=Mn;Ue;Ue=$i(Ue))je++;for(;0<De-je;)Kt=$i(Kt),De--;for(;0<je-De;)Mn=$i(Mn),je--;for(;De--;){if(Kt===Mn||Mn!==null&&Kt===Mn.alternate)break t;Kt=$i(Kt),Mn=$i(Mn)}Kt=null}else Kt=null;it!==null&&T0(tt,Ze,it,Kt,!1),zt!==null&&ni!==null&&T0(tt,ni,zt,Kt,!0)}}e:{if(Ze=Te?Ve(Te):window,it=Ze.nodeName&&Ze.nodeName.toLowerCase(),it==="select"||it==="input"&&Ze.type==="file")var at=fm;else if(tv(Ze))if(RC)at=Dx;else{at=pm;var St=_x}else it=Ze.nodeName,!it||it.toLowerCase()!=="input"||Ze.type!=="checkbox"&&Ze.type!=="radio"?Te&&Ol(Te.elementType)&&(at=fm):at=Ox;if(at&&(at=at(e,Te))){Mf(tt,at,a,Je);break e}St&&St(e,Ze,Te),e==="focusout"&&Te&&Ze.type==="number"&&Te.memoizedProps.value!=null&&an(Ze,"number",Ze.value)}switch(St=Te?Ve(Te):window,e){case"focusin":(tv(St)||St.contentEditable==="true")&&(og=St,Fx=Te,g1=null);break;case"focusout":g1=Fx=og=null;break;case"mousedown":Zx=!0;break;case"contextmenu":case"mouseup":case"dragend":Zx=!1,ov(tt,a,Je);break;case"selectionchange":if(KA)break;case"keydown":case"keyup":ov(tt,a,Je)}var un;if(Xx)e:{switch(e){case"compositionstart":var Bt="onCompositionStart";break e;case"compositionend":Bt="onCompositionEnd";break e;case"compositionupdate":Bt="onCompositionUpdate";break e}Bt=void 0}else rg?ya(e,a)&&(Bt="onCompositionEnd"):e==="keydown"&&a.keyCode===_C&&(Bt="onCompositionStart");Bt&&(OC&&a.locale!=="ko"&&(rg||Bt!=="onCompositionStart"?Bt==="onCompositionEnd"&&rg&&(un=Zr()):(ot=Je,Qe="value"in ot?ot.value:ot.textContent,rg=!0)),St=fh(Te,Bt),0<St.length&&(Bt=new AC(Bt,e,null,a,Je),tt.push({event:Bt,listeners:St}),un?Bt.data=un:(un=Lo(a),un!==null&&(Bt.data=un)))),(un=JA?kf(e,a):Md(e,a))&&(Bt=fh(Te,"onBeforeInput"),0<Bt.length&&(St=new NA("onBeforeInput","beforeinput",null,a,Je),tt.push({event:St,listeners:Bt}),St.data=un)),si(tt,e,Te,a,Je)}Sr(tt,t)})}function ba(e,t,a){return{instance:e,listener:t,currentTarget:a}}function fh(e,t){for(var a=t+"Capture",u=[];e!==null;){var f=e,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=Fr(e,a),f!=null&&u.unshift(ba(e,f,m)),f=Fr(e,t),f!=null&&u.push(ba(e,f,m))),e.tag===3)return u;e=e.return}return[]}function $i(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function T0(e,t,a,u,f){for(var m=t._reactName,I=[];a!==null&&a!==u;){var oe=a,we=oe.alternate,Te=oe.stateNode;if(oe=oe.tag,we!==null&&we===u)break;oe!==5&&oe!==26&&oe!==27||Te===null||(we=Te,f?(Te=Fr(a,m),Te!=null&&I.unshift(ba(a,Te,we))):f||(Te=Fr(a,m),Te!=null&&I.push(ba(a,Te,we)))),a=a.return}I.length!==0&&e.push({event:t,listeners:I})}function wr(e,t){qc(e,t),e!=="input"&&e!=="textarea"&&e!=="select"||t==null||t.value!==null||d1||(d1=!0,e==="select"&&t.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e));var a={registrationNameDependencies:Cs,possibleRegistrationNames:fc};Ol(e)||typeof t.is=="string"||um(e,t,a),t.contentEditable&&!t.suppressContentEditableWarning&&t.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function ri(e,t,a,u){t!==a&&(a=Ji(a),Ji(t)!==a&&(u[e]=t))}function el(e,t,a){t.forEach(function(u){a[M0(u)]=u==="style"?rc(e):e.getAttribute(u)})}function bs(e,t){t===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)}function jp(e,t){return e=e.namespaceURI===Nh||e.namespaceURI===Hu?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=t,e.innerHTML}function Ji(e){return _(e)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",te(e)),re(e)),(typeof e=="string"?e:""+e).replace(TE,`
686
+ `).replace(kE,"")}function k0(e,t){return t=Ji(t),Ji(e)===t}function lo(){}function Rn(e,t,a,u,f,m){switch(a){case"children":typeof u=="string"?(Td(u,t,!1),t==="body"||t==="textarea"&&u===""||_l(e,u)):(typeof u=="number"||typeof u=="bigint")&&(Td(""+u,t,!1),t!=="body"&&_l(e,""+u));break;case"className":xt(e,"class",u);break;case"tabIndex":xt(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":xt(e,a,u);break;case"style":kd(e,u,m);break;case"data":if(t!=="object"){xt(e,"data",u);break}case"src":case"href":if(u===""&&(t!=="a"||a!=="href")){console.error(a==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',a,a),e.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}me(u,a),u=Gc(""+u),e.setAttribute(a,u);break;case"action":case"formAction":if(u!=null&&(t==="form"?a==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof u=="function"&&(f.encType==null&&f.method==null||Ab||(Ab=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),f.target==null||Mb||(Mb=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):t==="input"||t==="button"?a==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):t!=="input"||f.type==="submit"||f.type==="image"||kb?t!=="button"||f.type==null||f.type==="submit"||kb?typeof u=="function"&&(f.name==null||t7||(t7=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),f.formEncType==null&&f.formMethod==null||Ab||(Ab=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),f.formTarget==null||Mb||(Mb=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(kb=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(kb=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(a==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof u=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(a==="formAction"?(t!=="input"&&Rn(e,t,"name",f.name,f,null),Rn(e,t,"formEncType",f.formEncType,f,null),Rn(e,t,"formMethod",f.formMethod,f,null),Rn(e,t,"formTarget",f.formTarget,f,null)):(Rn(e,t,"encType",f.encType,f,null),Rn(e,t,"method",f.method,f,null),Rn(e,t,"target",f.target,f,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}me(u,a),u=Gc(""+u),e.setAttribute(a,u);break;case"onClick":u!=null&&(typeof u!="function"&&bs(a,u),e.onclick=lo);break;case"onScroll":u!=null&&(typeof u!="function"&&bs(a,u),vn("scroll",e));break;case"onScrollEnd":u!=null&&(typeof u!="function"&&bs(a,u),vn("scrollend",e));break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(a=u.__html,a!=null){if(f.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=a}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){e.removeAttribute("xlink:href");break}me(u,a),a=Gc(""+u),e.setAttributeNS(Jh,"xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?(me(u,a),e.setAttribute(a,""+u)):e.removeAttribute(a);break;case"inert":u!==""||Eb[a]||(Eb[a]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",a));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":u===!0?e.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?(me(u,a),e.setAttribute(a,u)):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?(me(u,a),e.setAttribute(a,u)):e.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(a):(me(u,a),e.setAttribute(a,u));break;case"popover":vn("beforetoggle",e),vn("toggle",e),Vt(e,"popover",u);break;case"xlinkActuate":lt(e,Jh,"xlink:actuate",u);break;case"xlinkArcrole":lt(e,Jh,"xlink:arcrole",u);break;case"xlinkRole":lt(e,Jh,"xlink:role",u);break;case"xlinkShow":lt(e,Jh,"xlink:show",u);break;case"xlinkTitle":lt(e,Jh,"xlink:title",u);break;case"xlinkType":lt(e,Jh,"xlink:type",u);break;case"xmlBase":lt(e,zS,"xml:base",u);break;case"xmlLang":lt(e,zS,"xml:lang",u);break;case"xmlSpace":lt(e,zS,"xml:space",u);break;case"is":m!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),Vt(e,"is",u);break;case"innerText":case"textContent":break;case"popoverTarget":n7||u==null||typeof u!="object"||(n7=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",u));default:!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N"?(a=Sf(a),Vt(e,a,u)):Cs.hasOwnProperty(a)&&u!=null&&typeof u!="function"&&bs(a,u)}}function sc(e,t,a,u,f,m){switch(a){case"style":kd(e,u,m);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(a=u.__html,a!=null){if(f.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=a}}break;case"children":typeof u=="string"?_l(e,u):(typeof u=="number"||typeof u=="bigint")&&_l(e,""+u);break;case"onScroll":u!=null&&(typeof u!="function"&&bs(a,u),vn("scroll",e));break;case"onScrollEnd":u!=null&&(typeof u!="function"&&bs(a,u),vn("scrollend",e));break;case"onClick":u!=null&&(typeof u!="function"&&bs(a,u),e.onclick=lo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(Cs.hasOwnProperty(a))u!=null&&typeof u!="function"&&bs(a,u);else e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),t=a.slice(2,f?a.length-7:void 0),m=e[Ua]||null,m=m!=null?m[a]:null,typeof m=="function"&&e.removeEventListener(t,m,f),typeof u=="function")){typeof m!="function"&&m!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,u,f);break e}a in e?e[a]=u:u===!0?e.setAttribute(a,""):Vt(e,a,u)}}}function Si(e,t,a){switch(wr(t,a),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":vn("error",e),vn("load",e);var u=!1,f=!1,m;for(m in a)if(a.hasOwnProperty(m)){var I=a[m];if(I!=null)switch(m){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Rn(e,t,m,I,a,null)}}f&&Rn(e,t,"srcSet",a.srcSet,a,null),u&&Rn(e,t,"src",a.src,a,null);return;case"input":ct("input",a),vn("invalid",e);var oe=m=I=f=null,we=null,Te=null;for(u in a)if(a.hasOwnProperty(u)){var Je=a[u];if(Je!=null)switch(u){case"name":f=Je;break;case"type":I=Je;break;case"checked":we=Je;break;case"defaultChecked":Te=Je;break;case"value":m=Je;break;case"defaultValue":oe=Je;break;case"children":case"dangerouslySetInnerHTML":if(Je!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Rn(e,t,u,Je,a,null)}}Lt(e,a),Jt(e,m,oe,we,Te,I,f,!1),nn(e);return;case"select":ct("select",a),vn("invalid",e),u=I=m=null;for(f in a)if(a.hasOwnProperty(f)&&(oe=a[f],oe!=null))switch(f){case"value":m=oe;break;case"defaultValue":I=oe;break;case"multiple":u=oe;default:Rn(e,t,f,oe,a,null)}Qt(e,a),t=m,a=I,e.multiple=!!u,t!=null?Xt(e,!!u,t,!1):a!=null&&Xt(e,!!u,a,!0);return;case"textarea":ct("textarea",a),vn("invalid",e),m=f=u=null;for(I in a)if(a.hasOwnProperty(I)&&(oe=a[I],oe!=null))switch(I){case"value":u=oe;break;case"defaultValue":f=oe;break;case"children":m=oe;break;case"dangerouslySetInnerHTML":if(oe!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Rn(e,t,I,oe,a,null)}hn(e,a),ga(e,u,f,m),nn(e);return;case"option":ai(e,a);for(we in a)if(a.hasOwnProperty(we)&&(u=a[we],u!=null))switch(we){case"selected":e.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Rn(e,t,we,u,a,null)}return;case"dialog":vn("beforetoggle",e),vn("toggle",e),vn("cancel",e),vn("close",e);break;case"iframe":case"object":vn("load",e);break;case"video":case"audio":for(u=0;u<H1.length;u++)vn(H1[u],e);break;case"image":vn("error",e),vn("load",e);break;case"details":vn("toggle",e);break;case"embed":case"source":case"link":vn("error",e),vn("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Te in a)if(a.hasOwnProperty(Te)&&(u=a[Te],u!=null))switch(Te){case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Rn(e,t,Te,u,a,null)}return;default:if(Ol(t)){for(Je in a)a.hasOwnProperty(Je)&&(u=a[Je],u!==void 0&&sc(e,t,Je,u,a,void 0));return}}for(oe in a)a.hasOwnProperty(oe)&&(u=a[oe],u!=null&&Rn(e,t,oe,u,a,null))}function jv(e,t,a,u){switch(wr(t,u),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,I=null,oe=null,we=null,Te=null,Je=null;for(it in a){var tt=a[it];if(a.hasOwnProperty(it)&&tt!=null)switch(it){case"checked":break;case"value":break;case"defaultValue":we=tt;default:u.hasOwnProperty(it)||Rn(e,t,it,null,u,tt)}}for(var Ze in u){var it=u[Ze];if(tt=a[Ze],u.hasOwnProperty(Ze)&&(it!=null||tt!=null))switch(Ze){case"type":m=it;break;case"name":f=it;break;case"checked":Te=it;break;case"defaultChecked":Je=it;break;case"value":I=it;break;case"defaultValue":oe=it;break;case"children":case"dangerouslySetInnerHTML":if(it!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:it!==tt&&Rn(e,t,Ze,it,u,tt)}}t=a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null,u=u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null,t||!u||e7||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),e7=!0),!t||u||K5||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),K5=!0),en(e,I,oe,we,Te,Je,m,f);return;case"select":it=I=oe=Ze=null;for(m in a)if(we=a[m],a.hasOwnProperty(m)&&we!=null)switch(m){case"value":break;case"multiple":it=we;default:u.hasOwnProperty(m)||Rn(e,t,m,null,u,we)}for(f in u)if(m=u[f],we=a[f],u.hasOwnProperty(f)&&(m!=null||we!=null))switch(f){case"value":Ze=m;break;case"defaultValue":oe=m;break;case"multiple":I=m;default:m!==we&&Rn(e,t,f,m,u,we)}u=oe,t=I,a=it,Ze!=null?Xt(e,!!t,Ze,!1):!!a!=!!t&&(u!=null?Xt(e,!!t,u,!0):Xt(e,!!t,t?[]:"",!1));return;case"textarea":it=Ze=null;for(oe in a)if(f=a[oe],a.hasOwnProperty(oe)&&f!=null&&!u.hasOwnProperty(oe))switch(oe){case"value":break;case"children":break;default:Rn(e,t,oe,null,u,f)}for(I in u)if(f=u[I],m=a[I],u.hasOwnProperty(I)&&(f!=null||m!=null))switch(I){case"value":Ze=f;break;case"defaultValue":it=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:f!==m&&Rn(e,t,I,f,u,m)}gi(e,Ze,it);return;case"option":for(var zt in a)if(Ze=a[zt],a.hasOwnProperty(zt)&&Ze!=null&&!u.hasOwnProperty(zt))switch(zt){case"selected":e.selected=!1;break;default:Rn(e,t,zt,null,u,Ze)}for(we in u)if(Ze=u[we],it=a[we],u.hasOwnProperty(we)&&Ze!==it&&(Ze!=null||it!=null))switch(we){case"selected":e.selected=Ze&&typeof Ze!="function"&&typeof Ze!="symbol";break;default:Rn(e,t,we,Ze,u,it)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Kt in a)Ze=a[Kt],a.hasOwnProperty(Kt)&&Ze!=null&&!u.hasOwnProperty(Kt)&&Rn(e,t,Kt,null,u,Ze);for(Te in u)if(Ze=u[Te],it=a[Te],u.hasOwnProperty(Te)&&Ze!==it&&(Ze!=null||it!=null))switch(Te){case"children":case"dangerouslySetInnerHTML":if(Ze!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Rn(e,t,Te,Ze,u,it)}return;default:if(Ol(t)){for(var ni in a)Ze=a[ni],a.hasOwnProperty(ni)&&Ze!==void 0&&!u.hasOwnProperty(ni)&&sc(e,t,ni,void 0,u,Ze);for(Je in u)Ze=u[Je],it=a[Je],!u.hasOwnProperty(Je)||Ze===it||Ze===void 0&&it===void 0||sc(e,t,Je,Ze,u,it);return}}for(var Mn in a)Ze=a[Mn],a.hasOwnProperty(Mn)&&Ze!=null&&!u.hasOwnProperty(Mn)&&Rn(e,t,Mn,null,u,Ze);for(tt in u)Ze=u[tt],it=a[tt],!u.hasOwnProperty(tt)||Ze===it||Ze==null&&it==null||Rn(e,t,tt,Ze,u,it)}function M0(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function rc(e){var t={};e=e.style;for(var a=0;a<e.length;a++){var u=e[a];t[u]=e.getPropertyValue(u)}return t}function A0(e,t,a){if(t!=null&&typeof t!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var u,f=u="",m;for(m in t)if(t.hasOwnProperty(m)){var I=t[m];I!=null&&typeof I!="boolean"&&I!==""&&(m.indexOf("--")===0?(g(I,m),u+=f+m+":"+(""+I).trim()):typeof I!="number"||I===0||Rh.has(m)?(g(I,m),u+=f+m.replace(vo,"-$1").toLowerCase().replace(bo,"-ms-")+":"+(""+I).trim()):u+=f+m.replace(vo,"-$1").toLowerCase().replace(bo,"-ms-")+":"+I+"px",f=";")}u=u||null,t=e.getAttribute("style"),t!==u&&(u=Ji(u),Ji(t)!==u&&(a.style=rc(e)))}}function xa(e,t,a,u,f,m){if(f.delete(a),e=e.getAttribute(a),e===null)switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":return}else if(u!=null)switch(typeof u){case"function":case"symbol":case"boolean":break;default:if(me(u,t),e===""+u)return}ri(t,e,u,m)}function E0(e,t,a,u,f,m){if(f.delete(a),e=e.getAttribute(a),e===null){switch(typeof u){case"function":case"symbol":return}if(!u)return}else switch(typeof u){case"function":case"symbol":break;default:if(u)return}ri(t,e,u,m)}function _0(e,t,a,u,f,m){if(f.delete(a),e=e.getAttribute(a),e===null)switch(typeof u){case"undefined":case"function":case"symbol":return}else if(u!=null)switch(typeof u){case"function":case"symbol":break;default:if(me(u,a),e===""+u)return}ri(t,e,u,m)}function Lv(e,t,a,u,f,m){if(f.delete(a),e=e.getAttribute(a),e===null)switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(u))return}else if(u!=null)switch(typeof u){case"function":case"symbol":case"boolean":break;default:if(!isNaN(u)&&(me(u,t),e===""+u))return}ri(t,e,u,m)}function Pn(e,t,a,u,f,m){if(f.delete(a),e=e.getAttribute(a),e===null)switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":return}else if(u!=null)switch(typeof u){case"function":case"symbol":case"boolean":break;default:if(me(u,t),a=Gc(""+u),e===a)return}ri(t,e,u,m)}function Zn(e,t,a,u){for(var f={},m=new Set,I=e.attributes,oe=0;oe<I.length;oe++)switch(I[oe].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:m.add(I[oe].name)}if(Ol(t)){for(var we in a)if(a.hasOwnProperty(we)){var Te=a[we];if(Te!=null){if(Cs.hasOwnProperty(we))typeof Te!="function"&&bs(we,Te);else if(a.suppressHydrationWarning!==!0)switch(we){case"children":typeof Te!="string"&&typeof Te!="number"||ri("children",e.textContent,Te,f);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":I=e.innerHTML,Te=Te?Te.__html:void 0,Te!=null&&(Te=jp(e,Te),ri(we,I,Te,f));continue;case"style":m.delete(we),A0(e,Te,f);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":m.delete(we.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",we);continue;case"className":m.delete("class"),I=Rt(e,"class",Te),ri("className",I,Te,f);continue;default:u.context===Mc&&t!=="svg"&&t!=="math"?m.delete(we.toLowerCase()):m.delete(we),I=Rt(e,we,Te),ri(we,I,Te,f)}}}}else for(Te in a)if(a.hasOwnProperty(Te)&&(we=a[Te],we!=null)){if(Cs.hasOwnProperty(Te))typeof we!="function"&&bs(Te,we);else if(a.suppressHydrationWarning!==!0)switch(Te){case"children":typeof we!="string"&&typeof we!="number"||ri("children",e.textContent,we,f);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":I=e.innerHTML,we=we?we.__html:void 0,we!=null&&(we=jp(e,we),I!==we&&(f[Te]={__html:I}));continue;case"className":xa(e,Te,"class",we,m,f);continue;case"tabIndex":xa(e,Te,"tabindex",we,m,f);continue;case"style":m.delete(Te),A0(e,we,f);continue;case"multiple":m.delete(Te),ri(Te,e.multiple,we,f);continue;case"muted":m.delete(Te),ri(Te,e.muted,we,f);continue;case"autoFocus":m.delete("autofocus"),ri(Te,e.autofocus,we,f);continue;case"data":if(t!=="object"){m.delete(Te),I=e.getAttribute("data"),ri(Te,I,we,f);continue}case"src":case"href":if(!(we!==""||t==="a"&&Te==="href"||t==="object"&&Te==="data")){console.error(Te==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',Te,Te);continue}Pn(e,Te,Te,we,m,f);continue;case"action":case"formAction":if(I=e.getAttribute(Te),typeof we=="function"){m.delete(Te.toLowerCase()),Te==="formAction"?(m.delete("name"),m.delete("formenctype"),m.delete("formmethod"),m.delete("formtarget")):(m.delete("enctype"),m.delete("method"),m.delete("target"));continue}else if(I===ME){m.delete(Te.toLowerCase()),ri(Te,"function",we,f);continue}Pn(e,Te,Te.toLowerCase(),we,m,f);continue;case"xlinkHref":Pn(e,Te,"xlink:href",we,m,f);continue;case"contentEditable":_0(e,Te,"contenteditable",we,m,f);continue;case"spellCheck":_0(e,Te,"spellcheck",we,m,f);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":_0(e,Te,Te,we,m,f);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":E0(e,Te,Te.toLowerCase(),we,m,f);continue;case"capture":case"download":e:{oe=e;var Je=I=Te,tt=f;if(m.delete(Je),oe=oe.getAttribute(Je),oe===null)switch(typeof we){case"undefined":case"function":case"symbol":break e;default:if(we===!1)break e}else if(we!=null)switch(typeof we){case"function":case"symbol":break;case"boolean":if(we===!0&&oe==="")break e;break;default:if(me(we,I),oe===""+we)break e}ri(I,oe,we,tt)}continue;case"cols":case"rows":case"size":case"span":e:{if(oe=e,Je=I=Te,tt=f,m.delete(Je),oe=oe.getAttribute(Je),oe===null)switch(typeof we){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(we)||1>we)break e}else if(we!=null)switch(typeof we){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(we)||1>we)&&(me(we,I),oe===""+we))break e}ri(I,oe,we,tt)}continue;case"rowSpan":Lv(e,Te,"rowspan",we,m,f);continue;case"start":Lv(e,Te,Te,we,m,f);continue;case"xHeight":xa(e,Te,"x-height",we,m,f);continue;case"xlinkActuate":xa(e,Te,"xlink:actuate",we,m,f);continue;case"xlinkArcrole":xa(e,Te,"xlink:arcrole",we,m,f);continue;case"xlinkRole":xa(e,Te,"xlink:role",we,m,f);continue;case"xlinkShow":xa(e,Te,"xlink:show",we,m,f);continue;case"xlinkTitle":xa(e,Te,"xlink:title",we,m,f);continue;case"xlinkType":xa(e,Te,"xlink:type",we,m,f);continue;case"xmlBase":xa(e,Te,"xml:base",we,m,f);continue;case"xmlLang":xa(e,Te,"xml:lang",we,m,f);continue;case"xmlSpace":xa(e,Te,"xml:space",we,m,f);continue;case"inert":we!==""||Eb[Te]||(Eb[Te]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",Te)),E0(e,Te,Te,we,m,f);continue;default:if(!(2<Te.length)||Te[0]!=="o"&&Te[0]!=="O"||Te[1]!=="n"&&Te[1]!=="N"){oe=Sf(Te),I=!1,u.context===Mc&&t!=="svg"&&t!=="math"?m.delete(oe.toLowerCase()):(Je=Te.toLowerCase(),Je=mc.hasOwnProperty(Je)&&mc[Je]||null,Je!==null&&Je!==Te&&(I=!0,m.delete(Je)),m.delete(oe));e:if(Je=e,tt=oe,oe=we,_t(tt))if(Je.hasAttribute(tt))Je=Je.getAttribute(tt),me(oe,tt),oe=Je===""+oe?oe:Je;else{switch(typeof oe){case"function":case"symbol":break e;case"boolean":if(Je=tt.toLowerCase().slice(0,5),Je!=="data-"&&Je!=="aria-")break e}oe=oe===void 0?void 0:null}else oe=void 0;I||ri(Te,oe,we,f)}}}return 0<m.size&&a.suppressHydrationWarning!==!0&&el(e,m,f),Object.keys(f).length===0?null:f}function bn(e,t){switch(e.length){case 0:return"";case 1:return e[0];case 2:return e[0]+" "+t+" "+e[1];default:return e.slice(0,-1).join(", ")+", "+t+" "+e[e.length-1]}}function xn(e){return e.nodeType===9?e:e.ownerDocument}function Vn(e){switch(e){case Hu:return Lg;case Nh:return Db;default:return Mc}}function Ra(e,t){if(e===Mc)switch(t){case"svg":return Lg;case"math":return Db;default:return Mc}return e===Lg&&t==="foreignObject"?Mc:e}function Cr(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}function vu(){var e=window.event;return e&&e.type==="popstate"?e===PS?!1:(PS=e,!0):(PS=null,!1)}function O0(e){setTimeout(function(){throw e})}function co(e,t,a){switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&e.focus();break;case"img":a.src?e.src=a.src:a.srcSet&&(e.srcset=a.srcSet)}}function wi(e,t,a,u){jv(e,t,a,u),e[Ua]=u}function uo(e){_l(e,"")}function oc(e,t,a){e.nodeValue=a}function Tr(e){return e==="head"}function xs(e,t){e.removeChild(t)}function bu(e,t){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(t)}function xu(e,t){var a=t,u=0,f=0;do{var m=a.nextSibling;if(e.removeChild(a),m&&m.nodeType===8)if(a=m.data,a===Ob){if(0<u&&8>u){a=u;var I=e.ownerDocument;if(a&EE&&Tu(I.documentElement),a&_E&&Tu(I.body),a&OE)for(a=I.head,Tu(a),I=a.firstChild;I;){var oe=I.nextSibling,we=I.nodeName;I[Nu]||we==="SCRIPT"||we==="STYLE"||we==="LINK"&&I.rel.toLowerCase()==="stylesheet"||a.removeChild(I),I=oe}}if(f===0){e.removeChild(m),dc(t);return}f--}else a===_b||a===kc||a===P1?f++:u=a.charCodeAt(0)-48;else u=0;a=m}while(a);dc(t)}function Na(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function D0(e){e.nodeValue=""}function j0(e,t){t=t[DE],t=t!=null&&t.hasOwnProperty("display")?t.display:null,e.style.display=t==null||typeof t=="boolean"?"":(""+t).trim()}function Lp(e,t){e.nodeValue=t}function Su(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Su(a),Me(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function tl(e,t,a,u){for(;e.nodeType===1;){var f=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[Nu])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(m=e.getAttribute("src"),(m!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){me(f.name,"name");var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===m)return e}else return e;if(e=Ki(e.nextSibling),e===null)break}return null}function Wi(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ki(e.nextSibling),e===null))return null;return e}function kr(e){return e.data===P1||e.data===kc&&e.ownerDocument.readyState===a7}function wu(e,t){var a=e.ownerDocument;if(e.data!==kc||a.readyState===a7)t();else{var u=function(){t(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function Ki(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===_b||t===P1||t===kc||t===BS||t===i7)break;if(t===Ob)return null}}return e}function Rp(e){if(e.nodeType===1){for(var t=e.nodeName.toLowerCase(),a={},u=e.attributes,f=0;f<u.length;f++){var m=u[f];a[M0(m.name)]=m.name.toLowerCase()==="style"?rc(e):m.value}return{type:t,props:a}}return e.nodeType===8?{type:"Suspense",props:{}}:e.nodeValue}function Np(e,t,a){return a===null||a[AE]!==!0?(e.nodeValue===t?e=null:(t=Ji(t),e=Ji(e.nodeValue)===t?null:e.nodeValue),e):null}function L0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a===Ob){if(t===0)return Ki(e.nextSibling);t--}else a!==_b&&a!==P1&&a!==kc||t++}e=e.nextSibling}return null}function Cu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a===_b||a===P1||a===kc){if(t===0)return e;t--}else a===Ob&&t++}e=e.previousSibling}return null}function R0(e){dc(e)}function Wa(e){dc(e)}function N0(e,t,a,u,f){switch(f&&xf(e,u.ancestorInfo),t=xn(a),e){case"html":if(e=t.documentElement,!e)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"head":if(e=t.head,!e)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"body":if(e=t.body,!e)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return e;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function Ka(e,t,a,u){if(!a[ul]&&Xe(a)){var f=a.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",f,f,f)}switch(e){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(f=a.attributes;f.length;)a.removeAttributeNode(f[0]);Si(a,e,t),a[ua]=u,a[Ua]=t}function Tu(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Me(e)}function ph(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function Rv(e,t,a){var u=Rg;if(u&&typeof t=="string"&&t){var f=At(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),u7.has(f)||(u7.add(f),e={rel:e,crossOrigin:a,href:t},u.querySelector(f)===null&&(t=u.createElement("link"),Si(t,"link",e),Ge(t),u.head.appendChild(t)))}}function ho(e,t,a,u){var f=(f=Ar.current)?ph(f):null;if(!f)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=nl(a.href),t=Ie(f).hoistableStyles,u=t.get(a),u||(u={type:"style",instance:null,count:0,state:null},t.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=nl(a.href);var m=Ie(f).hoistableStyles,I=m.get(e);if(!I&&(f=f.ownerDocument||f,I={type:"stylesheet",instance:null,count:0,state:{loading:Kh,preload:null}},m.set(e,I),(m=f.querySelector(Mr(e)))&&!m._p&&(I.instance=m,I.state.loading=V1|Pr),!Vr.has(e))){var oe={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy};Vr.set(e,oe),m||Nv(f,e,oe,I.state)}if(t&&u===null)throw a=`
687
+
688
+ - `+lc(t)+`
689
+ + `+lc(a),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+a);return I}if(t&&u!==null)throw a=`
690
+
691
+ - `+lc(t)+`
692
+ + `+lc(a),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+a);return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(a=cc(a),t=Ie(f).hoistableScripts,u=t.get(a),u||(u={type:"script",instance:null,count:0,state:null},t.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+e+'". this is a bug in React.')}}function lc(e){var t=0,a="<link";return typeof e.rel=="string"?(t++,a+=' rel="'+e.rel+'"'):go.call(e,"rel")&&(t++,a+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(t++,a+=' href="'+e.href+'"'):go.call(e,"href")&&(t++,a+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(t++,a+=' precedence="'+e.precedence+'"'):go.call(e,"precedence")&&(t++,a+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>t&&(a+=" ..."),a+" />"}function nl(e){return'href="'+At(e)+'"'}function Mr(e){return'link[rel="stylesheet"]['+e+"]"}function z0(e){return pn({},e,{"data-precedence":e.precedence,precedence:null})}function Nv(e,t,a,u){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?u.loading=V1:(t=e.createElement("link"),u.preload=t,t.addEventListener("load",function(){return u.loading|=V1}),t.addEventListener("error",function(){return u.loading|=l7}),Si(t,"link",a),Ge(t),e.head.appendChild(t))}function cc(e){return'[src="'+At(e)+'"]'}function uc(e){return"script[async]"+e}function zp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var u=e.querySelector('style[data-href~="'+At(a.href)+'"]');if(u)return t.instance=u,Ge(u),u;var f=pn({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),Ge(u),Si(u,"style",f),Bp(u,a.precedence,e),t.instance=u;case"stylesheet":f=nl(a.href);var m=e.querySelector(Mr(f));if(m)return t.state.loading|=Pr,t.instance=m,Ge(m),m;u=z0(a),(f=Vr.get(f))&&B0(u,f),m=(e.ownerDocument||e).createElement("link"),Ge(m);var I=m;return I._p=new Promise(function(oe,we){I.onload=oe,I.onerror=we}),Si(m,"link",u),t.state.loading|=Pr,Bp(m,a.precedence,e),t.instance=m;case"script":return m=cc(a.src),(f=e.querySelector(uc(m)))?(t.instance=f,Ge(f),f):(u=a,(f=Vr.get(m))&&(u=pn({},a),U0(u,f)),e=e.ownerDocument||e,f=e.createElement("script"),Ge(f),Si(f,"link",u),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+t.type+'". this is a bug in React.')}else t.type==="stylesheet"&&(t.state.loading&Pr)===Kh&&(u=t.instance,t.state.loading|=Pr,Bp(u,a.precedence,e));return t.instance}function Bp(e,t,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,m=f,I=0;I<u.length;I++){var oe=u[I];if(oe.dataset.precedence===t)m=oe;else if(m!==f)break}m?m.parentNode.insertBefore(e,m.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function B0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function U0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}function H0(e,t,a){if(jb===null){var u=new Map,f=jb=new Map;f.set(a,u)}else f=jb,u=f.get(a),u||(u=new Map,f.set(a,u));if(u.has(e))return u;for(u.set(e,null),a=a.getElementsByTagName(e),f=0;f<a.length;f++){var m=a[f];if(!(m[Nu]||m[ua]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!==Hu){var I=m.getAttribute(t)||"";I=e+I;var oe=u.get(I);oe?oe.push(m):u.set(I,[m])}}return u}function P0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function ku(e,t,a){var u=!a.ancestorInfo.containerTagInScope;if(a.context===Lg||t.itemProp!=null)return!u||t.itemProp==null||e!=="meta"&&e!=="title"&&e!=="style"&&e!=="link"&&e!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",e,e),!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href===""){u&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError){if(t.rel==="stylesheet"&&typeof t.precedence=="string"){e=t.href;var f=t.onError,m=t.disabled;a=[],t.onLoad&&a.push("`onLoad`"),f&&a.push("`onError`"),m!=null&&a.push("`disabled`"),f=bn(a,"and"),f+=a.length===1?" prop":" props",m=a.length===1?"an "+f:"the "+f,a.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',e,m,f)}u&&(typeof t.rel!="string"||typeof t.href!="string"||t.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(t.onError||t.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(t.rel){case"stylesheet":return e=t.precedence,t=t.disabled,typeof e!="string"&&u&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof e=="string"&&t==null;default:return!0}case"script":if(e=t.async&&typeof t.async!="function"&&typeof t.async!="symbol",!e||t.onLoad||t.onError||!t.src||typeof t.src!="string"){u&&(e?t.onLoad||t.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":u&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",e)}return!1}function gh(e){return!(e.type==="stylesheet"&&(e.state.loading&c7)===Kh)}function zv(){}function Bv(e,t,a){if($1===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var u=$1;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&Pr)===Kh){if(t.instance===null){var f=nl(a.href),m=e.querySelector(Mr(f));if(m){e=m._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(u.count++,u=mh.bind(u),e.then(u,u)),t.state.loading|=Pr,t.instance=m,Ge(m);return}m=e.ownerDocument||e,a=z0(a),(f=Vr.get(f))&&B0(a,f),m=m.createElement("link"),Ge(m);var I=m;I._p=new Promise(function(oe,we){I.onload=oe,I.onerror=we}),Si(m,"link",a),t.instance=m}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&c7)===Kh&&(u.count++,t=mh.bind(u),e.addEventListener("load",t),e.addEventListener("error",t))}}function Uv(){if($1===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var e=$1;return e.stylesheets&&e.count===0&&Up(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&Up(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function mh(){if(this.count--,this.count===0){if(this.stylesheets)Up(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function Up(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Lb=new Map,t.forEach(Hv,e),Lb=null,mh.call(e))}function Hv(e,t){if(!(t.state.loading&Pr)){var a=Lb.get(e);if(a)var u=a.get($S);else{a=new Map,Lb.set(e,a);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var I=f[m];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(a.set(I.dataset.precedence,I),u=I)}u&&a.set($S,u)}f=t.instance,I=f.getAttribute("data-precedence"),m=a.get(I)||u,m===u&&a.set($S,f),a.set(I,f),this.count++,u=mh.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),m?m.parentNode.insertBefore(f,m.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=Pr}}function Hp(e,t,a,u,f,m,I,oe){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Wh,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Re(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Re(0),this.hiddenUpdates=Re(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=oe,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],t=0;31>t;t++)e.push(new Set);this._debugRootType=a?"hydrateRoot()":"createRoot()"}function V0(e,t,a,u,f,m,I,oe,we,Te,Je,tt){return e=new Hp(e,t,a,I,oe,we,Te,tt),t=iE,m===!0&&(t|=Pa|xo),Ti&&(t|=wa),m=Z(3,null,null,t),e.current=m,m.stateNode=e,t=Rd(),Hl(t),e.pooledCache=t,Hl(t),m.memoizedState={element:u,isDehydrated:a,cache:t},Aa(m),e}function $0(e){return e?(e=Pu,e):Pu}function In(e,t,a,u,f,m){if(ea&&typeof ea.onScheduleFiberRoot=="function")try{ea.onScheduleFiberRoot(ll,u,a)}catch(I){Ba||(Ba=!0,console.error("React instrumentation encountered an error: %s",I))}Mt!==null&&typeof Mt.markRenderScheduled=="function"&&Mt.markRenderScheduled(t),f=$0(f),u.context===null?u.context=f:u.pendingContext=f,Ha&&ts!==null&&!p7&&(p7=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
693
+
694
+ Check the render method of %s.`,se(ts)||"Unknown")),u=sr(t),u.payload={element:a},m=m===void 0?null:m,m!==null&&(typeof m!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",m),u.callback=m),a=zs(e,u,t),a!==null&&(bi(a,e,t),Vo(a,e,t))}function Pp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function I0(e,t){Pp(e,t),(e=e.alternate)&&Pp(e,t)}function q0(e){if(e.tag===13){var t=Ma(e,67108864);t!==null&&bi(t,e,67108864),I0(e,67108864)}}function zx(){return ts}function Bx(){for(var e=new Map,t=1,a=0;31>a;a++){var u=ue(t);e.set(t,u),t*=2}return e}function Ux(e,t,a,u){var f=Ke.T;Ke.T=null;var m=Wt.p;try{Wt.p=ta,il(e,t,a,u)}finally{Wt.p=m,Ke.T=f}}function Vp(e,t,a,u){var f=Ke.T;Ke.T=null;var m=Wt.p;try{Wt.p=Gs,il(e,t,a,u)}finally{Wt.p=m,Ke.T=f}}function il(e,t,a,u){if(Nb){var f=yh(u);if(f===null)va(e,t,u,zb,a),al(e,u);else if(vh(f,e,t,a,u))u.stopPropagation();else if(al(e,u),t&4&&-1<NE.indexOf(e)){for(;f!==null;){var m=Xe(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var I=de(m.pendingLanes);if(I!==0){var oe=m;for(oe.pendingLanes|=2,oe.entangledLanes|=2;I;){var we=1<<31-ca(I);oe.entanglements[1]|=we,I&=~we}vs(m),(qn&(ss|To))===Ys&&(bb=Er()+Y5,ac(0))}}break;case 13:oe=Ma(m,2),oe!==null&&bi(oe,m,2),nc(),I0(m,2)}if(m=yh(u),m===null&&va(e,t,u,zb,a),m===f)break;f=m}f!==null&&u.stopPropagation()}else va(e,t,u,null,a)}}function yh(e){return e=Dl(e),Mu(e)}function Mu(e){if(zb=null,e=ze(e),e!==null){var t=ee(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=B(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return zb=e,null}function $p(e){switch(e){case"beforetoggle":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"toggle":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 ta;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return Gs;case"message":switch(ol()){case Xp:return ta;case Ah:return Gs;case ju:case Ix:return yo;case Eh:return Jp;default:return yo}default:return yo}}function al(e,t){switch(e){case"focusin":case"focusout":Qu=null;break;case"dragenter":case"dragleave":Ju=null;break;case"mouseover":case"mouseout":Wu=null;break;case"pointerover":case"pointerout":q1.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":G1.delete(t.pointerId)}}function za(e,t,a,u,f,m){return e===null||e.nativeEvent!==m?(e={blockedOn:t,domEventName:a,eventSystemFlags:u,nativeEvent:m,targetContainers:[f]},t!==null&&(t=Xe(t),t!==null&&q0(t)),e):(e.eventSystemFlags|=u,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function vh(e,t,a,u,f){switch(t){case"focusin":return Qu=za(Qu,e,t,a,u,f),!0;case"dragenter":return Ju=za(Ju,e,t,a,u,f),!0;case"mouseover":return Wu=za(Wu,e,t,a,u,f),!0;case"pointerover":var m=f.pointerId;return q1.set(m,za(q1.get(m)||null,e,t,a,u,f)),!0;case"gotpointercapture":return m=f.pointerId,G1.set(m,za(G1.get(m)||null,e,t,a,u,f)),!0}return!1}function Pv(e){var t=ze(e.target);if(t!==null){var a=ee(t);if(a!==null){if(t=a.tag,t===13){if(t=B(a),t!==null){e.blockedOn=t,$e(e.priority,function(){if(a.tag===13){var u=La(a);u=ke(u);var f=Ma(a,u);f!==null&&bi(f,a,u),I0(a,u)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function bh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=yh(e.nativeEvent);if(a===null){a=e.nativeEvent;var u=new a.constructor(a.type,a),f=u;v!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),v=f,a.target.dispatchEvent(u),v===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),v=null}else return t=Xe(a),t!==null&&q0(t),e.blockedOn=a,!1;t.shift()}return!0}function G0(e,t,a){bh(e)&&a.delete(t)}function Vv(){IS=!1,Qu!==null&&bh(Qu)&&(Qu=null),Ju!==null&&bh(Ju)&&(Ju=null),Wu!==null&&bh(Wu)&&(Wu=null),q1.forEach(G0),G1.forEach(G0)}function xh(e,t){e.blockedOn===t&&(e.blockedOn=null,IS||(IS=!0,Ci.unstable_scheduleCallback(Ci.unstable_NormalPriority,Vv)))}function $v(e){Bb!==e&&(Bb=e,Ci.unstable_scheduleCallback(Ci.unstable_NormalPriority,function(){Bb===e&&(Bb=null);for(var t=0;t<e.length;t+=3){var a=e[t],u=e[t+1],f=e[t+2];if(typeof u!="function"){if(Mu(u||a)===null)continue;break}var m=Xe(a);m!==null&&(e.splice(t,3),t-=3,a={pending:!0,data:f,method:a.method,action:u},Object.freeze(a),Gl(m,a,u,f))}}))}function dc(e){function t(we){return xh(we,e)}Qu!==null&&xh(Qu,e),Ju!==null&&xh(Ju,e),Wu!==null&&xh(Wu,e),q1.forEach(t),G1.forEach(t);for(var a=0;a<Ku.length;a++){var u=Ku[a];u.blockedOn===e&&(u.blockedOn=null)}for(;0<Ku.length&&(a=Ku[0],a.blockedOn===null);)Pv(a),a.blockedOn===null&&Ku.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var f=a[u],m=a[u+1],I=f[Ua]||null;if(typeof m=="function")I||$v(a);else if(I){var oe=null;if(m&&m.hasAttribute("formAction")){if(f=m,I=m[Ua]||null)oe=I.formAction;else if(Mu(f)!==null)continue}else oe=I.action;typeof oe=="function"?a[u+1]=oe:(a.splice(u,3),u-=3),$v(a)}}}function Ip(e){this._internalRoot=e}function Sh(e){this._internalRoot=e}function Iv(e){e[ul]&&(e._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Ci=wC(),wh=Pe,Hx=ed,pn=Object.assign,Ch=Symbol.for("react.element"),sl=Symbol.for("react.transitional.element"),hc=Symbol.for("react.portal"),cn=Symbol.for("react.fragment"),Au=Symbol.for("react.strict_mode"),Eu=Symbol.for("react.profiler"),Y0=Symbol.for("react.provider"),qp=Symbol.for("react.consumer"),Ss=Symbol.for("react.context"),fo=Symbol.for("react.forward_ref"),_u=Symbol.for("react.suspense"),rl=Symbol.for("react.suspense_list"),Th=Symbol.for("react.memo"),es=Symbol.for("react.lazy"),X0=Symbol.for("react.activity"),qv=Symbol.for("react.memo_cache_sentinel"),F0=Symbol.iterator,Gp=Symbol.for("react.client.reference"),sn=Array.isArray,Ke=wh.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Wt=Hx.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Px=Object.freeze({pending:!1,data:null,method:null,action:null}),kh=[],Mh=[],ws=-1,po=K(null),Ou=K(null),Ar=K(null),Du=K(null),go=Object.prototype.hasOwnProperty,Yp=Ci.unstable_scheduleCallback,Vx=Ci.unstable_cancelCallback,Gv=Ci.unstable_shouldYield,$x=Ci.unstable_requestPaint,Er=Ci.unstable_now,ol=Ci.unstable_getCurrentPriorityLevel,Xp=Ci.unstable_ImmediatePriority,Ah=Ci.unstable_UserBlockingPriority,ju=Ci.unstable_NormalPriority,Ix=Ci.unstable_LowPriority,Eh=Ci.unstable_IdlePriority,qx=Ci.log,qs=Ci.unstable_setDisableYieldValue,ll=null,ea=null,Mt=null,Ba=!1,Ti=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",ca=Math.clz32?Math.clz32:ie,Fp=Math.log,mo=Math.LN2,Zp=256,Qp=4194304,ta=2,Gs=8,yo=32,Jp=268435456,cl=Math.random().toString(36).slice(2),ua="__reactFiber$"+cl,Ua="__reactProps$"+cl,ul="__reactContainer$"+cl,Z0="__reactEvents$"+cl,Yv="__reactListeners$"+cl,Lu="__reactHandles$"+cl,Ru="__reactResources$"+cl,Nu="__reactMarker$"+cl,Xv=new Set,Cs={},fc={},Fv={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},Wp=RegExp("^[: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]*$"),Kp={},eg={},dl=0,Q0,J0,Zv,W0,zu,Qv,Jv;ht.__reactDisabledLog=!0;var K0,_h,Bu=!1,Oh=new(typeof WeakMap=="function"?WeakMap:Map),ts=null,Ha=!1,Gx=/[\n"\\]/g,e1=!1,t1=!1,n1=!1,i1=!1,tg=!1,a1=!1,Dh=["value","defaultValue"],Wv=!1,Kv=/["'&<>\n\t]|^\s|\s$/,s1="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),ng="applet caption html table td th marquee object template foreignObject desc title".split(" "),ig=ng.concat(["button"]),r1="dd dt li option optgroup p rp rt".split(" "),o1={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Uu={},_r={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},vo=/([A-Z])/g,bo=/^ms-/,jh=/^(?:webkit|moz|o)[A-Z]/,Lh=/^-ms-/,hl=/-(.)/g,eb=/;\s*$/,pc={},gc={},tb=!1,l1=!1,Rh=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),Nh="http://www.w3.org/1998/Math/MathML",Hu="http://www.w3.org/2000/svg",ag=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),mc={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},c1={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},Or={},u1=RegExp("^(aria)-[: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]*$"),sg=RegExp("^(aria)[A-Z][: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]*$"),d1=!1,Sa={},zh=/^on./,n=/^on[^A-Z]/,s=RegExp("^(aria)-[: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]*$"),l=RegExp("^(aria)[A-Z][: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]*$"),h=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,v=null,M=null,he=null,xe=!1,Oe=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fe=!1;if(Oe)try{var st={};Object.defineProperty(st,"passive",{get:function(){Fe=!0}}),window.addEventListener("test",st,st),window.removeEventListener("test",st,st)}catch{Fe=!1}var ot=null,Qe=null,We=null,qt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gt=Fi(qt),Nn=pn({},qt,{view:0,detail:0}),qe=Fi(Nn),He,Ye,rt,Nt=pn({},Nn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tf,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rt&&(rt&&e.type==="mousemove"?(He=e.screenX-rt.screenX,Ye=e.screenY-rt.screenY):Ye=He=0,rt=e),He)},movementY:function(e){return"movementY"in e?e.movementY:Ye}}),mn=Fi(Nt),Pt=pn({},Nt,{dataTransfer:0}),Zt=Fi(Pt),Ii=pn({},Nn,{relatedTarget:0}),An=Fi(Ii),fl=pn({},qt,{animationName:0,elapsedTime:0,pseudoElement:0}),Yx=Fi(fl),jA=pn({},qt,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),LA=Fi(jA),RA=pn({},qt,{data:0}),AC=Fi(RA),NA=AC,zA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BA={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"},UA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},HA=pn({},Nn,{key:function(e){if(e.key){var t=zA[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?BA[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tf,charCode:function(e){return e.type==="keypress"?Yc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),PA=Fi(HA),VA=pn({},Nt,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),EC=Fi(VA),$A=pn({},Nn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tf}),IA=Fi($A),qA=pn({},qt,{propertyName:0,elapsedTime:0,pseudoElement:0}),GA=Fi(qA),YA=pn({},Nt,{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}),XA=Fi(YA),FA=pn({},qt,{newState:0,oldState:0}),ZA=Fi(FA),QA=[9,13,27,32],_C=229,Xx=Oe&&"CompositionEvent"in window,h1=null;Oe&&"documentMode"in document&&(h1=document.documentMode);var JA=Oe&&"TextEvent"in window&&!h1,OC=Oe&&(!Xx||h1&&8<h1&&11>=h1),DC=32,jC=String.fromCharCode(DC),LC=!1,rg=!1,WA={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},f1=null,p1=null,RC=!1;Oe&&(RC=hm("input")&&(!document.documentMode||9<document.documentMode));var ns=typeof Object.is=="function"?Object.is:jx,KA=Oe&&"documentMode"in document&&11>=document.documentMode,og=null,Fx=null,g1=null,Zx=!1,lg={animationend:Qr("Animation","AnimationEnd"),animationiteration:Qr("Animation","AnimationIteration"),animationstart:Qr("Animation","AnimationStart"),transitionrun:Qr("Transition","TransitionRun"),transitionstart:Qr("Transition","TransitionStart"),transitioncancel:Qr("Transition","TransitionCancel"),transitionend:Qr("Transition","TransitionEnd")},Qx={},NC={};Oe&&(NC=document.createElement("div").style,"AnimationEvent"in window||(delete lg.animationend.animation,delete lg.animationiteration.animation,delete lg.animationstart.animation),"TransitionEvent"in window||delete lg.transitionend.transition);var zC=Rl("animationend"),BC=Rl("animationiteration"),UC=Rl("animationstart"),eE=Rl("transitionrun"),tE=Rl("transitionstart"),nE=Rl("transitioncancel"),HC=Rl("transitionend"),PC=new Map,Jx="abort auxClick beforeToggle 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(" ");Jx.push("scrollEnd");var Wx=new WeakMap,nb=1,yc=2,Dr=[],cg=0,Kx=0,Pu={};Object.freeze(Pu);var jr=null,ug=null,oi=0,iE=1,wa=2,Pa=8,xo=16,VC=64,$C=!1;try{var IC=Object.preventExtensions({})}catch{$C=!0}var dg=[],hg=0,ib=null,ab=0,Lr=[],Rr=0,Bh=null,vc=1,bc="",is=null,Ei=null,zn=!1,xc=!1,Nr=null,Uh=null,pl=!1,eS=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),qC=0;if(typeof performance=="object"&&typeof performance.now=="function")var aE=performance,GC=function(){return aE.now()};else{var sE=Date;GC=function(){return sE.now()}}var tS=K(null),nS=K(null),YC={},sb=null,fg=null,pg=!1,rE=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,u){e.push(u)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},oE=Ci.unstable_scheduleCallback,lE=Ci.unstable_NormalPriority,na={$$typeof:Ss,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},gg=Ci.unstable_now,XC=-0,rb=-0,Ts=-1.1,Hh=-0,ob=!1,lb=!1,m1=null,iS=0,Ph=0,mg=null,FC=Ke.S;Ke.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&hv(e,t),FC!==null&&FC(e,t)};var Vh=K(null),So={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},y1=[],v1=[],b1=[],x1=[],S1=[],w1=[],$h=new Set;So.recordUnsafeLifecycleWarnings=function(e,t){$h.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&y1.push(e),e.mode&Pa&&typeof t.UNSAFE_componentWillMount=="function"&&v1.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&b1.push(e),e.mode&Pa&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&x1.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&S1.push(e),e.mode&Pa&&typeof t.UNSAFE_componentWillUpdate=="function"&&w1.push(e))},So.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<y1.length&&(y1.forEach(function(oe){e.add(se(oe)||"Component"),$h.add(oe.type)}),y1=[]);var t=new Set;0<v1.length&&(v1.forEach(function(oe){t.add(se(oe)||"Component"),$h.add(oe.type)}),v1=[]);var a=new Set;0<b1.length&&(b1.forEach(function(oe){a.add(se(oe)||"Component"),$h.add(oe.type)}),b1=[]);var u=new Set;0<x1.length&&(x1.forEach(function(oe){u.add(se(oe)||"Component"),$h.add(oe.type)}),x1=[]);var f=new Set;0<S1.length&&(S1.forEach(function(oe){f.add(se(oe)||"Component"),$h.add(oe.type)}),S1=[]);var m=new Set;if(0<w1.length&&(w1.forEach(function(oe){m.add(se(oe)||"Component"),$h.add(oe.type)}),w1=[]),0<t.size){var I=N(t);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
695
+
696
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
697
+
698
+ Please update the following components: %s`,I)}0<u.size&&(I=N(u),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
699
+
700
+ * Move data fetching code or side effects to componentDidUpdate.
701
+ * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
702
+
703
+ Please update the following components: %s`,I)),0<m.size&&(I=N(m),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
704
+
705
+ * Move data fetching code or side effects to componentDidUpdate.
706
+
707
+ Please update the following components: %s`,I)),0<e.size&&(I=N(e),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
708
+
709
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
710
+ * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
711
+
712
+ Please update the following components: %s`,I)),0<a.size&&(I=N(a),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
713
+
714
+ * Move data fetching code or side effects to componentDidUpdate.
715
+ * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
716
+ * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
717
+
718
+ Please update the following components: %s`,I)),0<f.size&&(I=N(f),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
719
+
720
+ * Move data fetching code or side effects to componentDidUpdate.
721
+ * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
722
+
723
+ Please update the following components: %s`,I))};var cb=new Map,ZC=new Set;So.recordLegacyContextWarning=function(e,t){for(var a=null,u=e;u!==null;)u.mode&Pa&&(a=u),u=u.return;a===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!ZC.has(e.type)&&(u=cb.get(a),e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(u===void 0&&(u=[],cb.set(a,u)),u.push(e))},So.flushLegacyContextWarning=function(){cb.forEach(function(e){if(e.length!==0){var t=e[0],a=new Set;e.forEach(function(f){a.add(se(f)||"Component"),ZC.add(f.type)});var u=N(a);nt(t,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
724
+
725
+ The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
726
+
727
+ Please update the following components: %s
728
+
729
+ Learn more about this warning here: https://react.dev/link/legacy-context`,u)})}})},So.discardPendingWarnings=function(){y1=[],v1=[],b1=[],x1=[],S1=[],w1=[],cb=new Map};var C1=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),QC=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),ub=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),aS={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},T1=null,db=!1,zr=0,Br=1,as=2,Ca=4,ia=8,JC=0,WC=1,KC=2,sS=3,Vu=!1,e5=!1,rS=null,oS=!1,yg=K(null),hb=K(0),vg,t5=new Set,n5=new Set,lS=new Set,i5=new Set,$u=0,rn=null,Jn=null,qi=null,fb=!1,bg=!1,Ih=!1,pb=0,k1=0,Sc=null,cE=0,uE=25,et=null,Ur=null,wc=-1,M1=!1,gb={readContext:ei,use:or,useCallback:di,useContext:di,useEffect:di,useImperativeHandle:di,useLayoutEffect:di,useInsertionEffect:di,useMemo:di,useReducer:di,useRef:di,useState:di,useDebugValue:di,useDeferredValue:di,useTransition:di,useSyncExternalStore:di,useId:di,useHostTransitionStatus:di,useFormState:di,useActionState:di,useOptimistic:di,useMemoCache:di,useCacheRefresh:di},cS=null,a5=null,uS=null,s5=null,gl=null,wo=null,mb=null;cS={readContext:function(e){return ei(e)},use:or,useCallback:function(e,t){return et="useCallback",gn(),ds(t),Id(e,t)},useContext:function(e){return et="useContext",gn(),ei(e)},useEffect:function(e,t){return et="useEffect",gn(),ds(t),Uf(e,t)},useImperativeHandle:function(e,t,a){return et="useImperativeHandle",gn(),ds(a),Pf(e,t,a)},useInsertionEffect:function(e,t){et="useInsertionEffect",gn(),ds(t),gs(4,as,e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",gn(),ds(t),Hf(e,t)},useMemo:function(e,t){et="useMemo",gn(),ds(t);var a=Ke.H;Ke.H=gl;try{return Vf(e,t)}finally{Ke.H=a}},useReducer:function(e,t,a){et="useReducer",gn();var u=Ke.H;Ke.H=gl;try{return _n(e,t,a)}finally{Ke.H=u}},useRef:function(e){return et="useRef",gn(),$d(e)},useState:function(e){et="useState",gn();var t=Ke.H;Ke.H=gl;try{return to(e)}finally{Ke.H=t}},useDebugValue:function(){et="useDebugValue",gn()},useDeferredValue:function(e,t){return et="useDeferredValue",gn(),$f(e,t)},useTransition:function(){return et="useTransition",gn(),dr()},useSyncExternalStore:function(e,t,a){return et="useSyncExternalStore",gn(),eo(e,t,a)},useId:function(){return et="useId",gn(),hr()},useFormState:function(e,t){return et="useFormState",gn(),Wc(),au(e,t)},useActionState:function(e,t){return et="useActionState",gn(),au(e,t)},useOptimistic:function(e){return et="useOptimistic",gn(),Hs(e)},useHostTransitionStatus:Oa,useMemoCache:ki,useCacheRefresh:function(){return et="useCacheRefresh",gn(),Yl()}},a5={readContext:function(e){return ei(e)},use:or,useCallback:function(e,t){return et="useCallback",gt(),Id(e,t)},useContext:function(e){return et="useContext",gt(),ei(e)},useEffect:function(e,t){return et="useEffect",gt(),Uf(e,t)},useImperativeHandle:function(e,t,a){return et="useImperativeHandle",gt(),Pf(e,t,a)},useInsertionEffect:function(e,t){et="useInsertionEffect",gt(),gs(4,as,e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",gt(),Hf(e,t)},useMemo:function(e,t){et="useMemo",gt();var a=Ke.H;Ke.H=gl;try{return Vf(e,t)}finally{Ke.H=a}},useReducer:function(e,t,a){et="useReducer",gt();var u=Ke.H;Ke.H=gl;try{return _n(e,t,a)}finally{Ke.H=u}},useRef:function(e){return et="useRef",gt(),$d(e)},useState:function(e){et="useState",gt();var t=Ke.H;Ke.H=gl;try{return to(e)}finally{Ke.H=t}},useDebugValue:function(){et="useDebugValue",gt()},useDeferredValue:function(e,t){return et="useDeferredValue",gt(),$f(e,t)},useTransition:function(){return et="useTransition",gt(),dr()},useSyncExternalStore:function(e,t,a){return et="useSyncExternalStore",gt(),eo(e,t,a)},useId:function(){return et="useId",gt(),hr()},useActionState:function(e,t){return et="useActionState",gt(),au(e,t)},useFormState:function(e,t){return et="useFormState",gt(),Wc(),au(e,t)},useOptimistic:function(e){return et="useOptimistic",gt(),Hs(e)},useHostTransitionStatus:Oa,useMemoCache:ki,useCacheRefresh:function(){return et="useCacheRefresh",gt(),Yl()}},uS={readContext:function(e){return ei(e)},use:or,useCallback:function(e,t){return et="useCallback",gt(),ql(e,t)},useContext:function(e){return et="useContext",gt(),ei(e)},useEffect:function(e,t){et="useEffect",gt(),ji(2048,ia,e,t)},useImperativeHandle:function(e,t,a){return et="useImperativeHandle",gt(),ur(e,t,a)},useInsertionEffect:function(e,t){return et="useInsertionEffect",gt(),ji(4,as,e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",gt(),ji(4,Ca,e,t)},useMemo:function(e,t){et="useMemo",gt();var a=Ke.H;Ke.H=wo;try{return Yo(e,t)}finally{Ke.H=a}},useReducer:function(e,t,a){et="useReducer",gt();var u=Ke.H;Ke.H=wo;try{return fs(e,t,a)}finally{Ke.H=u}},useRef:function(){return et="useRef",gt(),kn().memoizedState},useState:function(){et="useState",gt();var e=Ke.H;Ke.H=wo;try{return fs(Ln)}finally{Ke.H=e}},useDebugValue:function(){et="useDebugValue",gt()},useDeferredValue:function(e,t){return et="useDeferredValue",gt(),qd(e,t)},useTransition:function(){return et="useTransition",gt(),Gf()},useSyncExternalStore:function(e,t,a){return et="useSyncExternalStore",gt(),Ud(e,t,a)},useId:function(){return et="useId",gt(),kn().memoizedState},useFormState:function(e){return et="useFormState",gt(),Wc(),Bf(e)},useActionState:function(e){return et="useActionState",gt(),Bf(e)},useOptimistic:function(e,t){return et="useOptimistic",gt(),no(e,t)},useHostTransitionStatus:Oa,useMemoCache:ki,useCacheRefresh:function(){return et="useCacheRefresh",gt(),kn().memoizedState}},s5={readContext:function(e){return ei(e)},use:or,useCallback:function(e,t){return et="useCallback",gt(),ql(e,t)},useContext:function(e){return et="useContext",gt(),ei(e)},useEffect:function(e,t){et="useEffect",gt(),ji(2048,ia,e,t)},useImperativeHandle:function(e,t,a){return et="useImperativeHandle",gt(),ur(e,t,a)},useInsertionEffect:function(e,t){return et="useInsertionEffect",gt(),ji(4,as,e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",gt(),ji(4,Ca,e,t)},useMemo:function(e,t){et="useMemo",gt();var a=Ke.H;Ke.H=mb;try{return Yo(e,t)}finally{Ke.H=a}},useReducer:function(e,t,a){et="useReducer",gt();var u=Ke.H;Ke.H=mb;try{return Il(e,t,a)}finally{Ke.H=u}},useRef:function(){return et="useRef",gt(),kn().memoizedState},useState:function(){et="useState",gt();var e=Ke.H;Ke.H=mb;try{return Il(Ln)}finally{Ke.H=e}},useDebugValue:function(){et="useDebugValue",gt()},useDeferredValue:function(e,t){return et="useDeferredValue",gt(),If(e,t)},useTransition:function(){return et="useTransition",gt(),Yf()},useSyncExternalStore:function(e,t,a){return et="useSyncExternalStore",gt(),Ud(e,t,a)},useId:function(){return et="useId",gt(),kn().memoizedState},useFormState:function(e){return et="useFormState",gt(),Wc(),su(e)},useActionState:function(e){return et="useActionState",gt(),su(e)},useOptimistic:function(e,t){return et="useOptimistic",gt(),zf(e,t)},useHostTransitionStatus:Oa,useMemoCache:ki,useCacheRefresh:function(){return et="useCacheRefresh",gt(),kn().memoizedState}},gl={readContext:function(e){return k(),ei(e)},use:function(e){return b(),or(e)},useCallback:function(e,t){return et="useCallback",b(),gn(),Id(e,t)},useContext:function(e){return et="useContext",b(),gn(),ei(e)},useEffect:function(e,t){return et="useEffect",b(),gn(),Uf(e,t)},useImperativeHandle:function(e,t,a){return et="useImperativeHandle",b(),gn(),Pf(e,t,a)},useInsertionEffect:function(e,t){et="useInsertionEffect",b(),gn(),gs(4,as,e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",b(),gn(),Hf(e,t)},useMemo:function(e,t){et="useMemo",b(),gn();var a=Ke.H;Ke.H=gl;try{return Vf(e,t)}finally{Ke.H=a}},useReducer:function(e,t,a){et="useReducer",b(),gn();var u=Ke.H;Ke.H=gl;try{return _n(e,t,a)}finally{Ke.H=u}},useRef:function(e){return et="useRef",b(),gn(),$d(e)},useState:function(e){et="useState",b(),gn();var t=Ke.H;Ke.H=gl;try{return to(e)}finally{Ke.H=t}},useDebugValue:function(){et="useDebugValue",b(),gn()},useDeferredValue:function(e,t){return et="useDeferredValue",b(),gn(),$f(e,t)},useTransition:function(){return et="useTransition",b(),gn(),dr()},useSyncExternalStore:function(e,t,a){return et="useSyncExternalStore",b(),gn(),eo(e,t,a)},useId:function(){return et="useId",b(),gn(),hr()},useFormState:function(e,t){return et="useFormState",b(),gn(),au(e,t)},useActionState:function(e,t){return et="useActionState",b(),gn(),au(e,t)},useOptimistic:function(e){return et="useOptimistic",b(),gn(),Hs(e)},useMemoCache:function(e){return b(),ki(e)},useHostTransitionStatus:Oa,useCacheRefresh:function(){return et="useCacheRefresh",gn(),Yl()}},wo={readContext:function(e){return k(),ei(e)},use:function(e){return b(),or(e)},useCallback:function(e,t){return et="useCallback",b(),gt(),ql(e,t)},useContext:function(e){return et="useContext",b(),gt(),ei(e)},useEffect:function(e,t){et="useEffect",b(),gt(),ji(2048,ia,e,t)},useImperativeHandle:function(e,t,a){return et="useImperativeHandle",b(),gt(),ur(e,t,a)},useInsertionEffect:function(e,t){return et="useInsertionEffect",b(),gt(),ji(4,as,e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",b(),gt(),ji(4,Ca,e,t)},useMemo:function(e,t){et="useMemo",b(),gt();var a=Ke.H;Ke.H=wo;try{return Yo(e,t)}finally{Ke.H=a}},useReducer:function(e,t,a){et="useReducer",b(),gt();var u=Ke.H;Ke.H=wo;try{return fs(e,t,a)}finally{Ke.H=u}},useRef:function(){return et="useRef",b(),gt(),kn().memoizedState},useState:function(){et="useState",b(),gt();var e=Ke.H;Ke.H=wo;try{return fs(Ln)}finally{Ke.H=e}},useDebugValue:function(){et="useDebugValue",b(),gt()},useDeferredValue:function(e,t){return et="useDeferredValue",b(),gt(),qd(e,t)},useTransition:function(){return et="useTransition",b(),gt(),Gf()},useSyncExternalStore:function(e,t,a){return et="useSyncExternalStore",b(),gt(),Ud(e,t,a)},useId:function(){return et="useId",b(),gt(),kn().memoizedState},useFormState:function(e){return et="useFormState",b(),gt(),Bf(e)},useActionState:function(e){return et="useActionState",b(),gt(),Bf(e)},useOptimistic:function(e,t){return et="useOptimistic",b(),gt(),no(e,t)},useMemoCache:function(e){return b(),ki(e)},useHostTransitionStatus:Oa,useCacheRefresh:function(){return et="useCacheRefresh",gt(),kn().memoizedState}},mb={readContext:function(e){return k(),ei(e)},use:function(e){return b(),or(e)},useCallback:function(e,t){return et="useCallback",b(),gt(),ql(e,t)},useContext:function(e){return et="useContext",b(),gt(),ei(e)},useEffect:function(e,t){et="useEffect",b(),gt(),ji(2048,ia,e,t)},useImperativeHandle:function(e,t,a){return et="useImperativeHandle",b(),gt(),ur(e,t,a)},useInsertionEffect:function(e,t){return et="useInsertionEffect",b(),gt(),ji(4,as,e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",b(),gt(),ji(4,Ca,e,t)},useMemo:function(e,t){et="useMemo",b(),gt();var a=Ke.H;Ke.H=wo;try{return Yo(e,t)}finally{Ke.H=a}},useReducer:function(e,t,a){et="useReducer",b(),gt();var u=Ke.H;Ke.H=wo;try{return Il(e,t,a)}finally{Ke.H=u}},useRef:function(){return et="useRef",b(),gt(),kn().memoizedState},useState:function(){et="useState",b(),gt();var e=Ke.H;Ke.H=wo;try{return Il(Ln)}finally{Ke.H=e}},useDebugValue:function(){et="useDebugValue",b(),gt()},useDeferredValue:function(e,t){return et="useDeferredValue",b(),gt(),If(e,t)},useTransition:function(){return et="useTransition",b(),gt(),Yf()},useSyncExternalStore:function(e,t,a){return et="useSyncExternalStore",b(),gt(),Ud(e,t,a)},useId:function(){return et="useId",b(),gt(),kn().memoizedState},useFormState:function(e){return et="useFormState",b(),gt(),su(e)},useActionState:function(e){return et="useActionState",b(),gt(),su(e)},useOptimistic:function(e,t){return et="useOptimistic",b(),gt(),zf(e,t)},useMemoCache:function(e){return b(),ki(e)},useHostTransitionStatus:Oa,useCacheRefresh:function(){return et="useCacheRefresh",gt(),kn().memoizedState}};var r5={"react-stack-bottom-frame":function(e,t,a){var u=Ha;Ha=!0;try{return e(t,a)}finally{Ha=u}}},dS=r5["react-stack-bottom-frame"].bind(r5),o5={"react-stack-bottom-frame":function(e){var t=Ha;Ha=!0;try{return e.render()}finally{Ha=t}}},l5=o5["react-stack-bottom-frame"].bind(o5),c5={"react-stack-bottom-frame":function(e,t){try{t.componentDidMount()}catch(a){Ft(e,e.return,a)}}},hS=c5["react-stack-bottom-frame"].bind(c5),u5={"react-stack-bottom-frame":function(e,t,a,u,f){try{t.componentDidUpdate(a,u,f)}catch(m){Ft(e,e.return,m)}}},d5=u5["react-stack-bottom-frame"].bind(u5),h5={"react-stack-bottom-frame":function(e,t){var a=t.stack;e.componentDidCatch(t.value,{componentStack:a!==null?a:""})}},dE=h5["react-stack-bottom-frame"].bind(h5),f5={"react-stack-bottom-frame":function(e,t,a){try{a.componentWillUnmount()}catch(u){Ft(e,t,u)}}},p5=f5["react-stack-bottom-frame"].bind(f5),g5={"react-stack-bottom-frame":function(e){e.resourceKind!=null&&console.error("Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",e.resourceKind);var t=e.create;return e=e.inst,t=t(),e.destroy=t}},hE=g5["react-stack-bottom-frame"].bind(g5),m5={"react-stack-bottom-frame":function(e,t,a){try{a()}catch(u){Ft(e,t,u)}}},fE=m5["react-stack-bottom-frame"].bind(m5),y5={"react-stack-bottom-frame":function(e){var t=e._init;return t(e._payload)}},Iu=y5["react-stack-bottom-frame"].bind(y5),xg=null,A1=0,yn=null,fS,v5=fS=!1,b5={},x5={},S5={};x=function(e,t,a){if(a!==null&&typeof a=="object"&&a._store&&(!a._store.validated&&a.key==null||a._store.validated===2)){if(typeof a._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");a._store.validated=1;var u=se(e),f=u||"null";if(!b5[f]){b5[f]=!0,a=a._owner,e=e._debugOwner;var m="";e&&typeof e.tag=="number"&&(f=se(e))&&(m=`
730
+
731
+ Check the render method of \``+f+"`."),m||u&&(m=`
732
+
733
+ Check the top-level render call using <`+u+">.");var I="";a!=null&&e!==a&&(u=null,typeof a.tag=="number"?u=se(a):typeof a.name=="string"&&(u=a.name),u&&(I=" It was passed a child from "+u+".")),nt(t,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',m,I)})}}};var Sg=Fd(!0),w5=Fd(!1),Hr=K(null),ml=null,wg=1,E1=2,aa=K(0),C5={},T5=new Set,k5=new Set,M5=new Set,A5=new Set,E5=new Set,_5=new Set,O5=new Set,D5=new Set,j5=new Set,L5=new Set;Object.freeze(C5);var pS={enqueueSetState:function(e,t,a){e=e._reactInternals;var u=La(e),f=sr(u);f.payload=t,a!=null&&(qm(a),f.callback=a),t=zs(e,f,u),t!==null&&(bi(t,e,u),Vo(t,e,u)),G(e,u)},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var u=La(e),f=sr(u);f.tag=WC,f.payload=t,a!=null&&(qm(a),f.callback=a),t=zs(e,f,u),t!==null&&(bi(t,e,u),Vo(t,e,u)),G(e,u)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=La(e),u=sr(a);u.tag=KC,t!=null&&(qm(t),u.callback=t),t=zs(e,u,a),t!==null&&(bi(t,e,a),Vo(t,e,a)),Mt!==null&&typeof Mt.markForceUpdateScheduled=="function"&&Mt.markForceUpdateScheduled(e,a)}},gS=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Cg=null,mS=null,R5=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),da=!1,N5={},z5={},B5={},U5={},Tg=!1,H5={},yS={},vS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},P5=!1,V5=null;V5=new Set;var Cc=!1,Ni=!1,bS=!1,$5=typeof WeakSet=="function"?WeakSet:Set,ha=null,kg=null,Mg=null,Gi=null,ks=!1,Co=null,_1=8192,pE={getCacheForType:function(e){var t=ei(na),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},getOwner:function(){return ts}};if(typeof Symbol=="function"&&Symbol.for){var O1=Symbol.for;O1("selector.component"),O1("selector.has_pseudo_class"),O1("selector.role"),O1("selector.test_id"),O1("selector.text")}var gE=[],mE=typeof WeakMap=="function"?WeakMap:Map,Ys=0,ss=2,To=4,Tc=0,D1=1,Ag=2,xS=3,qh=4,yb=6,I5=5,qn=Ys,ti=null,Sn=null,wn=0,Ms=0,j1=1,Gh=2,L1=3,q5=4,SS=5,Eg=6,R1=7,wS=8,Yh=9,Fn=Ms,Xs=null,qu=!1,_g=!1,CS=!1,yl=0,_i=Tc,Gu=0,Yu=0,TS=0,Fs=0,Xh=0,N1=null,rs=null,vb=!1,kS=0,G5=300,bb=1/0,Y5=500,z1=null,Xu=null,yE=0,vE=1,bE=2,Fh=0,X5=1,F5=2,Z5=3,xE=4,MS=5,Ta=0,Fu=null,Og=null,Zu=0,AS=0,ES=null,Q5=null,SE=50,B1=0,_S=null,OS=!1,xb=!1,wE=50,Zh=0,U1=null,Dg=!1,Sb=null,J5=!1,W5=new Set,CE={},wb=null,jg=null,DS=!1,jS=!1,Cb=!1,LS=!1,Qh=0,RS={};(function(){for(var e=0;e<Jx.length;e++){var t=Jx[e],a=t.toLowerCase();t=t[0].toUpperCase()+t.slice(1),Ds(a,"on"+t)}Ds(zC,"onAnimationEnd"),Ds(BC,"onAnimationIteration"),Ds(UC,"onAnimationStart"),Ds("dblclick","onDoubleClick"),Ds("focusin","onFocus"),Ds("focusout","onBlur"),Ds(eE,"onTransitionRun"),Ds(tE,"onTransitionStart"),Ds(nE,"onTransitionCancel"),Ds(HC,"onTransitionEnd")})(),mt("onMouseEnter",["mouseout","mouseover"]),mt("onMouseLeave",["mouseout","mouseover"]),mt("onPointerEnter",["pointerout","pointerover"]),mt("onPointerLeave",["pointerout","pointerover"]),pt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),pt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),pt("onBeforeInput",["compositionend","keypress","textInput","paste"]),pt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),pt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),pt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var H1="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(" "),NS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(H1)),Tb="_reactListening"+Math.random().toString(36).slice(2),K5=!1,e7=!1,kb=!1,t7=!1,Mb=!1,Ab=!1,n7=!1,Eb={},TE=/\r\n?/g,kE=/\u0000|\uFFFD/g,Jh="http://www.w3.org/1999/xlink",zS="http://www.w3.org/XML/1998/namespace",ME="javascript:throw new Error('React form unexpectedly submitted.')",AE="suppressHydrationWarning",_b="$",Ob="/$",kc="$?",P1="$!",EE=1,_E=2,OE=4,BS="F!",i7="F",a7="complete",DE="style",Mc=0,Lg=1,Db=2,US=null,HS=null,s7={dialog:!0,webview:!0},PS=null,r7=typeof setTimeout=="function"?setTimeout:void 0,jE=typeof clearTimeout=="function"?clearTimeout:void 0,Wh=-1,o7=typeof Promise=="function"?Promise:void 0,LE=typeof queueMicrotask=="function"?queueMicrotask:typeof o7<"u"?function(e){return o7.resolve(null).then(e).catch(O0)}:r7,VS=null,Kh=0,V1=1,l7=2,c7=3,Pr=4,Vr=new Map,u7=new Set,Ac=Wt.d;Wt.d={f:function(){var e=Ac.f(),t=nc();return e||t},r:function(e){var t=Xe(e);t!==null&&t.tag===5&&t.type==="form"?Vm(t):Ac.r(e)},D:function(e){Ac.D(e),Rv("dns-prefetch",e,null)},C:function(e,t){Ac.C(e,t),Rv("preconnect",e,t)},L:function(e,t,a){Ac.L(e,t,a);var u=Rg;if(u&&e&&t){var f='link[rel="preload"][as="'+At(t)+'"]';t==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+At(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+At(a.imageSizes)+'"]')):f+='[href="'+At(e)+'"]';var m=f;switch(t){case"style":m=nl(e);break;case"script":m=cc(e)}Vr.has(m)||(e=pn({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Vr.set(m,e),u.querySelector(f)!==null||t==="style"&&u.querySelector(Mr(m))||t==="script"&&u.querySelector(uc(m))||(t=u.createElement("link"),Si(t,"link",e),Ge(t),u.head.appendChild(t)))}},m:function(e,t){Ac.m(e,t);var a=Rg;if(a&&e){var u=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+At(u)+'"][href="'+At(e)+'"]',m=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=cc(e)}if(!Vr.has(m)&&(e=pn({rel:"modulepreload",href:e},t),Vr.set(m,e),a.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(uc(m)))return}u=a.createElement("link"),Si(u,"link",e),Ge(u),a.head.appendChild(u)}}},X:function(e,t){Ac.X(e,t);var a=Rg;if(a&&e){var u=Ie(a).hoistableScripts,f=cc(e),m=u.get(f);m||(m=a.querySelector(uc(f)),m||(e=pn({src:e,async:!0},t),(t=Vr.get(f))&&U0(e,t),m=a.createElement("script"),Ge(m),Si(m,"link",e),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(f,m))}},S:function(e,t,a){Ac.S(e,t,a);var u=Rg;if(u&&e){var f=Ie(u).hoistableStyles,m=nl(e);t=t||"default";var I=f.get(m);if(!I){var oe={loading:Kh,preload:null};if(I=u.querySelector(Mr(m)))oe.loading=V1|Pr;else{e=pn({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Vr.get(m))&&B0(e,a);var we=I=u.createElement("link");Ge(we),Si(we,"link",e),we._p=new Promise(function(Te,Je){we.onload=Te,we.onerror=Je}),we.addEventListener("load",function(){oe.loading|=V1}),we.addEventListener("error",function(){oe.loading|=l7}),oe.loading|=Pr,Bp(I,t,u)}I={type:"stylesheet",instance:I,count:1,state:oe},f.set(m,I)}}},M:function(e,t){Ac.M(e,t);var a=Rg;if(a&&e){var u=Ie(a).hoistableScripts,f=cc(e),m=u.get(f);m||(m=a.querySelector(uc(f)),m||(e=pn({src:e,async:!0,type:"module"},t),(t=Vr.get(f))&&U0(e,t),m=a.createElement("script"),Ge(m),Si(m,"link",e),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(f,m))}}};var Rg=typeof document>"u"?null:document,jb=null,$1=null,$S=null,Lb=null,ef=Px,I1={$$typeof:Ss,Provider:null,Consumer:null,_currentValue:ef,_currentValue2:ef,_threadCount:0},d7="%c%s%c ",h7="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",f7="",Rb=" ",RE=Function.prototype.bind,p7=!1,g7=null,m7=null,y7=null,v7=null,b7=null,x7=null,S7=null,w7=null,C7=null;g7=function(e,t,a,u){t=r(e,t),t!==null&&(a=i(t.memoizedState,a,0,u),t.memoizedState=a,t.baseState=a,e.memoizedProps=pn({},e.memoizedProps),a=Ma(e,2),a!==null&&bi(a,e,2))},m7=function(e,t,a){t=r(e,t),t!==null&&(a=d(t.memoizedState,a,0),t.memoizedState=a,t.baseState=a,e.memoizedProps=pn({},e.memoizedProps),a=Ma(e,2),a!==null&&bi(a,e,2))},y7=function(e,t,a,u){t=r(e,t),t!==null&&(a=o(t.memoizedState,a,u),t.memoizedState=a,t.baseState=a,e.memoizedProps=pn({},e.memoizedProps),a=Ma(e,2),a!==null&&bi(a,e,2))},v7=function(e,t,a){e.pendingProps=i(e.memoizedProps,t,0,a),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=Ma(e,2),t!==null&&bi(t,e,2)},b7=function(e,t){e.pendingProps=d(e.memoizedProps,t,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=Ma(e,2),t!==null&&bi(t,e,2)},x7=function(e,t,a){e.pendingProps=o(e.memoizedProps,t,a),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=Ma(e,2),t!==null&&bi(t,e,2)},S7=function(e){var t=Ma(e,2);t!==null&&bi(t,e,2)},w7=function(e){y=e},C7=function(e){p=e};var Nb=!0,zb=null,IS=!1,Qu=null,Ju=null,Wu=null,q1=new Map,G1=new Map,Ku=[],NE="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".split(" "),Bb=null;if(Sh.prototype.render=Ip.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error("Cannot update an unmounted root.");var a=arguments;typeof a[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):ae(a[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof a[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),a=e;var u=t.current,f=La(u);In(u,f,a,t,null,null)},Sh.prototype.unmount=Ip.prototype.unmount=function(){var e=arguments;if(typeof e[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),e=this._internalRoot,e!==null){this._internalRoot=null;var t=e.containerInfo;(qn&(ss|To))!==Ys&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),In(e.current,2,null,e,null,null),nc(),t[ul]=null}},Sh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Be();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ku.length&&t!==0&&t<Ku[a].priority;a++);Ku.splice(a,0,e),a===0&&Pv(e)}},function(){var e=wh.version;if(e!=="19.1.0")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
734
+ - react: `+(e+`
735
+ - react-dom: 19.1.0
736
+ Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),Wt.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));return e=$(t),e=e!==null?Q(e):null,e=e===null?null:e.stateNode,e},!function(){var e={bundleType:1,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:Ke,reconcilerVersion:"19.1.0"};return e.overrideHookState=g7,e.overrideHookStateDeletePath=m7,e.overrideHookStateRenamePath=y7,e.overrideProps=v7,e.overridePropsDeletePath=b7,e.overridePropsRenamePath=x7,e.scheduleUpdate=S7,e.setErrorHandler=w7,e.setSuspenseHandler=C7,e.scheduleRefresh=D,e.scheduleRoot=J,e.setRefreshHandler=F,e.getCurrentFiber=zx,e.getLaneLabelMap=Bx,e.injectProfilingHooks=ce,C(e)}()&&Oe&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var T7=window.location.protocol;/^(https?|file):$/.test(T7)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(T7==="file:"?`
737
+ You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}om.createRoot=function(e,t){if(!ae(e))throw Error("Target container is not a DOM element.");Iv(e);var a=!1,u="",f=Gm,m=vv,I=Qf,oe=null;return t!=null&&(t.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===sl&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
738
+
739
+ let root = createRoot(domContainer);
740
+ root.render(<App />);`),t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(u=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(m=t.onCaughtError),t.onRecoverableError!==void 0&&(I=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(oe=t.unstable_transitionCallbacks)),t=V0(e,1,!1,null,null,a,u,f,m,I,oe,null),e[ul]=t.current,C0(e),new Ip(t)},om.hydrateRoot=function(e,t,a){if(!ae(e))throw Error("Target container is not a DOM element.");Iv(e),t===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var u=!1,f="",m=Gm,I=vv,oe=Qf,we=null,Te=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(I=a.onCaughtError),a.onRecoverableError!==void 0&&(oe=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(we=a.unstable_transitionCallbacks),a.formState!==void 0&&(Te=a.formState)),t=V0(e,1,!0,t,a??null,u,f,m,I,oe,we,Te),t.context=$0(null),a=t.current,u=La(a),u=ke(u),f=sr(u),f.callback=null,zs(a,f,u),a=u,t.current.lanes=a,fe(t,a),vs(t),e[ul]=t.current,C0(e),new Sh(t)},om.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),om}var kC;function _A(){if(kC)return Qy.exports;kC=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(i){console.error(i)}}}return process.env.NODE_ENV==="production"?(r(),Qy.exports=AA()):Qy.exports=EA(),Qy.exports}var OA=_A();const DA=Ng(OA);class MC{constructor(i={}){Bn(this,"container",null);Bn(this,"root",null);Bn(this,"config");this.config=i}init(i){if(i?typeof i=="string"?this.container=document.querySelector(i):this.container=i:(this.container=document.createElement("div"),this.container.id="genius-chatbot-root",document.body.appendChild(this.container)),!this.container)throw new Error("Genius SDK: Target container not found");this.root=DA.createRoot(this.container),this.render()}render(){this.root&&this.root.render(Pe.createElement(Cx,{config:this.config}))}updateConfig(i){this.config={...this.config,...i},this.render()}destroy(){this.root&&(this.root.unmount(),this.root=null),this.container&&this.container.id==="genius-chatbot-root"&&this.container.remove(),this.container=null}}window.GeniusSDK=MC,Bi.GeniusChatbot=Cx,Bi.GeniusChatbotMobile=mC,Bi.GeniusChatbotProvider=wA,Bi.GeniusSDK=MC,Bi.GeniusToggle=TA,Bi.VoiceCall=JS,Bi.useGeniusChatbot=vC,Object.defineProperty(Bi,Symbol.toStringTag,{value:"Module"})});
741
+ //# sourceMappingURL=genius-sdk.umd.js.map