@bnagaraju7/chat-widget 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +223 -0
- package/dist/cdn/garuda-chat-widget.iife.global.js +166 -0
- package/dist/index.cjs +1336 -0
- package/dist/index.d.mts +35 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.mjs +1316 -0
- package/package.json +55 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";var GarudaChat=(()=>{var C5=Object.create;var bg=Object.defineProperty;var w5=Object.getOwnPropertyDescriptor;var L5=Object.getOwnPropertyNames;var I5=Object.getPrototypeOf,_5=Object.prototype.hasOwnProperty;var Iw=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,a)=>(typeof require<"u"?require:t)[a]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var m=(e,t)=>()=>(e&&(t=e(e=0)),t);var It=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Cg=(e,t)=>{for(var a in t)bg(e,a,{get:t[a],enumerable:!0})},k5=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of L5(t))!_5.call(e,r)&&r!==a&&bg(e,r,{get:()=>t[r],enumerable:!(n=w5(t,r))||n.enumerable});return e};var H=(e,t,a)=>(a=e!=null?C5(I5(e)):{},k5(t||!e||!e.__esModule?bg(a,"default",{value:e,enumerable:!0}):a,e));var Bw=It(Q=>{"use strict";var Ig=Symbol.for("react.transitional.element"),T5=Symbol.for("react.portal"),A5=Symbol.for("react.fragment"),E5=Symbol.for("react.strict_mode"),D5=Symbol.for("react.profiler"),M5=Symbol.for("react.consumer"),R5=Symbol.for("react.context"),P5=Symbol.for("react.forward_ref"),O5=Symbol.for("react.suspense"),B5=Symbol.for("react.memo"),Ew=Symbol.for("react.lazy"),F5=Symbol.for("react.activity"),_w=Symbol.iterator;function U5(e){return e===null||typeof e!="object"?null:(e=_w&&e[_w]||e["@@iterator"],typeof e=="function"?e:null)}var Dw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Mw=Object.assign,Rw={};function zo(e,t,a){this.props=e,this.context=t,this.refs=Rw,this.updater=a||Dw}zo.prototype.isReactComponent={};zo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};zo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pw(){}Pw.prototype=zo.prototype;function _g(e,t,a){this.props=e,this.context=t,this.refs=Rw,this.updater=a||Dw}var kg=_g.prototype=new Pw;kg.constructor=_g;Mw(kg,zo.prototype);kg.isPureReactComponent=!0;var kw=Array.isArray;function Lg(){}var Be={H:null,A:null,T:null,S:null},Ow=Object.prototype.hasOwnProperty;function Tg(e,t,a){var n=a.ref;return{$$typeof:Ig,type:e,key:t,ref:n!==void 0?n:null,props:a}}function z5(e,t){return Tg(e.type,t,e.props)}function Ag(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ig}function V5(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var Tw=/\/+/g;function wg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?V5(""+e.key):t.toString(36)}function N5(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Lg,Lg):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Uo(e,t,a,n,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Ig:case T5:o=!0;break;case Ew:return o=e._init,Uo(o(e._payload),t,a,n,r)}}if(o)return r=r(e),o=n===""?"."+wg(e,0):n,kw(r)?(a="",o!=null&&(a=o.replace(Tw,"$&/")+"/"),Uo(r,t,a,"",function(u){return u})):r!=null&&(Ag(r)&&(r=z5(r,a+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Tw,"$&/")+"/")+o)),t.push(r)),1;o=0;var s=n===""?".":n+":";if(kw(e))for(var l=0;l<e.length;l++)n=e[l],i=s+wg(n,l),o+=Uo(n,t,a,i,r);else if(l=U5(e),typeof l=="function")for(e=l.call(e),l=0;!(n=e.next()).done;)n=n.value,i=s+wg(n,l++),o+=Uo(n,t,a,i,r);else if(i==="object"){if(typeof e.then=="function")return Uo(N5(e),t,a,n,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return o}function mf(e,t,a){if(e==null)return e;var n=[],r=0;return Uo(e,n,"","",function(i){return t.call(a,i,r++)}),n}function H5(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(a){(e._status===0||e._status===-1)&&(e._status=1,e._result=a)},function(a){(e._status===0||e._status===-1)&&(e._status=2,e._result=a)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Aw=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)},q5={map:mf,forEach:function(e,t,a){mf(e,function(){t.apply(this,arguments)},a)},count:function(e){var t=0;return mf(e,function(){t++}),t},toArray:function(e){return mf(e,function(t){return t})||[]},only:function(e){if(!Ag(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Q.Activity=F5;Q.Children=q5;Q.Component=zo;Q.Fragment=A5;Q.Profiler=D5;Q.PureComponent=_g;Q.StrictMode=E5;Q.Suspense=O5;Q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Be;Q.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Be.H.useMemoCache(e)}};Q.cache=function(e){return function(){return e.apply(null,arguments)}};Q.cacheSignal=function(){return null};Q.cloneElement=function(e,t,a){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=Mw({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!Ow.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(n[i]=t[i]);var i=arguments.length-2;if(i===1)n.children=a;else if(1<i){for(var o=Array(i),s=0;s<i;s++)o[s]=arguments[s+2];n.children=o}return Tg(e.type,r,n)};Q.createContext=function(e){return e={$$typeof:R5,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:M5,_context:e},e};Q.createElement=function(e,t,a){var n,r={},i=null;if(t!=null)for(n in t.key!==void 0&&(i=""+t.key),t)Ow.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(r[n]=t[n]);var o=arguments.length-2;if(o===1)r.children=a;else if(1<o){for(var s=Array(o),l=0;l<o;l++)s[l]=arguments[l+2];r.children=s}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)r[n]===void 0&&(r[n]=o[n]);return Tg(e,i,r)};Q.createRef=function(){return{current:null}};Q.forwardRef=function(e){return{$$typeof:P5,render:e}};Q.isValidElement=Ag;Q.lazy=function(e){return{$$typeof:Ew,_payload:{_status:-1,_result:e},_init:H5}};Q.memo=function(e,t){return{$$typeof:B5,type:e,compare:t===void 0?null:t}};Q.startTransition=function(e){var t=Be.T,a={};Be.T=a;try{var n=e(),r=Be.S;r!==null&&r(a,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(Lg,Aw)}catch(i){Aw(i)}finally{t!==null&&a.types!==null&&(t.types=a.types),Be.T=t}};Q.unstable_useCacheRefresh=function(){return Be.H.useCacheRefresh()};Q.use=function(e){return Be.H.use(e)};Q.useActionState=function(e,t,a){return Be.H.useActionState(e,t,a)};Q.useCallback=function(e,t){return Be.H.useCallback(e,t)};Q.useContext=function(e){return Be.H.useContext(e)};Q.useDebugValue=function(){};Q.useDeferredValue=function(e,t){return Be.H.useDeferredValue(e,t)};Q.useEffect=function(e,t){return Be.H.useEffect(e,t)};Q.useEffectEvent=function(e){return Be.H.useEffectEvent(e)};Q.useId=function(){return Be.H.useId()};Q.useImperativeHandle=function(e,t,a){return Be.H.useImperativeHandle(e,t,a)};Q.useInsertionEffect=function(e,t){return Be.H.useInsertionEffect(e,t)};Q.useLayoutEffect=function(e,t){return Be.H.useLayoutEffect(e,t)};Q.useMemo=function(e,t){return Be.H.useMemo(e,t)};Q.useOptimistic=function(e,t){return Be.H.useOptimistic(e,t)};Q.useReducer=function(e,t,a){return Be.H.useReducer(e,t,a)};Q.useRef=function(e){return Be.H.useRef(e)};Q.useState=function(e){return Be.H.useState(e)};Q.useSyncExternalStore=function(e,t,a){return Be.H.useSyncExternalStore(e,t,a)};Q.useTransition=function(){return Be.H.useTransition()};Q.version="19.2.8"});var re=It((O7,Fw)=>{"use strict";Fw.exports=Bw()});var Ww=It(Ne=>{"use strict";function Rg(e,t){var a=e.length;e.push(t);e:for(;0<a;){var n=a-1>>>1,r=e[n];if(0<hf(r,t))e[n]=t,e[a]=r,a=n;else break e}}function dn(e){return e.length===0?null:e[0]}function xf(e){if(e.length===0)return null;var t=e[0],a=e.pop();if(a!==t){e[0]=a;e:for(var n=0,r=e.length,i=r>>>1;n<i;){var o=2*(n+1)-1,s=e[o],l=o+1,u=e[l];if(0>hf(s,a))l<r&&0>hf(u,s)?(e[n]=u,e[l]=a,n=l):(e[n]=s,e[o]=a,n=o);else if(l<r&&0>hf(u,a))e[n]=u,e[l]=a,n=l;else break e}}return t}function hf(e,t){var a=e.sortIndex-t.sortIndex;return a!==0?a:e.id-t.id}Ne.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Uw=performance,Ne.unstable_now=function(){return Uw.now()}):(Eg=Date,zw=Eg.now(),Ne.unstable_now=function(){return Eg.now()-zw});var Uw,Eg,zw,zn=[],Ir=[],j5=1,Pa=null,Ht=3,Pg=!1,Al=!1,El=!1,Og=!1,Hw=typeof setTimeout=="function"?setTimeout:null,qw=typeof clearTimeout=="function"?clearTimeout:null,Vw=typeof setImmediate<"u"?setImmediate:null;function gf(e){for(var t=dn(Ir);t!==null;){if(t.callback===null)xf(Ir);else if(t.startTime<=e)xf(Ir),t.sortIndex=t.expirationTime,Rg(zn,t);else break;t=dn(Ir)}}function Bg(e){if(El=!1,gf(e),!Al)if(dn(zn)!==null)Al=!0,No||(No=!0,Vo());else{var t=dn(Ir);t!==null&&Fg(Bg,t.startTime-e)}}var No=!1,Dl=-1,jw=5,Gw=-1;function Xw(){return Og?!0:!(Ne.unstable_now()-Gw<jw)}function Dg(){if(Og=!1,No){var e=Ne.unstable_now();Gw=e;var t=!0;try{e:{Al=!1,El&&(El=!1,qw(Dl),Dl=-1),Pg=!0;var a=Ht;try{t:{for(gf(e),Pa=dn(zn);Pa!==null&&!(Pa.expirationTime>e&&Xw());){var n=Pa.callback;if(typeof n=="function"){Pa.callback=null,Ht=Pa.priorityLevel;var r=n(Pa.expirationTime<=e);if(e=Ne.unstable_now(),typeof r=="function"){Pa.callback=r,gf(e),t=!0;break t}Pa===dn(zn)&&xf(zn),gf(e)}else xf(zn);Pa=dn(zn)}if(Pa!==null)t=!0;else{var i=dn(Ir);i!==null&&Fg(Bg,i.startTime-e),t=!1}}break e}finally{Pa=null,Ht=a,Pg=!1}t=void 0}}finally{t?Vo():No=!1}}}var Vo;typeof Vw=="function"?Vo=function(){Vw(Dg)}:typeof MessageChannel<"u"?(Mg=new MessageChannel,Nw=Mg.port2,Mg.port1.onmessage=Dg,Vo=function(){Nw.postMessage(null)}):Vo=function(){Hw(Dg,0)};var Mg,Nw;function Fg(e,t){Dl=Hw(function(){e(Ne.unstable_now())},t)}Ne.unstable_IdlePriority=5;Ne.unstable_ImmediatePriority=1;Ne.unstable_LowPriority=4;Ne.unstable_NormalPriority=3;Ne.unstable_Profiling=null;Ne.unstable_UserBlockingPriority=2;Ne.unstable_cancelCallback=function(e){e.callback=null};Ne.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):jw=0<e?Math.floor(1e3/e):5};Ne.unstable_getCurrentPriorityLevel=function(){return Ht};Ne.unstable_next=function(e){switch(Ht){case 1:case 2:case 3:var t=3;break;default:t=Ht}var a=Ht;Ht=t;try{return e()}finally{Ht=a}};Ne.unstable_requestPaint=function(){Og=!0};Ne.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var a=Ht;Ht=e;try{return t()}finally{Ht=a}};Ne.unstable_scheduleCallback=function(e,t,a){var n=Ne.unstable_now();switch(typeof a=="object"&&a!==null?(a=a.delay,a=typeof a=="number"&&0<a?n+a:n):a=n,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=a+r,e={id:j5++,callback:t,priorityLevel:e,startTime:a,expirationTime:r,sortIndex:-1},a>n?(e.sortIndex=a,Rg(Ir,e),dn(zn)===null&&e===dn(Ir)&&(El?(qw(Dl),Dl=-1):El=!0,Fg(Bg,a-n))):(e.sortIndex=r,Rg(zn,e),Al||Pg||(Al=!0,No||(No=!0,Vo()))),e};Ne.unstable_shouldYield=Xw;Ne.unstable_wrapCallback=function(e){var t=Ht;return function(){var a=Ht;Ht=t;try{return e.apply(this,arguments)}finally{Ht=a}}}});var Yw=It((F7,Kw)=>{"use strict";Kw.exports=Ww()});var Qw=It(Zt=>{"use strict";var G5=re();function Zw(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function _r(){}var Yt={d:{f:_r,r:function(){throw Error(Zw(522))},D:_r,C:_r,L:_r,m:_r,X:_r,S:_r,M:_r},p:0,findDOMNode:null},X5=Symbol.for("react.portal");function W5(e,t,a){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:X5,key:n==null?null:""+n,children:e,containerInfo:t,implementation:a}}var Ml=G5.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function yf(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yt;Zt.createPortal=function(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Zw(299));return W5(e,t,null,a)};Zt.flushSync=function(e){var t=Ml.T,a=Yt.p;try{if(Ml.T=null,Yt.p=2,e)return e()}finally{Ml.T=t,Yt.p=a,Yt.d.f()}};Zt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Yt.d.C(e,t))};Zt.prefetchDNS=function(e){typeof e=="string"&&Yt.d.D(e)};Zt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var a=t.as,n=yf(a,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;a==="style"?Yt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:r,fetchPriority:i}):a==="script"&&Yt.d.X(e,{crossOrigin:n,integrity:r,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Zt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var a=yf(t.as,t.crossOrigin);Yt.d.M(e,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Yt.d.M(e)};Zt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var a=t.as,n=yf(a,t.crossOrigin);Yt.d.L(e,a,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Zt.preloadModule=function(e,t){if(typeof e=="string")if(t){var a=yf(t.as,t.crossOrigin);Yt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Yt.d.m(e)};Zt.requestFormReset=function(e){Yt.d.r(e)};Zt.unstable_batchedUpdates=function(e,t){return e(t)};Zt.useFormState=function(e,t,a){return Ml.H.useFormState(e,t,a)};Zt.useFormStatus=function(){return Ml.H.useHostTransitionStatus()};Zt.version="19.2.8"});var Ug=It((z7,Jw)=>{"use strict";function $w(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($w)}catch(e){console.error(e)}}$w(),Jw.exports=Qw()});var fk=It(qd=>{"use strict";var St=Yw(),I1=re(),K5=Ug();function D(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function _1(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yu(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 k1(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 T1(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function eL(e){if(yu(e)!==e)throw Error(D(188))}function Y5(e){var t=e.alternate;if(!t){if(t=yu(e),t===null)throw Error(D(188));return t!==e?null:e}for(var a=e,n=t;;){var r=a.return;if(r===null)break;var i=r.alternate;if(i===null){if(n=r.return,n!==null){a=n;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===a)return eL(r),e;if(i===n)return eL(r),t;i=i.sibling}throw Error(D(188))}if(a.return!==n.return)a=r,n=i;else{for(var o=!1,s=r.child;s;){if(s===a){o=!0,a=r,n=i;break}if(s===n){o=!0,n=r,a=i;break}s=s.sibling}if(!o){for(s=i.child;s;){if(s===a){o=!0,a=i,n=r;break}if(s===n){o=!0,n=i,a=r;break}s=s.sibling}if(!o)throw Error(D(189))}}if(a.alternate!==n)throw Error(D(190))}if(a.tag!==3)throw Error(D(188));return a.stateNode.current===a?e:t}function A1(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A1(e),t!==null)return t;e=e.sibling}return null}var ze=Object.assign,Z5=Symbol.for("react.element"),vf=Symbol.for("react.transitional.element"),Vl=Symbol.for("react.portal"),Wo=Symbol.for("react.fragment"),E1=Symbol.for("react.strict_mode"),yx=Symbol.for("react.profiler"),D1=Symbol.for("react.consumer"),Wn=Symbol.for("react.context"),py=Symbol.for("react.forward_ref"),vx=Symbol.for("react.suspense"),Sx=Symbol.for("react.suspense_list"),my=Symbol.for("react.memo"),kr=Symbol.for("react.lazy"),bx=Symbol.for("react.activity"),Q5=Symbol.for("react.memo_cache_sentinel"),tL=Symbol.iterator;function Rl(e){return e===null||typeof e!="object"?null:(e=tL&&e[tL]||e["@@iterator"],typeof e=="function"?e:null)}var $5=Symbol.for("react.client.reference");function Cx(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===$5?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wo:return"Fragment";case yx:return"Profiler";case E1:return"StrictMode";case vx:return"Suspense";case Sx:return"SuspenseList";case bx:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Vl:return"Portal";case Wn:return e.displayName||"Context";case D1:return(e._context.displayName||"Context")+".Consumer";case py:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case my:return t=e.displayName||null,t!==null?t:Cx(e.type)||"Memo";case kr:t=e._payload,e=e._init;try{return Cx(e(t))}catch{}}return null}var Nl=Array.isArray,W=I1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he=K5.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Mi={pending:!1,data:null,method:null,action:null},wx=[],Ko=-1;function xn(e){return{current:e}}function Tt(e){0>Ko||(e.current=wx[Ko],wx[Ko]=null,Ko--)}function Re(e,t){Ko++,wx[Ko]=e.current,e.current=t}var gn=xn(null),ru=xn(null),Ur=xn(null),$f=xn(null);function Jf(e,t){switch(Re(Ur,t),Re(ru,e),Re(gn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?l1(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=l1(t),e=Q_(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Tt(gn),Re(gn,e)}function ds(){Tt(gn),Tt(ru),Tt(Ur)}function Lx(e){e.memoizedState!==null&&Re($f,e);var t=gn.current,a=Q_(t,e.type);t!==a&&(Re(ru,e),Re(gn,a))}function ed(e){ru.current===e&&(Tt(gn),Tt(ru)),$f.current===e&&(Tt($f),hu._currentValue=Mi)}var zg,aL;function Ti(e){if(zg===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);zg=t&&t[1]||"",aL=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+zg+e+aL}var Vg=!1;function Ng(e,t){if(!e||Vg)return"";Vg=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(p){var d=p}Reflect.construct(e,[],f)}else{try{f.call()}catch(p){d=p}e.call(f.prototype)}}else{try{throw Error()}catch(p){d=p}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(p){if(p&&d&&typeof p.stack=="string")return[p.stack,d.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=n.DetermineComponentFrameRoot(),o=i[0],s=i[1];if(o&&s){var l=o.split(`
|
|
4
|
+
`),u=s.split(`
|
|
5
|
+
`);for(r=n=0;n<l.length&&!l[n].includes("DetermineComponentFrameRoot");)n++;for(;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;if(n===l.length||r===u.length)for(n=l.length-1,r=u.length-1;1<=n&&0<=r&&l[n]!==u[r];)r--;for(;1<=n&&0<=r;n--,r--)if(l[n]!==u[r]){if(n!==1||r!==1)do if(n--,r--,0>r||l[n]!==u[r]){var c=`
|
|
6
|
+
`+l[n].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=n&&0<=r);break}}}finally{Vg=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ti(a):""}function J5(e,t){switch(e.tag){case 26:case 27:case 5:return Ti(e.type);case 16:return Ti("Lazy");case 13:return e.child!==t&&t!==null?Ti("Suspense Fallback"):Ti("Suspense");case 19:return Ti("SuspenseList");case 0:case 15:return Ng(e.type,!1);case 11:return Ng(e.type.render,!1);case 1:return Ng(e.type,!0);case 31:return Ti("Activity");default:return""}}function nL(e){try{var t="",a=null;do t+=J5(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
7
|
+
Error generating stack: `+n.message+`
|
|
8
|
+
`+n.stack}}var Ix=Object.prototype.hasOwnProperty,hy=St.unstable_scheduleCallback,Hg=St.unstable_cancelCallback,ez=St.unstable_shouldYield,tz=St.unstable_requestPaint,ba=St.unstable_now,az=St.unstable_getCurrentPriorityLevel,M1=St.unstable_ImmediatePriority,R1=St.unstable_UserBlockingPriority,td=St.unstable_NormalPriority,nz=St.unstable_LowPriority,P1=St.unstable_IdlePriority,rz=St.log,iz=St.unstable_setDisableYieldValue,vu=null,Ca=null;function Rr(e){if(typeof rz=="function"&&iz(e),Ca&&typeof Ca.setStrictMode=="function")try{Ca.setStrictMode(vu,e)}catch{}}var wa=Math.clz32?Math.clz32:lz,oz=Math.log,sz=Math.LN2;function lz(e){return e>>>=0,e===0?32:31-(oz(e)/sz|0)|0}var Sf=256,bf=262144,Cf=4194304;function Ai(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:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;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 e}}function kd(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=n&134217727;return s!==0?(n=s&~i,n!==0?r=Ai(n):(o&=s,o!==0?r=Ai(o):a||(a=s&~e,a!==0&&(r=Ai(a))))):(s=n&~i,s!==0?r=Ai(s):o!==0?r=Ai(o):a||(a=n&~e,a!==0&&(r=Ai(a)))),r===0?0:t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:r}function Su(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function uz(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-1}}function O1(){var e=Cf;return Cf<<=1,(Cf&62914560)===0&&(Cf=4194304),e}function qg(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function bu(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function cz(e,t,a,n,r,i){var o=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 s=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(a=o&~a;0<a;){var c=31-wa(a),f=1<<c;s[c]=0,l[c]=-1;var d=u[c];if(d!==null)for(u[c]=null,c=0;c<d.length;c++){var p=d[c];p!==null&&(p.lane&=-536870913)}a&=~f}n!==0&&B1(e,n,0),i!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function B1(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-wa(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function F1(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-wa(a),r=1<<n;r&t|e[n]&t&&(e[n]|=t),a&=~r}}function U1(e,t){var a=t&-t;return a=(a&42)!==0?1:gy(a),(a&(e.suspendedLanes|t))!==0?0:a}function gy(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 xy(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function z1(){var e=he.p;return e!==0?e:(e=window.event,e===void 0?32:lk(e.type))}function rL(e,t){var a=he.p;try{return he.p=e,t()}finally{he.p=a}}var Qr=Math.random().toString(36).slice(2),Pt="__reactFiber$"+Qr,ua="__reactProps$"+Qr,ws="__reactContainer$"+Qr,_x="__reactEvents$"+Qr,fz="__reactListeners$"+Qr,dz="__reactHandles$"+Qr,iL="__reactResources$"+Qr,Cu="__reactMarker$"+Qr;function yy(e){delete e[Pt],delete e[ua],delete e[_x],delete e[fz],delete e[dz]}function Yo(e){var t=e[Pt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ws]||a[Pt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=p1(e);e!==null;){if(a=e[Pt])return a;e=p1(e)}return t}e=a,a=e.parentNode}return null}function Ls(e){if(e=e[Pt]||e[ws]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Hl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(D(33))}function is(e){var t=e[iL];return t||(t=e[iL]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function kt(e){e[Cu]=!0}var V1=new Set,N1={};function Hi(e,t){ps(e,t),ps(e+"Capture",t)}function ps(e,t){for(N1[e]=t,e=0;e<t.length;e++)V1.add(t[e])}var pz=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]*$"),oL={},sL={};function mz(e){return Ix.call(sL,e)?!0:Ix.call(oL,e)?!1:pz.test(e)?sL[e]=!0:(oL[e]=!0,!1)}function Ff(e,t,a){if(mz(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function wf(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}e.setAttribute(t,""+a)}}function Vn(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Ba(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function H1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hz(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(o){a=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function kx(e){if(!e._valueTracker){var t=H1(e)?"checked":"value";e._valueTracker=hz(e,t,""+e[t])}}function q1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=H1(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function ad(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}}var gz=/[\n"\\]/g;function za(e){return e.replace(gz,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Tx(e,t,a,n,r,i,o,s){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ba(t)):e.value!==""+Ba(t)&&(e.value=""+Ba(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Ax(e,o,Ba(t)):a!=null?Ax(e,o,Ba(a)):n!=null&&e.removeAttribute("value"),r==null&&i!=null&&(e.defaultChecked=!!i),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+Ba(s):e.removeAttribute("name")}function j1(e,t,a,n,r,i,o,s){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){kx(e);return}a=a!=null?""+Ba(a):"",t=t!=null?""+Ba(t):a,s||t===e.value||(e.value=t),e.defaultValue=t}n=n??r,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=s?e.checked:!!n,e.defaultChecked=!!n,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),kx(e)}function Ax(e,t,a){t==="number"&&ad(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function os(e,t,a,n){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Ba(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,n&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function G1(e,t,a){if(t!=null&&(t=""+Ba(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ba(a):""}function X1(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(D(92));if(Nl(n)){if(1<n.length)throw Error(D(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Ba(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),kx(e)}function ms(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var xz=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 lL(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||xz.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function W1(e,t,a){if(t!=null&&typeof t!="object")throw Error(D(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var r in t)n=t[r],t.hasOwnProperty(r)&&a[r]!==n&&lL(e,r,n)}else for(var i in t)t.hasOwnProperty(i)&&lL(e,i,t[i])}function vy(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}}var yz=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"]]),vz=/^[\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 Uf(e){return vz.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kn(){}var Ex=null;function Sy(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zo=null,ss=null;function uL(e){var t=Ls(e);if(t&&(e=t.stateNode)){var a=e[ua]||null;e:switch(e=t.stateNode,t.type){case"input":if(Tx(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(a=a.querySelectorAll('input[name="'+za(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var r=n[ua]||null;if(!r)throw Error(D(90));Tx(n,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&q1(n)}break e;case"textarea":G1(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&os(e,!!a.multiple,t,!1)}}}var jg=!1;function K1(e,t,a){if(jg)return e(t,a);jg=!0;try{var n=e(t);return n}finally{if(jg=!1,(Zo!==null||ss!==null)&&(zd(),Zo&&(t=Zo,e=ss,ss=Zo=null,uL(t),e)))for(t=0;t<e.length;t++)uL(e[t])}}function iu(e,t){var a=e.stateNode;if(a===null)return null;var n=a[ua]||null;if(n===null)return null;a=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(D(231,t,typeof a));return a}var Jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dx=!1;if(Jn)try{Ho={},Object.defineProperty(Ho,"passive",{get:function(){Dx=!0}}),window.addEventListener("test",Ho,Ho),window.removeEventListener("test",Ho,Ho)}catch{Dx=!1}var Ho,Pr=null,by=null,zf=null;function Y1(){if(zf)return zf;var e,t=by,a=t.length,n,r="value"in Pr?Pr.value:Pr.textContent,i=r.length;for(e=0;e<a&&t[e]===r[e];e++);var o=a-e;for(n=1;n<=o&&t[a-n]===r[i-n];n++);return zf=r.slice(e,1<n?1-n:void 0)}function Vf(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 Lf(){return!0}function cL(){return!1}function ca(e){function t(a,n,r,i,o){this._reactName=a,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(a=e[s],this[s]=a?a(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Lf:cL,this.isPropagationStopped=cL,this}return ze(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=Lf)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Lf)},persist:function(){},isPersistent:Lf}),t}var qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Td=ca(qi),wu=ze({},qi,{view:0,detail:0}),Sz=ca(wu),Gg,Xg,Pl,Ad=ze({},wu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cy,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!==Pl&&(Pl&&e.type==="mousemove"?(Gg=e.screenX-Pl.screenX,Xg=e.screenY-Pl.screenY):Xg=Gg=0,Pl=e),Gg)},movementY:function(e){return"movementY"in e?e.movementY:Xg}}),fL=ca(Ad),bz=ze({},Ad,{dataTransfer:0}),Cz=ca(bz),wz=ze({},wu,{relatedTarget:0}),Wg=ca(wz),Lz=ze({},qi,{animationName:0,elapsedTime:0,pseudoElement:0}),Iz=ca(Lz),_z=ze({},qi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kz=ca(_z),Tz=ze({},qi,{data:0}),dL=ca(Tz),Az={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ez={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"},Dz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mz(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Dz[e])?!!t[e]:!1}function Cy(){return Mz}var Rz=ze({},wu,{key:function(e){if(e.key){var t=Az[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vf(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ez[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cy,charCode:function(e){return e.type==="keypress"?Vf(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vf(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Pz=ca(Rz),Oz=ze({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pL=ca(Oz),Bz=ze({},wu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cy}),Fz=ca(Bz),Uz=ze({},qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),zz=ca(Uz),Vz=ze({},Ad,{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}),Nz=ca(Vz),Hz=ze({},qi,{newState:0,oldState:0}),qz=ca(Hz),jz=[9,13,27,32],wy=Jn&&"CompositionEvent"in window,Gl=null;Jn&&"documentMode"in document&&(Gl=document.documentMode);var Gz=Jn&&"TextEvent"in window&&!Gl,Z1=Jn&&(!wy||Gl&&8<Gl&&11>=Gl),mL=" ",hL=!1;function Q1(e,t){switch(e){case"keyup":return jz.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qo=!1;function Xz(e,t){switch(e){case"compositionend":return $1(t);case"keypress":return t.which!==32?null:(hL=!0,mL);case"textInput":return e=t.data,e===mL&&hL?null:e;default:return null}}function Wz(e,t){if(Qo)return e==="compositionend"||!wy&&Q1(e,t)?(e=Y1(),zf=by=Pr=null,Qo=!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 Z1&&t.locale!=="ko"?null:t.data;default:return null}}var Kz={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 gL(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Kz[e.type]:t==="textarea"}function J1(e,t,a,n){Zo?ss?ss.push(n):ss=[n]:Zo=n,t=Sd(t,"onChange"),0<t.length&&(a=new Td("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var Xl=null,ou=null;function Yz(e){K_(e,0)}function Ed(e){var t=Hl(e);if(q1(t))return e}function xL(e,t){if(e==="change")return t}var eI=!1;Jn&&(Jn?(_f="oninput"in document,_f||(Kg=document.createElement("div"),Kg.setAttribute("oninput","return;"),_f=typeof Kg.oninput=="function"),If=_f):If=!1,eI=If&&(!document.documentMode||9<document.documentMode));var If,_f,Kg;function yL(){Xl&&(Xl.detachEvent("onpropertychange",tI),ou=Xl=null)}function tI(e){if(e.propertyName==="value"&&Ed(ou)){var t=[];J1(t,ou,e,Sy(e)),K1(Yz,t)}}function Zz(e,t,a){e==="focusin"?(yL(),Xl=t,ou=a,Xl.attachEvent("onpropertychange",tI)):e==="focusout"&&yL()}function Qz(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ed(ou)}function $z(e,t){if(e==="click")return Ed(t)}function Jz(e,t){if(e==="input"||e==="change")return Ed(t)}function eV(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ia=typeof Object.is=="function"?Object.is:eV;function su(e,t){if(Ia(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var r=a[n];if(!Ix.call(t,r)||!Ia(e[r],t[r]))return!1}return!0}function vL(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function SL(e,t){var a=vL(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=vL(a)}}function aI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?aI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nI(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ad(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=ad(e.document)}return t}function Ly(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")}var tV=Jn&&"documentMode"in document&&11>=document.documentMode,$o=null,Mx=null,Wl=null,Rx=!1;function bL(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Rx||$o==null||$o!==ad(n)||(n=$o,"selectionStart"in n&&Ly(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Wl&&su(Wl,n)||(Wl=n,n=Sd(Mx,"onSelect"),0<n.length&&(t=new Td("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=$o)))}function ki(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Jo={animationend:ki("Animation","AnimationEnd"),animationiteration:ki("Animation","AnimationIteration"),animationstart:ki("Animation","AnimationStart"),transitionrun:ki("Transition","TransitionRun"),transitionstart:ki("Transition","TransitionStart"),transitioncancel:ki("Transition","TransitionCancel"),transitionend:ki("Transition","TransitionEnd")},Yg={},rI={};Jn&&(rI=document.createElement("div").style,"AnimationEvent"in window||(delete Jo.animationend.animation,delete Jo.animationiteration.animation,delete Jo.animationstart.animation),"TransitionEvent"in window||delete Jo.transitionend.transition);function ji(e){if(Yg[e])return Yg[e];if(!Jo[e])return e;var t=Jo[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in rI)return Yg[e]=t[a];return e}var iI=ji("animationend"),oI=ji("animationiteration"),sI=ji("animationstart"),aV=ji("transitionrun"),nV=ji("transitionstart"),rV=ji("transitioncancel"),lI=ji("transitionend"),uI=new Map,Px="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(" ");Px.push("scrollEnd");function rn(e,t){uI.set(e,t),Hi(t,[e])}var nd=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)},Oa=[],es=0,Iy=0;function Dd(){for(var e=es,t=Iy=es=0;t<e;){var a=Oa[t];Oa[t++]=null;var n=Oa[t];Oa[t++]=null;var r=Oa[t];Oa[t++]=null;var i=Oa[t];if(Oa[t++]=null,n!==null&&r!==null){var o=n.pending;o===null?r.next=r:(r.next=o.next,o.next=r),n.pending=r}i!==0&&cI(a,r,i)}}function Md(e,t,a,n){Oa[es++]=e,Oa[es++]=t,Oa[es++]=a,Oa[es++]=n,Iy|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function _y(e,t,a,n){return Md(e,t,a,n),rd(e)}function Gi(e,t){return Md(e,null,null,t),rd(e)}function cI(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var r=!1,i=e.return;i!==null;)i.childLanes|=a,n=i.alternate,n!==null&&(n.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(r=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,r&&t!==null&&(r=31-wa(a),e=i.hiddenUpdates,n=e[r],n===null?e[r]=[t]:n.push(t),t.lane=a|536870912),i):null}function rd(e){if(50<au)throw au=0,ty=null,Error(D(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ts={};function iV(e,t,a,n){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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function va(e,t,a,n){return new iV(e,t,a,n)}function ky(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zn(e,t){var a=e.alternate;return a===null?(a=va(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),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},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function fI(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.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}),e}function Nf(e,t,a,n,r,i){var o=0;if(n=e,typeof e=="function")ky(e)&&(o=1);else if(typeof e=="string")o=lN(e,a,gn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case bx:return e=va(31,a,t,r),e.elementType=bx,e.lanes=i,e;case Wo:return Ri(a.children,r,i,t);case E1:o=8,r|=24;break;case yx:return e=va(12,a,t,r|2),e.elementType=yx,e.lanes=i,e;case vx:return e=va(13,a,t,r),e.elementType=vx,e.lanes=i,e;case Sx:return e=va(19,a,t,r),e.elementType=Sx,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Wn:o=10;break e;case D1:o=9;break e;case py:o=11;break e;case my:o=14;break e;case kr:o=16,n=null;break e}o=29,a=Error(D(130,e===null?"null":typeof e,"")),n=null}return t=va(o,a,t,r),t.elementType=e,t.type=n,t.lanes=i,t}function Ri(e,t,a,n){return e=va(7,e,n,t),e.lanes=a,e}function Zg(e,t,a){return e=va(6,e,null,t),e.lanes=a,e}function dI(e){var t=va(18,null,null,0);return t.stateNode=e,t}function Qg(e,t,a){return t=va(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var CL=new WeakMap;function Va(e,t){if(typeof e=="object"&&e!==null){var a=CL.get(e);return a!==void 0?a:(t={value:e,source:t,stack:nL(t)},CL.set(e,t),t)}return{value:e,source:t,stack:nL(t)}}var as=[],ns=0,id=null,lu=0,Fa=[],Ua=0,Wr=null,pn=1,mn="";function Gn(e,t){as[ns++]=lu,as[ns++]=id,id=e,lu=t}function pI(e,t,a){Fa[Ua++]=pn,Fa[Ua++]=mn,Fa[Ua++]=Wr,Wr=e;var n=pn;e=mn;var r=32-wa(n)-1;n&=~(1<<r),a+=1;var i=32-wa(t)+r;if(30<i){var o=r-r%5;i=(n&(1<<o)-1).toString(32),n>>=o,r-=o,pn=1<<32-wa(t)+r|a<<r|n,mn=i+e}else pn=1<<i|a<<r|n,mn=e}function Ty(e){e.return!==null&&(Gn(e,1),pI(e,1,0))}function Ay(e){for(;e===id;)id=as[--ns],as[ns]=null,lu=as[--ns],as[ns]=null;for(;e===Wr;)Wr=Fa[--Ua],Fa[Ua]=null,mn=Fa[--Ua],Fa[Ua]=null,pn=Fa[--Ua],Fa[Ua]=null}function mI(e,t){Fa[Ua++]=pn,Fa[Ua++]=mn,Fa[Ua++]=Wr,pn=t.id,mn=t.overflow,Wr=e}var Ot=null,Ue=null,fe=!1,zr=null,Na=!1,Ox=Error(D(519));function Kr(e){var t=Error(D(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw uu(Va(t,e)),Ox}function wL(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Pt]=e,t[ua]=n,a){case"dialog":oe("cancel",t),oe("close",t);break;case"iframe":case"object":case"embed":oe("load",t);break;case"video":case"audio":for(a=0;a<pu.length;a++)oe(pu[a],t);break;case"source":oe("error",t);break;case"img":case"image":case"link":oe("error",t),oe("load",t);break;case"details":oe("toggle",t);break;case"input":oe("invalid",t),j1(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":oe("invalid",t);break;case"textarea":oe("invalid",t),X1(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||Z_(t.textContent,a)?(n.popover!=null&&(oe("beforetoggle",t),oe("toggle",t)),n.onScroll!=null&&oe("scroll",t),n.onScrollEnd!=null&&oe("scrollend",t),n.onClick!=null&&(t.onclick=Kn),t=!0):t=!1,t||Kr(e,!0)}function LL(e){for(Ot=e.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:Na=!1;return;case 27:case 3:Na=!0;return;default:Ot=Ot.return}}function qo(e){if(e!==Ot)return!1;if(!fe)return LL(e),fe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||oy(e.type,e.memoizedProps)),a=!a),a&&Ue&&Kr(e),LL(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));Ue=d1(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));Ue=d1(e)}else t===27?(t=Ue,$r(e.type)?(e=cy,cy=null,Ue=e):Ue=t):Ue=Ot?qa(e.stateNode.nextSibling):null;return!0}function Fi(){Ue=Ot=null,fe=!1}function $g(){var e=zr;return e!==null&&(sa===null?sa=e:sa.push.apply(sa,e),zr=null),e}function uu(e){zr===null?zr=[e]:zr.push(e)}var Bx=xn(null),Xi=null,Yn=null;function Ar(e,t,a){Re(Bx,t._currentValue),t._currentValue=a}function Qn(e){e._currentValue=Bx.current,Tt(Bx)}function Fx(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Ux(e,t,a,n){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var i=r.dependencies;if(i!==null){var o=r.child;i=i.firstContext;e:for(;i!==null;){var s=i;i=r;for(var l=0;l<t.length;l++)if(s.context===t[l]){i.lanes|=a,s=i.alternate,s!==null&&(s.lanes|=a),Fx(i.return,a,e),n||(o=null);break e}i=s.next}}else if(r.tag===18){if(o=r.return,o===null)throw Error(D(341));o.lanes|=a,i=o.alternate,i!==null&&(i.lanes|=a),Fx(o,a,e),o=null}else o=r.child;if(o!==null)o.return=r;else for(o=r;o!==null;){if(o===e){o=null;break}if(r=o.sibling,r!==null){r.return=o.return,o=r;break}o=o.return}r=o}}function Is(e,t,a,n){e=null;for(var r=t,i=!1;r!==null;){if(!i){if((r.flags&524288)!==0)i=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var o=r.alternate;if(o===null)throw Error(D(387));if(o=o.memoizedProps,o!==null){var s=r.type;Ia(r.pendingProps.value,o.value)||(e!==null?e.push(s):e=[s])}}else if(r===$f.current){if(o=r.alternate,o===null)throw Error(D(387));o.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(hu):e=[hu])}r=r.return}e!==null&&Ux(t,e,a,n),t.flags|=262144}function od(e){for(e=e.firstContext;e!==null;){if(!Ia(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ui(e){Xi=e,Yn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Bt(e){return hI(Xi,e)}function kf(e,t){return Xi===null&&Ui(e),hI(e,t)}function hI(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Yn===null){if(e===null)throw Error(D(308));Yn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yn=Yn.next=t;return a}var oV=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},sV=St.unstable_scheduleCallback,lV=St.unstable_NormalPriority,mt={$$typeof:Wn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ey(){return{controller:new oV,data:new Map,refCount:0}}function Lu(e){e.refCount--,e.refCount===0&&sV(lV,function(){e.controller.abort()})}var Kl=null,zx=0,hs=0,ls=null;function uV(e,t){if(Kl===null){var a=Kl=[];zx=0,hs=tv(),ls={status:"pending",value:void 0,then:function(n){a.push(n)}}}return zx++,t.then(IL,IL),t}function IL(){if(--zx===0&&Kl!==null){ls!==null&&(ls.status="fulfilled");var e=Kl;Kl=null,hs=0,ls=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function cV(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(n.status="rejected",n.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),n}var _L=W.S;W.S=function(e,t){A_=ba(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&uV(e,t),_L!==null&&_L(e,t)};var Pi=xn(null);function Dy(){var e=Pi.current;return e!==null?e:De.pooledCache}function Hf(e,t){t===null?Re(Pi,Pi.current):Re(Pi,t.pool)}function gI(){var e=Dy();return e===null?null:{parent:mt._currentValue,pool:e}}var _s=Error(D(460)),My=Error(D(474)),Rd=Error(D(542)),sd={then:function(){}};function kL(e){return e=e.status,e==="fulfilled"||e==="rejected"}function xI(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Kn,Kn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,AL(e),e;default:if(typeof t.status=="string")t.then(Kn,Kn);else{if(e=De,e!==null&&100<e.shellSuspendCounter)throw Error(D(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=n}},function(n){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,AL(e),e}throw Oi=t,_s}}function Ei(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Oi=a,_s):a}}var Oi=null;function TL(){if(Oi===null)throw Error(D(459));var e=Oi;return Oi=null,e}function AL(e){if(e===_s||e===Rd)throw Error(D(483))}var us=null,cu=0;function Tf(e){var t=cu;return cu+=1,us===null&&(us=[]),xI(us,e,t)}function Ol(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Af(e,t){throw t.$$typeof===Z5?Error(D(525)):(e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function yI(e){function t(g,x){if(e){var y=g.deletions;y===null?(g.deletions=[x],g.flags|=16):y.push(x)}}function a(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function n(g){for(var x=new Map;g!==null;)g.key!==null?x.set(g.key,g):x.set(g.index,g),g=g.sibling;return x}function r(g,x){return g=Zn(g,x),g.index=0,g.sibling=null,g}function i(g,x,y){return g.index=y,e?(y=g.alternate,y!==null?(y=y.index,y<x?(g.flags|=67108866,x):y):(g.flags|=67108866,x)):(g.flags|=1048576,x)}function o(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function s(g,x,y,b){return x===null||x.tag!==6?(x=Zg(y,g.mode,b),x.return=g,x):(x=r(x,y),x.return=g,x)}function l(g,x,y,b){var T=y.type;return T===Wo?c(g,x,y.props.children,b,y.key):x!==null&&(x.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&Ei(T)===x.type)?(x=r(x,y.props),Ol(x,y),x.return=g,x):(x=Nf(y.type,y.key,y.props,null,g.mode,b),Ol(x,y),x.return=g,x)}function u(g,x,y,b){return x===null||x.tag!==4||x.stateNode.containerInfo!==y.containerInfo||x.stateNode.implementation!==y.implementation?(x=Qg(y,g.mode,b),x.return=g,x):(x=r(x,y.children||[]),x.return=g,x)}function c(g,x,y,b,T){return x===null||x.tag!==7?(x=Ri(y,g.mode,b,T),x.return=g,x):(x=r(x,y),x.return=g,x)}function f(g,x,y){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=Zg(""+x,g.mode,y),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case vf:return y=Nf(x.type,x.key,x.props,null,g.mode,y),Ol(y,x),y.return=g,y;case Vl:return x=Qg(x,g.mode,y),x.return=g,x;case kr:return x=Ei(x),f(g,x,y)}if(Nl(x)||Rl(x))return x=Ri(x,g.mode,y,null),x.return=g,x;if(typeof x.then=="function")return f(g,Tf(x),y);if(x.$$typeof===Wn)return f(g,kf(g,x),y);Af(g,x)}return null}function d(g,x,y,b){var T=x!==null?x.key:null;if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return T!==null?null:s(g,x,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case vf:return y.key===T?l(g,x,y,b):null;case Vl:return y.key===T?u(g,x,y,b):null;case kr:return y=Ei(y),d(g,x,y,b)}if(Nl(y)||Rl(y))return T!==null?null:c(g,x,y,b,null);if(typeof y.then=="function")return d(g,x,Tf(y),b);if(y.$$typeof===Wn)return d(g,x,kf(g,y),b);Af(g,y)}return null}function p(g,x,y,b,T){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return g=g.get(y)||null,s(x,g,""+b,T);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case vf:return g=g.get(b.key===null?y:b.key)||null,l(x,g,b,T);case Vl:return g=g.get(b.key===null?y:b.key)||null,u(x,g,b,T);case kr:return b=Ei(b),p(g,x,y,b,T)}if(Nl(b)||Rl(b))return g=g.get(y)||null,c(x,g,b,T,null);if(typeof b.then=="function")return p(g,x,y,Tf(b),T);if(b.$$typeof===Wn)return p(g,x,y,kf(x,b),T);Af(x,b)}return null}function h(g,x,y,b){for(var T=null,I=null,A=x,_=x=0,M=null;A!==null&&_<y.length;_++){A.index>_?(M=A,A=null):M=A.sibling;var C=d(g,A,y[_],b);if(C===null){A===null&&(A=M);break}e&&A&&C.alternate===null&&t(g,A),x=i(C,x,_),I===null?T=C:I.sibling=C,I=C,A=M}if(_===y.length)return a(g,A),fe&&Gn(g,_),T;if(A===null){for(;_<y.length;_++)A=f(g,y[_],b),A!==null&&(x=i(A,x,_),I===null?T=A:I.sibling=A,I=A);return fe&&Gn(g,_),T}for(A=n(A);_<y.length;_++)M=p(A,g,_,y[_],b),M!==null&&(e&&M.alternate!==null&&A.delete(M.key===null?_:M.key),x=i(M,x,_),I===null?T=M:I.sibling=M,I=M);return e&&A.forEach(function(U){return t(g,U)}),fe&&Gn(g,_),T}function v(g,x,y,b){if(y==null)throw Error(D(151));for(var T=null,I=null,A=x,_=x=0,M=null,C=y.next();A!==null&&!C.done;_++,C=y.next()){A.index>_?(M=A,A=null):M=A.sibling;var U=d(g,A,C.value,b);if(U===null){A===null&&(A=M);break}e&&A&&U.alternate===null&&t(g,A),x=i(U,x,_),I===null?T=U:I.sibling=U,I=U,A=M}if(C.done)return a(g,A),fe&&Gn(g,_),T;if(A===null){for(;!C.done;_++,C=y.next())C=f(g,C.value,b),C!==null&&(x=i(C,x,_),I===null?T=C:I.sibling=C,I=C);return fe&&Gn(g,_),T}for(A=n(A);!C.done;_++,C=y.next())C=p(A,g,_,C.value,b),C!==null&&(e&&C.alternate!==null&&A.delete(C.key===null?_:C.key),x=i(C,x,_),I===null?T=C:I.sibling=C,I=C);return e&&A.forEach(function(N){return t(g,N)}),fe&&Gn(g,_),T}function S(g,x,y,b){if(typeof y=="object"&&y!==null&&y.type===Wo&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case vf:e:{for(var T=y.key;x!==null;){if(x.key===T){if(T=y.type,T===Wo){if(x.tag===7){a(g,x.sibling),b=r(x,y.props.children),b.return=g,g=b;break e}}else if(x.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&Ei(T)===x.type){a(g,x.sibling),b=r(x,y.props),Ol(b,y),b.return=g,g=b;break e}a(g,x);break}else t(g,x);x=x.sibling}y.type===Wo?(b=Ri(y.props.children,g.mode,b,y.key),b.return=g,g=b):(b=Nf(y.type,y.key,y.props,null,g.mode,b),Ol(b,y),b.return=g,g=b)}return o(g);case Vl:e:{for(T=y.key;x!==null;){if(x.key===T)if(x.tag===4&&x.stateNode.containerInfo===y.containerInfo&&x.stateNode.implementation===y.implementation){a(g,x.sibling),b=r(x,y.children||[]),b.return=g,g=b;break e}else{a(g,x);break}else t(g,x);x=x.sibling}b=Qg(y,g.mode,b),b.return=g,g=b}return o(g);case kr:return y=Ei(y),S(g,x,y,b)}if(Nl(y))return h(g,x,y,b);if(Rl(y)){if(T=Rl(y),typeof T!="function")throw Error(D(150));return y=T.call(y),v(g,x,y,b)}if(typeof y.then=="function")return S(g,x,Tf(y),b);if(y.$$typeof===Wn)return S(g,x,kf(g,y),b);Af(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,x!==null&&x.tag===6?(a(g,x.sibling),b=r(x,y),b.return=g,g=b):(a(g,x),b=Zg(y,g.mode,b),b.return=g,g=b),o(g)):a(g,x)}return function(g,x,y,b){try{cu=0;var T=S(g,x,y,b);return us=null,T}catch(A){if(A===_s||A===Rd)throw A;var I=va(29,A,null,g.mode);return I.lanes=b,I.return=g,I}}}var zi=yI(!0),vI=yI(!1),Tr=!1;function Ry(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vx(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 Vr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Nr(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(me&2)!==0){var r=n.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),n.pending=t,t=rd(e),cI(e,null,a),t}return Md(e,n,t,a),rd(e)}function Yl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,F1(e,a)}}function Jg(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var r=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var o={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?r=i=o:i=i.next=o,a=a.next}while(a!==null);i===null?r=i=t:i=i.next=t}else r=i=t;a={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Nx=!1;function Zl(){if(Nx){var e=ls;if(e!==null)throw e}}function Ql(e,t,a,n){Nx=!1;var r=e.updateQueue;Tr=!1;var i=r.firstBaseUpdate,o=r.lastBaseUpdate,s=r.shared.pending;if(s!==null){r.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=r.baseState;o=0,c=u=l=null,s=i;do{var d=s.lane&-536870913,p=d!==s.lane;if(p?(le&d)===d:(n&d)===d){d!==0&&d===hs&&(Nx=!0),c!==null&&(c=c.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var h=e,v=s;d=t;var S=a;switch(v.tag){case 1:if(h=v.payload,typeof h=="function"){f=h.call(S,f,d);break e}f=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=v.payload,d=typeof h=="function"?h.call(S,f,d):h,d==null)break e;f=ze({},f,d);break e;case 2:Tr=!0}}d=s.callback,d!==null&&(e.flags|=64,p&&(e.flags|=8192),p=r.callbacks,p===null?r.callbacks=[d]:p.push(d))}else p={lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=f):c=c.next=p,o|=d;if(s=s.next,s===null){if(s=r.shared.pending,s===null)break;p=s,s=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);c===null&&(l=f),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=c,i===null&&(r.shared.lanes=0),Zr|=o,e.lanes=o,e.memoizedState=f}}function SI(e,t){if(typeof e!="function")throw Error(D(191,e));e.call(t)}function bI(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)SI(a[e],t)}var gs=xn(null),ld=xn(0);function EL(e,t){e=nr,Re(ld,e),Re(gs,t),nr=e|t.baseLanes}function Hx(){Re(ld,nr),Re(gs,gs.current)}function Py(){nr=ld.current,Tt(gs),Tt(ld)}var _a=xn(null),Ha=null;function Er(e){var t=e.alternate;Re(nt,nt.current&1),Re(_a,e),Ha===null&&(t===null||gs.current!==null||t.memoizedState!==null)&&(Ha=e)}function qx(e){Re(nt,nt.current),Re(_a,e),Ha===null&&(Ha=e)}function CI(e){e.tag===22?(Re(nt,nt.current),Re(_a,e),Ha===null&&(Ha=e)):Dr(e)}function Dr(){Re(nt,nt.current),Re(_a,_a.current)}function ya(e){Tt(_a),Ha===e&&(Ha=null),Tt(nt)}var nt=xn(0);function ud(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||ly(a)||uy(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){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}var er=0,ee=null,ke=null,dt=null,cd=!1,cs=!1,Vi=!1,fd=0,fu=0,fs=null,fV=0;function Qe(){throw Error(D(321))}function Oy(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Ia(e[a],t[a]))return!1;return!0}function By(e,t,a,n,r,i){return er=i,ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,W.H=e===null||e.memoizedState===null?JI:Wy,Vi=!1,i=a(n,r),Vi=!1,cs&&(i=LI(t,a,n,r)),wI(e),i}function wI(e){W.H=du;var t=ke!==null&&ke.next!==null;if(er=0,dt=ke=ee=null,cd=!1,fu=0,fs=null,t)throw Error(D(300));e===null||ht||(e=e.dependencies,e!==null&&od(e)&&(ht=!0))}function LI(e,t,a,n){ee=e;var r=0;do{if(cs&&(fs=null),fu=0,cs=!1,25<=r)throw Error(D(301));if(r+=1,dt=ke=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}W.H=e_,i=t(a,n)}while(cs);return i}function dV(){var e=W.H,t=e.useState()[0];return t=typeof t.then=="function"?Iu(t):t,e=e.useState()[0],(ke!==null?ke.memoizedState:null)!==e&&(ee.flags|=1024),t}function Fy(){var e=fd!==0;return fd=0,e}function Uy(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function zy(e){if(cd){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}cd=!1}er=0,dt=ke=ee=null,cs=!1,fu=fd=0,fs=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?ee.memoizedState=dt=e:dt=dt.next=e,dt}function rt(){if(ke===null){var e=ee.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=dt===null?ee.memoizedState:dt.next;if(t!==null)dt=t,ke=e;else{if(e===null)throw ee.alternate===null?Error(D(467)):Error(D(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},dt===null?ee.memoizedState=dt=e:dt=dt.next=e}return dt}function Pd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Iu(e){var t=fu;return fu+=1,fs===null&&(fs=[]),e=xI(fs,e,t),t=ee,(dt===null?t.memoizedState:dt.next)===null&&(t=t.alternate,W.H=t===null||t.memoizedState===null?JI:Wy),e}function Od(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Iu(e);if(e.$$typeof===Wn)return Bt(e)}throw Error(D(438,String(e)))}function Vy(e){var t=null,a=ee.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=ee.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Pd(),ee.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=Q5;return t.index++,a}function tr(e,t){return typeof t=="function"?t(e):t}function qf(e){var t=rt();return Ny(t,ke,e)}function Ny(e,t,a){var n=e.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=a;var r=e.baseQueue,i=n.pending;if(i!==null){if(r!==null){var o=r.next;r.next=i.next,i.next=o}t.baseQueue=r=i,n.pending=null}if(i=e.baseState,r===null)e.memoizedState=i;else{t=r.next;var s=o=null,l=null,u=t,c=!1;do{var f=u.lane&-536870913;if(f!==u.lane?(le&f)===f:(er&f)===f){var d=u.revertLane;if(d===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===hs&&(c=!0);else if((er&d)===d){u=u.next,d===hs&&(c=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=f,o=i):l=l.next=f,ee.lanes|=d,Zr|=d;f=u.action,Vi&&a(i,f),i=u.hasEagerState?u.eagerState:a(i,f)}else d={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=d,o=i):l=l.next=d,ee.lanes|=f,Zr|=f;u=u.next}while(u!==null&&u!==t);if(l===null?o=i:l.next=s,!Ia(i,e.memoizedState)&&(ht=!0,c&&(a=ls,a!==null)))throw a;e.memoizedState=i,e.baseState=o,e.baseQueue=l,n.lastRenderedState=i}return r===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function ex(e){var t=rt(),a=t.queue;if(a===null)throw Error(D(311));a.lastRenderedReducer=e;var n=a.dispatch,r=a.pending,i=t.memoizedState;if(r!==null){a.pending=null;var o=r=r.next;do i=e(i,o.action),o=o.next;while(o!==r);Ia(i,t.memoizedState)||(ht=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,n]}function II(e,t,a){var n=ee,r=rt(),i=fe;if(i){if(a===void 0)throw Error(D(407));a=a()}else a=t();var o=!Ia((ke||r).memoizedState,a);if(o&&(r.memoizedState=a,ht=!0),r=r.queue,Hy(TI.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||dt!==null&&dt.memoizedState.tag&1){if(n.flags|=2048,xs(9,{destroy:void 0},kI.bind(null,n,r,a,t),null),De===null)throw Error(D(349));i||(er&127)!==0||_I(n,t,a)}return a}function _I(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ee.updateQueue,t===null?(t=Pd(),ee.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function kI(e,t,a,n){t.value=a,t.getSnapshot=n,AI(t)&&EI(e)}function TI(e,t,a){return a(function(){AI(t)&&EI(e)})}function AI(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Ia(e,a)}catch{return!0}}function EI(e){var t=Gi(e,2);t!==null&&la(t,e,2)}function jx(e){var t=Qt();if(typeof e=="function"){var a=e;if(e=a(),Vi){Rr(!0);try{a()}finally{Rr(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tr,lastRenderedState:e},t}function DI(e,t,a,n){return e.baseState=a,Ny(e,ke,typeof n=="function"?n:tr)}function pV(e,t,a,n,r){if(Fd(e))throw Error(D(485));if(e=t.action,e!==null){var i={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};W.T!==null?a(!0):i.isTransition=!1,n(i),a=t.pending,a===null?(i.next=t.pending=i,MI(t,i)):(i.next=a.next,t.pending=a.next=i)}}function MI(e,t){var a=t.action,n=t.payload,r=e.state;if(t.isTransition){var i=W.T,o={};W.T=o;try{var s=a(r,n),l=W.S;l!==null&&l(o,s),DL(e,t,s)}catch(u){Gx(e,t,u)}finally{i!==null&&o.types!==null&&(i.types=o.types),W.T=i}}else try{i=a(r,n),DL(e,t,i)}catch(u){Gx(e,t,u)}}function DL(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){ML(e,t,n)},function(n){return Gx(e,t,n)}):ML(e,t,a)}function ML(e,t,a){t.status="fulfilled",t.value=a,RI(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,MI(e,a)))}function Gx(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,RI(t),t=t.next;while(t!==n)}e.action=null}function RI(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function PI(e,t){return t}function RL(e,t){if(fe){var a=De.formState;if(a!==null){e:{var n=ee;if(fe){if(Ue){t:{for(var r=Ue,i=Na;r.nodeType!==8;){if(!i){r=null;break t}if(r=qa(r.nextSibling),r===null){r=null;break t}}i=r.data,r=i==="F!"||i==="F"?r:null}if(r){Ue=qa(r.nextSibling),n=r.data==="F!";break e}}Kr(n)}n=!1}n&&(t=a[0])}}return a=Qt(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:PI,lastRenderedState:t},a.queue=n,a=ZI.bind(null,ee,n),n.dispatch=a,n=jx(!1),i=Xy.bind(null,ee,!1,n.queue),n=Qt(),r={state:t,dispatch:null,action:e,pending:null},n.queue=r,a=pV.bind(null,ee,r,i,a),r.dispatch=a,n.memoizedState=e,[t,a,!1]}function PL(e){var t=rt();return OI(t,ke,e)}function OI(e,t,a){if(t=Ny(e,t,PI)[0],e=qf(tr)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Iu(t)}catch(o){throw o===_s?Rd:o}else n=t;t=rt();var r=t.queue,i=r.dispatch;return a!==t.memoizedState&&(ee.flags|=2048,xs(9,{destroy:void 0},mV.bind(null,r,a),null)),[n,i,e]}function mV(e,t){e.action=t}function OL(e){var t=rt(),a=ke;if(a!==null)return OI(t,a,e);rt(),t=t.memoizedState,a=rt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function xs(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=ee.updateQueue,t===null&&(t=Pd(),ee.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function BI(){return rt().memoizedState}function jf(e,t,a,n){var r=Qt();ee.flags|=e,r.memoizedState=xs(1|t,{destroy:void 0},a,n===void 0?null:n)}function Bd(e,t,a,n){var r=rt();n=n===void 0?null:n;var i=r.memoizedState.inst;ke!==null&&n!==null&&Oy(n,ke.memoizedState.deps)?r.memoizedState=xs(t,i,a,n):(ee.flags|=e,r.memoizedState=xs(1|t,i,a,n))}function BL(e,t){jf(8390656,8,e,t)}function Hy(e,t){Bd(2048,8,e,t)}function hV(e){ee.flags|=4;var t=ee.updateQueue;if(t===null)t=Pd(),ee.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function FI(e){var t=rt().memoizedState;return hV({ref:t,nextImpl:e}),function(){if((me&2)!==0)throw Error(D(440));return t.impl.apply(void 0,arguments)}}function UI(e,t){return Bd(4,2,e,t)}function zI(e,t){return Bd(4,4,e,t)}function VI(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function NI(e,t,a){a=a!=null?a.concat([e]):null,Bd(4,4,VI.bind(null,t,e),a)}function qy(){}function HI(e,t){var a=rt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Oy(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function qI(e,t){var a=rt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Oy(t,n[1]))return n[0];if(n=e(),Vi){Rr(!0);try{e()}finally{Rr(!1)}}return a.memoizedState=[n,t],n}function jy(e,t,a){return a===void 0||(er&1073741824)!==0&&(le&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=D_(),ee.lanes|=e,Zr|=e,a)}function jI(e,t,a,n){return Ia(a,t)?a:gs.current!==null?(e=jy(e,a,n),Ia(e,t)||(ht=!0),e):(er&42)===0||(er&1073741824)!==0&&(le&261930)===0?(ht=!0,e.memoizedState=a):(e=D_(),ee.lanes|=e,Zr|=e,t)}function GI(e,t,a,n,r){var i=he.p;he.p=i!==0&&8>i?i:8;var o=W.T,s={};W.T=s,Xy(e,!1,t,a);try{var l=r(),u=W.S;if(u!==null&&u(s,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=cV(l,n);$l(e,t,c,La(e))}else $l(e,t,n,La(e))}catch(f){$l(e,t,{then:function(){},status:"rejected",reason:f},La())}finally{he.p=i,o!==null&&s.types!==null&&(o.types=s.types),W.T=o}}function gV(){}function Xx(e,t,a,n){if(e.tag!==5)throw Error(D(476));var r=XI(e).queue;GI(e,r,t,Mi,a===null?gV:function(){return WI(e),a(n)})}function XI(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Mi,baseState:Mi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tr,lastRenderedState:Mi},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tr,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function WI(e){var t=XI(e);t.next===null&&(t=e.alternate.memoizedState),$l(e,t.next.queue,{},La())}function Gy(){return Bt(hu)}function KI(){return rt().memoizedState}function YI(){return rt().memoizedState}function xV(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=La();e=Vr(a);var n=Nr(t,e,a);n!==null&&(la(n,t,a),Yl(n,t,a)),t={cache:Ey()},e.payload=t;return}t=t.return}}function yV(e,t,a){var n=La();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Fd(e)?QI(t,a):(a=_y(e,t,a,n),a!==null&&(la(a,e,n),$I(a,t,n)))}function ZI(e,t,a){var n=La();$l(e,t,a,n)}function $l(e,t,a,n){var r={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Fd(e))QI(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,a);if(r.hasEagerState=!0,r.eagerState=s,Ia(s,o))return Md(e,t,r,0),De===null&&Dd(),!1}catch{}if(a=_y(e,t,r,n),a!==null)return la(a,e,n),$I(a,t,n),!0}return!1}function Xy(e,t,a,n){if(n={lane:2,revertLane:tv(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fd(e)){if(t)throw Error(D(479))}else t=_y(e,a,n,2),t!==null&&la(t,e,2)}function Fd(e){var t=e.alternate;return e===ee||t!==null&&t===ee}function QI(e,t){cs=cd=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function $I(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,F1(e,a)}}var du={readContext:Bt,use:Od,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useLayoutEffect:Qe,useInsertionEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useSyncExternalStore:Qe,useId:Qe,useHostTransitionStatus:Qe,useFormState:Qe,useActionState:Qe,useOptimistic:Qe,useMemoCache:Qe,useCacheRefresh:Qe};du.useEffectEvent=Qe;var JI={readContext:Bt,use:Od,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:Bt,useEffect:BL,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,jf(4194308,4,VI.bind(null,t,e),a)},useLayoutEffect:function(e,t){return jf(4194308,4,e,t)},useInsertionEffect:function(e,t){jf(4,2,e,t)},useMemo:function(e,t){var a=Qt();t=t===void 0?null:t;var n=e();if(Vi){Rr(!0);try{e()}finally{Rr(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=Qt();if(a!==void 0){var r=a(t);if(Vi){Rr(!0);try{a(t)}finally{Rr(!1)}}}else r=t;return n.memoizedState=n.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},n.queue=e,e=e.dispatch=yV.bind(null,ee,e),[n.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=jx(e);var t=e.queue,a=ZI.bind(null,ee,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:qy,useDeferredValue:function(e,t){var a=Qt();return jy(a,e,t)},useTransition:function(){var e=jx(!1);return e=GI.bind(null,ee,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=ee,r=Qt();if(fe){if(a===void 0)throw Error(D(407));a=a()}else{if(a=t(),De===null)throw Error(D(349));(le&127)!==0||_I(n,t,a)}r.memoizedState=a;var i={value:a,getSnapshot:t};return r.queue=i,BL(TI.bind(null,n,i,e),[e]),n.flags|=2048,xs(9,{destroy:void 0},kI.bind(null,n,i,a,t),null),a},useId:function(){var e=Qt(),t=De.identifierPrefix;if(fe){var a=mn,n=pn;a=(n&~(1<<32-wa(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=fd++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=fV++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Gy,useFormState:RL,useActionState:RL,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Xy.bind(null,ee,!0,a),a.dispatch=t,[e,t]},useMemoCache:Vy,useCacheRefresh:function(){return Qt().memoizedState=xV.bind(null,ee)},useEffectEvent:function(e){var t=Qt(),a={impl:e};return t.memoizedState=a,function(){if((me&2)!==0)throw Error(D(440));return a.impl.apply(void 0,arguments)}}},Wy={readContext:Bt,use:Od,useCallback:HI,useContext:Bt,useEffect:Hy,useImperativeHandle:NI,useInsertionEffect:UI,useLayoutEffect:zI,useMemo:qI,useReducer:qf,useRef:BI,useState:function(){return qf(tr)},useDebugValue:qy,useDeferredValue:function(e,t){var a=rt();return jI(a,ke.memoizedState,e,t)},useTransition:function(){var e=qf(tr)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Iu(e),t]},useSyncExternalStore:II,useId:KI,useHostTransitionStatus:Gy,useFormState:PL,useActionState:PL,useOptimistic:function(e,t){var a=rt();return DI(a,ke,e,t)},useMemoCache:Vy,useCacheRefresh:YI};Wy.useEffectEvent=FI;var e_={readContext:Bt,use:Od,useCallback:HI,useContext:Bt,useEffect:Hy,useImperativeHandle:NI,useInsertionEffect:UI,useLayoutEffect:zI,useMemo:qI,useReducer:ex,useRef:BI,useState:function(){return ex(tr)},useDebugValue:qy,useDeferredValue:function(e,t){var a=rt();return ke===null?jy(a,e,t):jI(a,ke.memoizedState,e,t)},useTransition:function(){var e=ex(tr)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Iu(e),t]},useSyncExternalStore:II,useId:KI,useHostTransitionStatus:Gy,useFormState:OL,useActionState:OL,useOptimistic:function(e,t){var a=rt();return ke!==null?DI(a,ke,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Vy,useCacheRefresh:YI};e_.useEffectEvent=FI;function tx(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:ze({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Wx={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=La(),r=Vr(n);r.payload=t,a!=null&&(r.callback=a),t=Nr(e,r,n),t!==null&&(la(t,e,n),Yl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=La(),r=Vr(n);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=Nr(e,r,n),t!==null&&(la(t,e,n),Yl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=La(),n=Vr(a);n.tag=2,t!=null&&(n.callback=t),t=Nr(e,n,a),t!==null&&(la(t,e,a),Yl(t,e,a))}};function FL(e,t,a,n,r,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!su(a,n)||!su(r,i):!0}function UL(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&Wx.enqueueReplaceState(t,t.state,null)}function Ni(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=ze({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function t_(e){nd(e)}function a_(e){console.error(e)}function n_(e){nd(e)}function dd(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function zL(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Kx(e,t,a){return a=Vr(a),a.tag=3,a.payload={element:null},a.callback=function(){dd(e,t)},a}function r_(e){return e=Vr(e),e.tag=3,e}function i_(e,t,a,n){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var i=n.value;e.payload=function(){return r(i)},e.callback=function(){zL(t,a,n)}}var o=a.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){zL(t,a,n),typeof r!="function"&&(Hr===null?Hr=new Set([this]):Hr.add(this));var s=n.stack;this.componentDidCatch(n.value,{componentStack:s!==null?s:""})})}function vV(e,t,a,n,r){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Is(t,a,r,!0),a=_a.current,a!==null){switch(a.tag){case 31:case 13:return Ha===null?xd():a.alternate===null&&$e===0&&($e=3),a.flags&=-257,a.flags|=65536,a.lanes=r,n===sd?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),dx(e,n,r)),!1;case 22:return a.flags|=65536,n===sd?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),dx(e,n,r)),!1}throw Error(D(435,a.tag))}return dx(e,n,r),xd(),!1}if(fe)return t=_a.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,n!==Ox&&(e=Error(D(422),{cause:n}),uu(Va(e,a)))):(n!==Ox&&(t=Error(D(423),{cause:n}),uu(Va(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,n=Va(n,a),r=Kx(e.stateNode,n,r),Jg(e,r),$e!==4&&($e=2)),!1;var i=Error(D(520),{cause:n});if(i=Va(i,a),tu===null?tu=[i]:tu.push(i),$e!==4&&($e=2),t===null)return!0;n=Va(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=Kx(a.stateNode,n,e),Jg(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Hr===null||!Hr.has(i))))return a.flags|=65536,r&=-r,a.lanes|=r,r=r_(r),i_(r,e,a,n),Jg(a,r),!1}a=a.return}while(a!==null);return!1}var Ky=Error(D(461)),ht=!1;function Rt(e,t,a,n){t.child=e===null?vI(t,null,a,n):zi(t,e.child,a,n)}function VL(e,t,a,n,r){a=a.render;var i=t.ref;if("ref"in n){var o={};for(var s in n)s!=="ref"&&(o[s]=n[s])}else o=n;return Ui(t),n=By(e,t,a,o,i,r),s=Fy(),e!==null&&!ht?(Uy(e,t,r),ar(e,t,r)):(fe&&s&&Ty(t),t.flags|=1,Rt(e,t,n,r),t.child)}function NL(e,t,a,n,r){if(e===null){var i=a.type;return typeof i=="function"&&!ky(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,o_(e,t,i,n,r)):(e=Nf(a.type,null,n,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Yy(e,r)){var o=i.memoizedProps;if(a=a.compare,a=a!==null?a:su,a(o,n)&&e.ref===t.ref)return ar(e,t,r)}return t.flags|=1,e=Zn(i,n),e.ref=t.ref,e.return=t,t.child=e}function o_(e,t,a,n,r){if(e!==null){var i=e.memoizedProps;if(su(i,n)&&e.ref===t.ref)if(ht=!1,t.pendingProps=n=i,Yy(e,r))(e.flags&131072)!==0&&(ht=!0);else return t.lanes=e.lanes,ar(e,t,r)}return Yx(e,t,a,n,r)}function s_(e,t,a,n){var r=n.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,e!==null){for(n=t.child=e.child,r=0;n!==null;)r=r|n.lanes|n.childLanes,n=n.sibling;n=r&~i}else n=0,t.child=null;return HL(e,t,i,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hf(t,i!==null?i.cachePool:null),i!==null?EL(t,i):Hx(),CI(t);else return n=t.lanes=536870912,HL(e,t,i!==null?i.baseLanes|a:a,a,n)}else i!==null?(Hf(t,i.cachePool),EL(t,i),Dr(t),t.memoizedState=null):(e!==null&&Hf(t,null),Hx(),Dr(t));return Rt(e,t,r,a),t.child}function ql(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function HL(e,t,a,n,r){var i=Dy();return i=i===null?null:{parent:mt._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&Hf(t,null),Hx(),CI(t),e!==null&&Is(e,t,n,!0),t.childLanes=r,null}function Gf(e,t){return t=pd({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qL(e,t,a){return zi(t,e.child,null,a),e=Gf(t,t.pendingProps),e.flags|=2,ya(t),t.memoizedState=null,e}function SV(e,t,a){var n=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(fe){if(n.mode==="hidden")return e=Gf(t,n),t.lanes=536870912,ql(null,e);if(qx(t),(e=Ue)?(e=J_(e,Na),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wr!==null?{id:pn,overflow:mn}:null,retryLane:536870912,hydrationErrors:null},a=dI(e),a.return=t,t.child=a,Ot=t,Ue=null)):e=null,e===null)throw Kr(t);return t.lanes=536870912,null}return Gf(t,n)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(qx(t),r)if(t.flags&256)t.flags&=-257,t=qL(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(D(558));else if(ht||Is(e,t,a,!1),r=(a&e.childLanes)!==0,ht||r){if(n=De,n!==null&&(o=U1(n,a),o!==0&&o!==i.retryLane))throw i.retryLane=o,Gi(e,o),la(n,e,o),Ky;xd(),t=qL(e,t,a)}else e=i.treeContext,Ue=qa(o.nextSibling),Ot=t,fe=!0,zr=null,Na=!1,e!==null&&mI(t,e),t=Gf(t,n),t.flags|=4096;return t}return e=Zn(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Xf(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(D(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Yx(e,t,a,n,r){return Ui(t),a=By(e,t,a,n,void 0,r),n=Fy(),e!==null&&!ht?(Uy(e,t,r),ar(e,t,r)):(fe&&n&&Ty(t),t.flags|=1,Rt(e,t,a,r),t.child)}function jL(e,t,a,n,r,i){return Ui(t),t.updateQueue=null,a=LI(t,n,a,r),wI(e),n=Fy(),e!==null&&!ht?(Uy(e,t,i),ar(e,t,i)):(fe&&n&&Ty(t),t.flags|=1,Rt(e,t,a,i),t.child)}function GL(e,t,a,n,r){if(Ui(t),t.stateNode===null){var i=ts,o=a.contextType;typeof o=="object"&&o!==null&&(i=Bt(o)),i=new a(n,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Wx,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=n,i.state=t.memoizedState,i.refs={},Ry(t),o=a.contextType,i.context=typeof o=="object"&&o!==null?Bt(o):ts,i.state=t.memoizedState,o=a.getDerivedStateFromProps,typeof o=="function"&&(tx(t,a,o,n),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&Wx.enqueueReplaceState(i,i.state,null),Ql(t,n,i,r),Zl(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){i=t.stateNode;var s=t.memoizedProps,l=Ni(a,s);i.props=l;var u=i.context,c=a.contextType;o=ts,typeof c=="object"&&c!==null&&(o=Bt(c));var f=a.getDerivedStateFromProps;c=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,c||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s||u!==o)&&UL(t,i,n,o),Tr=!1;var d=t.memoizedState;i.state=d,Ql(t,n,i,r),Zl(),u=t.memoizedState,s||d!==u||Tr?(typeof f=="function"&&(tx(t,a,f,n),u=t.memoizedState),(l=Tr||FL(t,a,l,n,d,u,o))?(c||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),i.props=n,i.state=u,i.context=o,n=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,Vx(e,t),o=t.memoizedProps,c=Ni(a,o),i.props=c,f=t.pendingProps,d=i.context,u=a.contextType,l=ts,typeof u=="object"&&u!==null&&(l=Bt(u)),s=a.getDerivedStateFromProps,(u=typeof s=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==f||d!==l)&&UL(t,i,n,l),Tr=!1,d=t.memoizedState,i.state=d,Ql(t,n,i,r),Zl();var p=t.memoizedState;o!==f||d!==p||Tr||e!==null&&e.dependencies!==null&&od(e.dependencies)?(typeof s=="function"&&(tx(t,a,s,n),p=t.memoizedState),(c=Tr||FL(t,a,c,n,d,p,l)||e!==null&&e.dependencies!==null&&od(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,p,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,p,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),i.props=n,i.state=p,i.context=l,n=c):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return i=n,Xf(e,t),n=(t.flags&128)!==0,i||n?(i=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&n?(t.child=zi(t,e.child,null,r),t.child=zi(t,null,a,r)):Rt(e,t,a,r),t.memoizedState=i.state,e=t.child):e=ar(e,t,r),e}function XL(e,t,a,n){return Fi(),t.flags|=256,Rt(e,t,a,n),t.child}var ax={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function nx(e){return{baseLanes:e,cachePool:gI()}}function rx(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Sa),e}function l_(e,t,a){var n=t.pendingProps,r=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),o&&(r=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(fe){if(r?Er(t):Dr(t),(e=Ue)?(e=J_(e,Na),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wr!==null?{id:pn,overflow:mn}:null,retryLane:536870912,hydrationErrors:null},a=dI(e),a.return=t,t.child=a,Ot=t,Ue=null)):e=null,e===null)throw Kr(t);return uy(e)?t.lanes=32:t.lanes=536870912,null}var s=n.children;return n=n.fallback,r?(Dr(t),r=t.mode,s=pd({mode:"hidden",children:s},r),n=Ri(n,r,a,null),s.return=t,n.return=t,s.sibling=n,t.child=s,n=t.child,n.memoizedState=nx(a),n.childLanes=rx(e,o,a),t.memoizedState=ax,ql(null,n)):(Er(t),Zx(t,s))}var l=e.memoizedState;if(l!==null&&(s=l.dehydrated,s!==null)){if(i)t.flags&256?(Er(t),t.flags&=-257,t=ix(e,t,a)):t.memoizedState!==null?(Dr(t),t.child=e.child,t.flags|=128,t=null):(Dr(t),s=n.fallback,r=t.mode,n=pd({mode:"visible",children:n.children},r),s=Ri(s,r,a,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,zi(t,e.child,null,a),n=t.child,n.memoizedState=nx(a),n.childLanes=rx(e,o,a),t.memoizedState=ax,t=ql(null,n));else if(Er(t),uy(s)){if(o=s.nextSibling&&s.nextSibling.dataset,o)var u=o.dgst;o=u,n=Error(D(419)),n.stack="",n.digest=o,uu({value:n,source:null,stack:null}),t=ix(e,t,a)}else if(ht||Is(e,t,a,!1),o=(a&e.childLanes)!==0,ht||o){if(o=De,o!==null&&(n=U1(o,a),n!==0&&n!==l.retryLane))throw l.retryLane=n,Gi(e,n),la(o,e,n),Ky;ly(s)||xd(),t=ix(e,t,a)}else ly(s)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ue=qa(s.nextSibling),Ot=t,fe=!0,zr=null,Na=!1,e!==null&&mI(t,e),t=Zx(t,n.children),t.flags|=4096);return t}return r?(Dr(t),s=n.fallback,r=t.mode,l=e.child,u=l.sibling,n=Zn(l,{mode:"hidden",children:n.children}),n.subtreeFlags=l.subtreeFlags&65011712,u!==null?s=Zn(u,s):(s=Ri(s,r,a,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,ql(null,n),n=t.child,s=e.child.memoizedState,s===null?s=nx(a):(r=s.cachePool,r!==null?(l=mt._currentValue,r=r.parent!==l?{parent:l,pool:l}:r):r=gI(),s={baseLanes:s.baseLanes|a,cachePool:r}),n.memoizedState=s,n.childLanes=rx(e,o,a),t.memoizedState=ax,ql(e.child,n)):(Er(t),a=e.child,e=a.sibling,a=Zn(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=a,t.memoizedState=null,a)}function Zx(e,t){return t=pd({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function pd(e,t){return e=va(22,e,null,t),e.lanes=0,e}function ix(e,t,a){return zi(t,e.child,null,a),e=Zx(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WL(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Fx(e.return,t,a)}function ox(e,t,a,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:r,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=a,o.tailMode=r,o.treeForkCount=i)}function u_(e,t,a){var n=t.pendingProps,r=n.revealOrder,i=n.tail;n=n.children;var o=nt.current,s=(o&2)!==0;if(s?(o=o&1|2,t.flags|=128):o&=1,Re(nt,o),Rt(e,t,n,a),n=fe?lu:0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&WL(e,a,t);else if(e.tag===19)WL(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}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&ud(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),ox(t,!1,r,a,i,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&ud(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}ox(t,!0,a,null,i,n);break;case"together":ox(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function ar(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Zr|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Is(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,a=Zn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Zn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Yy(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&od(e)))}function bV(e,t,a){switch(t.tag){case 3:Jf(t,t.stateNode.containerInfo),Ar(t,mt,e.memoizedState.cache),Fi();break;case 27:case 5:Lx(t);break;case 4:Jf(t,t.stateNode.containerInfo);break;case 10:Ar(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,qx(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Er(t),t.flags|=128,null):(a&t.child.childLanes)!==0?l_(e,t,a):(Er(t),e=ar(e,t,a),e!==null?e.sibling:null);Er(t);break;case 19:var r=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Is(e,t,a,!1),n=(a&t.childLanes)!==0),r){if(n)return u_(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Re(nt,nt.current),n)break;return null;case 22:return t.lanes=0,s_(e,t,a,t.pendingProps);case 24:Ar(t,mt,e.memoizedState.cache)}return ar(e,t,a)}function c_(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ht=!0;else{if(!Yy(e,a)&&(t.flags&128)===0)return ht=!1,bV(e,t,a);ht=(e.flags&131072)!==0}else ht=!1,fe&&(t.flags&1048576)!==0&&pI(t,lu,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Ei(t.elementType),t.type=e,typeof e=="function")ky(e)?(n=Ni(e,n),t.tag=1,t=GL(null,t,e,n,a)):(t.tag=0,t=Yx(null,t,e,n,a));else{if(e!=null){var r=e.$$typeof;if(r===py){t.tag=11,t=VL(null,t,e,n,a);break e}else if(r===my){t.tag=14,t=NL(null,t,e,n,a);break e}}throw t=Cx(e)||e,Error(D(306,t,""))}}return t;case 0:return Yx(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,r=Ni(n,t.pendingProps),GL(e,t,n,r,a);case 3:e:{if(Jf(t,t.stateNode.containerInfo),e===null)throw Error(D(387));n=t.pendingProps;var i=t.memoizedState;r=i.element,Vx(e,t),Ql(t,n,null,a);var o=t.memoizedState;if(n=o.cache,Ar(t,mt,n),n!==i.cache&&Ux(t,[mt],a,!0),Zl(),n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=XL(e,t,n,a);break e}else if(n!==r){r=Va(Error(D(424)),t),uu(r),t=XL(e,t,n,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ue=qa(e.firstChild),Ot=t,fe=!0,zr=null,Na=!0,a=vI(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Fi(),n===r){t=ar(e,t,a);break e}Rt(e,t,n,a)}t=t.child}return t;case 26:return Xf(e,t),e===null?(a=h1(t.type,null,t.pendingProps,null))?t.memoizedState=a:fe||(a=t.type,e=t.pendingProps,n=bd(Ur.current).createElement(a),n[Pt]=t,n[ua]=e,Ft(n,a,e),kt(n),t.stateNode=n):t.memoizedState=h1(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Lx(t),e===null&&fe&&(n=t.stateNode=ek(t.type,t.pendingProps,Ur.current),Ot=t,Na=!0,r=Ue,$r(t.type)?(cy=r,Ue=qa(n.firstChild)):Ue=r),Rt(e,t,t.pendingProps.children,a),Xf(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&fe&&((r=n=Ue)&&(n=YV(n,t.type,t.pendingProps,Na),n!==null?(t.stateNode=n,Ot=t,Ue=qa(n.firstChild),Na=!1,r=!0):r=!1),r||Kr(t)),Lx(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,n=i.children,oy(r,i)?n=null:o!==null&&oy(r,o)&&(t.flags|=32),t.memoizedState!==null&&(r=By(e,t,dV,null,null,a),hu._currentValue=r),Xf(e,t),Rt(e,t,n,a),t.child;case 6:return e===null&&fe&&((e=a=Ue)&&(a=ZV(a,t.pendingProps,Na),a!==null?(t.stateNode=a,Ot=t,Ue=null,e=!0):e=!1),e||Kr(t)),null;case 13:return l_(e,t,a);case 4:return Jf(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=zi(t,null,n,a):Rt(e,t,n,a),t.child;case 11:return VL(e,t,t.type,t.pendingProps,a);case 7:return Rt(e,t,t.pendingProps,a),t.child;case 8:return Rt(e,t,t.pendingProps.children,a),t.child;case 12:return Rt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,Ar(t,t.type,n.value),Rt(e,t,n.children,a),t.child;case 9:return r=t.type._context,n=t.pendingProps.children,Ui(t),r=Bt(r),n=n(r),t.flags|=1,Rt(e,t,n,a),t.child;case 14:return NL(e,t,t.type,t.pendingProps,a);case 15:return o_(e,t,t.type,t.pendingProps,a);case 19:return u_(e,t,a);case 31:return SV(e,t,a);case 22:return s_(e,t,a,t.pendingProps);case 24:return Ui(t),n=Bt(mt),e===null?(r=Dy(),r===null&&(r=De,i=Ey(),r.pooledCache=i,i.refCount++,i!==null&&(r.pooledCacheLanes|=a),r=i),t.memoizedState={parent:n,cache:r},Ry(t),Ar(t,mt,r)):((e.lanes&a)!==0&&(Vx(e,t),Ql(t,null,null,a),Zl()),r=e.memoizedState,i=t.memoizedState,r.parent!==n?(r={parent:n,cache:n},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Ar(t,mt,n)):(n=i.cache,Ar(t,mt,n),n!==r.cache&&Ux(t,[mt],a,!0))),Rt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(D(156,t.tag))}function Nn(e){e.flags|=4}function sx(e,t,a,n,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(P_())e.flags|=8192;else throw Oi=sd,My}else e.flags&=-16777217}function KL(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!nk(t))if(P_())e.flags|=8192;else throw Oi=sd,My}function Ef(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?O1():536870912,e.lanes|=t,ys|=t)}function Bl(e,t){if(!fe)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 n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,n|=r.subtreeFlags&65011712,n|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,n|=r.subtreeFlags,n|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function CV(e,t,a){var n=t.pendingProps;switch(Ay(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return Fe(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qn(mt),ds(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(qo(t)?Nn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$g())),Fe(t),null;case 26:var r=t.type,i=t.memoizedState;return e===null?(Nn(t),i!==null?(Fe(t),KL(t,i)):(Fe(t),sx(t,r,null,n,a))):i?i!==e.memoizedState?(Nn(t),Fe(t),KL(t,i)):(Fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Nn(t),Fe(t),sx(t,r,e,n,a)),null;case 27:if(ed(t),a=Ur.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Nn(t);else{if(!n){if(t.stateNode===null)throw Error(D(166));return Fe(t),null}e=gn.current,qo(t)?wL(t,e):(e=ek(r,n,a),t.stateNode=e,Nn(t))}return Fe(t),null;case 5:if(ed(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Nn(t);else{if(!n){if(t.stateNode===null)throw Error(D(166));return Fe(t),null}if(i=gn.current,qo(t))wL(t,i);else{var o=bd(Ur.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?o.createElement("select",{is:n.is}):o.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?o.createElement(r,{is:n.is}):o.createElement(r)}}i[Pt]=t,i[ua]=n;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(Ft(i,r,n),r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Nn(t)}}return Fe(t),sx(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Nn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(D(166));if(e=Ur.current,qo(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,r=Ot,r!==null)switch(r.tag){case 27:case 5:n=r.memoizedProps}e[Pt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||Z_(e.nodeValue,a)),e||Kr(t,!0)}else e=bd(e).createTextNode(n),e[Pt]=t,t.stateNode=e}return Fe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=qo(t),a!==null){if(e===null){if(!n)throw Error(D(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(557));e[Pt]=t}else Fi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),e=!1}else a=$g(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ya(t),t):(ya(t),null);if((t.flags&128)!==0)throw Error(D(558))}return Fe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=qo(t),n!==null&&n.dehydrated!==null){if(e===null){if(!r)throw Error(D(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(D(317));r[Pt]=t}else Fi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),r=!1}else r=$g(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(ya(t),t):(ya(t),null)}return ya(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,r=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(r=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==r&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Ef(t,t.updateQueue),Fe(t),null);case 4:return ds(),e===null&&av(t.stateNode.containerInfo),Fe(t),null;case 10:return Qn(t.type),Fe(t),null;case 19:if(Tt(nt),n=t.memoizedState,n===null)return Fe(t),null;if(r=(t.flags&128)!==0,i=n.rendering,i===null)if(r)Bl(n,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=ud(e),i!==null){for(t.flags|=128,Bl(n,!1),e=i.updateQueue,t.updateQueue=e,Ef(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)fI(a,e),a=a.sibling;return Re(nt,nt.current&1|2),fe&&Gn(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&ba()>hd&&(t.flags|=128,r=!0,Bl(n,!1),t.lanes=4194304)}else{if(!r)if(e=ud(i),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Ef(t,e),Bl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!fe)return Fe(t),null}else 2*ba()-n.renderingStartTime>hd&&a!==536870912&&(t.flags|=128,r=!0,Bl(n,!1),t.lanes=4194304);n.isBackwards?(i.sibling=t.child,t.child=i):(e=n.last,e!==null?e.sibling=i:t.child=i,n.last=i)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=ba(),e.sibling=null,a=nt.current,Re(nt,r?a&1|2:a&1),fe&&Gn(t,n.treeForkCount),e):(Fe(t),null);case 22:case 23:return ya(t),Py(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),a=t.updateQueue,a!==null&&Ef(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Tt(Pi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Qn(mt),Fe(t),null;case 25:return null;case 30:return null}throw Error(D(156,t.tag))}function wV(e,t){switch(Ay(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(mt),ds(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ed(t),null;case 31:if(t.memoizedState!==null){if(ya(t),t.alternate===null)throw Error(D(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ya(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Tt(nt),null;case 4:return ds(),null;case 10:return Qn(t.type),null;case 22:case 23:return ya(t),Py(),e!==null&&Tt(Pi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qn(mt),null;case 25:return null;default:return null}}function f_(e,t){switch(Ay(t),t.tag){case 3:Qn(mt),ds();break;case 26:case 27:case 5:ed(t);break;case 4:ds();break;case 31:t.memoizedState!==null&&ya(t);break;case 13:ya(t);break;case 19:Tt(nt);break;case 10:Qn(t.type);break;case 22:case 23:ya(t),Py(),e!==null&&Tt(Pi);break;case 24:Qn(mt)}}function _u(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var r=n.next;a=r;do{if((a.tag&e)===e){n=void 0;var i=a.create,o=a.inst;n=i(),o.destroy=n}a=a.next}while(a!==r)}}catch(s){be(t,t.return,s)}}function Yr(e,t,a){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){var o=n.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,r=t;var l=a,u=s;try{u()}catch(c){be(r,l,c)}}}n=n.next}while(n!==i)}}catch(c){be(t,t.return,c)}}function d_(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{bI(t,a)}catch(n){be(e,e.return,n)}}}function p_(e,t,a){a.props=Ni(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){be(e,t,n)}}function Jl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(r){be(e,t,r)}}function hn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(r){be(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){be(e,t,r)}else a.current=null}function m_(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(r){be(e,e.return,r)}}function lx(e,t,a){try{var n=e.stateNode;qV(n,e.type,a,t),n[ua]=t}catch(r){be(e,e.return,r)}}function h_(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$r(e.type)||e.tag===4}function ux(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||h_(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&&$r(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 Qx(e,t,a){var n=e.tag;if(n===5||n===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=Kn));else if(n!==4&&(n===27&&$r(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Qx(e,t,a),e=e.sibling;e!==null;)Qx(e,t,a),e=e.sibling}function md(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&$r(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(md(e,t,a),e=e.sibling;e!==null;)md(e,t,a),e=e.sibling}function g_(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Ft(t,n,a),t[Pt]=e,t[ua]=a}catch(i){be(e,e.return,i)}}var Xn=!1,pt=!1,cx=!1,YL=typeof WeakSet=="function"?WeakSet:Set,_t=null;function LV(e,t){if(e=e.containerInfo,ry=Id,e=nI(e),Ly(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==a||r!==0&&f.nodeType!==3||(s=o+r),f!==i||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===a&&++u===r&&(s=o),d===i&&++c===n&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}a=s===-1||l===-1?null:{start:s,end:l}}else a=null}a=a||{start:0,end:0}}else a=null;for(iy={focusedElem:e,selectionRange:a},Id=!1,_t=t;_t!==null;)if(t=_t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_t=e;else for(;_t!==null;){switch(t=_t,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,a=t,r=i.memoizedProps,i=i.memoizedState,n=a.stateNode;try{var h=Ni(a.type,r);e=n.getSnapshotBeforeUpdate(h,i),n.__reactInternalSnapshotBeforeUpdate=e}catch(v){be(a,a.return,v)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)sy(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":sy(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(D(163))}if(e=t.sibling,e!==null){e.return=t.return,_t=e;break}_t=t.return}}function x_(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:qn(e,a),n&4&&_u(5,a);break;case 1:if(qn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(o){be(a,a.return,o)}else{var r=Ni(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){be(a,a.return,o)}}n&64&&d_(a),n&512&&Jl(a,a.return);break;case 3:if(qn(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{bI(e,t)}catch(o){be(a,a.return,o)}}break;case 27:t===null&&n&4&&g_(a);case 26:case 5:qn(e,a),t===null&&n&4&&m_(a),n&512&&Jl(a,a.return);break;case 12:qn(e,a);break;case 31:qn(e,a),n&4&&S_(e,a);break;case 13:qn(e,a),n&4&&b_(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=RV.bind(null,a),QV(e,a))));break;case 22:if(n=a.memoizedState!==null||Xn,!n){t=t!==null&&t.memoizedState!==null||pt,r=Xn;var i=pt;Xn=n,(pt=t)&&!i?jn(e,a,(a.subtreeFlags&8772)!==0):qn(e,a),Xn=r,pt=i}break;case 30:break;default:qn(e,a)}}function y_(e){var t=e.alternate;t!==null&&(e.alternate=null,y_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&yy(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var He=null,oa=!1;function Hn(e,t,a){for(a=a.child;a!==null;)v_(e,t,a),a=a.sibling}function v_(e,t,a){if(Ca&&typeof Ca.onCommitFiberUnmount=="function")try{Ca.onCommitFiberUnmount(vu,a)}catch{}switch(a.tag){case 26:pt||hn(a,t),Hn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:pt||hn(a,t);var n=He,r=oa;$r(a.type)&&(He=a.stateNode,oa=!1),Hn(e,t,a),nu(a.stateNode),He=n,oa=r;break;case 5:pt||hn(a,t);case 6:if(n=He,r=oa,He=null,Hn(e,t,a),He=n,oa=r,He!==null)if(oa)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(a.stateNode)}catch(i){be(a,t,i)}else try{He.removeChild(a.stateNode)}catch(i){be(a,t,i)}break;case 18:He!==null&&(oa?(e=He,c1(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Cs(e)):c1(He,a.stateNode));break;case 4:n=He,r=oa,He=a.stateNode.containerInfo,oa=!0,Hn(e,t,a),He=n,oa=r;break;case 0:case 11:case 14:case 15:Yr(2,a,t),pt||Yr(4,a,t),Hn(e,t,a);break;case 1:pt||(hn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&p_(a,t,n)),Hn(e,t,a);break;case 21:Hn(e,t,a);break;case 22:pt=(n=pt)||a.memoizedState!==null,Hn(e,t,a),pt=n;break;default:Hn(e,t,a)}}function S_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Cs(e)}catch(a){be(t,t.return,a)}}}function b_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Cs(e)}catch(a){be(t,t.return,a)}}function IV(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new YL),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new YL),t;default:throw Error(D(435,e.tag))}}function Df(e,t){var a=IV(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var r=PV.bind(null,e,n);n.then(r,r)}})}function ra(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var r=a[n],i=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 27:if($r(s.type)){He=s.stateNode,oa=!1;break e}break;case 5:He=s.stateNode,oa=!1;break e;case 3:case 4:He=s.stateNode.containerInfo,oa=!0;break e}s=s.return}if(He===null)throw Error(D(160));v_(i,o,r),He=null,oa=!1,i=r.alternate,i!==null&&(i.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)C_(t,e),t=t.sibling}var nn=null;function C_(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ra(t,e),ia(e),n&4&&(Yr(3,e,e.return),_u(3,e),Yr(5,e,e.return));break;case 1:ra(t,e),ia(e),n&512&&(pt||a===null||hn(a,a.return)),n&64&&Xn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var r=nn;if(ra(t,e),ia(e),n&512&&(pt||a===null||hn(a,a.return)),n&4){var i=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(n){case"title":i=r.getElementsByTagName("title")[0],(!i||i[Cu]||i[Pt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=r.createElement(n),r.head.insertBefore(i,r.querySelector("head > title"))),Ft(i,n,a),i[Pt]=e,kt(i),n=i;break e;case"link":var o=x1("link","href",r).get(n+(a.href||""));if(o){for(var s=0;s<o.length;s++)if(i=o[s],i.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&i.getAttribute("rel")===(a.rel==null?null:a.rel)&&i.getAttribute("title")===(a.title==null?null:a.title)&&i.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){o.splice(s,1);break t}}i=r.createElement(n),Ft(i,n,a),r.head.appendChild(i);break;case"meta":if(o=x1("meta","content",r).get(n+(a.content||""))){for(s=0;s<o.length;s++)if(i=o[s],i.getAttribute("content")===(a.content==null?null:""+a.content)&&i.getAttribute("name")===(a.name==null?null:a.name)&&i.getAttribute("property")===(a.property==null?null:a.property)&&i.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&i.getAttribute("charset")===(a.charSet==null?null:a.charSet)){o.splice(s,1);break t}}i=r.createElement(n),Ft(i,n,a),r.head.appendChild(i);break;default:throw Error(D(468,n))}i[Pt]=e,kt(i),n=i}e.stateNode=n}else y1(r,e.type,e.stateNode);else e.stateNode=g1(r,n,e.memoizedProps);else i!==n?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,n===null?y1(r,e.type,e.stateNode):g1(r,n,e.memoizedProps)):n===null&&e.stateNode!==null&&lx(e,e.memoizedProps,a.memoizedProps)}break;case 27:ra(t,e),ia(e),n&512&&(pt||a===null||hn(a,a.return)),a!==null&&n&4&&lx(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ra(t,e),ia(e),n&512&&(pt||a===null||hn(a,a.return)),e.flags&32){r=e.stateNode;try{ms(r,"")}catch(h){be(e,e.return,h)}}n&4&&e.stateNode!=null&&(r=e.memoizedProps,lx(e,r,a!==null?a.memoizedProps:r)),n&1024&&(cx=!0);break;case 6:if(ra(t,e),ia(e),n&4){if(e.stateNode===null)throw Error(D(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(h){be(e,e.return,h)}}break;case 3:if(Yf=null,r=nn,nn=Cd(t.containerInfo),ra(t,e),nn=r,ia(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Cs(t.containerInfo)}catch(h){be(e,e.return,h)}cx&&(cx=!1,w_(e));break;case 4:n=nn,nn=Cd(e.stateNode.containerInfo),ra(t,e),ia(e),nn=n;break;case 12:ra(t,e),ia(e);break;case 31:ra(t,e),ia(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Df(e,n)));break;case 13:ra(t,e),ia(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ud=ba()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Df(e,n)));break;case 22:r=e.memoizedState!==null;var l=a!==null&&a.memoizedState!==null,u=Xn,c=pt;if(Xn=u||r,pt=c||l,ra(t,e),pt=c,Xn=u,ia(e),n&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||l||Xn||pt||Di(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){l=a=t;try{if(i=l.stateNode,r)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{s=l.stateNode;var f=l.memoizedProps.style,d=f!=null&&f.hasOwnProperty("display")?f.display:null;s.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(h){be(l,l.return,h)}}}else if(t.tag===6){if(a===null){l=t;try{l.stateNode.nodeValue=r?"":l.memoizedProps}catch(h){be(l,l.return,h)}}}else if(t.tag===18){if(a===null){l=t;try{var p=l.stateNode;r?f1(p,!0):f1(l.stateNode,!1)}catch(h){be(l,l.return,h)}}}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}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,Df(e,a))));break;case 19:ra(t,e),ia(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Df(e,n)));break;case 30:break;case 21:break;default:ra(t,e),ia(e)}}function ia(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(h_(n)){a=n;break}n=n.return}if(a==null)throw Error(D(160));switch(a.tag){case 27:var r=a.stateNode,i=ux(e);md(e,i,r);break;case 5:var o=a.stateNode;a.flags&32&&(ms(o,""),a.flags&=-33);var s=ux(e);md(e,s,o);break;case 3:case 4:var l=a.stateNode.containerInfo,u=ux(e);Qx(e,u,l);break;default:throw Error(D(161))}}catch(c){be(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function w_(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;w_(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function qn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)x_(e,t.alternate,t),t=t.sibling}function Di(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Yr(4,t,t.return),Di(t);break;case 1:hn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&p_(t,t.return,a),Di(t);break;case 27:nu(t.stateNode);case 26:case 5:hn(t,t.return),Di(t);break;case 22:t.memoizedState===null&&Di(t);break;case 30:Di(t);break;default:Di(t)}e=e.sibling}}function jn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,r=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:jn(r,i,a),_u(4,i);break;case 1:if(jn(r,i,a),n=i,r=n.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(u){be(n,n.return,u)}if(n=i,r=n.updateQueue,r!==null){var s=n.stateNode;try{var l=r.shared.hiddenCallbacks;if(l!==null)for(r.shared.hiddenCallbacks=null,r=0;r<l.length;r++)SI(l[r],s)}catch(u){be(n,n.return,u)}}a&&o&64&&d_(i),Jl(i,i.return);break;case 27:g_(i);case 26:case 5:jn(r,i,a),a&&n===null&&o&4&&m_(i),Jl(i,i.return);break;case 12:jn(r,i,a);break;case 31:jn(r,i,a),a&&o&4&&S_(r,i);break;case 13:jn(r,i,a),a&&o&4&&b_(r,i);break;case 22:i.memoizedState===null&&jn(r,i,a),Jl(i,i.return);break;case 30:break;default:jn(r,i,a)}t=t.sibling}}function Zy(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&&e.refCount++,a!=null&&Lu(a))}function Qy(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Lu(e))}function an(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)L_(e,t,a,n),t=t.sibling}function L_(e,t,a,n){var r=t.flags;switch(t.tag){case 0:case 11:case 15:an(e,t,a,n),r&2048&&_u(9,t);break;case 1:an(e,t,a,n);break;case 3:an(e,t,a,n),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Lu(e)));break;case 12:if(r&2048){an(e,t,a,n),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,s=i.onPostCommit;typeof s=="function"&&s(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(l){be(t,t.return,l)}}else an(e,t,a,n);break;case 31:an(e,t,a,n);break;case 13:an(e,t,a,n);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?an(e,t,a,n):eu(e,t):i._visibility&2?an(e,t,a,n):(i._visibility|=2,Go(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Zy(o,t);break;case 24:an(e,t,a,n),r&2048&&Qy(t.alternate,t);break;default:an(e,t,a,n)}}function Go(e,t,a,n,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,s=a,l=n,u=o.flags;switch(o.tag){case 0:case 11:case 15:Go(i,o,s,l,r),_u(8,o);break;case 23:break;case 22:var c=o.stateNode;o.memoizedState!==null?c._visibility&2?Go(i,o,s,l,r):eu(i,o):(c._visibility|=2,Go(i,o,s,l,r)),r&&u&2048&&Zy(o.alternate,o);break;case 24:Go(i,o,s,l,r),r&&u&2048&&Qy(o.alternate,o);break;default:Go(i,o,s,l,r)}t=t.sibling}}function eu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,r=n.flags;switch(n.tag){case 22:eu(a,n),r&2048&&Zy(n.alternate,n);break;case 24:eu(a,n),r&2048&&Qy(n.alternate,n);break;default:eu(a,n)}t=t.sibling}}var jl=8192;function jo(e,t,a){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)I_(e,t,a),e=e.sibling}function I_(e,t,a){switch(e.tag){case 26:jo(e,t,a),e.flags&jl&&e.memoizedState!==null&&uN(a,nn,e.memoizedState,e.memoizedProps);break;case 5:jo(e,t,a);break;case 3:case 4:var n=nn;nn=Cd(e.stateNode.containerInfo),jo(e,t,a),nn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=jl,jl=16777216,jo(e,t,a),jl=n):jo(e,t,a));break;default:jo(e,t,a)}}function __(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 Fl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];_t=n,T_(n,e)}__(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)k_(e),e=e.sibling}function k_(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Yr(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wf(e)):Fl(e);break;default:Fl(e)}}function Wf(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];_t=n,T_(n,e)}__(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Yr(8,t,t.return),Wf(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Wf(t));break;default:Wf(t)}e=e.sibling}}function T_(e,t){for(;_t!==null;){var a=_t;switch(a.tag){case 0:case 11:case 15:Yr(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Lu(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,_t=n;else e:for(a=e;_t!==null;){n=_t;var r=n.sibling,i=n.return;if(y_(n),n===a){_t=null;break e}if(r!==null){r.return=i,_t=r;break e}_t=i}}}var _V={getCacheForType:function(e){var t=Bt(mt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Bt(mt).controller.signal}},kV=typeof WeakMap=="function"?WeakMap:Map,me=0,De=null,se=null,le=0,Se=0,xa=null,Or=!1,ks=!1,$y=!1,nr=0,$e=0,Zr=0,Bi=0,Jy=0,Sa=0,ys=0,tu=null,sa=null,$x=!1,Ud=0,A_=0,hd=1/0,gd=null,Hr=null,vt=0,qr=null,vs=null,$n=0,Jx=0,ey=null,E_=null,au=0,ty=null;function La(){return(me&2)!==0&&le!==0?le&-le:W.T!==null?tv():z1()}function D_(){if(Sa===0)if((le&536870912)===0||fe){var e=bf;bf<<=1,(bf&3932160)===0&&(bf=262144),Sa=e}else Sa=536870912;return e=_a.current,e!==null&&(e.flags|=32),Sa}function la(e,t,a){(e===De&&(Se===2||Se===9)||e.cancelPendingCommit!==null)&&(Ss(e,0),Br(e,le,Sa,!1)),bu(e,a),((me&2)===0||e!==De)&&(e===De&&((me&2)===0&&(Bi|=a),$e===4&&Br(e,le,Sa,!1)),yn(e))}function M_(e,t,a){if((me&6)!==0)throw Error(D(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Su(e,t),r=n?EV(e,t):fx(e,t,!0),i=n;do{if(r===0){ks&&!n&&Br(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!TV(a)){r=fx(e,t,!1),i=!1;continue}if(r===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var s=e;r=tu;var l=s.current.memoizedState.isDehydrated;if(l&&(Ss(s,o).flags|=256),o=fx(s,o,!1),o!==2){if($y&&!l){s.errorRecoveryDisabledLanes|=i,Bi|=i,r=4;break e}i=sa,sa=r,i!==null&&(sa===null?sa=i:sa.push.apply(sa,i))}r=o}if(i=!1,r!==2)continue}}if(r===1){Ss(e,0),Br(e,t,0,!0);break}e:{switch(n=e,i=r,i){case 0:case 1:throw Error(D(345));case 4:if((t&4194048)!==t)break;case 6:Br(n,t,Sa,!Or);break e;case 2:sa=null;break;case 3:case 5:break;default:throw Error(D(329))}if((t&62914560)===t&&(r=Ud+300-ba(),10<r)){if(Br(n,t,Sa,!Or),kd(n,0,!0)!==0)break e;$n=t,n.timeoutHandle=$_(ZL.bind(null,n,a,sa,gd,$x,t,Sa,Bi,ys,Or,i,"Throttled",-0,0),r);break e}ZL(n,a,sa,gd,$x,t,Sa,Bi,ys,Or,i,null,-0,0)}}break}while(!0);yn(e)}function ZL(e,t,a,n,r,i,o,s,l,u,c,f,d,p){if(e.timeoutHandle=-1,f=t.subtreeFlags,f&8192||(f&16785408)===16785408){f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kn},I_(t,i,f);var h=(i&62914560)===i?Ud-ba():(i&4194048)===i?A_-ba():0;if(h=cN(f,h),h!==null){$n=i,e.cancelPendingCommit=h($L.bind(null,e,t,i,a,n,r,o,s,l,c,f,null,d,p)),Br(e,i,o,!u);return}}$L(e,t,i,a,n,r,o,s,l)}function TV(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 n=0;n<a.length;n++){var r=a[n],i=r.getSnapshot;r=r.value;try{if(!Ia(i(),r))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 Br(e,t,a,n){t&=~Jy,t&=~Bi,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var r=t;0<r;){var i=31-wa(r),o=1<<i;n[i]=-1,r&=~o}a!==0&&B1(e,a,t)}function zd(){return(me&6)===0?(ku(0,!1),!1):!0}function ev(){if(se!==null){if(Se===0)var e=se.return;else e=se,Yn=Xi=null,zy(e),us=null,cu=0,e=se;for(;e!==null;)f_(e.alternate,e),e=e.return;se=null}}function Ss(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,XV(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),$n=0,ev(),De=e,se=a=Zn(e.current,null),le=t,Se=0,xa=null,Or=!1,ks=Su(e,t),$y=!1,ys=Sa=Jy=Bi=Zr=$e=0,sa=tu=null,$x=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-wa(n),i=1<<r;t|=e[r],n&=~i}return nr=t,Dd(),a}function R_(e,t){ee=null,W.H=du,t===_s||t===Rd?(t=TL(),Se=3):t===My?(t=TL(),Se=4):Se=t===Ky?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,xa=t,se===null&&($e=1,dd(e,Va(t,e.current)))}function P_(){var e=_a.current;return e===null?!0:(le&4194048)===le?Ha===null:(le&62914560)===le||(le&536870912)!==0?e===Ha:!1}function O_(){var e=W.H;return W.H=du,e===null?du:e}function B_(){var e=W.A;return W.A=_V,e}function xd(){$e=4,Or||(le&4194048)!==le&&_a.current!==null||(ks=!0),(Zr&134217727)===0&&(Bi&134217727)===0||De===null||Br(De,le,Sa,!1)}function fx(e,t,a){var n=me;me|=2;var r=O_(),i=B_();(De!==e||le!==t)&&(gd=null,Ss(e,t)),t=!1;var o=$e;e:do try{if(Se!==0&&se!==null){var s=se,l=xa;switch(Se){case 8:ev(),o=6;break e;case 3:case 2:case 9:case 6:_a.current===null&&(t=!0);var u=Se;if(Se=0,xa=null,rs(e,s,l,u),a&&ks){o=0;break e}break;default:u=Se,Se=0,xa=null,rs(e,s,l,u)}}AV(),o=$e;break}catch(c){R_(e,c)}while(!0);return t&&e.shellSuspendCounter++,Yn=Xi=null,me=n,W.H=r,W.A=i,se===null&&(De=null,le=0,Dd()),o}function AV(){for(;se!==null;)F_(se)}function EV(e,t){var a=me;me|=2;var n=O_(),r=B_();De!==e||le!==t?(gd=null,hd=ba()+500,Ss(e,t)):ks=Su(e,t);e:do try{if(Se!==0&&se!==null){t=se;var i=xa;t:switch(Se){case 1:Se=0,xa=null,rs(e,t,i,1);break;case 2:case 9:if(kL(i)){Se=0,xa=null,QL(t);break}t=function(){Se!==2&&Se!==9||De!==e||(Se=7),yn(e)},i.then(t,t);break e;case 3:Se=7;break e;case 4:Se=5;break e;case 7:kL(i)?(Se=0,xa=null,QL(t)):(Se=0,xa=null,rs(e,t,i,7));break;case 5:var o=null;switch(se.tag){case 26:o=se.memoizedState;case 5:case 27:var s=se;if(o?nk(o):s.stateNode.complete){Se=0,xa=null;var l=s.sibling;if(l!==null)se=l;else{var u=s.return;u!==null?(se=u,Vd(u)):se=null}break t}}Se=0,xa=null,rs(e,t,i,5);break;case 6:Se=0,xa=null,rs(e,t,i,6);break;case 8:ev(),$e=6;break e;default:throw Error(D(462))}}DV();break}catch(c){R_(e,c)}while(!0);return Yn=Xi=null,W.H=n,W.A=r,me=a,se!==null?0:(De=null,le=0,Dd(),$e)}function DV(){for(;se!==null&&!ez();)F_(se)}function F_(e){var t=c_(e.alternate,e,nr);e.memoizedProps=e.pendingProps,t===null?Vd(e):se=t}function QL(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=jL(a,t,t.pendingProps,t.type,void 0,le);break;case 11:t=jL(a,t,t.pendingProps,t.type.render,t.ref,le);break;case 5:zy(t);default:f_(a,t),t=se=fI(t,nr),t=c_(a,t,nr)}e.memoizedProps=e.pendingProps,t===null?Vd(e):se=t}function rs(e,t,a,n){Yn=Xi=null,zy(t),us=null,cu=0;var r=t.return;try{if(vV(e,r,t,a,le)){$e=1,dd(e,Va(a,e.current)),se=null;return}}catch(i){if(r!==null)throw se=r,i;$e=1,dd(e,Va(a,e.current)),se=null;return}t.flags&32768?(fe||n===1?e=!0:ks||(le&536870912)!==0?e=!1:(Or=e=!0,(n===2||n===9||n===3||n===6)&&(n=_a.current,n!==null&&n.tag===13&&(n.flags|=16384))),U_(t,e)):Vd(t)}function Vd(e){var t=e;do{if((t.flags&32768)!==0){U_(t,Or);return}e=t.return;var a=CV(t.alternate,t,nr);if(a!==null){se=a;return}if(t=t.sibling,t!==null){se=t;return}se=t=e}while(t!==null);$e===0&&($e=5)}function U_(e,t){do{var a=wV(e.alternate,e);if(a!==null){a.flags&=32767,se=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){se=e;return}se=e=a}while(e!==null);$e=6,se=null}function $L(e,t,a,n,r,i,o,s,l){e.cancelPendingCommit=null;do Nd();while(vt!==0);if((me&6)!==0)throw Error(D(327));if(t!==null){if(t===e.current)throw Error(D(177));if(i=t.lanes|t.childLanes,i|=Iy,cz(e,a,i,o,s,l),e===De&&(se=De=null,le=0),vs=t,qr=e,$n=a,Jx=i,ey=r,E_=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,OV(td,function(){return q_(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=W.T,W.T=null,r=he.p,he.p=2,o=me,me|=4;try{LV(e,t,a)}finally{me=o,he.p=r,W.T=n}}vt=1,z_(),V_(),N_()}}function z_(){if(vt===1){vt=0;var e=qr,t=vs,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=W.T,W.T=null;var n=he.p;he.p=2;var r=me;me|=4;try{C_(t,e);var i=iy,o=nI(e.containerInfo),s=i.focusedElem,l=i.selectionRange;if(o!==s&&s&&s.ownerDocument&&aI(s.ownerDocument.documentElement,s)){if(l!==null&&Ly(s)){var u=l.start,c=l.end;if(c===void 0&&(c=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(c,s.value.length);else{var f=s.ownerDocument||document,d=f&&f.defaultView||window;if(d.getSelection){var p=d.getSelection(),h=s.textContent.length,v=Math.min(l.start,h),S=l.end===void 0?v:Math.min(l.end,h);!p.extend&&v>S&&(o=S,S=v,v=o);var g=SL(s,v),x=SL(s,S);if(g&&x&&(p.rangeCount!==1||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==x.node||p.focusOffset!==x.offset)){var y=f.createRange();y.setStart(g.node,g.offset),p.removeAllRanges(),v>S?(p.addRange(y),p.extend(x.node,x.offset)):(y.setEnd(x.node,x.offset),p.addRange(y))}}}}for(f=[],p=s;p=p.parentNode;)p.nodeType===1&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<f.length;s++){var b=f[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Id=!!ry,iy=ry=null}finally{me=r,he.p=n,W.T=a}}e.current=t,vt=2}}function V_(){if(vt===2){vt=0;var e=qr,t=vs,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=W.T,W.T=null;var n=he.p;he.p=2;var r=me;me|=4;try{x_(e,t.alternate,t)}finally{me=r,he.p=n,W.T=a}}vt=3}}function N_(){if(vt===4||vt===3){vt=0,tz();var e=qr,t=vs,a=$n,n=E_;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,vs=qr=null,H_(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Hr=null),xy(a),t=t.stateNode,Ca&&typeof Ca.onCommitFiberRoot=="function")try{Ca.onCommitFiberRoot(vu,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=W.T,r=he.p,he.p=2,W.T=null;try{for(var i=e.onRecoverableError,o=0;o<n.length;o++){var s=n[o];i(s.value,{componentStack:s.stack})}}finally{W.T=t,he.p=r}}($n&3)!==0&&Nd(),yn(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===ty?au++:(au=0,ty=e):au=0,ku(0,!1)}}function H_(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Lu(t)))}function Nd(){return z_(),V_(),N_(),q_()}function q_(){if(vt!==5)return!1;var e=qr,t=Jx;Jx=0;var a=xy($n),n=W.T,r=he.p;try{he.p=32>a?32:a,W.T=null,a=ey,ey=null;var i=qr,o=$n;if(vt=0,vs=qr=null,$n=0,(me&6)!==0)throw Error(D(331));var s=me;if(me|=4,k_(i.current),L_(i,i.current,o,a),me=s,ku(0,!1),Ca&&typeof Ca.onPostCommitFiberRoot=="function")try{Ca.onPostCommitFiberRoot(vu,i)}catch{}return!0}finally{he.p=r,W.T=n,H_(e,t)}}function JL(e,t,a){t=Va(a,t),t=Kx(e.stateNode,t,2),e=Nr(e,t,2),e!==null&&(bu(e,2),yn(e))}function be(e,t,a){if(e.tag===3)JL(e,e,a);else for(;t!==null;){if(t.tag===3){JL(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Hr===null||!Hr.has(n))){e=Va(a,e),a=r_(2),n=Nr(t,a,2),n!==null&&(i_(a,n,t,e),bu(n,2),yn(n));break}}t=t.return}}function dx(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new kV;var r=new Set;n.set(t,r)}else r=n.get(t),r===void 0&&(r=new Set,n.set(t,r));r.has(a)||($y=!0,r.add(a),e=MV.bind(null,e,t,a),t.then(e,e))}function MV(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,De===e&&(le&a)===a&&($e===4||$e===3&&(le&62914560)===le&&300>ba()-Ud?(me&2)===0&&Ss(e,0):Jy|=a,ys===le&&(ys=0)),yn(e)}function j_(e,t){t===0&&(t=O1()),e=Gi(e,t),e!==null&&(bu(e,t),yn(e))}function RV(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),j_(e,a)}function PV(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(D(314))}n!==null&&n.delete(t),j_(e,a)}function OV(e,t){return hy(e,t)}var yd=null,Xo=null,ay=!1,vd=!1,px=!1,Fr=0;function yn(e){e!==Xo&&e.next===null&&(Xo===null?yd=Xo=e:Xo=Xo.next=e),vd=!0,ay||(ay=!0,FV())}function ku(e,t){if(!px&&vd){px=!0;do for(var a=!1,n=yd;n!==null;){if(!t)if(e!==0){var r=n.pendingLanes;if(r===0)var i=0;else{var o=n.suspendedLanes,s=n.pingedLanes;i=(1<<31-wa(42|e)+1)-1,i&=r&~(o&~s),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,e1(n,i))}else i=le,i=kd(n,n===De?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||Su(n,i)||(a=!0,e1(n,i));n=n.next}while(a);px=!1}}function BV(){G_()}function G_(){vd=ay=!1;var e=0;Fr!==0&&GV()&&(e=Fr);for(var t=ba(),a=null,n=yd;n!==null;){var r=n.next,i=X_(n,t);i===0?(n.next=null,a===null?yd=r:a.next=r,r===null&&(Xo=a)):(a=n,(e!==0||(i&3)!==0)&&(vd=!0)),n=r}vt!==0&&vt!==5||ku(e,!1),Fr!==0&&(Fr=0)}function X_(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-wa(i),s=1<<o,l=r[o];l===-1?((s&a)===0||(s&n)!==0)&&(r[o]=uz(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}if(t=De,a=le,a=kd(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Se===2||Se===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Hg(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Su(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Hg(n),xy(a)){case 2:case 8:a=R1;break;case 32:a=td;break;case 268435456:a=P1;break;default:a=td}return n=W_.bind(null,e),a=hy(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Hg(n),e.callbackPriority=2,e.callbackNode=null,2}function W_(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Nd()&&e.callbackNode!==a)return null;var n=le;return n=kd(e,e===De?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(M_(e,n,t),X_(e,ba()),e.callbackNode!=null&&e.callbackNode===a?W_.bind(null,e):null)}function e1(e,t){if(Nd())return null;M_(e,t,!0)}function FV(){WV(function(){(me&6)!==0?hy(M1,BV):G_()})}function tv(){if(Fr===0){var e=hs;e===0&&(e=Sf,Sf<<=1,(Sf&261888)===0&&(Sf=256)),Fr=e}return Fr}function t1(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Uf(""+e)}function a1(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 UV(e,t,a,n,r){if(t==="submit"&&a&&a.stateNode===r){var i=t1((r[ua]||null).action),o=n.submitter;o&&(t=(t=o[ua]||null)?t1(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var s=new Td("action","action",null,n,r);e.push({event:s,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Fr!==0){var l=o?a1(r,o):new FormData(r);Xx(a,{pending:!0,data:l,method:r.method,action:i},null,l)}}else typeof i=="function"&&(s.preventDefault(),l=o?a1(r,o):new FormData(r),Xx(a,{pending:!0,data:l,method:r.method,action:i},i,l))},currentTarget:r}]})}}for(Mf=0;Mf<Px.length;Mf++)Rf=Px[Mf],n1=Rf.toLowerCase(),r1=Rf[0].toUpperCase()+Rf.slice(1),rn(n1,"on"+r1);var Rf,n1,r1,Mf;rn(iI,"onAnimationEnd");rn(oI,"onAnimationIteration");rn(sI,"onAnimationStart");rn("dblclick","onDoubleClick");rn("focusin","onFocus");rn("focusout","onBlur");rn(aV,"onTransitionRun");rn(nV,"onTransitionStart");rn(rV,"onTransitionCancel");rn(lI,"onTransitionEnd");ps("onMouseEnter",["mouseout","mouseover"]);ps("onMouseLeave",["mouseout","mouseover"]);ps("onPointerEnter",["pointerout","pointerover"]);ps("onPointerLeave",["pointerout","pointerover"]);Hi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Hi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Hi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Hi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Hi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Hi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pu="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(" "),zV=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pu));function K_(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],r=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var s=n[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==i&&r.isPropagationStopped())break e;i=s,r.currentTarget=u;try{i(r)}catch(c){nd(c)}r.currentTarget=null,i=l}else for(o=0;o<n.length;o++){if(s=n[o],l=s.instance,u=s.currentTarget,s=s.listener,l!==i&&r.isPropagationStopped())break e;i=s,r.currentTarget=u;try{i(r)}catch(c){nd(c)}r.currentTarget=null,i=l}}}}function oe(e,t){var a=t[_x];a===void 0&&(a=t[_x]=new Set);var n=e+"__bubble";a.has(n)||(Y_(t,e,2,!1),a.add(n))}function mx(e,t,a){var n=0;t&&(n|=4),Y_(a,e,n,t)}var Pf="_reactListening"+Math.random().toString(36).slice(2);function av(e){if(!e[Pf]){e[Pf]=!0,V1.forEach(function(a){a!=="selectionchange"&&(zV.has(a)||mx(a,!1,e),mx(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pf]||(t[Pf]=!0,mx("selectionchange",!1,t))}}function Y_(e,t,a,n){switch(lk(t)){case 2:var r=pN;break;case 8:r=mN;break;default:r=ov}a=r.bind(null,t,a,e),r=void 0,!Dx||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),n?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function hx(e,t,a,n,r){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var s=n.stateNode.containerInfo;if(s===r)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===r)return;o=o.return}for(;s!==null;){if(o=Yo(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){n=i=o;continue e}s=s.parentNode}}n=n.return}K1(function(){var u=i,c=Sy(a),f=[];e:{var d=uI.get(e);if(d!==void 0){var p=Td,h=e;switch(e){case"keypress":if(Vf(a)===0)break e;case"keydown":case"keyup":p=Pz;break;case"focusin":h="focus",p=Wg;break;case"focusout":h="blur",p=Wg;break;case"beforeblur":case"afterblur":p=Wg;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":p=fL;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Cz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Fz;break;case iI:case oI:case sI:p=Iz;break;case lI:p=zz;break;case"scroll":case"scrollend":p=Sz;break;case"wheel":p=Nz;break;case"copy":case"cut":case"paste":p=kz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=pL;break;case"toggle":case"beforetoggle":p=qz}var v=(t&4)!==0,S=!v&&(e==="scroll"||e==="scrollend"),g=v?d!==null?d+"Capture":null:d;v=[];for(var x=u,y;x!==null;){var b=x;if(y=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||y===null||g===null||(b=iu(x,g),b!=null&&v.push(mu(x,b,y))),S)break;x=x.return}0<v.length&&(d=new p(d,h,null,a,c),f.push({event:d,listeners:v}))}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&a!==Ex&&(h=a.relatedTarget||a.fromElement)&&(Yo(h)||h[ws]))break e;if((p||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,p?(h=a.relatedTarget||a.toElement,p=u,h=h?Yo(h):null,h!==null&&(S=yu(h),v=h.tag,h!==S||v!==5&&v!==27&&v!==6)&&(h=null)):(p=null,h=u),p!==h)){if(v=fL,b="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(v=pL,b="onPointerLeave",g="onPointerEnter",x="pointer"),S=p==null?d:Hl(p),y=h==null?d:Hl(h),d=new v(b,x+"leave",p,a,c),d.target=S,d.relatedTarget=y,b=null,Yo(c)===u&&(v=new v(g,x+"enter",h,a,c),v.target=y,v.relatedTarget=S,b=v),S=b,p&&h)t:{for(v=VV,g=p,x=h,y=0,b=g;b;b=v(b))y++;b=0;for(var T=x;T;T=v(T))b++;for(;0<y-b;)g=v(g),y--;for(;0<b-y;)x=v(x),b--;for(;y--;){if(g===x||x!==null&&g===x.alternate){v=g;break t}g=v(g),x=v(x)}v=null}else v=null;p!==null&&i1(f,d,p,v,!1),h!==null&&S!==null&&i1(f,S,h,v,!0)}}e:{if(d=u?Hl(u):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var I=xL;else if(gL(d))if(eI)I=Jz;else{I=Qz;var A=Zz}else p=d.nodeName,!p||p.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?u&&vy(u.elementType)&&(I=xL):I=$z;if(I&&(I=I(e,u))){J1(f,I,a,c);break e}A&&A(e,d,u),e==="focusout"&&u&&d.type==="number"&&u.memoizedProps.value!=null&&Ax(d,"number",d.value)}switch(A=u?Hl(u):window,e){case"focusin":(gL(A)||A.contentEditable==="true")&&($o=A,Mx=u,Wl=null);break;case"focusout":Wl=Mx=$o=null;break;case"mousedown":Rx=!0;break;case"contextmenu":case"mouseup":case"dragend":Rx=!1,bL(f,a,c);break;case"selectionchange":if(tV)break;case"keydown":case"keyup":bL(f,a,c)}var _;if(wy)e:{switch(e){case"compositionstart":var M="onCompositionStart";break e;case"compositionend":M="onCompositionEnd";break e;case"compositionupdate":M="onCompositionUpdate";break e}M=void 0}else Qo?Q1(e,a)&&(M="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(M="onCompositionStart");M&&(Z1&&a.locale!=="ko"&&(Qo||M!=="onCompositionStart"?M==="onCompositionEnd"&&Qo&&(_=Y1()):(Pr=c,by="value"in Pr?Pr.value:Pr.textContent,Qo=!0)),A=Sd(u,M),0<A.length&&(M=new dL(M,e,null,a,c),f.push({event:M,listeners:A}),_?M.data=_:(_=$1(a),_!==null&&(M.data=_)))),(_=Gz?Xz(e,a):Wz(e,a))&&(M=Sd(u,"onBeforeInput"),0<M.length&&(A=new dL("onBeforeInput","beforeinput",null,a,c),f.push({event:A,listeners:M}),A.data=_)),UV(f,e,u,a,c)}K_(f,t)})}function mu(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Sd(e,t){for(var a=t+"Capture",n=[];e!==null;){var r=e,i=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||i===null||(r=iu(e,a),r!=null&&n.unshift(mu(e,r,i)),r=iu(e,t),r!=null&&n.push(mu(e,r,i))),e.tag===3)return n;e=e.return}return[]}function VV(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function i1(e,t,a,n,r){for(var i=t._reactName,o=[];a!==null&&a!==n;){var s=a,l=s.alternate,u=s.stateNode;if(s=s.tag,l!==null&&l===n)break;s!==5&&s!==26&&s!==27||u===null||(l=u,r?(u=iu(a,i),u!=null&&o.unshift(mu(a,u,l))):r||(u=iu(a,i),u!=null&&o.push(mu(a,u,l)))),a=a.return}o.length!==0&&e.push({event:t,listeners:o})}var NV=/\r\n?/g,HV=/\u0000|\uFFFD/g;function o1(e){return(typeof e=="string"?e:""+e).replace(NV,`
|
|
9
|
+
`).replace(HV,"")}function Z_(e,t){return t=o1(t),o1(e)===t}function _e(e,t,a,n,r,i){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||ms(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&ms(e,""+n);break;case"className":wf(e,"class",n);break;case"tabIndex":wf(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":wf(e,a,n);break;case"style":W1(e,n,i);break;case"data":if(t!=="object"){wf(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Uf(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="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 i=="function"&&(a==="formAction"?(t!=="input"&&_e(e,t,"name",r.name,r,null),_e(e,t,"formEncType",r.formEncType,r,null),_e(e,t,"formMethod",r.formMethod,r,null),_e(e,t,"formTarget",r.formTarget,r,null)):(_e(e,t,"encType",r.encType,r,null),_e(e,t,"method",r.method,r,null),_e(e,t,"target",r.target,r,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Uf(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Kn);break;case"onScroll":n!=null&&oe("scroll",e);break;case"onScrollEnd":n!=null&&oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(D(61));if(a=n.__html,a!=null){if(r.children!=null)throw Error(D(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=Uf(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":oe("beforetoggle",e),oe("toggle",e),Ff(e,"popover",n);break;case"xlinkActuate":Vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Vn(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Vn(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Vn(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Vn(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ff(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=yz.get(a)||a,Ff(e,a,n))}}function ny(e,t,a,n,r,i){switch(a){case"style":W1(e,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(D(61));if(a=n.__html,a!=null){if(r.children!=null)throw Error(D(60));e.innerHTML=a}}break;case"children":typeof n=="string"?ms(e,n):(typeof n=="number"||typeof n=="bigint")&&ms(e,""+n);break;case"onScroll":n!=null&&oe("scroll",e);break;case"onScrollEnd":n!=null&&oe("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Kn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!N1.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),i=e[ua]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,r),typeof n=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,r);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Ff(e,a,n)}}}function Ft(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":oe("error",e),oe("load",e);var n=!1,r=!1,i;for(i in a)if(a.hasOwnProperty(i)){var o=a[i];if(o!=null)switch(i){case"src":n=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(D(137,t));default:_e(e,t,i,o,a,null)}}r&&_e(e,t,"srcSet",a.srcSet,a,null),n&&_e(e,t,"src",a.src,a,null);return;case"input":oe("invalid",e);var s=i=o=r=null,l=null,u=null;for(n in a)if(a.hasOwnProperty(n)){var c=a[n];if(c!=null)switch(n){case"name":r=c;break;case"type":o=c;break;case"checked":l=c;break;case"defaultChecked":u=c;break;case"value":i=c;break;case"defaultValue":s=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(D(137,t));break;default:_e(e,t,n,c,a,null)}}j1(e,i,s,l,u,o,r,!1);return;case"select":oe("invalid",e),n=o=i=null;for(r in a)if(a.hasOwnProperty(r)&&(s=a[r],s!=null))switch(r){case"value":i=s;break;case"defaultValue":o=s;break;case"multiple":n=s;default:_e(e,t,r,s,a,null)}t=i,a=o,e.multiple=!!n,t!=null?os(e,!!n,t,!1):a!=null&&os(e,!!n,a,!0);return;case"textarea":oe("invalid",e),i=r=n=null;for(o in a)if(a.hasOwnProperty(o)&&(s=a[o],s!=null))switch(o){case"value":n=s;break;case"defaultValue":r=s;break;case"children":i=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(D(91));break;default:_e(e,t,o,s,a,null)}X1(e,n,r,i);return;case"option":for(l in a)a.hasOwnProperty(l)&&(n=a[l],n!=null)&&(l==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":_e(e,t,l,n,a,null));return;case"dialog":oe("beforetoggle",e),oe("toggle",e),oe("cancel",e),oe("close",e);break;case"iframe":case"object":oe("load",e);break;case"video":case"audio":for(n=0;n<pu.length;n++)oe(pu[n],e);break;case"image":oe("error",e),oe("load",e);break;case"details":oe("toggle",e);break;case"embed":case"source":case"link":oe("error",e),oe("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(u in a)if(a.hasOwnProperty(u)&&(n=a[u],n!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(D(137,t));default:_e(e,t,u,n,a,null)}return;default:if(vy(t)){for(c in a)a.hasOwnProperty(c)&&(n=a[c],n!==void 0&&ny(e,t,c,n,a,void 0));return}}for(s in a)a.hasOwnProperty(s)&&(n=a[s],n!=null&&_e(e,t,s,n,a,null))}function qV(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,i=null,o=null,s=null,l=null,u=null,c=null;for(p in a){var f=a[p];if(a.hasOwnProperty(p)&&f!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":l=f;default:n.hasOwnProperty(p)||_e(e,t,p,null,n,f)}}for(var d in n){var p=n[d];if(f=a[d],n.hasOwnProperty(d)&&(p!=null||f!=null))switch(d){case"type":i=p;break;case"name":r=p;break;case"checked":u=p;break;case"defaultChecked":c=p;break;case"value":o=p;break;case"defaultValue":s=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(D(137,t));break;default:p!==f&&_e(e,t,d,p,n,f)}}Tx(e,o,s,l,u,c,i,r);return;case"select":p=o=s=d=null;for(i in a)if(l=a[i],a.hasOwnProperty(i)&&l!=null)switch(i){case"value":break;case"multiple":p=l;default:n.hasOwnProperty(i)||_e(e,t,i,null,n,l)}for(r in n)if(i=n[r],l=a[r],n.hasOwnProperty(r)&&(i!=null||l!=null))switch(r){case"value":d=i;break;case"defaultValue":s=i;break;case"multiple":o=i;default:i!==l&&_e(e,t,r,i,n,l)}t=s,a=o,n=p,d!=null?os(e,!!a,d,!1):!!n!=!!a&&(t!=null?os(e,!!a,t,!0):os(e,!!a,a?[]:"",!1));return;case"textarea":p=d=null;for(s in a)if(r=a[s],a.hasOwnProperty(s)&&r!=null&&!n.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:_e(e,t,s,null,n,r)}for(o in n)if(r=n[o],i=a[o],n.hasOwnProperty(o)&&(r!=null||i!=null))switch(o){case"value":d=r;break;case"defaultValue":p=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(D(91));break;default:r!==i&&_e(e,t,o,r,n,i)}G1(e,d,p);return;case"option":for(var h in a)d=a[h],a.hasOwnProperty(h)&&d!=null&&!n.hasOwnProperty(h)&&(h==="selected"?e.selected=!1:_e(e,t,h,null,n,d));for(l in n)d=n[l],p=a[l],n.hasOwnProperty(l)&&d!==p&&(d!=null||p!=null)&&(l==="selected"?e.selected=d&&typeof d!="function"&&typeof d!="symbol":_e(e,t,l,d,n,p));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 v in a)d=a[v],a.hasOwnProperty(v)&&d!=null&&!n.hasOwnProperty(v)&&_e(e,t,v,null,n,d);for(u in n)if(d=n[u],p=a[u],n.hasOwnProperty(u)&&d!==p&&(d!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(D(137,t));break;default:_e(e,t,u,d,n,p)}return;default:if(vy(t)){for(var S in a)d=a[S],a.hasOwnProperty(S)&&d!==void 0&&!n.hasOwnProperty(S)&&ny(e,t,S,void 0,n,d);for(c in n)d=n[c],p=a[c],!n.hasOwnProperty(c)||d===p||d===void 0&&p===void 0||ny(e,t,c,d,n,p);return}}for(var g in a)d=a[g],a.hasOwnProperty(g)&&d!=null&&!n.hasOwnProperty(g)&&_e(e,t,g,null,n,d);for(f in n)d=n[f],p=a[f],!n.hasOwnProperty(f)||d===p||d==null&&p==null||_e(e,t,f,d,n,p)}function s1(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jV(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var r=a[n],i=r.transferSize,o=r.initiatorType,s=r.duration;if(i&&s&&s1(o)){for(o=0,s=r.responseEnd,n+=1;n<a.length;n++){var l=a[n],u=l.startTime;if(u>s)break;var c=l.transferSize,f=l.initiatorType;c&&s1(f)&&(l=l.responseEnd,o+=c*(l<s?1:(s-u)/(l-u)))}if(--n,t+=8*(i+o)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ry=null,iy=null;function bd(e){return e.nodeType===9?e:e.ownerDocument}function l1(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Q_(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function oy(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}var gx=null;function GV(){var e=window.event;return e&&e.type==="popstate"?e===gx?!1:(gx=e,!0):(gx=null,!1)}var $_=typeof setTimeout=="function"?setTimeout:void 0,XV=typeof clearTimeout=="function"?clearTimeout:void 0,u1=typeof Promise=="function"?Promise:void 0,WV=typeof queueMicrotask=="function"?queueMicrotask:typeof u1<"u"?function(e){return u1.resolve(null).then(e).catch(KV)}:$_;function KV(e){setTimeout(function(){throw e})}function $r(e){return e==="head"}function c1(e,t){var a=t,n=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(r),Cs(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")nu(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,nu(a);for(var i=a.firstChild;i;){var o=i.nextSibling,s=i.nodeName;i[Cu]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=o}}else a==="body"&&nu(e.ownerDocument.body);a=r}while(a);Cs(t)}function f1(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function sy(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":sy(a),yy(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function YV(e,t,a,n){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Cu])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=qa(e.nextSibling),e===null)break}return null}function ZV(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=qa(e.nextSibling),e===null))return null;return e}function J_(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=qa(e.nextSibling),e===null))return null;return e}function ly(e){return e.data==="$?"||e.data==="$~"}function uy(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function QV(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function qa(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==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var cy=null;function d1(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return qa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function p1(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function ek(e,t,a){switch(t=bd(a),e){case"html":if(e=t.documentElement,!e)throw Error(D(452));return e;case"head":if(e=t.head,!e)throw Error(D(453));return e;case"body":if(e=t.body,!e)throw Error(D(454));return e;default:throw Error(D(451))}}function nu(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yy(e)}var ja=new Map,m1=new Set;function Cd(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rr=he.d;he.d={f:$V,r:JV,D:eN,C:tN,L:aN,m:nN,X:iN,S:rN,M:oN};function $V(){var e=rr.f(),t=zd();return e||t}function JV(e){var t=Ls(e);t!==null&&t.tag===5&&t.type==="form"?WI(t):rr.r(e)}var Ts=typeof document>"u"?null:document;function tk(e,t,a){var n=Ts;if(n&&typeof t=="string"&&t){var r=za(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),m1.has(r)||(m1.add(r),e={rel:e,crossOrigin:a,href:t},n.querySelector(r)===null&&(t=n.createElement("link"),Ft(t,"link",e),kt(t),n.head.appendChild(t)))}}function eN(e){rr.D(e),tk("dns-prefetch",e,null)}function tN(e,t){rr.C(e,t),tk("preconnect",e,t)}function aN(e,t,a){rr.L(e,t,a);var n=Ts;if(n&&e&&t){var r='link[rel="preload"][as="'+za(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+za(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+za(a.imageSizes)+'"]')):r+='[href="'+za(e)+'"]';var i=r;switch(t){case"style":i=bs(e);break;case"script":i=As(e)}ja.has(i)||(e=ze({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ja.set(i,e),n.querySelector(r)!==null||t==="style"&&n.querySelector(Tu(i))||t==="script"&&n.querySelector(Au(i))||(t=n.createElement("link"),Ft(t,"link",e),kt(t),n.head.appendChild(t)))}}function nN(e,t){rr.m(e,t);var a=Ts;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+za(n)+'"][href="'+za(e)+'"]',i=r;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=As(e)}if(!ja.has(i)&&(e=ze({rel:"modulepreload",href:e},t),ja.set(i,e),a.querySelector(r)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Au(i)))return}n=a.createElement("link"),Ft(n,"link",e),kt(n),a.head.appendChild(n)}}}function rN(e,t,a){rr.S(e,t,a);var n=Ts;if(n&&e){var r=is(n).hoistableStyles,i=bs(e);t=t||"default";var o=r.get(i);if(!o){var s={loading:0,preload:null};if(o=n.querySelector(Tu(i)))s.loading=5;else{e=ze({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ja.get(i))&&nv(e,a);var l=o=n.createElement("link");kt(l),Ft(l,"link",e),l._p=new Promise(function(u,c){l.onload=u,l.onerror=c}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Kf(o,t,n)}o={type:"stylesheet",instance:o,count:1,state:s},r.set(i,o)}}}function iN(e,t){rr.X(e,t);var a=Ts;if(a&&e){var n=is(a).hoistableScripts,r=As(e),i=n.get(r);i||(i=a.querySelector(Au(r)),i||(e=ze({src:e,async:!0},t),(t=ja.get(r))&&rv(e,t),i=a.createElement("script"),kt(i),Ft(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(r,i))}}function oN(e,t){rr.M(e,t);var a=Ts;if(a&&e){var n=is(a).hoistableScripts,r=As(e),i=n.get(r);i||(i=a.querySelector(Au(r)),i||(e=ze({src:e,async:!0,type:"module"},t),(t=ja.get(r))&&rv(e,t),i=a.createElement("script"),kt(i),Ft(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(r,i))}}function h1(e,t,a,n){var r=(r=Ur.current)?Cd(r):null;if(!r)throw Error(D(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=bs(a.href),a=is(r).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=bs(a.href);var i=is(r).hoistableStyles,o=i.get(e);if(o||(r=r.ownerDocument||r,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=r.querySelector(Tu(e)))&&!i._p&&(o.instance=i,o.state.loading=5),ja.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ja.set(e,a),i||sN(r,e,a,o.state))),t&&n===null)throw Error(D(528,""));return o}if(t&&n!==null)throw Error(D(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=As(a),a=is(r).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(D(444,e))}}function bs(e){return'href="'+za(e)+'"'}function Tu(e){return'link[rel="stylesheet"]['+e+"]"}function ak(e){return ze({},e,{"data-precedence":e.precedence,precedence:null})}function sN(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Ft(t,"link",a),kt(t),e.head.appendChild(t))}function As(e){return'[src="'+za(e)+'"]'}function Au(e){return"script[async]"+e}function g1(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+za(a.href)+'"]');if(n)return t.instance=n,kt(n),n;var r=ze({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),kt(n),Ft(n,"style",r),Kf(n,a.precedence,e),t.instance=n;case"stylesheet":r=bs(a.href);var i=e.querySelector(Tu(r));if(i)return t.state.loading|=4,t.instance=i,kt(i),i;n=ak(a),(r=ja.get(r))&&nv(n,r),i=(e.ownerDocument||e).createElement("link"),kt(i);var o=i;return o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),Ft(i,"link",n),t.state.loading|=4,Kf(i,a.precedence,e),t.instance=i;case"script":return i=As(a.src),(r=e.querySelector(Au(i)))?(t.instance=r,kt(r),r):(n=a,(r=ja.get(i))&&(n=ze({},a),rv(n,r)),e=e.ownerDocument||e,r=e.createElement("script"),kt(r),Ft(r,"link",n),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(D(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Kf(n,a.precedence,e));return t.instance}function Kf(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=n.length?n[n.length-1]:null,i=r,o=0;o<n.length;o++){var s=n[o];if(s.dataset.precedence===t)i=s;else if(i!==r)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function nv(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function rv(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Yf=null;function x1(e,t,a){if(Yf===null){var n=new Map,r=Yf=new Map;r.set(a,n)}else r=Yf,n=r.get(a),n||(n=new Map,r.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var i=a[r];if(!(i[Cu]||i[Pt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var s=n.get(o);s?s.push(i):n.set(o,[i])}}return n}function y1(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function lN(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function nk(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function uN(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=bs(n.href),i=t.querySelector(Tu(r));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=wd.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,kt(i);return}i=t.ownerDocument||t,n=ak(n),(r=ja.get(r))&&nv(n,r),i=i.createElement("link"),kt(i);var o=i;o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),Ft(i,"link",n),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=wd.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var xx=0;function cN(e,t){return e.stylesheets&&e.count===0&&Zf(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&xx===0&&(xx=62500*jV());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>xx?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(r)}}:null}function wd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ld=null;function Zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ld=new Map,t.forEach(fN,e),Ld=null,wd.call(e))}function fN(e,t){if(!(t.state.loading&4)){var a=Ld.get(e);if(a)var n=a.get(null);else{a=new Map,Ld.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<r.length;i++){var o=r[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(a.set(o.dataset.precedence,o),n=o)}n&&a.set(null,n)}r=t.instance,o=r.getAttribute("data-precedence"),i=a.get(o)||n,i===n&&a.set(null,r),a.set(o,r),this.count++,n=wd.bind(this),r.addEventListener("load",n),r.addEventListener("error",n),i?i.parentNode.insertBefore(r,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var hu={$$typeof:Wn,Provider:null,Consumer:null,_currentValue:Mi,_currentValue2:Mi,_threadCount:0};function dN(e,t,a,n,r,i,o,s,l){this.tag=1,this.containerInfo=e,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=qg(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qg(0),this.hiddenUpdates=qg(null),this.identifierPrefix=n,this.onUncaughtError=r,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function rk(e,t,a,n,r,i,o,s,l,u,c,f){return e=new dN(e,t,a,o,l,u,c,f,s),t=1,i===!0&&(t|=24),i=va(3,null,null,t),e.current=i,i.stateNode=e,t=Ey(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:n,isDehydrated:a,cache:t},Ry(i),e}function ik(e){return e?(e=ts,e):ts}function ok(e,t,a,n,r,i){r=ik(r),n.context===null?n.context=r:n.pendingContext=r,n=Vr(t),n.payload={element:a},i=i===void 0?null:i,i!==null&&(n.callback=i),a=Nr(e,n,t),a!==null&&(la(a,e,t),Yl(a,e,t))}function v1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function iv(e,t){v1(e,t),(e=e.alternate)&&v1(e,t)}function sk(e){if(e.tag===13||e.tag===31){var t=Gi(e,67108864);t!==null&&la(t,e,67108864),iv(e,67108864)}}function S1(e){if(e.tag===13||e.tag===31){var t=La();t=gy(t);var a=Gi(e,t);a!==null&&la(a,e,t),iv(e,t)}}var Id=!0;function pN(e,t,a,n){var r=W.T;W.T=null;var i=he.p;try{he.p=2,ov(e,t,a,n)}finally{he.p=i,W.T=r}}function mN(e,t,a,n){var r=W.T;W.T=null;var i=he.p;try{he.p=8,ov(e,t,a,n)}finally{he.p=i,W.T=r}}function ov(e,t,a,n){if(Id){var r=fy(n);if(r===null)hx(e,t,n,_d,a),b1(e,n);else if(gN(r,e,t,a,n))n.stopPropagation();else if(b1(e,n),t&4&&-1<hN.indexOf(e)){for(;r!==null;){var i=Ls(r);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Ai(i.pendingLanes);if(o!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var l=1<<31-wa(o);s.entanglements[1]|=l,o&=~l}yn(i),(me&6)===0&&(hd=ba()+500,ku(0,!1))}}break;case 31:case 13:s=Gi(i,2),s!==null&&la(s,i,2),zd(),iv(i,2)}if(i=fy(n),i===null&&hx(e,t,n,_d,a),i===r)break;r=i}r!==null&&n.stopPropagation()}else hx(e,t,n,null,a)}}function fy(e){return e=Sy(e),sv(e)}var _d=null;function sv(e){if(_d=null,e=Yo(e),e!==null){var t=yu(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=k1(t),e!==null)return e;e=null}else if(a===31){if(e=T1(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 _d=e,null}function lk(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 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(az()){case M1:return 2;case R1:return 8;case td:case nz:return 32;case P1:return 268435456;default:return 32}default:return 32}}var dy=!1,jr=null,Gr=null,Xr=null,gu=new Map,xu=new Map,Mr=[],hN="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 b1(e,t){switch(e){case"focusin":case"focusout":jr=null;break;case"dragenter":case"dragleave":Gr=null;break;case"mouseover":case"mouseout":Xr=null;break;case"pointerover":case"pointerout":gu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xu.delete(t.pointerId)}}function Ul(e,t,a,n,r,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:i,targetContainers:[r]},t!==null&&(t=Ls(t),t!==null&&sk(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function gN(e,t,a,n,r){switch(t){case"focusin":return jr=Ul(jr,e,t,a,n,r),!0;case"dragenter":return Gr=Ul(Gr,e,t,a,n,r),!0;case"mouseover":return Xr=Ul(Xr,e,t,a,n,r),!0;case"pointerover":var i=r.pointerId;return gu.set(i,Ul(gu.get(i)||null,e,t,a,n,r)),!0;case"gotpointercapture":return i=r.pointerId,xu.set(i,Ul(xu.get(i)||null,e,t,a,n,r)),!0}return!1}function uk(e){var t=Yo(e.target);if(t!==null){var a=yu(t);if(a!==null){if(t=a.tag,t===13){if(t=k1(a),t!==null){e.blockedOn=t,rL(e.priority,function(){S1(a)});return}}else if(t===31){if(t=T1(a),t!==null){e.blockedOn=t,rL(e.priority,function(){S1(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=fy(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Ex=n,a.target.dispatchEvent(n),Ex=null}else return t=Ls(a),t!==null&&sk(t),e.blockedOn=a,!1;t.shift()}return!0}function C1(e,t,a){Qf(e)&&a.delete(t)}function xN(){dy=!1,jr!==null&&Qf(jr)&&(jr=null),Gr!==null&&Qf(Gr)&&(Gr=null),Xr!==null&&Qf(Xr)&&(Xr=null),gu.forEach(C1),xu.forEach(C1)}function Of(e,t){e.blockedOn===t&&(e.blockedOn=null,dy||(dy=!0,St.unstable_scheduleCallback(St.unstable_NormalPriority,xN)))}var Bf=null;function w1(e){Bf!==e&&(Bf=e,St.unstable_scheduleCallback(St.unstable_NormalPriority,function(){Bf===e&&(Bf=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],r=e[t+2];if(typeof n!="function"){if(sv(n||a)===null)continue;break}var i=Ls(a);i!==null&&(e.splice(t,3),t-=3,Xx(i,{pending:!0,data:r,method:a.method,action:n},n,r))}}))}function Cs(e){function t(l){return Of(l,e)}jr!==null&&Of(jr,e),Gr!==null&&Of(Gr,e),Xr!==null&&Of(Xr,e),gu.forEach(t),xu.forEach(t);for(var a=0;a<Mr.length;a++){var n=Mr[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Mr.length&&(a=Mr[0],a.blockedOn===null);)uk(a),a.blockedOn===null&&Mr.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var r=a[n],i=a[n+1],o=r[ua]||null;if(typeof i=="function")o||w1(a);else if(o){var s=null;if(i&&i.hasAttribute("formAction")){if(r=i,o=i[ua]||null)s=o.formAction;else if(sv(r)!==null)continue}else s=o.action;typeof s=="function"?a[n+1]=s:(a.splice(n,3),n-=3),w1(a)}}}function ck(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return r=o})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function lv(e){this._internalRoot=e}Hd.prototype.render=lv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));var a=t.current,n=La();ok(a,n,e,t,null,null)};Hd.prototype.unmount=lv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ok(e.current,2,null,e,null,null),zd(),t[ws]=null}};function Hd(e){this._internalRoot=e}Hd.prototype.unstable_scheduleHydration=function(e){if(e){var t=z1();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Mr.length&&t!==0&&t<Mr[a].priority;a++);Mr.splice(a,0,e),a===0&&uk(e)}};var L1=I1.version;if(L1!=="19.2.8")throw Error(D(527,L1,"19.2.8"));he.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=Y5(t),e=e!==null?A1(e):null,e=e===null?null:e.stateNode,e};var yN={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(zl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!zl.isDisabled&&zl.supportsFiber))try{vu=zl.inject(yN),Ca=zl}catch{}var zl;qd.createRoot=function(e,t){if(!_1(e))throw Error(D(299));var a=!1,n="",r=t_,i=a_,o=n_;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=rk(e,1,!1,null,null,a,n,null,r,i,o,ck),e[ws]=t.current,av(e),new lv(t)};qd.hydrateRoot=function(e,t,a){if(!_1(e))throw Error(D(299));var n=!1,r="",i=t_,o=a_,s=n_,l=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(o=a.onCaughtError),a.onRecoverableError!==void 0&&(s=a.onRecoverableError),a.formState!==void 0&&(l=a.formState)),t=rk(e,1,!0,t,a??null,n,r,l,i,o,s,ck),t.context=ik(null),a=t.current,n=La(),n=gy(n),r=Vr(n),r.callback=null,Nr(a,r,n),a=n,t.current.lanes=a,bu(t,a),yn(t),e[ws]=t.current,av(e),new Hd(t)};qd.version="19.2.8"});var mk=It((N7,pk)=>{"use strict";function dk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(dk)}catch(e){console.error(e)}}dk(),pk.exports=fk()});var jd,uv=m(()=>{"use strict";jd=(...e)=>e.filter((t,a,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===a).join(" ").trim()});var hk,gk=m(()=>{"use strict";hk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()});var xk,yk=m(()=>{"use strict";xk=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,n)=>n?n.toUpperCase():a.toLowerCase())});var cv,vk=m(()=>{"use strict";yk();cv=e=>{let t=xk(e);return t.charAt(0).toUpperCase()+t.slice(1)}});var Gd,Sk=m(()=>{"use strict";Gd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}});var bk,Ck=m(()=>{"use strict";bk=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1}});var Es,vN,wk,Lk=m(()=>{"use strict";"use client";Es=H(re(),1);vN=(0,Es.createContext)({}),wk=()=>(0,Es.useContext)(vN)});var Eu,Ik,_k=m(()=>{"use strict";"use client";Eu=H(re(),1);Sk();Ck();uv();Lk();Ik=(0,Eu.forwardRef)(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:n,className:r="",children:i,iconNode:o,...s},l)=>{let{size:u=24,strokeWidth:c=2,absoluteStrokeWidth:f=!1,color:d="currentColor",className:p=""}=wk()??{},h=n??f?Number(a??c)*24/Number(t??u):a??c;return(0,Eu.createElement)("svg",{ref:l,...Gd,width:t??u??Gd.width,height:t??u??Gd.height,stroke:e??d,strokeWidth:h,className:jd("lucide",p,r),...!i&&!bk(s)&&{"aria-hidden":"true"},...s},[...o.map(([v,S])=>(0,Eu.createElement)(v,S)),...Array.isArray(i)?i:[i]])})});var Xd,xe,qt=m(()=>{"use strict";Xd=H(re(),1);uv();gk();vk();_k();xe=(e,t)=>{let a=(0,Xd.forwardRef)(({className:n,...r},i)=>(0,Xd.createElement)(Ik,{ref:i,iconNode:t,className:jd(`lucide-${hk(cv(e))}`,`lucide-${e}`,n),...r}));return a.displayName=cv(e),a}});var SN,Du,kk=m(()=>{"use strict";qt();SN=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Du=xe("bot",SN)});var bN,Mu,Tk=m(()=>{"use strict";qt();bN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Mu=xe("chevron-right",bN)});var CN,Jr,Ak=m(()=>{"use strict";qt();CN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Jr=xe("circle-check",CN)});var wN,ei,Ek=m(()=>{"use strict";qt();wN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],ei=xe("circle-stop",wN)});var LN,Ru,Dk=m(()=>{"use strict";qt();LN=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ru=xe("file-text",LN)});var IN,Pu,Mk=m(()=>{"use strict";qt();IN=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]],Pu=xe("mic-off",IN)});var _N,Ds,Rk=m(()=>{"use strict";qt();_N=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],Ds=xe("mic",_N)});var kN,Ou,Pk=m(()=>{"use strict";qt();kN=[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]],Ou=xe("phone-off",kN)});var TN,Wi,Ok=m(()=>{"use strict";qt();TN=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Wi=xe("phone",TN)});var AN,Bu,Bk=m(()=>{"use strict";qt();AN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bu=xe("plus",AN)});var EN,Ms,Fk=m(()=>{"use strict";qt();EN=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],Ms=xe("refresh-ccw",EN)});var DN,Fu,Uk=m(()=>{"use strict";qt();DN=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Fu=xe("send",DN)});var MN,Uu,zk=m(()=>{"use strict";qt();MN=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Uu=xe("shield-check",MN)});var RN,zu,Vk=m(()=>{"use strict";qt();RN=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],zu=xe("star",RN)});var PN,Vu,Nk=m(()=>{"use strict";qt();PN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Vu=xe("x",PN)});var Hk=m(()=>{"use strict";Ak();Ek();kk();Tk();Dk();Mk();Rk();Pk();Ok();Bk();Fk();Uk();zk();Vk();Nk();});var jk=It(Wd=>{"use strict";var ON=Symbol.for("react.transitional.element"),BN=Symbol.for("react.fragment");function qk(e,t,a){var n=null;if(a!==void 0&&(n=""+a),t.key!==void 0&&(n=""+t.key),"key"in t){a={};for(var r in t)r!=="key"&&(a[r]=t[r])}else a=t;return t=a.ref,{$$typeof:ON,type:e,key:n,ref:t!==void 0?t:null,props:a}}Wd.Fragment=BN;Wd.jsx=qk;Wd.jsxs=qk});var ir=It((JX,Gk)=>{"use strict";Gk.exports=jk()});var Xk,Rs,Kd=m(()=>{"use strict";"use client";Xk=H(re(),1),Rs=(0,Xk.createContext)({})});function Ps(e){let t=(0,Wk.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Wk,Yd=m(()=>{"use strict";"use client";Wk=H(re(),1)});var Kk,Yk=m(()=>{"use strict";Kk=typeof window<"u"});var Zd,Os,Qd=m(()=>{"use strict";"use client";Zd=H(re(),1);Yk();Os=Kk?Zd.useLayoutEffect:Zd.useEffect});var Zk,ti,Nu=m(()=>{"use strict";"use client";Zk=H(re(),1),ti=(0,Zk.createContext)(null)});function Ki(e,t){e.indexOf(t)===-1&&e.push(t)}function ai(e,t){let a=e.indexOf(t);a>-1&&e.splice(a,1)}var fv=m(()=>{"use strict"});var bt,Qk=m(()=>{"use strict";bt=(e,t,a)=>a>t?t:a<e?e:a});var or,fa,dv=m(()=>{"use strict";or=()=>{},fa=()=>{}});var $t,$k=m(()=>{"use strict";$t={}});var Hu,Jk=m(()=>{"use strict";Hu=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)});var qu,eT=m(()=>{"use strict";qu=e=>typeof e=="object"&&e!==null});var ju,tT=m(()=>{"use strict";ju=e=>/^0[^.\s]+$/u.test(e)});function Gu(e){let t;return()=>(t===void 0&&(t=e()),t)}var aT=m(()=>{"use strict"});var Xe,$d=m(()=>{"use strict";Xe=e=>e});var on,nT=m(()=>{"use strict";on=(...e)=>e.reduce((t,a)=>n=>a(t(n)))});var vn,rT=m(()=>{"use strict";vn=(e,t,a)=>{let n=t-e;return n?(a-e)/n:1}});var sr,iT=m(()=>{"use strict";fv();sr=class{constructor(){this.subscriptions=[]}add(t){return Ki(this.subscriptions,t),()=>ai(this.subscriptions,t)}notify(t,a,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,a,n);else for(let i=0;i<r;i++){let o=this.subscriptions[i];o&&o(t,a,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}});var it,At,oT=m(()=>{"use strict";it=e=>e*1e3,At=e=>e/1e3});var Xu,sT=m(()=>{"use strict";Xu=(e,t)=>t?e*(1e3/t):0});function zN(e,t,a,n,r){let i,o,s=0;do o=t+(a-t)/2,i=lT(o,n,r)-e,i>0?a=o:t=o;while(Math.abs(i)>FN&&++s<UN);return o}function ni(e,t,a,n){if(e===t&&a===n)return Xe;let r=i=>zN(i,0,1,e,a);return i=>i===0||i===1?i:lT(r(i),t,n)}var lT,FN,UN,Jd=m(()=>{"use strict";$d();lT=(e,t,a)=>(((1-3*a+3*t)*e+(3*a-6*t))*e+3*t)*e,FN=1e-7,UN=12});var ep,pv=m(()=>{"use strict";ep=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2});var tp,mv=m(()=>{"use strict";tp=e=>t=>1-e(1-t)});var ap,Bs,Wu,np=m(()=>{"use strict";Jd();pv();mv();ap=ni(.33,1.53,.69,.99),Bs=tp(ap),Wu=ep(Bs)});var Ku,hv=m(()=>{"use strict";np();Ku=e=>e>=1?1:(e*=2)<1?.5*Bs(e):.5*(2-Math.pow(2,-10*(e-1)))});var Yu,Zu,Qu,gv=m(()=>{"use strict";pv();mv();Yu=e=>1-Math.sin(Math.acos(e)),Zu=tp(Yu),Qu=ep(Yu)});var xv,yv,$u,vv=m(()=>{"use strict";Jd();xv=ni(.42,0,1,1),yv=ni(0,0,.58,1),$u=ni(.42,0,.58,1)});var Sv,uT=m(()=>{"use strict";Sv=e=>Array.isArray(e)&&typeof e[0]!="number"});var Ju,bv=m(()=>{"use strict";Ju=e=>Array.isArray(e)&&typeof e[0]=="number"});var cT,VN,rp,fT=m(()=>{"use strict";dv();$d();hv();np();gv();Jd();vv();bv();cT={linear:Xe,easeIn:xv,easeInOut:$u,easeOut:yv,circIn:Yu,circInOut:Qu,circOut:Zu,backIn:Bs,backInOut:Wu,backOut:ap,anticipate:Ku},VN=e=>typeof e=="string",rp=e=>{if(Ju(e)){fa(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,a,n,r]=e;return ni(t,a,n,r)}else if(VN(e))return fa(cT[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),cT[e];return e}});var $=m(()=>{"use strict";fv();Qk();dv();$k();Jk();eT();tT();aT();$d();nT();rT();iT();oT();sT();hv();np();gv();vv();bv();uT();fT()});var ec,dT=m(()=>{"use strict";ec=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"]});function pT(e){let t=new Set,a=new Set,n=!1,r=!1,i=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(u){i.has(u)&&(l.schedule(u),e()),u(o)}let l={schedule:(u,c=!1,f=!1)=>{let p=f&&n?t:a;return c&&i.add(u),p.add(u),u},cancel:u=>{a.delete(u),i.delete(u)},process:u=>{if(o=u,n){r=!0;return}n=!0;let c=t;t=a,a=c,t.forEach(s),t.clear(),n=!1,r&&(r=!1,l.process(u))}};return l}var mT=m(()=>{"use strict"});function ip(e,t){let a=!1,n=!0,r={delta:0,timestamp:0,isProcessing:!1},i=()=>a=!0,o=ec.reduce((y,b)=>(y[b]=pT(i),y),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:p,postRender:h}=o,v=()=>{let y=$t.useManualTiming,b=y?r.timestamp:performance.now();a=!1,y||(r.delta=n?1e3/60:Math.max(Math.min(b-r.timestamp,NN),1)),r.timestamp=b,r.isProcessing=!0,s.process(r),l.process(r),u.process(r),c.process(r),f.process(r),d.process(r),p.process(r),h.process(r),r.isProcessing=!1,a&&t&&(n=!1,e(v))},S=()=>{a=!0,n=!0,r.isProcessing||e(v)};return{schedule:ec.reduce((y,b)=>{let T=o[b];return y[b]=(I,A=!1,_=!1)=>(a||S(),T.schedule(I,A,_)),y},{}),cancel:y=>{for(let b=0;b<ec.length;b++)o[ec[b]].cancel(y)},state:r,steps:o}}var NN,Cv=m(()=>{"use strict";$();dT();mT();NN=40});var te,da,Je,tc,sn=m(()=>{"use strict";$();Cv();({schedule:te,cancel:da,state:Je,steps:tc}=ip(typeof requestAnimationFrame<"u"?requestAnimationFrame:Xe,!0))});function HN(){op=void 0}var op,We,lr=m(()=>{"use strict";$();sn();We={now:()=>(op===void 0&&We.set(Je.isProcessing||$t.useManualTiming?Je.timestamp:performance.now()),op),set:e=>{op=e,queueMicrotask(HN)}}});function wv(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}var hT,sp,qN,Fs,jN,Us=m(()=>{"use strict";hT=e=>t=>typeof t=="string"&&t.startsWith(e),sp=hT("--"),qN=hT("var(--"),Fs=e=>qN(e)?jN.test(e.split("/*")[0].trim()):!1,jN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu});var Sn,ur,ac,ri=m(()=>{"use strict";$();Sn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ur={...Sn,transform:e=>bt(0,1,e)},ac={...Sn,default:1}});var ii,lp=m(()=>{"use strict";ii=e=>Math.round(e*1e5)/1e5});var zs,up=m(()=>{"use strict";zs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu});function gT(e){return e==null}var xT=m(()=>{"use strict"});var yT,vT=m(()=>{"use strict";yT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu});var Vs,cp,fp=m(()=>{"use strict";up();xT();vT();Vs=(e,t)=>a=>!!(typeof a=="string"&&yT.test(a)&&a.startsWith(e)||t&&!gT(a)&&Object.prototype.hasOwnProperty.call(a,t)),cp=(e,t,a)=>n=>{if(typeof n!="string")return n;let[r,i,o,s]=n.match(zs);return{[e]:parseFloat(r),[t]:parseFloat(i),[a]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}}});var GN,Lv,bn,dp=m(()=>{"use strict";$();ri();lp();fp();GN=e=>bt(0,255,e),Lv={...Sn,transform:e=>Math.round(GN(e))},bn={test:Vs("rgb","red"),parse:cp("red","green","blue"),transform:({red:e,green:t,blue:a,alpha:n=1})=>"rgba("+Lv.transform(e)+", "+Lv.transform(t)+", "+Lv.transform(a)+", "+ii(ur.transform(n))+")"}});function XN(e){let t="",a="",n="",r="";return e.length>5?(t=e.substring(1,3),a=e.substring(3,5),n=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),a=e.substring(2,3),n=e.substring(3,4),r=e.substring(4,5),t+=t,a+=a,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(a,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}}var nc,Iv=m(()=>{"use strict";dp();fp();nc={test:Vs("#"),parse:XN,transform:bn.transform}});var rc,Ga,jt,z,_v,kv,pp,Cn=m(()=>{"use strict";rc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ga=rc("deg"),jt=rc("%"),z=rc("px"),_v=rc("vh"),kv=rc("vw"),pp={...jt,parse:e=>jt.parse(e)/100,transform:e=>jt.transform(e*100)}});var oi,Tv=m(()=>{"use strict";ri();Cn();lp();fp();oi={test:Vs("hsl","hue"),parse:cp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:a,alpha:n=1})=>"hsla("+Math.round(e)+", "+jt.transform(ii(t))+", "+jt.transform(ii(a))+", "+ii(ur.transform(n))+")"}});var qe,ic=m(()=>{"use strict";Iv();Tv();dp();qe={test:e=>bn.test(e)||nc.test(e)||oi.test(e),parse:e=>bn.test(e)?bn.parse(e):oi.test(e)?oi.parse(e):nc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?bn.transform(e):oi.transform(e),getAnimatableNone:e=>{let t=qe.parse(e);return t.alpha=0,qe.transform(t)}}});var ST,bT=m(()=>{"use strict";ST=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu});function WN(e){return isNaN(e)&&typeof e=="string"&&(e.match(zs)?.length||0)+(e.match(ST)?.length||0)>0}function si(e){let t=e.toString(),a=[],n={color:[],number:[],var:[]},r=[],i=0,s=t.replace(ZN,l=>(qe.test(l)?(n.color.push(i),r.push(LT),a.push(qe.parse(l))):l.startsWith(YN)?(n.var.push(i),r.push(KN),a.push(l)):(n.number.push(i),r.push(wT),a.push(parseFloat(l))),++i,CT)).split(CT);return{values:a,split:s,indexes:n,types:r}}function QN(e){return si(e).values}function IT({split:e,types:t}){let a=e.length;return n=>{let r="";for(let i=0;i<a;i++)if(r+=e[i],n[i]!==void 0){let o=t[i];o===wT?r+=ii(n[i]):o===LT?r+=qe.transform(n[i]):r+=n[i]}return r}}function $N(e){return IT(si(e))}function t4(e){let t=si(e);return IT(t)(t.values.map((n,r)=>e4(n,t.split[r])))}var wT,LT,KN,YN,CT,ZN,JN,e4,Ct,wn=m(()=>{"use strict";ic();bT();up();lp();wT="number",LT="color",KN="var",YN="var(",CT="${}",ZN=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;JN=e=>typeof e=="number"?0:qe.test(e)?qe.getAnimatableNone(e):e,e4=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:JN(e);Ct={test:WN,parse:QN,createTransformer:$N,getAnimatableNone:t4}});function Av(e,t,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+(t-e)*6*a:a<1/2?t:a<2/3?e+(t-e)*(2/3-a)*6:e}function _T({hue:e,saturation:t,lightness:a,alpha:n}){e/=360,t/=100,a/=100;let r=0,i=0,o=0;if(!t)r=i=o=a;else{let s=a<.5?a*(1+t):a+t-a*t,l=2*a-s;r=Av(l,s,e+1/3),i=Av(l,s,e),o=Av(l,s,e-1/3)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}var kT=m(()=>{"use strict"});function Ns(e,t){return a=>a>0?t:e}var Ev=m(()=>{"use strict"});var ne,Xa=m(()=>{"use strict";ne=(e,t,a)=>e+(t-e)*a});function TT(e){let t=n4(e);if(or(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let a=t.parse(e);return t===oi&&(a=_T(a)),a}var Dv,a4,n4,Mv,AT=m(()=>{"use strict";$();Iv();Tv();kT();dp();Ev();Xa();Dv=(e,t,a)=>{let n=e*e,r=a*(t*t-n)+n;return r<0?0:Math.sqrt(r)},a4=[nc,bn,oi],n4=e=>a4.find(t=>t.test(e));Mv=(e,t)=>{let a=TT(e),n=TT(t);if(!a||!n)return Ns(e,t);let r={...a};return i=>(r.red=Dv(a.red,n.red,i),r.green=Dv(a.green,n.green,i),r.blue=Dv(a.blue,n.blue,i),r.alpha=ne(a.alpha,n.alpha,i),bn.transform(r))}});function ET(e,t){return mp.has(e)?a=>a<=0?e:t:a=>a>=1?t:e}var mp,DT=m(()=>{"use strict";mp=new Set(["none","hidden"])});function r4(e,t){return a=>ne(e,t,a)}function hp(e){return typeof e=="number"?r4:typeof e=="string"?Fs(e)?Ns:qe.test(e)?Mv:s4:Array.isArray(e)?MT:typeof e=="object"?qe.test(e)?Mv:i4:Ns}function MT(e,t){let a=[...e],n=a.length,r=e.map((i,o)=>hp(i)(i,t[o]));return i=>{for(let o=0;o<n;o++)a[o]=r[o](i);return a}}function i4(e,t){let a={...e,...t},n={};for(let r in a)e[r]!==void 0&&t[r]!==void 0&&(n[r]=hp(e[r])(e[r],t[r]));return r=>{for(let i in n)a[i]=n[i](r);return a}}function o4(e,t){let a=[],n={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){let i=t.types[r],o=e.indexes[i][n[i]],s=e.values[o]??0;a[r]=s,n[i]++}return a}var s4,RT=m(()=>{"use strict";$();Us();ic();wn();AT();Ev();Xa();DT();s4=(e,t)=>{let a=Ct.createTransformer(t),n=si(e),r=si(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?mp.has(e)&&!r.values.length||mp.has(t)&&!n.values.length?ET(e,t):on(MT(o4(n,r),r.values),a):(or(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ns(e,t))}});function gp(e,t,a){return typeof e=="number"&&typeof t=="number"&&typeof a=="number"?ne(e,t,a):hp(e)(e,t)}var Rv=m(()=>{"use strict";RT();Xa()});var PT,OT=m(()=>{"use strict";lr();sn();PT=e=>{let t=({timestamp:a})=>e(a);return{start:(a=!0)=>te.update(t,a),stop:()=>da(t),now:()=>Je.isProcessing?Je.timestamp:We.now()}}});var xp,Pv=m(()=>{"use strict";xp=(e,t,a=10)=>{let n="",r=Math.max(Math.round(t/a),2);for(let i=0;i<r;i++)n+=Math.round(e(i/(r-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`}});function Hs(e){let t=0,a=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=a,n=e.next(t);return t>=2e4?1/0:t}var yp=m(()=>{"use strict"});function BT(e,t=100,a){let n=a({...e,keyframes:[0,t]}),r=Math.min(Hs(n),2e4);return{type:"keyframes",ease:i=>n.next(r*i).value/t,duration:At(r)}}var FT=m(()=>{"use strict";$();yp()});function Fv(e,t){return e*Math.sqrt(1-t*t)}function u4(e,t,a){let n=a;for(let r=1;r<l4;r++)n=n-e(n)/t(n);return n}function c4({duration:e=Ke.duration,bounce:t=Ke.bounce,velocity:a=Ke.velocity,mass:n=Ke.mass}){let r,i;or(e<=it(Ke.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=bt(Ke.minDamping,Ke.maxDamping,o),e=bt(Ke.minDuration,Ke.maxDuration,At(e)),o<1?(r=u=>{let c=u*o,f=c*e,d=c-a,p=Fv(u,o),h=Math.exp(-f);return Bv-d/p*h},i=u=>{let f=u*o*e,d=f*a+a,p=Math.pow(o,2)*Math.pow(u,2)*e,h=Math.exp(-f),v=Fv(Math.pow(u,2),o);return(-r(u)+Bv>0?-1:1)*((d-p)*h)/v}):(r=u=>{let c=Math.exp(-u*e),f=(u-a)*e+1;return-Bv+c*f},i=u=>{let c=Math.exp(-u*e),f=(a-u)*(e*e);return c*f});let s=5/e,l=u4(r,i,s);if(e=it(e),isNaN(l))return{stiffness:Ke.stiffness,damping:Ke.damping,duration:e};{let u=Math.pow(l,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}function UT(e,t){return t.some(a=>e[a]!==void 0)}function p4(e){let t={velocity:Ke.velocity,stiffness:Ke.stiffness,damping:Ke.damping,mass:Ke.mass,isResolvedFromDuration:!1,...e};if(!UT(e,d4)&&UT(e,f4))if(t.velocity=0,e.visualDuration){let a=e.visualDuration,n=2*Math.PI/(a*1.2),r=n*n,i=2*bt(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:Ke.mass,stiffness:r,damping:i}}else{let a=c4({...e,velocity:0});t={...t,...a,mass:Ke.mass},t.isResolvedFromDuration=!0}return t}function qs(e=Ke.visualDuration,t=Ke.bounce){let a=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:r}=a,i=a.keyframes[0],o=a.keyframes[a.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:p}=p4({...a,velocity:-At(a.velocity||0)}),h=d||0,v=u/(2*Math.sqrt(l*c)),S=o-i,g=At(Math.sqrt(l/c)),x=Math.abs(S)<5;n||(n=x?Ke.restSpeed.granular:Ke.restSpeed.default),r||(r=x?Ke.restDelta.granular:Ke.restDelta.default);let y,b,T,I,A,_;if(v<1)T=Fv(g,v),I=(h+v*g*S)/T,y=C=>{let U=Math.exp(-v*g*C);return o-U*(I*Math.sin(T*C)+S*Math.cos(T*C))},A=v*g*I+S*T,_=v*g*S-I*T,b=C=>Math.exp(-v*g*C)*(A*Math.sin(T*C)+_*Math.cos(T*C));else if(v===1){y=U=>o-Math.exp(-g*U)*(S+(h+g*S)*U);let C=h+g*S;b=U=>Math.exp(-g*U)*(g*C*U-h)}else{let C=g*Math.sqrt(v*v-1);y=q=>{let V=Math.exp(-v*g*q),ue=Math.min(C*q,300);return o-V*((h+v*g*S)*Math.sinh(ue)+C*S*Math.cosh(ue))/C};let U=(h+v*g*S)/C,N=v*g*U-S*C,B=v*g*S-U*C;b=q=>{let V=Math.exp(-v*g*q),ue=Math.min(C*q,300);return V*(N*Math.sinh(ue)+B*Math.cosh(ue))}}let M={calculatedDuration:p&&f||null,velocity:C=>it(b(C)),next:C=>{if(!p&&v<1){let N=Math.exp(-v*g*C),B=Math.sin(T*C),q=Math.cos(T*C),V=o-N*(I*B+S*q),ue=it(N*(A*B+_*q));return s.done=Math.abs(ue)<=n&&Math.abs(o-V)<=r,s.value=s.done?o:V,s}let U=y(C);if(p)s.done=C>=f;else{let N=it(b(C));s.done=Math.abs(N)<=n&&Math.abs(o-U)<=r}return s.value=s.done?o:U,s},toString:()=>{let C=Math.min(Hs(M),2e4),U=xp(N=>M.next(C*N).value,C,30);return C+"ms "+U},toTransition:()=>{}};return M}var Ke,l4,Bv,f4,d4,Uv=m(()=>{"use strict";$();Pv();yp();FT();Ke={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};l4=12;Bv=.001;f4=["duration","bounce"],d4=["stiffness","damping","mass"];qs.applyToOptions=e=>{let t=BT(e,100,qs);return e.ease=t.ease,e.duration=it(t.duration),e.type="keyframes",e}});function vp(e,t,a){let n=Math.max(t-m4,0);return Xu(a-e(n),t-n)}var m4,zv=m(()=>{"use strict";$();m4=5});function oc({keyframes:e,velocity:t=0,power:a=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:s,max:l,restDelta:u=.5,restSpeed:c}){let f=e[0],d={done:!1,value:f},p=_=>s!==void 0&&_<s||l!==void 0&&_>l,h=_=>s===void 0?l:l===void 0||Math.abs(s-_)<Math.abs(l-_)?s:l,v=a*t,S=f+v,g=o===void 0?S:o(S);g!==S&&(v=g-f);let x=_=>-v*Math.exp(-_/n),y=_=>g+x(_),b=_=>{let M=x(_),C=y(_);d.done=Math.abs(M)<=u,d.value=d.done?g:C},T,I,A=_=>{p(d.value)&&(T=_,I=qs({keyframes:[d.value,h(d.value)],velocity:vp(y,_,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:c}))};return A(0),{calculatedDuration:null,next:_=>{let M=!1;return!I&&T===void 0&&(M=!0,b(_),A(_)),T!==void 0&&_>=T?I.next(_-T):(!M&&b(_),d)}}}var Vv=m(()=>{"use strict";Uv();zv()});function h4(e,t,a){let n=[],r=a||$t.mix||gp,i=e.length-1;for(let o=0;o<i;o++){let s=r(e[o],e[o+1]);if(t){let l=Array.isArray(t)?t[o]||Xe:t;s=on(l,s)}n.push(s)}return n}function zT(e,t,{clamp:a=!0,ease:n,mixer:r}={}){let i=e.length;if(fa(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=h4(t,n,r),l=s.length,u=c=>{if(o&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);let d=vn(e[f],e[f+1],c);return s[f](d)};return a?c=>u(bt(e[0],e[i-1],c)):u}var VT=m(()=>{"use strict";$();Rv()});function NT(e,t){let a=e[e.length-1];for(let n=1;n<=t;n++){let r=vn(0,t,n);e.push(ne(a,1,r))}}var HT=m(()=>{"use strict";$();Xa()});function qT(e){let t=[0];return NT(t,e.length-1),t}var jT=m(()=>{"use strict";HT()});function GT(e,t){return e.map(a=>a*t)}var XT=m(()=>{"use strict"});function g4(e,t){return e.map(()=>t||$u).splice(0,e.length-1)}function Yi({duration:e=300,keyframes:t,times:a,ease:n="easeInOut"}){let r=Sv(n)?n.map(rp):rp(n),i={done:!1,value:t[0]},o=GT(a&&a.length===t.length?a:qT(t),e),s=zT(o,t,{ease:Array.isArray(r)?r:g4(t,r)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}var Nv=m(()=>{"use strict";$();VT();jT();XT()});function li(e,{repeat:t,repeatType:a="loop"},n,r=1){let i=e.filter(x4),s=r<0||t&&a!=="loop"&&t%2===1?0:i.length-1;return!s||n===void 0?i[s]:n}var x4,sc=m(()=>{"use strict";x4=e=>e!==null});function Sp(e){typeof e.type=="string"&&(e.type=y4[e.type])}var y4,Hv=m(()=>{"use strict";Vv();Nv();Uv();y4={decay:oc,inertia:oc,tween:Yi,keyframes:Yi,spring:qs}});var ui,bp=m(()=>{"use strict";ui=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,a){return this.finished.then(t,a)}}});var v4,cr,Cp=m(()=>{"use strict";$();lr();Rv();OT();Vv();Nv();yp();zv();sc();Hv();bp();v4=e=>e/100,cr=class extends ui{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:a}=this.options;a&&a.updatedAt!==We.now()&&this.tick(We.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;Sp(t);let{type:a=Yi,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=t,{keyframes:s}=t,l=a||Yi;l!==Yi&&typeof s[0]!="number"&&(this.mixKeyframes=on(v4,gp(s[0],s[1])),s=[0,100]);let u=l({...t,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Hs(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=u}updateTime(t){let a=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=a}tick(t,a=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);let{delay:u=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:p,type:h,onUpdate:v,finalKeyframe:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),a?this.currentTime=t:this.updateTime(t);let g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,b=n;if(f){let _=Math.min(this.currentTime,r)/s,M=Math.floor(_),C=_%1;!C&&_>=1&&(C=1),C===1&&M--,M=Math.min(M,f+1),M%2&&(d==="reverse"?(C=1-C,p&&(C-=p/s)):d==="mirror"&&(b=o)),y=bt(0,1,C)*s}let T;x?(this.delayState.value=c[0],T=this.delayState):T=b.next(y),i&&!x&&(T.value=i(T.value));let{done:I}=T;!x&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return A&&h!==oc&&(T.value=li(c,this.options,S,this.speed)),v&&v(T.value),A&&this.finish(),T}then(t,a){return this.finished.then(t,a)}get duration(){return At(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+At(t)}get time(){return At(this.currentTime)}set time(t){t=it(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){let t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let a=this.generator.next(t).value;return vp(n=>this.generator.next(n).value,t,a)}get speed(){return this.playbackSpeed}set speed(t){let a=this.playbackSpeed!==t;a&&this.driver&&this.updateTime(We.now()),this.playbackSpeed=t,a&&this.driver&&(this.time=At(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=PT,startTime:a}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),this.options.onPlay?.();let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=a??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(We.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}});function WT(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var KT=m(()=>{"use strict"});function wp(e){return e.includes("scale")?1:0}function Lp(e,t){if(!e||e==="none")return wp(t);let a=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,r;if(a)n=b4,r=a;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=S4,r=s}if(!r)return wp(t);let i=n[t],o=r[1].split(",").map(C4);return typeof i=="function"?i(o):o[i]}function C4(e){return parseFloat(e.trim())}var Zi,qv,S4,jv,YT,ZT,QT,b4,$T,Gv=m(()=>{"use strict";Zi=e=>e*180/Math.PI,qv=e=>{let t=Zi(Math.atan2(e[1],e[0]));return jv(t)},S4={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qv,rotateZ:qv,skewX:e=>Zi(Math.atan(e[1])),skewY:e=>Zi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},jv=e=>(e=e%360,e<0&&(e+=360),e),YT=qv,ZT=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),QT=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),b4={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ZT,scaleY:QT,scale:e=>(ZT(e)+QT(e))/2,rotateX:e=>jv(Zi(Math.atan2(e[6],e[5]))),rotateY:e=>jv(Zi(Math.atan2(-e[2],e[0]))),rotateZ:YT,rotate:YT,skewX:e=>Zi(Math.atan(e[4])),skewY:e=>Zi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};$T=(e,t)=>{let{transform:a="none"}=getComputedStyle(e);return Lp(a,t)}});var Ln,Wa,ln=m(()=>{"use strict";Ln=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wa=new Set([...Ln,"pathRotation"])});function JT(e){let t=[];return L4.forEach(a=>{let n=e.getValue(a);n!==void 0&&(t.push([a,n.get()]),n.set(a.startsWith("scale")?1:0))}),t}var Xv,w4,L4,fr,Wv=m(()=>{"use strict";Gv();ln();ri();Cn();Xv=e=>e===Sn||e===z,w4=new Set(["x","y","z"]),L4=Ln.filter(e=>!w4.has(e));fr={width:({x:e},{paddingLeft:t="0",paddingRight:a="0",boxSizing:n})=>{let r=e.max-e.min;return n==="border-box"?r:r-parseFloat(t)-parseFloat(a)},height:({y:e},{paddingTop:t="0",paddingBottom:a="0",boxSizing:n})=>{let r=e.max-e.min;return n==="border-box"?r:r-parseFloat(t)-parseFloat(a)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Lp(t,"x"),y:(e,{transform:t})=>Lp(t,"y")};fr.translateX=fr.x;fr.translateY=fr.y});function eA(){if(Yv){let e=Array.from(Qi).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),a=new Map;t.forEach(n=>{let r=JT(n);r.length&&(a.set(n,r),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let r=a.get(n);r&&r.forEach(([i,o])=>{n.getValue(i)?.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Yv=!1,Kv=!1,Qi.forEach(e=>e.complete(Zv)),Qi.clear()}function tA(){Qi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yv=!0)})}function aA(){Zv=!0,tA(),eA(),Zv=!1}var Qi,Kv,Yv,Zv,ci,Ip=m(()=>{"use strict";KT();Wv();sn();Qi=new Set,Kv=!1,Yv=!1,Zv=!1;ci=class{constructor(t,a,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=a,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Qi.add(this),Kv||(Kv=!0,te.read(tA),te.resolveKeyframes(eA))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:a,element:n,motionValue:r}=this;if(t[0]===null){let i=r?.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&a){let s=n.readValue(a,o);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=o),r&&i===void 0&&r.set(t[0])}WT(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Qi.delete(this)}cancel(){this.state==="scheduled"&&(Qi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}});var nA,rA=m(()=>{"use strict";nA=e=>e.startsWith("--")});function _p(e,t,a){nA(t)?e.style.setProperty(t,a):e.style[t]=a}var Qv=m(()=>{"use strict";rA()});var iA,oA=m(()=>{"use strict";iA={}});function kp(e,t){let a=Gu(e);return()=>iA[t]??a()}var $v=m(()=>{"use strict";$();oA()});var sA,lA=m(()=>{"use strict";$v();sA=kp(()=>window.ScrollTimeline!==void 0,"scrollTimeline")});var Tp,Jv=m(()=>{"use strict";$v();Tp=kp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing")});var $i,eS=m(()=>{"use strict";$i=([e,t,a,n])=>`cubic-bezier(${e}, ${t}, ${a}, ${n})`});var tS,uA=m(()=>{"use strict";eS();tS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$i([0,.65,.55,1]),circOut:$i([.55,0,1,.45]),backIn:$i([.31,.01,.66,-.59]),backOut:$i([.33,1.53,.69,.99])}});function aS(e,t){if(e)return typeof e=="function"?Tp()?xp(e,t):"ease-out":Ju(e)?$i(e):Array.isArray(e)?e.map(a=>aS(a,t)||tS.easeOut):tS[e]}var cA=m(()=>{"use strict";$();Jv();Pv();eS();uA()});function fA(e,t,a,{delay:n=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:s="easeOut",times:l}={},u=void 0){let c={[t]:a};l&&(c.offset=l);let f=aS(s,r);Array.isArray(f)&&(c.easing=f);let d={delay:n,duration:r,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),e.animate(c,d)}var dA=m(()=>{"use strict";cA()});function Ap(e){return typeof e=="function"&&"applyToOptions"in e}var nS=m(()=>{"use strict"});function pA({type:e,...t}){return Ap(e)&&Tp()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var mA=m(()=>{"use strict";Jv();nS()});var js,rS=m(()=>{"use strict";$();Qv();lA();sc();bp();dA();mA();js=class extends ui{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:a,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,fa(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=pA(t);this.animation=fA(a,n,r,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let c=li(r,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(c),_p(a,n,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return At(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+At(t)}get time(){return At(Number(this.animation.currentTime)||0)}set time(t){let a=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=it(t),a&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:a,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&sA()?(this.animation.timeline=t,a&&(this.animation.rangeStart=a),n&&(this.animation.rangeEnd=n),Xe):r(this)}}});function I4(e){return e in hA}function gA(e){typeof e.ease=="string"&&I4(e.ease)&&(e.ease=hA[e.ease])}var hA,xA=m(()=>{"use strict";$();hA={anticipate:Ku,backInOut:Wu,circInOut:Qu}});var iS,Ep,yA=m(()=>{"use strict";$();lr();Qv();Cp();rS();Hv();xA();iS=10,Ep=class extends js{constructor(t){gA(t),Sp(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:a,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!a)return;if(t!==void 0){a.set(t);return}let s=new cr({...o,autoplay:!1}),l=Math.max(iS,We.now()-this.startTime),u=bt(0,iS,l-iS),c=s.sample(l).value,{name:f}=this.options;i&&f&&_p(i,f,c),a.setWithVelocity(s.sample(Math.max(0,l-u)).value,c,u),s.stop()}}});var oS,vA=m(()=>{"use strict";wn();oS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ct.test(e)||e==="0")&&!e.startsWith("url("))});function _4(e){let t=e[0];if(e.length===1)return!0;for(let a=0;a<e.length;a++)if(e[a]!==t)return!0}function SA(e,t,a,n){let r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;let i=e[e.length-1],o=oS(r,t),s=oS(i,t);return or(o===s,`You are trying to animate ${t} from "${r}" to "${i}". "${o?i:r}" is not an animatable value.`,"value-not-animatable"),!o||!s?!1:_4(e)||(a==="spring"||Ap(a))&&n}var bA=m(()=>{"use strict";$();nS();vA()});function lc(e){e.duration=0,e.type="keyframes"}var sS=m(()=>{"use strict"});var Dp,lS=m(()=>{"use strict";Dp=new Set(["opacity","clipPath","filter","transform","backgroundColor"])});function CA(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&k4.test(e[t]))return!0;return!1}var k4,wA=m(()=>{"use strict";k4=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/});function LA(e){let{motionValue:t,name:a,repeatDelay:n,repeatType:r,damping:i,type:o,keyframes:s}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;let{onUpdate:u,transformTemplate:c}=t.owner.getProps();return A4()&&a&&(Dp.has(a)||T4.has(a)&&CA(s))&&(a!=="transform"||!c)&&!u&&!n&&r!=="mirror"&&i!==0&&o!=="inertia"}var T4,A4,IA=m(()=>{"use strict";$();lS();wA();T4=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),A4=Gu(()=>Object.hasOwnProperty.call(Element.prototype,"animate"))});var E4,Mp,_A=m(()=>{"use strict";$();lr();Cp();sc();Ip();yA();bA();sS();bp();IA();E4=40,Mp=class extends ui{constructor({autoplay:t=!0,delay:a=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:s,name:l,motionValue:u,element:c,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=We.now();let d={autoplay:t,delay:a,type:n,repeat:r,repeatDelay:i,repeatType:o,name:l,motionValue:u,element:c,...f},p=c?.KeyframeResolver||ci;this.keyframeResolver=new p(s,(h,v,S)=>this.onKeyframesResolved(h,v,d,!S),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,a,n,r){this.keyframeResolver=void 0;let{name:i,type:o,velocity:s,delay:l,isHandoff:u,onUpdate:c}=n;this.resolvedAt=We.now();let f=!0;SA(t,i,o,s)||(f=!1,($t.instantAnimations||!l)&&c?.(li(t,n,a)),t[0]=t[t.length-1],lc(n),n.repeat=0);let p={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>E4?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:a,...n,keyframes:t},h=f&&!u&&LA(p),v=p.motionValue?.owner?.current,S;if(h)try{S=new Ep({...p,element:v})}catch{S=new cr(p)}else S=new cr(p);S.finished.then(()=>{this.notifyFinished()}).catch(Xe),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}get finished(){return this._animation?this.animation.finished:this._finished}then(t,a){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),aA()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}});function Rp(e,t,a,n=0,r=1){let i=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,s=(o-1)*n;return typeof a=="function"?a(i,o):r===1?i*n:s-i*n}var uS=m(()=>{"use strict"});function un(e,t){return new cS(e,t)}var kA,D4,TA,cS,Gs=m(()=>{"use strict";$();lr();sn();kA=30,D4=e=>!isNaN(parseFloat(e)),TA={current:void 0},cS=class{constructor(t,a={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{let r=We.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=a.owner}setCurrent(t){this.current=t,this.updatedAt=We.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=D4(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,a){this.events[t]||(this.events[t]=new sr);let n=this.events[t].add(a);return t==="change"?()=>{n(),te.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,a){this.passiveEffect=t,this.stopPassiveEffect=a}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,a,n){this.set(a),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,a=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,a&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return TA.current&&TA.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=We.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>kA)return 0;let a=Math.min(this.updatedAt-this.prevUpdatedAt,kA);return Xu(parseFloat(this.current)-parseFloat(this.prevFrameValue),a)}start(t){return this.stop(),new Promise(a=>{this.hasAnimated=!0,this.animation=t(a),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}});function Pp(e,t){if(e?.inherit&&t){let{inherit:a,...n}=e;return{...t,...n}}return e}var fS=m(()=>{"use strict"});function Xs(e,t){let a=e?.[t]??e?.default??e;return a!==e?Pp(a,e):a}var Op=m(()=>{"use strict";fS()});var M4,R4,P4,O4,AA,EA=m(()=>{"use strict";ln();M4={type:"spring",stiffness:500,damping:25,restSpeed:10},R4=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),P4={type:"keyframes",duration:.8},O4={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},AA=(e,{keyframes:t})=>t.length>2?P4:Wa.has(e)?e.startsWith("scale")?R4(t[1]):M4:O4});function DA(e){for(let t in e)if(!B4.has(t))return!0;return!1}var B4,MA=m(()=>{"use strict";B4=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"])});var Ji,Bp=m(()=>{"use strict";$();_A();Cp();Op();sS();EA();sc();MA();sn();Ji=(e,t,a,n={},r,i)=>o=>{let s=Xs(n,e)||{},l=s.delay||n.delay||0,{elapsed:u=0}=n;u=u-it(l);let c={keyframes:Array.isArray(a)?a:[null,a],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:d=>{t.set(d),s.onUpdate&&s.onUpdate(d)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:r};DA(s)||Object.assign(c,AA(e,c)),c.duration&&(c.duration=it(c.duration)),c.repeatDelay&&(c.repeatDelay=it(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(lc(c),c.delay===0&&(f=!0)),($t.instantAnimations||$t.skipAnimations||r?.shouldSkipAnimations||s.skipAnimations)&&(f=!0,lc(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,f&&!i&&t.get()!==void 0){let d=li(c.keyframes,s);if(d!==void 0){te.update(()=>{c.onUpdate(d),c.onComplete()});return}}return s.isSync?new cr(c):new Mp(c)}});function U4(e){let t=F4.exec(e);if(!t)return[,];let[,a,n,r]=t;return[`--${a??n}`,r]}function dS(e,t,a=1){fa(a<=z4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,r]=U4(e);if(!n)return;let i=window.getComputedStyle(t).getPropertyValue(n);if(i){let o=i.trim();return Hu(o)?parseFloat(o):o}return Fs(r)?dS(r,t,a+1):r}var F4,z4,RA=m(()=>{"use strict";$();Us();F4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;z4=4});function PA(e){let t=[{},{}];return e?.values.forEach((a,n)=>{t[0][n]=a.get(),t[1][n]=a.getVelocity()}),t}function eo(e,t,a,n){if(typeof t=="function"){let[r,i]=PA(n);t=t(a!==void 0?a:e.custom,r,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[r,i]=PA(n);t=t(a!==void 0?a:e.custom,r,i)}return t}var Fp=m(()=>{"use strict"});function ka(e,t,a){let n=e.getProps();return eo(n,t,a!==void 0?a:n.custom,e)}var Ws=m(()=>{"use strict";Fp()});var Up,pS=m(()=>{"use strict";ln();Up=new Set(["width","height","top","left","right","bottom",...Ln])});var uc,mS=m(()=>{"use strict";uc=e=>Array.isArray(e)});function V4(e,t,a){e.hasValue(t)?e.getValue(t).set(a):e.addValue(t,un(a))}function N4(e){return uc(e)?e[e.length-1]||0:e}function OA(e,t){let a=ka(e,t),{transitionEnd:n={},transition:r={},...i}=a||{};i={...i,...n};for(let o in i){let s=N4(i[o]);V4(e,o,s)}}var BA=m(()=>{"use strict";Gs();Ws();mS()});var Ce,In=m(()=>{"use strict";Ce=e=>!!(e&&e.getVelocity)});function FA(e){return!!(Ce(e)&&e.add)}var UA=m(()=>{"use strict";In()});function Ks(e,t){let a=e.getValue("willChange");if(FA(a))return a.add(t);if(!a&&$t.WillChange){let n=new $t.WillChange("auto");e.addValue("willChange",n),n.add(t)}}var hS=m(()=>{"use strict";$();UA()});function Ys(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var zp=m(()=>{"use strict"});var zA,cc,gS=m(()=>{"use strict";zp();zA="framerAppearId",cc="data-"+Ys(zA)});function Vp(e){return e.props[cc]}var xS=m(()=>{"use strict";gS()});function H4({protectedKeys:e,needsAnimating:t},a){let n=e.hasOwnProperty(a)&&t[a]!==!0;return t[a]=!1,n}function Np(e,t,{delay:a=0,transitionOverride:n,type:r}={}){let{transition:i,transitionEnd:o,...s}=t,l=e.getDefaultTransition();i=i?Pp(i,l):l;let u=i?.reduceMotion,c=i?.skipAnimations;n&&(i=n);let f=[],d=r&&e.animationState&&e.animationState.getState()[r],p=i?.path;p&&p.animateVisualElement(e,s,i,a,f);for(let h in s){let v=e.getValue(h,e.latestValues[h]??null),S=s[h];if(S===void 0||d&&H4(d,h))continue;let g={delay:a,...Xs(i||{},h)};c&&(g.skipAnimations=!0);let x=v.get();if(x!==void 0&&!v.isAnimating()&&!Array.isArray(S)&&S===x&&!g.velocity){te.update(()=>v.set(S));continue}let y=!1;if(window.MotionHandoffAnimation){let I=Vp(e);if(I){let A=window.MotionHandoffAnimation(I,h,te);A!==null&&(g.startTime=A,y=!0)}}Ks(e,h);let b=u??e.shouldReduceMotion;v.start(Ji(h,v,S,b&&Up.has(h)?{type:!1}:g,e,y));let T=v.animation;T&&f.push(T)}if(o){let h=()=>te.update(()=>{o&&OA(e,o)});f.length?Promise.all(f).then(h):h()}return f}var yS=m(()=>{"use strict";Op();fS();pS();BA();hS();xS();Bp();sn()});function Hp(e,t,a={}){let n=ka(e,t,a.type==="exit"?e.presenceContext?.custom:void 0),{transition:r=e.getDefaultTransition()||{}}=n||{};a.transitionOverride&&(r=a.transitionOverride);let i=n?()=>Promise.all(Np(e,n,a)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=r;return q4(e,t,l,u,c,f,a)}:()=>Promise.resolve(),{when:s}=r;if(s){let[l,u]=s==="beforeChildren"?[i,o]:[o,i];return l().then(()=>u())}else return Promise.all([i(),o(a.delay)])}function q4(e,t,a=0,n=0,r=0,i=1,o){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(Hp(l,t,{...o,delay:a+(typeof n=="function"?0:n)+Rp(e.variantChildren,l,n,r,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}var VA=m(()=>{"use strict";Ws();uS();yS()});function NA(e,t,a={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let r=t.map(i=>Hp(e,i,a));n=Promise.all(r)}else if(typeof t=="string")n=Hp(e,t,a);else{let r=typeof t=="function"?ka(e,t,a.custom):t;n=Promise.all(Np(e,r,a))}return n.then(()=>{e.notify("AnimationComplete",t)})}var HA=m(()=>{"use strict";Ws();yS();VA()});var qA,jA=m(()=>{"use strict";qA={test:e=>e==="auto",parse:e=>e}});var qp,vS=m(()=>{"use strict";qp=e=>t=>t.test(e)});var SS,bS,CS=m(()=>{"use strict";jA();ri();Cn();vS();SS=[Sn,z,jt,Ga,kv,_v,qA],bS=e=>SS.find(qp(e))});function GA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ju(e):!0}var XA=m(()=>{"use strict";$()});function G4(e){let[t,a]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=a.match(zs)||[];if(!n)return e;let r=a.replace(n,""),i=j4.has(t)?1:0;return n!==a&&(i*=100),t+"("+i+r+")"}var j4,X4,fc,wS=m(()=>{"use strict";wn();up();j4=new Set(["brightness","contrast","saturate","opacity"]);X4=/\b([a-z-]*)\(.*?\)/gu,fc={...Ct,getAnimatableNone:e=>{let t=e.match(X4);return t?t.map(G4).join(" "):e}}});var dc,LS=m(()=>{"use strict";wn();dc={...Ct,getAnimatableNone:e=>{let t=Ct.parse(e);return Ct.createTransformer(e)(t.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}}});var IS,WA=m(()=>{"use strict";ri();IS={...Sn,transform:Math.round}});var KA,YA=m(()=>{"use strict";ri();Cn();KA={rotate:Ga,pathRotation:Ga,rotateX:Ga,rotateY:Ga,rotateZ:Ga,scale:ac,scaleX:ac,scaleY:ac,scaleZ:ac,skew:Ga,skewX:Ga,skewY:Ga,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:ur,originX:pp,originY:pp,originZ:z}});var to,jp=m(()=>{"use strict";WA();ri();Cn();YA();to={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,top:z,right:z,bottom:z,left:z,inset:z,insetBlock:z,insetBlockStart:z,insetBlockEnd:z,insetInline:z,insetInlineStart:z,insetInlineEnd:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,paddingBlock:z,paddingBlockStart:z,paddingBlockEnd:z,paddingInline:z,paddingInlineStart:z,paddingInlineEnd:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,marginBlock:z,marginBlockStart:z,marginBlockEnd:z,marginInline:z,marginInlineStart:z,marginInlineEnd:z,fontSize:z,backgroundPositionX:z,backgroundPositionY:z,...KA,zIndex:IS,fillOpacity:ur,strokeOpacity:ur,numOctaves:IS}});var W4,Gp,_S=m(()=>{"use strict";ic();wS();LS();jp();W4={...to,color:qe,backgroundColor:qe,outlineColor:qe,fill:qe,stroke:qe,borderColor:qe,borderTopColor:qe,borderRightColor:qe,borderBottomColor:qe,borderLeftColor:qe,filter:fc,WebkitFilter:fc,mask:dc,WebkitMask:dc},Gp=e=>W4[e]});function Xp(e,t){let a=Gp(e);return K4.has(a)||(a=Ct),a.getAnimatableNone?a.getAnimatableNone(t):void 0}var K4,kS=m(()=>{"use strict";wn();wS();LS();_S();K4=new Set([fc,dc])});function ZA(e,t,a){let n=0,r;for(;n<e.length&&!r;){let i=e[n];typeof i=="string"&&!Y4.has(i)&&si(i).values.length&&(r=e[n]),n++}if(r&&a)for(let i of t)e[i]=Xp(a,r)}var Y4,QA=m(()=>{"use strict";wn();kS();Y4=new Set(["auto","none","0"])});var Wp,$A=m(()=>{"use strict";pS();CS();RA();Us();Ip();XA();QA();Wv();Wp=class extends ci{constructor(t,a,n,r,i){super(t,a,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:a,name:n}=this;if(!a||!a.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let f=t[c];if(typeof f=="string"&&(f=f.trim(),Fs(f))){let d=dS(f,a.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Up.has(n)||t.length!==2)return;let[r,i]=t,o=bS(r),s=bS(i),l=wv(r),u=wv(i);if(l!==u&&fr[n]){this.needsMeasurement=!0;return}if(o!==s)if(Xv(o)&&Xv(s))for(let c=0;c<t.length;c++){let f=t[c];typeof f=="string"&&(t[c]=parseFloat(f))}else fr[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:a}=this,n=[];for(let r=0;r<t.length;r++)(t[r]===null||GA(t[r]))&&n.push(r);n.length&&ZA(t,n,a)}measureInitialState(){let{element:t,unresolvedKeyframes:a,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a[0]=this.measuredOrigin;let r=a[a.length-1];r!==void 0&&t.getValue(n,r).jump(r,!1)}measureEndState(){let{element:t,name:a,unresolvedKeyframes:n}=this;if(!t||!t.current)return;let r=t.getValue(a);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,o=n[i];n[i]=fr[a](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}}});var pc,TS=m(()=>{"use strict";pc=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"]});function Kp(e,t,a){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;t&&(n=t.current);let r=a?.[e]??n.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(n=>n!=null)}var AS=m(()=>{"use strict"});var mc,ES=m(()=>{"use strict";mc=(e,t)=>t&&typeof e=="number"?t.transform(e):e});function ao(e){return qu(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var DS=m(()=>{"use strict";$()});var no,Z4,Yp=m(()=>{"use strict";Cv();({schedule:no,cancel:Z4}=ip(queueMicrotask,!1))});function Zp(){return Ka.x||Ka.y}var Ka,Qp=m(()=>{"use strict";Ka={x:!1,y:!1}});function MS(e){return e==="x"||e==="y"?Ka[e]?null:(Ka[e]=!0,()=>{Ka[e]=!1}):Ka.x||Ka.y?null:(Ka.x=Ka.y=!0,()=>{Ka.x=Ka.y=!1})}var JA=m(()=>{"use strict";Qp()});function $p(e,t){let a=Kp(e),n=new AbortController,r={passive:!0,...t,signal:n.signal};return[a,r,()=>n.abort()]}var RS=m(()=>{"use strict";AS()});function Q4(e){return!(e.pointerType==="touch"||Zp())}function PS(e,t,a={}){let[n,r,i]=$p(e,a);return n.forEach(o=>{let s=!1,l=!1,u,c=()=>{o.removeEventListener("pointerleave",h)},f=S=>{u&&(u(S),u=void 0),c()},d=S=>{s=!1,window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),l&&(l=!1,f(S))},p=()=>{s=!0,window.addEventListener("pointerup",d,r),window.addEventListener("pointercancel",d,r)},h=S=>{if(S.pointerType!=="touch"){if(s){l=!0;return}f(S)}},v=S=>{if(!Q4(S))return;l=!1;let g=t(o,S);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",h,r))};o.addEventListener("pointerenter",v,r),o.addEventListener("pointerdown",p,r)}),i}var eE=m(()=>{"use strict";Qp();RS()});var OS,tE=m(()=>{"use strict";OS=(e,t)=>t?e===t?!0:OS(e,t.parentElement):!1});var ro,BS=m(()=>{"use strict";ro=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1});function FS(e){return $4.has(e.tagName)||e.isContentEditable===!0}function US(e){return J4.has(e.tagName)||e.isContentEditable===!0}var $4,J4,zS=m(()=>{"use strict";$4=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);J4=new Set(["INPUT","SELECT","TEXTAREA"])});var Zs,VS=m(()=>{"use strict";Zs=new WeakSet});function aE(e){return t=>{t.key==="Enter"&&e(t)}}function NS(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var nE,rE=m(()=>{"use strict";VS();nE=(e,t)=>{let a=e.currentTarget;if(!a)return;let n=aE(()=>{if(Zs.has(a))return;NS(a,"down");let r=aE(()=>{NS(a,"up")}),i=()=>NS(a,"cancel");a.addEventListener("keyup",r,t),a.addEventListener("blur",i,t)});a.addEventListener("keydown",n,t),a.addEventListener("blur",()=>a.removeEventListener("keydown",n),t)}});function iE(e){return ro(e)&&!Zp()}function HS(e,t,a={}){let[n,r,i]=$p(e,a),o=s=>{let l=s.currentTarget;if(!iE(s)||oE.has(s))return;Zs.add(l),a.stopPropagation&&oE.add(s);let u=t(l,s),c={...r,capture:!0},f=(h,v)=>{window.removeEventListener("pointerup",d,c),window.removeEventListener("pointercancel",p,c),Zs.has(l)&&Zs.delete(l),iE(h)&&typeof u=="function"&&u(h,{success:v})},d=h=>{f(h,l===window||l===document||a.useGlobalTarget||OS(l,h.target))},p=h=>{f(h,!1)};window.addEventListener("pointerup",d,c),window.addEventListener("pointercancel",p,c)};return n.forEach(s=>{(a.useGlobalTarget?window:s).addEventListener("pointerdown",o,r),ao(s)&&(s.addEventListener("focus",u=>nE(u,r)),!FS(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}var oE,sE=m(()=>{"use strict";DS();Qp();tE();BS();RS();zS();rE();VS();oE=new WeakSet});function Qs(e){return qu(e)&&"ownerSVGElement"in e}var Jp=m(()=>{"use strict";$()});function aH({target:e,borderBoxSize:t}){em.get(e)?.forEach(a=>{a(e,{get width(){return eH(e,t)},get height(){return tH(e,t)}})})}function nH(e){e.forEach(aH)}function rH(){typeof ResizeObserver>"u"||(tm=new ResizeObserver(nH))}function uE(e,t){tm||rH();let a=Kp(e);return a.forEach(n=>{let r=em.get(n);r||(r=new Set,em.set(n,r)),r.add(t),tm?.observe(n)}),()=>{a.forEach(n=>{let r=em.get(n);r?.delete(t),r?.size||tm?.unobserve(n)})}}var em,tm,lE,eH,tH,cE=m(()=>{"use strict";Jp();AS();em=new WeakMap,lE=(e,t,a)=>(n,r)=>r&&r[0]?r[0][e+"Size"]:Qs(n)&&"getBBox"in n?n.getBBox()[t]:n[a],eH=lE("inline","width","offsetWidth"),tH=lE("block","height","offsetHeight")});function iH(){$s=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};am.forEach(t=>t(e))},window.addEventListener("resize",$s)}function fE(e){return am.add(e),$s||iH(),()=>{am.delete(e),!am.size&&typeof $s=="function"&&(window.removeEventListener("resize",$s),$s=void 0)}}var am,$s,dE=m(()=>{"use strict";am=new Set});function nm(e,t){return typeof e=="function"?fE(e):uE(e,t)}var pE=m(()=>{"use strict";cE();dE()});var io,mE=m(()=>{"use strict";io={value:null,addProjectionMetrics:null}});function hE(e){return Qs(e)&&e.tagName==="svg"}var gE=m(()=>{"use strict";Jp()});var oH,xE,yE=m(()=>{"use strict";ic();wn();CS();vS();oH=[...SS,qe,Ct],xE=e=>oH.find(qp(e))});var qS,fi,jS,je,hc=m(()=>{"use strict";qS=()=>({translate:0,scale:1,origin:0,originPoint:0}),fi=()=>({x:qS(),y:qS()}),jS=()=>({min:0,max:0}),je=()=>({x:jS(),y:jS()})});var vE,SE=m(()=>{"use strict";vE=new WeakMap});function dr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}var rm=m(()=>{"use strict"});function _n(e){return typeof e=="string"||Array.isArray(e)}var gc=m(()=>{"use strict"});var im,xc,om=m(()=>{"use strict";im=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xc=["initial",...im]});function di(e){return dr(e.animate)||xc.some(t=>_n(e[t]))}function yc(e){return!!(di(e)||e.variants)}var GS=m(()=>{"use strict";rm();gc();om()});function bE(e,t,a){for(let n in t){let r=t[n],i=a[n];if(Ce(r))e.addValue(n,r);else if(Ce(i))e.addValue(n,un(r,{owner:e}));else if(i!==r)if(e.hasValue(n)){let o=e.getValue(n);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{let o=e.getStaticValue(n);e.addValue(n,un(o!==void 0?o:r,{owner:e}))}}for(let n in a)t[n]===void 0&&e.removeValue(n);return t}var CE=m(()=>{"use strict";Gs();In()});var vc,sm,XS=m(()=>{"use strict";vc={current:null},sm={current:!1}});function wE(){if(sm.current=!0,!!sH)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>vc.current=e.matches;e.addEventListener("change",t),t()}else vc.current=!1}var sH,LE=m(()=>{"use strict";XS();sH=typeof window<"u"});function bc(e){lm=e}function WS(){return lm}var IE,lm,Sc,KS=m(()=>{"use strict";$();Ip();rS();lS();Yp();lr();hc();Gs();wn();kS();yE();In();SE();GS();ln();CE();LE();Fp();XS();sn();IE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],lm={};Sc=class{scrapeMotionValuesFromProps(t,a,n){return{}}constructor({parent:t,props:a,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:o,visualState:s},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ci,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let p=We.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,te.render(this.render,!1,!0))};let{latestValues:u,renderState:c}=s;this.latestValues=u,this.baseTarget={...u},this.initialValues=a.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=a,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=di(a),this.isVariantNode=yc(a),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:f,...d}=this.scrapeMotionValuesFromProps(a,{},this);for(let p in d){let h=d[p];u[p]!==void 0&&Ce(h)&&h.set(u[p])}}mount(t){if(this.hasBeenMounted)for(let a in this.initialValues)this.values.get(a)?.jump(this.initialValues[a]),this.latestValues[a]=this.initialValues[a];this.current=t,vE.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((a,n)=>this.bindToMotionValue(n,a)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(sm.current||wE(),this.shouldReduceMotion=vc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),da(this.notifyUpdate),da(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let a=this.features[t];a&&(a.unmount(),a.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,a){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),a.accelerate&&Dp.has(t)&&this.current instanceof HTMLElement){let{factory:o,keyframes:s,times:l,ease:u,duration:c}=a.accelerate,f=new js({element:this.current,name:t,keyframes:s,times:l,ease:u,duration:it(c)}),d=o(f);this.valueSubscriptions.set(t,()=>{d(),f.cancel()});return}let n=Wa.has(t);n&&this.onBindTransform&&this.onBindTransform();let r=a.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&te.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,a)),this.valueSubscriptions.set(t,()=>{r(),i&&i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in lm){let a=lm[t];if(!a)continue;let{isEnabled:n,Feature:r}=a;if(!this.features[t]&&r&&n(this.props)&&(this.features[t]=new r(this)),this.features[t]){let i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):je()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,a){this.latestValues[t]=a}update(t,a){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=a;for(let n=0;n<IE.length;n++){let r=IE[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);let i="on"+r,o=t[i];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=bE(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let a=this.getClosestVariantNode();if(a)return a.variantChildren&&a.variantChildren.add(t),()=>a.variantChildren.delete(t)}addValue(t,a){let n=this.values.get(t);a!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,a),this.values.set(t,a),this.latestValues[t]=a.get())}removeValue(t){this.values.delete(t);let a=this.valueSubscriptions.get(t);a&&(a(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,a){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&a!==void 0&&(n=un(a===null?void 0:a,{owner:this}),this.addValue(t,n)),n}readValue(t,a){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Hu(n)||ju(n))?n=parseFloat(n):!xE(n)&&Ct.test(a)&&(n=Xp(t,a)),this.setBaseTarget(t,Ce(n)?n.get():n)),Ce(n)?n.get():n}setBaseTarget(t,a){this.baseTarget[t]=a}getBaseTarget(t){let{initial:a}=this.props,n;if(typeof a=="string"||typeof a=="object"){let i=eo(this.props,a,this.presenceContext?.custom);i&&(n=i[t])}if(a&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!Ce(r)?r:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,a){return this.events[t]||(this.events[t]=new sr),this.events[t].add(a)}notify(t,...a){this.events[t]&&this.events[t].notify(...a)}scheduleRenderMicrotask(){no.render(this.render)}}});var Js,YS=m(()=>{"use strict";In();$A();KS();Js=class extends Sc{constructor(){super(...arguments),this.KeyframeResolver=Wp}sortInstanceNodePosition(t,a){return t.compareDocumentPosition(a)&2?1:-1}getBaseTargetFromProps(t,a){let n=t.style;return n?n[a]:void 0}removeValueFromRenderState(t,{vars:a,style:n}){delete a[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Ce(t)&&(this.childSubscription=t.on("change",a=>{this.current&&(this.current.textContent=`${a}`)}))}}});var wt,_E=m(()=>{"use strict";wt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}}});function Cc({top:e,left:t,right:a,bottom:n}){return{x:{min:t,max:a},y:{min:e,max:n}}}function ZS({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function QS(e,t){if(!t)return e;let a=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:a.y,left:a.x,bottom:n.y,right:n.x}}var $S=m(()=>{"use strict"});function JS(e){return e===void 0||e===1}function um({scale:e,scaleX:t,scaleY:a}){return!JS(e)||!JS(t)||!JS(a)}function pr(e){return um(e)||eb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function eb(e){return kE(e.x)||kE(e.y)}function kE(e){return e&&e!=="0%"}var tb=m(()=>{"use strict"});function wc(e,t,a){let n=e-a,r=t*n;return a+r}function TE(e,t,a,n,r){return r!==void 0&&(e=wc(e,r,n)),wc(e,a,n)+t}function ab(e,t=0,a=1,n,r){e.min=TE(e.min,t,a,n,r),e.max=TE(e.max,t,a,n,r)}function nb(e,{x:t,y:a}){ab(e.x,t.translate,t.scale,t.originPoint),ab(e.y,a.translate,a.scale,a.originPoint)}function RE(e,t,a,n=!1){let r=a.length;if(!r)return;t.x=t.y=1;let i,o;for(let s=0;s<r;s++){i=a[s],o=i.projectionDelta;let{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Ya(e.x,-i.scroll.offset.x),Ya(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,nb(e,o)),n&&pr(i.latestValues)&&Lc(e,i.latestValues,i.layout?.layoutBox))}t.x<EE&&t.x>AE&&(t.x=1),t.y<EE&&t.y>AE&&(t.y=1)}function Ya(e,t){e.min+=t,e.max+=t}function DE(e,t,a,n,r=.5){let i=ne(e.min,e.max,r);ab(e,t,a,i,n)}function ME(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Lc(e,t,a){let n=a??e;DE(e.x,ME(t.x,n.x),t.scaleX,t.scale,t.originX),DE(e.y,ME(t.y,n.y),t.scaleY,t.scale,t.originY)}var AE,EE,cm=m(()=>{"use strict";Xa();tb();AE=.999999999999,EE=1.0000000000001});function fm(e,t){return Cc(QS(e.getBoundingClientRect(),t))}function rb(e,t,a){let n=fm(e,a),{scroll:r}=t;return r&&(Ya(n.x,r.offset.x),Ya(n.y,r.offset.y)),n}var ib=m(()=>{"use strict";$S();cm()});function PE(e,t,a){let n="",r=!0;for(let o=0;o<uH;o++){let s=Ln[o],l=e[s];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(s.startsWith("scale")?1:0);else{let c=parseFloat(l);u=s.startsWith("scale")?c===1:c===0}if(!u||a){let c=mc(l,to[s]);if(!u){r=!1;let f=lH[s]||s;n+=`${f}(${c}) `}a&&(t[s]=c)}}let i=e.pathRotation;return i&&(r=!1,n+=`rotate(${mc(i,to.pathRotation)}) `),n=n.trim(),a?n=a(t,r?"":n):r&&(n="none"),n}var lH,uH,OE=m(()=>{"use strict";ES();jp();ln();lH={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},uH=Ln.length});function oo(e,t,a){let{style:n,vars:r,transformOrigin:i}=e,o=!1,s=!1;for(let l in t){let u=t[l];if(Wa.has(l)){o=!0;continue}else if(sp(l)){r[l]=u;continue}else{let c=mc(u,to[l]);l.startsWith("origin")?(s=!0,i[l]=c):n[l]=c}}if(t.transform||(o||a?n.transform=PE(t,e.transform,a):n.transform&&(n.transform="none")),s){let{originX:l="50%",originY:u="50%",originZ:c=0}=i;n.transformOrigin=`${l} ${u} ${c}`}}var dm=m(()=>{"use strict";ES();jp();ln();Us();OE()});function pm(e,{style:t,vars:a},n,r){let i=e.style,o;for(o in t)i[o]=t[o];r?.applyProjectionStyles(i,n);for(o in a)i.setProperty(o,a[o])}var ob=m(()=>{"use strict"});function BE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var el,FE=m(()=>{"use strict";Cn();el={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(z.test(e))e=parseFloat(e);else return e;let a=BE(e,t.target.x),n=BE(e,t.target.y);return`${a}% ${n}%`}}});var UE,zE=m(()=>{"use strict";wn();Xa();UE={correct:(e,{treeScale:t,projectionDelta:a})=>{let n=e,r=Ct.parse(e);if(r.length>5)return n;let i=Ct.createTransformer(e),o=typeof r[0]!="number"?1:0,s=a.x.scale*t.x,l=a.y.scale*t.y;r[0+o]/=s,r[1+o]/=l;let u=ne(s,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=u),typeof r[3+o]=="number"&&(r[3+o]/=u),i(r)}}});var Ic,sb=m(()=>{"use strict";TS();FE();zE();Ic={borderRadius:{...el,applyTo:[...pc]},borderTopLeftRadius:el,borderTopRightRadius:el,borderBottomLeftRadius:el,borderBottomRightRadius:el,boxShadow:UE}});function _c(e,{layout:t,layoutId:a}){return Wa.has(e)||e.startsWith("origin")||(t||a!==void 0)&&(!!Ic[e]||e==="opacity")}var lb=m(()=>{"use strict";ln();sb()});function so(e,t,a){let n=e.style,r=t?.style,i={};if(!n)return i;for(let o in n)(Ce(n[o])||r&&Ce(r[o])||_c(o,e)||a?.getValue(o)?.liveStyle!==void 0)&&(i[o]=n[o]);return i}var mm=m(()=>{"use strict";In();lb()});function cH(e){return window.getComputedStyle(e)}var kc,VE=m(()=>{"use strict";$();Us();ln();Gv();ib();YS();dm();ob();mm();kc=class extends Js{constructor(){super(...arguments),this.type="html",this.renderInstance=pm}mount(t){fa(!!t.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(t)}readValueFromInstance(t,a){if(Wa.has(a))return this.projection?.isProjecting?wp(a):$T(t,a);{let n=cH(t),r=(sp(a)?n.getPropertyValue(a):n[a])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:a}){return fm(t,a)}build(t,a,n){oo(t,a,n.transformTemplate)}scrapeMotionValuesFromProps(t,a,n){return so(t,a,n)}}});function NE(e,t,a=1,n=0,r=!0){e.pathLength=1;let i=r?fH:dH;e[i.offset]=`${-n}`,e[i.array]=`${t} ${a}`}var fH,dH,HE=m(()=>{"use strict";fH={offset:"stroke-dashoffset",array:"stroke-dasharray"},dH={offset:"strokeDashoffset",array:"strokeDasharray"}});function Tc(e,{attrX:t,attrY:a,attrScale:n,pathLength:r,pathSpacing:i=1,pathOffset:o=0,...s},l,u,c){if(oo(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete f.transformBox);for(let p of pH)f[p]!==void 0&&(d[p]=f[p],delete f[p]);t!==void 0&&(f.x=t),a!==void 0&&(f.y=a),n!==void 0&&(f.scale=n),r!==void 0&&NE(f,r,i,o,!1)}var pH,ub=m(()=>{"use strict";dm();HE();pH=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"]});var hm,cb=m(()=>{"use strict";hm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"])});var Ac,fb=m(()=>{"use strict";Ac=e=>typeof e=="string"&&e.toLowerCase()==="svg"});function qE(e,t,a,n){pm(e,t,void 0,n);for(let r in t.attrs)e.setAttribute(hm.has(r)?r:Ys(r),t.attrs[r])}var jE=m(()=>{"use strict";zp();ob();cb()});function Ec(e,t,a){let n=so(e,t,a);for(let r in e)if(Ce(e[r])||Ce(t[r])){let i=Ln.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}var db=m(()=>{"use strict";In();ln();mm()});var Dc,GE=m(()=>{"use strict";ln();_S();hc();YS();zp();ub();cb();fb();jE();db();Dc=class extends Js{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=je}getBaseTargetFromProps(t,a){return t[a]}readValueFromInstance(t,a){if(Wa.has(a)){let n=Gp(a);return n&&n.default||0}return a=hm.has(a)?a:Ys(a),t.getAttribute(a)}scrapeMotionValuesFromProps(t,a,n){return Ec(t,a,n)}build(t,a,n){Tc(t,a,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,a,n,r){qE(t,a,n,r)}mount(t){this.isSVGTag=Ac(t.tagName),super.mount(t)}}});function pb(e){if(!e)return;if(!e.isControllingVariants){let a=e.parent?pb(e.parent)||{}:{};return e.props.initial!==void 0&&(a.initial=e.props.initial),a}let t={};for(let a=0;a<mH;a++){let n=xc[a],r=e.props[n];(_n(r)||r===!1)&&(t[n]=r)}return t}var mH,XE=m(()=>{"use strict";gc();om();mH=xc.length});function mb(e,t){if(!Array.isArray(t))return!1;let a=t.length;if(a!==e.length)return!1;for(let n=0;n<a;n++)if(t[n]!==e[n])return!1;return!0}var WE=m(()=>{"use strict"});function xH(e){return t=>Promise.all(t.map(({animation:a,options:n})=>NA(e,a,n)))}function hb(e){let t=xH(e),a=KE(),n=!0,r=!1,i=u=>(c,f)=>{let d=ka(e,f,u==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:p,transitionEnd:h,...v}=d;c={...c,...v,...h}}return c};function o(u){t=u(e)}function s(u){let{props:c}=e,f=pb(e.parent)||{},d=[],p=new Set,h={},v=1/0;for(let g=0;g<gH;g++){let x=hH[g],y=a[x],b=c[x]!==void 0?c[x]:f[x],T=_n(b),I=x===u?y.isActive:null;I===!1&&(v=g);let A=b===f[x]&&b!==c[x]&&T;if(A&&(n||r)&&e.manuallyAnimateOnMount&&(A=!1),y.protectedKeys={...h},!y.isActive&&I===null||!b&&!y.prevProp||dr(b)||typeof b=="boolean")continue;if(x==="exit"&&y.isActive&&I!==!0){y.prevResolvedValues&&(h={...h,...y.prevResolvedValues});continue}let _=YE(y.prevProp,b),M=_||x===u&&y.isActive&&!A&&T||g>v&&T,C=!1,U=Array.isArray(b)?b:[b],N=U.reduce(i(x),{});I===!1&&(N={});let{prevResolvedValues:B={}}=y,q={...B,...N},V=pe=>{M=!0,p.has(pe)&&(C=!0,p.delete(pe)),y.needsAnimating[pe]=!0;let Me=e.getValue(pe);Me&&(Me.liveStyle=!1)};for(let pe in q){let Me=N[pe],w=B[pe];if(h.hasOwnProperty(pe))continue;let Ge=!1;uc(Me)&&uc(w)?Ge=!mb(Me,w)||_:Ge=Me!==w,Ge?Me!=null?V(pe):p.add(pe):Me!==void 0&&p.has(pe)?V(pe):y.protectedKeys[pe]=!0}y.prevProp=b,y.prevResolvedValues=N,y.isActive&&(h={...h,...N}),(n||r)&&e.blockInitialAnimation&&(M=!1);let ue=A&&_;M&&(!ue||C)&&d.push(...U.map(pe=>{let Me={type:x};if(typeof pe=="string"&&(n||r)&&!ue&&e.manuallyAnimateOnMount&&e.parent){let{parent:w}=e,Ge=ka(w,pe);if(w.enteringChildren&&Ge){let{delayChildren:Kt}=Ge.transition||{};Me.delay=Rp(w.enteringChildren,e,Kt)}}return{animation:pe,options:Me}}))}if(p.size){let g={};if(typeof c.initial!="boolean"){let x=ka(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(g.transition=x.transition)}p.forEach(x=>{let y=e.getBaseTarget(x),b=e.getValue(x);b&&(b.liveStyle=!0),g[x]=y??null}),d.push({animation:g})}let S=!!d.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(S=!1),n=!1,r=!1,S?t(d):Promise.resolve()}function l(u,c){if(a[u].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(u,c)),a[u].isActive=c;let f=s(u);for(let d in a)a[d].protectedKeys={};return f}return{animateChanges:s,setActive:l,setAnimateFunction:o,getState:()=>a,reset:()=>{a=KE(),r=!0}}}function YE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!mb(t,e):!1}function lo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function KE(){return{animate:lo(!0),whileInView:lo(),whileHover:lo(),whileTap:lo(),whileDrag:lo(),whileFocus:lo(),exit:lo()}}var hH,gH,ZE=m(()=>{"use strict";HA();uS();XE();rm();mS();gc();Ws();WE();om();hH=[...im].reverse(),gH=im.length});function gm(e,t){e.min=t.min,e.max=t.max}function Za(e,t){gm(e.x,t.x),gm(e.y,t.y)}function gb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var QE=m(()=>{"use strict"});function gt(e){return e.max-e.min}function Sb(e,t,a){return Math.abs(e-t)<=a}function xb(e,t,a,n=.5){e.origin=n,e.originPoint=ne(t.min,t.max,e.origin),e.scale=gt(a)/gt(t),e.translate=ne(a.min,a.max,e.origin)-e.originPoint,(e.scale>=yH&&e.scale<=vH||isNaN(e.scale))&&(e.scale=1),(e.translate>=SH&&e.translate<=bH||isNaN(e.translate))&&(e.translate=0)}function uo(e,t,a,n){xb(e.x,t.x,a.x,n?n.originX:void 0),xb(e.y,t.y,a.y,n?n.originY:void 0)}function yb(e,t,a,n=0){let r=n?ne(a.min,a.max,n):a.min;e.min=r+t.min,e.max=e.min+gt(t)}function bb(e,t,a,n){yb(e.x,t.x,a.x,n?.x),yb(e.y,t.y,a.y,n?.y)}function vb(e,t,a,n=0){let r=n?ne(a.min,a.max,n):a.min;e.min=t.min-r,e.max=e.min+gt(t)}function tl(e,t,a,n){vb(e.x,t.x,a.x,n?.x),vb(e.y,t.y,a.y,n?.y)}var $E,yH,vH,JE,SH,bH,xm=m(()=>{"use strict";Xa();$E=1e-4,yH=1-$E,vH=1+$E,JE=.01,SH=0-JE,bH=0+JE});function eD(e,t,a,n,r){return e-=t,e=wc(e,1/a,n),r!==void 0&&(e=wc(e,1/r,n)),e}function CH(e,t=0,a=1,n=.5,r,i=e,o=e){if(jt.test(t)&&(t=parseFloat(t),t=ne(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=ne(i.min,i.max,n);e===i&&(s-=t),e.min=eD(e.min,t,a,s,r),e.max=eD(e.max,t,a,s,r)}function tD(e,t,[a,n,r],i,o){CH(e,t[a],t[n],t[r],t.scale,i,o)}function Cb(e,t,a,n){tD(e.x,t,wH,a?a.x:void 0,n?n.x:void 0),tD(e.y,t,LH,a?a.y:void 0,n?n.y:void 0)}var wH,LH,aD=m(()=>{"use strict";Xa();Cn();cm();wH=["x","scaleX","originX"],LH=["y","scaleY","originY"]});function nD(e){return e.translate===0&&e.scale===1}function wb(e){return nD(e.x)&&nD(e.y)}function rD(e,t){return e.min===t.min&&e.max===t.max}function oD(e,t){return rD(e.x,t.x)&&rD(e.y,t.y)}function iD(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Lb(e,t){return iD(e.x,t.x)&&iD(e.y,t.y)}function Ib(e){return gt(e.x)/gt(e.y)}function _b(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var sD=m(()=>{"use strict";xm()});function Ta(e){return[e("x"),e("y")]}var kb=m(()=>{"use strict"});function lD(e,t,a){let n="",r=e.x.translate/t.x,i=e.y.translate/t.y,o=a?.z||0;if((r||i||o)&&(n=`translate3d(${r}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),a){let{transformPerspective:u,rotate:c,pathRotation:f,rotateX:d,rotateY:p,skewX:h,skewY:v}=a;u&&(n=`perspective(${u}px) ${n}`),c&&(n+=`rotate(${c}deg) `),f&&(n+=`rotate(${f}deg) `),d&&(n+=`rotateX(${d}deg) `),p&&(n+=`rotateY(${p}deg) `),h&&(n+=`skewX(${h}deg) `),v&&(n+=`skewY(${v}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}var uD=m(()=>{"use strict"});function pD(e,t,a,n,r,i){r?(e.opacity=ne(0,a.opacity??1,_H(n)),e.opacityExit=ne(t.opacity??1,0,kH(n))):i&&(e.opacity=ne(t.opacity??1,a.opacity??1,n));for(let o=0;o<IH;o++){let s=pc[o],l=dD(t,s),u=dD(a,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||fD(l)===fD(u)?(e[s]=Math.max(ne(cD(l),cD(u),n),0),(jt.test(u)||jt.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||a.rotate)&&(e.rotate=ne(t.rotate||0,a.rotate||0,n))}function dD(e,t){return e[t]!==void 0?e[t]:e.borderRadius}function mD(e,t,a){return n=>n<e?0:n>t?1:a(vn(e,t,n))}var IH,cD,fD,_H,kH,hD=m(()=>{"use strict";Xa();Cn();$();TS();IH=pc.length,cD=e=>typeof e=="string"?parseFloat(e):e,fD=e=>typeof e=="number"||z.test(e);_H=mD(0,.5,Zu),kH=mD(.5,.95,Xe)});function gD(e,t,a){let n=Ce(e)?e:un(e);return n.start(Ji("",n,t,a)),n.animation}var xD=m(()=>{"use strict";Bp();Gs();In()});function kn(e,t,a,n={passive:!0}){return e.addEventListener(t,a,n),()=>e.removeEventListener(t,a,n)}var Tb=m(()=>{"use strict"});var yD,vD=m(()=>{"use strict";yD=(e,t)=>e.depth-t.depth});var ym,SD=m(()=>{"use strict";$();vD();ym=class{constructor(){this.children=[],this.isDirty=!1}add(t){Ki(this.children,t),this.isDirty=!0}remove(t){ai(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(yD),this.isDirty=!1,this.children.forEach(t)}}});function bD(e,t){let a=We.now(),n=({timestamp:r})=>{let i=r-a;i>=t&&(da(n),e(i-t))};return te.setup(n,!0),()=>da(n)}var CD=m(()=>{"use strict";lr();sn()});function co(e){return Ce(e)?e.get():e}var Ab=m(()=>{"use strict";In()});var vm,wD=m(()=>{"use strict";$();vm=class{constructor(){this.members=[]}add(t){Ki(this.members,t);for(let a=this.members.length-1;a>=0;a--){let n=this.members[a];if(n===t||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(ai(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(ai(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let a=this.members[this.members.length-1];a&&this.promote(a)}}relegate(t){for(let a=this.members.indexOf(t)-1;a>=0;a--){let n=this.members[a];if(n.isPresent!==!1&&n.instance?.isConnected!==!1)return this.promote(n),!0}return!1}promote(t,a){let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=t.options;(r===void 0||r!==i)&&(t.resumeFrom=n,a&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}});var fo,Eb=m(()=>{"use strict";fo={hasAnimatedSinceResize:!0,hasEverUpdated:!1}});function Mb(e,t,a,n){let{latestValues:r}=t;r[e]&&(a[e]=r[e],t.setStaticValue(e,0),n&&(n[e]=0))}function MD(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let a=Vp(t);if(window.MotionHasOptimisedAnimation(a,"transform")){let{layout:r,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(a,"transform",te,!(r||i))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&MD(n)}function Sm({attachResizeListener:e,defaultParent:t,measureScroll:a,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(o={},s=t?.()){this.id=AH++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,io.value&&(po.nodes=po.calculatedTargetDeltas=po.calculatedProjections=0),this.nodes.forEach(MH),this.nodes.forEach(UH),this.nodes.forEach(zH),this.nodes.forEach(RH),io.addProjectionMetrics&&io.addProjectionMetrics(po)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new ym)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new sr),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){let l=this.eventHandlers.get(o);l&&l.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Qs(o)&&!hE(o),this.instance=o;let{layoutId:s,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let c,f=0,d=()=>this.root.updateBlockedByResize=!1;te.read(()=>{f=window.innerWidth}),e(o,()=>{let p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,c&&c(),c=bD(d,250),fo.hasAnimatedSinceResize&&(fo.hasAnimatedSinceResize=!1,this.nodes.forEach(_D)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||u.getDefaultTransition()||jH,{onLayoutAnimationStart:v,onLayoutAnimationComplete:S}=u.getProps(),g=!this.targetLayout||!Lb(this.targetLayout,p),x=!f&&d;if(this.options.layoutRoot||this.resumeFrom||x||f&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let y={...Xs(h,"layout"),onPlay:v,onComplete:S};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,x,y.path)}else f||_D(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),da(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(VH),this.animationId++)}getTransformTemplate(){let{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&MD(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let f=this.path[c];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}let{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(OH),this.nodes.forEach(LD);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ID);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(BH),this.nodes.forEach(FH),this.nodes.forEach(EH),this.nodes.forEach(DH)):this.nodes.forEach(ID),this.clearAllSnapshots();let s=We.now();Je.delta=bt(0,1e3/60,s-Je.timestamp),Je.timestamp=s,Je.isProcessing=!0,tc.update.process(Je),tc.preRender.process(Je),tc.render.process(Je),Je.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,no.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(PH),this.sharedNodes.forEach(NH)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!gt(this.snapshot.measuredBox.x)&&!gt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=je()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s&&this.instance){let l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:a(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;let o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!wb(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(s||pr(this.latestValues)||c)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return o&&(l=this.removeTransform(l)),GH(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:o}=this.options;if(!o)return je();let s=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(XH))){let{scroll:u}=this.root;u&&(Ya(s.x,u.offset.x),Ya(s.y,u.offset.y))}return s}removeElementScroll(o){let s=je();if(Za(s,o),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:c,options:f}=u;u!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&Za(s,o),Ya(s.x,c.offset.x),Ya(s.y,c.offset.y))}return s}applyTransform(o,s=!1,l){let u=l||je();Za(u,o);for(let c=0;c<this.path.length;c++){let f=this.path[c];!s&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(Ya(u.x,-f.scroll.offset.x),Ya(u.y,-f.scroll.offset.y)),pr(f.latestValues)&&Lc(u,f.latestValues,f.layout?.layoutBox)}return pr(this.latestValues)&&Lc(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(o){let s=je();Za(s,o);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!pr(u.latestValues))continue;let c;u.instance&&(um(u.latestValues)&&u.updateSnapshot(),c=je(),Za(c,u.measurePageBox())),Cb(s,u.latestValues,u.snapshot?.layoutBox,c)}return pr(this.latestValues)&&Cb(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Je.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){let s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==s;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:f}=this.options;if(!this.layout||!(c||f))return;this.resolvedRelativeTargetAt=Je.timestamp;let d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=je(),this.targetWithTransforms=je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),bb(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Za(this.target,this.layout.layoutBox),nb(this.target,this.targetDelta)):Za(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0),io.value&&po.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||um(this.parent.latestValues)||eb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,s,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),tl(this.relativeTargetOrigin,s,l,this.options.layoutAnchor||void 0),Za(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let o=this.getLead(),s=!!this.resumingFrom||this!==o,l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Je.timestamp&&(l=!1),l)return;let{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Za(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,d=this.treeScale.y;RE(this.layoutCorrected,this.treeScale,this.path,s),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=je());let{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gb(this.prevProjectionDelta.x,this.projectionDelta.x),gb(this.prevProjectionDelta.y,this.projectionDelta.y)),uo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!_b(this.projectionDelta.x,this.prevProjectionDelta.x)||!_b(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),io.value&&po.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){let s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fi(),this.projectionDelta=fi(),this.projectionDeltaWithTransform=fi()}setAnimationOrigin(o,s=!1,l){let u=this.snapshot,c=u?u.latestValues:{},f={...this.latestValues},d=fi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let p=je(),h=u?u.source:void 0,v=this.layout?this.layout.source:void 0,S=h!==v,g=this.getStack(),x=!g||g.members.length<=1,y=!!(S&&!x&&this.options.crossfade===!0&&!this.path.some(qH));this.animationProgress=0;let b,T=l?.interpolateProjection(o);this.mixTargetDelta=I=>{let A=I/1e3,_=T?.(A);_?(d.x.translate=_.x,d.x.scale=ne(o.x.scale,1,A),d.x.origin=o.x.origin,d.x.originPoint=o.x.originPoint,d.y.translate=_.y,d.y.scale=ne(o.y.scale,1,A),d.y.origin=o.y.origin,d.y.originPoint=o.y.originPoint):(kD(d.x,o.x,A),kD(d.y,o.y,A)),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(tl(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),HH(this.relativeTarget,this.relativeTargetOrigin,p,A),b&&oD(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=je()),Za(b,this.relativeTarget)),S&&(this.animationValues=f,pD(f,c,this.latestValues,A,y,x)),_&&_.rotate!==void 0&&(this.animationValues||(this.animationValues=f),this.animationValues.pathRotation=_.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(da(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=te.update(()=>{fo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=un(0)),this.motionValue.jump(0,!1),this.currentAnimation=gD(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(TH),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let o=this.getLead(),{targetWithTransforms:s,target:l,layout:u,latestValues:c}=o;if(!(!s||!l||!u)){if(this!==o&&this.layout&&u&&RD(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||je();let f=gt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;let d=gt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Za(s,l),Lc(s,c),uo(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new vm),this.sharedNodes.get(o).add(s);let u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){let o=this.getStack();return o?o.lead===this:!0}getLead(){let{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){let o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){let{visualElement:o}=this.options;if(!o)return;let s=!1,{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;let u={};l.z&&Mb("z",o,u,this.animationValues);for(let c=0;c<Db.length;c++)Mb(`rotate${Db[c]}`,o,u,this.animationValues),Mb(`skew${Db[c]}`,o,u,this.animationValues);o.render();for(let c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=co(s?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=co(s?.pointerEvents)||""),this.hasProjected&&!pr(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=lD(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),o.transform=f;let{x:d,y:p}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(let h in Ic){if(c[h]===void 0)continue;let{correct:v,applyTo:S,isCSSVariable:g}=Ic[h],x=f==="none"?c[h]:v(c[h],u);if(S){let y=S.length;for(let b=0;b<y;b++)o[S[b]]=x}else g?this.options.visualElement.renderState.vars[h]=x:o[h]=x}this.options.layoutId&&(o.pointerEvents=u===this?co(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(LD),this.root.sharedNodes.clear()}}}function EH(e){e.updateLayout()}function DH(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:a,measuredBox:n}=e.layout,{animationType:r}=e.options,i=t.source!==e.layout.source;if(r==="size")Ta(c=>{let f=i?t.measuredBox[c]:t.layoutBox[c],d=gt(f);f.min=a[c].min,f.max=f.min+d});else if(r==="x"||r==="y"){let c=r==="x"?"y":"x";gm(i?t.measuredBox[c]:t.layoutBox[c],a[c])}else RD(r,t.layoutBox,a)&&Ta(c=>{let f=i?t.measuredBox[c]:t.layoutBox[c],d=gt(a[c]);f.max=f.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+d)});let o=fi();uo(o,a,t.layoutBox);let s=fi();i?uo(s,e.applyTransform(n,!0),t.measuredBox):uo(s,a,t.layoutBox);let l=!wb(o),u=!1;if(!e.resumeFrom){let c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){let{snapshot:f,layout:d}=c;if(f&&d){let p=e.options.layoutAnchor||void 0,h=je();tl(h,t.layoutBox,f.layoutBox,p);let v=je();tl(v,a,d.layoutBox,p),Lb(h,v)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=h,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:a,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:a}=e.options;a&&a()}e.options.transition=void 0}function MH(e){io.value&&po.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function RH(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function PH(e){e.clearSnapshot()}function LD(e){e.clearMeasurements()}function OH(e){e.isLayoutDirty=!0,e.updateLayout()}function ID(e){e.isLayoutDirty=!1}function BH(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function FH(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function _D(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function UH(e){e.resolveTargetDelta()}function zH(e){e.calcProjection()}function VH(e){e.resetSkewAndRotation()}function NH(e){e.removeLeadSnapshot()}function kD(e,t,a){e.translate=ne(t.translate,0,a),e.scale=ne(t.scale,1,a),e.origin=t.origin,e.originPoint=t.originPoint}function TD(e,t,a,n){e.min=ne(t.min,a.min,n),e.max=ne(t.max,a.max,n)}function HH(e,t,a,n){TD(e.x,t.x,a.x,n),TD(e.y,t.y,a.y,n)}function qH(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}function DD(e){e.min=ED(e.min),e.max=ED(e.max)}function GH(e){DD(e.x),DD(e.y)}function RD(e,t,a){return e==="position"||e==="preserve-aspect"&&!Sb(Ib(t),Ib(a),.2)}function XH(e){return e!==e.root&&e.scroll?.wasRoot}var po,Db,TH,AH,jH,AD,ED,Rb=m(()=>{"use strict";$();xD();xS();Op();Yp();lr();sb();mE();CD();Jp();gE();Xa();Gs();Ab();hD();QE();cm();xm();aD();hc();sD();wD();uD();kb();SD();tb();Eb();sn();po={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Db=["","X","Y","Z"],TH=1e3,AH=0;jH={duration:.45,ease:[.4,0,.1,1]},AD=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ED=AD("applewebkit/")&&!AD("chrome/")?Math.round:Xe});var PD,OD=m(()=>{"use strict";Tb();Rb();PD=Sm({attachResizeListener:(e,t)=>kn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0})});var bm,Mc,BD=m(()=>{"use strict";Rb();OD();bm={current:void 0},Mc=Sm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bm.current){let e=new PD({});e.mount(window),e.setOptions({layoutScroll:!0}),bm.current=e}return bm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"})});var ge=m(()=>{"use strict";Bp();gS();Yp();JA();eE();sE();zS();BS();pE();DS();Xa();Cn();In();hS();_E();VE();GE();KS();ZE();rm();GS();lb();gc();Ws();Fp();$S();xm();hc();kb();ib();Tb();Ab();BD();Eb();dm();mm();ub();fb();db();sn()});var FD,al,Cm=m(()=>{"use strict";"use client";FD=H(re(),1),al=(0,FD.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})});function UD(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function WH(...e){return t=>{let a=!1,n=e.map(r=>{let i=UD(r,t);return!a&&typeof i=="function"&&(a=!0),i});if(a)return()=>{for(let r=0;r<n.length;r++){let i=n[r];typeof i=="function"?i():UD(e[r],null)}}}}function VD(...e){return zD.useCallback(WH(...e),e)}var zD,ND=m(()=>{"use strict";zD=H(re(),1)});function qD({children:e,isPresent:t,anchorX:a,anchorY:n,root:r,pop:i}){let o=(0,mr.useId)(),s=(0,mr.useRef)(null),l=(0,mr.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:u}=(0,mr.useContext)(al),c=i!==!1?e.props?.ref??e?.ref:void 0,f=VD(s,c);return(0,mr.useInsertionEffect)(()=>{let{width:d,height:p,top:h,left:v,right:S,bottom:g,direction:x}=l.current;if(t||i===!1||!s.current||!d||!p)return;let y=x==="rtl",b=a==="left"?y?`right: ${S}`:`left: ${v}`:y?`left: ${v}`:`right: ${S}`,T=n==="bottom"?`bottom: ${g}`:`top: ${h}`;s.current.dataset.motionPopId=o;let I=document.createElement("style");u&&(I.nonce=u);let A=r??document.head;return A.appendChild(I),I.sheet&&I.sheet.insertRule(`
|
|
10
|
+
[data-motion-pop-id="${o}"] {
|
|
11
|
+
position: absolute !important;
|
|
12
|
+
width: ${d}px !important;
|
|
13
|
+
height: ${p}px !important;
|
|
14
|
+
${b}px !important;
|
|
15
|
+
${T}px !important;
|
|
16
|
+
}
|
|
17
|
+
`),()=>{s.current?.removeAttribute("data-motion-pop-id"),A.contains(I)&&A.removeChild(I)}},[t]),(0,HD.jsx)(Pb,{isPresent:t,childRef:s,sizeRef:l,pop:i,children:i===!1?e:wm.cloneElement(e,{ref:f})})}var HD,wm,mr,Pb,jD=m(()=>{"use strict";"use client";HD=H(ir(),1);ge();wm=H(re(),1),mr=H(re(),1);Cm();ND();Pb=class extends wm.Component{getSnapshotBeforeUpdate(t){let a=this.props.childRef.current;if(ao(a)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let n=a.offsetParent,r=ao(n)&&n.offsetWidth||0,i=ao(n)&&n.offsetHeight||0,o=getComputedStyle(a),s=this.props.sizeRef.current;s.height=parseFloat(o.height),s.width=parseFloat(o.width),s.top=a.offsetTop,s.left=a.offsetLeft,s.right=r-s.width-s.left,s.bottom=i-s.height-s.top,s.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}});function KH(){return new Map}var Ob,GD,pi,XD,WD=m(()=>{"use strict";"use client";Ob=H(ir(),1),GD=H(re(),1),pi=H(re(),1);Nu();Yd();Qd();jD();XD=({children:e,initial:t,isPresent:a,onExitComplete:n,custom:r,presenceAffectsLayout:i,mode:o,anchorX:s,anchorY:l,root:u})=>{let c=Ps(KH),f=(0,pi.useId)(),d=(0,pi.useRef)(a),p=(0,pi.useRef)(n);Os(()=>{d.current=a,p.current=n});let h=!0,v=(0,pi.useMemo)(()=>(h=!1,{id:f,initial:t,isPresent:a,custom:r,onExitComplete:S=>{c.set(S,!0);for(let g of c.values())if(!g)return;n&&n()},register:S=>(c.set(S,!1),()=>{c.delete(S),!d.current&&!c.size&&p.current?.()})}),[a,c,n]);return i&&h&&(v={...v}),(0,pi.useMemo)(()=>{c.forEach((S,g)=>c.set(g,!1))},[a]),GD.useEffect(()=>{!a&&!c.size&&n&&n()},[a]),e=(0,Ob.jsx)(qD,{pop:o==="popLayout",isPresent:a,anchorX:s,anchorY:l,root:u,children:e}),(0,Ob.jsx)(ti.Provider,{value:v,children:e})}});function Lm(e=!0){let t=(0,mi.useContext)(ti);if(t===null)return[!0,null];let{isPresent:a,onExitComplete:n,register:r}=t,i=(0,mi.useId)();(0,mi.useEffect)(()=>{if(e)return r(i)},[e]);let o=(0,mi.useCallback)(()=>e&&n&&n(i),[i,n,e]);return!a&&n?[!1,o]:[!0]}var mi,Bb=m(()=>{"use strict";"use client";mi=H(re(),1);Nu()});function Fb(e){let t=[];return Im.Children.forEach(e,a=>{(0,Im.isValidElement)(a)&&t.push(a)}),t}var Im,Rc,KD=m(()=>{"use strict";Im=H(re(),1),Rc=e=>e.key||""});var Pc,cn,Oc,YD=m(()=>{"use strict";"use client";Pc=H(ir(),1),cn=H(re(),1);Kd();Yd();Qd();WD();Bb();KD();Oc=({children:e,custom:t,initial:a=!0,onExitComplete:n,presenceAffectsLayout:r=!0,mode:i="sync",propagate:o=!1,anchorX:s="left",anchorY:l="top",root:u})=>{let[c,f]=Lm(o),d=(0,cn.useMemo)(()=>Fb(e),[e]),p=o&&!c?[]:d.map(Rc),h=(0,cn.useRef)(!0),v=(0,cn.useRef)(d),S=Ps(()=>new Map),g=(0,cn.useRef)(new Set),[x,y]=(0,cn.useState)(d),[b,T]=(0,cn.useState)(d);Os(()=>{h.current=!1,v.current=d;for(let _=0;_<b.length;_++){let M=Rc(b[_]);p.includes(M)?(S.delete(M),g.current.delete(M)):S.get(M)!==!0&&S.set(M,!1)}},[b,p.length,p.join("-")]);let I=[];if(d!==x){let _=[...d];for(let M=0;M<b.length;M++){let C=b[M],U=Rc(C);p.includes(U)||(_.splice(M,0,C),I.push(C))}return i==="wait"&&I.length&&(_=I),T(Fb(_)),y(d),null}let{forceRender:A}=(0,cn.useContext)(Rs);return(0,Pc.jsx)(Pc.Fragment,{children:b.map(_=>{let M=Rc(_),C=o&&!c?!1:d===b||p.includes(M),U=()=>{if(g.current.has(M))return;if(S.has(M))g.current.add(M),S.set(M,!0);else return;let N=!0;S.forEach(B=>{B||(N=!1)}),N&&(A?.(),T(v.current),o&&f?.(),n&&n())};return(0,Pc.jsx)(XD,{isPresent:C,initial:!h.current||a?void 0:!1,custom:t,presenceAffectsLayout:r,mode:i,root:u,onExitComplete:C?void 0:U,anchorX:s,anchorY:l,children:_},M)})})}});var ZD,_m,Ub=m(()=>{"use strict";"use client";ZD=H(re(),1),_m=(0,ZD.createContext)({strict:!1})});function YH(){if($D)return;let e={};for(let t in QD)e[t]={isEnabled:a=>QD[t].some(n=>!!a[n])};bc(e),$D=!0}function km(){return YH(),WS()}var QD,$D,zb=m(()=>{"use strict";ge();QD={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},$D=!1});function JD(e){let t=km();for(let a in e)t[a]={...t[a],...e[a]};bc(t)}var eM=m(()=>{"use strict";ge();zb()});function Bc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ZH.has(e)}var ZH,tM=m(()=>{"use strict";ZH=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"])});function QH(e){typeof e=="function"&&(aM=t=>t.startsWith("on")?!Bc(t):e(t))}function nM(e,t,a){let n={};for(let r in e)r==="values"&&typeof e.values=="object"||Ce(e[r])||(aM(r)||a===!0&&Bc(r)||!t&&!Bc(r)||e.draggable&&r.startsWith("onDrag"))&&(n[r]=e[r]);return n}var aM,rM=m(()=>{"use strict";ge();tM();aM=e=>!Bc(e);try{QH(Iw("@emotion/is-prop-valid").default)}catch{}});var iM,hi,Fc=m(()=>{"use strict";"use client";iM=H(re(),1),hi=(0,iM.createContext)({})});function oM(e,t){if(di(e)){let{initial:a,animate:n}=e;return{initial:a===!1||_n(a)?a:void 0,animate:_n(n)?n:void 0}}return e.inherit!==!1?t:{}}var sM=m(()=>{"use strict";ge()});function uM(e){let{initial:t,animate:a}=oM(e,(0,Tm.useContext)(hi));return(0,Tm.useMemo)(()=>({initial:t,animate:a}),[lM(t),lM(a)])}function lM(e){return Array.isArray(e)?e.join(" "):e}var Tm,cM=m(()=>{"use strict";"use client";Tm=H(re(),1);Fc();sM()});var nl,Am=m(()=>{"use strict";nl=()=>({style:{},transform:{},transformOrigin:{},vars:{}})});function Vb(e,t,a){for(let n in t)!Ce(t[n])&&!_c(n,a)&&(e[n]=t[n])}function $H({transformTemplate:e},t){return(0,fM.useMemo)(()=>{let a=nl();return oo(a,t,e),Object.assign({},a.vars,a.style)},[t])}function JH(e,t){let a=e.style||{},n={};return Vb(n,a,e),Object.assign(n,$H(e,t)),n}function dM(e,t){let a={},n=JH(e,t);return e.drag&&e.dragListener!==!1&&(a.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(a.tabIndex=0),a.style=n,a}var fM,Nb=m(()=>{"use strict";"use client";ge();fM=H(re(),1);Am()});var Em,Hb=m(()=>{"use strict";Am();Em=()=>({...nl(),attrs:{}})});function mM(e,t,a,n){let r=(0,pM.useMemo)(()=>{let i=Em();return Tc(i,t,Ac(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){let i={};Vb(i,e.style,e),r.style={...i,...r.style}}return r}var pM,hM=m(()=>{"use strict";"use client";ge();pM=H(re(),1);Nb();Hb()});var gM,xM=m(()=>{"use strict";gM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"]});function rl(e){return typeof e!="string"||e.includes("-")?!1:!!(gM.indexOf(e)>-1||/[A-Z]/u.test(e))}var Dm=m(()=>{"use strict";xM()});function yM(e,t,a,{latestValues:n},r,i=!1,o){let l=(o??rl(e)?mM:dM)(t,n,r,e),u=nM(t,typeof e=="string",i),c=e!==il.Fragment?{...u,...l,ref:a}:{},{children:f}=t,d=(0,il.useMemo)(()=>Ce(f)?f.get():f,[f]);return(0,il.createElement)(e,{...c,children:d})}var il,vM=m(()=>{"use strict";"use client";ge();il=H(re(),1);Nb();hM();rM();Dm()});function eq({scrapeMotionValuesFromProps:e,createRenderState:t},a,n,r){return{latestValues:tq(a,n,r,e),renderState:t()}}function tq(e,t,a,n){let r={},i=n(e,{});for(let d in i)r[d]=co(i[d]);let{initial:o,animate:s}=e,l=di(e),u=yc(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let c=a?a.initial===!1:!1;c=c||o===!1;let f=c?s:o;if(f&&typeof f!="boolean"&&!dr(f)){let d=Array.isArray(f)?f:[f];for(let p=0;p<d.length;p++){let h=eo(e,d[p]);if(h){let{transitionEnd:v,transition:S,...g}=h;for(let x in g){let y=g[x];if(Array.isArray(y)){let b=c?y.length-1:0;y=y[b]}y!==null&&(r[x]=y)}for(let x in v)r[x]=v[x]}}}return r}var qb,Mm,jb=m(()=>{"use strict";"use client";ge();qb=H(re(),1);Fc();Nu();Yd();Mm=e=>(t,a)=>{let n=(0,qb.useContext)(hi),r=(0,qb.useContext)(ti),i=()=>eq(e,t,n,r);return a?i():Ps(i)}});var SM,bM=m(()=>{"use strict";"use client";ge();jb();Am();SM=Mm({scrapeMotionValuesFromProps:so,createRenderState:nl})});var CM,wM=m(()=>{"use strict";"use client";ge();jb();Hb();CM=Mm({scrapeMotionValuesFromProps:Ec,createRenderState:Em})});var LM,IM=m(()=>{"use strict";LM=Symbol.for("motionComponentSymbol")});function _M(e,t,a){let n=(0,mo.useRef)(a);(0,mo.useInsertionEffect)(()=>{n.current=a});let r=(0,mo.useRef)(null);return(0,mo.useCallback)(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());let o=n.current;if(typeof o=="function")if(i){let s=o(i);typeof s=="function"&&(r.current=s)}else r.current?(r.current(),r.current=null):o(i);else o&&(o.current=i)},[t])}var mo,kM=m(()=>{"use strict";"use client";mo=H(re(),1)});var TM,Rm,Gb=m(()=>{"use strict";"use client";TM=H(re(),1),Rm=(0,TM.createContext)({})});function gi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}var Xb=m(()=>{"use strict"});function AM(e,t,a,n,r,i){let{visualElement:o}=(0,Jt.useContext)(hi),s=(0,Jt.useContext)(_m),l=(0,Jt.useContext)(ti),u=(0,Jt.useContext)(al),c=u.reducedMotion,f=u.skipAnimations,d=(0,Jt.useRef)(null),p=(0,Jt.useRef)(!1);n=n||s.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:o,props:a,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:f,isSVG:i}),p.current&&d.current&&(d.current.manuallyAnimateOnMount=!0));let h=d.current,v=(0,Jt.useContext)(Rm);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&aq(d.current,a,r,v);let S=(0,Jt.useRef)(!1);(0,Jt.useInsertionEffect)(()=>{h&&S.current&&h.update(a,l)});let g=a[cc],x=(0,Jt.useRef)(!!g&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Os(()=>{p.current=!0,h&&(S.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),x.current&&h.animationState&&h.animationState.animateChanges())}),(0,Jt.useEffect)(()=>{h&&(!x.current&&h.animationState&&h.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),x.current=!1),h.enteringChildren=void 0)}),h}function aq(e,t,a,n){let{layoutId:r,layout:i,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:f}=t;e.projection=new a(e.latestValues,t["data-framer-portal-id"]?void 0:EM(e.parent)),e.projection.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!o||s&&gi(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function EM(e){if(e)return e.options.allowProjection!==!1?e.projection:EM(e.parent)}var Jt,DM=m(()=>{"use strict";"use client";ge();Jt=H(re(),1);Ub();Cm();Fc();Nu();Gb();Xb();Qd()});function Om(e,{forwardMotionProps:t=!1,type:a}={},n,r){n&&JD(n);let i=a?a==="svg":rl(e),o=i?CM:SM;function s(u,c){let f,d={...(0,ol.useContext)(al),...u,layoutId:nq(u)},{isStatic:p}=d,h=uM(u),v=o(u,p);if(!p&&typeof window<"u"){rq(d,n);let S=iq(d);f=S.MeasureLayout,h.visualElement=AM(e,v,d,r,S.ProjectionNode,i)}return(0,Pm.jsxs)(hi.Provider,{value:h,children:[f&&h.visualElement?(0,Pm.jsx)(f,{visualElement:h.visualElement,...d}):null,yM(e,u,_M(v,h.visualElement,c),v,p,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let l=(0,ol.forwardRef)(s);return l[LM]=e,l}function nq({layoutId:e}){let t=(0,ol.useContext)(Rs).id;return t&&e!==void 0?t+"-"+e:e}function rq(e,t){let a=(0,ol.useContext)(_m).strict}function iq(e){let t=km(),{drag:a,layout:n}=t;if(!a&&!n)return{};let r={...a,...n};return{MeasureLayout:a?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var Pm,ol,MM=m(()=>{"use strict";"use client";Pm=H(ir(),1),ol=H(re(),1);Kd();Ub();Cm();Fc();cM();vM();Dm();bM();wM();zb();eM();IM();kM();DM()});function RM(e,t){if(typeof Proxy>"u")return Om;let a=new Map,n=(i,o)=>Om(i,o,e,t),r=(i,o)=>n(i,o);return new Proxy(r,{get:(i,o)=>o==="create"?n:(a.has(o)||a.set(o,Om(o,void 0,e,t)),a.get(o))})}var PM=m(()=>{"use strict";MM()});var OM,BM,FM=m(()=>{"use strict";ge();OM=H(re(),1);Dm();BM=(e,t)=>t.isSVG??rl(e)?new Dc(t):new kc(t,{allowProjection:e!==OM.Fragment})});var Bm,UM=m(()=>{"use strict";ge();Bm=class extends wt{constructor(t){super(t),t.animationState||(t.animationState=hb(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();dr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:a}=this.node.prevProps||{};t!==a&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}});var oq,Fm,zM=m(()=>{"use strict";ge();oq=0,Fm=class extends wt{constructor(){super(...arguments),this.id=oq++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:a}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&n===!1){if(this.isExitComplete){let{initial:i,custom:o}=this.node.getProps();if(typeof i=="string"||typeof i=="object"&&i!==null&&!Array.isArray(i)){let s=ka(this.node,i,o);if(s){let{transition:l,transitionEnd:u,...c}=s;for(let f in c)this.node.getValue(f)?.jump(c[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive("exit",!t);a&&!t&&r.then(()=>{this.isExitComplete=!0,a(this.id)})}mount(){let{register:t,onExitComplete:a}=this.node.presenceContext||{};a&&a(this.id),t&&(this.unmount=t(this.id))}unmount(){}}});var VM,NM=m(()=>{"use strict";UM();zM();VM={animation:{Feature:Bm},exit:{Feature:Fm}}});function hr(e){return{point:{x:e.pageX,y:e.pageY}}}var HM,sl=m(()=>{"use strict";ge();HM=e=>t=>ro(t)&&e(t,hr(t))});function xi(e,t,a,n){return kn(e,t,HM(a),n)}var Um=m(()=>{"use strict";ge();sl()});var zm,Wb=m(()=>{"use strict";zm=({current:e})=>e?e.ownerDocument.defaultView:null});function jM(e,t){let a=qM(e.x,t.x),n=qM(e.y,t.y);return Math.sqrt(a**2+n**2)}var qM,GM=m(()=>{"use strict";qM=(e,t)=>Math.abs(e-t)});function Vm(e,t){return t?{point:t(e.point)}:e}function WM(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Kb({point:e},t){return{point:e,delta:WM(e,KM(t)),offset:WM(e,sq(t)),velocity:lq(t,.1)}}function sq(e){return e[0]}function KM(e){return e[e.length-1]}function lq(e,t){if(e.length<2)return{x:0,y:0};let a=e.length-1,n=null,r=KM(e);for(;a>=0&&(n=e[a],!(r.timestamp-n.timestamp>it(t)));)a--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&r.timestamp-n.timestamp>it(t)*2&&(n=e[1]);let i=At(r.timestamp-n.timestamp);if(i===0)return{x:0,y:0};let o={x:(r.x-n.x)/i,y:(r.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var XM,ll,Yb=m(()=>{"use strict";ge();$();Um();sl();GM();XM=new Set(["auto","scroll"]),ll=class{constructor(t,a,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Vm(this.lastRawMoveEventInfo,this.transformPagePoint));let h=Kb(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,S=jM(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!S)return;let{point:g}=h,{timestamp:x}=Je;this.history.push({...g,timestamp:x});let{onStart:y,onMove:b}=this.handlers;v||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,h)},this.handlePointerMove=(h,v)=>{this.lastMoveEvent=h,this.lastRawMoveEventInfo=v,this.lastMoveEventInfo=Vm(v,this.transformPagePoint),te.update(this.updatePoint,!0)},this.handlePointerUp=(h,v)=>{this.end();let{onEnd:S,onSessionEnd:g,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let y=Kb(h.type==="pointercancel"?this.lastMoveEventInfo:Vm(v,this.transformPagePoint),this.history);this.startEvent&&S&&S(h,y),g&&g(h,y)},!ro(t))return;this.dragSnapToOrigin=i,this.handlers=a,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;let l=hr(t),u=Vm(l,this.transformPagePoint),{point:c}=u,{timestamp:f}=Je;this.history=[{...c,timestamp:f}];let{onSessionStart:d}=a;d&&d(t,Kb(u,this.history));let p={passive:!0,capture:!0};this.removeListeners=on(xi(this.contextWindow,"pointermove",this.handlePointerMove,p),xi(this.contextWindow,"pointerup",this.handlePointerUp,p),xi(this.contextWindow,"pointercancel",this.handlePointerUp,p)),s&&this.startScrollTracking(s)}startScrollTracking(t){let a=t.parentElement;for(;a;){let n=getComputedStyle(a);(XM.has(n.overflowX)||XM.has(n.overflowY))&&this.scrollPositions.set(a,{x:a.scrollLeft,y:a.scrollTop}),a=a.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){let a=this.scrollPositions.get(t);if(!a)return;let n=t===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:r.x-a.x,y:r.y-a.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,r),te.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),da(this.updatePoint)}}});function JM(e,{min:t,max:a},n){return t!==void 0&&e<t?e=n?ne(t,e,n.min):Math.max(e,t):a!==void 0&&e>a&&(e=n?ne(a,e,n.max):Math.min(e,a)),e}function YM(e,t,a){return{min:t!==void 0?e.min+t:void 0,max:a!==void 0?e.max+a-(e.max-e.min):void 0}}function eR(e,{top:t,left:a,bottom:n,right:r}){return{x:YM(e.x,a,r),y:YM(e.y,t,n)}}function ZM(e,t){let a=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([a,n]=[n,a]),{min:a,max:n}}function tR(e,t){return{x:ZM(e.x,t.x),y:ZM(e.y,t.y)}}function aR(e,t){let a=.5,n=gt(e),r=gt(t);return r>n?a=vn(t.min,t.max-n,e.min):n>r&&(a=vn(e.min,e.max-r,t.min)),bt(0,1,a)}function nR(e,t){let a={};return t.min!==void 0&&(a.min=t.min-e.min),t.max!==void 0&&(a.max=t.max-e.min),a}function rR(e=Nm){return e===!1?e=0:e===!0&&(e=Nm),{x:QM(e,"left","right"),y:QM(e,"top","bottom")}}function QM(e,t,a){return{min:$M(e,t),max:$M(e,a)}}function $M(e,t){return typeof e=="number"?e:e[t]||0}var Nm,iR=m(()=>{"use strict";ge();$();Nm=.35});function oR(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function cq(e,t,a){let n=nm(e,oR(a)),r=nm(t,oR(a));return()=>{n(),r()}}function Hm(e,t,a){return(t===!0||t===e)&&(a===null||a===e)}function fq(e,t=10){let a=null;return Math.abs(e.y)>t?a="y":Math.abs(e.x)>t&&(a="x"),a}var uq,qm,sR=m(()=>{"use strict";ge();$();Um();sl();Wb();Xb();Yb();iR();uq=new WeakMap,qm=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=je(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:a=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=f=>{a&&this.snapToCursor(hr(f).point),this.stopAnimation()},o=(f,d)=>{let{drag:p,dragPropagation:h,onDragStart:v}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=MS(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ta(g=>{let x=this.getAxisMotionValue(g).get()||0;if(jt.test(x)){let{projection:y}=this.visualElement;if(y&&y.layout){let b=y.layout.layoutBox[g];b&&(x=gt(b)*(parseFloat(x)/100))}}this.originPoint[g]=x}),v&&te.update(()=>v(f,d),!1,!0),Ks(this.visualElement,"transform");let{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},s=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;let{dragPropagation:p,dragDirectionLock:h,onDirectionLock:v,onDrag:S}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:g}=d;if(h&&this.currentDirection===null){this.currentDirection=fq(g),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),S&&te.update(()=>S(f,d),!1,!0)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{let{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new ll(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:n,contextWindow:zm(this.visualElement),element:this.visualElement.current})}stop(t,a){let n=t||this.latestPointerEvent,r=a||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:s}=this.getProps();s&&te.postRender(()=>s(n,r))}cancel(){this.isDragging=!1;let{projection:t,animationState:a}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),a&&a.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,a,n){let{drag:r}=this.getProps();if(!n||!Hm(t,r,this.currentDirection))return;let i=this.getAxisMotionValue(t),o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=JM(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){let{dragConstraints:t,dragElastic:a}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&gi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=eR(n.layoutBox,t):this.constraints=!1,this.elastic=rR(a),r!==this.constraints&&!gi(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ta(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=nR(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:a}=this.getProps();if(!t||!gi(t))return!1;let n=t.current;fa(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=rb(n,r.root,this.visualElement.getTransformPagePoint()),o=tR(r.layout.layoutBox,i);if(a){let s=a(ZS(o));this.hasMutatedConstraints=!!s,s&&(o=Cc(s))}return o}startAnimation(t){let{drag:a,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Ta(c=>{if(!Hm(c,a,this.currentDirection))return;let f=l&&l[c]||{};(o===!0||o===c)&&(f={min:0,max:0});let d=r?200:1e6,p=r?40:1e7,h={type:"inertia",velocity:n?t[c]:0,bounceStiffness:d,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(c,h)});return Promise.all(u).then(s)}startAxisValueAnimation(t,a){let n=this.getAxisMotionValue(t);return Ks(this.visualElement,t),n.start(Ji(t,n,0,a,this.visualElement,!1))}stopAnimation(){Ta(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let a=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps()[a];return r||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Ta(a=>{let{drag:n}=this.getProps();if(!Hm(a,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(a);if(r&&r.layout){let{min:o,max:s}=r.layout.layoutBox[a],l=i.get()||0;i.set(t[a]-ne(o,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:a}=this.getProps(),{projection:n}=this.visualElement;if(!gi(a)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Ta(o=>{let s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){let l=s.get();r[o]=aR({min:l,max:l},this.constraints[o])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ta(o=>{if(!Hm(o,t,null))return;let s=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];s.set(ne(l,u,r[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;uq.set(this.visualElement,this);let t=this.visualElement.current,a=xi(t,"pointerdown",u=>{let{drag:c,dragListener:f=!0}=this.getProps(),d=u.target,p=d!==t&&US(d);c&&f&&!p&&this.start(u)}),n,r=()=>{let{dragConstraints:u}=this.getProps();gi(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),n||(n=cq(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),te.read(r);let s=kn(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ta(f=>{let d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=u[f].translate,d.set(d.get()+u[f].translate))}),this.visualElement.render())}));return()=>{s(),a(),o(),l&&l(),n&&n()}}getProps(){let t=this.visualElement.getProps(),{drag:a=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Nm,dragMomentum:s=!0}=t;return{...t,drag:a,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}});var jm,lR=m(()=>{"use strict";ge();$();sR();jm=class extends wt{constructor(t){super(t),this.removeGroupControls=Xe,this.removeListeners=Xe,this.controls=new qm(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xe}update(){let{dragControls:t}=this.node.getProps(),{dragControls:a}=this.node.prevProps||{};t!==a&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}});var Zb,Gm,uR=m(()=>{"use strict";ge();$();Um();Wb();Yb();Zb=e=>(t,a)=>{e&&te.update(()=>e(t,a),!1,!0)},Gm=class extends wt{constructor(){super(...arguments),this.removePointerDownListener=Xe}onPointerDown(t){this.session=new ll(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zm(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:a,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Zb(t),onStart:Zb(a),onMove:Zb(n),onEnd:(i,o)=>{delete this.session,r&&te.postRender(()=>r(i,o))}}}mount(){this.removePointerDownListener=xi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}});function Xm(e){let[t,a]=Lm(),n=(0,Uc.useContext)(Rs);return(0,cR.jsx)($b,{...e,layoutGroup:n,switchLayoutGroup:(0,Uc.useContext)(Rm),isPresent:t,safeToRemove:a})}var cR,Uc,Qb,$b,Jb=m(()=>{"use strict";"use client";cR=H(ir(),1);ge();Uc=H(re(),1);Bb();Kd();Gb();Qb=!1,$b=class extends Uc.Component{componentDidMount(){let{visualElement:t,layoutGroup:a,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=t;i&&(a.group&&a.group.add(i),n&&n.register&&r&&n.register(i),Qb&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),fo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:a,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o&&(o.isPresent=i,t.layoutDependency!==a&&o.setOptions({...o.options,layoutDependency:a}),Qb=!0,r||t.layoutDependency!==a||a===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||te.postRender(()=>{let s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:t,layoutAnchor:a}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=a,n.root.didUpdate(),no.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:a,switchLayoutGroup:n}=this.props,{projection:r}=t;Qb=!0,r&&(r.scheduleCheckAfterUnmount(),a&&a.group&&a.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}});var fR,dR=m(()=>{"use strict";lR();uR();Jb();ge();fR={pan:{Feature:Gm},drag:{Feature:jm,ProjectionNode:Mc,MeasureLayout:Xm}}});function pR(e,t,a){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",a==="Start");let r="onHover"+a,i=n[r];i&&te.postRender(()=>i(t,hr(t)))}var Wm,mR=m(()=>{"use strict";ge();sl();Wm=class extends wt{mount(){let{current:t}=this.node;t&&(this.unmount=PS(t,(a,n)=>(pR(this.node,n,"Start"),r=>pR(this.node,r,"End"))))}unmount(){}}});var Km,hR=m(()=>{"use strict";ge();$();Km=class extends wt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=on(kn(this.node.current,"focus",()=>this.onFocus()),kn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}});function gR(e,t,a){let{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",a==="Start");let r="onTap"+(a==="End"?"":a),i=n[r];i&&te.postRender(()=>i(t,hr(t)))}var Ym,xR=m(()=>{"use strict";ge();sl();Ym=class extends wt{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:a,propagate:n}=this.node.props;this.unmount=HS(t,(r,i)=>(gR(this.node,i,"Start"),(o,{success:s})=>gR(this.node,o,s?"End":"Cancel")),{useGlobalTarget:a,stopPropagation:n?.tap===!1})}unmount(){}}});function mq({root:e,...t}){let a=e||document;e0.has(a)||e0.set(a,{});let n=e0.get(a),r=JSON.stringify(t);return n[r]||(n[r]=new IntersectionObserver(pq,{root:e,...t})),n[r]}function yR(e,t,a){let n=mq(t);return t0.set(e,a),n.observe(e),()=>{t0.delete(e),n.unobserve(e)}}var t0,e0,dq,pq,vR=m(()=>{"use strict";t0=new WeakMap,e0=new WeakMap,dq=e=>{let t=t0.get(e.target);t&&t(e)},pq=e=>{e.forEach(dq)}});function gq({viewport:e={}},{viewport:t={}}={}){return a=>e[a]!==t[a]}var hq,Zm,SR=m(()=>{"use strict";ge();vR();hq={some:0,all:1},Zm=class extends wt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:t={}}=this.node.getProps(),{root:a,margin:n,amount:r="some",once:i}=t,o={root:a?a.current:void 0,rootMargin:n,threshold:typeof r=="number"?r:hq[r]},s=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};this.stopObserver=yR(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:a}=this.node;["amount","margin","root"].some(gq(t,a))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}});var bR,CR=m(()=>{"use strict";mR();hR();xR();SR();bR={inView:{Feature:Zm},tap:{Feature:Ym},focus:{Feature:Km},hover:{Feature:Wm}}});var wR,LR=m(()=>{"use strict";ge();Jb();wR={layout:{ProjectionNode:Mc,MeasureLayout:Xm}}});var IR,_R=m(()=>{"use strict";NM();dR();CR();LR();IR={...VM,...bR,...fR,...wR}});var Tn,kR=m(()=>{"use strict";FM();PM();_R();Tn=RM(IR,BM)});var TR=m(()=>{"use strict";YD();kR();ge();$()});function AR(e,t){let a=t||{};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}var ER=m(()=>{"use strict"});function Qm(e,t){return((t||vq).jsx?yq:xq).test(e)}var xq,yq,vq,DR=m(()=>{"use strict";xq=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yq=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vq={}});var MR=m(()=>{"use strict";DR()});function a0(e){return typeof e=="object"?e.type==="text"?RR(e.value):!1:RR(e)}function RR(e){return e.replace(Sq,"")===""}var Sq,PR=m(()=>{"use strict";Sq=/[ \t\n\f\r]/g});var OR=m(()=>{"use strict";PR()});var gr,n0=m(()=>{"use strict";gr=class{constructor(t,a,n){this.normal=a,this.property=t,n&&(this.space=n)}};gr.prototype.normal={};gr.prototype.property={};gr.prototype.space=void 0});function r0(e,t){let a={},n={};for(let r of e)Object.assign(a,r.property),Object.assign(n,r.normal);return new gr(a,n,t)}var BR=m(()=>{"use strict";n0()});function zc(e){return e.toLowerCase()}var i0=m(()=>{"use strict"});var Et,o0=m(()=>{"use strict";Et=class{constructor(t,a){this.attribute=a,this.property=t}};Et.prototype.attribute="";Et.prototype.booleanish=!1;Et.prototype.boolean=!1;Et.prototype.commaOrSpaceSeparated=!1;Et.prototype.commaSeparated=!1;Et.prototype.defined=!1;Et.prototype.mustUseProperty=!1;Et.prototype.number=!1;Et.prototype.overloadedBoolean=!1;Et.prototype.property="";Et.prototype.spaceSeparated=!1;Et.prototype.space=void 0});var Vc={};Cg(Vc,{boolean:()=>K,booleanish:()=>et,commaOrSpaceSeparated:()=>pa,commaSeparated:()=>xr,number:()=>R,overloadedBoolean:()=>$m,spaceSeparated:()=>ye});function ho(){return 2**++bq}var bq,K,et,$m,R,ye,xr,pa,Nc=m(()=>{"use strict";bq=0,K=ho(),et=ho(),$m=ho(),R=ho(),ye=ho(),xr=ho(),pa=ho()});function FR(e,t,a){a&&(e[t]=a)}var s0,go,l0=m(()=>{"use strict";o0();Nc();s0=Object.keys(Vc),go=class extends Et{constructor(t,a,n,r){let i=-1;if(super(t,a),FR(this,"space",r),typeof n=="number")for(;++i<s0.length;){let o=s0[i];FR(this,s0[i],(n&Vc[o])===Vc[o])}}};go.prototype.defined=!0});function Qa(e){let t={},a={};for(let[n,r]of Object.entries(e.properties)){let i=new go(n,e.transform(e.attributes||{},n),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,a[zc(n)]=n,a[zc(i.attribute)]=n}return new gr(t,a,e.space)}var xo=m(()=>{"use strict";i0();l0();n0()});var u0,UR=m(()=>{"use strict";xo();Nc();u0=Qa({properties:{ariaActiveDescendant:null,ariaAtomic:et,ariaAutoComplete:null,ariaBusy:et,ariaChecked:et,ariaColCount:R,ariaColIndex:R,ariaColSpan:R,ariaControls:ye,ariaCurrent:null,ariaDescribedBy:ye,ariaDetails:null,ariaDisabled:et,ariaDropEffect:ye,ariaErrorMessage:null,ariaExpanded:et,ariaFlowTo:ye,ariaGrabbed:et,ariaHasPopup:null,ariaHidden:et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ye,ariaLevel:R,ariaLive:null,ariaModal:et,ariaMultiLine:et,ariaMultiSelectable:et,ariaOrientation:null,ariaOwns:ye,ariaPlaceholder:null,ariaPosInSet:R,ariaPressed:et,ariaReadOnly:et,ariaRelevant:null,ariaRequired:et,ariaRoleDescription:ye,ariaRowCount:R,ariaRowIndex:R,ariaRowSpan:R,ariaSelected:et,ariaSetSize:R,ariaSort:null,ariaValueMax:R,ariaValueMin:R,ariaValueNow:R,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}})});function Jm(e,t){return t in e?e[t]:t}var c0=m(()=>{"use strict"});function eh(e,t){return Jm(e,t.toLowerCase())}var f0=m(()=>{"use strict";c0()});var zR,VR=m(()=>{"use strict";f0();xo();Nc();zR=Qa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xr,acceptCharset:ye,accessKey:ye,action:null,allow:null,allowFullScreen:K,allowPaymentRequest:K,allowUserMedia:K,alpha:K,alt:null,as:null,async:K,autoCapitalize:null,autoComplete:ye,autoFocus:K,autoPlay:K,blocking:ye,capture:null,charSet:null,checked:K,cite:null,className:ye,closedBy:null,colorSpace:null,cols:R,colSpan:R,command:null,commandFor:null,content:null,contentEditable:et,controls:K,controlsList:ye,coords:R|xr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:K,defer:K,dir:null,dirName:null,disabled:K,download:$m,draggable:et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:K,formTarget:null,headers:ye,height:R,hidden:$m,high:R,href:null,hrefLang:null,htmlFor:ye,httpEquiv:ye,id:null,imageSizes:null,imageSrcSet:null,inert:K,inputMode:null,integrity:null,is:null,isMap:K,itemId:null,itemProp:ye,itemRef:ye,itemScope:K,itemType:ye,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:K,low:R,manifest:null,max:null,maxLength:R,media:null,method:null,min:null,minLength:R,multiple:K,muted:K,name:null,nonce:null,noModule:K,noValidate:K,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:K,optimum:R,pattern:null,ping:ye,placeholder:null,playsInline:K,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:K,referrerPolicy:null,rel:ye,required:K,reversed:K,rows:R,rowSpan:R,sandbox:ye,scope:null,scoped:K,seamless:K,selected:K,shadowRootClonable:K,shadowRootCustomElementRegistry:K,shadowRootDelegatesFocus:K,shadowRootMode:null,shadowRootSerializable:K,shape:null,size:R,sizes:null,slot:null,span:R,spellCheck:et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:R,step:null,style:null,tabIndex:R,target:null,title:null,translate:null,type:null,typeMustMatch:K,useMap:null,value:et,width:R,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ye,axis:null,background:null,bgColor:null,border:R,borderColor:null,bottomMargin:R,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:K,declare:K,event:null,face:null,frame:null,frameBorder:null,hSpace:R,leftMargin:R,link:null,longDesc:null,lowSrc:null,marginHeight:R,marginWidth:R,noResize:K,noHref:K,noShade:K,noWrap:K,object:null,profile:null,prompt:null,rev:null,rightMargin:R,rules:null,scheme:null,scrolling:et,standby:null,summary:null,text:null,topMargin:R,valueType:null,version:null,vAlign:null,vLink:null,vSpace:R,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:K,disablePictureInPicture:K,disableRemotePlayback:K,exportParts:xr,part:ye,prefix:null,property:null,results:R,security:null,unselectable:null},space:"html",transform:eh})});var NR,HR=m(()=>{"use strict";c0();xo();Nc();NR=Qa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:pa,accentHeight:R,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:R,amplitude:R,arabicForm:null,ascent:R,attributeName:null,attributeType:null,azimuth:R,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:R,by:null,calcMode:null,capHeight:R,className:ye,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:R,diffuseConstant:R,direction:null,display:null,dur:null,divisor:R,dominantBaseline:null,download:K,dx:null,dy:null,edgeMode:null,editable:null,elevation:R,enableBackground:null,end:null,event:null,exponent:R,externalResourcesRequired:null,fill:null,fillOpacity:R,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:xr,g2:xr,glyphName:xr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:R,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:R,horizOriginX:R,horizOriginY:R,id:null,ideographic:R,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:R,k:R,k1:R,k2:R,k3:R,k4:R,kernelMatrix:pa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:R,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:R,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:R,overlineThickness:R,paintOrder:null,panose1:null,path:null,pathLength:R,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ye,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:R,pointsAtY:R,pointsAtZ:R,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pa,rev:pa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pa,requiredFeatures:pa,requiredFonts:pa,requiredFormats:pa,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:R,specularExponent:R,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:R,strikethroughThickness:R,string:null,stroke:null,strokeDashArray:pa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:R,strokeOpacity:R,strokeWidth:null,style:null,surfaceScale:R,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pa,tabIndex:R,tableValues:null,target:null,targetX:R,targetY:R,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:R,underlineThickness:R,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:R,values:null,vAlphabetic:R,vMathematical:R,vectorEffect:null,vHanging:R,vIdeographic:R,version:null,vertAdvY:R,vertOriginX:R,vertOriginY:R,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:R,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Jm})});var d0,qR=m(()=>{"use strict";xo();d0=Qa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}})});var p0,jR=m(()=>{"use strict";xo();f0();p0=Qa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:eh})});var m0,GR=m(()=>{"use strict";xo();m0=Qa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}})});var h0,XR=m(()=>{"use strict";h0={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"}});function g0(e,t){let a=zc(t),n=t,r=Et;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&wq.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(WR,Iq);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!WR.test(i)){let o=i.replace(Cq,Lq);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}r=go}return new r(n,t)}function Lq(e){return"-"+e.toLowerCase()}function Iq(e){return e.charAt(1).toUpperCase()}var Cq,WR,wq,KR=m(()=>{"use strict";l0();o0();i0();Cq=/[A-Z]/g,WR=/-[a-z]/g,wq=/^data[-\w.:]+$/i});var YR,th,ZR=m(()=>{"use strict";BR();UR();VR();HR();qR();jR();GR();XR();KR();YR=r0([u0,zR,d0,p0,m0],"html"),th=r0([u0,NR,d0,p0,m0],"svg")});function QR(e){return e.join(" ").trim()}var $R=m(()=>{"use strict"});var r2=It((Xue,n2)=>{"use strict";var JR=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,_q=/\n/g,kq=/^\s*/,Tq=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Aq=/^:\s*/,Eq=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Dq=/^[;\s]*/,Mq=/^\s+|\s+$/g,Rq=`
|
|
18
|
+
`,e2="/",t2="*",yo="",Pq="comment",Oq="declaration";function Bq(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var a=1,n=1;function r(h){var v=h.match(_q);v&&(a+=v.length);var S=h.lastIndexOf(Rq);n=~S?h.length-S:n+h.length}function i(){var h={line:a,column:n};return function(v){return v.position=new o(h),u(),v}}function o(h){this.start=h,this.end={line:a,column:n},this.source=t.source}o.prototype.content=e;function s(h){var v=new Error(t.source+":"+a+":"+n+": "+h);if(v.reason=h,v.filename=t.source,v.line=a,v.column=n,v.source=e,!t.silent)throw v}function l(h){var v=h.exec(e);if(v){var S=v[0];return r(S),e=e.slice(S.length),v}}function u(){l(kq)}function c(h){var v;for(h=h||[];v=f();)v!==!1&&h.push(v);return h}function f(){var h=i();if(!(e2!=e.charAt(0)||t2!=e.charAt(1))){for(var v=2;yo!=e.charAt(v)&&(t2!=e.charAt(v)||e2!=e.charAt(v+1));)++v;if(v+=2,yo===e.charAt(v-1))return s("End of comment missing");var S=e.slice(2,v-2);return n+=2,r(S),e=e.slice(v),n+=2,h({type:Pq,comment:S})}}function d(){var h=i(),v=l(Tq);if(v){if(f(),!l(Aq))return s("property missing ':'");var S=l(Eq),g=h({type:Oq,property:a2(v[0].replace(JR,yo)),value:S?a2(S[0].replace(JR,yo)):yo});return l(Dq),g}}function p(){var h=[];c(h);for(var v;v=d();)v!==!1&&(h.push(v),c(h));return h}return u(),p()}function a2(e){return e?e.replace(Mq,yo):yo}n2.exports=Bq});var i2=It(Hc=>{"use strict";var Fq=Hc&&Hc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hc,"__esModule",{value:!0});Hc.default=zq;var Uq=Fq(r2());function zq(e,t){let a=null;if(!e||typeof e!="string")return a;let n=(0,Uq.default)(e),r=typeof t=="function";return n.forEach(i=>{if(i.type!=="declaration")return;let{property:o,value:s}=i;r?t(o,s,i):s&&(a=a||{},a[o]=s)}),a}});var s2=It(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0});ah.camelCase=void 0;var Vq=/^--[a-zA-Z0-9_-]+$/,Nq=/-([a-z])/g,Hq=/^[^-]+$/,qq=/^-(webkit|moz|ms|o|khtml)-/,jq=/^-(ms)-/,Gq=function(e){return!e||Hq.test(e)||Vq.test(e)},Xq=function(e,t){return t.toUpperCase()},o2=function(e,t){return"".concat(t,"-")},Wq=function(e,t){return t===void 0&&(t={}),Gq(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(jq,o2):e=e.replace(qq,o2),e.replace(Nq,Xq))};ah.camelCase=Wq});var u2=It((y0,l2)=>{"use strict";var Kq=y0&&y0.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Yq=Kq(i2()),Zq=s2();function x0(e,t){var a={};return!e||typeof e!="string"||(0,Yq.default)(e,function(n,r){n&&r&&(a[(0,Zq.camelCase)(n,t)]=r)}),a}x0.default=x0;l2.exports=x0});function c2(e){return t;function t(a){let n=a&&a.position&&a.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function v0(e){let t=ul(e),a=nh(e);if(t&&a)return{start:t,end:a}}var nh,ul,f2=m(()=>{"use strict";nh=c2("end"),ul=c2("start")});var rh=m(()=>{"use strict";f2()});function yi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?d2(e.position):"start"in e||"end"in e?d2(e):"line"in e||"column"in e?S0(e):""}function S0(e){return p2(e&&e.line)+":"+p2(e&&e.column)}function d2(e){return S0(e&&e.start)+"-"+S0(e&&e.end)}function p2(e){return e&&typeof e=="number"?e:1}var m2=m(()=>{"use strict"});var b0=m(()=>{"use strict";m2()});var ot,h2=m(()=>{"use strict";b0();ot=class extends Error{constructor(t,a,n){super(),typeof a=="string"&&(n=a,a=void 0);let r="",i={},o=!1;if(a&&("line"in a&&"column"in a?i={place:a}:"start"in a&&"end"in a?i={place:a}:"type"in a?i={ancestors:[a],place:a.position}:i={...a}),typeof t=="string"?r=t:!i.cause&&t&&(o=!0,r=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof n=="string"){let l=n.indexOf(":");l===-1?i.ruleId=n:(i.source=n.slice(0,l),i.ruleId=n.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){let l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}let s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=s?s.line:void 0,this.name=yi(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ot.prototype.file="";ot.prototype.name="";ot.prototype.reason="";ot.prototype.message="";ot.prototype.stack="";ot.prototype.column=void 0;ot.prototype.line=void 0;ot.prototype.ancestors=void 0;ot.prototype.cause=void 0;ot.prototype.fatal=void 0;ot.prototype.place=void 0;ot.prototype.ruleId=void 0;ot.prototype.source=void 0});var C0=m(()=>{"use strict";h2()});function L0(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let a=t.filePath||void 0,n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=l6(a,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=s6(a,t.jsx,t.jsxs)}let r={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?th:YR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=y2(r,e,void 0);return i&&typeof i!="string"?i:r.create(e,r.Fragment,{children:i||void 0},void 0)}function y2(e,t,a){if(t.type==="element")return t6(e,t,a);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return a6(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return r6(e,t,a);if(t.type==="mdxjsEsm")return n6(e,t);if(t.type==="root")return i6(e,t,a);if(t.type==="text")return o6(e,t)}function t6(e,t,a){let n=e.schema,r=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=th,e.schema=r),e.ancestors.push(t);let i=S2(e,t.tagName,!1),o=u6(e,t),s=_0(e,t);return Jq.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!a0(l):!0})),v2(e,o,i,t),I0(o,s),e.ancestors.pop(),e.schema=n,e.create(t,i,o,a)}function a6(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}qc(e,t.position)}function n6(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qc(e,t.position)}function r6(e,t,a){let n=e.schema,r=n;t.name==="svg"&&n.space==="html"&&(r=th,e.schema=r),e.ancestors.push(t);let i=t.name===null?e.Fragment:S2(e,t.name,!0),o=c6(e,t),s=_0(e,t);return v2(e,o,i,t),I0(o,s),e.ancestors.pop(),e.schema=n,e.create(t,i,o,a)}function i6(e,t,a){let n={};return I0(n,_0(e,t)),e.create(t,e.Fragment,n,a)}function o6(e,t){return t.value}function v2(e,t,a,n){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(t.node=n)}function I0(e,t){if(t.length>0){let a=t.length>1?t:t[0];a&&(e.children=a)}}function s6(e,t,a){return n;function n(r,i,o,s){let u=Array.isArray(o.children)?a:t;return s?u(i,o,s):u(i,o)}}function l6(e,t){return a;function a(n,r,i,o){let s=Array.isArray(i.children),l=ul(n);return t(r,i,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function u6(e,t){let a={},n,r;for(r in t.properties)if(r!=="children"&&w0.call(t.properties,r)){let i=f6(e,r,t.properties[r]);if(i){let[o,s]=i;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&e6.has(t.tagName)?n=s:a[o]=s}}if(n){let i=a.style||(a.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return a}function c6(e,t){let a={};for(let n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){let i=n.data.estree.body[0];i.type;let o=i.expression;o.type;let s=o.properties[0];s.type,Object.assign(a,e.evaluater.evaluateExpression(s.argument))}else qc(e,t.position);else{let r=n.name,i;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){let s=n.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else qc(e,t.position);else i=n.value===null?!0:n.value;a[r]=i}return a}function _0(e,t){let a=[],n=-1,r=e.passKeys?new Map:Qq;for(;++n<t.children.length;){let i=t.children[n],o;if(e.passKeys){let l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){let u=r.get(l)||0;o=l+"-"+u,r.set(l,u+1)}}let s=y2(e,i,o);s!==void 0&&a.push(s)}return a}function f6(e,t,a){let n=g0(e.schema,t);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=n.commaSeparated?AR(a):QR(a)),n.property==="style"){let r=typeof a=="object"?a:d6(e,String(a));return e.stylePropertyNameCase==="css"&&(r=p6(r)),["style",r]}return[e.elementAttributeNameCase==="react"&&n.space?h0[n.property]||n.property:n.attribute,a]}}function d6(e,t){try{return(0,g2.default)(t,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};let n=a,r=new ot("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=x2+"#cannot-parse-style-attribute",r}}function S2(e,t,a){let n;if(!a)n={type:"Literal",value:t};else if(t.includes(".")){let r=t.split("."),i=-1,o;for(;++i<r.length;){let s=Qm(r[i])?{type:"Identifier",name:r[i]}:{type:"Literal",value:r[i]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}n=o}else n=Qm(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){let r=n.value;return w0.call(e.components,r)?e.components[r]:r}if(e.evaluater)return e.evaluater.evaluateExpression(n);qc(e)}function qc(e,t){let a=new ot("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=x2+"#cannot-handle-mdx-estrees-without-createevaluater",a}function p6(e){let t={},a;for(a in e)w0.call(e,a)&&(t[m6(a)]=e[a]);return t}function m6(e){let t=e.replace($q,h6);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function h6(e){return"-"+e.toLowerCase()}var g2,w0,Qq,$q,Jq,e6,x2,b2=m(()=>{"use strict";ER();MR();OR();ZR();$R();g2=H(u2(),1);rh();C0();w0={}.hasOwnProperty,Qq=new Map,$q=/[A-Z]/g,Jq=new Set(["table","tbody","thead","tfoot","tr"]),e6=new Set(["td","th"]),x2="https://github.com/syntax-tree/hast-util-to-jsx-runtime"});var C2=m(()=>{"use strict";b2()});var jc,w2=m(()=>{"use strict";jc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]}});var L2=m(()=>{"use strict";w2()});function vo(e,t){let a=t||g6,n=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,r=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return _2(e,n,r)}function _2(e,t,a){if(x6(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return I2(e.children,t,a)}return Array.isArray(e)?I2(e,t,a):""}function I2(e,t,a){let n=[],r=-1;for(;++r<e.length;)n[r]=_2(e[r],t,a);return n.join("")}function x6(e){return!!(e&&typeof e=="object")}var g6,k2=m(()=>{"use strict";g6={}});var ih=m(()=>{"use strict";k2()});function cl(e){let t="&"+e+";";T2.innerHTML=t;let a=T2.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===t?!1:a}var T2,oh=m(()=>{"use strict";T2=document.createElement("i")});function st(e,t,a,n){let r=e.length,i=0,o;if(t<0?t=-t>r?0:r+t:t=t>r?r:t,a=a>0?a:0,n.length<1e4)o=Array.from(n),o.unshift(t,a),e.splice(...o);else for(a&&e.splice(t,a);i<n.length;)o=n.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function ea(e,t){return e.length>0?(st(e,e.length,0,t),e):t}var yr=m(()=>{"use strict"});function sh(e){let t={},a=-1;for(;++a<e.length;)y6(t,e[a]);return t}function y6(e,t){let a;for(a in t){let r=(A2.call(e,a)?e[a]:void 0)||(e[a]={}),i=t[a],o;if(i)for(o in i){A2.call(r,o)||(r[o]=[]);let s=i[o];v6(r[o],Array.isArray(s)?s:s?[s]:[])}}}function v6(e,t){let a=-1,n=[];for(;++a<t.length;)(t[a].add==="after"?e:n).push(t[a]);st(e,0,0,n)}var A2,k0=m(()=>{"use strict";yr();A2={}.hasOwnProperty});function lh(e,t){let a=Number.parseInt(e,t);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"\uFFFD":String.fromCodePoint(a)}var T0=m(()=>{"use strict"});function Gt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var fl=m(()=>{"use strict"});function So(e){return e!==null&&(e<32||e===127)}function F(e){return e!==null&&e<-2}function ie(e){return e!==null&&(e<0||e===32)}function X(e){return e===-2||e===-1||e===32}function vi(e){return t;function t(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}var Lt,tt,E2,Gc,D2,M2,bo,An,de=m(()=>{"use strict";Lt=vi(/[A-Za-z]/),tt=vi(/[\dA-Za-z]/),E2=vi(/[#-'*+\--9=?A-Z^-~]/);Gc=vi(/\d/),D2=vi(/[\dA-Fa-f]/),M2=vi(/[!-/:-@[-`{-~]/);bo=vi(/\p{P}|\p{S}/u),An=vi(/\s/)});function $a(e){let t=[],a=-1,n=0,r=0;for(;++a<e.length;){let i=e.charCodeAt(a),o="";if(i===37&&tt(e.charCodeAt(a+1))&&tt(e.charCodeAt(a+2)))r=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){let s=e.charCodeAt(a+1);i<56320&&s>56319&&s<57344?(o=String.fromCharCode(i,s),r=1):o="\uFFFD"}else o=String.fromCharCode(i);o&&(t.push(e.slice(n,a),encodeURIComponent(o)),n=a+r+1,o=""),r&&(a+=r,r=0)}return t.join("")+e.slice(n)}var Co=m(()=>{"use strict";de()});function j(e,t,a,n){let r=n?n-1:Number.POSITIVE_INFINITY,i=0;return o;function o(l){return X(l)?(e.enter(a),s(l)):t(l)}function s(l){return X(l)&&i++<r?(e.consume(l),s):(e.exit(a),t(l))}}var lt=m(()=>{"use strict";de()});function S6(e){let t=e.attempt(this.parser.constructs.contentInitial,n,r),a;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),j(e,t,"linePrefix")}function r(s){return e.enter("paragraph"),i(s)}function i(s){let l=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=l),a=l,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return F(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),o)}}var R2,P2=m(()=>{"use strict";lt();de();R2={tokenize:S6}});function b6(e){let t=this,a=[],n=0,r,i,o;return s;function s(y){if(n<a.length){let b=a[n];return t.containerState=b[1],e.attempt(b[0].continuation,l,u)(y)}return u(y)}function l(y){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&x();let b=t.events.length,T=b,I;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){I=t.events[T][1].end;break}g(n);let A=b;for(;A<t.events.length;)t.events[A][1].end={...I},A++;return st(t.events,T+1,0,t.events.slice(b)),t.events.length=A,u(y)}return s(y)}function u(y){if(n===a.length){if(!r)return d(y);if(r.currentConstruct&&r.currentConstruct.concrete)return h(y);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(O2,c,f)(y)}function c(y){return r&&x(),g(n),d(y)}function f(y){return t.parser.lazy[t.now().line]=n!==a.length,o=t.now().offset,h(y)}function d(y){return t.containerState={},e.attempt(O2,p,h)(y)}function p(y){return n++,a.push([t.currentConstruct,t.containerState]),d(y)}function h(y){if(y===null){r&&x(),g(0),e.consume(y);return}return r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),v(y)}function v(y){if(y===null){S(e.exit("chunkFlow"),!0),g(0),e.consume(y);return}return F(y)?(e.consume(y),S(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(y),v)}function S(y,b){let T=t.sliceStream(y);if(b&&T.push(null),y.previous=i,i&&(i.next=y),i=y,r.defineSkip(y.start),r.write(T),t.parser.lazy[y.start.line]){let I=r.events.length;for(;I--;)if(r.events[I][1].start.offset<o&&(!r.events[I][1].end||r.events[I][1].end.offset>o))return;let A=t.events.length,_=A,M,C;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(M){C=t.events[_][1].end;break}M=!0}for(g(n),I=A;I<t.events.length;)t.events[I][1].end={...C},I++;st(t.events,_+1,0,t.events.slice(A)),t.events.length=I}}function g(y){let b=a.length;for(;b-- >y;){let T=a[b];t.containerState=T[1],T[0].exit.call(t,e)}a.length=y}function x(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}function C6(e,t,a){return j(e,e.attempt(this.parser.constructs.document,t,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var B2,O2,F2=m(()=>{"use strict";lt();de();yr();B2={tokenize:b6},O2={tokenize:C6}});function vr(e){if(e===null||ie(e)||An(e))return 1;if(bo(e))return 2}var uh=m(()=>{"use strict";de()});function Si(e,t,a){let n=[],r=-1;for(;++r<e.length;){let i=e[r].resolveAll;i&&!n.includes(i)&&(t=i(t,a),n.push(i))}return t}var Xc=m(()=>{"use strict"});function w6(e,t){let a=-1,n,r,i,o,s,l,u,c;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(n=a;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[n][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;let f={...e[n][1].end},d={...e[a][1].start};U2(f,-l),U2(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:d},i={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[a][1].start}},r={type:l>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[n][1].end={...o.start},e[a][1].start={...s.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=ea(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=ea(u,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=ea(u,Si(t.parser.constructs.insideSpan.null,e.slice(n+1,a),t)),u=ea(u,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[a][1].end.offset-e[a][1].start.offset?(c=2,u=ea(u,[["enter",e[a][1],t],["exit",e[a][1],t]])):c=0,st(e,n-1,a-n+3,u),a=n+u.length-c-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function L6(e,t){let a=this.parser.constructs.attentionMarkers.null,n=this.previous,r=vr(n),i;return o;function o(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;let u=e.exit("attentionSequence"),c=vr(l),f=!c||c===2&&r||a.includes(l),d=!r||r===2&&c||a.includes(n);return u._open=!!(i===42?f:f&&(r||!d)),u._close=!!(i===42?d:d&&(c||!f)),t(l)}}function U2(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Wc,z2=m(()=>{"use strict";yr();uh();Xc();Wc={name:"attention",resolveAll:w6,tokenize:L6}});function I6(e,t,a){let n=0;return r;function r(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return Lt(p)?(e.consume(p),o):p===64?a(p):u(p)}function o(p){return p===43||p===45||p===46||tt(p)?(n=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),n=0,l):(p===43||p===45||p===46||tt(p))&&n++<32?(e.consume(p),s):(n=0,u(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||So(p)?a(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),c):E2(p)?(e.consume(p),u):a(p)}function c(p){return tt(p)?f(p):a(p)}function f(p){return p===46?(e.consume(p),n=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):d(p)}function d(p){if((p===45||tt(p))&&n++<63){let h=p===45?d:f;return e.consume(p),h}return a(p)}}var A0,V2=m(()=>{"use strict";de();A0={name:"autolink",tokenize:I6}});function _6(e,t,a){return n;function n(i){return X(i)?j(e,r,"linePrefix")(i):r(i)}function r(i){return i===null||F(i)?t(i):a(i)}}var En,ch=m(()=>{"use strict";lt();de();En={partial:!0,tokenize:_6}});function k6(e,t,a){let n=this;return r;function r(o){if(o===62){let s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),i}return a(o)}function i(o){return X(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function T6(e,t,a){let n=this;return r;function r(o){return X(o)?j(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):i(o)}function i(o){return e.attempt(fh,t,a)(o)}}function A6(e){e.exit("blockQuote")}var fh,N2=m(()=>{"use strict";lt();de();fh={continuation:{tokenize:T6},exit:A6,name:"blockQuote",tokenize:k6}});function E6(e,t,a){return n;function n(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),r}function r(i){return M2(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):a(i)}}var dh,H2=m(()=>{"use strict";de();dh={name:"characterEscape",tokenize:E6}});function D6(e,t,a){let n=this,r=0,i,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,o=tt,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=D2,c):(e.enter("characterReferenceValue"),i=7,o=Gc,c(f))}function c(f){if(f===59&&r){let d=e.exit("characterReferenceValue");return o===tt&&!cl(n.sliceSerialize(d))?a(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&r++<i?(e.consume(f),c):a(f)}}var ph,q2=m(()=>{"use strict";oh();de();ph={name:"characterReference",tokenize:D6}});function M6(e,t,a){let n=this,r={partial:!0,tokenize:T},i=0,o=0,s;return l;function l(I){return u(I)}function u(I){let A=n.events[n.events.length-1];return i=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,s=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(I)}function c(I){return I===s?(o++,e.consume(I),c):o<3?a(I):(e.exit("codeFencedFenceSequence"),X(I)?j(e,f,"whitespace")(I):f(I))}function f(I){return I===null||F(I)?(e.exit("codeFencedFence"),n.interrupt?t(I):e.check(j2,v,b)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(I))}function d(I){return I===null||F(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(I)):X(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),j(e,p,"whitespace")(I)):I===96&&I===s?a(I):(e.consume(I),d)}function p(I){return I===null||F(I)?f(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(I))}function h(I){return I===null||F(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(I)):I===96&&I===s?a(I):(e.consume(I),h)}function v(I){return e.attempt(r,b,S)(I)}function S(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),g}function g(I){return i>0&&X(I)?j(e,x,"linePrefix",i+1)(I):x(I)}function x(I){return I===null||F(I)?e.check(j2,v,b)(I):(e.enter("codeFlowValue"),y(I))}function y(I){return I===null||F(I)?(e.exit("codeFlowValue"),x(I)):(e.consume(I),y)}function b(I){return e.exit("codeFenced"),t(I)}function T(I,A,_){let M=0;return C;function C(V){return I.enter("lineEnding"),I.consume(V),I.exit("lineEnding"),U}function U(V){return I.enter("codeFencedFence"),X(V)?j(I,N,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):N(V)}function N(V){return V===s?(I.enter("codeFencedFenceSequence"),B(V)):_(V)}function B(V){return V===s?(M++,I.consume(V),B):M>=o?(I.exit("codeFencedFenceSequence"),X(V)?j(I,q,"whitespace")(V):q(V)):_(V)}function q(V){return V===null||F(V)?(I.exit("codeFencedFence"),A(V)):_(V)}}}function R6(e,t,a){let n=this;return r;function r(o){return o===null?a(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return n.parser.lazy[n.now().line]?a(o):t(o)}}var j2,mh,G2=m(()=>{"use strict";lt();de();j2={partial:!0,tokenize:R6},mh={concrete:!0,name:"codeFenced",tokenize:M6}});function O6(e,t,a){let n=this;return r;function r(u){return e.enter("codeIndented"),j(e,i,"linePrefix",5)(u)}function i(u){let c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):a(u)}function o(u){return u===null?l(u):F(u)?e.attempt(P6,o,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||F(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function B6(e,t,a){let n=this;return r;function r(o){return n.parser.lazy[n.now().line]?a(o):F(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):j(e,i,"linePrefix",5)(o)}function i(o){let s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):F(o)?r(o):a(o)}}var Kc,P6,X2=m(()=>{"use strict";lt();de();Kc={name:"codeIndented",tokenize:O6},P6={partial:!0,tokenize:B6}});function F6(e){let t=e.length-4,a=3,n,r;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=a;++n<t;)if(e[n][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[t][1].type="codeTextPadding",a+=2,t-=2;break}}for(n=a-1,t++;++n<=t;)r===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(r=n):(n===t||e[n][1].type==="lineEnding")&&(e[r][1].type="codeTextData",n!==r+2&&(e[r][1].end=e[n-1][1].end,e.splice(r+2,n-r-2),t-=n-r-2,n=r+2),r=void 0);return e}function U6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function z6(e,t,a){let n=this,r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?a(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(o=e.enter("codeTextSequence"),i=0,f(d)):F(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||F(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),c)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",c(d))}}var E0,W2=m(()=>{"use strict";de();E0={name:"codeText",previous:U6,resolve:F6,tokenize:z6}});function Yc(e,t){let a=0;if(t.length<1e4)e.push(...t);else for(;a<t.length;)e.push(...t.slice(a,a+1e4)),a+=1e4}var hh,K2=m(()=>{"use strict";hh=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,a){let n=a??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,a,n){let r=a||0;this.setCursor(Math.trunc(t));let i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Yc(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Yc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Yc(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let a=this.left.splice(t,Number.POSITIVE_INFINITY);Yc(this.right,a.reverse())}else{let a=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Yc(this.left,a.reverse())}}}});function gh(e){let t={},a=-1,n,r,i,o,s,l,u,c=new hh(e);for(;++a<c.length;){for(;a in t;)a=t[a];if(n=c.get(a),a&&n[1].type==="chunkFlow"&&c.get(a-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,V6(c,a)),a=t[a],u=!0);else if(n[1]._container){for(i=a,r=void 0;i--;)if(o=c.get(i),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(r&&(c.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=i);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;r&&(n[1].end={...c.get(r)[1].start},s=c.slice(r,a),s.unshift(n),c.splice(r,a-r+1,s))}}return st(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function V6(e,t){let a=e.get(t)[1],n=e.get(t)[2],r=t-1,i=[],o=a._tokenizer;o||(o=n.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,l=[],u={},c,f,d=-1,p=a,h=0,v=0,S=[v];for(;p;){for(;e.get(++r)[1]!==p;);i.push(r),p._tokenizer||(c=n.sliceStream(p),p.next||c.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=a;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(v=d+1,S.push(v),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):S.pop(),d=S.length;d--;){let g=s.slice(S[d],S[d+1]),x=i.pop();l.push([x,x+g.length-1]),e.splice(x,2,g)}for(l.reverse(),d=-1;++d<l.length;)u[h+l[d][0]]=h+l[d][1],h+=l[d][1]-l[d][0]-1;return u}var D0=m(()=>{"use strict";yr();K2()});function H6(e){return gh(e),e}function q6(e,t){let a;return n;function n(s){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),r(s)}function r(s){return s===null?i(s):F(s)?e.check(N6,o,i)(s):(e.consume(s),r)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,r}}function j6(e,t,a){let n=this;return r;function r(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),j(e,i,"linePrefix")}function i(o){if(o===null||F(o))return a(o);let s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(n.parser.constructs.flow,a,t)(o)}}var M0,N6,Y2=m(()=>{"use strict";lt();de();D0();M0={resolve:H6,tokenize:q6},N6={partial:!0,tokenize:j6}});function xh(e,t,a,n,r,i,o,s,l){let u=l||Number.POSITIVE_INFINITY,c=0;return f;function f(g){return g===60?(e.enter(n),e.enter(r),e.enter(i),e.consume(g),e.exit(i),d):g===null||g===32||g===41||So(g)?a(g):(e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(g))}function d(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(s),d(g)):g===null||g===60||F(g)?a(g):(e.consume(g),g===92?h:p)}function h(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function v(g){return!c&&(g===null||g===41||ie(g))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(g)):c<u&&g===40?(e.consume(g),c++,v):g===41?(e.consume(g),c--,v):g===null||g===32||g===40||So(g)?a(g):(e.consume(g),g===92?S:v)}function S(g){return g===40||g===41||g===92?(e.consume(g),v):v(g)}}var R0=m(()=>{"use strict";de()});function yh(e,t,a,n,r,i){let o=this,s=0,l;return u;function u(p){return e.enter(n),e.enter(r),e.consume(p),e.exit(r),e.enter(i),c}function c(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?a(p):p===93?(e.exit(i),e.enter(r),e.consume(p),e.exit(r),e.exit(n),t):F(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||F(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),l||(l=!X(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}var P0=m(()=>{"use strict";de()});function vh(e,t,a,n,r,i){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(n),e.enter(r),e.consume(d),e.exit(r),o=d===40?41:d,l):a(d)}function l(d){return d===o?(e.enter(r),e.consume(d),e.exit(r),e.exit(n),t):(e.enter(i),u(d))}function u(d){return d===o?(e.exit(i),l(o)):d===null?a(d):F(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),j(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||F(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(e.consume(d),c):c(d)}}var O0=m(()=>{"use strict";lt();de()});function wo(e,t){let a;return n;function n(r){return F(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),a=!0,n):X(r)?j(e,n,a?"linePrefix":"lineSuffix")(r):t(r)}}var B0=m(()=>{"use strict";lt();de()});function X6(e,t,a){let n=this,r;return i;function i(p){return e.enter("definition"),o(p)}function o(p){return yh.call(n,e,s,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return r=Gt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):a(p)}function l(p){return ie(p)?wo(e,u)(p):u(p)}function u(p){return xh(e,c,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(G6,f,f)(p)}function f(p){return X(p)?j(e,d,"whitespace")(p):d(p)}function d(p){return p===null||F(p)?(e.exit("definition"),n.parser.defined.push(r),t(p)):a(p)}}function W6(e,t,a){return n;function n(s){return ie(s)?wo(e,r)(s):a(s)}function r(s){return vh(e,i,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return X(s)?j(e,o,"whitespace")(s):o(s)}function o(s){return s===null||F(s)?t(s):a(s)}}var F0,G6,Z2=m(()=>{"use strict";R0();P0();lt();O0();B0();de();fl();F0={name:"definition",tokenize:X6},G6={partial:!0,tokenize:W6}});function K6(e,t,a){return n;function n(i){return e.enter("hardBreakEscape"),e.consume(i),r}function r(i){return F(i)?(e.exit("hardBreakEscape"),t(i)):a(i)}}var U0,Q2=m(()=>{"use strict";de();U0={name:"hardBreakEscape",tokenize:K6}});function Y6(e,t){let a=e.length-2,n=3,r,i;return e[n][1].type==="whitespace"&&(n+=2),a-2>n&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(n===a-1||a-4>n&&e[a-2][1].type==="whitespace")&&(a-=n+1===a?2:4),a>n&&(r={type:"atxHeadingText",start:e[n][1].start,end:e[a][1].end},i={type:"chunkText",start:e[n][1].start,end:e[a][1].end,contentType:"text"},st(e,n,a-n+1,[["enter",r,t],["enter",i,t],["exit",i,t],["exit",r,t]])),e}function Z6(e,t,a){let n=0;return r;function r(c){return e.enter("atxHeading"),i(c)}function i(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&n++<6?(e.consume(c),o):c===null||ie(c)?(e.exit("atxHeadingSequence"),s(c)):a(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||F(c)?(e.exit("atxHeading"),t(c)):X(c)?j(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||ie(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}var z0,$2=m(()=>{"use strict";lt();de();yr();z0={name:"headingAtx",resolve:Y6,tokenize:Z6}});var J2,V0,eP=m(()=>{"use strict";J2=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],V0=["pre","script","style","textarea"]});function J6(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ej(e,t,a){let n=this,r,i,o,s,l;return u;function u(L){return c(L)}function c(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),f}function f(L){return L===33?(e.consume(L),d):L===47?(e.consume(L),i=!0,v):L===63?(e.consume(L),r=3,n.interrupt?t:w):Lt(L)?(e.consume(L),o=String.fromCharCode(L),S):a(L)}function d(L){return L===45?(e.consume(L),r=2,p):L===91?(e.consume(L),r=5,s=0,h):Lt(L)?(e.consume(L),r=4,n.interrupt?t:w):a(L)}function p(L){return L===45?(e.consume(L),n.interrupt?t:w):a(L)}function h(L){let zt="CDATA[";return L===zt.charCodeAt(s++)?(e.consume(L),s===zt.length?n.interrupt?t:N:h):a(L)}function v(L){return Lt(L)?(e.consume(L),o=String.fromCharCode(L),S):a(L)}function S(L){if(L===null||L===47||L===62||ie(L)){let zt=L===47,Ma=o.toLowerCase();return!zt&&!i&&V0.includes(Ma)?(r=1,n.interrupt?t(L):N(L)):J2.includes(o.toLowerCase())?(r=6,zt?(e.consume(L),g):n.interrupt?t(L):N(L)):(r=7,n.interrupt&&!n.parser.lazy[n.now().line]?a(L):i?x(L):y(L))}return L===45||tt(L)?(e.consume(L),o+=String.fromCharCode(L),S):a(L)}function g(L){return L===62?(e.consume(L),n.interrupt?t:N):a(L)}function x(L){return X(L)?(e.consume(L),x):C(L)}function y(L){return L===47?(e.consume(L),C):L===58||L===95||Lt(L)?(e.consume(L),b):X(L)?(e.consume(L),y):C(L)}function b(L){return L===45||L===46||L===58||L===95||tt(L)?(e.consume(L),b):T(L)}function T(L){return L===61?(e.consume(L),I):X(L)?(e.consume(L),T):y(L)}function I(L){return L===null||L===60||L===61||L===62||L===96?a(L):L===34||L===39?(e.consume(L),l=L,A):X(L)?(e.consume(L),I):_(L)}function A(L){return L===l?(e.consume(L),l=null,M):L===null||F(L)?a(L):(e.consume(L),A)}function _(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||ie(L)?T(L):(e.consume(L),_)}function M(L){return L===47||L===62||X(L)?y(L):a(L)}function C(L){return L===62?(e.consume(L),U):a(L)}function U(L){return L===null||F(L)?N(L):X(L)?(e.consume(L),U):a(L)}function N(L){return L===45&&r===2?(e.consume(L),ue):L===60&&r===1?(e.consume(L),Ve):L===62&&r===4?(e.consume(L),Ge):L===63&&r===3?(e.consume(L),w):L===93&&r===5?(e.consume(L),Me):F(L)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Q6,Kt,B)(L)):L===null||F(L)?(e.exit("htmlFlowData"),B(L)):(e.consume(L),N)}function B(L){return e.check($6,q,Kt)(L)}function q(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),V}function V(L){return L===null||F(L)?B(L):(e.enter("htmlFlowData"),N(L))}function ue(L){return L===45?(e.consume(L),w):N(L)}function Ve(L){return L===47?(e.consume(L),o="",pe):N(L)}function pe(L){if(L===62){let zt=o.toLowerCase();return V0.includes(zt)?(e.consume(L),Ge):N(L)}return Lt(L)&&o.length<8?(e.consume(L),o+=String.fromCharCode(L),pe):N(L)}function Me(L){return L===93?(e.consume(L),w):N(L)}function w(L){return L===62?(e.consume(L),Ge):L===45&&r===2?(e.consume(L),w):N(L)}function Ge(L){return L===null||F(L)?(e.exit("htmlFlowData"),Kt(L)):(e.consume(L),Ge)}function Kt(L){return e.exit("htmlFlow"),t(L)}}function tj(e,t,a){let n=this;return r;function r(o){return F(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):a(o)}function i(o){return n.parser.lazy[n.now().line]?a(o):t(o)}}function aj(e,t,a){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(En,t,a)}}var N0,Q6,$6,tP=m(()=>{"use strict";de();eP();ch();N0={concrete:!0,name:"htmlFlow",resolveTo:J6,tokenize:ej},Q6={partial:!0,tokenize:aj},$6={partial:!0,tokenize:tj}});function nj(e,t,a){let n=this,r,i,o;return s;function s(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),l}function l(w){return w===33?(e.consume(w),u):w===47?(e.consume(w),T):w===63?(e.consume(w),y):Lt(w)?(e.consume(w),_):a(w)}function u(w){return w===45?(e.consume(w),c):w===91?(e.consume(w),i=0,h):Lt(w)?(e.consume(w),x):a(w)}function c(w){return w===45?(e.consume(w),p):a(w)}function f(w){return w===null?a(w):w===45?(e.consume(w),d):F(w)?(o=f,Ve(w)):(e.consume(w),f)}function d(w){return w===45?(e.consume(w),p):f(w)}function p(w){return w===62?ue(w):w===45?d(w):f(w)}function h(w){let Ge="CDATA[";return w===Ge.charCodeAt(i++)?(e.consume(w),i===Ge.length?v:h):a(w)}function v(w){return w===null?a(w):w===93?(e.consume(w),S):F(w)?(o=v,Ve(w)):(e.consume(w),v)}function S(w){return w===93?(e.consume(w),g):v(w)}function g(w){return w===62?ue(w):w===93?(e.consume(w),g):v(w)}function x(w){return w===null||w===62?ue(w):F(w)?(o=x,Ve(w)):(e.consume(w),x)}function y(w){return w===null?a(w):w===63?(e.consume(w),b):F(w)?(o=y,Ve(w)):(e.consume(w),y)}function b(w){return w===62?ue(w):y(w)}function T(w){return Lt(w)?(e.consume(w),I):a(w)}function I(w){return w===45||tt(w)?(e.consume(w),I):A(w)}function A(w){return F(w)?(o=A,Ve(w)):X(w)?(e.consume(w),A):ue(w)}function _(w){return w===45||tt(w)?(e.consume(w),_):w===47||w===62||ie(w)?M(w):a(w)}function M(w){return w===47?(e.consume(w),ue):w===58||w===95||Lt(w)?(e.consume(w),C):F(w)?(o=M,Ve(w)):X(w)?(e.consume(w),M):ue(w)}function C(w){return w===45||w===46||w===58||w===95||tt(w)?(e.consume(w),C):U(w)}function U(w){return w===61?(e.consume(w),N):F(w)?(o=U,Ve(w)):X(w)?(e.consume(w),U):M(w)}function N(w){return w===null||w===60||w===61||w===62||w===96?a(w):w===34||w===39?(e.consume(w),r=w,B):F(w)?(o=N,Ve(w)):X(w)?(e.consume(w),N):(e.consume(w),q)}function B(w){return w===r?(e.consume(w),r=void 0,V):w===null?a(w):F(w)?(o=B,Ve(w)):(e.consume(w),B)}function q(w){return w===null||w===34||w===39||w===60||w===61||w===96?a(w):w===47||w===62||ie(w)?M(w):(e.consume(w),q)}function V(w){return w===47||w===62||ie(w)?M(w):a(w)}function ue(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):a(w)}function Ve(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),pe}function pe(w){return X(w)?j(e,Me,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):Me(w)}function Me(w){return e.enter("htmlTextData"),o(w)}}var H0,aP=m(()=>{"use strict";lt();de();H0={name:"htmlText",tokenize:nj}});function sj(e){let t=-1,a=[];for(;++t<e.length;){let n=e[t][1];if(a.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let r=n.type==="labelImage"?4:2;n.type="data",t+=r}}return e.length!==a.length&&st(e,0,e.length,a),e}function lj(e,t){let a=e.length,n=0,r,i,o,s;for(;a--;)if(r=e[a][1],i){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[a][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(o){if(e[a][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(i=a,r.type!=="labelLink")){n=2;break}}else r.type==="labelEnd"&&(o=a);let l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[i+n+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=ea(s,e.slice(i+1,i+n+3)),s=ea(s,[["enter",c,t]]),s=ea(s,Si(t.parser.constructs.insideSpan.null,e.slice(i+n+4,o-3),t)),s=ea(s,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),s=ea(s,e.slice(o+1)),s=ea(s,[["exit",l,t]]),st(e,i,e.length,s),e}function uj(e,t,a){let n=this,r=n.events.length,i,o;for(;r--;)if((n.events[r][1].type==="labelImage"||n.events[r][1].type==="labelLink")&&!n.events[r][1]._balanced){i=n.events[r][1];break}return s;function s(d){return i?i._inactive?f(d):(o=n.parser.defined.includes(Gt(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),l):a(d)}function l(d){return d===40?e.attempt(rj,c,o?c:f)(d):d===91?e.attempt(ij,c,o?u:f)(d):o?c(d):f(d)}function u(d){return e.attempt(oj,c,f)(d)}function c(d){return t(d)}function f(d){return i._balanced=!0,a(d)}}function cj(e,t,a){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),r}function r(f){return ie(f)?wo(e,i)(f):i(f)}function i(f){return f===41?c(f):xh(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return ie(f)?wo(e,l)(f):c(f)}function s(f){return a(f)}function l(f){return f===34||f===39||f===40?vh(e,u,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return ie(f)?wo(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):a(f)}}function fj(e,t,a){let n=this;return r;function r(s){return yh.call(n,e,i,o,"reference","referenceMarker","referenceString")(s)}function i(s){return n.parser.defined.includes(Gt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):a(s)}function o(s){return a(s)}}function dj(e,t,a){return n;function n(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),r}function r(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):a(i)}}var Lo,rj,ij,oj,Sh=m(()=>{"use strict";R0();P0();O0();B0();de();yr();fl();Xc();Lo={name:"labelEnd",resolveAll:sj,resolveTo:lj,tokenize:uj},rj={tokenize:cj},ij={tokenize:fj},oj={tokenize:dj}});function pj(e,t,a){let n=this;return r;function r(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):a(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?a(s):t(s)}}var q0,nP=m(()=>{"use strict";Sh();q0={name:"labelStartImage",resolveAll:Lo.resolveAll,tokenize:pj}});function mj(e,t,a){let n=this;return r;function r(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),i}function i(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?a(o):t(o)}}var j0,rP=m(()=>{"use strict";Sh();j0={name:"labelStartLink",resolveAll:Lo.resolveAll,tokenize:mj}});function hj(e,t){return a;function a(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),j(e,t,"linePrefix")}}var Zc,iP=m(()=>{"use strict";lt();Zc={name:"lineEnding",tokenize:hj}});function gj(e,t,a){let n=0,r;return i;function i(u){return e.enter("thematicBreak"),o(u)}function o(u){return r=u,s(u)}function s(u){return u===r?(e.enter("thematicBreakSequence"),l(u)):n>=3&&(u===null||F(u))?(e.exit("thematicBreak"),t(u)):a(u)}function l(u){return u===r?(e.consume(u),n++,l):(e.exit("thematicBreakSequence"),X(u)?j(e,s,"whitespace")(u):s(u))}}var Io,G0=m(()=>{"use strict";lt();de();Io={name:"thematicBreak",tokenize:gj}});function vj(e,t,a){let n=this,r=n.events[n.events.length-1],i=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return s;function s(p){let h=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:Gc(p)){if(n.containerState.type||(n.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Io,a,u)(p):u(p);if(!n.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return a(p)}function l(p){return Gc(p)&&++o<10?(e.consume(p),l):(!n.interrupt||o<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):a(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,e.check(En,n.interrupt?a:c,e.attempt(xj,d,f))}function c(p){return n.containerState.initialBlankLine=!0,i++,d(p)}function f(p){return X(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):a(p)}function d(p){return n.containerState.size=i+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Sj(e,t,a){let n=this;return n.containerState._closeFlow=void 0,e.check(En,r,i);function r(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,j(e,t,"listItemIndent",n.containerState.size+1)(s)}function i(s){return n.containerState.furtherBlankLines||!X(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(yj,t,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,j(e,e.attempt(Xt,t,a),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function bj(e,t,a){let n=this;return j(e,r,"listItemIndent",n.containerState.size+1);function r(i){let o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?t(i):a(i)}}function Cj(e){e.exit(this.containerState.type)}function wj(e,t,a){let n=this;return j(e,r,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(i){let o=n.events[n.events.length-1];return!X(i)&&o&&o[1].type==="listItemPrefixWhitespace"?t(i):a(i)}}var Xt,xj,yj,oP=m(()=>{"use strict";lt();de();ch();G0();Xt={continuation:{tokenize:Sj},exit:Cj,name:"list",tokenize:vj},xj={partial:!0,tokenize:wj},yj={partial:!0,tokenize:bj}});function Lj(e,t){let a=e.length,n,r,i;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){n=a;break}e[a][1].type==="paragraph"&&(r=a)}else e[a][1].type==="content"&&e.splice(a,1),!i&&e[a][1].type==="definition"&&(i=a);let o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=o,e.push(["exit",o,t]),e}function Ij(e,t,a){let n=this,r;return i;function i(u){let c=n.events.length,f;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){f=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(e.enter("setextHeadingLine"),r=u,o(u)):a(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===r?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),X(u)?j(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||F(u)?(e.exit("setextHeadingLine"),t(u)):a(u)}}var bh,sP=m(()=>{"use strict";lt();de();bh={name:"setextUnderline",resolveTo:Lj,tokenize:Ij}});var Ch=m(()=>{"use strict";z2();V2();ch();N2();H2();q2();G2();X2();W2();Y2();Z2();Q2();$2();tP();aP();Sh();nP();rP();iP();oP();sP();G0()});function _j(e){let t=this,a=e.attempt(En,n,e.attempt(this.parser.constructs.flowInitial,r,j(e,e.attempt(this.parser.constructs.flow,r,e.attempt(M0,r)),"linePrefix")));return a;function n(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,a}function r(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,a}}var lP,uP=m(()=>{"use strict";Ch();lt();lP={tokenize:_j}});function pP(e){return{resolveAll:mP(e==="text"?kj:void 0),tokenize:t};function t(a){let n=this,r=this.parser.constructs[e],i=a.attempt(r,o,s);return o;function o(c){return u(c)?i(c):s(c)}function s(c){if(c===null){a.consume(c);return}return a.enter("data"),a.consume(c),l}function l(c){return u(c)?(a.exit("data"),i(c)):(a.consume(c),l)}function u(c){if(c===null)return!0;let f=r[c],d=-1;if(f)for(;++d<f.length;){let p=f[d];if(!p.previous||p.previous.call(n,n.previous))return!0}return!1}}}function mP(e){return t;function t(a,n){let r=-1,i;for(;++r<=a.length;)i===void 0?a[r]&&a[r][1].type==="data"&&(i=r,r++):(!a[r]||a[r][1].type!=="data")&&(r!==i+2&&(a[i][1].end=a[r-1][1].end,a.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(a,n):a}}function kj(e,t){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){let n=e[a-1][1],r=t.sliceStream(n),i=r.length,o=-1,s=0,l;for(;i--;){let u=r[i];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)l=!0,s++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&a===e.length&&(s=0),s){let u={type:a===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?o:n.start._bufferIndex+o,_index:n.start._index+i,line:n.end.line,column:n.end.column-s,offset:n.end.offset-s},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(a,0,["enter",u,t],["exit",u,t]),a+=2)}a++}return e}var cP,fP,dP,X0=m(()=>{"use strict";cP={resolveAll:mP()},fP=pP("string"),dP=pP("text")});var W0={};Cg(W0,{attentionMarkers:()=>Oj,contentInitial:()=>Aj,disable:()=>Bj,document:()=>Tj,flow:()=>Dj,flowInitial:()=>Ej,insideSpan:()=>Pj,string:()=>Mj,text:()=>Rj});var Tj,Aj,Ej,Dj,Mj,Rj,Pj,Oj,Bj,hP=m(()=>{"use strict";Ch();X0();Tj={42:Xt,43:Xt,45:Xt,48:Xt,49:Xt,50:Xt,51:Xt,52:Xt,53:Xt,54:Xt,55:Xt,56:Xt,57:Xt,62:fh},Aj={91:F0},Ej={[-2]:Kc,[-1]:Kc,32:Kc},Dj={35:z0,42:Io,45:[bh,Io],60:N0,61:bh,95:Io,96:mh,126:mh},Mj={38:ph,92:dh},Rj={[-5]:Zc,[-4]:Zc,[-3]:Zc,33:q0,38:ph,42:Wc,60:[A0,H0],91:j0,92:[U0,dh],93:Lo,95:Wc,96:E0},Pj={null:[Wc,cP]},Oj={null:[42,95]},Bj={null:[]}});function gP(e,t,a){let n={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0},r={},i=[],o=[],s=[],l=!0,u={attempt:M(A),check:M(_),consume:b,enter:T,exit:I,interrupt:M(_,{interrupt:!0})},c={code:null,containerState:{},defineSkip:g,events:[],now:S,parser:e,previous:null,sliceSerialize:h,sliceStream:v,write:p},f=t.tokenize.call(c,u),d;return t.resolveAll&&i.push(t),c;function p(B){return o=ea(o,B),x(),o[o.length-1]!==null?[]:(C(t,0),c.events=Si(i,c.events,c),c.events)}function h(B,q){return Uj(v(B),q)}function v(B){return Fj(o,B)}function S(){let{_bufferIndex:B,_index:q,line:V,column:ue,offset:Ve}=n;return{_bufferIndex:B,_index:q,line:V,column:ue,offset:Ve}}function g(B){r[B.line]=B.column,N()}function x(){let B;for(;n._index<o.length;){let q=o[n._index];if(typeof q=="string")for(B=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===B&&n._bufferIndex<q.length;)y(q.charCodeAt(n._bufferIndex));else y(q)}}function y(B){l=void 0,d=B,f=f(B)}function b(B){F(B)?(n.line++,n.column=1,n.offset+=B===-3?2:1,N()):B!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=B,l=!0}function T(B,q){let V=q||{};return V.type=B,V.start=S(),c.events.push(["enter",V,c]),s.push(V),V}function I(B){let q=s.pop();return q.end=S(),c.events.push(["exit",q,c]),q}function A(B,q){C(B,q.from)}function _(B,q){q.restore()}function M(B,q){return V;function V(ue,Ve,pe){let Me,w,Ge,Kt;return Array.isArray(ue)?zt(ue):"tokenize"in ue?zt([ue]):L(ue);function L(yt){return Ii;function Ii(Nt){let On=Nt!==null&&yt[Nt],Lr=Nt!==null&&yt.null,Bo=[...Array.isArray(On)?On:On?[On]:[],...Array.isArray(Lr)?Lr:Lr?[Lr]:[]];return zt(Bo)(Nt)}}function zt(yt){return Me=yt,w=0,yt.length===0?pe:Ma(yt[w])}function Ma(yt){return Ii;function Ii(Nt){return Kt=U(),Ge=yt,yt.partial||(c.currentConstruct=yt),yt.name&&c.parser.constructs.disable.null.includes(yt.name)?Vt(Nt):yt.tokenize.call(q?Object.assign(Object.create(c),q):c,u,Mt,Vt)(Nt)}}function Mt(yt){return l=!0,B(Ge,Kt),Ve}function Vt(yt){return l=!0,Kt.restore(),++w<Me.length?Ma(Me[w]):pe}}}function C(B,q){B.resolveAll&&!i.includes(B)&&i.push(B),B.resolve&&st(c.events,q,c.events.length-q,B.resolve(c.events.slice(q),c)),B.resolveTo&&(c.events=B.resolveTo(c.events,c))}function U(){let B=S(),q=c.previous,V=c.currentConstruct,ue=c.events.length,Ve=Array.from(s);return{from:ue,restore:pe};function pe(){n=B,c.previous=q,c.currentConstruct=V,c.events.length=ue,s=Ve,N()}}function N(){n.line in r&&n.column<2&&(n.column=r[n.line],n.offset+=r[n.line]-1)}}function Fj(e,t){let a=t.start._index,n=t.start._bufferIndex,r=t.end._index,i=t.end._bufferIndex,o;if(a===r)o=[e[a].slice(n,i)];else{if(o=e.slice(a,r),n>-1){let s=o[0];typeof s=="string"?o[0]=s.slice(n):o.shift()}i>0&&o.push(e[r].slice(0,i))}return o}function Uj(e,t){let a=-1,n=[],r;for(;++a<e.length;){let i=e[a],o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
|
|
19
|
+
`;break}case-3:{o=`\r
|
|
20
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&r)continue;o=" ";break}default:o=String.fromCharCode(i)}r=i===-2,n.push(o)}return n.join("")}var xP=m(()=>{"use strict";de();yr();Xc()});function K0(e){let n={constructs:sh([W0,...(e||{}).extensions||[]]),content:r(R2),defined:[],document:r(B2),flow:r(lP),lazy:{},string:r(fP),text:r(dP)};return n;function r(i){return o;function o(s){return gP(n,i,s)}}}var yP=m(()=>{"use strict";k0();P2();F2();uP();X0();hP();xP()});function Y0(e){for(;!gh(e););return e}var vP=m(()=>{"use strict";D0()});function Z0(){let e=1,t="",a=!0,n;return r;function r(i,o,s){let l=[],u,c,f,d,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(o||void 0).decode(i)),f=0,t="",a&&(i.charCodeAt(0)===65279&&f++,a=void 0);f<i.length;){if(SP.lastIndex=f,u=SP.exec(i),d=u&&u.index!==void 0?u.index:i.length,p=i.charCodeAt(d),!u){t=i.slice(f);break}if(p===10&&f===d&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),f<d&&(l.push(i.slice(f,d)),e+=d-f),p){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}f=d+1}return s&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}var SP,bP=m(()=>{"use strict";SP=/[\0\t\n\r]/g});var CP=m(()=>{"use strict";yP();vP();bP()});function wP(e){return e.replace(zj,Vj)}function Vj(e,t,a){if(t)return t;if(a.charCodeAt(0)===35){let r=a.charCodeAt(1),i=r===120||r===88;return lh(a.slice(i?2:1),i?16:10)}return cl(a)||e}var zj,LP=m(()=>{"use strict";oh();T0();zj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function Q0(e,t,a){return t&&typeof t=="object"&&(a=t,t=void 0),Nj(a)(Y0(K0(a).document().write(Z0()(e,t,!0))))}function Nj(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(P),autolinkProtocol:M,autolinkEmail:M,atxHeading:i(Bn),blockQuote:i(Nt),characterEscape:M,characterReference:M,codeFenced:i(On),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:i(On,o),codeText:i(Lr,o),codeTextData:M,data:M,codeFlowValue:M,definition:i(Bo),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:i(vg),hardBreakEscape:i(Il),hardBreakTrailing:i(Il),htmlFlow:i(_l,o),htmlFlowData:M,htmlText:i(_l,o),htmlTextData:M,image:i(Sg),label:o,link:i(P),listItem:i(Ie),listItemValue:d,listOrdered:i(Y,f),listUnordered:i(Y),paragraph:i(ft),reference:L,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:i(Bn),strong:i(ma),thematicBreak:i(ha)},exit:{atxHeading:l(),atxHeadingSequence:T,autolink:l(),autolinkEmail:Ii,autolinkProtocol:yt,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:Ma,characterReferenceMarkerNumeric:Ma,characterReferenceValue:Mt,characterReference:Vt,codeFenced:l(S),codeFencedFence:v,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:C,codeIndented:l(g),codeText:l(V),codeTextData:C,data:C,definition:l(),definitionDestinationString:b,definitionLabelString:x,definitionTitleString:y,emphasis:l(),hardBreakEscape:l(N),hardBreakTrailing:l(N),htmlFlow:l(B),htmlFlowData:C,htmlText:l(q),htmlTextData:C,image:l(Ve),label:Me,labelText:pe,lineEnding:U,link:l(ue),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:zt,resourceDestinationString:w,resourceTitleString:Ge,resource:Kt,setextHeading:l(_),setextHeadingLineSequence:A,setextHeadingText:I,strong:l(),thematicBreak:l()}};kP(t,(e||{}).mdastExtensions||[]);let a={};return n;function n(E){let O={type:"root",children:[]},Z={stack:[O],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:c,data:a},ce=[],Ee=-1;for(;++Ee<E.length;)if(E[Ee][1].type==="listOrdered"||E[Ee][1].type==="listUnordered")if(E[Ee][0]==="enter")ce.push(Ee);else{let tn=ce.pop();Ee=r(E,tn,Ee)}for(Ee=-1;++Ee<E.length;){let tn=t[E[Ee][0]];_P.call(tn,E[Ee][1].type)&&tn[E[Ee][1].type].call(Object.assign({sliceSerialize:E[Ee][2].sliceSerialize},Z),E[Ee][1])}if(Z.tokenStack.length>0){let tn=Z.tokenStack[Z.tokenStack.length-1];(tn[1]||IP).call(Z,void 0,tn[0])}for(O.position={start:bi(E.length>0?E[0][1].start:{line:1,column:1,offset:0}),end:bi(E.length>0?E[E.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<t.transforms.length;)O=t.transforms[Ee](O)||O;return O}function r(E,O,Z){let ce=O-1,Ee=-1,tn=!1,_i,Fn,kl,Tl;for(;++ce<=Z;){let ga=E[ce];switch(ga[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ga[0]==="enter"?Ee++:Ee--,Tl=void 0;break}case"lineEndingBlank":{ga[0]==="enter"&&(_i&&!Tl&&!Ee&&!kl&&(kl=ce),Tl=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tl=void 0}if(!Ee&&ga[0]==="enter"&&ga[1].type==="listItemPrefix"||Ee===-1&&ga[0]==="exit"&&(ga[1].type==="listUnordered"||ga[1].type==="listOrdered")){if(_i){let Fo=ce;for(Fn=void 0;Fo--;){let Un=E[Fo];if(Un[1].type==="lineEnding"||Un[1].type==="lineEndingBlank"){if(Un[0]==="exit")continue;Fn&&(E[Fn][1].type="lineEndingBlank",tn=!0),Un[1].type="lineEnding",Fn=Fo}else if(!(Un[1].type==="linePrefix"||Un[1].type==="blockQuotePrefix"||Un[1].type==="blockQuotePrefixWhitespace"||Un[1].type==="blockQuoteMarker"||Un[1].type==="listItemIndent"))break}kl&&(!Fn||kl<Fn)&&(_i._spread=!0),_i.end=Object.assign({},Fn?E[Fn][1].start:ga[1].end),E.splice(Fn||ce,0,["exit",_i,ga[2]]),ce++,Z++}if(ga[1].type==="listItemPrefix"){let Fo={type:"listItem",_spread:!1,start:Object.assign({},ga[1].start),end:void 0};_i=Fo,E.splice(ce,0,["enter",Fo,ga[2]]),ce++,Z++,kl=void 0,Tl=!0}}}return E[O][1]._spread=tn,Z}function i(E,O){return Z;function Z(ce){s.call(this,E(ce),ce),O&&O.call(this,ce)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(E,O,Z){this.stack[this.stack.length-1].children.push(E),this.stack.push(E),this.tokenStack.push([O,Z||void 0]),E.position={start:bi(O.start),end:void 0}}function l(E){return O;function O(Z){E&&E.call(this,Z),u.call(this,Z)}}function u(E,O){let Z=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==E.type&&(O?O.call(this,E,ce[0]):(ce[1]||IP).call(this,E,ce[0]));else throw new Error("Cannot close `"+E.type+"` ("+yi({start:E.start,end:E.end})+"): it\u2019s not open");Z.position.end=bi(E.end)}function c(){return vo(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(E){if(this.data.expectingFirstListItemValue){let O=this.stack[this.stack.length-2];O.start=Number.parseInt(this.sliceSerialize(E),10),this.data.expectingFirstListItemValue=void 0}}function p(){let E=this.resume(),O=this.stack[this.stack.length-1];O.lang=E}function h(){let E=this.resume(),O=this.stack[this.stack.length-1];O.meta=E}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){let E=this.resume(),O=this.stack[this.stack.length-1];O.value=E.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){let E=this.resume(),O=this.stack[this.stack.length-1];O.value=E.replace(/(\r?\n|\r)$/g,"")}function x(E){let O=this.resume(),Z=this.stack[this.stack.length-1];Z.label=O,Z.identifier=Gt(this.sliceSerialize(E)).toLowerCase()}function y(){let E=this.resume(),O=this.stack[this.stack.length-1];O.title=E}function b(){let E=this.resume(),O=this.stack[this.stack.length-1];O.url=E}function T(E){let O=this.stack[this.stack.length-1];if(!O.depth){let Z=this.sliceSerialize(E).length;O.depth=Z}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function A(E){let O=this.stack[this.stack.length-1];O.depth=this.sliceSerialize(E).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function M(E){let Z=this.stack[this.stack.length-1].children,ce=Z[Z.length-1];(!ce||ce.type!=="text")&&(ce=Ra(),ce.position={start:bi(E.start),end:void 0},Z.push(ce)),this.stack.push(ce)}function C(E){let O=this.stack.pop();O.value+=this.sliceSerialize(E),O.position.end=bi(E.end)}function U(E){let O=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Z=O.children[O.children.length-1];Z.position.end=bi(E.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(O.type)&&(M.call(this,E),C.call(this,E))}function N(){this.data.atHardBreak=!0}function B(){let E=this.resume(),O=this.stack[this.stack.length-1];O.value=E}function q(){let E=this.resume(),O=this.stack[this.stack.length-1];O.value=E}function V(){let E=this.resume(),O=this.stack[this.stack.length-1];O.value=E}function ue(){let E=this.stack[this.stack.length-1];if(this.data.inReference){let O=this.data.referenceType||"shortcut";E.type+="Reference",E.referenceType=O,delete E.url,delete E.title}else delete E.identifier,delete E.label;this.data.referenceType=void 0}function Ve(){let E=this.stack[this.stack.length-1];if(this.data.inReference){let O=this.data.referenceType||"shortcut";E.type+="Reference",E.referenceType=O,delete E.url,delete E.title}else delete E.identifier,delete E.label;this.data.referenceType=void 0}function pe(E){let O=this.sliceSerialize(E),Z=this.stack[this.stack.length-2];Z.label=wP(O),Z.identifier=Gt(O).toLowerCase()}function Me(){let E=this.stack[this.stack.length-1],O=this.resume(),Z=this.stack[this.stack.length-1];if(this.data.inReference=!0,Z.type==="link"){let ce=E.children;Z.children=ce}else Z.alt=O}function w(){let E=this.resume(),O=this.stack[this.stack.length-1];O.url=E}function Ge(){let E=this.resume(),O=this.stack[this.stack.length-1];O.title=E}function Kt(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function zt(E){let O=this.resume(),Z=this.stack[this.stack.length-1];Z.label=O,Z.identifier=Gt(this.sliceSerialize(E)).toLowerCase(),this.data.referenceType="full"}function Ma(E){this.data.characterReferenceType=E.type}function Mt(E){let O=this.sliceSerialize(E),Z=this.data.characterReferenceType,ce;Z?(ce=lh(O,Z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=cl(O);let Ee=this.stack[this.stack.length-1];Ee.value+=ce}function Vt(E){let O=this.stack.pop();O.position.end=bi(E.end)}function yt(E){C.call(this,E);let O=this.stack[this.stack.length-1];O.url=this.sliceSerialize(E)}function Ii(E){C.call(this,E);let O=this.stack[this.stack.length-1];O.url="mailto:"+this.sliceSerialize(E)}function Nt(){return{type:"blockquote",children:[]}}function On(){return{type:"code",lang:null,meta:null,value:""}}function Lr(){return{type:"inlineCode",value:""}}function Bo(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function vg(){return{type:"emphasis",children:[]}}function Bn(){return{type:"heading",depth:0,children:[]}}function Il(){return{type:"break"}}function _l(){return{type:"html",value:""}}function Sg(){return{type:"image",title:null,url:"",alt:null}}function P(){return{type:"link",title:null,url:"",children:[]}}function Y(E){return{type:"list",ordered:E.type==="listOrdered",start:null,spread:E._spread,children:[]}}function Ie(E){return{type:"listItem",spread:E._spread,checked:null,children:[]}}function ft(){return{type:"paragraph",children:[]}}function ma(){return{type:"strong",children:[]}}function Ra(){return{type:"text",value:""}}function ha(){return{type:"thematicBreak"}}}function bi(e){return{line:e.line,column:e.column,offset:e.offset}}function kP(e,t){let a=-1;for(;++a<t.length;){let n=t[a];Array.isArray(n)?kP(e,n):Hj(e,n)}}function Hj(e,t){let a;for(a in t)if(_P.call(t,a))switch(a){case"canContainEols":{let n=t[a];n&&e[a].push(...n);break}case"transforms":{let n=t[a];n&&e[a].push(...n);break}case"enter":case"exit":{let n=t[a];n&&Object.assign(e[a],n);break}}}function IP(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+yi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+yi({start:t.start,end:t.end})+") is still open")}var _P,TP=m(()=>{"use strict";ih();CP();T0();LP();fl();oh();b0();_P={}.hasOwnProperty});var AP=m(()=>{"use strict";TP()});function wh(e){let t=this;t.parser=a;function a(n){return Q0(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var EP=m(()=>{"use strict";AP()});var DP=m(()=>{"use strict";EP()});function MP(e,t){let a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,a),e.applyData(t,a)}var RP=m(()=>{"use strict"});function PP(e,t){let a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,a),[e.applyData(t,a),{type:"text",value:`
|
|
21
|
+
`}]}var OP=m(()=>{"use strict"});function BP(e,t){let a=t.value?t.value+`
|
|
22
|
+
`:"",n={},r=t.lang?t.lang.split(/\s+/):[];r.length>0&&(n.className=["language-"+r[0]]);let i={type:"element",tagName:"code",properties:n,children:[{type:"text",value:a}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}var FP=m(()=>{"use strict"});function UP(e,t){let a={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var zP=m(()=>{"use strict"});function VP(e,t){let a={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var NP=m(()=>{"use strict"});function HP(e,t){let a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),r=$a(n.toLowerCase()),i=e.footnoteOrder.indexOf(n),o,s=e.footnoteCounts.get(n);s===void 0?(s=0,e.footnoteOrder.push(n),o=e.footnoteOrder.length):o=i+1,s+=1,e.footnoteCounts.set(n,s);let l={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+r,id:a+"fnref-"+r+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);let u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}var qP=m(()=>{"use strict";Co()});function jP(e,t){let a={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var GP=m(()=>{"use strict"});function XP(e,t){if(e.options.allowDangerousHtml){let a={type:"raw",value:t.value};return e.patch(t,a),e.applyData(t,a)}}var WP=m(()=>{"use strict"});function Lh(e,t){let a=t.referenceType,n="]";if(a==="collapsed"?n+="[]":a==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];let r=e.all(t),i=r[0];i&&i.type==="text"?i.value="["+i.value:r.unshift({type:"text",value:"["});let o=r[r.length-1];return o&&o.type==="text"?o.value+=n:r.push({type:"text",value:n}),r}var $0=m(()=>{"use strict"});function KP(e,t){let a=String(t.identifier).toUpperCase(),n=e.definitionById.get(a);if(!n)return Lh(e,t);let r={src:$a(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);let i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}var YP=m(()=>{"use strict";Co();$0()});function ZP(e,t){let a={src:$a(t.url)};t.alt!==null&&t.alt!==void 0&&(a.alt=t.alt),t.title!==null&&t.title!==void 0&&(a.title=t.title);let n={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,n),e.applyData(t,n)}var QP=m(()=>{"use strict";Co()});function $P(e,t){let a={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,a);let n={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(t,n),e.applyData(t,n)}var JP=m(()=>{"use strict"});function eO(e,t){let a=String(t.identifier).toUpperCase(),n=e.definitionById.get(a);if(!n)return Lh(e,t);let r={href:$a(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);let i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}var tO=m(()=>{"use strict";Co();$0()});function aO(e,t){let a={href:$a(t.url)};t.title!==null&&t.title!==void 0&&(a.title=t.title);let n={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var nO=m(()=>{"use strict";Co()});function rO(e,t,a){let n=e.all(t),r=a?qj(a):iO(t),i={},o=[];if(typeof t.checked=="boolean"){let c=n[0],f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},n.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<n.length;){let c=n[s];(r||s!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
23
|
+
`}),c.type==="element"&&c.tagName==="p"&&!r?o.push(...c.children):o.push(c)}let l=n[n.length-1];l&&(r||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
|
|
24
|
+
`});let u={type:"element",tagName:"li",properties:i,children:o};return e.patch(t,u),e.applyData(t,u)}function qj(e){let t=!1;if(e.type==="list"){t=e.spread||!1;let a=e.children,n=-1;for(;!t&&++n<a.length;)t=iO(a[n])}return t}function iO(e){let t=e.spread;return t??e.children.length>1}var oO=m(()=>{"use strict"});function sO(e,t){let a={},n=e.all(t),r=-1;for(typeof t.start=="number"&&t.start!==1&&(a.start=t.start);++r<n.length;){let o=n[r];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}let i={type:"element",tagName:t.ordered?"ol":"ul",properties:a,children:e.wrap(n,!0)};return e.patch(t,i),e.applyData(t,i)}var lO=m(()=>{"use strict"});function uO(e,t){let a={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var cO=m(()=>{"use strict"});function fO(e,t){let a={type:"root",children:e.wrap(e.all(t))};return e.patch(t,a),e.applyData(t,a)}var dO=m(()=>{"use strict"});function pO(e,t){let a={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var mO=m(()=>{"use strict"});function hO(e,t){let a=e.all(t),n=a.shift(),r=[];if(n){let o={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],o),r.push(o)}if(a.length>0){let o={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},s=ul(t.children[1]),l=nh(t.children[t.children.length-1]);s&&l&&(o.position={start:s,end:l}),r.push(o)}let i={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}var gO=m(()=>{"use strict";rh()});function xO(e,t,a){let n=a?a.children:void 0,i=(n?n.indexOf(t):1)===0?"th":"td",o=a&&a.type==="table"?a.align:void 0,s=o?o.length:t.children.length,l=-1,u=[];for(;++l<s;){let f=t.children[l],d={},p=o?o[l]:void 0;p&&(d.align=p);let h={type:"element",tagName:i,properties:d,children:[]};f&&(h.children=e.all(f),e.patch(f,h),h=e.applyData(f,h)),u.push(h)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}var yO=m(()=>{"use strict"});function vO(e,t){let a={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var SO=m(()=>{"use strict"});function CO(e){let t=String(e),a=/\r?\n|\r/g,n=a.exec(t),r=0,i=[];for(;n;)i.push(bO(t.slice(r,n.index),r>0,!0),n[0]),r=n.index+n[0].length,n=a.exec(t);return i.push(bO(t.slice(r),r>0,!1)),i.join("")}function bO(e,t,a){let n=0,r=e.length;if(t){let i=e.codePointAt(n);for(;i===9||i===32;)n++,i=e.codePointAt(n)}if(a){let i=e.codePointAt(r-1);for(;i===9||i===32;)r--,i=e.codePointAt(r-1)}return r>n?e.slice(n,r):""}var wO=m(()=>{"use strict"});function LO(e,t){let a={type:"text",value:CO(String(t.value))};return e.patch(t,a),e.applyData(t,a)}var IO=m(()=>{"use strict";wO()});function _O(e,t){let a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,a),e.applyData(t,a)}var kO=m(()=>{"use strict"});function Ih(){}var TO,AO=m(()=>{"use strict";RP();OP();FP();zP();NP();qP();GP();WP();YP();QP();JP();tO();nO();oO();lO();cO();dO();mO();gO();yO();SO();IO();kO();TO={blockquote:MP,break:PP,code:BP,delete:UP,emphasis:VP,footnoteReference:HP,heading:jP,html:XP,imageReference:KP,image:ZP,inlineCode:$P,linkReference:eO,link:aO,listItem:rO,list:sO,paragraph:uO,root:fO,strong:pO,table:hO,tableCell:vO,tableRow:xO,text:LO,thematicBreak:_O,toml:Ih,yaml:Ih,definition:Ih,footnoteDefinition:Ih}});var Wj,OO,EO,Kj,tC,BO=m(()=>{"use strict";({defineProperty:Wj}=Object),OO=typeof self=="object"?self:globalThis,EO=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new OO[e](t)},Kj=(e,t)=>{let a=(r,i)=>(e.set(i,r),r),n=r=>{if(e.has(r))return e.get(r);let[i,o]=t[r];switch(i){case 0:case-1:return a(o,r);case 1:{let s=a([],r);for(let l of o)s.push(n(l));return s}case 2:{let s=a({},r);for(let[l,u]of o){let c=n(l),f=n(u);c==="__proto__"?Wj(s,c,{value:f,configurable:!0,enumerable:!0,writable:!0}):s[c]=f}return s}case 3:return a(new Date(o),r);case 4:{let{source:s,flags:l}=o;return a(new RegExp(s,l),r)}case 5:{let s=a(new Map,r);for(let[l,u]of o)s.set(n(l),n(u));return s}case 6:{let s=a(new Set,r);for(let l of o)s.add(n(l));return s}case 7:{let{name:s,message:l}=o;return a(typeof OO[s]=="function"?EO(s,l):new Error(l),r)}case 8:return a(BigInt(o),r);case"BigInt":return a(Object(BigInt(o)),r);case"ArrayBuffer":return a(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:s}=new Uint8Array(o);return a(new DataView(s),o)}case"-0":return-0}return a(EO(i,o),r)};return n},tC=e=>Kj(new Map,e)(0)});var _o,Yj,Zj,Qj,Qc,kh,$j,aC,FO=m(()=>{"use strict";_o="",{toString:Yj}={},{keys:Zj,is:Qj}=Object,Qc=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let a=Yj.call(e).slice(8,-1);switch(a){case"Array":return[1,_o];case"Object":return[2,_o];case"Date":return[3,_o];case"RegExp":return[4,_o];case"Map":return[5,_o];case"Set":return[6,_o];case"DataView":return[1,a]}return a.includes("Array")?[1,a]:e instanceof Error?[7,e.name||"Error"]:[2,a]},kh=([e,t])=>e===0&&(t==="function"||t==="symbol"),$j=(e,t,a,n)=>{let r=(o,s)=>{let l=n.push(o)-1;return a.set(s,l),l},i=o=>{if(a.has(o))return a.get(o);let[s,l]=Qc(o);switch(s){case 0:{let c=o;switch(l){case"bigint":s=8,c=o.toString();break;case"number":if(!o&&Qj(o,-0))return n.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return r([-1],o)}return r([s,c],o)}case 1:{if(l){let d=o;return l==="DataView"?d=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(d=new Uint8Array(o)),r([l,[...d]],o)}let c=[],f=r([s,c],o);for(let d of o)c.push(i(d));return f}case 2:{if(l)switch(l){case"BigInt":return r([l,o.toString()],o);case"Boolean":case"Number":case"String":return r([l,o.valueOf()],o)}if(t&&"toJSON"in o)return i(o.toJSON());let c=[],f=r([s,c],o);for(let d of Zj(o))(e||!kh(Qc(o[d])))&&c.push([i(d),i(o[d])]);return f}case 3:return r([s,isNaN(o.getTime())?_o:o.toISOString()],o);case 4:{let{source:c,flags:f}=o;return r([s,{source:c,flags:f}],o)}case 5:{let c=[],f=r([s,c],o);for(let[d,p]of o)(e||!(kh(Qc(d))||kh(Qc(p))))&&c.push([i(d),i(p)]);return f}case 6:{let c=[],f=r([s,c],o);for(let d of o)(e||!kh(Qc(d)))&&c.push(i(d));return f}}let{message:u}=o;return r([s,{name:l,message:u}],o)};return i},aC=(e,{json:t,lossy:a}={})=>{let n=[];return $j(!(t||a),!!t,new Map,n)(e),n}});var dl,nC=m(()=>{"use strict";BO();FO();dl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?tC(aC(e,t)):structuredClone(e):(e,t)=>tC(aC(e,t))});function Jj(e,t){let a=[{type:"text",value:"\u21A9"}];return t>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),a}function e9(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function UO(e){let t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||Jj,n=e.options.footnoteBackLabel||e9,r=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[],l=-1;for(;++l<e.footnoteOrder.length;){let u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;let c=e.all(u),f=String(u.identifier).toUpperCase(),d=$a(f.toLowerCase()),p=0,h=[],v=e.footnoteCounts.get(f);for(;v!==void 0&&++p<=v;){h.length>0&&h.push({type:"text",value:" "});let x=typeof a=="string"?a:a(l,p);typeof x=="string"&&(x={type:"text",value:x}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,p),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}let S=c[c.length-1];if(S&&S.type==="element"&&S.tagName==="p"){let x=S.children[S.children.length-1];x&&x.type==="text"?x.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...h)}else c.push(...h);let g={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(u,g),s.push(g)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...dl(o),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:`
|
|
25
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
26
|
+
`}]}}var zO=m(()=>{"use strict";nC();Co()});function t9(e){let t=[],a=-1;for(;++a<e.length;)t[a]=Ci(e[a]);return Th(n);function n(...r){let i=-1;for(;++i<t.length;)if(t[i].apply(this,r))return!0;return!1}}function a9(e){let t=e;return Th(a);function a(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function n9(e){return Th(t);function t(a){return a&&a.type===e}}function Th(e){return t;function t(a,n,r){return!!(i9(a)&&e.call(this,a,typeof n=="number"?n:void 0,r||void 0))}}function r9(){return!0}function i9(e){return e!==null&&typeof e=="object"&&"type"in e}var Ci,VO=m(()=>{"use strict";Ci=(function(e){if(e==null)return r9;if(typeof e=="function")return Th(e);if(typeof e=="object")return Array.isArray(e)?t9(e):a9(e);if(typeof e=="string")return n9(e);throw new Error("Expected function, string, or object as test")})});var Ah=m(()=>{"use strict";VO()});function $c(e,t,a,n){let r;typeof t=="function"&&typeof a!="function"?(n=a,a=t):r=t;let i=Ci(r),o=n?-1:1;s(e,void 0,[])();function s(l,u,c){let f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){let p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=NO,h,v,S;if((!t||i(l,u,c[c.length-1]||void 0))&&(p=o9(a(l,c)),p[0]===ko))return p;if("children"in l&&l.children){let g=l;if(g.children&&p[0]!==Dh)for(v=(n?g.children.length:-1)+o,S=c.concat(g);v>-1&&v<g.children.length;){let x=g.children[v];if(h=s(x,v,S)(),h[0]===ko)return h;v=typeof h[1]=="number"?h[1]:v+o}}return p}}}function o9(e){return Array.isArray(e)?e:typeof e=="number"?[Eh,e]:e==null?NO:[e]}var NO,Eh,ko,Dh,HO=m(()=>{"use strict";Ah();NO=[],Eh=!0,ko=!1,Dh="skip"});var Mh=m(()=>{"use strict";HO()});function To(e,t,a,n){let r,i,o;typeof t=="function"&&typeof a!="function"?(i=void 0,o=t,r=a):(i=t,o=a,r=n),$c(e,i,s,r);function s(l,u){let c=u[u.length-1],f=c?c.children.indexOf(l):void 0;return o(l,f,c)}}var qO=m(()=>{"use strict";Mh();Mh()});var Rh=m(()=>{"use strict";qO()});function GO(e,t){let a=t||s9,n=new Map,r=new Map,i=new Map,o={...TO,...a.handlers},s={all:u,applyData:u9,definitionById:n,footnoteById:r,footnoteCounts:i,footnoteOrder:[],handlers:o,one:l,options:a,patch:l9,wrap:f9};return To(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){let f=c.type==="definition"?n:r,d=String(c.identifier).toUpperCase();f.has(d)||f.set(d,c)}}),s;function l(c,f){let d=c.type,p=s.handlers[d];if(rC.call(s.handlers,d)&&p)return p(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in c){let{children:v,...S}=c,g=dl(S);return g.children=s.all(c),g}return dl(c)}return(s.options.unknownHandler||c9)(s,c,f)}function u(c){let f=[];if("children"in c){let d=c.children,p=-1;for(;++p<d.length;){let h=s.one(d[p],c);if(h){if(p&&d[p-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=jO(h.value)),!Array.isArray(h)&&h.type==="element")){let v=h.children[0];v&&v.type==="text"&&(v.value=jO(v.value))}Array.isArray(h)?f.push(...h):f.push(h)}}}return f}}function l9(e,t){e.position&&(t.position=v0(e))}function u9(e,t){let a=t;if(e&&e.data){let n=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;if(typeof n=="string")if(a.type==="element")a.tagName=n;else{let o="children"in a?a.children:[a];a={type:"element",tagName:n,properties:{},children:o}}a.type==="element"&&i&&Object.assign(a.properties,dl(i)),"children"in a&&a.children&&r!==null&&r!==void 0&&(a.children=r)}return a}function c9(e,t){let a=t.data||{},n="value"in t&&!(rC.call(a,"hProperties")||rC.call(a,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function f9(e,t){let a=[],n=-1;for(t&&a.push({type:"text",value:`
|
|
27
|
+
`});++n<e.length;)n&&a.push({type:"text",value:`
|
|
28
|
+
`}),a.push(e[n]);return t&&e.length>0&&a.push({type:"text",value:`
|
|
29
|
+
`}),a}function jO(e){let t=0,a=e.charCodeAt(t);for(;a===9||a===32;)t++,a=e.charCodeAt(t);return e.slice(t)}var rC,s9,XO=m(()=>{"use strict";nC();Rh();rh();AO();rC={}.hasOwnProperty,s9={}});function Ph(e,t){let a=GO(e,t),n=a.one(e,void 0),r=UO(a),i=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return r&&("children"in i,i.children.push({type:"text",value:`
|
|
30
|
+
`},r)),i}var WO=m(()=>{"use strict";zO();XO()});var KO=m(()=>{"use strict";WO()});function Oh(e,t){return e&&"run"in e?async function(a,n){let r=Ph(a,{file:n,...t});await e.run(r,n)}:function(a,n){return Ph(a,{file:n,...e||t})}}var YO=m(()=>{"use strict";KO()});var ZO=m(()=>{"use strict";YO()});function iC(e){if(e)throw e}var QO=m(()=>{"use strict"});var oB=It((Che,iB)=>{"use strict";var Bh=Object.prototype.hasOwnProperty,rB=Object.prototype.toString,$O=Object.defineProperty,JO=Object.getOwnPropertyDescriptor,eB=function(t){return typeof Array.isArray=="function"?Array.isArray(t):rB.call(t)==="[object Array]"},tB=function(t){if(!t||rB.call(t)!=="[object Object]")return!1;var a=Bh.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Bh.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!a&&!n)return!1;var r;for(r in t);return typeof r>"u"||Bh.call(t,r)},aB=function(t,a){$O&&a.name==="__proto__"?$O(t,a.name,{enumerable:!0,configurable:!0,value:a.newValue,writable:!0}):t[a.name]=a.newValue},nB=function(t,a){if(a==="__proto__")if(Bh.call(t,a)){if(JO)return JO(t,a).value}else return;return t[a]};iB.exports=function e(){var t,a,n,r,i,o,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(a in t)n=nB(s,a),r=nB(t,a),s!==r&&(c&&r&&(tB(r)||(i=eB(r)))?(i?(i=!1,o=n&&eB(n)?n:[]):o=n&&tB(n)?n:{},aB(s,{name:a,newValue:e(c,o,r)})):typeof r<"u"&&aB(s,{name:a,newValue:r}));return s}});function Jc(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var sB=m(()=>{"use strict"});function oC(){let e=[],t={run:a,use:n};return t;function a(...r){let i=-1,o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...r);function s(l,...u){let c=e[++i],f=-1;if(l){o(l);return}for(;++f<r.length;)(u[f]===null||u[f]===void 0)&&(u[f]=r[f]);r=u,c?lB(c,s)(...u):o(null,...u)}}function n(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}}function lB(e,t){let a;return n;function n(...o){let s=e.length>o.length,l;s&&o.push(r);try{l=e.apply(this,o)}catch(u){let c=u;if(s&&a)throw c;return r(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,r):l instanceof Error?r(l):i(l))}function r(o,...s){a||(a=!0,t(o,...s))}function i(o){r(null,o)}}var uB=m(()=>{"use strict"});var cB=m(()=>{"use strict";uB()});function d9(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ef(e);let a=0,n=-1,r=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(i){a=r+1;break}}else n<0&&(i=!0,n=r+1);return n<0?"":e.slice(a,n)}if(t===e)return"";let o=-1,s=t.length-1;for(;r--;)if(e.codePointAt(r)===47){if(i){a=r+1;break}}else o<0&&(i=!0,o=r+1),s>-1&&(e.codePointAt(r)===t.codePointAt(s--)?s<0&&(n=r):(s=-1,n=o));return a===n?n=o:n<0&&(n=e.length),e.slice(a,n)}function p9(e){if(ef(e),e.length===0)return".";let t=-1,a=e.length,n;for(;--a;)if(e.codePointAt(a)===47){if(n){t=a;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function m9(e){ef(e);let t=e.length,a=-1,n=0,r=-1,i=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){n=t+1;break}continue}a<0&&(o=!0,a=t+1),s===46?r<0?r=t:i!==1&&(i=1):r>-1&&(i=-1)}return r<0||a<0||i===0||i===1&&r===a-1&&r===n+1?"":e.slice(r,a)}function h9(...e){let t=-1,a;for(;++t<e.length;)ef(e[t]),e[t]&&(a=a===void 0?e[t]:a+"/"+e[t]);return a===void 0?".":g9(a)}function g9(e){ef(e);let t=e.codePointAt(0)===47,a=x9(e,!t);return a.length===0&&!t&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),t?"/"+a:a}function x9(e,t){let a="",n=0,r=-1,i=0,o=-1,s,l;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(r===o-1||i===1))if(r!==o-1&&i===2){if(a.length<2||n!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(l=a.lastIndexOf("/"),l!==a.length-1){l<0?(a="",n=0):(a=a.slice(0,l),n=a.length-1-a.lastIndexOf("/")),r=o,i=0;continue}}else if(a.length>0){a="",n=0,r=o,i=0;continue}}t&&(a=a.length>0?a+"/..":"..",n=2)}else a.length>0?a+="/"+e.slice(r+1,o):a=e.slice(r+1,o),n=o-r-1;r=o,i=0}else s===46&&i>-1?i++:i=-1}return a}function ef(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var fn,fB=m(()=>{"use strict";fn={basename:d9,dirname:p9,extname:m9,join:h9,sep:"/"}});function y9(){return"/"}var dB,pB=m(()=>{"use strict";dB={cwd:y9}});function pl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var sC=m(()=>{"use strict"});function mB(e){if(typeof e=="string")e=new URL(e);else if(!pl(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return v9(e)}function v9(e){if(e.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let t=e.pathname,a=-1;for(;++a<t.length;)if(t.codePointAt(a)===37&&t.codePointAt(a+1)===50){let n=t.codePointAt(a+2);if(n===70||n===102){let r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(t)}var hB=m(()=>{"use strict";sC();sC()});function uC(e,t){if(e&&e.includes(fn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+fn.sep+"`")}function cC(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function gB(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function S9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var lC,Ao,xB=m(()=>{"use strict";C0();fB();pB();hB();lC=["history","path","basename","stem","extname","dirname"],Ao=class{constructor(t){let a;t?pl(t)?a={path:t}:typeof t=="string"||S9(t)?a={value:t}:a=t:a={},this.cwd="cwd"in a?"":dB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<lC.length;){let i=lC[n];i in a&&a[i]!==void 0&&a[i]!==null&&(this[i]=i==="history"?[...a[i]]:a[i])}let r;for(r in a)lC.includes(r)||(this[r]=a[r])}get basename(){return typeof this.path=="string"?fn.basename(this.path):void 0}set basename(t){cC(t,"basename"),uC(t,"basename"),this.path=fn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?fn.dirname(this.path):void 0}set dirname(t){gB(this.basename,"dirname"),this.path=fn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?fn.extname(this.path):void 0}set extname(t){if(uC(t,"extname"),gB(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=fn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pl(t)&&(t=mB(t)),cC(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?fn.basename(this.path,this.extname):void 0}set stem(t){cC(t,"stem"),uC(t,"stem"),this.path=fn.join(this.dirname||"",t+(this.extname||""))}fail(t,a,n){let r=this.message(t,a,n);throw r.fatal=!0,r}info(t,a,n){let r=this.message(t,a,n);return r.fatal=void 0,r}message(t,a,n){let r=new ot(t,a,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}});var fC=m(()=>{"use strict";xB()});var yB,vB=m(()=>{"use strict";yB=(function(e){let n=this.constructor.prototype,r=n[e],i=function(){return r.apply(i,arguments)};return Object.setPrototypeOf(i,n),i})});function dC(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function pC(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function mC(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function SB(e){if(!Jc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function bB(e,t,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fh(e){return C9(e)?e:new Ao(e)}function C9(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function w9(e){return typeof e=="string"||L9(e)}function L9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Uh,b9,hC,gC,CB=m(()=>{"use strict";QO();Uh=H(oB(),1);sB();cB();fC();vB();b9={}.hasOwnProperty,hC=class e extends yB{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=oC()}copy(){let t=new e,a=-1;for(;++a<this.attachers.length;){let n=this.attachers[a];t.use(...n)}return t.data((0,Uh.default)(!0,{},this.namespace)),t}data(t,a){return typeof t=="string"?arguments.length===2?(mC("data",this.frozen),this.namespace[t]=a,this):b9.call(this.namespace,t)&&this.namespace[t]||void 0:t?(mC("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[a,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=a.call(t,...n);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let a=Fh(t),n=this.parser||this.Parser;return dC("parse",n),n(String(a),a)}process(t,a){let n=this;return this.freeze(),dC("process",this.parser||this.Parser),pC("process",this.compiler||this.Compiler),a?r(void 0,a):new Promise(r);function r(i,o){let s=Fh(t),l=n.parse(s);n.run(l,s,function(c,f,d){if(c||!f||!d)return u(c);let p=f,h=n.stringify(p,d);w9(h)?d.value=h:d.result=h,u(c,d)});function u(c,f){c||!f?o(c):i?i(f):a(void 0,f)}}}processSync(t){let a=!1,n;return this.freeze(),dC("processSync",this.parser||this.Parser),pC("processSync",this.compiler||this.Compiler),this.process(t,r),bB("processSync","process",a),n;function r(i,o){a=!0,iC(i),n=o}}run(t,a,n){SB(t),this.freeze();let r=this.transformers;return!n&&typeof a=="function"&&(n=a,a=void 0),n?i(void 0,n):new Promise(i);function i(o,s){let l=Fh(a);r.run(t,l,u);function u(c,f,d){let p=f||t;c?s(c):o?o(p):n(void 0,p,d)}}}runSync(t,a){let n=!1,r;return this.run(t,a,i),bB("runSync","run",n),r;function i(o,s){iC(o),r=s,n=!0}}stringify(t,a){this.freeze();let n=Fh(a),r=this.compiler||this.Compiler;return pC("stringify",r),SB(t),r(t,n)}use(t,...a){let n=this.attachers,r=this.namespace;if(mC("use",this.frozen),t!=null)if(typeof t=="function")l(t,a);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[c,...f]=u;l(c,f)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(r.settings=(0,Uh.default)(!0,r.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){let f=u[c];i(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let f=-1,d=-1;for(;++f<n.length;)if(n[f][0]===u){d=f;break}if(d===-1)n.push([u,...c]);else if(c.length>0){let[p,...h]=c,v=n[d][1];Jc(v)&&Jc(p)&&(p=(0,Uh.default)(!0,v,p)),n[d]=[u,p,...h]}}}},gC=new hC().freeze()});var wB=m(()=>{"use strict";CB()});function xC(e){let t=T9(e),a=A9(e);return E9(t.runSync(t.parse(a),a),e)}function T9(e){let t=e.rehypePlugins||LB,a=e.remarkPlugins||LB,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...IB}:IB;return gC().use(wh).use(a).use(Oh,n).use(t)}function A9(e){let t=e.children||"",a=new Ao;return typeof t=="string"?a.value=t:(""+t,void 0),a}function E9(e,t){let a=t.allowedElements,n=t.allowElement,r=t.components,i=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||kB;for(let c of k9)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+I9+c.id,void 0);return a&&i&&void 0,To(e,u),L0(e,{Fragment:ml.Fragment,components:r,ignoreInvalidStyle:!0,jsx:ml.jsx,jsxs:ml.jsxs,passKeys:!0,passNode:!0});function u(c,f,d){if(c.type==="raw"&&d&&typeof f=="number")return o?d.children.splice(f,1):d.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let p;for(p in jc)if(Object.hasOwn(jc,p)&&Object.hasOwn(c.properties,p)){let h=c.properties[p],v=jc[p];(v===null||v.includes(c.tagName))&&(c.properties[p]=l(String(h||""),p,c))}}if(c.type==="element"){let p=a?!a.includes(c.tagName):i?i.includes(c.tagName):!1;if(!p&&n&&typeof f=="number"&&(p=!n(c,f,d)),p&&d&&typeof f=="number")return s&&c.children?d.children.splice(f,1,...c.children):d.children.splice(f,1),f}}}function kB(e){let t=e.indexOf(":"),a=e.indexOf("?"),n=e.indexOf("#"),r=e.indexOf("/");return t===-1||r!==-1&&t>r||a!==-1&&t>a||n!==-1&&t>n||_9.test(e.slice(0,t))?e:""}var ml,_B,I9,LB,IB,_9,k9,TB=m(()=>{"use strict";C2();L2();ml=H(ir(),1),_B=H(re(),1);DP();ZO();wB();Rh();fC();I9="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",LB=[],IB={allowDangerousHtml:!0},_9=/^(https?|ircs?|mailto|xmpp)$/i,k9=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}]});var AB=m(()=>{"use strict";TB()});function yC(e,t){let a=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,r=a.indexOf(t);for(;r!==-1;)n++,r=a.indexOf(t,r+t.length);return n}var EB=m(()=>{"use strict"});function vC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var DB=m(()=>{"use strict"});function SC(e,t,a){let r=Ci((a||{}).ignore||[]),i=D9(t),o=-1;for(;++o<i.length;)$c(e,"text",s);function s(u,c){let f=-1,d;for(;++f<c.length;){let p=c[f],h=d?d.children:void 0;if(r(p,h?h.indexOf(p):void 0,d))return;d=p}if(d)return l(u,c)}function l(u,c){let f=c[c.length-1],d=i[o][0],p=i[o][1],h=0,S=f.children.indexOf(u),g=!1,x=[];d.lastIndex=0;let y=d.exec(u.value);for(;y;){let b=y.index,T={index:y.index,input:y.input,stack:[...c,u]},I=p(...y,T);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?d.lastIndex=b+1:(h!==b&&x.push({type:"text",value:u.value.slice(h,b)}),Array.isArray(I)?x.push(...I):I&&x.push(I),h=b+y[0].length,g=!0),!d.global)break;y=d.exec(u.value)}return g?(h<u.value.length&&x.push({type:"text",value:u.value.slice(h)}),f.children.splice(S,1,...x)):x=[u],S+x.length}}function D9(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let a=!e[0]||Array.isArray(e[0])?e:[e],n=-1;for(;++n<a.length;){let r=a[n];t.push([M9(r[0]),R9(r[1])])}return t}function M9(e){return typeof e=="string"?new RegExp(vC(e),"g"):e}function R9(e){return typeof e=="function"?e:function(){return e}}var MB=m(()=>{"use strict";DB();Mh();Ah()});var RB=m(()=>{"use strict";MB()});function LC(){return{transforms:[z9],enter:{literalAutolink:P9,literalAutolinkEmail:wC,literalAutolinkHttp:wC,literalAutolinkWww:wC},exit:{literalAutolink:U9,literalAutolinkEmail:F9,literalAutolinkHttp:O9,literalAutolinkWww:B9}}}function IC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:bC,notInConstruct:CC},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:bC,notInConstruct:CC},{character:":",before:"[ps]",after:"\\/",inConstruct:bC,notInConstruct:CC}]}}function P9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wC(e){this.config.enter.autolinkProtocol.call(this,e)}function O9(e){this.config.exit.autolinkProtocol.call(this,e)}function B9(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function F9(e){this.config.exit.autolinkEmail.call(this,e)}function U9(e){this.exit(e)}function z9(e){SC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,V9],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,N9]],{ignore:["link","linkReference"]})}function V9(e,t,a,n,r){let i="";if(!PB(r)||(/^w/i.test(t)&&(a=t+a,t="",i="http://"),!H9(a)))return!1;let o=q9(a+n);if(!o[0])return!1;let s={type:"link",title:null,url:i+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function N9(e,t,a,n){return!PB(n,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+a,children:[{type:"text",value:t+"@"+a}]}}function H9(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function q9(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let a=t[0],n=a.indexOf(")"),r=yC(e,"("),i=yC(e,")");for(;n!==-1&&r>i;)e+=a.slice(0,n+1),a=a.slice(n+1),n=a.indexOf(")"),i++;return[e,a]}function PB(e,t){let a=e.input.charCodeAt(e.index-1);return(e.index===0||An(a)||bo(a))&&(!t||a!==47)}var bC,CC,OB=m(()=>{"use strict";EB();de();RB();bC="phrasing",CC=["autolink","link","image","label"]});var BB=m(()=>{"use strict";OB()});function j9(){this.buffer()}function G9(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function X9(){this.buffer()}function W9(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function K9(e){let t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Gt(this.sliceSerialize(e)).toLowerCase(),a.label=t}function Y9(e){this.exit(e)}function Z9(e){let t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Gt(this.sliceSerialize(e)).toLowerCase(),a.label=t}function Q9(e){this.exit(e)}function $9(){return"["}function FB(e,t,a,n){let r=a.createTracker(n),i=r.move("[^"),o=a.enter("footnoteReference"),s=a.enter("reference");return i+=r.move(a.safe(a.associationId(e),{after:"]",before:i})),s(),o(),i+=r.move("]"),i}function _C(){return{enter:{gfmFootnoteCallString:j9,gfmFootnoteCall:G9,gfmFootnoteDefinitionLabelString:X9,gfmFootnoteDefinition:W9},exit:{gfmFootnoteCallString:K9,gfmFootnoteCall:Y9,gfmFootnoteDefinitionLabelString:Z9,gfmFootnoteDefinition:Q9}}}function kC(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:a,footnoteReference:FB},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(n,r,i,o){let s=i.createTracker(o),l=s.move("[^"),u=i.enter("footnoteDefinition"),c=i.enter("label");return l+=s.move(i.safe(i.associationId(n),{before:l,after:"]"})),c(),l+=s.move("]:"),n.children&&n.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
31
|
+
`:" ")+i.indentLines(i.containerFlow(n,s.current()),t?UB:J9))),u(),l}}function J9(e,t,a){return t===0?e:UB(e,t,a)}function UB(e,t,a){return(a?"":" ")+e}var zB=m(()=>{"use strict";fl();FB.peek=$9});var VB=m(()=>{"use strict";zB()});function TC(){return{canContainEols:["delete"],enter:{strikethrough:tG},exit:{strikethrough:aG}}}function AC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:eG}],handlers:{delete:NB}}}function tG(e){this.enter({type:"delete",children:[]},e)}function aG(e){this.exit(e)}function NB(e,t,a,n){let r=a.createTracker(n),i=a.enter("strikethrough"),o=r.move("~~");return o+=a.containerPhrasing(e,{...r.current(),before:o,after:"~"}),o+=r.move("~~"),i(),o}function nG(){return"~"}var eG,HB=m(()=>{"use strict";eG=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];NB.peek=nG});var qB=m(()=>{"use strict";HB()});function rG(e){return e.length}function GB(e,t){let a=t||{},n=(a.align||[]).concat(),r=a.stringLength||rG,i=[],o=[],s=[],l=[],u=0,c=-1;for(;++c<e.length;){let v=[],S=[],g=-1;for(e[c].length>u&&(u=e[c].length);++g<e[c].length;){let x=iG(e[c][g]);if(a.alignDelimiters!==!1){let y=r(x);S[g]=y,(l[g]===void 0||y>l[g])&&(l[g]=y)}v.push(x)}o[c]=v,s[c]=S}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<u;)i[f]=jB(n[f]);else{let v=jB(n);for(;++f<u;)i[f]=v}f=-1;let d=[],p=[];for(;++f<u;){let v=i[f],S="",g="";v===99?(S=":",g=":"):v===108?S=":":v===114&&(g=":");let x=a.alignDelimiters===!1?1:Math.max(1,l[f]-S.length-g.length),y=S+"-".repeat(x)+g;a.alignDelimiters!==!1&&(x=S.length+x+g.length,x>l[f]&&(l[f]=x),p[f]=x),d[f]=y}o.splice(1,0,d),s.splice(1,0,p),c=-1;let h=[];for(;++c<o.length;){let v=o[c],S=s[c];f=-1;let g=[];for(;++f<u;){let x=v[f]||"",y="",b="";if(a.alignDelimiters!==!1){let T=l[f]-(S[f]||0),I=i[f];I===114?y=" ".repeat(T):I===99?T%2?(y=" ".repeat(T/2+.5),b=" ".repeat(T/2-.5)):(y=" ".repeat(T/2),b=y):b=" ".repeat(T)}a.delimiterStart!==!1&&!f&&g.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&x==="")&&(a.delimiterStart!==!1||f)&&g.push(" "),a.alignDelimiters!==!1&&g.push(y),g.push(x),a.alignDelimiters!==!1&&g.push(b),a.padding!==!1&&g.push(" "),(a.delimiterEnd!==!1||f!==u-1)&&g.push("|")}h.push(a.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return h.join(`
|
|
32
|
+
`)}function iG(e){return e==null?"":String(e)}function jB(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var XB=m(()=>{"use strict"});function WB(e,t,a,n){let r=a.enter("blockquote"),i=a.createTracker(n);i.move("> "),i.shift(2);let o=a.indentLines(a.containerFlow(e,i.current()),oG);return r(),o}function oG(e,t,a){return">"+(a?"":" ")+e}var KB=m(()=>{"use strict"});function ZB(e,t){return YB(e,t.inConstruct,!0)&&!YB(e,t.notInConstruct,!1)}function YB(e,t,a){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return a;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}var QB=m(()=>{"use strict"});function EC(e,t,a,n){let r=-1;for(;++r<a.unsafe.length;)if(a.unsafe[r].character===`
|
|
33
|
+
`&&ZB(a.stack,a.unsafe[r]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
34
|
+
`}var $B=m(()=>{"use strict";QB()});function JB(e,t){let a=String(e),n=a.indexOf(t),r=n,i=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===r?++i>o&&(o=i):i=1,r=n+t.length,n=a.indexOf(t,r);return o}var e3=m(()=>{"use strict"});function t3(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}var a3=m(()=>{"use strict"});function n3(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}var r3=m(()=>{"use strict"});function i3(e,t,a,n){let r=n3(a),i=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(t3(e,a)){let f=a.enter("codeIndented"),d=a.indentLines(i,sG);return f(),d}let s=a.createTracker(n),l=r.repeat(Math.max(JB(i,r)+1,3)),u=a.enter("codeFenced"),c=s.move(l);if(e.lang){let f=a.enter(`codeFencedLang${o}`);c+=s.move(a.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){let f=a.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(a.safe(e.meta,{before:c,after:`
|
|
35
|
+
`,encode:["`"],...s.current()})),f()}return c+=s.move(`
|
|
36
|
+
`),i&&(c+=s.move(i+`
|
|
37
|
+
`)),c+=s.move(l),u(),c}function sG(e,t,a){return(a?"":" ")+e}var o3=m(()=>{"use strict";e3();a3();r3()});function hl(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}var zh=m(()=>{"use strict"});function s3(e,t,a,n){let r=hl(a),i=r==='"'?"Quote":"Apostrophe",o=a.enter("definition"),s=a.enter("label"),l=a.createTracker(n),u=l.move("[");return u+=l.move(a.safe(a.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=a.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(a.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=a.enter("destinationRaw"),u+=l.move(a.safe(e.url,{before:u,after:e.title?" ":`
|
|
38
|
+
`,...l.current()}))),s(),e.title&&(s=a.enter(`title${i}`),u+=l.move(" "+r),u+=l.move(a.safe(e.title,{before:u,after:r,...l.current()})),u+=l.move(r),s()),o(),u}var l3=m(()=>{"use strict";zh()});function u3(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}var c3=m(()=>{"use strict"});function wi(e){return"&#x"+e.toString(16).toUpperCase()+";"}var Vh=m(()=>{"use strict"});function gl(e,t,a){let n=vr(e),r=vr(t);return n===void 0?r===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var DC=m(()=>{"use strict";uh()});function MC(e,t,a,n){let r=u3(a),i=a.enter("emphasis"),o=a.createTracker(n),s=o.move(r),l=o.move(a.containerPhrasing(e,{after:r,before:s,...o.current()})),u=l.charCodeAt(0),c=gl(n.before.charCodeAt(n.before.length-1),u,r);c.inside&&(l=wi(u)+l.slice(1));let f=l.charCodeAt(l.length-1),d=gl(n.after.charCodeAt(0),f,r);d.inside&&(l=l.slice(0,-1)+wi(f));let p=o.move(r);return i(),a.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+l+p}function lG(e,t,a){return a.options.emphasis||"*"}var f3=m(()=>{"use strict";c3();Vh();DC();MC.peek=lG});function d3(e,t){let a=!1;return To(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return a=!0,ko}),!!((!e.depth||e.depth<3)&&vo(e)&&(t.options.setext||a))}var p3=m(()=>{"use strict";Rh();ih()});function m3(e,t,a,n){let r=Math.max(Math.min(6,e.depth||1),1),i=a.createTracker(n);if(d3(e,a)){let c=a.enter("headingSetext"),f=a.enter("phrasing"),d=a.containerPhrasing(e,{...i.current(),before:`
|
|
39
|
+
`,after:`
|
|
40
|
+
`});return f(),c(),d+`
|
|
41
|
+
`+(r===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
42
|
+
`))+1))}let o="#".repeat(r),s=a.enter("headingAtx"),l=a.enter("phrasing");i.move(o+" ");let u=a.containerPhrasing(e,{before:"# ",after:`
|
|
43
|
+
`,...i.current()});return/^[\t ]/.test(u)&&(u=wi(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,a.options.closeAtx&&(u+=" "+o),l(),s(),u}var h3=m(()=>{"use strict";Vh();p3()});function RC(e){return e.value||""}function uG(){return"<"}var g3=m(()=>{"use strict";RC.peek=uG});function PC(e,t,a,n){let r=hl(a),i=r==='"'?"Quote":"Apostrophe",o=a.enter("image"),s=a.enter("label"),l=a.createTracker(n),u=l.move("![");return u+=l.move(a.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=a.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(a.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=a.enter("destinationRaw"),u+=l.move(a.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=a.enter(`title${i}`),u+=l.move(" "+r),u+=l.move(a.safe(e.title,{before:u,after:r,...l.current()})),u+=l.move(r),s()),u+=l.move(")"),o(),u}function cG(){return"!"}var x3=m(()=>{"use strict";zh();PC.peek=cG});function OC(e,t,a,n){let r=e.referenceType,i=a.enter("imageReference"),o=a.enter("label"),s=a.createTracker(n),l=s.move("!["),u=a.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),o();let c=a.stack;a.stack=[],o=a.enter("reference");let f=a.safe(a.associationId(e),{before:l,after:"]",...s.current()});return o(),a.stack=c,i(),r==="full"||!u||u!==f?l+=s.move(f+"]"):r==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function fG(){return"!"}var y3=m(()=>{"use strict";OC.peek=fG});function BC(e,t,a){let n=e.value||"",r="`",i=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(n);)r+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++i<a.unsafe.length;){let o=a.unsafe[i],s=a.compilePattern(o),l;if(o.atBreak)for(;l=s.exec(n);){let u=l.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(l.index+1)}}return r+n+r}function dG(){return"`"}var v3=m(()=>{"use strict";BC.peek=dG});function FC(e,t){let a=vo(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(a===e.url||"mailto:"+a===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}var S3=m(()=>{"use strict";ih()});function UC(e,t,a,n){let r=hl(a),i=r==='"'?"Quote":"Apostrophe",o=a.createTracker(n),s,l;if(FC(e,a)){let c=a.stack;a.stack=[],s=a.enter("autolink");let f=o.move("<");return f+=o.move(a.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),s(),a.stack=c,f}s=a.enter("link"),l=a.enter("label");let u=o.move("[");return u+=o.move(a.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=a.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(a.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=a.enter("destinationRaw"),u+=o.move(a.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=a.enter(`title${i}`),u+=o.move(" "+r),u+=o.move(a.safe(e.title,{before:u,after:r,...o.current()})),u+=o.move(r),l()),u+=o.move(")"),s(),u}function pG(e,t,a){return FC(e,a)?"<":"["}var b3=m(()=>{"use strict";zh();S3();UC.peek=pG});function zC(e,t,a,n){let r=e.referenceType,i=a.enter("linkReference"),o=a.enter("label"),s=a.createTracker(n),l=s.move("["),u=a.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),o();let c=a.stack;a.stack=[],o=a.enter("reference");let f=a.safe(a.associationId(e),{before:l,after:"]",...s.current()});return o(),a.stack=c,i(),r==="full"||!u||u!==f?l+=s.move(f+"]"):r==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function mG(){return"["}var C3=m(()=>{"use strict";zC.peek=mG});function xl(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}var Nh=m(()=>{"use strict"});function w3(e){let t=xl(e),a=e.options.bulletOther;if(!a)return t==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+a+"`) to be different");return a}var L3=m(()=>{"use strict";Nh()});function I3(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}var _3=m(()=>{"use strict"});function Hh(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}var VC=m(()=>{"use strict"});function k3(e,t,a,n){let r=a.enter("list"),i=a.bulletCurrent,o=e.ordered?I3(a):xl(a),s=e.ordered?o==="."?")":".":w3(a),l=t&&a.bulletLastUsed?o===a.bulletLastUsed:!1;if(!e.ordered){let c=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(l=!0),Hh(a)===o&&c){let f=-1;for(;++f<e.children.length;){let d=e.children[f];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=s),a.bulletCurrent=o;let u=a.containerFlow(e,n);return a.bulletLastUsed=o,a.bulletCurrent=i,r(),u}var T3=m(()=>{"use strict";Nh();L3();_3();VC()});function A3(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}var E3=m(()=>{"use strict"});function D3(e,t,a,n){let r=A3(a),i=a.bulletCurrent||xl(a);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(a.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let o=i.length+1;(r==="tab"||r==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=a.createTracker(n);s.move(i+" ".repeat(o-i.length)),s.shift(o);let l=a.enter("listItem"),u=a.indentLines(a.containerFlow(e,s.current()),c);return l(),u;function c(f,d,p){return d?(p?"":" ".repeat(o))+f:(p?i:i+" ".repeat(o-i.length))+f}}var M3=m(()=>{"use strict";Nh();E3()});function R3(e,t,a,n){let r=a.enter("paragraph"),i=a.enter("phrasing"),o=a.containerPhrasing(e,n);return i(),r(),o}var P3=m(()=>{"use strict"});var NC,O3=m(()=>{"use strict";Ah();NC=Ci(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"])});var B3=m(()=>{"use strict";O3()});function F3(e,t,a,n){return(e.children.some(function(o){return NC(o)})?a.containerPhrasing:a.containerFlow).call(a,e,n)}var U3=m(()=>{"use strict";B3()});function z3(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}var V3=m(()=>{"use strict"});function HC(e,t,a,n){let r=z3(a),i=a.enter("strong"),o=a.createTracker(n),s=o.move(r+r),l=o.move(a.containerPhrasing(e,{after:r,before:s,...o.current()})),u=l.charCodeAt(0),c=gl(n.before.charCodeAt(n.before.length-1),u,r);c.inside&&(l=wi(u)+l.slice(1));let f=l.charCodeAt(l.length-1),d=gl(n.after.charCodeAt(0),f,r);d.inside&&(l=l.slice(0,-1)+wi(f));let p=o.move(r+r);return i(),a.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+l+p}function hG(e,t,a){return a.options.strong||"*"}var N3=m(()=>{"use strict";V3();Vh();DC();HC.peek=hG});function H3(e,t,a,n){return a.safe(e.value,n)}var q3=m(()=>{"use strict"});function j3(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}var G3=m(()=>{"use strict"});function X3(e,t,a){let n=(Hh(a)+(a.options.ruleSpaces?" ":"")).repeat(j3(a));return a.options.ruleSpaces?n.slice(0,-1):n}var W3=m(()=>{"use strict";G3();VC()});var tf,K3=m(()=>{"use strict";KB();$B();o3();l3();f3();h3();g3();x3();y3();v3();b3();C3();T3();M3();P3();U3();N3();q3();W3();tf={blockquote:WB,break:EC,code:i3,definition:s3,emphasis:MC,hardBreak:EC,heading:m3,html:RC,image:PC,imageReference:OC,inlineCode:BC,link:UC,linkReference:zC,list:k3,listItem:D3,paragraph:R3,root:F3,strong:HC,text:H3,thematicBreak:X3}});var qC=m(()=>{"use strict";K3()});function GC(){return{enter:{table:gG,tableData:Y3,tableHeader:Y3,tableRow:yG},exit:{codeText:vG,table:xG,tableData:jC,tableHeader:jC,tableRow:jC}}}function gG(e){let t=e._align;this.enter({type:"table",align:t.map(function(a){return a==="none"?null:a}),children:[]},e),this.data.inTable=!0}function xG(e){this.exit(e),this.data.inTable=void 0}function yG(e){this.enter({type:"tableRow",children:[]},e)}function jC(e){this.exit(e)}function Y3(e){this.enter({type:"tableCell",children:[]},e)}function vG(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,SG));let a=this.stack[this.stack.length-1];a.type,a.value=t,this.exit(e)}function SG(e,t){return t==="|"?t:e}function XC(e){let t=e||{},a=t.tableCellPadding,n=t.tablePipeAlign,r=t.stringLength,i=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
44
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:l,tableRow:s}};function o(p,h,v,S){return u(c(p,v,S),p.align)}function s(p,h,v,S){let g=f(p,v,S),x=u([g]);return x.slice(0,x.indexOf(`
|
|
45
|
+
`))}function l(p,h,v,S){let g=v.enter("tableCell"),x=v.enter("phrasing"),y=v.containerPhrasing(p,{...S,before:i,after:i});return x(),g(),y}function u(p,h){return GB(p,{align:h,alignDelimiters:n,padding:a,stringLength:r})}function c(p,h,v){let S=p.children,g=-1,x=[],y=h.enter("table");for(;++g<S.length;)x[g]=f(S[g],h,v);return y(),x}function f(p,h,v){let S=p.children,g=-1,x=[],y=h.enter("tableRow");for(;++g<S.length;)x[g]=l(S[g],p,h,v);return y(),x}function d(p,h,v){let S=tf.inlineCode(p,h,v);return v.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}var Z3=m(()=>{"use strict";XB();qC()});var Q3=m(()=>{"use strict";Z3()});function WC(){return{exit:{taskListCheckValueChecked:$3,taskListCheckValueUnchecked:$3,paragraph:bG}}}function KC(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:CG}}}function $3(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function bG(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let a=this.stack[this.stack.length-1];a.type;let n=a.children[0];if(n&&n.type==="text"){let r=t.children,i=-1,o;for(;++i<r.length;){let s=r[i];if(s.type==="paragraph"){o=s;break}}o===a&&(n.value=n.value.slice(1),n.value.length===0?a.children.shift():a.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,a.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function CG(e,t,a,n){let r=e.children[0],i=typeof e.checked=="boolean"&&r&&r.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=a.createTracker(n);i&&s.move(o);let l=tf.listItem(e,t,a,{...n,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+o}}var J3=m(()=>{"use strict";qC()});var eF=m(()=>{"use strict";J3()});function YC(){return[LC(),_C(),TC(),GC(),WC()]}function ZC(e){return{extensions:[IC(),kC(e),AC(),XC(e),KC()]}}var tF=m(()=>{"use strict";BB();VB();qB();Q3();eF()});var aF=m(()=>{"use strict";tF()});function $C(){return{text:Dn}}function IG(e,t,a){let n=this,r,i;return o;function o(f){return!QC(f)||!cF.call(n,n.previous)||JC(n.events)?a(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return QC(f)?(e.consume(f),s):f===64?(e.consume(f),l):a(f)}function l(f){return f===46?e.check(LG,c,u)(f):f===45||f===95||tt(f)?(i=!0,e.consume(f),l):c(f)}function u(f){return e.consume(f),r=!0,l}function c(f){return i&&r&&Lt(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):a(f)}}function _G(e,t,a){let n=this;return r;function r(o){return o!==87&&o!==119||!lF.call(n,n.previous)||JC(n.events)?a(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wG,e.attempt(nF,e.attempt(rF,i),a),a)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function kG(e,t,a){let n=this,r="",i=!1;return o;function o(f){return(f===72||f===104)&&uF.call(n,n.previous)&&!JC(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(f),e.consume(f),s):a(f)}function s(f){if(Lt(f)&&r.length<5)return r+=String.fromCodePoint(f),e.consume(f),s;if(f===58){let d=r.toLowerCase();if(d==="http"||d==="https")return e.consume(f),l}return a(f)}function l(f){return f===47?(e.consume(f),i?u:(i=!0,l)):a(f)}function u(f){return f===null||So(f)||ie(f)||An(f)||bo(f)?a(f):e.attempt(nF,e.attempt(rF,c),a)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function TG(e,t,a){let n=0;return r;function r(o){return(o===87||o===119)&&n<3?(n++,e.consume(o),r):o===46&&n===3?(e.consume(o),i):a(o)}function i(o){return o===null?a(o):t(o)}}function AG(e,t,a){let n,r,i;return o;function o(u){return u===46||u===95?e.check(iF,l,s)(u):u===null||ie(u)||An(u)||u!==45&&bo(u)?l(u):(i=!0,e.consume(u),o)}function s(u){return u===95?n=!0:(r=n,n=void 0),e.consume(u),o}function l(u){return r||n||!i?a(u):t(u)}}function EG(e,t){let a=0,n=0;return r;function r(o){return o===40?(a++,e.consume(o),r):o===41&&n<a?i(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(iF,t,i)(o):o===null||ie(o)||An(o)?t(o):(e.consume(o),r)}function i(o){return o===41&&n++,e.consume(o),r}}function DG(e,t,a){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),i):s===93?(e.consume(s),r):s===60||s===null||ie(s)||An(s)?t(s):a(s)}function r(s){return s===null||s===40||s===91||ie(s)||An(s)?t(s):n(s)}function i(s){return Lt(s)?o(s):a(s)}function o(s){return s===59?(e.consume(s),n):Lt(s)?(e.consume(s),o):a(s)}}function MG(e,t,a){return n;function n(i){return e.consume(i),r}function r(i){return tt(i)?a(i):t(i)}}function lF(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ie(e)}function uF(e){return!Lt(e)}function cF(e){return!(e===47||QC(e))}function QC(e){return e===43||e===45||e===46||e===95||tt(e)}function JC(e){let t=e.length,a=!1;for(;t--;){let n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){a=!0;break}if(n._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}var wG,nF,rF,iF,LG,oF,sF,Sr,Dn,Eo,fF=m(()=>{"use strict";de();wG={tokenize:TG,partial:!0},nF={tokenize:AG,partial:!0},rF={tokenize:EG,partial:!0},iF={tokenize:DG,partial:!0},LG={tokenize:MG,partial:!0},oF={name:"wwwAutolink",tokenize:_G,previous:lF},sF={name:"protocolAutolink",tokenize:kG,previous:uF},Sr={name:"emailAutolink",tokenize:IG,previous:cF},Dn={};Eo=48;for(;Eo<123;)Dn[Eo]=Sr,Eo++,Eo===58?Eo=65:Eo===91&&(Eo=97);Dn[43]=Sr;Dn[45]=Sr;Dn[46]=Sr;Dn[95]=Sr;Dn[72]=[Sr,sF];Dn[104]=[Sr,sF];Dn[87]=[Sr,oF];Dn[119]=[Sr,oF]});var dF=m(()=>{"use strict";fF()});function ew(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:FG,continuation:{tokenize:UG},exit:zG}},text:{91:{name:"gfmFootnoteCall",tokenize:BG},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:PG,resolveTo:OG}}}}function PG(e,t,a){let n=this,r=n.events.length,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o;for(;r--;){let l=n.events[r][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return a(l);let u=Gt(n.sliceSerialize({start:o.end,end:n.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?a(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function OG(e,t){let a=e.length,n;for(;a--;)if(e[a][1].type==="labelImage"&&e[a][0]==="enter"){n=e[a][1];break}e[a+1][1].type="data",e[a+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[a+1],e[a+2],["enter",r,t],e[a+3],e[a+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(a,e.length-a+1,...l),e}function BG(e,t,a){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),i=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?a(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(i>999||f===93&&!o||f===null||f===91||ie(f))return a(f);if(f===93){e.exit("chunkString");let d=e.exit("gfmFootnoteCallString");return r.includes(Gt(n.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):a(f)}return ie(f)||(o=!0),i++,e.consume(f),f===92?c:u}function c(f){return f===91||f===92||f===93?(e.consume(f),i++,u):u(f)}}function FG(e,t,a){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),i,o=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):a(h)}function c(h){if(o>999||h===93&&!s||h===null||h===91||ie(h))return a(h);if(h===93){e.exit("chunkString");let v=e.exit("gfmFootnoteDefinitionLabelString");return i=Gt(n.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return ie(h)||(s=!0),o++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,c):c(h)}function d(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),r.includes(i)||r.push(i),j(e,p,"gfmFootnoteDefinitionWhitespace")):a(h)}function p(h){return t(h)}}function UG(e,t,a){return e.check(En,t,e.attempt(RG,t,a))}function zG(e){e.exit("gfmFootnoteDefinition")}function VG(e,t,a){let n=this;return j(e,r,"gfmFootnoteDefinitionIndent",5);function r(i){let o=n.events[n.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(i):a(i)}}var RG,pF=m(()=>{"use strict";Ch();lt();de();fl();RG={tokenize:VG,partial:!0}});var mF=m(()=>{"use strict";pF()});function tw(e){let a=(e||{}).singleTilde,n={name:"strikethrough",tokenize:i,resolveAll:r};return a==null&&(a=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(o,s){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let u=l;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[l][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[l][1].end)},f={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[l][1].start)},d=[["enter",c,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&st(d,d.length,0,Si(p,o.slice(u+1,l),s)),st(d,d.length,0,[["exit",f,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",c,s]]),st(o,u-1,l-u+3,d),l=u+d.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function i(o,s,l){let u=this.previous,c=this.events,f=0;return d;function d(h){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(h):(o.enter("strikethroughSequenceTemporary"),p(h))}function p(h){let v=vr(u);if(h===126)return f>1?l(h):(o.consume(h),f++,p);if(f<2&&!a)return l(h);let S=o.exit("strikethroughSequenceTemporary"),g=vr(h);return S._open=!g||g===2&&!!v,S._close=!v||v===2&&!!g,s(h)}}}var hF=m(()=>{"use strict";yr();uh();Xc()});var gF=m(()=>{"use strict";hF()});function NG(e,t,a,n){let r=0;if(!(a===0&&n.length===0)){for(;r<e.map.length;){if(e.map[r][0]===t){e.map[r][1]+=a,e.map[r][2].push(...n);return}r+=1}e.map.push([t,a,n])}}var qh,xF=m(()=>{"use strict";qh=class{constructor(){this.map=[]}add(t,a,n){NG(this,t,a,n)}consume(t){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let a=this.map.length,n=[];for(;a>0;)a-=1,n.push(t.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),t.length=this.map[a][0];n.push(t.slice()),t.length=0;let r=n.pop();for(;r;){for(let i of r)t.push(i);r=n.pop()}this.map.length=0}}});function yF(e,t){let a=!1,n=[];for(;t<e.length;){let r=e[t];if(a){if(r[0]==="enter")r[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){let i=n.length-1;n[i]=n[i]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(a=!0);t+=1}return n}var vF=m(()=>{"use strict"});function aw(){return{flow:{null:{name:"table",tokenize:HG,resolveAll:qG}}}}function HG(e,t,a){let n=this,r=0,i=0,o;return s;function s(C){let U=n.events.length-1;for(;U>-1;){let q=n.events[U][1].type;if(q==="lineEnding"||q==="linePrefix")U--;else break}let N=U>-1?n.events[U][1].type:null,B=N==="tableHead"||N==="tableRow"?I:l;return B===I&&n.parser.lazy[n.now().line]?a(C):B(C)}function l(C){return e.enter("tableHead"),e.enter("tableRow"),u(C)}function u(C){return C===124||(o=!0,i+=1),c(C)}function c(C){return C===null?a(C):F(C)?i>1?(i=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),p):a(C):X(C)?j(e,c,"whitespace")(C):(i+=1,o&&(o=!1,r+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(C)))}function f(C){return C===null||C===124||ie(C)?(e.exit("data"),c(C)):(e.consume(C),C===92?d:f)}function d(C){return C===92||C===124?(e.consume(C),f):f(C)}function p(C){return n.interrupt=!1,n.parser.lazy[n.now().line]?a(C):(e.enter("tableDelimiterRow"),o=!1,X(C)?j(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):h(C))}function h(C){return C===45||C===58?S(C):C===124?(o=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),v):T(C)}function v(C){return X(C)?j(e,S,"whitespace")(C):S(C)}function S(C){return C===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),g):C===45?(i+=1,g(C)):C===null||F(C)?b(C):T(C)}function g(C){return C===45?(e.enter("tableDelimiterFiller"),x(C)):T(C)}function x(C){return C===45?(e.consume(C),x):C===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(C))}function y(C){return X(C)?j(e,b,"whitespace")(C):b(C)}function b(C){return C===124?h(C):C===null||F(C)?!o||r!==i?T(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):T(C)}function T(C){return a(C)}function I(C){return e.enter("tableRow"),A(C)}function A(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),A):C===null||F(C)?(e.exit("tableRow"),t(C)):X(C)?j(e,A,"whitespace")(C):(e.enter("data"),_(C))}function _(C){return C===null||C===124||ie(C)?(e.exit("data"),A(C)):(e.consume(C),C===92?M:_)}function M(C){return C===92||C===124?(e.consume(C),_):_(C)}}function qG(e,t){let a=-1,n=!0,r=0,i=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,u,c,f,d=new qh;for(;++a<e.length;){let p=e[a],h=p[1];p[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(SF(d,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(a,0,[["enter",u,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(n=!0,f=void 0,i=[0,0,0,0],o=[0,a+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(a,0,[["enter",c,t]])),r=h.type==="tableDelimiterRow"?2:c?3:1):r&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(n=!1,o[2]===0&&(i[1]!==0&&(o[0]=o[1],f=jh(d,t,i,r,void 0,f),i=[0,0,0,0]),o[2]=a)):h.type==="tableCellDivider"&&(n?n=!1:(i[1]!==0&&(o[0]=o[1],f=jh(d,t,i,r,void 0,f)),i=o,o=[i[1],a,0,0])):h.type==="tableHead"?(s=!0,l=a):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=a,i[1]!==0?(o[0]=o[1],f=jh(d,t,i,r,a,f)):o[1]!==0&&(f=jh(d,t,o,r,a,f)),r=0):r&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(o[3]=a)}for(l!==0&&SF(d,t,l,u,c),d.consume(t.events),a=-1;++a<t.events.length;){let p=t.events[a];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=yF(t.events,a))}return e}function jh(e,t,a,n,r,i){let o=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";a[0]!==0&&(i.end=Object.assign({},yl(t.events,a[0])),e.add(a[0],0,[["exit",i,t]]));let l=yl(t.events,a[1]);if(i={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(a[1],0,[["enter",i,t]]),a[2]!==0){let u=yl(t.events,a[2]),c=yl(t.events,a[3]),f={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(a[2],0,[["enter",f,t]]),n!==2){let d=t.events[a[2]],p=t.events[a[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",a[3]>a[2]+1){let h=a[2]+1,v=a[3]-a[2]-1;e.add(h,v,[])}}e.add(a[3]+1,0,[["exit",f,t]])}return r!==void 0&&(i.end=Object.assign({},yl(t.events,r)),e.add(r,0,[["exit",i,t]]),i=void 0),i}function SF(e,t,a,n,r){let i=[],o=yl(t.events,a);r&&(r.end=Object.assign({},o),i.push(["exit",r,t])),n.end=Object.assign({},o),i.push(["exit",n,t]),e.add(a+1,0,i)}function yl(e,t){let a=e[t],n=a[0]==="enter"?"start":"end";return a[1][n]}var bF=m(()=>{"use strict";lt();de();xF();vF()});var CF=m(()=>{"use strict";bF()});function nw(){return{text:{91:jG}}}function GG(e,t,a){let n=this;return r;function r(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?a(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return ie(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):a(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):a(l)}function s(l){return F(l)?t(l):X(l)?e.check({tokenize:XG},t,a)(l):a(l)}}function XG(e,t,a){return j(e,n,"whitespace");function n(r){return r===null?a(r):t(r)}}var jG,wF=m(()=>{"use strict";lt();de();jG={name:"tasklistCheck",tokenize:GG}});var LF=m(()=>{"use strict";wF()});function IF(e){return sh([$C(),ew(),tw(e),aw(),nw()])}var _F=m(()=>{"use strict";k0();dF();mF();gF();CF();LF()});function Gh(e){let t=this,a=e||WG,n=t.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(IF(a)),i.push(YC()),o.push(ZC(a))}var WG,kF=m(()=>{"use strict";aF();_F();WG={}});var TF=m(()=>{"use strict";kF()});function AF(e){let t=e.apiBaseUrl.replace(/\/$/,"");return async function(n,r={}){let{body:i,headers:o,skipAuth:s=!1,quiet:l=!1,...u}=r,c={"Content-Type":"application/json",...o};e.authToken&&!s&&(c.Authorization=`Bearer ${e.authToken}`),e.organisationId&&(c.organisation_id=e.organisationId);try{let f=await fetch(`${t}${n}`,{...u,headers:c,body:i?JSON.stringify(i):void 0}),d=await f.json().catch(()=>({}));if(f.status===401)throw e.authToken&&!s&&e.onUnauthorized?.(),new Error(d.detail||"Unauthorized");if(!f.ok){l||console.error("[GarudaChat] Backend error:",d);let p="Something went wrong";throw typeof d.detail=="string"?p=d.detail:Array.isArray(d.detail)?p=d.detail.map(h=>h.msg).join(", "):d.message&&(p=d.message),new Error(p)}return d}catch(f){throw l||console.error("[GarudaChat] API error:",f),new Error(f.message||"Failed to connect to server")}}}var EF=m(()=>{"use strict"});function DF(e){return{sendMessage:(t,a=!1)=>e(KG,{method:"POST",body:t,skipAuth:a})}}var KG,MF=m(()=>{"use strict";KG="/api/v1/agents/chat"});function RF(e){let t=e.apiBaseUrl.replace(/\/$/,"");return{getTo:()=>e.supportPhone??"",getToken:async()=>{let a=await fetch(`${t}${YG}`,{method:"POST"});if(!a.ok)throw new Error("Failed to fetch voice token");let n=await a.json();return n?.token||n?.accessToken||n?.access_token},submitOtp:async(a,n={})=>{let r=new URLSearchParams({code:a});return n.callSid&&r.set("call_sid",n.callSid),n.clientRef&&r.set("client_ref",n.clientRef),(await fetch(`${t}${ZG}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r})).json()}}}var YG,ZG,PF=m(()=>{"use strict";YG="/api/v1/call/getToken",ZG="/api/v1/call/submit-otp"});function QG(){return navigator.language||navigator.languages?.[0]||"en-US"}function OF(e){let t=(0,Xh.useRef)(null),[a,n]=(0,Xh.useState)(!1);return{start:()=>{if(t.current)return;let o=window.SpeechRecognition||window.webkitSpeechRecognition;if(!o){console.error("[GarudaChat] SpeechRecognition is not supported in this browser.");return}let s=new o,l=QG();s.lang=l,s.continuous=!0,s.interimResults=!0,s.onstart=()=>{n(!0)},s.onresult=u=>{let c="",f="";for(let p=u.resultIndex;p<u.results.length;p++){let h=u.results[p],v=h[0].transcript;h.isFinal?f+=v:c+=v}let d=f+c;d.trim()&&e(d)},s.onerror=u=>{console.error("[GarudaChat] SpeechRecognition error:",u.error),n(!1)},s.onend=()=>{n(!1),t.current=null},t.current=s;try{s.start()}catch(u){console.error("[GarudaChat] Failed to start SpeechRecognition:",u),t.current=null,n(!1)}},stop:()=>{if(t.current){try{t.current.stop()}catch{}t.current=null}n(!1)},isListening:a}}var Xh,BF=m(()=>{"use strict";Xh=H(re())});var Ja=It((Ave,rw)=>{"use strict";var vl=typeof Reflect=="object"?Reflect:null,FF=vl&&typeof vl.apply=="function"?vl.apply:function(t,a,n){return Function.prototype.apply.call(t,a,n)},Wh;vl&&typeof vl.ownKeys=="function"?Wh=vl.ownKeys:Object.getOwnPropertySymbols?Wh=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Wh=function(t){return Object.getOwnPropertyNames(t)};function $G(e){console&&console.warn&&console.warn(e)}var zF=Number.isNaN||function(t){return t!==t};function Te(){Te.init.call(this)}rw.exports=Te;rw.exports.once=a8;Te.EventEmitter=Te;Te.prototype._events=void 0;Te.prototype._eventsCount=0;Te.prototype._maxListeners=void 0;var UF=10;function Kh(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Te,"defaultMaxListeners",{enumerable:!0,get:function(){return UF},set:function(e){if(typeof e!="number"||e<0||zF(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");UF=e}});Te.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};Te.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||zF(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function VF(e){return e._maxListeners===void 0?Te.defaultMaxListeners:e._maxListeners}Te.prototype.getMaxListeners=function(){return VF(this)};Te.prototype.emit=function(t){for(var a=[],n=1;n<arguments.length;n++)a.push(arguments[n]);var r=t==="error",i=this._events;if(i!==void 0)r=r&&i.error===void 0;else if(!r)return!1;if(r){var o;if(a.length>0&&(o=a[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")FF(l,this,a);else for(var u=l.length,c=GF(l,u),n=0;n<u;++n)FF(c[n],this,a);return!0};function NF(e,t,a,n){var r,i,o;if(Kh(a),i=e._events,i===void 0?(i=e._events=Object.create(null),e._eventsCount=0):(i.newListener!==void 0&&(e.emit("newListener",t,a.listener?a.listener:a),i=e._events),o=i[t]),o===void 0)o=i[t]=a,++e._eventsCount;else if(typeof o=="function"?o=i[t]=n?[a,o]:[o,a]:n?o.unshift(a):o.push(a),r=VF(e),r>0&&o.length>r&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,$G(s)}return e}Te.prototype.addListener=function(t,a){return NF(this,t,a,!1)};Te.prototype.on=Te.prototype.addListener;Te.prototype.prependListener=function(t,a){return NF(this,t,a,!0)};function JG(){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 HF(e,t,a){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:a},r=JG.bind(n);return r.listener=a,n.wrapFn=r,r}Te.prototype.once=function(t,a){return Kh(a),this.on(t,HF(this,t,a)),this};Te.prototype.prependOnceListener=function(t,a){return Kh(a),this.prependListener(t,HF(this,t,a)),this};Te.prototype.removeListener=function(t,a){var n,r,i,o,s;if(Kh(a),r=this._events,r===void 0)return this;if(n=r[t],n===void 0)return this;if(n===a||n.listener===a)--this._eventsCount===0?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||a));else if(typeof n!="function"){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===a||n[o].listener===a){s=n[o].listener,i=o;break}if(i<0)return this;i===0?n.shift():e8(n,i),n.length===1&&(r[t]=n[0]),r.removeListener!==void 0&&this.emit("removeListener",t,s||a)}return this};Te.prototype.off=Te.prototype.removeListener;Te.prototype.removeAllListeners=function(t){var a,n,r;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),o;for(r=0;r<i.length;++r)o=i[r],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(a=n[t],typeof a=="function")this.removeListener(t,a);else if(a!==void 0)for(r=a.length-1;r>=0;r--)this.removeListener(t,a[r]);return this};function qF(e,t,a){var n=e._events;if(n===void 0)return[];var r=n[t];return r===void 0?[]:typeof r=="function"?a?[r.listener||r]:[r]:a?t8(r):GF(r,r.length)}Te.prototype.listeners=function(t){return qF(this,t,!0)};Te.prototype.rawListeners=function(t){return qF(this,t,!1)};Te.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):jF.call(e,t)};Te.prototype.listenerCount=jF;function jF(e){var t=this._events;if(t!==void 0){var a=t[e];if(typeof a=="function")return 1;if(a!==void 0)return a.length}return 0}Te.prototype.eventNames=function(){return this._eventsCount>0?Wh(this._events):[]};function GF(e,t){for(var a=new Array(t),n=0;n<t;++n)a[n]=e[n];return a}function e8(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function t8(e){for(var t=new Array(e.length),a=0;a<t.length;++a)t[a]=e[a].listener||e[a];return t}function a8(e,t){return new Promise(function(a,n){function r(o){e.removeListener(t,i),n(o)}function i(){typeof e.removeListener=="function"&&e.removeListener("error",r),a([].slice.call(arguments))}XF(e,t,i,{once:!0}),t!=="error"&&n8(e,r,{once:!0})})}function n8(e,t,a){typeof e.on=="function"&&XF(e,"error",t,a)}function XF(e,t,a,n){if(typeof e.on=="function")n.once?e.once(t,a):e.on(t,a);else if(typeof e.addEventListener=="function")e.addEventListener(t,function r(i){n.once&&e.removeEventListener(t,r),a(i)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}});var WF,Do,iw=m(()=>{"use strict";WF=H(Ja()),Do=class extends WF.EventEmitter{constructor(t){super(),Object.defineProperties(this,{_attempts:{value:0,writable:!0},_duration:{enumerable:!1,get(){if(this._useInitialValue&&this._attempts===0)return this._min;let a=this._min*Math.pow(this._factor,this._attempts);if(this._jitter){let n=Math.random(),r=Math.floor(n*this._jitter*a);a=(Math.floor(n*10)&1)===0?a-r:a+r}return Math.min(a,this._max)|0}},_factor:{value:t.factor||2},_jitter:{value:t.jitter>0&&t.jitter<=1?t.jitter:0},_max:{value:t.max||1e4},_min:{value:t.min||100},_timeoutID:{value:null,writable:!0},_useInitialValue:{value:t.useInitialValue||!1}})}backoff(){let t=this._duration;this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null),this.emit("backoff",this._attempts,t),this._timeoutID=setTimeout(()=>{this.emit("ready",this._attempts,t),this._attempts++},t)}reset(){this._attempts=0,this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null)}}});function xt(e,t,a,n){function r(i){return i instanceof a?i:new a(function(o){o(i)})}return new(a||(a=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):r(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}var Sl=m(()=>{"use strict"});var ow=It((KF,Yh)=>{"use strict";(function(e,t){"use strict";typeof define=="function"&&define.amd?define(t):typeof Yh=="object"&&Yh.exports?Yh.exports=t():e.log=t()})(KF,function(){"use strict";var e=function(){},t="undefined",a=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],r={},i=null;function o(h,v){var S=h[v];if(typeof S.bind=="function")return S.bind(h);try{return Function.prototype.bind.call(S,h)}catch{return function(){return Function.prototype.apply.apply(S,[h,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(h){return h==="debug"&&(h="log"),typeof console===t?!1:h==="trace"&&a?s:console[h]!==void 0?o(console,h):console.log!==void 0?o(console,"log"):e}function u(){for(var h=this.getLevel(),v=0;v<n.length;v++){var S=n[v];this[S]=v<h?e:this.methodFactory(S,h,this.name)}if(this.log=this.debug,typeof console===t&&h<this.levels.SILENT)return"No console available for logging"}function c(h){return function(){typeof console!==t&&(u.call(this),this[h].apply(this,arguments))}}function f(h,v,S){return l(h)||c.apply(this,arguments)}function d(h,v){var S=this,g,x,y,b="loglevel";typeof h=="string"?b+=":"+h:typeof h=="symbol"&&(b=void 0);function T(C){var U=(n[C]||"silent").toUpperCase();if(!(typeof window===t||!b)){try{window.localStorage[b]=U;return}catch{}try{window.document.cookie=encodeURIComponent(b)+"="+U+";"}catch{}}}function I(){var C;if(!(typeof window===t||!b)){try{C=window.localStorage[b]}catch{}if(typeof C===t)try{var U=window.document.cookie,N=encodeURIComponent(b),B=U.indexOf(N+"=");B!==-1&&(C=/^([^;]+)/.exec(U.slice(B+N.length+1))[1])}catch{}return S.levels[C]===void 0&&(C=void 0),C}}function A(){if(!(typeof window===t||!b)){try{window.localStorage.removeItem(b)}catch{}try{window.document.cookie=encodeURIComponent(b)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function _(C){var U=C;if(typeof U=="string"&&S.levels[U.toUpperCase()]!==void 0&&(U=S.levels[U.toUpperCase()]),typeof U=="number"&&U>=0&&U<=S.levels.SILENT)return U;throw new TypeError("log.setLevel() called with invalid level: "+C)}S.name=h,S.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},S.methodFactory=v||f,S.getLevel=function(){return y??x??g},S.setLevel=function(C,U){return y=_(C),U!==!1&&T(y),u.call(S)},S.setDefaultLevel=function(C){x=_(C),I()||S.setLevel(C,!1)},S.resetLevel=function(){y=null,A(),u.call(S)},S.enableAll=function(C){S.setLevel(S.levels.TRACE,C)},S.disableAll=function(C){S.setLevel(S.levels.SILENT,C)},S.rebuild=function(){if(i!==S&&(g=_(i.getLevel())),u.call(S),i===S)for(var C in r)r[C].rebuild()},g=_(i?i.getLevel():"WARN");var M=I();M!=null&&(y=_(M)),u.call(S)}i=new d,i.getLogger=function(v){if(typeof v!="symbol"&&typeof v!="string"||v==="")throw new TypeError("You must supply a name when creating a logger.");var S=r[v];return S||(S=r[v]=new d(v,i.methodFactory)),S};var p=typeof window!==t?window.log:void 0;return i.noConflict=function(){return typeof window!==t&&window.log===i&&(window.log=p),i},i.getLoggers=function(){return r},i.default=i,i})});var J,sw=m(()=>{"use strict";J=class e extends Error{constructor(t,a){super(),Object.setPrototypeOf(this,e.prototype);let n=typeof t=="string"?t:this.explanation,r=typeof t=="object"?t:a;this.message=`${this.name} (${this.code}): ${n}`,this.originalError=r}}});var ut,Zh,br,Qh,ct,Mn,Li,Dt,Aa,$h,Cr=m(()=>{"use strict";sw();(function(e){class t extends J{constructor(i,o){super(i,o),this.causes=[],this.code=20101,this.description="Invalid access token",this.explanation="Twilio was unable to validate your Access Token",this.name="AccessTokenInvalid",this.solutions=[],Object.setPrototypeOf(this,e.AccessTokenInvalid.prototype);let s=typeof i=="string"?i:this.explanation,l=typeof i=="object"?i:o;this.message=`${this.name} (${this.code}): ${s}`,this.originalError=l}}e.AccessTokenInvalid=t;class a extends J{constructor(i,o){super(i,o),this.causes=[],this.code=20104,this.description="Access token expired or expiration date invalid",this.explanation="The Access Token provided to the Twilio API has expired, the expiration time specified in the token was invalid, or the expiration time specified was too far in the future",this.name="AccessTokenExpired",this.solutions=[],Object.setPrototypeOf(this,e.AccessTokenExpired.prototype);let s=typeof i=="string"?i:this.explanation,l=typeof i=="object"?i:o;this.message=`${this.name} (${this.code}): ${s}`,this.originalError=l}}e.AccessTokenExpired=a;class n extends J{constructor(i,o){super(i,o),this.causes=[],this.code=20151,this.description="Authentication Failed",this.explanation="The Authentication with the provided JWT failed",this.name="AuthenticationFailed",this.solutions=[],Object.setPrototypeOf(this,e.AuthenticationFailed.prototype);let s=typeof i=="string"?i:this.explanation,l=typeof i=="object"?i:o;this.message=`${this.name} (${this.code}): ${s}`,this.originalError=l}}e.AuthenticationFailed=n})(ut||(ut={}));(function(e){class t extends J{constructor(n,r){super(n,r),this.causes=["The access token has an invalid Account SID, API Key, or API Key Secret."],this.code=31202,this.description="Signature validation failed.",this.explanation="The provided access token failed signature validation.",this.name="AccessTokenSignatureValidationFailed",this.solutions=["Ensure the Account SID, API Key, and API Key Secret are valid when generating your access token."],Object.setPrototypeOf(this,e.AccessTokenSignatureValidationFailed.prototype);let i=typeof n=="string"?n:this.explanation,o=typeof n=="object"?n:r;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=o}}e.AccessTokenSignatureValidationFailed=t})(Zh||(Zh={}));(function(e){class t extends J{constructor(o,s){super(o,s),this.causes=[],this.code=31400,this.description="Bad Request (HTTP/SIP)",this.explanation="The request could not be understood due to malformed syntax.",this.name="BadRequest",this.solutions=[],Object.setPrototypeOf(this,e.BadRequest.prototype);let l=typeof o=="string"?o:this.explanation,u=typeof o=="object"?o:s;this.message=`${this.name} (${this.code}): ${l}`,this.originalError=u}}e.BadRequest=t;class a extends J{constructor(o,s){super(o,s),this.causes=["The outbound call was made to an invalid phone number.","The TwiML application sid is missing a Voice URL."],this.code=31404,this.description="Not Found (HTTP/SIP)",this.explanation="The server has not found anything matching the request.",this.name="NotFound",this.solutions=["Ensure the phone number dialed is valid.","Ensure the TwiML application is configured correctly with a Voice URL link."],Object.setPrototypeOf(this,e.NotFound.prototype);let l=typeof o=="string"?o:this.explanation,u=typeof o=="object"?o:s;this.message=`${this.name} (${this.code}): ${l}`,this.originalError=u}}e.NotFound=a;class n extends J{constructor(o,s){super(o,s),this.causes=[],this.code=31480,this.description="Temporarily Unavailable (SIP)",this.explanation="The callee is currently unavailable.",this.name="TemporarilyUnavailable",this.solutions=[],Object.setPrototypeOf(this,e.TemporarilyUnavailable.prototype);let l=typeof o=="string"?o:this.explanation,u=typeof o=="object"?o:s;this.message=`${this.name} (${this.code}): ${l}`,this.originalError=u}}e.TemporarilyUnavailable=n;class r extends J{constructor(o,s){super(o,s),this.causes=[],this.code=31486,this.description="Busy Here (SIP)",this.explanation="The callee is busy.",this.name="BusyHere",this.solutions=[],Object.setPrototypeOf(this,e.BusyHere.prototype);let l=typeof o=="string"?o:this.explanation,u=typeof o=="object"?o:s;this.message=`${this.name} (${this.code}): ${l}`,this.originalError=u}}e.BusyHere=r})(br||(br={}));(function(e){class t extends J{constructor(n,r){super(n,r),this.causes=[],this.code=31603,this.description="Decline (SIP)",this.explanation="The callee does not wish to participate in the call.",this.name="Decline",this.solutions=[],Object.setPrototypeOf(this,e.Decline.prototype);let i=typeof n=="string"?n:this.explanation,o=typeof n=="object"?n:r;this.message=`${this.name} (${this.code}): ${i}`,this.originalError=o}}e.Decline=t})(Qh||(Qh={}));(function(e){class t extends J{constructor(u,c){super(u,c),this.causes=[],this.code=31e3,this.description="Unknown Error",this.explanation="An unknown error has occurred. See error details for more information.",this.name="UnknownError",this.solutions=[],Object.setPrototypeOf(this,e.UnknownError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.UnknownError=t;class a extends J{constructor(u,c){super(u,c),this.causes=[],this.code=31001,this.description="Application Not Found",this.explanation="",this.name="ApplicationNotFoundError",this.solutions=[],Object.setPrototypeOf(this,e.ApplicationNotFoundError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.ApplicationNotFoundError=a;class n extends J{constructor(u,c){super(u,c),this.causes=[],this.code=31002,this.description="Connection Declined",this.explanation="",this.name="ConnectionDeclinedError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionDeclinedError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.ConnectionDeclinedError=n;class r extends J{constructor(u,c){super(u,c),this.causes=[],this.code=31003,this.description="Connection Timeout",this.explanation="The server could not produce a response within a suitable amount of time.",this.name="ConnectionTimeoutError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionTimeoutError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.ConnectionTimeoutError=r;class i extends J{constructor(u,c){super(u,c),this.causes=[],this.code=31005,this.description="Connection error",this.explanation="A connection error occurred during the call",this.name="ConnectionError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.ConnectionError=i;class o extends J{constructor(u,c){super(u,c),this.causes=["The incoming call was cancelled because it was not answered in time or it was accepted/rejected by another application instance registered with the same identity."],this.code=31008,this.description="Call cancelled",this.explanation="Unable to answer because the call has ended",this.name="CallCancelledError",this.solutions=[],Object.setPrototypeOf(this,e.CallCancelledError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.CallCancelledError=o;class s extends J{constructor(u,c){super(u,c),this.causes=[],this.code=31009,this.description="Transport error",this.explanation="No transport available to send or receive messages",this.name="TransportError",this.solutions=[],Object.setPrototypeOf(this,e.TransportError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.TransportError=s})(ct||(ct={}));(function(e){class t extends J{constructor(u,c){super(u,c),this.causes=["Invalid content or MessageType passed to sendMessage method."],this.code=31100,this.description="The request had malformed syntax.",this.explanation="The request could not be understood due to malformed syntax.",this.name="MalformedRequestError",this.solutions=["Ensure content and MessageType passed to sendMessage method are valid."],Object.setPrototypeOf(this,e.MalformedRequestError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.MalformedRequestError=t;class a extends J{constructor(u,c){super(u,c),this.causes=[],this.code=31101,this.description="Missing parameter array in request",this.explanation="",this.name="MissingParameterArrayError",this.solutions=[],Object.setPrototypeOf(this,e.MissingParameterArrayError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.MissingParameterArrayError=a;class n extends J{constructor(u,c){super(u,c),this.causes=[],this.code=31102,this.description="Authorization token missing in request.",this.explanation="",this.name="AuthorizationTokenMissingError",this.solutions=[],Object.setPrototypeOf(this,e.AuthorizationTokenMissingError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.AuthorizationTokenMissingError=n;class r extends J{constructor(u,c){super(u,c),this.causes=[],this.code=31103,this.description="Maximum parameter length has been exceeded.",this.explanation="Length of parameters cannot exceed MAX_PARAM_LENGTH.",this.name="MaxParameterLengthExceededError",this.solutions=[],Object.setPrototypeOf(this,e.MaxParameterLengthExceededError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.MaxParameterLengthExceededError=r;class i extends J{constructor(u,c){super(u,c),this.causes=[],this.code=31104,this.description="Invalid bridge token",this.explanation="",this.name="InvalidBridgeTokenError",this.solutions=[],Object.setPrototypeOf(this,e.InvalidBridgeTokenError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.InvalidBridgeTokenError=i;class o extends J{constructor(u,c){super(u,c),this.causes=["Client name contains invalid characters."],this.code=31105,this.description="Invalid client name",this.explanation="Client name should not contain control, space, delims, or unwise characters.",this.name="InvalidClientNameError",this.solutions=["Make sure that client name does not contain any of the invalid characters."],Object.setPrototypeOf(this,e.InvalidClientNameError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.InvalidClientNameError=o;class s extends J{constructor(u,c){super(u,c),this.causes=[],this.code=31107,this.description="The reconnect parameter is invalid",this.explanation="",this.name="ReconnectParameterInvalidError",this.solutions=[],Object.setPrototypeOf(this,e.ReconnectParameterInvalidError.prototype);let f=typeof u=="string"?u:this.explanation,d=typeof u=="object"?u:c;this.message=`${this.name} (${this.code}): ${f}`,this.originalError=d}}e.ReconnectParameterInvalidError=s})(Mn||(Mn={}));(function(e){class t extends J{constructor(f,d){super(f,d),this.causes=[],this.code=31201,this.description="Authorization error",this.explanation="The request requires user authentication. The server understood the request, but is refusing to fulfill it.",this.name="AuthorizationError",this.solutions=[],Object.setPrototypeOf(this,e.AuthorizationError.prototype);let p=typeof f=="string"?f:this.explanation,h=typeof f=="object"?f:d;this.message=`${this.name} (${this.code}): ${p}`,this.originalError=h}}e.AuthorizationError=t;class a extends J{constructor(f,d){super(f,d),this.causes=[],this.code=31203,this.description="No valid account",this.explanation="",this.name="NoValidAccountError",this.solutions=[],Object.setPrototypeOf(this,e.NoValidAccountError.prototype);let p=typeof f=="string"?f:this.explanation,h=typeof f=="object"?f:d;this.message=`${this.name} (${this.code}): ${p}`,this.originalError=h}}e.NoValidAccountError=a;class n extends J{constructor(f,d){super(f,d),this.causes=[],this.code=31204,this.description="Invalid JWT token",this.explanation="",this.name="InvalidJWTTokenError",this.solutions=[],Object.setPrototypeOf(this,e.InvalidJWTTokenError.prototype);let p=typeof f=="string"?f:this.explanation,h=typeof f=="object"?f:d;this.message=`${this.name} (${this.code}): ${p}`,this.originalError=h}}e.InvalidJWTTokenError=n;class r extends J{constructor(f,d){super(f,d),this.causes=[],this.code=31205,this.description="JWT token expired",this.explanation="",this.name="JWTTokenExpiredError",this.solutions=[],Object.setPrototypeOf(this,e.JWTTokenExpiredError.prototype);let p=typeof f=="string"?f:this.explanation,h=typeof f=="object"?f:d;this.message=`${this.name} (${this.code}): ${p}`,this.originalError=h}}e.JWTTokenExpiredError=r;class i extends J{constructor(f,d){super(f,d),this.causes=["Rate limit exceeded."],this.code=31206,this.description="Rate exceeded authorized limit.",this.explanation="The request performed exceeds the authorized limit.",this.name="RateExceededError",this.solutions=["Ensure message send rate does not exceed authorized limits."],Object.setPrototypeOf(this,e.RateExceededError.prototype);let p=typeof f=="string"?f:this.explanation,h=typeof f=="object"?f:d;this.message=`${this.name} (${this.code}): ${p}`,this.originalError=h}}e.RateExceededError=i;class o extends J{constructor(f,d){super(f,d),this.causes=[],this.code=31207,this.description="JWT token expiration too long",this.explanation="",this.name="JWTTokenExpirationTooLongError",this.solutions=[],Object.setPrototypeOf(this,e.JWTTokenExpirationTooLongError.prototype);let p=typeof f=="string"?f:this.explanation,h=typeof f=="object"?f:d;this.message=`${this.name} (${this.code}): ${p}`,this.originalError=h}}e.JWTTokenExpirationTooLongError=o;class s extends J{constructor(f,d){super(f,d),this.causes=[],this.code=31209,this.description="Reconnect attempt is not authorized.",this.explanation="",this.name="ReconnectAttemptError",this.solutions=[],Object.setPrototypeOf(this,e.ReconnectAttemptError.prototype);let p=typeof f=="string"?f:this.explanation,h=typeof f=="object"?f:d;this.message=`${this.name} (${this.code}): ${p}`,this.originalError=h}}e.ReconnectAttemptError=s;class l extends J{constructor(f,d){super(f,d),this.causes=["The Call Message Event Type is invalid and is not understood by Twilio Voice."],this.code=31210,this.description="Call Message Event Type is invalid.",this.explanation="The Call Message Event Type is invalid and is not understood by Twilio Voice.",this.name="CallMessageEventTypeInvalidError",this.solutions=["Ensure the Call Message Event Type is Valid and understood by Twilio Voice and try again."],Object.setPrototypeOf(this,e.CallMessageEventTypeInvalidError.prototype);let p=typeof f=="string"?f:this.explanation,h=typeof f=="object"?f:d;this.message=`${this.name} (${this.code}): ${p}`,this.originalError=h}}e.CallMessageEventTypeInvalidError=l;class u extends J{constructor(f,d){super(f,d),this.causes=["The payload size of Call Message Event exceeds the authorized limit."],this.code=31212,this.description="Call Message Event Payload size exceeded authorized limit.",this.explanation="The request performed to send a Call Message Event exceeds the payload size authorized limit",this.name="PayloadSizeExceededError",this.solutions=["Reduce payload size of Call Message Event to be within the authorized limit and try again."],Object.setPrototypeOf(this,e.PayloadSizeExceededError.prototype);let p=typeof f=="string"?f:this.explanation,h=typeof f=="object"?f:d;this.message=`${this.name} (${this.code}): ${p}`,this.originalError=h}}e.PayloadSizeExceededError=u})(ut||(ut={}));(function(e){class t extends J{constructor(r,i){super(r,i),this.causes=["The user denied the getUserMedia request.","The browser denied the getUserMedia request."],this.code=31401,this.description="UserMedia Permission Denied Error",this.explanation="The browser or end-user denied permissions to user media. Therefore we were unable to acquire input audio.",this.name="PermissionDeniedError",this.solutions=["The user should accept the request next time prompted. If the browser saved the deny, the user should change that permission in their browser.","The user should to verify that the browser has permission to access the microphone at this address."],Object.setPrototypeOf(this,e.PermissionDeniedError.prototype);let o=typeof r=="string"?r:this.explanation,s=typeof r=="object"?r:i;this.message=`${this.name} (${this.code}): ${o}`,this.originalError=s}}e.PermissionDeniedError=t;class a extends J{constructor(r,i){super(r,i),this.causes=["NotFoundError - The deviceID specified was not found.","The getUserMedia constraints were overconstrained and no devices matched."],this.code=31402,this.description="UserMedia Acquisition Failed Error",this.explanation="The browser and end-user allowed permissions, however getting the media failed. Usually this is due to bad constraints, but can sometimes fail due to browser, OS or hardware issues.",this.name="AcquisitionFailedError",this.solutions=["Ensure the deviceID being specified exists.","Try acquiring media with fewer constraints."],Object.setPrototypeOf(this,e.AcquisitionFailedError.prototype);let o=typeof r=="string"?r:this.explanation,s=typeof r=="object"?r:i;this.message=`${this.name} (${this.code}): ${o}`,this.originalError=s}}e.AcquisitionFailedError=a})(Li||(Li={}));(function(e){class t extends J{constructor(r,i){super(r,i),this.causes=[],this.code=53e3,this.description="Signaling connection error",this.explanation="Raised whenever a signaling connection error occurs that is not covered by a more specific error code.",this.name="ConnectionError",this.solutions=[],Object.setPrototypeOf(this,e.ConnectionError.prototype);let o=typeof r=="string"?r:this.explanation,s=typeof r=="object"?r:i;this.message=`${this.name} (${this.code}): ${o}`,this.originalError=s}}e.ConnectionError=t;class a extends J{constructor(r,i){super(r,i),this.causes=["The device running your application lost its Internet connection."],this.code=53001,this.description="Signaling connection disconnected",this.explanation="Raised whenever the signaling connection is unexpectedly disconnected.",this.name="ConnectionDisconnected",this.solutions=["Ensure the device running your application has access to a stable Internet connection."],Object.setPrototypeOf(this,e.ConnectionDisconnected.prototype);let o=typeof r=="string"?r:this.explanation,s=typeof r=="object"?r:i;this.message=`${this.name} (${this.code}): ${o}`,this.originalError=s}}e.ConnectionDisconnected=a})(Dt||(Dt={}));(function(e){class t extends J{constructor(i,o){super(i,o),this.causes=["The Client may not be using a supported WebRTC implementation.","The Client may not have the necessary resources to create or apply a new media description."],this.code=53400,this.description="Client is unable to create or apply a local media description",this.explanation="Raised whenever a Client is unable to create or apply a local media description.",this.name="ClientLocalDescFailed",this.solutions=["If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation."],Object.setPrototypeOf(this,e.ClientLocalDescFailed.prototype);let s=typeof i=="string"?i:this.explanation,l=typeof i=="object"?i:o;this.message=`${this.name} (${this.code}): ${s}`,this.originalError=l}}e.ClientLocalDescFailed=t;class a extends J{constructor(i,o){super(i,o),this.causes=["The Client may not be using a supported WebRTC implementation.","The Client may be connecting peer-to-peer with another Participant that is not using a supported WebRTC implementation.","The Client may not have the necessary resources to apply a new media description."],this.code=53402,this.description="Client is unable to apply a remote media description",this.explanation="Raised whenever the Client receives a remote media description but is unable to apply it.",this.name="ClientRemoteDescFailed",this.solutions=["If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation."],Object.setPrototypeOf(this,e.ClientRemoteDescFailed.prototype);let s=typeof i=="string"?i:this.explanation,l=typeof i=="object"?i:o;this.message=`${this.name} (${this.code}): ${s}`,this.originalError=l}}e.ClientRemoteDescFailed=a;class n extends J{constructor(i,o){super(i,o),this.causes=["The Client was unable to establish a media connection.","A media connection which was active failed liveliness checks."],this.code=53405,this.description="Media connection failed",this.explanation="Raised by the Client or Server whenever a media connection fails.",this.name="ConnectionError",this.solutions=["If the problem persists, try connecting to another region.","Check your Client's network connectivity.","If you've provided custom ICE Servers then ensure that the URLs and credentials are valid."],Object.setPrototypeOf(this,e.ConnectionError.prototype);let s=typeof i=="string"?i:this.explanation,l=typeof i=="object"?i:o;this.message=`${this.name} (${this.code}): ${s}`,this.originalError=l}}e.ConnectionError=n})(Aa||(Aa={}));$h=new Map([[20101,ut.AccessTokenInvalid],[20104,ut.AccessTokenExpired],[20151,ut.AuthenticationFailed],[31202,Zh.AccessTokenSignatureValidationFailed],[31400,br.BadRequest],[31404,br.NotFound],[31480,br.TemporarilyUnavailable],[31486,br.BusyHere],[31603,Qh.Decline],[31e3,ct.UnknownError],[31001,ct.ApplicationNotFoundError],[31002,ct.ConnectionDeclinedError],[31003,ct.ConnectionTimeoutError],[31005,ct.ConnectionError],[31008,ct.CallCancelledError],[31009,ct.TransportError],[31100,Mn.MalformedRequestError],[31101,Mn.MissingParameterArrayError],[31102,Mn.AuthorizationTokenMissingError],[31103,Mn.MaxParameterLengthExceededError],[31104,Mn.InvalidBridgeTokenError],[31105,Mn.InvalidClientNameError],[31107,Mn.ReconnectParameterInvalidError],[31201,ut.AuthorizationError],[31203,ut.NoValidAccountError],[31204,ut.InvalidJWTTokenError],[31205,ut.JWTTokenExpiredError],[31206,ut.RateExceededError],[31207,ut.JWTTokenExpirationTooLongError],[31209,ut.ReconnectAttemptError],[31210,ut.CallMessageEventTypeInvalidError],[31212,ut.PayloadSizeExceededError],[31401,Li.PermissionDeniedError],[31402,Li.AcquisitionFailedError],[53e3,Dt.ConnectionError],[53001,Dt.ConnectionDisconnected],[53400,Aa.ClientLocalDescFailed],[53402,Aa.ClientRemoteDescFailed],[53405,Aa.ConnectionError]]);Object.freeze($h)});function af(e,t){if(!(typeof t!="number"||!o8(t)||!(e||!r8.has(t))))return i8(t)}function i8(e){let t=$h.get(e);if(!t)throw new ae(`Error code ${e} not found`);return t}function o8(e){return $h.has(e)}var r8,ae,Wt,Ae,ta=m(()=>{"use strict";Cr();Cr();sw();r8=new Set([31001,31002,31003,31101,31102,31103,31104,31105,31107,31201,31202,31203,31204,31205,31207,31404,31480,31486,31603]);ae=class extends Error{constructor(t){super(t),this.name="InvalidArgumentError"}},Wt=class extends Error{constructor(t){super(t),this.name="InvalidStateError"}},Ae=class extends Error{constructor(t){super(t),this.name="NotSupportedError"}}});var Jh,wr,nf,YF,ZF,Mo=m(()=>{"use strict";Jh="@twilio/voice-sdk",wr="2.18.3",nf="https://sdk.twilio.com/js/client/sounds/releases/1.0.0",YF=`${nf}/cowbell.mp3?cache=${wr}`,ZF=2e4});var lw,Pe,l8,Ea=m(()=>{"use strict";lw=H(ow());Mo();Pe=class e{static getLogLevelInstance(t){if(!e.loglevelInstance)try{e.loglevelInstance=(t&&t.LogLevelModule?t.LogLevelModule:lw).getLogger(Jh)}catch{console.warn("Cannot create custom logger"),e.loglevelInstance=console}return e.loglevelInstance}constructor(t,a){this._log=e.getLogLevelInstance(a),this._prefix=`[TwilioVoice][${t}]`}debug(...t){this._log.debug(this._prefix,...t)}error(...t){this._log.error(this._prefix,...t)}info(...t){this._log.info(this._prefix,...t)}setDefaultLevel(t){this._log.setDefaultLevel?this._log.setDefaultLevel(t):console.warn("Logger cannot setDefaultLevel")}warn(...t){this._log.warn(this._prefix,...t)}};Pe.levels=lw.levels;l8=Pe.getLogLevelInstance()});var u8,rf,QF=m(()=>{"use strict";Mo();ta();Ea();u8=`${nf}/outgoing.mp3`,rf=class{constructor(t,a,n,r){this._name=t,this._availableDevices=a,this._beforeChange=n,this._isSupported=r,this._activeDevices=new Set,this._log=new Pe("OutputDeviceCollection")}delete(t){this._log.debug(".delete",t);let a=!!this._activeDevices.delete(t),n=this._availableDevices.get("default")||Array.from(this._availableDevices.values())[0];!this._activeDevices.size&&n&&this._activeDevices.add(n);let r=Array.from(this._activeDevices.values()).map(i=>i.deviceId);return this._beforeChange(this._name,r),!!a}get(){return this._activeDevices}set(t){if(this._log.debug(".set",t),!this._isSupported)return Promise.reject(new Ae("This browser does not support audio output selection"));let a=Array.isArray(t)?t:[t];if(!a.length)return Promise.reject(new ae("Must specify at least one device to set"));let n=[],r=a.map(i=>{let o=this._availableDevices.get(i);return o||n.push(i),o});return n.length?Promise.reject(new ae(`Devices not found: ${n.join(", ")}`)):new Promise(i=>{i(this._beforeChange(this._name,a))}).then(()=>{this._activeDevices.clear(),r.forEach(this._activeDevices.add,this._activeDevices)})}test(t=u8){return this._isSupported?this._activeDevices.size?Promise.all(Array.from(this._activeDevices).map(a=>{let n;return new Promise(r=>{n=new Audio(t),n.oncanplay=r}).then(()=>n.setSinkId(a.deviceId).then(()=>n.play()))})):Promise.reject(new Wt("No active output devices to test")):Promise.reject(new Ae("This browser does not support audio output selection"))}}});var eg,$F=m(()=>{"use strict";eg=class{constructor(t){Object.defineProperties(this,{deviceId:{get(){return t.deviceId}},groupId:{get(){return t.groupId}},kind:{get(){return t.kind}},label:{get(){return t.label}}})}}});var lf={};Cg(lf,{Exception:()=>d8,average:()=>Ro,difference:()=>of,flatMap:()=>ag,isChrome:()=>sf,isElectron:()=>JF,isFirefox:()=>c8,isLegacyEdge:()=>bl,isSafari:()=>f8,promisifyEvents:()=>ng,queryToJson:()=>uw,sortByMimeTypes:()=>cw});function tg(e){if(!(this instanceof tg))return new tg(e);this.message=e}function Ro(e){return e&&e.length?e.reduce((t,a)=>t+a)/e.length:0}function of(e,t,a){a=a||(r=>r);let n=new Set(t.map(a));return e.filter(r=>!n.has(a(r)))}function JF(e){return!!e.userAgent.match("Electron")}function sf(e,t){let a=!!t.userAgent.match("CriOS"),n=!!t.userAgent.match("HeadlessChrome"),r=typeof e.chrome<"u"&&t.vendor==="Google Inc."&&t.userAgent.indexOf("OPR")===-1&&t.userAgent.indexOf("Edge")===-1;return a||JF(t)||r||n}function c8(e){return e=e||(typeof window>"u"?global.navigator:window.navigator),!!e&&typeof e.userAgent=="string"&&/firefox|fxios/i.test(e.userAgent)}function bl(e){return e=e||(typeof window>"u"?global.navigator:window.navigator),!!e&&typeof e.userAgent=="string"&&/edge\/\d+/i.test(e.userAgent)}function f8(e){return!!e.vendor&&e.vendor.indexOf("Apple")!==-1&&e.userAgent&&e.userAgent.indexOf("CriOS")===-1&&e.userAgent.indexOf("FxiOS")===-1}function uw(e){return e?e.split("&").reduce((t,a)=>{let n=a.split("="),r=n[0],i=decodeURIComponent((n[1]||"").replace(/\+/g,"%20"));return r&&(t[r]=i),t},{}):""}function ag(e,t){let a=e instanceof Map||e instanceof Set?Array.from(e.values()):e;return t=t||(n=>n),a.reduce((n,r)=>{let i=t(r);return n.concat(i)},[])}function ng(e,t,a){return new Promise((n,r)=>{function i(){e.removeListener(a,o),n()}function o(){e.removeListener(t,i),r()}e.once(t,i),e.once(a,o)})}function cw(e,t){let a=t.map(n=>"audio/"+n.toLowerCase());return e.sort((n,r)=>{let i=a.indexOf(n.mimeType.toLowerCase()),o=a.indexOf(r.mimeType.toLowerCase()),s=i>=0?i:Number.MAX_VALUE,l=o>=0?o:Number.MAX_VALUE;return s-l})}var d8,Rn=m(()=>{"use strict";tg.prototype.toString=function(){return`Twilio.Exception: ${this.message}`};d8=tg});var eU,p8,uf,tU,aU=m(()=>{"use strict";Sl();eU=H(Ja());cf();ta();Ea();QF();$F();Rn();p8={audioinput:"Audio Input",audiooutput:"Audio Output"},uf=class extends eU.EventEmitter{get audioConstraints(){return this._audioConstraints}get inputDevice(){return this._inputDevice}get inputStream(){return this._localProcessedStream||this._selectedInputDeviceStream}get processedStream(){return this._log.warn("AudioHelper#processedStream is deprecated. Please use AudioHelper#localProcessedStream instead."),this._localProcessedStream}get localProcessedStream(){return this._localProcessedStream}get remoteProcessedStream(){return this._remoteProcessedStream}constructor(t,a,n){super(),this.availableInputDevices=new Map,this.availableOutputDevices=new Map,this._audioConstraints=null,this._defaultInputDeviceStream=null,this._enabledSounds={[Ye.SoundName.Disconnect]:!0,[Ye.SoundName.Incoming]:!0,[Ye.SoundName.Outgoing]:!0},this._inputDevice=null,this._inputDevicePromise=null,this._isPollingInputVolume=!1,this._log=new Pe("AudioHelper"),this._localProcessedStream=null,this._remoteProcessedStream=null,this._selectedInputDeviceStream=null,this._unknownDeviceIndexes={audioinput:{},audiooutput:{}},this._updateAvailableDevices=()=>!this._mediaDevices||!this._enumerateDevices?Promise.reject("Enumeration not supported"):this._enumerateDevices().then(s=>{this._updateDevices(s.filter(u=>u.kind==="audiooutput"),this.availableOutputDevices,this._removeLostOutput),this._updateDevices(s.filter(u=>u.kind==="audioinput"),this.availableInputDevices,this._removeLostInput);let l=this.availableOutputDevices.get("default")||Array.from(this.availableOutputDevices.values())[0];[this.speakerDevices,this.ringtoneDevices].forEach(u=>{!u.get().size&&this.availableOutputDevices.size&&this.isOutputSelectionSupported&&u.set(l.deviceId).catch(c=>{this._log.warn(`Unable to set audio output devices. ${c}`)})})}),this._removeLostInput=s=>{if(!this.inputDevice||this.inputDevice.deviceId!==s.deviceId)return!1;this._destroyLocalProcessedStream(),this._replaceStream(null),this._inputDevice=null,this._maybeStopPollingVolume();let l=this.availableInputDevices.get("default")||Array.from(this.availableInputDevices.values())[0];return l&&this.setInputDevice(l.deviceId),!0},this._removeLostOutput=s=>{let l=this.speakerDevices.delete(s),u=this.ringtoneDevices.delete(s);return l||u},n=Object.assign({AudioContext:typeof AudioContext<"u"&&AudioContext,setSinkId:typeof HTMLAudioElement<"u"&&HTMLAudioElement.prototype.setSinkId},n),this._beforeSetInputDevice=n.beforeSetInputDevice||(()=>Promise.resolve()),this._updateUserOptions(n),this._audioProcessorEventObserver=n.audioProcessorEventObserver,this._mediaDevices=n.mediaDevices||navigator.mediaDevices,this._onActiveInputChanged=a,this._enumerateDevices=typeof n.enumerateDevices=="function"?n.enumerateDevices:this._mediaDevices&&this._mediaDevices.enumerateDevices.bind(this._mediaDevices);let r=!!(n.AudioContext||n.audioContext),i=!!this._enumerateDevices;n.enabledSounds&&(this._enabledSounds=n.enabledSounds);let o=typeof n.setSinkId=="function";this.isOutputSelectionSupported=i&&o,this.isVolumeSupported=r,this.isVolumeSupported&&(this._audioContext=n.audioContext||n.AudioContext&&new n.AudioContext,this._audioContext&&(this._inputVolumeAnalyser=this._audioContext.createAnalyser(),this._inputVolumeAnalyser.fftSize=32,this._inputVolumeAnalyser.smoothingTimeConstant=.3)),this.ringtoneDevices=new rf("ringtone",this.availableOutputDevices,t,this.isOutputSelectionSupported),this.speakerDevices=new rf("speaker",this.availableOutputDevices,t,this.isOutputSelectionSupported),this.addListener("newListener",s=>{s==="inputVolume"&&this._maybeStartPollingVolume()}),this.addListener("removeListener",s=>{s==="inputVolume"&&this._maybeStopPollingVolume()}),this.once("newListener",()=>{this.isOutputSelectionSupported||this._log.warn("Warning: This browser does not support audio output selection."),this.isVolumeSupported||this._log.warn("Warning: This browser does not support Twilio's volume indicator feature.")}),i&&this._initializeEnumeration(),navigator&&navigator.permissions&&typeof navigator.permissions.query=="function"?navigator.permissions.query({name:"microphone"}).then(s=>{if(s.state!=="granted"){let l=()=>{this._updateAvailableDevices(),this._stopMicrophonePermissionListener()};s.addEventListener("change",l),this._microphonePermissionStatus=s,this._onMicrophonePermissionStatusChanged=l}}).catch(s=>this._log.warn(`Warning: unable to listen for microphone permission changes. ${s}`)):this._log.warn("Warning: current browser does not support permissions API.")}_destroy(){this._stopDefaultInputDeviceStream(),this._stopSelectedInputDeviceStream(),this._destroyLocalProcessedStream(),this._destroyRemoteProcessedStream(),this._maybeStopPollingVolume(),this.removeAllListeners(),this._stopMicrophonePermissionListener(),this._unbind()}_destroyRemoteProcessedStream(){if(this._remoteProcessor&&this._remoteProcessedStream){this._log.info("destroying remote processed stream");let t=this._remoteProcessedStream;this._remoteProcessedStream.getTracks().forEach(a=>a.stop()),this._remoteProcessedStream=null,this._remoteProcessor.destroyProcessedStream(t),this._audioProcessorEventObserver.emit("destroy",!0)}}_getInputDevicePromise(){return this._inputDevicePromise}_getAudioProcessorEventObserver(){return this._audioProcessorEventObserver}_maybeCreateRemoteProcessedStream(t){return this._remoteProcessor?(this._log.info("Creating remote processed stream"),this._remoteProcessor.createProcessedStream(t).then(a=>(this._remoteProcessedStream=a,this._audioProcessorEventObserver.emit("create",!0),this._remoteProcessedStream))):Promise.resolve(t)}_maybeStartPollingVolume(){if(!this.isVolumeSupported||!this.inputStream||(this._updateVolumeSource(),this._isPollingInputVolume||!this._inputVolumeAnalyser))return;let t=this._inputVolumeAnalyser.frequencyBinCount,a=new Uint8Array(t);this._isPollingInputVolume=!0;let n=()=>{if(this._isPollingInputVolume){if(this._inputVolumeAnalyser){this._inputVolumeAnalyser.getByteFrequencyData(a);let r=Ro(a);this.emit("inputVolume",r/255)}requestAnimationFrame(n)}};requestAnimationFrame(n)}_maybeStopPollingVolume(){this.isVolumeSupported&&(!this._isPollingInputVolume||this.inputStream&&this.listenerCount("inputVolume")||(this._inputVolumeSource&&(this._inputVolumeSource.disconnect(),delete this._inputVolumeSource),this._isPollingInputVolume=!1))}_openDefaultDeviceWithConstraints(t){return this._log.info("Opening default device with constraints",t),this._getUserMedia(t).then(a=>(this._log.info("Opened default device. Updating available devices."),this._updateAvailableDevices().catch(n=>{this._log.warn("Unable to updateAvailableDevices after gUM call",n)}),this._defaultInputDeviceStream=a,this._maybeCreateLocalProcessedStream(a)))}_stopDefaultInputDeviceStream(){this._defaultInputDeviceStream&&(this._log.info("stopping default device stream"),this._defaultInputDeviceStream.getTracks().forEach(t=>t.stop()),this._defaultInputDeviceStream=null,this._destroyLocalProcessedStream())}_unbind(){var t;!((t=this._mediaDevices)===null||t===void 0)&&t.removeEventListener&&this._mediaDevices.removeEventListener("devicechange",this._updateAvailableDevices)}_updateUserOptions(t){typeof t.enumerateDevices=="function"&&(this._enumerateDevices=t.enumerateDevices),typeof t.getUserMedia=="function"&&(this._getUserMedia=t.getUserMedia)}addProcessor(t,a=!1){if(this._log.debug(".addProcessor"),this._localProcessor&&!a)throw new Ae("Can only have one Local AudioProcessor at a time.");if(this._remoteProcessor&&a)throw new Ae("Can only have one Remote AudioProcessor at a time.");if(typeof t!="object"||t===null)throw new ae("Missing AudioProcessor argument.");if(typeof t.createProcessedStream!="function")throw new ae("Missing createProcessedStream() method.");if(typeof t.destroyProcessedStream!="function")throw new ae("Missing destroyProcessedStream() method.");return a?(this._remoteProcessor=t,this._audioProcessorEventObserver.emit("add",!0),Promise.resolve()):(this._localProcessor=t,this._audioProcessorEventObserver.emit("add",!1),this._restartInputStreams())}disconnect(t){return this._log.debug(".disconnect",t),this._maybeEnableSound(Ye.SoundName.Disconnect,t)}incoming(t){return this._log.debug(".incoming",t),this._maybeEnableSound(Ye.SoundName.Incoming,t)}outgoing(t){return this._log.debug(".outgoing",t),this._maybeEnableSound(Ye.SoundName.Outgoing,t)}removeProcessor(t,a=!1){if(this._log.debug(".removeProcessor"),typeof t!="object"||t===null)throw new ae("Missing AudioProcessor argument.");if(this._localProcessor!==t&&!a)throw new ae("Cannot remove a Local AudioProcessor that has not been previously added.");if(this._remoteProcessor!==t&&a)throw new ae("Cannot remove a Remote AudioProcessor that has not been previously added.");return a?(this._destroyRemoteProcessedStream(),this._remoteProcessor=null,this._audioProcessorEventObserver.emit("remove",!0),Promise.resolve()):(this._destroyLocalProcessedStream(),this._localProcessor=null,this._audioProcessorEventObserver.emit("remove",!1),this._restartInputStreams())}setAudioConstraints(t){return this._log.debug(".setAudioConstraints",t),this._audioConstraints=Object.assign({},t),delete this._audioConstraints.deviceId,this.inputDevice?this._setInputDevice(this.inputDevice.deviceId,!0):Promise.resolve()}setInputDevice(t){return this._log.debug(".setInputDevice",t),this._setInputDevice(t,!1)}unsetAudioConstraints(){return this._log.debug(".unsetAudioConstraints"),this._audioConstraints=null,this.inputDevice?this._setInputDevice(this.inputDevice.deviceId,!0):Promise.resolve()}unsetInputDevice(){return this._log.debug(".unsetInputDevice",this.inputDevice),this.inputDevice?(this._destroyLocalProcessedStream(),this._onActiveInputChanged(null).then(()=>{this._replaceStream(null),this._inputDevice=null,this._maybeStopPollingVolume()})):Promise.resolve()}_destroyLocalProcessedStream(){if(this._localProcessor&&this._localProcessedStream){this._log.info("destroying local processed stream");let t=this._localProcessedStream;this._localProcessedStream.getTracks().forEach(a=>a.stop()),this._localProcessedStream=null,this._localProcessor.destroyProcessedStream(t),this._audioProcessorEventObserver.emit("destroy",!1)}}_getUnknownDeviceIndex(t){let a=t.deviceId,n=t.kind,r=this._unknownDeviceIndexes[n][a];return r||(r=Object.keys(this._unknownDeviceIndexes[n]).length+1,this._unknownDeviceIndexes[n][a]=r),r}_initializeEnumeration(){if(!this._mediaDevices||!this._enumerateDevices)throw new Ae("Enumeration is not supported");this._mediaDevices.addEventListener&&this._mediaDevices.addEventListener("devicechange",this._updateAvailableDevices),this._updateAvailableDevices().then(()=>{this.isOutputSelectionSupported&&Promise.all([this.speakerDevices.set("default"),this.ringtoneDevices.set("default")]).catch(t=>{this._log.warn(`Warning: Unable to set audio output devices. ${t}`)})})}_maybeCreateLocalProcessedStream(t){return this._localProcessor?(this._log.info("Creating local processed stream"),this._localProcessor.createProcessedStream(t).then(a=>(this._localProcessedStream=a,this._audioProcessorEventObserver.emit("create",!1),this._localProcessedStream))):Promise.resolve(t)}_maybeEnableSound(t,a){return typeof a<"u"&&(this._enabledSounds[t]=a),this._enabledSounds[t]}_replaceStream(t){this._log.info("Replacing with new stream."),this._selectedInputDeviceStream&&(this._log.info("Old stream detected. Stopping tracks."),this._stopSelectedInputDeviceStream()),this._selectedInputDeviceStream=t}_restartInputStreams(){if(this.inputDevice&&this._selectedInputDeviceStream)return this._log.info("Restarting selected input device"),this._setInputDevice(this.inputDevice.deviceId,!0);if(this._defaultInputDeviceStream){let t=this.availableInputDevices.get("default")||Array.from(this.availableInputDevices.values())[0];return this._log.info("Restarting default input device, now becoming selected."),this._setInputDevice(t.deviceId,!0)}return Promise.resolve()}_setInputDevice(t,a){return xt(this,void 0,void 0,function*(){let n=()=>xt(this,void 0,void 0,function*(){if(yield this._beforeSetInputDevice(),typeof t!="string")return Promise.reject(new ae("Must specify the device to set"));let r=this.availableInputDevices.get(t);if(!r)return Promise.reject(new ae(`Device not found: ${t}`));if(this._log.info("Setting input device. ID: "+t),this._inputDevice&&this._inputDevice.deviceId===t&&this._selectedInputDeviceStream){if(!a)return Promise.resolve();this._log.info("Same track detected on setInputDevice, stopping old tracks."),this._stopSelectedInputDeviceStream()}this._stopDefaultInputDeviceStream();let i={audio:Object.assign({deviceId:{exact:t}},this.audioConstraints)};return this._log.info("setInputDevice: getting new tracks."),this._getUserMedia(i).then(o=>(this._destroyLocalProcessedStream(),this._maybeCreateLocalProcessedStream(o).then(s=>(this._log.info("setInputDevice: invoking _onActiveInputChanged."),this._onActiveInputChanged(s).then(()=>{this._replaceStream(o),this._inputDevice=r,this._maybeStartPollingVolume()})))))});return this._inputDevicePromise=n().finally(()=>{this._inputDevicePromise=null})})}_stopMicrophonePermissionListener(){var t;!((t=this._microphonePermissionStatus)===null||t===void 0)&&t.removeEventListener&&this._microphonePermissionStatus.removeEventListener("change",this._onMicrophonePermissionStatusChanged)}_stopSelectedInputDeviceStream(){this._selectedInputDeviceStream&&(this._log.info("Stopping selected device stream"),this._selectedInputDeviceStream.getTracks().forEach(t=>t.stop()))}_updateDevices(t,a,n){let r=t.map(u=>u.deviceId),i=Array.from(a.values()).map(u=>u.deviceId),o=[],s=of(i,r);s.forEach(u=>{let c=a.get(u);c&&(a.delete(u),n(c)&&o.push(c))});let l=!1;if(t.forEach(u=>{let c=a.get(u.deviceId),f=this._wrapMediaDeviceInfo(u);(!c||c.label!==f.label)&&(a.set(u.deviceId,f),l=!0)}),l||s.length){let u="default",c=this.inputDevice&&this.inputDevice.deviceId===u,f=this._defaultInputDeviceStream&&this.availableInputDevices.get(u);(c||f)&&(this._log.warn("Calling getUserMedia after device change to ensure that the tracks of the active device (default) have not gone stale."),setTimeout(()=>{this._setInputDevice(u,!0)},0)),this._log.debug("#deviceChange",o),this.emit("deviceChange",o)}}_updateVolumeSource(){if(!(!this.inputStream||!this._audioContext||!this._inputVolumeAnalyser)){this._inputVolumeSource&&this._inputVolumeSource.disconnect();try{this._inputVolumeSource=this._audioContext.createMediaStreamSource(this.inputStream),this._inputVolumeSource.connect(this._inputVolumeAnalyser)}catch(t){this._log.warn("Unable to update volume source",t),delete this._inputVolumeSource}}}_wrapMediaDeviceInfo(t){let a={deviceId:t.deviceId,groupId:t.groupId,kind:t.kind,label:t.label};if(!a.label)if(a.deviceId==="default")a.label="Default";else{let n=this._getUnknownDeviceIndex(t);a.label=`Unknown ${p8[a.kind]} Device ${n}`}return new eg(a)}};uf||(uf={});tU=uf});var nU,rg,rU=m(()=>{"use strict";nU=H(Ja());Ea();rg=class extends nU.EventEmitter{constructor(){super(),this._log=new Pe("AudioProcessorEventObserver"),this._log.info("Creating AudioProcessorEventObserver instance"),this.on("enabled",t=>this._reEmitEvent("enabled",t)),this.on("add",t=>this._reEmitEvent("add",t)),this.on("remove",t=>this._reEmitEvent("remove",t)),this.on("create",t=>this._reEmitEvent("create-processed-stream",t)),this.on("destroy",t=>this._reEmitEvent("destroy-processed-stream",t))}destroy(){this.removeAllListeners()}_reEmitEvent(t,a){this._log.info(`${a?"Remote":"Local"} AudioProcessor:${t}`),this.emit("event",{name:t,group:"audio-processor",isRemote:a})}}});var m8,ig,iU=m(()=>{"use strict";ta();m8={dtmf0:[1360,960],dtmf1:[1230,720],dtmf2:[1360,720],dtmf3:[1480,720],dtmf4:[1230,790],dtmf5:[1360,790],dtmf6:[1480,790],dtmf7:[1230,870],dtmf8:[1360,870],dtmf9:[1480,870],dtmfh:[1480,960],dtmfs:[1230,960]},ig=class{constructor(t){this._context=t,this._gainNodes=[],this._gainNodes=[this._context.createGain(),this._context.createGain()],this._gainNodes.forEach(a=>{a.connect(this._context.destination),a.gain.value=.1,this._gainNodes.push(a)})}cleanup(){this._gainNodes.forEach(t=>{t.disconnect()})}play(t){let a=m8[t];if(!a)throw new ae("Invalid DTMF sound name");[this._context.createOscillator(),this._context.createOscillator()].forEach((r,i)=>{r.type="sine",r.frequency.value=a[i],r.connect(this._gainNodes[i]),r.start(),r.stop(this._context.currentTime+.1),r.addEventListener("ended",()=>r.disconnect())})}}});function h8(e,t,a){let n=JSON.stringify(t.body||{}),r=new Headers;t.headers=t.headers||[],Object.entries(t.headers).forEach(([i,o])=>r.append(i,o)),fetch(t.url,{body:n,headers:r,method:e}).then(i=>i.text(),a).then(i=>a(null,i),a)}var og,oU=m(()=>{"use strict";og=h8;og.get=function(t,a){return new this("GET",t,a)};og.post=function(t,a){return new this("POST",t,a)}});function g8(e){return{audio_codec:e.codecName,audio_level_in:e.audioInputLevel,audio_level_out:e.audioOutputLevel,bytes_received:e.bytesReceived,bytes_sent:e.bytesSent,call_volume_input:e.inputVolume,call_volume_output:e.outputVolume,jitter:e.jitter,mos:e.mos&&Math.round(e.mos*100)/100,packets_lost:e.packetsLost,packets_lost_fraction:e.packetsLostFraction&&Math.round(e.packetsLostFraction*100)/100,packets_received:e.packetsReceived,rtt:e.rtt,timestamp:new Date(e.timestamp).toISOString(),total_bytes_received:e.totals.bytesReceived,total_bytes_sent:e.totals.bytesSent,total_packets_lost:e.totals.packetsLost,total_packets_received:e.totals.packetsReceived,total_packets_sent:e.totals.packetsSent}}var sU,aa,lU=m(()=>{"use strict";sU=H(Ja());Ea();oU();aa=class e extends sU.EventEmitter{constructor(t,a,n){if(super(),!(this instanceof e))return new e(t,a,n);n=Object.assign({defaultPayload(){return{}}},n);let r=n.defaultPayload;typeof r!="function"&&(r=()=>Object.assign({},n.defaultPayload));let i=!0,o=Object.assign({app_name:void 0,app_version:void 0},n.metadata);Object.defineProperties(this,{_defaultPayload:{value:r},_host:{value:n.host,writable:!0},_isEnabled:{get(){return i},set(s){i=s}},_log:{value:new Pe("EventPublisher")},_request:{value:n.request||og,writable:!0},_token:{value:a,writable:!0},isEnabled:{enumerable:!0,get(){return i}},metadata:{enumerable:!0,get(){return o}},productName:{enumerable:!0,value:t},token:{enumerable:!0,get(){return this._token}}})}};aa.prototype._post=function(t,a,n,r,i,o,s){if(!this.isEnabled&&!s||!this._host)return this._log.debug("Publishing cancelled",JSON.stringify({isEnabled:this.isEnabled,force:s,host:this._host})),Promise.resolve();if(!o||(!o.parameters||!o.parameters.CallSid)&&!o.outboundConnectionId)return o?this._log.debug("Publishing cancelled. Missing connection info",JSON.stringify({outboundConnectionId:o.outboundConnectionId,parameters:o.parameters})):this._log.debug("Publishing cancelled. Missing connection object"),Promise.resolve();let l={group:n,level:a.toUpperCase(),name:r,payload:i&&i.forEach?i.slice(0):Object.assign(this._defaultPayload(o),i),payload_type:"application/json",private:!1,publisher:this.productName,timestamp:new Date().toISOString()};this.metadata&&(l.publisher_metadata=this.metadata),t==="EndpointEvents"&&this._log.debug("Publishing insights",JSON.stringify({endpointName:t,event:l,force:s,host:this._host}));let u={body:l,headers:{"Content-Type":"application/json","X-Twilio-Token":this.token},url:`https://${this._host}/v4/${t}`};return new Promise((c,f)=>{this._request.post(u,d=>{d?(this.emit("error",d),f(d)):c()})}).catch(c=>{this._log.error(`Unable to post ${n} ${r} event to Insights. Received error: ${c}`)})};aa.prototype.post=function(t,a,n,r,i,o){return this._post("EndpointEvents",t,a,n,r,i,o)};aa.prototype.debug=function(t,a,n,r){return this.post("debug",t,a,n,r)};aa.prototype.info=function(t,a,n,r){return this.post("info",t,a,n,r)};aa.prototype.warn=function(t,a,n,r){return this.post("warning",t,a,n,r)};aa.prototype.error=function(t,a,n,r){return this.post("error",t,a,n,r)};aa.prototype.postMetrics=function(t,a,n,r,i){return new Promise(o=>{let s=n.map(g8).map(l=>Object.assign(l,r));o(this._post("EndpointMetrics","info",t,a,s,i))})};aa.prototype.setHost=function(t){this._host=t};aa.prototype.setToken=function(t){this._token=t};aa.prototype.enable=function(){this._isEnabled=!0};aa.prototype.disable=function(){this._isEnabled=!1}});function en(e){if(!(this instanceof en))return new en(e);let t=this;Object.defineProperties(this,{_map:{value:e},size:{enumerable:!0,get(){return t._map.size}}}),this[Symbol.iterator]=e[Symbol.iterator]}function cU(e){return{bytesReceived:void 0,bytesSent:void 0,dtlsState:void 0,id:e.id,localCertificateId:e.stat("localCertificateId"),remoteCertificateId:e.stat("remoteCertificateId"),rtcpTransportStatsId:void 0,selectedCandidatePairId:e.stat("selectedCandidatePairId"),timestamp:Date.parse(e.timestamp),type:"transport"}}function x8(e){return{channels:void 0,clockRate:void 0,id:e.id,implementation:void 0,mimeType:`${e.stat("mediaType")}/${e.stat("googCodecName")}`,payloadType:void 0,sdpFmtpLine:void 0,timestamp:Date.parse(e.timestamp),type:"codec"}}function y8(e){return{audioLevel:Po(e,"audioOutputLevel")?we(e,"audioOutputLevel")/32767:(we(e,"audioInputLevel")||0)/32767,detached:void 0,echoReturnLoss:dw(e,"googEchoCancellationReturnLoss"),echoReturnLossEnhancement:dw(e,"googEchoCancellationReturnLossEnhancement"),ended:void 0,frameHeight:Po(e,"googFrameHeightReceived")?we(e,"googFrameHeightReceived"):we(e,"googFrameHeightSent"),frameWidth:Po(e,"googFrameWidthReceived")?we(e,"googFrameWidthReceived"):we(e,"googFrameWidthSent"),framesCorrupted:void 0,framesDecoded:we(e,"framesDecoded"),framesDropped:void 0,framesPerSecond:void 0,framesReceived:void 0,framesSent:we(e,"framesEncoded"),fullFramesLost:void 0,id:e.id,kind:e.stat("mediaType"),partialFramesLost:void 0,remoteSource:void 0,ssrcIds:void 0,timestamp:Date.parse(e.timestamp),trackIdentifier:e.stat("googTrackId"),type:"track"}}function dU(e,t){return{associateStatsId:void 0,codecId:`codec-${e.id}`,firCount:t?we(e,"googFirsSent"):void 0,id:e.id,isRemote:void 0,mediaType:e.stat("mediaType"),nackCount:t?we(e,"googNacksSent"):we(e,"googNacksReceived"),pliCount:t?we(e,"googPlisSent"):we(e,"googPlisReceived"),qpSum:we(e,"qpSum"),sliCount:void 0,ssrc:e.stat("ssrc"),timestamp:Date.parse(e.timestamp),trackId:`track-${e.id}`,transportId:e.stat("transportId")}}function v8(e){let t=dU(e,!0);return Object.assign(t,{burstDiscardCount:void 0,burstDiscardRate:void 0,burstLossCount:void 0,burstLossRate:void 0,burstPacketsDiscarded:void 0,burstPacketsLost:void 0,bytesReceived:we(e,"bytesReceived"),fractionLost:void 0,framesDecoded:we(e,"framesDecoded"),gapDiscardRate:void 0,gapLossRate:void 0,jitter:fw(e.stat("googJitterReceived")),packetsDiscarded:void 0,packetsLost:we(e,"packetsLost"),packetsReceived:we(e,"packetsReceived"),packetsRepaired:void 0,roundTripTime:fw(e.stat("googRtt")),type:"inbound-rtp"}),t}function S8(e){let t=dU(e,!1);return Object.assign(t,{bytesSent:we(e,"bytesSent"),framesEncoded:we(e,"framesEncoded"),packetsSent:we(e,"packetsSent"),remoteTimestamp:void 0,targetBitrate:void 0,type:"outbound-rtp"}),t}function fU(e,t){return{candidateType:L8(e.stat("candidateType")),deleted:void 0,id:e.id,ip:e.stat("ipAddress"),isRemote:t,port:we(e,"portNumber"),priority:dw(e,"priority"),protocol:e.stat("transport"),relayProtocol:void 0,timestamp:Date.parse(e.timestamp),transportId:void 0,type:t?"remote-candidate":"local-candidate",url:void 0}}function b8(e){return{availableIncomingBitrate:void 0,availableOutgoingBitrate:void 0,bytesReceived:we(e,"bytesReceived"),bytesSent:we(e,"bytesSent"),consentRequestsSent:we(e,"consentRequestsSent"),currentRoundTripTime:fw(e.stat("googRtt")),id:e.id,lastPacketReceivedTimestamp:void 0,lastPacketSentTimestamp:void 0,localCandidateId:e.stat("localCandidateId"),nominated:void 0,priority:void 0,readable:void 0,remoteCandidateId:e.stat("remoteCandidateId"),requestsReceived:we(e,"requestsReceived"),requestsSent:we(e,"requestsSent"),responsesReceived:we(e,"responsesReceived"),responsesSent:we(e,"responsesSent"),retransmissionsReceived:void 0,retransmissionsSent:void 0,state:void 0,timestamp:Date.parse(e.timestamp),totalRoundTripTime:void 0,transportId:e.stat("googChannelId"),type:"candidate-pair",writable:pU(e,"googWritable")}}function C8(e){return{base64Certificate:e.stat("googDerBase64"),fingerprint:e.stat("googFingerprint"),fingerprintAlgorithm:e.stat("googFingerprintAlgorithm"),id:e.id,issuerCertificateId:e.stat("googIssuerId"),timestamp:Date.parse(e.timestamp),type:"certificate"}}function w8(e){return{bytesReceived:void 0,bytesSent:void 0,datachannelid:e.stat("datachannelid"),id:e.id,label:e.stat("label"),messagesReceived:void 0,messagesSent:void 0,protocol:e.stat("protocol"),state:e.stat("state"),timestamp:Date.parse(e.timestamp),transportId:e.stat("transportId"),type:"data-channel"}}function fw(e){return isNaN(e)||e===""?void 0:parseInt(e,10)/1e3}function L8(e){switch(e){case"peerreflexive":return"prflx";case"serverreflexive":return"srflx";default:return e}}function we(e,t){let a=e.stat(t);return Po(e,t)?parseInt(a,10):void 0}function dw(e,t){let a=e.stat(t);return Po(e,t)?parseFloat(a):void 0}function pU(e,t){let a=e.stat(t);return Po(e,t)?a==="true"||a===!0:void 0}function Po(e,t){let a=e.stat(t);return typeof a<"u"&&a!==""}var uU,mU=m(()=>{"use strict";uU=typeof window<"u"?window.RTCStatsReport:void 0;uU&&(en.prototype=Object.create(uU.prototype),en.prototype.constructor=en);["entries","forEach","get","has","keys","values"].forEach(e=>{en.prototype[e]=function(...t){return this._map[e](...t)}});en.fromArray=function(t){return new en(t.reduce((a,n)=>(a.set(n.id,n),a),new Map))};en.fromRTCStatsResponse=function(t){let a,n=new Map,r=t.result().reduce((i,o)=>{let s=o.id;switch(o.type){case"googCertificate":i.set(s,C8(o));break;case"datachannel":i.set(s,w8(o));break;case"googCandidatePair":pU(o,"googActiveConnection")&&(a=s),i.set(s,b8(o));break;case"localcandidate":i.set(s,fU(o,!1));break;case"remotecandidate":i.set(s,fU(o,!0));break;case"ssrc":Po(o,"packetsReceived")?i.set(`rtp-${s}`,v8(o)):i.set(`rtp-${s}`,S8(o)),i.set(`track-${s}`,y8(o)),i.set(`codec-${s}`,x8(o));break;case"googComponent":let l=cU(o);n.set(l.selectedCandidatePairId,s),i.set(s,cU(o));break}return i},new Map);if(a){let i=n.get(a);i&&(r.get(i).dtlsState="connected")}return new en(r)}});function Cl(e,t){return typeof e.get=="function"?e.get(t):e.find(a=>a.id===t)}function hU(e){if(!e)return Promise.reject(new ae(I8));if(typeof e.getStats!="function")return Promise.reject(new Ae(_8));let t;try{t=e.getStats()}catch{t=new Promise(n=>e.getStats(n)).then(en.fromRTCStatsResponse)}return t}function gU(e,t){return t=Object.assign({createRTCSample:T8},t),hU(e).then(t.createRTCSample)}function xU(e){return hU(e).then(t=>{let{candidatePairs:a,localCandidates:n,remoteCandidates:r,transport:i}=Array.from(t.values()).reduce((l,u)=>{switch(["candidatePairs","localCandidates","remoteCandidates"].forEach(c=>{l[c]||(l[c]=[])}),u.type){case"candidate-pair":l.candidatePairs.push(u);break;case"local-candidate":l.localCandidates.push(u);break;case"remote-candidate":l.remoteCandidates.push(u);break;case"transport":u.selectedCandidatePairId&&(l.transport=u);break}return l},{}),o=a.find(l=>l.selected||i&&l.id===i.selectedCandidatePairId),s;return o&&(s={localCandidate:n.find(l=>l.id===o.localCandidateId),remoteCandidate:r.find(l=>l.id===o.remoteCandidateId)}),{iceCandidateStats:[...n,...r],selectedIceCandidatePairStats:s}})}function k8(){this.bytesReceived=0,this.bytesSent=0,this.jitter=0,this.packetsLost=0,this.packetsReceived=0,this.packetsSent=0}function T8(e){let t=null,a=new k8,n;Array.from(e.values()).forEach(l=>{if(l.isRemote)return;let u=l.type.replace("-","");if(n=n||l.timestamp,l.remoteId){let c=Cl(e,l.remoteId);c&&c.roundTripTime&&(a.rtt=c.roundTripTime*1e3)}switch(u){case"inboundrtp":a.timestamp=a.timestamp||l.timestamp,a.jitter=l.jitter*1e3,a.packetsLost=l.packetsLost,a.packetsReceived=l.packetsReceived,a.bytesReceived=l.bytesReceived;break;case"outboundrtp":if(a.timestamp=l.timestamp,a.packetsSent=l.packetsSent,a.bytesSent=l.bytesSent,l.codecId){let c=Cl(e,l.codecId);a.codecName=c?c.mimeType&&c.mimeType.match(/(.*\/)?(.*)/)[2]:l.codecId}break;case"transport":t=l.id;break}}),a.timestamp||(a.timestamp=n);let r=Cl(e,t);if(!r)return a;let i=Cl(e,r.selectedCandidatePairId);if(!i)return a;let o=Cl(e,i.localCandidateId),s=Cl(e,i.remoteCandidateId);return a.rtt||(a.rtt=i&&i.currentRoundTripTime*1e3),Object.assign(a,{localAddress:o&&(o.address||o.ip),remoteAddress:s&&(s.address||s.ip)}),a}var I8,_8,pw=m(()=>{"use strict";ta();mU();I8="PeerConnection is null",_8="WebRTC statistics are unsupported"});var yU,Oo,mw=m(()=>{"use strict";Sl();yU=H(Ja());sg();cf();ta();Ea();pw();Mo();Cr();Oo=class e extends yU.EventEmitter{constructor(t,a){super(),this._hasInsightsErrored=!1,this._log=new Pe("PreflightTest"),this._networkTiming={},this._options={codecPreferences:[Ut.Codec.PCMU,Ut.Codec.Opus],edge:"roaming",fakeMicInput:!1,logLevel:"error",signalingTimeoutMs:1e4},this._status=e.Status.Connecting,Object.assign(this._options,a),this._samples=[],this._warnings=[],this._startTime=Date.now(),this._initDevice(t,Object.assign(Object.assign({},this._options),{fileInputStream:this._options.fakeMicInput?this._getStreamFromFile():void 0}));let n=["codecPreferences","edge","fakeMicInput","logLevel","signalingTimeoutMs"],r=["audioContext","deviceFactory","fileInputStream","getRTCIceCandidateStatsReport","iceServers","rtcConfiguration"];if(typeof a=="object"){let i=Object.assign({},a);Object.keys(i).forEach(o=>{!n.includes(o)&&!r.includes(o)&&delete i[o],r.includes(o)&&(i[o]=!0)}),this._log.debug(".constructor",JSON.stringify(i))}}stop(){this._log.debug(".stop");let t=new ct.CallCancelledError;this._device?(this._device.once(Ye.EventName.Unregistered,()=>this._onFailed(t)),this._device.destroy()):this._onFailed(t)}_emitWarning(t,a,n){let r={name:t,description:a};n&&(r.rtcWarning=n),this._warnings.push(r),this._log.debug(`#${e.Events.Warning}`,JSON.stringify(r)),this.emit(e.Events.Warning,r)}_getCallQuality(t){return t>4.2?e.CallQuality.Excellent:t>=4.1&&t<=4.2?e.CallQuality.Great:t>=3.7&&t<=4?e.CallQuality.Good:t>=3.1&&t<=3.6?e.CallQuality.Fair:e.CallQuality.Degraded}_getReport(){var t,a,n;let r=this._getRTCStats(),i={start:this._startTime};this._endTime&&(i.end=this._endTime,i.duration=this._endTime-this._startTime);let o={callSid:this._callSid,edge:this._edge,iceCandidateStats:(a=(t=this._rtcIceCandidateStatsReport)===null||t===void 0?void 0:t.iceCandidateStats)!==null&&a!==void 0?a:[],networkTiming:this._networkTiming,samples:this._samples,selectedEdge:this._options.edge,stats:r,testTiming:i,totals:this._getRTCSampleTotals(),warnings:this._warnings},s=(n=this._rtcIceCandidateStatsReport)===null||n===void 0?void 0:n.selectedIceCandidatePairStats;return s&&(o.selectedIceCandidatePairStats=s,o.isTurnRequired=s.localCandidate.candidateType==="relay"||s.remoteCandidate.candidateType==="relay"),r&&(o.callQuality=this._getCallQuality(r.mos.average)),o}_getRTCSampleTotals(){if(this._latestSample)return Object.assign({},this._latestSample.totals)}_getRTCStats(){let t=this._samples.findIndex(n=>typeof n.mos=="number"&&n.mos>0),a=t>=0?this._samples.slice(t):[];if(!(!a||!a.length))return["jitter","mos","rtt"].reduce((n,r)=>{let i=a.map(o=>o[r]);return Object.assign(Object.assign({},n),{[r]:{average:Number((i.reduce((o,s)=>o+s)/i.length).toPrecision(5)),max:Math.max(...i),min:Math.min(...i)}})},{})}_getStreamFromFile(){let t=this._options.audioContext;if(!t)throw new Ae("Cannot fake input audio stream: AudioContext is not supported by this browser.");let a=new Audio(YF);a.addEventListener("canplaythrough",()=>a.play()),typeof a.setAttribute=="function"&&a.setAttribute("crossorigin","anonymous");let n=t.createMediaElementSource(a),r=t.createMediaStreamDestination();return n.connect(r),r.stream}_initDevice(t,a){try{this._device=new(a.deviceFactory||Ye)(t,{chunderw:a.chunderw,codecPreferences:a.codecPreferences,edge:a.edge,eventgw:a.eventgw,fileInputStream:a.fileInputStream,logLevel:a.logLevel,preflight:!0}),this._device.once(Ye.EventName.Registered,()=>{this._onDeviceRegistered()}),this._device.once(Ye.EventName.Error,n=>{this._onDeviceError(n)}),this._device.register()}catch(n){setTimeout(()=>{this._onFailed(n)});return}this._signalingTimeoutTimer=setTimeout(()=>{this._onDeviceError(new Dt.ConnectionError("WebSocket Connection Timeout"))},a.signalingTimeoutMs)}_onDeviceError(t){this._device.destroy(),this._onFailed(t)}_onDeviceRegistered(){return xt(this,void 0,void 0,function*(){if(clearTimeout(this._echoTimer),clearTimeout(this._signalingTimeoutTimer),this._call=yield this._device.connect({rtcConfiguration:this._options.rtcConfiguration}),this._networkTiming.signaling={start:Date.now()},this._setupCallHandlers(this._call),this._edge=this._device.edge||void 0,this._options.fakeMicInput){this._echoTimer=setTimeout(()=>this._device.disconnectAll(),ZF);let a=this._device.audio;a&&(a.disconnect(!1),a.outgoing(!1))}this._call.once("disconnect",()=>{this._device.once(Ye.EventName.Unregistered,()=>this._onUnregistered()),this._device.destroy()}),this._call._publisher.on("error",()=>{this._hasInsightsErrored||this._emitWarning("insights-connection-error","Received an error when attempting to connect to Insights gateway"),this._hasInsightsErrored=!0})})}_onFailed(t){clearTimeout(this._echoTimer),clearTimeout(this._signalingTimeoutTimer),this._releaseHandlers(),this._endTime=Date.now(),this._status=e.Status.Failed,this._log.debug(`#${e.Events.Failed}`,t),this.emit(e.Events.Failed,t)}_onUnregistered(){setTimeout(()=>{this._status!==e.Status.Failed&&(clearTimeout(this._echoTimer),clearTimeout(this._signalingTimeoutTimer),this._releaseHandlers(),this._endTime=Date.now(),this._status=e.Status.Completed,this._report=this._getReport(),this._log.debug(`#${e.Events.Completed}`,JSON.stringify(this._report)),this.emit(e.Events.Completed,this._report))},10)}_releaseHandlers(){[this._device,this._call].forEach(t=>{t&&t.eventNames().forEach(a=>t.removeAllListeners(a))})}_setupCallHandlers(t){this._options.fakeMicInput&&t.once("volume",()=>{t._mediaHandler.outputs.forEach(a=>a.audio.muted=!0)}),t.on("warning",(a,n)=>{this._emitWarning(a,"Received an RTCWarning. See .rtcWarning for the RTCWarning",n)}),t.once("accept",()=>{this._callSid=t._mediaHandler.callSid,this._status=e.Status.Connected,this._log.debug(`#${e.Events.Connected}`),this.emit(e.Events.Connected)}),t.on("sample",a=>xt(this,void 0,void 0,function*(){this._latestSample||(this._rtcIceCandidateStatsReport=yield(this._options.getRTCIceCandidateStatsReport||xU)(t._mediaHandler.version.pc)),this._latestSample=a,this._samples.push(a),this._log.debug(`#${e.Events.Sample}`,JSON.stringify(a)),this.emit(e.Events.Sample,a)})),[{reportLabel:"peerConnection",type:"pcconnection"},{reportLabel:"ice",type:"iceconnection"},{reportLabel:"dtls",type:"dtlstransport"},{reportLabel:"signaling",type:"signaling"}].forEach(({type:a,reportLabel:n})=>{let r=`on${a}statechange`,i=t._mediaHandler[r];t._mediaHandler[r]=o=>{let s=this._networkTiming[n]=this._networkTiming[n]||{start:0};o==="connecting"||o==="checking"?s.start=Date.now():(o==="connected"||o==="stable")&&!s.duration&&(s.end=Date.now(),s.duration=s.end-s.start),i(o)}})}get callSid(){return this._callSid}get endTime(){return this._endTime}get latestSample(){return this._latestSample}get report(){return this._report}get startTime(){return this._startTime}get status(){return this._status}};(function(e){(function(t){t.Excellent="excellent",t.Great="great",t.Good="good",t.Fair="fair",t.Degraded="degraded"})(e.CallQuality||(e.CallQuality={})),(function(t){t.Completed="completed",t.Connected="connected",t.Failed="failed",t.Sample="sample",t.Warning="warning"})(e.Events||(e.Events={})),(function(t){t.Connecting="connecting",t.Connected="connected",t.Completed="completed",t.Failed="failed"})(e.Status||(e.Status={}))})(Oo||(Oo={}))});var SU,wl,A8,E8,vU,D8,M8,R8,P8,O8,B8,Da,ff,bU=m(()=>{"use strict";SU=H(Ja());iw();Cr();Ea();wl=globalThis.WebSocket,A8=1e4,E8=5e3,vU=15e3,D8=15e3,M8=1/0,R8=75e3,P8=1e3,O8=2e4,B8=6e4;(function(e){e.Connecting="connecting",e.Closed="closed",e.Open="open"})(Da||(Da={}));ff=class e extends SU.EventEmitter{constructor(t,a={}){super(),this.state=Da.Closed,this._backoffStartTime={preferred:null,primary:null},this._connectedUri=null,this._log=new Pe("WSTransport"),this._retryAfter=null,this._shouldFallback=!1,this._uriIndex=0,this._moveUriIndex=()=>{this._uriIndex++,this._uriIndex>=this._uris.length&&(this._uriIndex=0)},this._onSocketClose=n=>{if(this._log.error(`Received websocket close event code: ${n.code}. Reason: ${n.reason}`),n.code===1006||n.code===1015){this.emit("error",{code:31005,message:n.reason||"Websocket connection to Twilio's signaling servers were unexpectedly ended. If this is happening consistently, there may be an issue resolving the hostname provided. If a region or an edge is being specified in Device setup, ensure it is valid.",twilioError:new Dt.ConnectionError});let r=this.state===Da.Open||this._previousState===Da.Open;(this._shouldFallback||!r)&&this._moveUriIndex(),this._shouldFallback=!0}this._closeSocket()},this._onSocketError=n=>{this._log.error(`WebSocket received error: ${n.message}`),this.emit("error",{code:31e3,message:n.message||"WSTransport socket error",twilioError:new Dt.ConnectionDisconnected})},this._onSocketMessage=n=>{if(this._setHeartbeatTimeout(),this._socket&&n.data===`
|
|
46
|
+
`){this._socket.send(`
|
|
47
|
+
`),this._log.debug("heartbeat");return}if(n&&typeof n.data=="string"){this._log.debug(`Received: ${n.data}`);let{type:r,payload:i={}}=JSON.parse(n.data);r==="error"&&i.error&&i.error.retryAfter&&(this._retryAfter=i.error.retryAfter*1e3)}this.emit("message",n)},this._onSocketOpen=()=>{this._log.info("WebSocket opened successfully."),this._timeOpened=Date.now(),this._shouldFallback=!1,this._setState(Da.Open),clearTimeout(this._connectTimeout),this._backoff&&this._resetBackoffs(),this._setHeartbeatTimeout(),this.emit("open")},this._options=Object.assign(Object.assign({},e.defaultConstructorOptions),a),this._uris=t,this._backoff=null}close(){this._log.info("WSTransport.close() called..."),this._close()}open(){if(this._log.info("WSTransport.open() called..."),this._socket&&(this._socket.readyState===wl.CONNECTING||this._socket.readyState===wl.OPEN)){this._log.info("WebSocket already open.");return}this._preferredUri?this._connect(this._preferredUri):this._connect(this._uris[this._uriIndex])}send(t){if(this._log.debug(`Sending: ${t}`),!this._socket||this._socket.readyState!==wl.OPEN)return this._log.debug("Cannot send message. WebSocket is not open."),!1;try{this._socket.send(t)}catch(a){return this._log.error("Error while sending message:",a.message),this._closeSocket(),!1}return!0}updatePreferredURI(t){this._preferredUri=t}updateURIs(t){typeof t=="string"&&(t=[t]),this._uris=t,this._uriIndex=0}_close(){this._setState(Da.Closed),this._closeSocket()}_closeSocket(){if(clearTimeout(this._connectTimeout),clearTimeout(this._heartbeatTimeout),this._log.info("Closing and cleaning up WebSocket..."),!this._socket){this._log.info("No WebSocket to clean up.");return}this._socket.removeEventListener("close",this._onSocketClose),this._socket.removeEventListener("error",this._onSocketError),this._socket.removeEventListener("message",this._onSocketMessage),this._socket.removeEventListener("open",this._onSocketOpen),(this._socket.readyState===wl.CONNECTING||this._socket.readyState===wl.OPEN)&&this._socket.close(),this._backoff&&this._timeOpened&&Date.now()-this._timeOpened>A8&&this._resetBackoffs(),this.state!==Da.Closed&&(this._backoff||(this._backoff=this._setupBackoffs()),this._performBackoff()),delete this._socket,this.emit("close")}_connect(t,a){this._log.info(typeof a=="number"?`Attempting to reconnect (retry #${a})...`:"Attempting to connect..."),this._closeSocket(),this._setState(Da.Connecting),this._connectedUri=t;try{this._socket=new this._options.WebSocket(this._connectedUri)}catch(n){this._log.error("Could not connect to endpoint:",n.message),this._close(),this.emit("error",{code:31e3,message:n.message||`Could not connect to ${this._connectedUri}`,twilioError:new Dt.ConnectionDisconnected});return}this._socket.addEventListener("close",this._onSocketClose),this._socket.addEventListener("error",this._onSocketError),this._socket.addEventListener("message",this._onSocketMessage),this._socket.addEventListener("open",this._onSocketOpen),delete this._timeOpened,this._connectTimeout=setTimeout(()=>{this._log.info("WebSocket connection attempt timed out."),this._moveUriIndex(),this._closeSocket()},this._options.connectTimeoutMs)}_performBackoff(){if(!this._backoff){this._log.info("No backoff instance to perform backoff.");return}this._preferredUri?(this._log.info("Preferred URI set; backing off."),this._backoff.preferred.backoff()):(this._log.info("Preferred URI not set; backing off."),this._backoff.primary.backoff())}_resetBackoffs(){if(!this._backoff){this._log.info("No backoff instance to reset.");return}this._backoff.preferred.removeAllListeners("backoff"),this._backoff.preferred.removeAllListeners("ready"),this._backoff.primary.removeAllListeners("backoff"),this._backoff.primary.removeAllListeners("ready"),this._backoff=null,this._retryAfter=null,this._backoffStartTime.preferred=null,this._backoffStartTime.primary=null}_setHeartbeatTimeout(){clearTimeout(this._heartbeatTimeout),this._heartbeatTimeout=setTimeout(()=>{this._log.info(`No messages received in ${vU/1e3} seconds. Reconnecting...`),this._shouldFallback=!0,this._closeSocket()},vU)}_setState(t){this._previousState=this.state,this.state=t}_setupBackoffs(){let t=this._retryAfter!==null&&this._preferredUri?this._retryAfter:null;t&&this._log.info(`Setting initial preferred backoff value to retryAfter: ${t}ms`);let a=t?this._options.maxRetryAfterDurationMs:this._options.maxPreferredDurationMs,n={factor:2,jitter:.4,max:t?this._options.maxRetryAfterDelayMs:this._options.maxPreferredDelayMs,min:t||100,useInitialValue:!!t};this._log.info("Initializing preferred transport backoff using config: ",n);let r=new Do(n);r.on("backoff",(s,l)=>{if(this.state===Da.Closed){this._log.info("Preferred backoff initiated but transport state is closed; not attempting a connection.");return}this._log.info(`Will attempt to reconnect Websocket to preferred URI in ${l}ms`),s===0&&(this._backoffStartTime.preferred=Date.now(),this._log.info(`Preferred backoff start; ${this._backoffStartTime.preferred}`))}),r.on("ready",(s,l)=>{if(this.state===Da.Closed){this._log.info("Preferred backoff ready but transport state is closed; not attempting a connection.");return}if(this._backoffStartTime.preferred===null){this._log.info("Preferred backoff start time invalid; not attempting a connection.");return}if(!this._backoff){this._log.info("Preferred backoff instance invalid; not attempting a connection.");return}if(Date.now()-this._backoffStartTime.preferred>a){this._log.info("Max preferred backoff attempt time exceeded; falling back to primary backoff."),this._preferredUri=null,this._backoff.primary.backoff();return}if(typeof this._preferredUri!="string"){this._log.info("Preferred URI cleared; falling back to primary backoff."),this._preferredUri=null,this._backoff.primary.backoff();return}this._connect(this._preferredUri,s+1)});let i={factor:2,jitter:.4,max:this._options.maxPrimaryDelayMs,min:this._uris&&this._uris.length>1?Math.floor(Math.random()*4001)+1e3:100};this._log.info("Initializing primary transport backoff using config: ",i);let o=new Do(i);return o.on("backoff",(s,l)=>{if(this.state===Da.Closed){this._log.info("Primary backoff initiated but transport state is closed; not attempting a connection.");return}this._log.info(`Will attempt to reconnect WebSocket in ${l}ms`),s===0&&(this._backoffStartTime.primary=Date.now(),this._log.info(`Primary backoff start; ${this._backoffStartTime.primary}`))}),o.on("ready",(s,l)=>{if(this.state===Da.Closed){this._log.info("Primary backoff ready but transport state is closed; not attempting a connection.");return}if(this._backoffStartTime.primary===null){this._log.info("Primary backoff start time invalid; not attempting a connection.");return}if(Date.now()-this._backoffStartTime.primary>this._options.maxPrimaryDurationMs){this._log.info("Max primary backoff attempt time exceeded; not attempting a connection.");return}this._connect(this._uris[this._uriIndex],s+1)}),{preferred:r,primary:o}}get uri(){return this._connectedUri}};ff.defaultConstructorOptions={WebSocket:wl,connectTimeoutMs:E8,maxPreferredDelayMs:P8,maxPreferredDurationMs:D8,maxPrimaryDelayMs:O8,maxPrimaryDurationMs:M8,maxRetryAfterDelayMs:B8,maxRetryAfterDurationMs:R8}});function z8(){let e=typeof navigator<"u"?navigator:{};return{browser:{platform:e.platform||"unknown",userAgent:e.userAgent||"unknown"},p:"browser",plugin:"rtc",v:wr}}var CU,F8,U8,Oe,wU=m(()=>{"use strict";CU=H(Ja());Mo();Cr();Ea();bU();F8="1.6",U8=30,Oe=class e extends CU.EventEmitter{constructor(t,a,n){if(super(),!(this instanceof e))return new e(t,a,n);let r={TransportFactory:ff};n=n||{};for(let o in r)o in n||(n[o]=r[o]);this.options=n,this.token=t||"",this.status="disconnected",this.gateway=null,this.region=null,this._messageQueue=[],this._preferredUri=null,this._uris=a,this._handleTransportClose=this._handleTransportClose.bind(this),this._handleTransportError=this._handleTransportError.bind(this),this._handleTransportMessage=this._handleTransportMessage.bind(this),this._handleTransportOpen=this._handleTransportOpen.bind(this),this._log=new Pe("PStream"),this.on("error",()=>{this._log.warn("Unexpected error handled in pstream")});let i=this;return this.addListener("ready",()=>{i.status="ready"}),this.addListener("offline",()=>{i.status="offline"}),this.addListener("close",()=>{i._log.info('Received "close" from server. Destroying PStream...'),i._destroy()}),this.transport=new this.options.TransportFactory(this._uris,{backoffMaxMs:this.options.backoffMaxMs,maxPreferredDurationMs:this.options.maxPreferredDurationMs}),Object.defineProperties(this,{uri:{enumerable:!0,get(){return this.transport.uri}}}),this.transport.on("close",this._handleTransportClose),this.transport.on("error",this._handleTransportError),this.transport.on("message",this._handleTransportMessage),this.transport.on("open",this._handleTransportOpen),this.transport.open(),this}};Oe.prototype._handleTransportClose=function(){this.emit("transportClose"),this.status!=="disconnected"&&(this.status!=="offline"&&this.emit("offline",this),this.status="disconnected")};Oe.prototype._handleTransportError=function(e){if(!e){this.emit("error",{error:{code:31e3,message:"Websocket closed without a provided reason",twilioError:new Dt.ConnectionDisconnected}});return}this.emit("error",typeof e.code<"u"?{error:e}:e)};Oe.prototype._handleTransportMessage=function(e){if(!e||!e.data||typeof e.data!="string")return;let{type:t,payload:a={}}=JSON.parse(e.data);this.gateway=a.gateway||this.gateway,this.region=a.region||this.region,t==="error"&&a.error&&(a.error.twilioError=new Dt.ConnectionError),this.emit(t,a)};Oe.prototype._handleTransportOpen=function(){this.status="connected",this.setToken(this.token),this.emit("transportOpen"),this._messageQueue.splice(0,this._messageQueue.length).forEach(t=>this._publish(...t))};Oe.toString=()=>"[Twilio.PStream class]";Oe.prototype.toString=()=>"[Twilio.PStream instance]";Oe.prototype.setToken=function(e){this._log.info("Setting token and publishing listen"),this.token=e;let t=0,a=this.options.maxPreferredDurationMs;this._log.info(`maxPreferredDurationMs:${a}`),typeof a=="number"&&a>=0&&(t=Math.min(Math.ceil(a/1e3),U8)),this._log.info(`reconnectTimeout:${t}`);let n={browserinfo:z8(),reconnectTimeout:t,token:e};this._publish("listen",n)};Oe.prototype.sendMessage=function(e,t,a="application/json",n,r){let i={callsid:e,content:t,contenttype:a,messagetype:n,voiceeventsid:r};this._publish("message",i,!0)};Oe.prototype.register=function(e){let t={media:e};this._publish("register",t,!0)};Oe.prototype.invite=function(e,t,a){let n={callsid:t,sdp:e,twilio:a?{params:a}:{}};this._publish("invite",n,!0)};Oe.prototype.reconnect=function(e,t,a){let n={callsid:t,reconnect:a,sdp:e,twilio:{}};this._publish("invite",n,!0)};Oe.prototype.answer=function(e,t){this._publish("answer",{sdp:e,callsid:t},!0)};Oe.prototype.dtmf=function(e,t){this._publish("dtmf",{callsid:e,dtmf:t},!0)};Oe.prototype.hangup=function(e,t){let a=t?{callsid:e,message:t}:{callsid:e};this._publish("hangup",a,!0)};Oe.prototype.reject=function(e){this._publish("reject",{callsid:e},!0)};Oe.prototype.reinvite=function(e,t){this._publish("reinvite",{sdp:e,callsid:t},!1)};Oe.prototype._destroy=function(){this.transport.removeListener("close",this._handleTransportClose),this.transport.removeListener("error",this._handleTransportError),this.transport.removeListener("message",this._handleTransportMessage),this.transport.removeListener("open",this._handleTransportOpen),this.transport.close(),this.emit("offline",this)};Oe.prototype.destroy=function(){return this._log.info("PStream.destroy() called..."),this._destroy(),this};Oe.prototype.updatePreferredURI=function(e){this._preferredUri=e,this.transport.updatePreferredURI(e)};Oe.prototype.updateURIs=function(e){this._uris=e,this.transport.updateURIs(this._uris)};Oe.prototype.publish=function(e,t){return this._publish(e,t,!0)};Oe.prototype._publish=function(e,t,a){let n=JSON.stringify({payload:t,type:e,version:F8});this.transport.send(n)||(this.emit("error",{error:{code:31009,message:"No transport available to send or receive messages",twilioError:new ct.TransportError}}),a&&this._messageQueue.push([e,t,!0]))}});function LU(e){return`voice-js.${e}.twilio.com`}function hw(e){return e?`eventgw.${e}.twilio.com`:H8}function gw(e){return`wss://${e}/signal`}function xw(e){if(e&&typeof e!="string"&&!Array.isArray(e))throw new ae("If `edge` is provided, it must be of type `string` or an array of strings.");let t;return e?t=(Array.isArray(e)?e:[e]).map(n=>LU(n)):t=[LU(N8)],t}function _U(e){return V8[e]||null}var Ze,ve,V8,IU,N8,H8,kU=m(()=>{"use strict";ta();(function(e){e.Sydney="sydney",e.SaoPaulo="sao-paulo",e.Dublin="dublin",e.Frankfurt="frankfurt",e.Tokyo="tokyo",e.Singapore="singapore",e.Ashburn="ashburn",e.Umatilla="umatilla",e.Roaming="roaming",e.AshburnIx="ashburn-ix",e.SanJoseIx="san-jose-ix",e.LondonIx="london-ix",e.FrankfurtIx="frankfurt-ix",e.SingaporeIx="singapore-ix",e.SydneyIx="sydney-ix",e.TokyoIx="tokyo-ix"})(Ze||(Ze={}));(function(e){e.Au1="au1",e.Au1Ix="au1-ix",e.Br1="br1",e.De1="de1",e.De1Ix="de1-ix",e.Gll="gll",e.Ie1="ie1",e.Ie1Ix="ie1-ix",e.Ie1Tnx="ie1-tnx",e.Jp1="jp1",e.Jp1Ix="jp1-ix",e.Sg1="sg1",e.Sg1Ix="sg1-ix",e.Sg1Tnx="sg1-tnx",e.Us1="us1",e.Us1Ix="us1-ix",e.Us1Tnx="us1-tnx",e.Us2="us2",e.Us2Ix="us2-ix",e.Us2Tnx="us2-tnx"})(ve||(ve={}));V8={ASIAPAC_SINGAPORE:ve.Sg1,ASIAPAC_SYDNEY:ve.Au1,ASIAPAC_TOKYO:ve.Jp1,EU_FRANKFURT:ve.De1,EU_IRELAND:ve.Ie1,SOUTH_AMERICA_SAO_PAULO:ve.Br1,US_EAST_VIRGINIA:ve.Us1,US_WEST_OREGON:ve.Us2},IU={[ve.Au1]:Ze.Sydney,[ve.Br1]:Ze.SaoPaulo,[ve.Ie1]:Ze.Dublin,[ve.De1]:Ze.Frankfurt,[ve.Jp1]:Ze.Tokyo,[ve.Sg1]:Ze.Singapore,[ve.Us1]:Ze.Ashburn,[ve.Us2]:Ze.Umatilla,[ve.Gll]:Ze.Roaming,[ve.Us1Ix]:Ze.AshburnIx,[ve.Us2Ix]:Ze.SanJoseIx,[ve.Ie1Ix]:Ze.LondonIx,[ve.De1Ix]:Ze.FrankfurtIx,[ve.Sg1Ix]:Ze.SingaporeIx,[ve.Au1Ix]:Ze.SydneyIx,[ve.Jp1Ix]:Ze.TokyoIx,[ve.Us1Tnx]:Ze.AshburnIx,[ve.Us2Tnx]:Ze.AshburnIx,[ve.Ie1Tnx]:Ze.LondonIx,[ve.Sg1Tnx]:Ze.SingaporeIx},N8=Ze.Roaming,H8="eventgw.twilio.com"});function AU(e){let[,t,a]=/a=rtpmap:(\d+) (\S+)/m.exec(e)||[null,"",""],n=new RegExp(`a=fmtp:${t} (\\S+)`,"m"),[,r]=n.exec(e)||[null,""];return{codecName:a,codecParams:r}}function EU(e){return sf(window,window.navigator)?e.split(`
|
|
48
|
+
`).filter(t=>t.indexOf("a=ice-lite")===-1).join(`
|
|
49
|
+
`):e}function yw(e,t){if(typeof t!="number"||t<G8||t>j8)return e;let a=/a=rtpmap:(\d+) opus/m.exec(e),n=a&&a.length?a[1]:q8,r=new RegExp(`a=fmtp:${n}`);return e.split(`
|
|
50
|
+
`).map(o=>r.test(o)?o+`;maxaveragebitrate=${t}`:o).join(`
|
|
51
|
+
`)}function vw(e,t){let a=X8(e);return[e.split(`\r
|
|
52
|
+
m=`)[0]].concat(a.map(r=>{if(!/^m=(audio|video)/.test(r))return r;let i=r.match(/^m=(audio|video)/)[1],o=W8(r),s=K8(o,t),l=Y8(s,r),u=o.get("pcma")||[],c=o.get("pcmu")||[];return(i==="audio"?new Set(u.concat(c)):new Set).has(s[0])?l.replace(/\r\nb=(AS|TIAS):([0-9]+)/g,""):l})).join(`\r
|
|
53
|
+
`)}function X8(e,t,a){return e.replace(/\r\n\r\n$/,`\r
|
|
54
|
+
`).split(`\r
|
|
55
|
+
m=`).slice(1).map(n=>`m=${n}`).filter(n=>{let r=new RegExp("m=.*","gm"),i=new RegExp("a=.*","gm");return r.test(n)&&i.test(n)})}function W8(e){return Array.from(Z8(e)).reduce((t,a)=>{let n=a[0],r=a[1],i=t.get(r)||[];return t.set(r,i.concat(n))},new Map)}function K8(e,t){t=t.map(i=>i.toLowerCase());let a=ag(t,i=>e.get(i)||[]),n=of(Array.from(e.keys()),t),r=ag(n,i=>e.get(i));return a.concat(r)}function Y8(e,t){let a=t.split(`\r
|
|
56
|
+
`),n=a[0],r=a.slice(1);return n=n.replace(/([0-9]+\s?)+$/,e.join(" ")),[n].concat(r).join(`\r
|
|
57
|
+
`)}function Z8(e){return Q8(e).reduce((t,a)=>{let n=new RegExp(`a=rtpmap:${a} ([^/]+)`),r=e.match(n),i=r?r[1].toLowerCase():TU[a]?TU[a].toLowerCase():"";return t.set(a,i)},new Map)}function Q8(e){let a=e.split(`\r
|
|
58
|
+
`)[0].match(/([0-9]+)/g);return a?a.slice(1).map(n=>parseInt(n,10)):[]}var TU,q8,j8,G8,lg=m(()=>{"use strict";Rn();TU={0:"PCMU",8:"PCMA"},q8=111,j8=51e4,G8=6e3});function na(e){if(this.log=new Pe("RTCPC"),typeof window>"u"){this.log.info("No RTCPeerConnection implementation available. The window object was not found.");return}e&&e.RTCPeerConnection?this.RTCPeerConnection=e.RTCPeerConnection:typeof window.RTCPeerConnection=="function"?this.RTCPeerConnection=window.RTCPeerConnection:typeof window.webkitRTCPeerConnection=="function"?this.RTCPeerConnection=webkitRTCPeerConnection:typeof window.mozRTCPeerConnection=="function"?(this.RTCPeerConnection=mozRTCPeerConnection,window.RTCSessionDescription=mozRTCSessionDescription,window.RTCIceCandidate=mozRTCIceCandidate):this.log.info("No RTCPeerConnection implementation available")}function DU(e,t,a,n){return function(){let r=Array.prototype.slice.call(arguments);return new Promise(i=>{let o=e.apply(t,r);if(!n){i(o);return}if(typeof o=="object"&&typeof o.then=="function")i(o);else throw new Error}).catch(()=>new Promise((i,o)=>{e.apply(t,a?[i,o].concat(r):r.concat([i,o]))}))}}function MU(e,t){return DU(e,t,!0,!0)}function ug(e,t){return DU(e,t,!1,!1)}var cg=m(()=>{"use strict";Ea();Rn();lg();na.prototype.create=function(e){this.pc=new this.RTCPeerConnection(e)};na.prototype.createModernConstraints=e=>{if(typeof e>"u")return null;let t=Object.assign({},e);return typeof webkitRTCPeerConnection<"u"&&!bl()?(t.mandatory={},typeof e.audio<"u"&&(t.mandatory.OfferToReceiveAudio=e.audio),typeof e.video<"u"&&(t.mandatory.OfferToReceiveVideo=e.video)):(typeof e.audio<"u"&&(t.offerToReceiveAudio=e.audio),typeof e.video<"u"&&(t.offerToReceiveVideo=e.video)),delete t.audio,delete t.video,t};na.prototype.createOffer=function(e,t,a,n){return t=this.createModernConstraints(t),MU(this.pc.createOffer,this.pc)(t).then(r=>{if(!this.pc)return Promise.resolve();let i=yw(r.sdp,e);return ug(this.pc.setLocalDescription,this.pc)(new RTCSessionDescription({sdp:i,type:"offer"}))}).then(a,n)};na.prototype.createAnswer=function(e,t,a,n){return t=this.createModernConstraints(t),MU(this.pc.createAnswer,this.pc)(t).then(r=>{if(!this.pc)return Promise.resolve();let i=yw(r.sdp,e);return ug(this.pc.setLocalDescription,this.pc)(new RTCSessionDescription({sdp:i,type:"answer"}))}).then(a,n)};na.prototype.processSDP=function(e,t,a,n,r,i){a=vw(a,t);let o=new RTCSessionDescription({sdp:a,type:"offer"});return ug(this.pc.setRemoteDescription,this.pc)(o).then(()=>{this.createAnswer(e,n,r,i)})};na.prototype.getSDP=function(){return this.pc.localDescription.sdp};na.prototype.processAnswer=function(e,t,a,n){return this.pc?(t=vw(t,e),ug(this.pc.setRemoteDescription,this.pc)(new RTCSessionDescription({sdp:t,type:"answer"})).then(a,n)):Promise.resolve()};na.test=()=>{if(typeof navigator=="object"){let e=navigator.mediaDevices&&navigator.mediaDevices.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.getUserMedia;if(bl(navigator))return!1;if(e&&typeof window.RTCPeerConnection=="function")return!0;if(e&&typeof window.webkitRTCPeerConnection=="function")return!0;if(e&&typeof window.mozRTCPeerConnection=="function"){try{if(typeof new window.mozRTCPeerConnection().getLocalStreams!="function")return!1}catch{return!1}return!0}else if(typeof RTCIceGatherer<"u")return!0}return!1}});function G(e,t,a){if(!e||!t)throw new ae("Audiohelper, and pstream are required arguments");if(!(this instanceof G))return new G(e,t,a);this._log=new Pe("PeerConnection");function n(){this._log.warn("Unexpected noop call in peerconnection")}this.onaudio=n,this.onopen=n,this.onerror=n,this.onclose=n,this.ondisconnected=n,this.onfailed=n,this.onconnected=n,this.onreconnected=n,this.onsignalingstatechange=n,this.ondtlstransportstatechange=n,this.onicegatheringfailure=n,this.onicegatheringstatechange=n,this.oniceconnectionstatechange=n,this.onpcconnectionstatechange=n,this.onicecandidate=n,this.onselectedcandidatepairchange=n,this.onvolume=n,this.version=null,this.pstream=t,this.stream=null,this.sinkIds=new Set(["default"]),this.outputs=new Map,this.status="connecting",this.callSid=null,this.isMuted=!1;let r=typeof window<"u"&&(window.AudioContext||window.webkitAudioContext);return this._isSinkSupported=!!r&&typeof HTMLAudioElement<"u"&&HTMLAudioElement.prototype.setSinkId,this._audioContext=r&&e._audioContext,this._audioHelper=e,this._audioProcessorEventObserver=e._getAudioProcessorEventObserver(),this._hasIceCandidates=!1,this._hasIceGatheringFailures=!1,this._iceGatheringTimeoutId=null,this._masterAudio=null,this._masterAudioDeviceId=null,this._mediaStreamSource=null,this._dtmfSender=null,this._dtmfSenderUnsupported=!1,this._callEvents=[],this._nextTimeToPublish=Date.now(),this._onAnswerOrRinging=n,this._onHangup=n,this._remoteStream=null,this._shouldManageStream=!0,this._iceState=t7,this.options=a=a||{},this.navigator=a.navigator||(typeof navigator<"u"?navigator:null),this.util=a.util||lf,this.codecPreferences=a.codecPreferences,this._onAudioProcessorAdded=i=>{this._handleAudioProcessorEvent(i,!0)},this._onAudioProcessorRemoved=i=>{this._handleAudioProcessorEvent(i,!1)},this._audioProcessorEventObserver.on("add",this._onAudioProcessorAdded),this._audioProcessorEventObserver.on("remove",this._onAudioProcessorRemoved),this}function a7(e,t){typeof e.addTrack=="function"?t.getAudioTracks().forEach(a=>{e.addTrack(a,t)}):e.addStream(t)}function PU(e,t){let a;return t?a=new t:typeof MediaStream<"u"?a=new MediaStream:a=new webkitMediaStream,e.getAudioTracks().forEach(a.addTrack,a),a}function fg(e,t,a){return a._maybeCreateRemoteProcessedStream(t).then(n=>{if(typeof e.srcObject<"u")e.srcObject=n;else if(typeof e.mozSrcObject<"u")e.mozSrcObject=n;else if(typeof e.src<"u"){let r=e.options.window||window;e.src=(r.URL||r.webkitURL).createObjectURL(n)}else return Promise.reject();return Promise.resolve()})}var $8,J8,e7,t7,RU,Sw=m(()=>{"use strict";ta();Ea();Rn();Rn();cg();lg();Cr();$8=15e3,J8="none",e7="timeout",t7="new",RU=50;G.prototype.uri=function(){return this._uri};G.prototype.openDefaultDeviceWithConstraints=function(e){return this._audioHelper._openDefaultDeviceWithConstraints(e).then(this._setInputTracksFromStream.bind(this,!1))};G.prototype.setInputTracksFromStream=function(e){let t=this;return this._setInputTracksFromStream(!0,e).then(()=>{t._shouldManageStream=!1})};G.prototype._createAnalyser=(e,t)=>{t=Object.assign({fftSize:32,smoothingTimeConstant:.3},t);let a=e.createAnalyser();for(let n in t)a[n]=t[n];return a};G.prototype._setVolumeHandler=function(e){this.onvolume=e};G.prototype._startPollingVolume=function(){if(!this._audioContext||!this.stream||!this._remoteStream)return;let e=this._audioContext,a=(this._inputAnalyser=this._createAnalyser(e)).frequencyBinCount,n=new Uint8Array(a);this._inputAnalyser2=this._createAnalyser(e,{maxDecibels:0,minDecibels:-127,smoothingTimeConstant:0});let i=(this._outputAnalyser=this._createAnalyser(e)).frequencyBinCount,o=new Uint8Array(i);this._outputAnalyser2=this._createAnalyser(e,{maxDecibels:0,minDecibels:-127,smoothingTimeConstant:0}),this._updateInputStreamSource(this.stream),this._updateOutputStreamSource(this._remoteStream);let s=this;setTimeout(function l(){if(s._audioContext){if(s.status==="closed"){s._inputAnalyser.disconnect(),s._outputAnalyser.disconnect(),s._inputAnalyser2.disconnect(),s._outputAnalyser2.disconnect();return}}else return;s._inputAnalyser.getByteFrequencyData(n);let u=s.util.average(n);s._inputAnalyser2.getByteFrequencyData(n);let c=s.util.average(n);s._outputAnalyser.getByteFrequencyData(o);let f=s.util.average(o);s._outputAnalyser2.getByteFrequencyData(o);let d=s.util.average(o);s.onvolume(u/255,f/255,c,d),setTimeout(l,RU)},RU)};G.prototype._stopStream=function(){this._shouldManageStream&&this._audioHelper._stopDefaultInputDeviceStream()};G.prototype._updateInputStreamSource=function(e){this._inputStreamSource&&this._inputStreamSource.disconnect();try{this._inputStreamSource=this._audioContext.createMediaStreamSource(e),this._inputStreamSource.connect(this._inputAnalyser),this._inputStreamSource.connect(this._inputAnalyser2)}catch(t){this._log.warn("Unable to update input MediaStreamSource",t),this._inputStreamSource=null}};G.prototype._updateOutputStreamSource=function(e){this._outputStreamSource&&this._outputStreamSource.disconnect();try{this._outputStreamSource=this._audioContext.createMediaStreamSource(e),this._outputStreamSource.connect(this._outputAnalyser),this._outputStreamSource.connect(this._outputAnalyser2)}catch(t){this._log.warn("Unable to update output MediaStreamSource",t),this._outputStreamSource=null}};G.prototype._setInputTracksFromStream=function(e,t){if(!t)return Promise.reject(new ae("Can not set input stream to null while in a call"));if(!t.getAudioTracks().length)return Promise.reject(new ae("Supplied input stream has no audio tracks"));let a=this.stream,n=()=>(this.mute(this.isMuted),Promise.resolve(this.stream));if(!a)this.stream=e?PU(t,this.options.MediaStream):t;else return this._shouldManageStream&&this._stopStream(),this._sender||(this._sender=this.version.pc.getSenders()[0]),this._sender.replaceTrack(t.getAudioTracks()[0]).then(()=>(this._updateInputStreamSource(t),this.stream=e?PU(t,this.options.MediaStream):t,n()));return n()};G.prototype._onInputDevicesChanged=function(){if(!this.stream)return;this.stream.getAudioTracks().every(t=>t.readyState==="ended")&&this._shouldManageStream&&this.openDefaultDeviceWithConstraints({audio:!0})};G.prototype._onIceGatheringFailure=function(e){this._hasIceGatheringFailures=!0,this.onicegatheringfailure(e)};G.prototype._onMediaConnectionStateChange=function(e){let t=this._iceState;if(t===e||e!=="connected"&&e!=="disconnected"&&e!=="failed")return;this._iceState=e;let a;switch(e){case"connected":t==="disconnected"||t==="failed"?(a="ICE liveliness check succeeded. Connection with Twilio restored",this._log.info(a),this.onreconnected(a)):(a="Media connection established.",this._log.info(a),this.onconnected(a)),this._stopIceGatheringTimeout(),this._hasIceGatheringFailures=!1;break;case"disconnected":a="ICE liveliness check failed. May be having trouble connecting to Twilio",this._log.warn(a),this.ondisconnected(a);break;case"failed":a="Connection with Twilio was interrupted.",this._log.warn(a),this.onfailed(a);break}};G.prototype._setSinkIds=function(e){return this._isSinkSupported?(this.sinkIds=new Set(e.forEach?e:[e]),this.version?this._updateAudioOutputs():Promise.resolve()):Promise.reject(new Ae("Audio output selection is not supported by this browser"))};G.prototype._startIceGatheringTimeout=function(){this._stopIceGatheringTimeout(),this._iceGatheringTimeoutId=setTimeout(()=>{this._onIceGatheringFailure(e7)},$8)};G.prototype._stopIceGatheringTimeout=function(){clearInterval(this._iceGatheringTimeoutId)};G.prototype._updateAudioOutputs=function(){let t=Array.from(this.sinkIds).filter(function(i){return!this.outputs.has(i)},this),a=Array.from(this.outputs.keys()).filter(function(i){return!this.sinkIds.has(i)},this),n=this,r=t.map(this._createAudioOutput,this);return Promise.all(r).then(()=>Promise.all(a.map(n._removeAudioOutput,n)))};G.prototype._createAudio=function(t){let a=new Audio(t);return this.onaudio(a),a};G.prototype._createAudioOutput=function(t){let a=null;this._mediaStreamSource&&(a=this._audioContext.createMediaStreamDestination(),this._mediaStreamSource.connect(a));let n=this._createAudio();fg(n,a&&a.stream?a.stream:this.pcStream,this._audioHelper).catch(()=>this._log.error("Error attaching stream to element (_createAudioOutput)."));let r=this;return n.setSinkId(t).then(()=>n.play()).then(()=>{r.outputs.set(t,{audio:n,dest:a})})};G.prototype._removeAudioOutputs=function(){return this._masterAudio&&typeof this._masterAudioDeviceId<"u"&&(this._disableOutput(this,this._masterAudioDeviceId),this.outputs.delete(this._masterAudioDeviceId),this._masterAudioDeviceId=null,this._masterAudio.paused||this._masterAudio.pause(),typeof this._masterAudio.srcObject<"u"?this._masterAudio.srcObject=null:this._masterAudio.src="",this._masterAudio=null),Array.from(this.outputs.keys()).map(this._removeAudioOutput,this)};G.prototype._disableOutput=function(t,a){let n=t.outputs.get(a);n&&(n.audio&&(n.audio.pause(),n.audio.src=""),n.dest&&n.dest.disconnect())};G.prototype._reassignMasterOutput=function(t,a){let n=t.outputs.get(a);t.outputs.delete(a);let r=this,i=Array.from(t.outputs.keys())[0],o=typeof i=="string"?i:"default";return n.audio.setSinkId(o).then(()=>{r._disableOutput(t,o),t.outputs.set(o,n),t._masterAudioDeviceId=o}).catch(function(){t.outputs.set(a,n),r._log.info("Could not reassign master output. Attempted to roll back.")})};G.prototype._removeAudioOutput=function(t){return this._masterAudioDeviceId===t?this._reassignMasterOutput(this,t):(this._disableOutput(this,t),this.outputs.delete(t),Promise.resolve())};G.prototype._onAddTrack=function(t,a){let n=t._masterAudio=this._createAudio();fg(n,a,this._audioHelper).then(()=>n.play()).catch(()=>t._log.error("Error attaching stream to element (_onAddTrack)."));let r=Array.from(t.outputs.keys())[0],i=typeof r=="string"?r:"default";t._masterAudioDeviceId=i,t.outputs.set(i,{audio:n});try{t._mediaStreamSource=t._audioContext.createMediaStreamSource(a)}catch(o){this._log.warn("Unable to create a MediaStreamSource from onAddTrack",o),this._mediaStreamSource=null}t.pcStream=a,t._updateAudioOutputs()};G.prototype._fallbackOnAddTrack=function(t,a){let n=document&&document.createElement("audio");fg(n,a,this._audioHelper).then(()=>n.play()).catch(()=>t._log.error("Error attaching stream to element (_fallbackOnAddTrack).")),t.outputs.set("default",{audio:n})};G.prototype._setEncodingParameters=function(e){if(!e||!this._sender||typeof this._sender.getParameters!="function"||typeof this._sender.setParameters!="function")return;let t=this._sender.getParameters();!t.priority&&!(t.encodings&&t.encodings.length)||(t.priority="high",t.encodings&&t.encodings.length&&t.encodings.forEach(a=>{a.priority="high",a.networkPriority="high"}),this._sender.setParameters(t))};G.prototype._setupPeerConnection=function(e){let t=this,a=new(this.options.rtcpcFactory||na)({RTCPeerConnection:this.options.RTCPeerConnection});a.create(e),a7(a.pc,this.stream);let n=RTCRtpReceiver.getCapabilities("audio").codecs;this._log.debug("sorting codecs",n,this.codecPreferences);let r=cw(n,this.codecPreferences),[i]=a.pc.getTransceivers();this._log.debug("setting sorted codecs",r),i.setCodecPreferences(r);let o="ontrack"in a.pc?"ontrack":"onaddstream";return a.pc[o]=s=>{let l=t._remoteStream=s.stream||s.streams[0];typeof a.pc.getSenders=="function"&&(this._sender=a.pc.getSenders()[0]),t._isSinkSupported?t._onAddTrack(t,l):t._fallbackOnAddTrack(t,l),t._startPollingVolume()},a};G.prototype._maybeSetIceAggressiveNomination=function(e){return this.options.forceAggressiveIceNomination?EU(e):e};G.prototype._setupChannel=function(){let e=this.version.pc;this.version.pc.onopen=()=>{this.status="open",this.onopen()},this.version.pc.onstatechange=()=>{this.version.pc&&this.version.pc.readyState==="stable"&&(this.status="open",this.onopen())},this.version.pc.onsignalingstatechange=()=>{let t=e.signalingState;this._log.info(`signalingState is "${t}"`),this.version.pc&&this.version.pc.signalingState==="stable"&&(this.status="open",this.onopen()),this.onsignalingstatechange(e.signalingState)},e.onconnectionstatechange=t=>{let a=e.connectionState;if(!a&&t&&t.target){let n=t.target;a=n.connectionState||n.connectionState_,this._log.info(`pc.connectionState not detected. Using target PC. State=${a}`)}a?this._log.info(`pc.connectionState is "${a}"`):this._log.warn(`onconnectionstatechange detected but state is "${a}"`),this.onpcconnectionstatechange(a),this._onMediaConnectionStateChange(a)},e.onicecandidate=t=>{let{candidate:a}=t;a&&(this._hasIceCandidates=!0,this.onicecandidate(a),this._setupRTCIceTransportListener()),this._log.info(`ICE Candidate: ${JSON.stringify(a)}`)},e.onicegatheringstatechange=()=>{let t=e.iceGatheringState;t==="gathering"?this._startIceGatheringTimeout():t==="complete"&&(this._stopIceGatheringTimeout(),this._hasIceCandidates||this._onIceGatheringFailure(J8),this._hasIceCandidates&&this._hasIceGatheringFailures&&this._startIceGatheringTimeout()),this._log.info(`pc.iceGatheringState is "${e.iceGatheringState}"`),this.onicegatheringstatechange(t)},e.oniceconnectionstatechange=()=>{this._log.info(`pc.iceConnectionState is "${e.iceConnectionState}"`),this.oniceconnectionstatechange(e.iceConnectionState),this._onMediaConnectionStateChange(e.iceConnectionState)}};G.prototype._initializeMediaStream=function(e){return this.status==="open"?!1:this.pstream.status==="disconnected"?(this.onerror({info:{code:31e3,message:"Cannot establish connection. Client is disconnected",twilioError:new Dt.ConnectionDisconnected}}),this.close(),!1):(this.version=this._setupPeerConnection(e),this._setupChannel(),!0)};G.prototype._removeReconnectionListeners=function(){this.pstream&&(this.pstream.removeListener("answer",this._onAnswerOrRinging),this.pstream.removeListener("hangup",this._onHangup))};G.prototype._setupRTCDtlsTransportListener=function(){let e=this.getRTCDtlsTransport();if(!e||e.onstatechange)return;let t=()=>{this._log.info(`dtlsTransportState is "${e.state}"`),this.ondtlstransportstatechange(e.state)};t(),e.onstatechange=t};G.prototype._setupRTCIceTransportListener=function(){let e=this._getRTCIceTransport();!e||e.onselectedcandidatepairchange||(e.onselectedcandidatepairchange=()=>this.onselectedcandidatepairchange(e.getSelectedCandidatePair()))};G.prototype.iceRestart=function(){this._log.info("Attempting to restart ICE..."),this._hasIceCandidates=!1,this.version.createOffer(this.options.maxAverageBitrate,{iceRestart:!0}).then(()=>{this._removeReconnectionListeners(),this._onAnswerOrRinging=e=>{if(this._removeReconnectionListeners(),!e.sdp||this.version.pc.signalingState!=="have-local-offer"){let a=`Invalid state or param during ICE Restart:hasSdp:${!!e.sdp}, signalingState:${this.version.pc.signalingState}`;this._log.warn(a);return}let t=this._maybeSetIceAggressiveNomination(e.sdp);this._answerSdp=t,this.status!=="closed"&&this.version.processAnswer(this.codecPreferences,t,null,a=>{let n=a&&a.message?a.message:a;this._log.error(`Failed to process answer during ICE Restart. Error: ${n}`)})},this._onHangup=()=>{this._log.info("Received hangup during ICE Restart"),this._removeReconnectionListeners()},this.pstream.on("answer",this._onAnswerOrRinging),this.pstream.on("hangup",this._onHangup),this.pstream.reinvite(this.version.getSDP(),this.callSid)}).catch(e=>{let t=e&&e.message?e.message:e;this._log.error(`Failed to createOffer during ICE Restart. Error: ${t}`),this.onfailed(t)})};G.prototype.makeOutgoingCall=function(e,t,a,n,r){if(!this._initializeMediaStream(n))return;let i=this;this.callSid=a;function o(){i.options&&i._setEncodingParameters(i.options.dscp),r(i.version.pc)}function s(c){let f=c.message||c;i.onerror({info:{code:31e3,message:`Error processing answer: ${f}`,twilioError:new Aa.ClientRemoteDescFailed}})}this._onAnswerOrRinging=c=>{if(!c.sdp)return;let f=this._maybeSetIceAggressiveNomination(c.sdp);i._answerSdp=f,i.status!=="closed"&&i.version.processAnswer(this.codecPreferences,f,o,s),i.pstream.removeListener("answer",i._onAnswerOrRinging),i.pstream.removeListener("ringing",i._onAnswerOrRinging)},this.pstream.on("answer",this._onAnswerOrRinging),this.pstream.on("ringing",this._onAnswerOrRinging);function l(){i.status!=="closed"&&(t?i.pstream.reconnect(i.version.getSDP(),i.callSid,t):i.pstream.invite(i.version.getSDP(),i.callSid,e),i._setupRTCDtlsTransportListener())}function u(c){let f=c.message||c;i.onerror({info:{code:31e3,message:`Error creating the offer: ${f}`,twilioError:new Aa.ClientLocalDescFailed}})}this.version.createOffer(this.options.maxAverageBitrate,{audio:!0},l,u)};G.prototype.answerIncomingCall=function(e,t,a,n){if(!this._initializeMediaStream(a))return;t=this._maybeSetIceAggressiveNomination(t),this._answerSdp=t.replace(/^a=setup:actpass$/gm,"a=setup:passive"),this.callSid=e;let r=this;function i(){r.status!=="closed"&&(r.pstream.answer(r.version.getSDP(),e),r.options&&r._setEncodingParameters(r.options.dscp),n(r.version.pc),r._setupRTCDtlsTransportListener())}function o(s){let l=s.message||s;r.onerror({info:{code:31e3,message:`Error creating the answer: ${l}`,twilioError:new Aa.ClientRemoteDescFailed}})}this.version.processSDP(this.options.maxAverageBitrate,this.codecPreferences,t,{audio:!0},i,o)};G.prototype.close=function(){this.version&&this.version.pc&&(this.version.pc.signalingState!=="closed"&&this.version.pc.close(),this.version.pc=null),this.stream&&(this.mute(!1),this._stopStream()),this.stream=null,this._removeReconnectionListeners(),this._stopIceGatheringTimeout(),this._audioHelper._destroyRemoteProcessedStream(),this._audioProcessorEventObserver.removeListener("add",this._onAudioProcessorAdded),this._audioProcessorEventObserver.removeListener("remove",this._onAudioProcessorRemoved),Promise.all(this._removeAudioOutputs()).catch(()=>{}),this._mediaStreamSource&&this._mediaStreamSource.disconnect(),this._inputAnalyser&&this._inputAnalyser.disconnect(),this._outputAnalyser&&this._outputAnalyser.disconnect(),this._inputAnalyser2&&this._inputAnalyser2.disconnect(),this._outputAnalyser2&&this._outputAnalyser2.disconnect(),this.status="closed",this.onclose()};G.prototype.reject=function(e){this.callSid=e};G.prototype.ignore=function(e){this.callSid=e};G.prototype.mute=function(e){this.isMuted=e,this.stream&&(this._sender&&this._sender.track?this._sender.track.enabled=!e:(typeof this.stream.getAudioTracks=="function"?this.stream.getAudioTracks():this.stream.audioTracks).forEach(a=>{a.enabled=!e}))};G.prototype.getOrCreateDTMFSender=function(){if(this._dtmfSender||this._dtmfSenderUnsupported)return this._dtmfSender||null;let t=this,a=this.version.pc;if(!a)return this._log.warn("No RTCPeerConnection available to call createDTMFSender on"),null;if(typeof a.getSenders=="function"&&(typeof RTCDTMFSender=="function"||typeof RTCDtmfSender=="function")){let n=a.getSenders().find(r=>r.dtmf);if(n)return this._log.info("Using RTCRtpSender#dtmf"),this._dtmfSender=n.dtmf,this._dtmfSender}if(typeof a.createDTMFSender=="function"&&typeof a.getLocalStreams=="function"){let n=a.getLocalStreams().map(r=>{let i=t._getAudioTracks(r);return i&&i[0]})[0];return n?(this._log.info("Creating RTCDTMFSender"),this._dtmfSender=a.createDTMFSender(n),this._dtmfSender):(this._log.warn("No local audio MediaStreamTrack available on the RTCPeerConnection to pass to createDTMFSender"),null)}return this._log.info("RTCPeerConnection does not support RTCDTMFSender"),this._dtmfSenderUnsupported=!0,null};G.prototype.getRTCDtlsTransport=function(){let t=this.version&&this.version.pc&&typeof this.version.pc.getSenders=="function"&&this.version.pc.getSenders()[0];return t&&t.transport||null};G.prototype._canStopMediaStreamTrack=()=>typeof MediaStreamTrack.prototype.stop=="function";G.prototype._getAudioTracks=e=>typeof e.getAudioTracks=="function"?e.getAudioTracks():e.audioTracks;G.prototype._getRTCIceTransport=function(){let t=this.getRTCDtlsTransport();return t&&t.iceTransport||null};G.protocol=na.test()?new na:null;G.prototype._handleAudioProcessorEvent=function(e,t){if(!e||!this._remoteStream)return;let a=null;this._masterAudio?(this._log.info("Setting audio source for master audio."),a=this._masterAudio):(this._log.info("No master audio. Setting audio source for default audio output."),a=this.outputs.get("default").audio),fg(a,this._remoteStream,this._audioHelper).then(()=>{let n=t?"Successfully updated audio source with processed stream":"Successfully reverted audio source to original stream";this._log.info(n),a.paused&&(this._log.info("Resuming audio playback"),a.play())}).catch(()=>{let n=t?"Failed to update audio source":"Failed to revert audio source";this._log.error(n)})};G.enabled=na.test()});function OU(){return na.test()}function BU(){return typeof RTCIceGatherer<"u"?"ORTC":"WebRTC"}var FU=m(()=>{"use strict";Sw();cg()});function UU(e,t){return t=t||{},t.util=t.util||lf,t.navigator=t.navigator||(typeof navigator<"u"?navigator:null),new Promise((a,n)=>{if(!t.navigator)throw new Ae("getUserMedia is not supported");switch("function"){case typeof(t.navigator.mediaDevices&&t.navigator.mediaDevices.getUserMedia):return a(t.navigator.mediaDevices.getUserMedia(e));case typeof t.navigator.webkitGetUserMedia:return t.navigator.webkitGetUserMedia(e,a,n);case typeof t.navigator.mozGetUserMedia:return t.navigator.mozGetUserMedia(e,a,n);case typeof t.navigator.getUserMedia:return t.navigator.getUserMedia(e,a,n);default:throw new Ae("getUserMedia is not supported")}}).catch(a=>{throw t.util.isFirefox()&&a.name==="NotReadableError"?new Ae(`Firefox does not currently support opening multiple audio input trackssimultaneously, even across different tabs.
|
|
59
|
+
Related Bugzilla thread: https://bugzilla.mozilla.org/show_bug.cgi?id=1299324`):a})}var zU=m(()=>{"use strict";ta();Rn()});function n7(){if(typeof window!="object")throw new Ae("This platform is not supported.");let{crypto:e}=window;if(typeof e!="object")throw new Ae("The `crypto` module is not available on this platform.");if(typeof e.getRandomValues!="function")throw new Ae("The function `crypto.getRandomValues` is not available on this platform.");if(typeof window.Uint8Array!="function")throw new Ae("The `Uint8Array` module is not available on this platform.");return e.getRandomValues(new window.Uint8Array(16)).reduce((t,a)=>`${t}${a.toString(16).padStart(2,"0")}`,"")}function df(){return`KX${n7()}`}var bw=m(()=>{"use strict";ta()});var dg,VU=m(()=>{"use strict";dg=class{constructor(){this._promise=new Promise((t,a)=>{this._resolve=t,this._reject=a})}get promise(){return this._promise}reject(t){this._reject(t)}resolve(t){this._resolve(t)}}});var pg,NU=m(()=>{"use strict";Sl();VU();pg=class{constructor(){this._operations=[]}enqueue(t){let a=!!this._operations.length,n=new dg;return this._operations.push({deferred:n,callback:t}),a||this._processQueue(),n.promise}_processQueue(){return xt(this,void 0,void 0,function*(){for(;this._operations.length;){let{deferred:t,callback:a}=this._operations[0],n,r,i;try{n=yield a(),i=!0}catch(o){r=o}this._operations.shift(),i?t.resolve(n):t.reject(r)}})}}});var mg,HU=m(()=>{"use strict";mg=class{get reject(){return this._reject}get resolve(){return this._resolve}constructor(){this.promise=new Promise((t,a)=>{this._resolve=t,this._reject=a})}}});var qU,hg,jU=m(()=>{"use strict";qU=H(Ja()),hg=class{constructor(){this._eventEmitter=new qU.EventEmitter}addEventListener(t,a){return this._eventEmitter.addListener(t,a)}dispatchEvent(t,...a){return this._eventEmitter.emit(t,...a)}removeEventListener(t,a){return this._eventEmitter.removeListener(t,a)}}});function r7(e,t,a){return xt(this,void 0,void 0,function*(){let n=new t;n.open("GET",a,!0),n.responseType="arraybuffer";let r=yield new Promise(i=>{n.addEventListener("load",i),n.send()});try{return e.decodeAudioData(r.target.response)}catch{return new Promise(o=>{e.decodeAudioData(r.target.response,o)})}})}var pf,GU=m(()=>{"use strict";Sl();HU();jU();pf=class extends hg{get destination(){return this._destination}get loop(){return this._loop}set loop(t){let a=this;function n(){a._audioNode.removeEventListener("ended",n),a.pause()}!t&&this.loop&&!this.paused&&this._audioNode.addEventListener("ended",n),this._loop=t}get muted(){return this._gainNode.gain.value===0}set muted(t){this._gainNode.gain.value=t?0:1}get paused(){return this._audioNode===null}get src(){return this._src}set src(t){this._load(t)}get srcObject(){return this._audioElement.srcObject}set srcObject(t){this._audioElement.srcObject=t}get sinkId(){return this._sinkId}constructor(t,a={},n={}){super(),this._audioNode=null,this._loop=!1,this._pendingPlayDeferreds=[],this._sinkId="default",this._src="",typeof a!="string"&&(n=a),this._audioContext=t,this._audioElement=new(n.AudioFactory||Audio),this._bufferPromise=this._createPlayDeferred().promise,this._destination=this._audioContext.destination,this._gainNode=this._audioContext.createGain(),this._gainNode.connect(this._destination),this._XMLHttpRequest=n.XMLHttpRequestFactory||XMLHttpRequest,this.addEventListener("canplaythrough",()=>{this._resolvePlayDeferreds()}),typeof a=="string"&&(this.src=a)}load(){this._load(this._src)}pause(){this.paused||(this._audioElement.pause(),this._audioNode.stop(),this._audioNode.disconnect(this._gainNode),this._audioNode=null,this._rejectPlayDeferreds(new Error("The play() request was interrupted by a call to pause().")))}play(){return xt(this,void 0,void 0,function*(){if(!this.paused){if(yield this._bufferPromise,!this.paused)return;throw new Error("The play() request was interrupted by a call to pause().")}this._audioNode=this._audioContext.createBufferSource(),this._audioNode.loop=this.loop,this._audioNode.addEventListener("ended",()=>{this._audioNode&&this._audioNode.loop||this.dispatchEvent("ended")});let t=yield this._bufferPromise;if(this.paused)throw new Error("The play() request was interrupted by a call to pause().");if(this._audioNode.buffer=t,this._audioNode.connect(this._gainNode),this._audioNode.start(),this._audioElement.srcObject)return this._audioElement.play()})}setSinkId(t){return xt(this,void 0,void 0,function*(){if(typeof this._audioElement.setSinkId!="function")throw new Error("This browser does not support setSinkId.");if(t!==this.sinkId){if(t==="default"){this.paused||this._gainNode.disconnect(this._destination),this._audioElement.srcObject=null,this._destination=this._audioContext.destination,this._gainNode.connect(this._destination),this._sinkId=t;return}yield this._audioElement.setSinkId(t),!this._audioElement.srcObject&&(this._gainNode.disconnect(this._audioContext.destination),this._destination=this._audioContext.createMediaStreamDestination(),this._audioElement.srcObject=this._destination.stream,this._sinkId=t,this._gainNode.connect(this._destination))}})}_createPlayDeferred(){let t=new mg;return this._pendingPlayDeferreds.push(t),t}_load(t){this._src&&this._src!==t&&this.pause(),this._src=t,this._bufferPromise=new Promise((a,n)=>xt(this,void 0,void 0,function*(){if(!t)return this._createPlayDeferred().promise;let r=yield r7(this._audioContext,this._XMLHttpRequest,t);this.dispatchEvent("canplaythrough"),a(r)}))}_rejectPlayDeferreds(t){let a=this._pendingPlayDeferreds;a.splice(0,a.length).forEach(({reject:n})=>n(t))}_resolvePlayDeferreds(t){let a=this._pendingPlayDeferreds;a.splice(0,a.length).forEach(({resolve:n})=>n(t))}}});function Pn(e,t,a){if(!(this instanceof Pn))return new Pn(e,t,a);if(!e||!t)throw new ae("name and url are required arguments");a=Object.assign({AudioFactory:typeof Audio<"u"?Audio:null,maxDuration:0,shouldLoop:!1},a),a.AudioPlayer=a.audioContext?pf.bind(pf,a.audioContext):a.AudioFactory,Object.defineProperties(this,{_Audio:{value:a.AudioPlayer},_activeEls:{value:new Map},_isSinkSupported:{value:a.AudioFactory!==null&&typeof a.AudioFactory.prototype.setSinkId=="function"},_maxDuration:{value:a.maxDuration},_maxDurationTimeout:{value:null,writable:!0},_operations:{value:new pg},_playPromise:{value:null,writable:!0},_shouldLoop:{value:a.shouldLoop},_sinkIds:{value:["default"]},isPlaying:{enumerable:!0,get(){return!!this._playPromise}},name:{enumerable:!0,value:e},url:{enumerable:!0,value:t}}),this._Audio&&this._play(!0,!1)}function XU(e){e&&(e.pause(),e.src="",e.srcObject=null,e.load())}var WU=m(()=>{"use strict";NU();GU();ta();Pn.prototype._playAudioElement=function(t,a,n){let r=this._activeEls.get(t);if(!r)throw new ae(`sinkId: "${t}" doesn't have an audio element`);return r.muted=!!a,r.loop=!!n,r.play().then(()=>r).catch(i=>{throw XU(r),this._activeEls.delete(t),i})};Pn.prototype._play=function(t,a){this.isPlaying&&this._stop(),this._maxDuration>0&&(this._maxDurationTimeout=setTimeout(this._stop.bind(this),this._maxDuration)),a=typeof a=="boolean"?a:this._shouldLoop;let n=this;return this._playPromise=Promise.all(this._sinkIds.map(function(o){if(!n._Audio)return Promise.resolve();let s=n._activeEls.get(o);return s?n._playAudioElement(o,t,a):(s=new n._Audio(n.url),typeof s.setAttribute=="function"&&s.setAttribute("crossorigin","anonymous"),new Promise(l=>{s.addEventListener("canplaythrough",l)}).then(()=>(n._isSinkSupported?s.setSinkId(o):Promise.resolve()).then(function(){return n._activeEls.set(o,s),n._playPromise?n._playAudioElement(o,t,a):Promise.resolve()})))}))};Pn.prototype._stop=function(){this._activeEls.forEach((t,a)=>{this._sinkIds.includes(a)?(t.pause(),t.currentTime=0):(XU(t),this._activeEls.delete(a))}),clearTimeout(this._maxDurationTimeout),this._playPromise=null,this._maxDurationTimeout=null};Pn.prototype.setSinkIds=function(t){this._isSinkSupported&&(t=t.forEach?t:[t],[].splice.apply(this._sinkIds,[0,this._sinkIds.length].concat(t)))};Pn.prototype.stop=function(){this._operations.enqueue(()=>(this._stop(),Promise.resolve()))};Pn.prototype.play=function(){return this._operations.enqueue(()=>this._play())}});var Cw,ww,i7,o7,s7,l7,Ye,cf=m(()=>{"use strict";Sl();Cw=H(Ja()),ww=H(ow());aU();rU();sg();Mo();iU();ta();lU();Ea();mw();wU();kU();FU();zU();bw();WU();Rn();Cr();i7=3e4,o7=2e3,s7="twilio-js-sdk",l7='Parameter "token" must be of type "string".',Ye=class e extends Cw.EventEmitter{static get audioContext(){return e._audioContext}static get extension(){let t=typeof document<"u"?document.createElement("audio"):{canPlayType:!1},a;try{a=t.canPlayType&&!!t.canPlayType("audio/mpeg").replace(/no/,"")}catch{a=!1}let n;try{n=t.canPlayType&&!!t.canPlayType("audio/ogg;codecs='vorbis'").replace(/no/,"")}catch{n=!1}return n&&!a?"ogg":"mp3"}static get isSupported(){return OU()}static get packageName(){return Jh}static runPreflight(t,a){return new Oo(t,Object.assign({audioContext:e._getOrCreateAudioContext()},a))}static toString(){return"[Twilio.Device class]"}static get version(){return wr}static _getOrCreateAudioContext(){return e._audioContext||(typeof AudioContext<"u"?e._audioContext=new AudioContext:typeof webkitAudioContext<"u"&&(e._audioContext=new webkitAudioContext)),e._audioContext}constructor(t,a={}){if(super(),this._activeCall=null,this._audio=null,this._audioProcessorEventObserver=null,this._callInputStream=null,this._calls=[],this._callSinkIds=["default"],this._chunderURIs=[],this._defaultOptions={allowIncomingWhileBusy:!1,closeProtection:!1,codecPreferences:[Ut.Codec.PCMU,Ut.Codec.Opus],dscp:!0,enableImprovedSignalingErrorPrecision:!1,forceAggressiveIceNomination:!1,logLevel:ww.levels.ERROR,maxCallSignalingTimeoutMs:0,preflight:!1,sounds:{},tokenRefreshMs:1e4,voiceEventSidGenerator:df},this._edge=null,this._home=null,this._identity=null,this._log=new Pe("Device"),this._makeCallPromise=null,this._options={},this._preferredURI=null,this._publisher=null,this._region=null,this._regTimer=null,this._shouldReRegister=!1,this._soundcache=new Map,this._state=e.State.Unregistered,this._stateEventMapping={[e.State.Destroyed]:e.EventName.Destroyed,[e.State.Unregistered]:e.EventName.Unregistered,[e.State.Registering]:e.EventName.Registering,[e.State.Registered]:e.EventName.Registered},this._stream=null,this._streamConnectedPromise=null,this._tokenWillExpireTimeout=null,this._createDefaultPayload=i=>{let o={aggressive_nomination:this._options.forceAggressiveIceNomination,browser_extension:this._isBrowserExtension,dscp:!!this._options.dscp,ice_restart_enabled:!0,platform:BU(),sdk_version:wr};function s(l,u){u&&(o[l]=u)}if(i){let l=i.parameters.CallSid;s("call_sid",/^TJ/.test(l)?void 0:l),s("temp_call_sid",i.outboundConnectionId),s("audio_codec",i.codec),o.direction=i.direction}return s("gateway",this._stream&&this._stream.gateway),s("region",this._stream&&this._stream.region),o},this._onSignalingClose=()=>{this._stream=null,this._streamConnectedPromise=null},this._onSignalingConnected=i=>{var o;let s=_U(i.region);if(this._edge=i.edge||IU[s]||i.region,this._region=s||i.region,this._home=i.home,(o=this._publisher)===null||o===void 0||o.setHost(hw(i.home)),i.token&&(this._identity=i.token.identity,typeof i.token.ttl=="number"&&typeof this._options.tokenRefreshMs=="number")){let u=i.token.ttl*1e3,c=Math.max(0,u-this._options.tokenRefreshMs);this._tokenWillExpireTimeout=setTimeout(()=>{this._log.debug("#tokenWillExpire"),this.emit("tokenWillExpire",this),this._tokenWillExpireTimeout&&(clearTimeout(this._tokenWillExpireTimeout),this._tokenWillExpireTimeout=null)},c)}let l=this._getChunderws()||xw(this._edge);if(l.length>0){let[u]=l;this._preferredURI=gw(u)}else this._log.warn("Could not parse a preferred URI from the stream#connected event.");this._shouldReRegister&&this.register()},this._onSignalingError=i=>{if(typeof i!="object"){this._log.warn("Invalid signaling error payload",i);return}let{error:o,callsid:s,voiceeventsid:l}=i;if(typeof o!="object"||l){this._log.warn("Ignoring signaling error payload",{originalError:o,voiceeventsid:l});return}let u=typeof s=="string"&&this._findCall(s)||void 0,{code:c,message:f}=o,{twilioError:d}=o;if(typeof c=="number")if(c===31201)d=new ut.AuthenticationFailed(o);else if(c===31204)d=new ut.AccessTokenInvalid(o);else if(c===31205)this._stopRegistrationTimer(),d=new ut.AccessTokenExpired(o);else{let p=af(!!this._options.enableImprovedSignalingErrorPrecision,c);typeof p<"u"&&(d=new p(o))}d||(this._log.error("Unknown signaling error: ",o),d=new ct.UnknownError(f,o)),this._log.error("Received error: ",d),this._log.debug("#error",o),this.emit(e.EventName.Error,d,u)},this._onSignalingInvite=i=>xt(this,void 0,void 0,function*(){var o;let s=!!this._activeCall;if(s&&!this._options.allowIncomingWhileBusy){this._log.info("Device busy; ignoring incoming invite");return}if(!i.callsid||!i.sdp){this._log.debug("#error",i),this.emit(e.EventName.Error,new br.BadRequest("Malformed invite from gateway"));return}let l=i.parameters||{};l.CallSid=l.CallSid||i.callsid;let u=Object.assign({},uw(l.Params));this._makeCallPromise=this._makeCall(u,{callParameters:l,enableImprovedSignalingErrorPrecision:!!this._options.enableImprovedSignalingErrorPrecision,offerSdp:i.sdp,reconnectToken:i.reconnect,voiceEventSidGenerator:this._options.voiceEventSidGenerator});let c;try{c=yield this._makeCallPromise}finally{this._makeCallPromise=null}this._calls.push(c),c.once("accept",()=>{this._soundcache.get(e.SoundName.Incoming).stop(),this._publishNetworkChange()});let f=!((o=this._audio)===null||o===void 0)&&o.incoming()&&!s?()=>this._soundcache.get(e.SoundName.Incoming).play():()=>Promise.resolve();this._showIncomingCall(c,f)}),this._onSignalingOffline=()=>{this._log.info("Stream is offline"),this._edge=null,this._region=null,this._shouldReRegister=this.state!==e.State.Unregistered,this._setState(e.State.Unregistered)},this._onSignalingReady=()=>{this._log.info("Stream is ready"),this._setState(e.State.Registered)},this._publishNetworkChange=()=>{this._activeCall&&this._networkInformation&&this._publisher.info("network-information","network-change",{connection_type:this._networkInformation.type,downlink:this._networkInformation.downlink,downlinkMax:this._networkInformation.downlinkMax,effective_type:this._networkInformation.effectiveType,rtt:this._networkInformation.rtt},this._activeCall)},this._updateInputStream=i=>{let o=this._activeCall;return o&&!i?Promise.reject(new Wt("Cannot unset input device while a call is in progress.")):(this._callInputStream=i,o?o._setInputTracksFromStream(i):Promise.resolve())},this._updateSinkIds=(i,o)=>(i==="ringtone"?this._updateRingtoneSinkIds(o):this._updateSpeakerSinkIds(o)).then(()=>{this._publisher.info("audio",`${i}-devices-set`,{audio_device_ids:o},this._activeCall)},l=>{throw this._publisher.error("audio",`${i}-devices-set-failed`,{audio_device_ids:o,message:l.message},this._activeCall),l}),this._setupLoglevel(a.logLevel),this._logOptions("constructor",a),this.updateToken(t),bl())throw new Ae("Microsoft Edge Legacy (https://support.microsoft.com/en-us/help/4533505/what-is-microsoft-edge-legacy) is deprecated and will not be able to connect to Twilio to make or receive calls after September 1st, 2020. Please see this documentation for a list of supported browsers https://www.twilio.com/docs/voice/client/javascript#supported-browsers");if(!e.isSupported&&a.ignoreBrowserSupport)throw window&&window.location&&window.location.protocol==="http:"?new Ae("twilio.js wasn't able to find WebRTC browser support. This is most likely because this page is served over http rather than https, which does not support WebRTC in many browsers. Please load this page over https and try again."):new Ae("twilio.js 1.3+ SDKs require WebRTC browser support. For more information, see <https://www.twilio.com/docs/api/client/twilio-js>. If you have any questions about this announcement, please contact Twilio Support at <help@twilio.com>.");let n=globalThis,r=n.msBrowser||n.browser||n.chrome;if(this._isBrowserExtension=!!r&&!!r.runtime&&!!r.runtime.id||!!n.safari&&!!n.safari.extension,this._isBrowserExtension&&this._log.info("Running as browser extension."),navigator){let i=navigator;this._networkInformation=i.connection||i.mozConnection||i.webkitConnection}this._networkInformation&&typeof this._networkInformation.addEventListener=="function"&&this._networkInformation.addEventListener("change",this._publishNetworkChange),e._getOrCreateAudioContext(),e._audioContext&&(e._dialtonePlayer||(e._dialtonePlayer=new ig(e._audioContext))),this._boundDestroy=this.destroy.bind(this),this._boundConfirmClose=this._confirmClose.bind(this),typeof window<"u"&&window.addEventListener&&window.addEventListener("pagehide",this._boundDestroy),this.updateOptions(a)}get audio(){return this._audio}connect(){return xt(this,arguments,void 0,function*(t={}){if(this._log.debug(".connect",JSON.stringify(t)),this._throwIfDestroyed(),this._activeCall||this._makeCallPromise)throw new Wt("A Call is already active");let a,n,r;if(t.connectToken){try{let u=JSON.parse(decodeURIComponent(atob(t.connectToken)));a=u.customParameters,n=u.parameters,r=u.signalingReconnectToken}catch{throw new ae("Cannot parse connectToken")}if(!n||!n.CallSid||!r)throw new ae("Invalid connectToken")}let i=!1,o={},s={enableImprovedSignalingErrorPrecision:!!this._options.enableImprovedSignalingErrorPrecision,rtcConfiguration:t.rtcConfiguration,voiceEventSidGenerator:this._options.voiceEventSidGenerator};r&&n?(i=!0,s.callParameters=n,s.reconnectCallSid=n.CallSid,s.reconnectToken=r,o=a||o):o=t.params||o;let l;this._makeCallPromise=this._makeCall(o,s,i);try{l=this._activeCall=yield this._makeCallPromise}finally{this._makeCallPromise=null}return this._calls.splice(0).forEach(u=>u.ignore()),this._soundcache.get(e.SoundName.Incoming).stop(),l.accept({rtcConstraints:t.rtcConstraints}),this._publishNetworkChange(),l})}get calls(){return this._calls}destroy(){var t;this._log.debug(".destroy"),this._log.debug("Rejecting any incoming calls"),this._calls.slice(0).forEach(n=>n.reject()),this.disconnectAll(),this._stopRegistrationTimer(),this._destroyStream(),this._destroyAudioHelper(),(t=this._audioProcessorEventObserver)===null||t===void 0||t.destroy(),this._destroyPublisher(),this._networkInformation&&typeof this._networkInformation.removeEventListener=="function"&&this._networkInformation.removeEventListener("change",this._publishNetworkChange),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("beforeunload",this._boundConfirmClose),window.removeEventListener("pagehide",this._boundDestroy)),this._setState(e.State.Destroyed),Cw.EventEmitter.prototype.removeAllListeners.call(this)}disconnectAll(){this._log.debug(".disconnectAll"),this._calls.splice(0).forEach(a=>a.disconnect()),this._activeCall&&this._activeCall.disconnect()}get edge(){return this._edge}get home(){return this._home}get identity(){return this._identity}get isBusy(){return!!this._activeCall}register(){return xt(this,void 0,void 0,function*(){if(this._log.debug(".register"),this.state!==e.State.Unregistered)throw new Wt(`Attempt to register when device is in state "${this.state}". Must be "${e.State.Unregistered}".`);this._shouldReRegister=!1,this._setState(e.State.Registering),yield this._streamConnectedPromise||this._setupStream(),yield this._sendPresence(!0),yield ng(this,e.State.Registered,e.State.Unregistered)})}get state(){return this._state}get token(){return this._token}toString(){return"[Twilio.Device instance]"}unregister(){return xt(this,void 0,void 0,function*(){if(this._log.debug(".unregister"),this.state!==e.State.Registered)throw new Wt(`Attempt to unregister when device is in state "${this.state}". Must be "${e.State.Registered}".`);this._shouldReRegister=!1;let t=yield this._streamConnectedPromise,a=new Promise(n=>{t.on("offline",n)});yield this._sendPresence(!1),yield a})}updateOptions(t={}){if(this._logOptions("updateOptions",t),this.state===e.State.Destroyed)throw new Wt(`Attempt to "updateOptions" when device is in state "${this.state}".`);this._options=Object.assign(Object.assign(Object.assign({},this._defaultOptions),this._options),t);let a=new Set(this._chunderURIs),n=this._chunderURIs=(this._getChunderws()||xw(this._options.edge)).map(gw),r=a.size!==n.length;if(!r){for(let i of n)if(!a.has(i)){r=!0;break}}if(this.isBusy&&r)throw new Wt("Cannot change Edge while on an active Call");this._setupLoglevel(this._options.logLevel);for(let i of Object.keys(e._defaultSounds)){let o=e._defaultSounds[i],s=`${nf}/${o.filename}.${e.extension}?cache=${wr}`,l=this._options.sounds&&this._options.sounds[i]||s,u=new(this._options.Sound||Pn)(i,l,{audioContext:this._options.disableAudioContextSounds?null:e.audioContext,maxDuration:o.maxDuration,shouldLoop:o.shouldLoop});this._soundcache.set(i,u)}this._setupAudioHelper(),this._setupPublisher(),r&&this._streamConnectedPromise&&this._setupStream(),typeof window<"u"&&typeof window.addEventListener=="function"&&this._options.closeProtection&&(window.removeEventListener("beforeunload",this._boundConfirmClose),window.addEventListener("beforeunload",this._boundConfirmClose))}updateToken(t){if(this._log.debug(".updateToken"),this.state===e.State.Destroyed)throw new Wt(`Attempt to "updateToken" when device is in state "${this.state}".`);if(typeof t!="string")throw new ae(l7);this._token=t,this._stream&&this._stream.setToken(this._token),this._publisher&&this._publisher.setToken(this._token)}_confirmClose(t){if(!this._activeCall)return"";let a=this._options.closeProtection||!1,n=typeof a!="string"?"A call is currently in-progress. Leaving or reloading this page will end the call.":a;return(t||window.event).returnValue=n,n}_destroyAudioHelper(){this._audio&&(this._audio._destroy(),this._audio=null)}_destroyPublisher(){this._publisher&&(this._publisher=null)}_destroyStream(){this._stream&&(this._stream.removeListener("close",this._onSignalingClose),this._stream.removeListener("connected",this._onSignalingConnected),this._stream.removeListener("error",this._onSignalingError),this._stream.removeListener("invite",this._onSignalingInvite),this._stream.removeListener("offline",this._onSignalingOffline),this._stream.removeListener("ready",this._onSignalingReady),this._stream.destroy(),this._stream=null),this._onSignalingOffline(),this._streamConnectedPromise=null}_findCall(t){return this._calls.find(a=>a.parameters.CallSid===t||a.outboundConnectionId===t)||null}_getChunderws(){return typeof this._options.chunderw=="string"?[this._options.chunderw]:Array.isArray(this._options.chunderw)?this._options.chunderw:null}_logOptions(t,a={}){let n=["allowIncomingWhileBusy","appName","appVersion","closeProtection","codecPreferences","disableAudioContextSounds","dscp","edge","enableImprovedSignalingErrorPrecision","forceAggressiveIceNomination","logLevel","maxAverageBitrate","maxCallSignalingTimeoutMs","sounds","tokenRefreshMs"],r=["RTCPeerConnection","enumerateDevices","getUserMedia","MediaStream"];if(typeof a=="object"){let i=Object.assign({},a);Object.keys(i).forEach(o=>{!n.includes(o)&&!r.includes(o)&&delete i[o],r.includes(o)&&(i[o]=!0)}),this._log.debug(`.${t}`,JSON.stringify(i))}}_makeCall(t,a){return xt(this,arguments,void 0,function*(n,r,i=!1){var o;let s=(o=this._audio)===null||o===void 0?void 0:o._getInputDevicePromise();s&&(this._log.debug("inputDevicePromise detected, waiting..."),yield s,this._log.debug("inputDevicePromise resolved"));let l={audioHelper:this._audio,onIgnore:()=>{this._soundcache.get(e.SoundName.Incoming).stop()},pstream:yield this._streamConnectedPromise||this._setupStream(),publisher:this._publisher,soundcache:this._soundcache};r=Object.assign({MediaStream:this._options.MediaStream,RTCPeerConnection:this._options.RTCPeerConnection,beforeAccept:f=>{!this._activeCall||this._activeCall===f||(this._activeCall.disconnect(),this._removeCall(this._activeCall))},codecPreferences:this._options.codecPreferences,customSounds:this._options.sounds,dialtonePlayer:e._dialtonePlayer,dscp:this._options.dscp,forceAggressiveIceNomination:this._options.forceAggressiveIceNomination,getInputStream:()=>this._options.fileInputStream||this._callInputStream,getSinkIds:()=>this._callSinkIds,maxAverageBitrate:this._options.maxAverageBitrate,preflight:this._options.preflight,rtcConstraints:this._options.rtcConstraints,shouldPlayDisconnect:()=>{var f;return(f=this._audio)===null||f===void 0?void 0:f.disconnect()},twimlParams:n,voiceEventSidGenerator:this._options.voiceEventSidGenerator},r);let u=()=>{if(!this._stream){this._log.warn("UnsetPreferredUri called without a stream");return}this._activeCall===null&&this._calls.length===0&&this._stream.updatePreferredURI(null)},c=new(this._options.Call||Ut)(l,r);return this._publisher.info("settings","init",{MediaStream:!!this._options.MediaStream,RTCPeerConnection:!!this._options.RTCPeerConnection,enumerateDevices:!!this._options.enumerateDevices,getUserMedia:!!this._options.getUserMedia},c),c.once("accept",()=>{var f,d,p,h,v;this._stream.updatePreferredURI(this._preferredURI),this._removeCall(c),this._activeCall=c,this._audio&&this._audio._maybeStartPollingVolume(),c.direction===Ut.CallDirection.Outgoing&&(!((f=this._audio)===null||f===void 0)&&f.outgoing())&&!i&&this._soundcache.get(e.SoundName.Outgoing).play();let S={edge:this._edge||this._region};this._options.edge&&(S.selected_edge=Array.isArray(this._options.edge)?this._options.edge:[this._options.edge]),this._publisher.info("settings","edge",S,c),!((d=this._audio)===null||d===void 0)&&d.localProcessedStream&&((p=this._audioProcessorEventObserver)===null||p===void 0||p.emit("enabled",!1)),!((h=this._audio)===null||h===void 0)&&h.remoteProcessedStream&&((v=this._audioProcessorEventObserver)===null||v===void 0||v.emit("enabled",!0))}),c.addListener("error",f=>{c.status()==="closed"&&(this._removeCall(c),u()),this._audio&&this._audio._maybeStopPollingVolume(),this._maybeStopIncomingSound()}),c.once("cancel",()=>{this._log.info(`Canceled: ${c.parameters.CallSid}`),this._removeCall(c),u(),this._audio&&this._audio._maybeStopPollingVolume(),this._maybeStopIncomingSound()}),c.once("disconnect",()=>{this._audio&&this._audio._maybeStopPollingVolume(),this._removeCall(c),u(),this._maybeStopIncomingSound()}),c.once("reject",()=>{this._log.info(`Rejected: ${c.parameters.CallSid}`),this._audio&&this._audio._maybeStopPollingVolume(),this._removeCall(c),u(),this._maybeStopIncomingSound()}),c.on("transportClose",()=>{c.status()===Ut.State.Pending&&(this._audio&&this._audio._maybeStopPollingVolume(),this._removeCall(c),this._maybeStopIncomingSound())}),c})}_maybeStopIncomingSound(){this._calls.length||this._soundcache.get(e.SoundName.Incoming).stop()}_removeCall(t){this._activeCall===t&&(this._activeCall=null,this._makeCallPromise=null);for(let a=this._calls.length-1;a>=0;a--)t===this._calls[a]&&this._calls.splice(a,1)}_sendPresence(t){return xt(this,void 0,void 0,function*(){let a=yield this._streamConnectedPromise;a&&(a.register({audio:t}),t?this._startRegistrationTimer():this._stopRegistrationTimer())})}_setState(t){if(t===this.state)return;this._state=t;let a=this._stateEventMapping[t];this._log.debug(`#${a}`),this.emit(a)}_setupAudioHelper(){this._audioProcessorEventObserver||(this._audioProcessorEventObserver=new rg,this._audioProcessorEventObserver.on("event",({name:a,group:n,isRemote:r})=>{this._publisher.info(n,a,{is_remote:r},this._activeCall)}));let t={audioContext:e.audioContext,audioProcessorEventObserver:this._audioProcessorEventObserver,beforeSetInputDevice:()=>this._makeCallPromise?(this._log.debug("beforeSetInputDevice pause detected"),this._makeCallPromise):(this._log.debug("beforeSetInputDevice pause not detected, setting default"),Promise.resolve()),enumerateDevices:this._options.enumerateDevices,getUserMedia:this._options.getUserMedia||UU};if(this._audio){this._log.info("Found existing audio helper; updating options..."),this._audio._updateUserOptions(t);return}this._audio=new(this._options.AudioHelper||tU)(this._updateSinkIds,this._updateInputStream,t),this._audio.on("deviceChange",a=>{let n=this._activeCall,r=a.map(i=>i.deviceId);this._publisher.info("audio","device-change",{lost_active_device_ids:r},n),n&&n._mediaHandler._onInputDevicesChanged()})}_setupLoglevel(t){let a=typeof t=="number"||typeof t=="string"?t:ww.levels.ERROR;this._log.setDefaultLevel(a),this._log.info("Set logger default level to",a)}_setupPublisher(){this._publisher&&(this._log.info("Found existing publisher; destroying..."),this._destroyPublisher());let t={defaultPayload:this._createDefaultPayload,metadata:{app_name:this._options.appName,app_version:this._options.appVersion}};return this._options.eventgw&&(t.host=this._options.eventgw),this._home&&(t.host=hw(this._home)),this._publisher=new(this._options.Publisher||aa)(s7,this.token,t),this._options.publishEvents===!1?this._publisher.disable():this._publisher.on("error",a=>{this._log.warn("Cannot connect to insights.",a)}),this._publisher}_setupStream(){return this._stream&&(this._log.info("Found existing stream; destroying..."),this._destroyStream()),this._log.info("Setting up VSP"),this._stream=new(this._options.PStream||Oe)(this.token,this._chunderURIs,{backoffMaxMs:this._options.backoffMaxMs,maxPreferredDurationMs:this._options.maxCallSignalingTimeoutMs}),this._stream.addListener("close",this._onSignalingClose),this._stream.addListener("connected",this._onSignalingConnected),this._stream.addListener("error",this._onSignalingError),this._stream.addListener("invite",this._onSignalingInvite),this._stream.addListener("offline",this._onSignalingOffline),this._stream.addListener("ready",this._onSignalingReady),this._streamConnectedPromise=ng(this._stream,"connected","close").then(()=>this._stream)}_showIncomingCall(t,a){let n;return Promise.race([a(),new Promise((r,i)=>{n=setTimeout(()=>{let o="Playing incoming ringtone took too long; it might not play. Continuing execution...";i(new Error(o))},o7)})]).catch(r=>{this._log.warn(r.message)}).then(()=>{clearTimeout(n),this._log.debug("#incoming",JSON.stringify({customParameters:t.customParameters,parameters:t.parameters})),this.emit(e.EventName.Incoming,t)})}_startRegistrationTimer(){this._stopRegistrationTimer(),this._regTimer=setTimeout(()=>{this._sendPresence(!0)},i7)}_stopRegistrationTimer(){this._regTimer&&clearTimeout(this._regTimer)}_throwIfDestroyed(){if(this.state===e.State.Destroyed)throw new Wt("Device has been destroyed.")}_updateRingtoneSinkIds(t){return Promise.resolve(this._soundcache.get(e.SoundName.Incoming).setSinkIds(t))}_updateSpeakerSinkIds(t){Array.from(this._soundcache.entries()).filter(n=>n[0]!==e.SoundName.Incoming).forEach(n=>n[1].setSinkIds(t)),this._callSinkIds=t;let a=this._activeCall;return a?a._setSinkIds(t):Promise.resolve()}};Ye._defaultSounds={disconnect:{filename:"disconnect",maxDuration:3e3},dtmf0:{filename:"dtmf-0",maxDuration:1e3},dtmf1:{filename:"dtmf-1",maxDuration:1e3},dtmf2:{filename:"dtmf-2",maxDuration:1e3},dtmf3:{filename:"dtmf-3",maxDuration:1e3},dtmf4:{filename:"dtmf-4",maxDuration:1e3},dtmf5:{filename:"dtmf-5",maxDuration:1e3},dtmf6:{filename:"dtmf-6",maxDuration:1e3},dtmf7:{filename:"dtmf-7",maxDuration:1e3},dtmf8:{filename:"dtmf-8",maxDuration:1e3},dtmf9:{filename:"dtmf-9",maxDuration:1e3},dtmfh:{filename:"dtmf-hash",maxDuration:1e3},dtmfs:{filename:"dtmf-star",maxDuration:1e3},incoming:{filename:"incoming",shouldLoop:!0},outgoing:{filename:"outgoing",maxDuration:3e3}};(function(e){(function(t){t.Error="error",t.Incoming="incoming",t.Destroyed="destroyed",t.Unregistered="unregistered",t.Registering="registering",t.Registered="registered",t.TokenWillExpire="tokenWillExpire"})(e.EventName||(e.EventName={})),(function(t){t.Destroyed="destroyed",t.Unregistered="unregistered",t.Registering="registering",t.Registered="registered"})(e.State||(e.State={})),(function(t){t.Incoming="incoming",t.Outgoing="outgoing",t.Disconnect="disconnect",t.Dtmf0="dtmf0",t.Dtmf1="dtmf1",t.Dtmf2="dtmf2",t.Dtmf3="dtmf3",t.Dtmf4="dtmf4",t.Dtmf5="dtmf5",t.Dtmf6="dtmf6",t.Dtmf7="dtmf7",t.Dtmf8="dtmf8",t.Dtmf9="dtmf9",t.DtmfS="dtmfs",t.DtmfH="dtmfh"})(e.SoundName||(e.SoundName={}))})(Ye||(Ye={}))});var Ll,KU=m(()=>{"use strict";Ll=class{constructor(t,a=!1){this.deleted=!1;let n,r=t.candidate.split("network-cost ");r[1]&&(n=parseInt(r[1],10)),this.candidateType=t.type,this.ip=t.ip||t.address,this.isRemote=a,this.networkCost=n,this.port=t.port,this.priority=t.priority,this.protocol=t.protocol,this.relatedAddress=t.relatedAddress,this.relatedPort=t.relatedPort,this.tcpType=t.tcpType,this.transportId=t.sdpMid}toPayload(){return{candidate_type:this.candidateType,deleted:this.deleted,ip:this.ip,is_remote:this.isRemote,"network-cost":this.networkCost,port:this.port,priority:this.priority,protocol:this.protocol,related_address:this.relatedAddress,related_port:this.relatedPort,tcp_type:this.tcpType,transport_id:this.transportId}}}});function u7(e,t,a){if(typeof e!="number"||typeof t!="number"||typeof a!="number"||!gg(e)||!gg(t)||!gg(a))return null;let n=e+t*2+10,r=0;switch(!0){case n<160:r=94.768-n/40;break;case n<1e3:r=94.768-(n-120)/10;break}return!0===a<=r/2.5?r=Math.max(r-a*2.5,6.52):r=0,1+.035*r+7e-6*r*(r-60)*(100-r)}function gg(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)&&e>=0}var YU,ZU=m(()=>{"use strict";YU={calculate:u7,isNonNegativeNumber:gg}});function g7(e,t){return t.reduce((a,n)=>a+=n>e?1:0,0)}function x7(e,t){return t.reduce((a,n)=>a+=n<e?1:0,0)}function y7(e){if(e.length<=0)return null;let t=e.reduce((r,i)=>r+i,0)/e.length,a=e.map(r=>Math.pow(r-t,2));return Math.sqrt(a.reduce((r,i)=>r+i,0)/a.length)}function v7(e){return e.reduce((t,a)=>[...t,...a],[])}var QU,c7,f7,d7,p7,m7,h7,xg,$U=m(()=>{"use strict";QU=H(Ja());ta();ZU();pw();Rn();c7=5,f7=0,d7=3,p7=1e3,m7=5*1e3,h7={audioInputLevel:{minStandardDeviation:327.67,sampleCount:10},audioOutputLevel:{minStandardDeviation:327.67,sampleCount:10},bytesReceived:{clearCount:2,min:1,raiseCount:3,sampleCount:3},bytesSent:{clearCount:2,min:1,raiseCount:3,sampleCount:3},jitter:{max:30},mos:{min:3},packetsLostFraction:[{max:1},{clearValue:1,maxAverage:3,sampleCount:7}],rtt:{max:400}};xg=class extends QU.EventEmitter{constructor(t){super(),this._activeWarnings=new Map,this._currentStreaks=new Map,this._inputVolumes=[],this._outputVolumes=[],this._sampleBuffer=[],this._supplementalSampleBuffers={audioInputLevel:[],audioOutputLevel:[]},this._warningsEnabled=!0,t=t||{},this._getRTCStats=t.getRTCStats||gU,this._mos=t.Mos||YU,this._peerConnection=t.peerConnection,this._thresholds=Object.assign(Object.assign({},h7),t.thresholds);let a=Object.values(this._thresholds).map(n=>n.sampleCount).filter(n=>!!n);this._maxSampleCount=Math.max(c7,...a),this._peerConnection&&this.enable(this._peerConnection)}addVolumes(t,a){this._inputVolumes.push(t),this._outputVolumes.push(a)}disable(){return this._sampleInterval&&(clearInterval(this._sampleInterval),delete this._sampleInterval),this}disableWarnings(){return this._warningsEnabled&&this._activeWarnings.clear(),this._warningsEnabled=!1,this}enable(t){if(t){if(this._peerConnection&&t!==this._peerConnection)throw new ae("Attempted to replace an existing PeerConnection in StatsMonitor.enable");this._peerConnection=t}if(!this._peerConnection)throw new ae("Can not enable StatsMonitor without a PeerConnection");return this._sampleInterval=this._sampleInterval||setInterval(this._fetchSample.bind(this),p7),this}enableWarnings(){return this._warningsEnabled=!0,this}hasActiveWarning(t,a){let n=`${t}:${a}`;return!!this._activeWarnings.get(n)}_addSample(t){let a=this._sampleBuffer;a.push(t),a.length>this._maxSampleCount&&a.splice(0,a.length-this._maxSampleCount)}_clearWarning(t,a,n){let r=`${t}:${a}`,i=this._activeWarnings.get(r);!i||Date.now()-i.timeRaised<m7||(this._activeWarnings.delete(r),this.emit("warning-cleared",Object.assign(Object.assign({},n),{name:t,threshold:{name:a,value:this._thresholds[t][a]}})))}_createSample(t,a){let n=a&&a.totals.bytesSent||0,r=a&&a.totals.bytesReceived||0,i=a&&a.totals.packetsSent||0,o=a&&a.totals.packetsReceived||0,s=a&&a.totals.packetsLost||0,l=t.bytesSent-n,u=t.bytesReceived-r,c=t.packetsSent-i,f=t.packetsReceived-o,d=t.packetsLost-s,p=f+d,h=p>0?d/p*100:0,v=t.packetsReceived+t.packetsLost,S=v>0?t.packetsLost/v*100:100,g=typeof t.rtt=="number"||!a?t.rtt:a.rtt,x=this._inputVolumes.splice(0);this._supplementalSampleBuffers.audioInputLevel.push(x);let y=this._outputVolumes.splice(0);return this._supplementalSampleBuffers.audioOutputLevel.push(y),{audioInputLevel:Math.round(Ro(x)),audioOutputLevel:Math.round(Ro(y)),bytesReceived:u,bytesSent:l,codecName:t.codecName,jitter:t.jitter,mos:this._mos.calculate(g,t.jitter,a&&h),packetsLost:d,packetsLostFraction:h,packetsReceived:f,packetsSent:c,rtt:g,timestamp:t.timestamp,totals:{bytesReceived:t.bytesReceived,bytesSent:t.bytesSent,packetsLost:t.packetsLost,packetsLostFraction:S,packetsReceived:t.packetsReceived,packetsSent:t.packetsSent}}}_fetchSample(){this._getSample().then(t=>{this._addSample(t),this._raiseWarnings(),this.emit("sample",t)}).catch(t=>{this.disable(),this.emit("error",t)})}_getSample(){return this._getRTCStats(this._peerConnection).then(t=>{let a=null;return this._sampleBuffer.length&&(a=this._sampleBuffer[this._sampleBuffer.length-1]),this._createSample(t,a)})}_raiseWarning(t,a,n){let r=`${t}:${a}`;if(this._activeWarnings.has(r))return;this._activeWarnings.set(r,{timeRaised:Date.now()});let i=this._thresholds[t],o;if(Array.isArray(i)){let s=i.find(l=>a in l);s&&(o=s[a])}else o=this._thresholds[t][a];this.emit("warning",Object.assign(Object.assign({},n),{name:t,threshold:{name:a,value:o}}))}_raiseWarnings(){this._warningsEnabled&&Object.keys(this._thresholds).forEach(t=>this._raiseWarningsForStat(t))}_raiseWarningsForStat(t){(Array.isArray(this._thresholds[t])?this._thresholds[t]:[this._thresholds[t]]).forEach(n=>{let r=this._sampleBuffer,i=n.clearCount||f7,o=n.raiseCount||d7,s=n.sampleCount||this._maxSampleCount,l=r.slice(-s),u=l.map(d=>d[t]);if(u.some(d=>typeof d>"u"||d===null))return;let f;if(typeof n.max=="number"&&(f=g7(n.max,u),f>=o?this._raiseWarning(t,"max",{values:u,samples:l}):f<=i&&this._clearWarning(t,"max",{values:u,samples:l})),typeof n.min=="number"&&(f=x7(n.min,u),f>=o?this._raiseWarning(t,"min",{values:u,samples:l}):f<=i&&this._clearWarning(t,"min",{values:u,samples:l})),typeof n.maxDuration=="number"&&r.length>1){l=r.slice(-2);let d=l[0][t],p=l[1][t],h=this._currentStreaks.get(t)||0,v=d===p?h+1:0;this._currentStreaks.set(t,v),v>=n.maxDuration?this._raiseWarning(t,"maxDuration",{value:v}):v===0&&this._clearWarning(t,"maxDuration",{value:h})}if(typeof n.minStandardDeviation=="number"){let d=this._supplementalSampleBuffers[t];if(!d||d.length<n.sampleCount)return;d.length>n.sampleCount&&d.splice(0,d.length-n.sampleCount);let p=v7(d.slice(-s)),h=y7(p);if(typeof h!="number")return;h<n.minStandardDeviation?this._raiseWarning(t,"minStandardDeviation",{value:h}):this._clearWarning(t,"minStandardDeviation",{value:h})}[["maxAverage",(d,p)=>d>p],["minAverage",(d,p)=>d<p]].forEach(([d,p])=>{if(typeof n[d]=="number"&&u.length>=s){let h=Ro(u);p(h,n[d])?this._raiseWarning(t,d,{values:u,samples:l}):p(h,n.clearValue||n[d])||this._clearWarning(t,d,{values:u,samples:l})}})})}}});function _7(){return"TJSxxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var n5,JU,S7,b7,C7,w7,L7,e5,t5,a5,I7,Ut,sg=m(()=>{"use strict";n5=H(Ja());iw();cf();ta();Ea();Sw();cg();KU();lg();bw();$U();Rn();Mo();Cr();JU={factor:1.1,jitter:.5,max:3e4,min:1},S7=70,b7=500,C7=160,w7=10,L7=5e3,e5={disconnect:!0,info:{code:31003,message:"Connection with Twilio was interrupted.",twilioError:new Aa.ConnectionError}},t5={packetsLostFraction:{max:"packet-loss",maxAverage:"packets-lost-fraction"}},a5={audioInputLevel:"audio-input-level",audioOutputLevel:"audio-output-level",bytesReceived:"bytes-received",bytesSent:"bytes-sent",jitter:"jitter",mos:"mos",rtt:"rtt"},I7={max:"high-",maxAverage:"high-",maxDuration:"constant-",min:"low-",minStandardDeviation:"constant-"},Ut=class e extends n5.EventEmitter{get direction(){return this._direction}get codec(){return this._codec}get connectToken(){let t=this._signalingReconnectToken,a=this.parameters&&this.parameters.CallSid?this.parameters.CallSid:void 0;if(!t||!a)return;let n=this.customParameters&&typeof this.customParameters.keys=="function"?Array.from(this.customParameters.keys()).reduce((i,o)=>(i[o]=this.customParameters.get(o),i),{}):{},r=this.parameters||{};return btoa(encodeURIComponent(JSON.stringify({customParameters:n,parameters:r,signalingReconnectToken:t})))}constructor(t,a){super(),this.parameters={},this._inputVolumeStreak=0,this._isAnswered=!1,this._isCancelled=!1,this._isRejected=!1,this._latestInputVolume=0,this._latestOutputVolume=0,this._log=new Pe("Call"),this._mediaStatus=e.State.Pending,this._messages=new Map,this._metricsSamples=[],this._options={MediaHandler:G,MediaStream:null,enableImprovedSignalingErrorPrecision:!1,offerSdp:null,shouldPlayDisconnect:()=>!0,voiceEventSidGenerator:df},this._outputVolumeStreak=0,this._shouldSendHangup=!0,this._signalingStatus=e.State.Pending,this._soundcache=new Map,this._status=e.State.Pending,this._wasConnected=!1,this.toString=()=>"[Twilio.Call instance]",this._emitWarning=(o,s,l,u,c,f)=>{let p=`${o}warning${c?"-cleared":"-raised"}`;if(s==="constant-audio-input-level"&&this.isMuted())return;let h=c?"info":"warning";s==="constant-audio-output-level"&&(h="info");let v={threshold:l};if(u&&(u instanceof Array?v.values=u.map(S=>typeof S=="number"?Math.round(S*100)/100:u):v.value=u),this._publisher.post(h,p,s,{data:v},this),s!=="constant-audio-output-level"){let S=c?"warning-cleared":"warning";this._log.debug(`#${S}`,s),this.emit(S,s,f&&!c?f:null)}},this._onAck=o=>{let{acktype:s,callsid:l,voiceeventsid:u}=o;if(this.parameters.CallSid!==l){this._log.warn(`Received ack from a different callsid: ${l}`);return}s==="message"&&this._onMessageSent(u)},this._onAnswer=o=>{typeof o.reconnect=="string"&&(this._signalingReconnectToken=o.reconnect),!(this._isAnswered&&this._status!==e.State.Reconnecting)&&(this._setCallSid(o),this._isAnswered=!0,this._maybeTransitionToOpen())},this._onCancel=o=>{let s=o.callsid;this.parameters.CallSid===s&&(this._isCancelled=!0,this._publisher.info("connection","cancel",null,this),this._cleanupEventListeners(),this._mediaHandler.close(),this._status=e.State.Closed,this._log.debug("#cancel"),this.emit("cancel"),this._pstream.removeListener("cancel",this._onCancel))},this._onConnected=()=>{this._log.info("Received connected from pstream"),this._signalingReconnectToken&&this._mediaHandler.version&&this._pstream.reconnect(this._mediaHandler.version.getSDP(),this.parameters.CallSid,this._signalingReconnectToken)},this._onHangup=o=>{if(this.status()!==e.State.Closed){if(o.callsid&&(this.parameters.CallSid||this.outboundConnectionId)){if(o.callsid!==this.parameters.CallSid&&o.callsid!==this.outboundConnectionId)return}else if(o.callsid)return;if(this._log.info("Received HANGUP from gateway"),o.error){let s=o.error.code,l=af(this._options.enableImprovedSignalingErrorPrecision,s),u=typeof l<"u"?new l(o.error.message):new ct.ConnectionError("Error sent from gateway in HANGUP",o.error);this._log.error("Received an error from the gateway:",u),this._log.debug("#error",u),this.emit("error",u)}this._shouldSendHangup=!1,this._publisher.info("connection","disconnected-by-remote",null,this),this._disconnect(null,!0),this._cleanupEventListeners()}},this._onMediaFailure=o=>{let{ConnectionDisconnected:s,ConnectionFailed:l,IceGatheringFailed:u,LowBytes:c}=e.MediaFailure,f=o===l||o===u;if(!sf(window,window.navigator)&&o===l)return this._mediaHandler.onerror(e5);if(this._mediaStatus===e.State.Reconnecting){if(f){if(Date.now()-this._mediaReconnectStartTime>JU.max)return this._log.warn("Exceeded max ICE retries"),this._mediaHandler.onerror(e5);try{this._mediaReconnectBackoff.backoff()}catch(v){if(!(v.message&&v.message==="Backoff in progress."))throw v}}return}let d=this._mediaHandler.version.pc,p=d&&d.iceConnectionState==="disconnected",h=this._monitor.hasActiveWarning("bytesSent","min")||this._monitor.hasActiveWarning("bytesReceived","min");if(o===c&&p||o===s&&h||f){let v=new Aa.ConnectionError("Media connection failed.");this._log.warn("ICE Connection disconnected."),this._publisher.warn("connection","error",v,this),this._publisher.info("connection","reconnecting",null,this),this._mediaReconnectStartTime=Date.now(),this._status=e.State.Reconnecting,this._mediaStatus=e.State.Reconnecting,this._mediaReconnectBackoff.reset(),this._mediaReconnectBackoff.backoff(),this._log.debug("#reconnecting"),this.emit("reconnecting",v)}},this._onMediaReconnected=()=>{this._mediaStatus===e.State.Reconnecting&&(this._log.info("ICE Connection reestablished."),this._mediaStatus=e.State.Open,this._signalingStatus===e.State.Open&&(this._publisher.info("connection","reconnected",null,this),this._log.debug("#reconnected"),this.emit("reconnected"),this._status=e.State.Open))},this._onMessageReceived=o=>{let{callsid:s,content:l,contenttype:u,messagetype:c,voiceeventsid:f}=o;if(this.parameters.CallSid!==s){this._log.warn(`Received a message from a different callsid: ${s}`);return}let d={content:l,contentType:u,messageType:c,voiceEventSid:f};this._publisher.info("call-message",c,{content_type:u,event_type:"received",voice_event_sid:f},this),this._log.debug("#messageReceived",JSON.stringify(d)),this.emit("messageReceived",d)},this._onMessageSent=o=>{if(!this._messages.has(o)){this._log.warn(`Received a messageSent with a voiceEventSid that doesn't exists: ${o}`);return}let s=this._messages.get(o);this._messages.delete(o),this._publisher.info("call-message",s?.messageType,{content_type:s?.contentType,event_type:"sent",voice_event_sid:o},this),this._log.debug("#messageSent",JSON.stringify(s)),this.emit("messageSent",s)},this._onRinging=o=>{if(this._setCallSid(o),this._status!==e.State.Connecting&&this._status!==e.State.Ringing)return;let s=!!o.sdp;this._status=e.State.Ringing,this._publisher.info("connection","outgoing-ringing",{hasEarlyMedia:s},this),this._log.debug("#ringing"),this.emit("ringing",s)},this._onRTCSample=o=>{let s=Object.assign(Object.assign({},o),{inputVolume:this._latestInputVolume,outputVolume:this._latestOutputVolume});this._codec=s.codecName,this._metricsSamples.push(s),this._metricsSamples.length>=w7&&this._publishMetrics(),this.emit("sample",o)},this._onSignalingError=o=>{let{callsid:s,voiceeventsid:l,error:u}=o;if(this.parameters.CallSid!==s){this._log.warn(`Received an error from a different callsid: ${s}`);return}if(l&&this._messages.has(l)){this._messages.delete(l),this._log.warn("Received an error while sending a message.",o),this._publisher.error("call-message","error",{code:u.code,message:u.message,voice_event_sid:l},this);let c,f=af(!!this._options.enableImprovedSignalingErrorPrecision,u.code);typeof f<"u"&&(c=new f(u)),c||(this._log.error("Unknown Call Message Error: ",u),c=new ct.UnknownError(u.message,u)),this._log.debug("#error",u,c),this.emit("error",c)}},this._onSignalingReconnected=()=>{this._signalingStatus===e.State.Reconnecting&&(this._log.info("Signaling Connection reestablished."),this._signalingStatus=e.State.Open,this._mediaStatus===e.State.Open&&(this._publisher.info("connection","reconnected",null,this),this._log.debug("#reconnected"),this.emit("reconnected"),this._status=e.State.Open))},this._onTransportClose=()=>{this._log.error("Received transportClose from pstream"),this._log.debug("#transportClose"),this.emit("transportClose"),this._signalingReconnectToken?(this._status=e.State.Reconnecting,this._signalingStatus=e.State.Reconnecting,this._publisher.info("connection","reconnecting",null,this),this._log.debug("#reconnecting"),this.emit("reconnecting",new Dt.ConnectionDisconnected)):(this._status=e.State.Closed,this._signalingStatus=e.State.Closed)},this._reemitWarning=(o,s)=>{let l=/^audio/.test(o.name)?"audio-level-":"network-quality-",u=I7[o.threshold.name],c;o.name in t5?c=t5[o.name][o.threshold.name]:o.name in a5&&(c=a5[o.name]);let f=u+c;this._emitWarning(l,f,o.threshold.value,o.values||o.value,s,o)},this._reemitWarningCleared=o=>{this._reemitWarning(o,!0)},this._soundcache=t.soundcache,typeof t.onIgnore=="function"&&(this._onIgnore=t.onIgnore);let n=a&&a.twimlParams||{};this.customParameters=new Map(Object.entries(n).map(([o,s])=>[o,String(s)])),Object.assign(this._options,a),this._options.callParameters&&(this.parameters=this._options.callParameters),this._options.reconnectToken&&(this._signalingReconnectToken=this._options.reconnectToken),this._voiceEventSidGenerator=this._options.voiceEventSidGenerator||df,this._direction=this.parameters.CallSid&&!this._options.reconnectCallSid?e.CallDirection.Incoming:e.CallDirection.Outgoing,this.parameters?this.callerInfo=this.parameters.StirStatus?{isVerified:this.parameters.StirStatus==="TN-Validation-Passed-A"}:null:this.callerInfo=null,this._mediaReconnectBackoff=new Do(JU),this._mediaReconnectBackoff.on("ready",()=>this._mediaHandler.iceRestart()),this.outboundConnectionId=_7();let r=this._publisher=t.publisher;this._direction===e.CallDirection.Incoming?r.info("connection","incoming",null,this):r.info("connection","outgoing",{preflight:this._options.preflight,reconnect:!!this._options.reconnectCallSid},this);let i=this._monitor=new(this._options.StatsMonitor||xg);i.on("sample",this._onRTCSample),i.disableWarnings(),setTimeout(()=>i.enableWarnings(),L7),i.on("warning",(o,s)=>{(o.name==="bytesSent"||o.name==="bytesReceived")&&this._onMediaFailure(e.MediaFailure.LowBytes),this._reemitWarning(o,s)}),i.on("warning-cleared",o=>{this._reemitWarningCleared(o)}),this._mediaHandler=new this._options.MediaHandler(t.audioHelper,t.pstream,{MediaStream:this._options.MediaStream,RTCPeerConnection:this._options.RTCPeerConnection,codecPreferences:this._options.codecPreferences,dscp:this._options.dscp,forceAggressiveIceNomination:this._options.forceAggressiveIceNomination,maxAverageBitrate:this._options.maxAverageBitrate}),this.on("volume",(o,s)=>{this._inputVolumeStreak=this._checkVolume(o,this._inputVolumeStreak,this._latestInputVolume,"input"),this._outputVolumeStreak=this._checkVolume(s,this._outputVolumeStreak,this._latestOutputVolume,"output"),this._latestInputVolume=o,this._latestOutputVolume=s}),this._mediaHandler.onaudio=o=>{this._log.debug("#audio"),this.emit("audio",o)},this._mediaHandler.onvolume=(o,s,l,u)=>{i.addVolumes(l/255*32767,u/255*32767),this.emit("volume",o,s)},this._mediaHandler.ondtlstransportstatechange=o=>{let s=o==="failed"?"error":"debug";this._publisher.post(s,"dtls-transport-state",o,null,this)},this._mediaHandler.onpcconnectionstatechange=o=>{let s="debug",l=this._mediaHandler.getRTCDtlsTransport();o==="failed"&&(s=l&&l.state==="failed"?"error":"warning"),this._publisher.post(s,"pc-connection-state",o,null,this)},this._mediaHandler.onicecandidate=o=>{let s=new Ll(o).toPayload();this._publisher.debug("ice-candidate","ice-candidate",s,this)},this._mediaHandler.onselectedcandidatepairchange=o=>{let s=new Ll(o.local).toPayload(),l=new Ll(o.remote,!0).toPayload();this._publisher.debug("ice-candidate","selected-ice-candidate-pair",{local_candidate:s,remote_candidate:l},this)},this._mediaHandler.oniceconnectionstatechange=o=>{let s=o==="failed"?"error":"debug";this._publisher.post(s,"ice-connection-state",o,null,this)},this._mediaHandler.onicegatheringfailure=o=>{this._publisher.warn("ice-gathering-state",o,null,this),this._onMediaFailure(e.MediaFailure.IceGatheringFailed)},this._mediaHandler.onicegatheringstatechange=o=>{this._publisher.debug("ice-gathering-state",o,null,this)},this._mediaHandler.onsignalingstatechange=o=>{this._publisher.debug("signaling-state",o,null,this)},this._mediaHandler.ondisconnected=o=>{this._log.warn(o),this._publisher.warn("network-quality-warning-raised","ice-connectivity-lost",{message:o},this),this._log.debug("#warning","ice-connectivity-lost"),this.emit("warning","ice-connectivity-lost"),this._onMediaFailure(e.MediaFailure.ConnectionDisconnected)},this._mediaHandler.onfailed=o=>{this._onMediaFailure(e.MediaFailure.ConnectionFailed)},this._mediaHandler.onconnected=()=>{this._status===e.State.Reconnecting&&this._onMediaReconnected()},this._mediaHandler.onreconnected=o=>{this._log.info(o),this._publisher.info("network-quality-warning-cleared","ice-connectivity-lost",{message:o},this),this._log.debug("#warning-cleared","ice-connectivity-lost"),this.emit("warning-cleared","ice-connectivity-lost"),this._onMediaReconnected()},this._mediaHandler.onerror=o=>{o.disconnect===!0&&this._disconnect(o.info&&o.info.message);let s=o.info.twilioError||new ct.UnknownError(o.info.message);this._log.error("Received an error from MediaStream:",o),this._log.debug("#error",s),this.emit("error",s)},this._mediaHandler.onopen=()=>{this._status===e.State.Open||this._status===e.State.Reconnecting||(this._status===e.State.Ringing||this._status===e.State.Connecting?(this.mute(this._mediaHandler.isMuted),this._mediaStatus=e.State.Open,this._maybeTransitionToOpen()):this._mediaHandler.close())},this._mediaHandler.onclose=()=>{this._status=e.State.Closed,this._options.shouldPlayDisconnect&&this._options.shouldPlayDisconnect()&&!this._isCancelled&&!this._isRejected&&this._soundcache.get(Ye.SoundName.Disconnect).play(),i.disable(),this._publishMetrics(),!this._isCancelled&&!this._isRejected&&(this._log.debug("#disconnect"),this.emit("disconnect",this))},this._pstream=t.pstream,this._pstream.on("ack",this._onAck),this._pstream.on("cancel",this._onCancel),this._pstream.on("error",this._onSignalingError),this._pstream.on("ringing",this._onRinging),this._pstream.on("transportClose",this._onTransportClose),this._pstream.on("connected",this._onConnected),this._pstream.on("message",this._onMessageReceived),this.on("error",o=>{this._publisher.error("connection","error",{code:o.code,message:o.message},this),this._pstream&&this._pstream.status==="disconnected"&&this._cleanupEventListeners()}),this.on("disconnect",()=>{this._cleanupEventListeners()})}_setInputTracksFromStream(t){return this._mediaHandler.setInputTracksFromStream(t)}_setSinkIds(t){return this._mediaHandler._setSinkIds(t)}accept(t){if(this._log.debug(".accept",t),this._status!==e.State.Pending){this._log.debug(`.accept noop. status is '${this._status}'`);return}t=t||{};let a=t.rtcConfiguration||this._options.rtcConfiguration,n=t.rtcConstraints||this._options.rtcConstraints||{},r={audio:typeof n.audio<"u"?n.audio:!0};this._status=e.State.Connecting;let i=()=>{if(this._status!==e.State.Connecting){this._cleanupEventListeners(),this._mediaHandler.close();return}let l=c=>{let f=this._direction===e.CallDirection.Incoming?"accepted-by-local":"accepted-by-remote";this._publisher.info("connection",f,null,this);let{codecName:d,codecParams:p}=AU(this._mediaHandler.version.getSDP());this._publisher.info("settings","codec",{codec_params:p,selected_codec:d},this),this._monitor.enable(c)},u=typeof this._options.getSinkIds=="function"&&this._options.getSinkIds();if(Array.isArray(u)&&this._mediaHandler._setSinkIds(u).catch(()=>{}),this._pstream.addListener("hangup",this._onHangup),this._direction===e.CallDirection.Incoming)this._isAnswered=!0,this._pstream.on("answer",this._onAnswer),this._mediaHandler.answerIncomingCall(this.parameters.CallSid,this._options.offerSdp,a,l);else{let c=Array.from(this.customParameters.entries()).map(f=>`${encodeURIComponent(f[0])}=${encodeURIComponent(f[1])}`).join("&");this._pstream.on("answer",this._onAnswer),this._mediaHandler.makeOutgoingCall(c,this._signalingReconnectToken,this._options.reconnectCallSid||this.outboundConnectionId,a,l)}};this._options.beforeAccept&&this._options.beforeAccept(this);let o=typeof this._options.getInputStream=="function"&&this._options.getInputStream();(o?this._mediaHandler.setInputTracksFromStream(o):this._mediaHandler.openDefaultDeviceWithConstraints(r)).then(()=>{this._publisher.info("get-user-media","succeeded",{data:{audioConstraints:r}},this),i()},l=>{let u;l.code===31208||["PermissionDeniedError","NotAllowedError"].indexOf(l.name)!==-1?(u=new Li.PermissionDeniedError,this._publisher.error("get-user-media","denied",{data:{audioConstraints:r,error:l}},this)):(u=new Li.AcquisitionFailedError,this._publisher.error("get-user-media","failed",{data:{audioConstraints:r,error:l}},this)),this._disconnect(),this._log.debug("#error",l),this.emit("error",u)})}disconnect(){this._log.debug(".disconnect"),this._disconnect()}getLocalStream(){return this._mediaHandler&&this._mediaHandler.stream}getRemoteStream(){return this._mediaHandler&&this._mediaHandler._remoteStream}ignore(){if(this._log.debug(".ignore"),this._status!==e.State.Pending){this._log.debug(`.ignore noop. status is '${this._status}'`);return}this._status=e.State.Closed,this._mediaHandler.ignore(this.parameters.CallSid),this._publisher.info("connection","ignored-by-local",null,this),this._onIgnore&&this._onIgnore()}isMuted(){return this._mediaHandler.isMuted}mute(t=!0){this._log.debug(".mute",t);let a=this._mediaHandler.isMuted;this._mediaHandler.mute(t);let n=this._mediaHandler.isMuted;a!==n&&(this._publisher.info("connection",n?"muted":"unmuted",null,this),this._log.debug("#mute",n),this.emit("mute",n,this))}postFeedback(t,a){if(typeof t>"u"||t===null)return this._postFeedbackDeclined();if(!Object.values(e.FeedbackScore).includes(t))throw new ae(`Feedback score must be one of: ${Object.values(e.FeedbackScore)}`);if(typeof a<"u"&&a!==null&&!Object.values(e.FeedbackIssue).includes(a))throw new ae(`Feedback issue must be one of: ${Object.values(e.FeedbackIssue)}`);return this._publisher.info("feedback","received",{issue_name:a,quality_score:t},this,!0)}reject(){if(this._log.debug(".reject"),this._status!==e.State.Pending){this._log.debug(`.reject noop. status is '${this._status}'`);return}this._isRejected=!0,this._pstream.reject(this.parameters.CallSid),this._mediaHandler.reject(this.parameters.CallSid),this._publisher.info("connection","rejected-by-local",null,this),this._cleanupEventListeners(),this._mediaHandler.close(),this._status=e.State.Closed,this._log.debug("#reject"),this.emit("reject")}sendDigits(t){if(this._log.debug(".sendDigits",t),t.match(/[^0-9*#w]/))throw new ae("Illegal character passed into sendDigits");let a=this._options.customSounds||{},n=[];t.split("").forEach(s=>{let l=s!=="w"?`dtmf${s}`:"";l==="dtmf*"&&(l="dtmfs"),l==="dtmf#"&&(l="dtmfh"),n.push(l)});let r=()=>{let s=n.shift();s&&(this._options.dialtonePlayer&&!a[s]?this._options.dialtonePlayer.play(s):this._soundcache.get(s).play()),n.length&&setTimeout(()=>r(),200)};r();let i=this._mediaHandler.getOrCreateDTMFSender();function o(s){if(!s.length)return;let l=s.shift();l&&l.length&&i.insertDTMF(l,C7,S7),setTimeout(o.bind(null,s),b7)}if(i){if(!("canInsertDTMF"in i)||i.canInsertDTMF){this._log.info("Sending digits using RTCDTMFSender"),o(t.split("w"));return}this._log.info("RTCDTMFSender cannot insert DTMF")}if(this._log.info("Sending digits over PStream"),this._pstream!==null&&this._pstream.status!=="disconnected")this._pstream.dtmf(this.parameters.CallSid,t);else{let s=new ct.ConnectionError("Could not send DTMF: Signaling channel is disconnected");this._log.debug("#error",s),this.emit("error",s)}}sendMessage(t){this._log.debug(".sendMessage",JSON.stringify(t));let{content:a,contentType:n,messageType:r}=t;if(typeof a>"u"||a===null)throw new ae("`content` is empty");if(typeof r!="string")throw new ae("`messageType` must be a string.");if(r.length===0)throw new ae("`messageType` must be a non-empty string.");if(this._pstream===null)throw new Wt("Could not send CallMessage; Signaling channel is disconnected");let i=this.parameters.CallSid;if(typeof this.parameters.CallSid>"u")throw new Wt("Could not send CallMessage; Call has no CallSid");let o=this._voiceEventSidGenerator();return this._messages.set(o,{content:a,contentType:n,messageType:r,voiceEventSid:o}),this._pstream.sendMessage(i,a,n,r,o),o}status(){return this._status}_checkVolume(t,a,n,r){let i=a>=10,o=0;return n===t&&(o=a),o>=10?this._emitWarning("audio-level-",`constant-audio-${r}-level`,10,o,!1):i&&this._emitWarning("audio-level-",`constant-audio-${r}-level`,10,o,!0),o}_cleanupEventListeners(){let t=()=>{this._pstream&&(this._pstream.removeListener("ack",this._onAck),this._pstream.removeListener("answer",this._onAnswer),this._pstream.removeListener("cancel",this._onCancel),this._pstream.removeListener("error",this._onSignalingError),this._pstream.removeListener("hangup",this._onHangup),this._pstream.removeListener("ringing",this._onRinging),this._pstream.removeListener("transportClose",this._onTransportClose),this._pstream.removeListener("connected",this._onConnected),this._pstream.removeListener("message",this._onMessageReceived))};t(),setTimeout(t,0)}_createMetricPayload(){let t={call_sid:this.parameters.CallSid,dscp:!!this._options.dscp,sdk_version:wr};return this._options.gateway&&(t.gateway=this._options.gateway),t.direction=this._direction,t}_disconnect(t,a){if(t=typeof t=="string"?t:null,!(this._status!==e.State.Open&&this._status!==e.State.Connecting&&this._status!==e.State.Reconnecting&&this._status!==e.State.Ringing)){if(this._log.info("Disconnecting..."),this._pstream!==null&&this._pstream.status!=="disconnected"&&this._shouldSendHangup){let n=this.parameters.CallSid||this.outboundConnectionId;n&&this._pstream.hangup(n,t)}this._cleanupEventListeners(),this._mediaHandler.close(),a||this._publisher.info("connection","disconnected-by-local",null,this)}}_maybeTransitionToOpen(){this._wasConnected,this._isAnswered&&(this._onSignalingReconnected(),this._signalingStatus=e.State.Open,this._mediaHandler&&this._mediaHandler.status==="open"&&(this._status=e.State.Open,this._wasConnected||(this._wasConnected=!0,this._log.debug("#accept"),this.emit("accept",this))))}_postFeedbackDeclined(){return this._publisher.info("feedback","received-none",null,this,!0)}_publishMetrics(){this._metricsSamples.length!==0&&this._publisher.postMetrics("quality-metrics-samples","metrics-sample",this._metricsSamples.splice(0),this._createMetricPayload(),this).catch(t=>{this._log.warn("Unable to post metrics to Insights. Received error:",t)})}_setCallSid(t){let a=t.callsid;a&&(this.parameters.CallSid=a,this._mediaHandler.callSid=a)}};Ut.toString=()=>"[Twilio.Call class]";(function(e){(function(t){t.Closed="closed",t.Connecting="connecting",t.Open="open",t.Pending="pending",t.Reconnecting="reconnecting",t.Ringing="ringing"})(e.State||(e.State={})),(function(t){t.AudioLatency="audio-latency",t.ChoppyAudio="choppy-audio",t.DroppedCall="dropped-call",t.Echo="echo",t.NoisyCall="noisy-call",t.OneWayAudio="one-way-audio"})(e.FeedbackIssue||(e.FeedbackIssue={})),(function(t){t[t.One=1]="One",t[t.Two=2]="Two",t[t.Three=3]="Three",t[t.Four=4]="Four",t[t.Five=5]="Five"})(e.FeedbackScore||(e.FeedbackScore={})),(function(t){t.Incoming="INCOMING",t.Outgoing="OUTGOING"})(e.CallDirection||(e.CallDirection={})),(function(t){t.Opus="opus",t.PCMU="pcmu"})(e.Codec||(e.Codec={})),(function(t){t.None="none",t.Timeout="timeout"})(e.IceGatheringFailureReason||(e.IceGatheringFailureReason={})),(function(t){t.ConnectionDisconnected="ConnectionDisconnected",t.ConnectionFailed="ConnectionFailed",t.IceGatheringFailed="IceGatheringFailed",t.LowBytes="LowBytes"})(e.MediaFailure||(e.MediaFailure={}))})(Ut||(Ut={}))});var r5=m(()=>{"use strict";sg();cf();Ea();mw();ta()});function i5(e){let[t,a]=(0,at.useState)({isActive:!1,duration:0,status:"idle",clientRef:"",callSid:"",isMuted:!1}),n=(0,at.useRef)(null),r=(0,at.useRef)(null),i=(0,at.useRef)(null),o=(0,at.useRef)(!1),s=(0,at.useCallback)(x=>{a(y=>({...y,status:x}))},[]),l=(0,at.useCallback)(()=>{a(x=>({...x,duration:x.duration+1}))},[]),u=(0,at.useCallback)(()=>{a({isActive:!1,duration:0,status:"idle",clientRef:"",callSid:"",isMuted:!1})},[]),c=(0,at.useCallback)(()=>{n.current&&(clearInterval(n.current),n.current=null)},[]),f=(0,at.useCallback)(async()=>{o.current=!1,c();try{i.current?.disconnect()}catch{}i.current=null,u()},[c,u]),d=(0,at.useCallback)(x=>{i.current=x,x.on("accept",()=>{if(!o.current)return;let y=x.parameters&&x.parameters.CallSid||"";s("in-call"),a(b=>({...b,callSid:y})),c(),n.current=setInterval(l,1e3)}),x.on("disconnect",()=>{o.current&&(o.current=!1,c(),i.current=null,u())}),x.on("error",y=>{console.error("[GarudaChat] Call error:",y),f()})},[l,s,c,u,f]),p=(0,at.useCallback)(x=>{o.current=!0;let y=x.parameters&&x.parameters.CallSid||"";c(),a({isActive:!0,duration:0,status:"in-call",clientRef:"",callSid:y,isMuted:!1}),x.accept(),d(x)},[c,d]),h=(0,at.useRef)(p);(0,at.useEffect)(()=>{h.current=p},[p]);let v=(0,at.useCallback)(async()=>{if(r.current)return r.current;try{let x=await e.getToken();if(!x)return null;let y=new Ye(x,{logLevel:1,codecPreferences:[k7,T7]});return r.current=y,y.on("error",b=>{console.error("[GarudaChat] Device error:",b)}),y.on("incoming",b=>{h.current(b)}),await y.register(),y}catch(x){return console.error("[GarudaChat] Device init failed:",x),null}},[e]);(0,at.useEffect)(()=>(v(),()=>{try{r.current?.disconnectAll()}catch{}try{r.current?.destroy()}catch{}r.current=null,i.current=null,n.current&&(clearInterval(n.current),n.current=null)}),[v]);let S=(0,at.useCallback)(async()=>{if(o.current)return;let x=await v();if(!x){console.error("[GarudaChat] Device not available");return}let y="ref_"+Date.now()+"_"+Math.random().toString(36).slice(2,10);o.current=!0,a({isActive:!0,duration:0,status:"connecting",clientRef:y,callSid:"",isMuted:!1});try{let b=await x.connect({params:{To:e.getTo(),clientRef:y}});d(b)}catch(b){console.error("[GarudaChat] Failed to start call:",b),o.current=!1,u()}},[v,d,u,e]),g=(0,at.useCallback)(()=>{let x=i.current;x&&a(y=>{let b=!y.isMuted;try{x.mute(b)}catch(T){console.error("[GarudaChat] Toggle mute failed:",T)}return{...y,isMuted:b}})},[]);return{voiceCall:t,startVoiceCall:S,endVoiceCall:f,toggleMute:g}}var at,k7,T7,o5=m(()=>{"use strict";at=H(re());r5();({Opus:k7,PCMU:T7}=Ut.Codec)});function s5(e){let t=e;t=t.replace(/<\/?table[^>]*>/gi,`
|
|
60
|
+
`).replace(/<\/?thead[^>]*>/gi,"").replace(/<\/?tbody[^>]*>/gi,"").replace(/<\/?tr[^>]*>/gi,`
|
|
61
|
+
`).replace(/<\/?t[dh][^>]*>/gi," ").replace(/<br\s*\/?>/gi,`
|
|
62
|
+
`).replace(/<[^>]+>/g,"").replace(/&/gi,"&").replace(/</gi,"<").replace(/>/gi,">").replace(/ /gi," "),t=t.split(`
|
|
63
|
+
`).filter(i=>!/^\|[\s\-:|]+\|$/.test(i.trim())).join(`
|
|
64
|
+
`),t=t.split(`
|
|
65
|
+
`).map(i=>i.trim().startsWith("|")&&i.trim().endsWith("|")?i.replace(/^\|/,"").replace(/\|$/,"").split("|").map(o=>o.trim()).filter(Boolean).join(" - "):i).join(`
|
|
66
|
+
`);let a=t.split(`
|
|
67
|
+
`),n=[],r=[];return a.forEach(i=>{let o=i.trim();if(!o)return;let s=/^\*\*.*:\*\*/.test(o),l=/^(\-|\*|\+)?\s*(\d+\.|\w\.)?\s/.test(o);s&&l?(r.length>0&&(n.push(...r),r=[]),n.push(o.replace(/^[-*+]\s*/,""))):s?(r.length>0&&(n.push(...r),r=[]),n.push(o)):l?r.push(o.replace(/^([-*+]?\s*\d*\.*\s)/,"")):(r.length>0&&(n.push(...r),r=[]),n.push(o))}),r.length>0&&n.push(...r),n.join(`
|
|
68
|
+
`)}var l5=m(()=>{"use strict"});var u5,c5=m(()=>{"use strict";u5='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-y-0{top:0;bottom:0}.bottom-6{bottom:1.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-14{right:3.5rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-6{right:1.5rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-1{margin-left:.25rem}.mr-1{margin-right:.25rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-\\[750px\\]{height:750px}.h-full{height:100%}.max-h-\\[90vh\\]{max-height:90vh}.min-h-\\[12px\\]{min-height:12px}.min-h-\\[28px\\]{min-height:28px}.w-1{width:.25rem}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-64{width:16rem}.w-auto{width:auto}.w-full{width:100%}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[500px\\]{max-width:500px}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem*var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-tl-sm{border-top-left-radius:.125rem}.rounded-tr-sm{border-top-right-radius:.125rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-foreground{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}.border-foreground\\/10{border-color:rgba(248,250,252,.1)}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-green-500\\/20{border-color:rgba(34,197,94,.2)}.border-primary{--tw-border-opacity:1;border-color:rgb(0 240 255/var(--tw-border-opacity,1))}.border-primary\\/20{border-color:rgba(0,240,255,.2)}.border-primary\\/30{border-color:rgba(0,240,255,.3)}.border-primary\\/40{border-color:rgba(0,240,255,.4)}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-red-500\\/20{border-color:rgba(239,68,68,.2)}.border-red-500\\/30{border-color:rgba(239,68,68,.3)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-white\\/10{border-color:hsla(0,0%,100%,.1)}.border-white\\/15{border-color:hsla(0,0%,100%,.15)}.border-white\\/20{border-color:hsla(0,0%,100%,.2)}.border-white\\/5{border-color:hsla(0,0%,100%,.05)}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-foreground{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-green-500\\/10{background-color:rgba(34,197,94,.1)}.bg-navy-700{--tw-bg-opacity:1;background-color:rgb(17 29 54/var(--tw-bg-opacity,1))}.bg-navy-800{--tw-bg-opacity:1;background-color:rgb(10 19 36/var(--tw-bg-opacity,1))}.bg-navy-800\\/50{background-color:rgba(10,19,36,.5)}.bg-navy-800\\/80{background-color:rgba(10,19,36,.8)}.bg-navy-800\\/90{background-color:rgba(10,19,36,.9)}.bg-navy-900{--tw-bg-opacity:1;background-color:rgb(5 11 20/var(--tw-bg-opacity,1))}.bg-navy-900\\/50{background-color:rgba(5,11,20,.5)}.bg-navy-900\\/95{background-color:rgba(5,11,20,.95)}.bg-primary{--tw-bg-opacity:1;background-color:rgb(0 240 255/var(--tw-bg-opacity,1))}.bg-primary\\/10{background-color:rgba(0,240,255,.1)}.bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-500\\/10{background-color:rgba(239,68,68,.1)}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-tr{background-image:linear-gradient(to top right,var(--tw-gradient-stops))}.from-navy-900{--tw-gradient-from:#050b14 var(--tw-gradient-from-position);--tw-gradient-to:rgba(5,11,20,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-navy-900\\/50{--tw-gradient-from:rgba(5,11,20,.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(5,11,20,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-primary{--tw-gradient-from:#00f0ff var(--tw-gradient-from-position);--tw-gradient-to:rgba(0,240,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-primary\\/10{--tw-gradient-from:rgba(0,240,255,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(0,240,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-primary\\/30{--tw-gradient-from:rgba(0,240,255,.3) var(--tw-gradient-from-position);--tw-gradient-to:rgba(0,240,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-cyan-500{--tw-gradient-to:#06b6d4 var(--tw-gradient-to-position)}.to-cyan-500\\/10{--tw-gradient-to:rgba(6,182,212,.1) var(--tw-gradient-to-position)}.to-navy-900{--tw-gradient-to:#050b14 var(--tw-gradient-to-position)}.to-teal-400{--tw-gradient-to:#2dd4bf var(--tw-gradient-to-position)}.to-teal-500{--tw-gradient-to:#14b8a6 var(--tw-gradient-to-position)}.to-teal-500\\/30{--tw-gradient-to:rgba(20,184,166,.3) var(--tw-gradient-to-position)}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-0{padding-bottom:0}.pb-0\\.5{padding-bottom:.125rem}.pl-5{padding-left:1.25rem}.pr-24{padding-right:6rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\\[0\\.35em\\]{letter-spacing:.35em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-foreground{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-navy-900{--tw-text-opacity:1;color:rgb(5 11 20/var(--tw-text-opacity,1))}.text-primary{--tw-text-opacity:1;color:rgb(0 240 255/var(--tw-text-opacity,1))}.text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}.opacity-0{opacity:0}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-\\[0_0_15px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.5\\)\\]{--tw-shadow:0 0 15px rgba(0,0,0,.5);--tw-shadow-colored:0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_15px_rgba\\(32\\2c 201\\2c 151\\2c 0\\.2\\)\\]{--tw-shadow:0 0 15px rgba(32,201,151,.2);--tw-shadow-colored:0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_30px_rgba\\(32\\2c 201\\2c 151\\2c 0\\.8\\)\\]{--tw-shadow:0 0 30px rgba(32,201,151,.8);--tw-shadow-colored:0 0 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_20px_50px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.5\\)\\]{--tw-shadow:0 20px 50px rgba(0,0,0,.5);--tw-shadow-colored:0 20px 50px var(--tw-shadow-color)}.shadow-\\[0_20px_50px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.5\\)\\],.shadow-inner{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,.05);--tw-shadow-colored:inset 0 2px 4px 0 var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-primary{--tw-shadow-color:#00f0ff;--tw-shadow:var(--tw-shadow-colored)}.shadow-primary\\/10{--tw-shadow-color:rgba(0,240,255,.1);--tw-shadow:var(--tw-shadow-colored)}.shadow-red-500{--tw-shadow-color:#ef4444;--tw-shadow:var(--tw-shadow-colored)}.shadow-red-500\\/30{--tw-shadow-color:rgba(239,68,68,.3);--tw-shadow:var(--tw-shadow-colored)}.ring-primary{--tw-ring-opacity:1;--tw-ring-color:rgb(0 240 255/var(--tw-ring-opacity,1))}.drop-shadow-\\[0_0_5px_rgba\\(250\\2c 204\\2c 21\\2c 0\\.5\\)\\]{--tw-drop-shadow:drop-shadow(0 0 5px rgba(250,204,21,.5))}.drop-shadow-\\[0_0_5px_rgba\\(250\\2c 204\\2c 21\\2c 0\\.5\\)\\],.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(40px)}.backdrop-blur-2xl,.backdrop-blur-md{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.backdrop-blur-sm,.backdrop-blur-xl{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur:blur(24px)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}:host{all:initial;display:block;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*,:after,:before{box-sizing:border-box}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#0a1324}::-webkit-scrollbar-thumb{background:rgba(49,46,129,.5);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:rgba(79,70,229,.8)}.chat-markdown p{margin:.4em 0;line-height:1.6}.chat-markdown p:first-child{margin-top:0}.chat-markdown p:last-child{margin-bottom:0}.chat-markdown ol,.chat-markdown ul{margin:.4em 0;padding-left:1.5em}.chat-markdown li{margin:.2em 0;line-height:1.5}.chat-markdown strong{font-weight:600}.chat-markdown code{background:hsla(0,0%,100%,.1);padding:.15em .4em;border-radius:4px;font-size:.9em}.hover\\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}.hover\\:scale-105:hover,.hover\\:scale-110:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}.hover\\:border-green-500\\/40:hover{border-color:rgba(34,197,94,.4)}.hover\\:border-primary\\/40:hover{border-color:rgba(0,240,255,.4)}.hover\\:border-primary\\/50:hover{border-color:rgba(0,240,255,.5)}.hover\\:border-red-400\\/20:hover{border-color:hsla(0,91%,71%,.2)}.hover\\:border-red-500\\/40:hover{border-color:rgba(239,68,68,.4)}.hover\\:bg-green-400\\/10:hover{background-color:rgba(74,222,128,.1)}.hover\\:bg-green-500\\/20:hover{background-color:rgba(34,197,94,.2)}.hover\\:bg-navy-600:hover{--tw-bg-opacity:1;background-color:rgb(26 44 82/var(--tw-bg-opacity,1))}.hover\\:bg-navy-700:hover{--tw-bg-opacity:1;background-color:rgb(17 29 54/var(--tw-bg-opacity,1))}.hover\\:bg-primary\\/10:hover{background-color:rgba(0,240,255,.1)}.hover\\:bg-primary\\/20:hover{background-color:rgba(0,240,255,.2)}.hover\\:bg-primary\\/90:hover{background-color:rgba(0,240,255,.9)}.hover\\:bg-red-400\\/10:hover{background-color:hsla(0,91%,71%,.1)}.hover\\:bg-red-500\\/20:hover{background-color:rgba(239,68,68,.2)}.hover\\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.hover\\:bg-white\\/5:hover{background-color:hsla(0,0%,100%,.05)}.hover\\:bg-yellow-600:hover{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.hover\\:text-green-400:hover{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.hover\\:text-primary\\/80:hover{color:rgba(0,240,255,.8)}.hover\\:text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.hover\\:text-yellow-400\\/50:hover{color:rgba(250,204,21,.5)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-\\[0_0_10px_rgba\\(32\\2c 201\\2c 151\\2c 0\\.15\\)\\]:hover{--tw-shadow:0 0 10px rgba(32,201,151,.15);--tw-shadow-colored:0 0 10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:shadow-\\[0_0_15px_rgba\\(32\\2c 201\\2c 151\\2c 0\\.1\\)\\]:hover{--tw-shadow:0 0 15px rgba(32,201,151,.1);--tw-shadow-colored:0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\:border-primary:focus{--tw-border-opacity:1;border-color:rgb(0 240 255/var(--tw-border-opacity,1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-primary:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(0 240 255/var(--tw-ring-opacity,1))}.focus\\:ring-primary\\/50:focus{--tw-ring-color:rgba(0,240,255,.5)}.active\\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:translate-x-1{--tw-translate-x:0.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:text-primary{--tw-text-opacity:1;color:rgb(0 240 255/var(--tw-text-opacity,1))}.group:hover .group-hover\\:opacity-100{opacity:1}@media (min-width:640px){.sm\\:left-auto{left:auto}.sm\\:right-6{right:1.5rem}.sm\\:w-full{width:100%}}'});function d5({children:e}){let[t,a]=(0,yg.useState)(null);return(0,yg.useEffect)(()=>{let n=document.createElement("div");document.body.appendChild(n);let r=n.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=u5,r.appendChild(i);let o=document.createElement("div");return r.appendChild(o),a(o),()=>{document.body.removeChild(n)}},[]),t?(0,f5.createPortal)(e,t):null}var yg,f5,p5=m(()=>{"use strict";"use client";yg=H(re()),f5=H(Ug());c5()});function m5(e){let t=e.match(/https?:\/\/checkout\.stripe\.com\/c\/pay\/[a-zA-Z0-9_#%-]+(?:\?[a-zA-Z0-9_&=%-]+)?(?:#[a-zA-Z0-9_%-]+)?/);return t?t[0]:null}function h5(e){let t=e.match(/for\s+([A-Za-z\s]+?)(?:\s*:|$|https)/);return t?t[1].trim():null}function g5(e){let t=e.toLowerCase();return t.includes("yearly")||t.includes("/year")?"yearly":t.includes("monthly")||t.includes("/month")?"monthly":""}function Lw(e){let t=e.match(/\$([0-9,]+\.?[0-9]*)/);return t?parseFloat(t[1].replace(/,/g,"")):0}function A7(e){return e?(e=e.replace(/<think>[\s\S]*?<\/think>/gi,""),e=e.replace(/<think>[\s\S]*/gi,""),e=e.trim(),s5(e)):""}function x5({config:e}){return(0,k.jsx)(d5,{children:(0,k.jsx)(E7,{config:e})})}function E7({config:e}){let t=e.user??null,a=typeof window<"u"?window.location.pathname:"",n=(0,Le.useMemo)(()=>AF(e),[e.apiBaseUrl,e.organisationId,e.authToken,e.onUnauthorized]),r=(0,Le.useMemo)(()=>DF(n),[n]),i=(0,Le.useMemo)(()=>RF(e),[e.apiBaseUrl,e.supportPhone]),[o,s]=(0,Le.useState)(!1),{start:l,stop:u,isListening:c}=OF(P=>{h(P)}),[f,d]=(0,Le.useState)(null),[p,h]=(0,Le.useState)(""),[v,S]=(0,Le.useState)(0),[g,x]=(0,Le.useState)(""),[y,b]=(0,Le.useState)(!1),[T,I]=(0,Le.useState)(!1),A=(0,Le.useRef)(null),{voiceCall:_,startVoiceCall:M,endVoiceCall:C,toggleMute:U}=i5(i),[N,B]=(0,Le.useState)(""),[q,V]=(0,Le.useState)(""),[ue,Ve]=(0,Le.useState)(!1),[pe,Me]=(0,Le.useState)(!1),w=t?.fullname?.trim()||"",[Ge,Kt]=(0,Le.useState)(null),[L,zt]=(0,Le.useState)(!1),Ma=(0,Le.useMemo)(()=>({id:"msg_init",sender:"bot",type:"text",text:`\u{1F44B} Welcome ${w} to GarudaVPN Support.
|
|
69
|
+
|
|
70
|
+
I'm your AI Support Assistant. I can help with:
|
|
71
|
+
\u2022 Subscription Plans
|
|
72
|
+
\u2022 Billing Questions
|
|
73
|
+
\u2022 Refund Requests
|
|
74
|
+
\u2022 VPN Connection & Network Issues
|
|
75
|
+
\u2022 Device Management
|
|
76
|
+
|
|
77
|
+
How can I help you today?`}),[w]),[Mt,Vt]=(0,Le.useState)([Ma]);(0,Le.useEffect)(()=>{Vt(P=>P.some(Ie=>Ie.id==="msg_init")?P.map(Ie=>Ie.id==="msg_init"?Ma:Ie):P)},[Ma]),(0,Le.useEffect)(()=>{if(Mt.length===1&&Mt[0].id==="msg_init"&&!Mt.some(P=>P.type==="suggestions")){let P=[];a.includes("/billing")?P=["Show invoices","Payment history","Next billing date","Refund request"]:a.includes("/devices")?P=["Remove device","Device limit","Login issue"]:a.includes("/subscriptions")?P=["Upgrade plan","Compare plans","Renew subscription","Cancel subscription"]:t?P=["Why is my VPN not connecting?","How do I request a refund?","Raise a ticket","I am facing network issues"]:P=["Why is my VPN not connecting?","Compare plans","Login issue","Install guide"];let Y={id:`msg_${Date.now()}`,sender:"bot",type:"suggestions",payload:P};Vt([...Mt,Y])}},[a,Mt]),(0,Le.useEffect)(()=>{A.current?.scrollIntoView({behavior:"smooth"})},[Mt,o]);let yt=()=>{d(crypto.randomUUID()),Vt([Ma]),b(!1),S(0),Kt(null)},Ii=()=>{c?u():l()},Nt=async P=>{if(!P.trim())return;let Y={id:`msg_${Date.now()}`,sender:"user",text:P,type:"text"},Ie=[...Mt.filter(ft=>ft.type!=="suggestions"),Y];Vt(Ie),h(""),I(!0);try{let ft=await r.sendMessage({message:P,session_id:f??void 0},!e.authToken);I(!1);let ma=[...Ie],Ra=A7(ft.response);if(ft.session_id&&d(ft.session_id),ft.payment_link){let ha=ft.payment_link;ha.amount||(ha.amount=Lw(Ra)||Lw(ft.response)||0),ha.plan||(ha.plan=h5(Ra)||ha.plan||"Subscription"),ha.billing||(ha.billing=g5(Ra)||ha.billing||"");let E=Ra.replace(/https?:\/\/checkout\.stripe\.com\/[^\s)]+/gi,"").replace(/\[.*?\]\(.*?\)/gi,"").trim();E&&ma.push({id:crypto.randomUUID(),sender:"bot",type:"text",text:E}),ma.push({id:crypto.randomUUID(),sender:"bot",type:"payment",payload:ft.payment_link})}else{let ha=m5(Ra)||m5(ft.response);if(ha){let E=Ra.replace(/https?:\/\/checkout\.stripe\.com\/[^\s)]+/gi,"").replace(/\[.*?\]\(.*?\)/gi,"").trim();E&&ma.push({id:crypto.randomUUID(),sender:"bot",type:"text",text:E}),ma.push({id:crypto.randomUUID(),sender:"bot",type:"payment",payload:{url:ha,plan:h5(Ra)||"Subscription",billing:g5(Ra)||"",amount:Lw(Ra)||0,text:"Complete your payment"}})}else ma.push({id:crypto.randomUUID(),sender:"bot",type:"text",text:Ra})}ft.followups&&ft.followups.length>0&&ma.push({id:crypto.randomUUID(),sender:"bot",type:"suggestions",payload:ft.followups}),Vt(ma)}catch(ft){I(!1),console.error("[GarudaChat] AI chat request failed:",ft);let ma={id:`msg_${Date.now()}_err`,sender:"bot",type:"error",text:"Something went wrong. Please try again after some time.",payload:{retryText:P}};Vt([...Ie,ma])}},On=P=>{Vt(Y=>Y.filter(Ie=>Ie.type!=="error")),Nt(P)},Lr=()=>{Mt.length<=1||Mt.some(P=>P.type==="resolution"||P.type==="rating")||Vt([...Mt,{id:`msg_${Date.now()}_end`,sender:"bot",type:"resolution"}])},Bo=P=>{Kt(P);let Y=Mt.filter(Ie=>Ie.type!=="resolution"&&Ie.type!=="rating");Vt([...Y,{id:`msg_${Date.now()}_rate`,sender:"bot",type:"rating"}])},vg=async()=>{if(!(v===0||!f||L)){zt(!0);try{let P=await fetch(`${e.apiBaseUrl.replace(/\/$/,"")}/api/v1/ratings/respond`,{method:"POST",headers:{accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({session_id:f,user_id:t?.id||"",user_email:t?.email||"",rating:v,content:g||"",issue_solved:Ge===!0?"yes":Ge===!1?"no":""})});if(!P.ok)throw new Error(`Rating submission failed: ${P.status}`);let Y=await P.json();if(Y.status==="success"){b(!0);let Ie=Mt.filter(ma=>ma.type!=="rating"),ft={id:`msg_${Date.now()}_response`,sender:"bot",type:"text",text:Y.response};Vt(Ge===!1?[...Ie,ft,{id:`msg_${Date.now()}_opts`,sender:"bot",type:"suggestions",payload:["Raise a ticket","Browse Help Articles"]}]:[...Ie,ft]),S(0),x(""),Kt(null)}}catch(P){console.error("[GarudaChat] Failed to submit rating:",P)}finally{zt(!1)}}},Bn=_.isActive&&_.status==="in-call",Il=P=>{if(!Bn){V("Wait for the call to connect before entering the code.");return}B(Y=>{let Ie=(Y+P).slice(-6);return V(Ie.length===6?"Press Enter to send the code.":""),Ie})},_l=async()=>{if(!Bn){V("Wait for the call to connect before entering the code.");return}if(!N){V("Enter the 6-digit code first.");return}let P=N;B(""),V("Code sent - verifying...");try{let Y=await i.submitOtp(P,{callSid:_.callSid||void 0,clientRef:_.clientRef||void 0});if(Y&&Y.status==="ok")V(Y.detail==="verified"?"Code verified! The bot will continue shortly...":"Code received by server - verifying...");else{let Ie=Y&&Y.detail||"unknown";V(Ie==="incorrect_code"?"Incorrect code. Try again.":"Submit warning: "+Ie)}}catch(Y){console.error("[GarudaChat] submit-otp error:",Y),V("Submit error: "+(Y.message||"unknown"))}},Sg=async()=>{if(!_.clientRef&&!_.callSid){V("No active call to resend the code.");return}V("Sending a new code...");try{let P=await i.submitOtp("RESEND",{callSid:_.callSid||void 0,clientRef:_.clientRef||void 0});P&&P.status==="ok"?V("New code sent to your email. Enter it on the keypad."):V("Resend failed: "+(P&&P.detail||"unknown"))}catch(P){V("Resend error: "+(P.message||"unknown"))}};return(0,Le.useEffect)(()=>{if(!Bn)return;let P=Y=>{Y.ctrlKey||Y.metaKey||Y.altKey||(/^[0-9#*]$/.test(Y.key)?(Y.preventDefault(),Il(Y.key)):Y.key==="Enter"?(Y.preventDefault(),_l()):Y.key==="Backspace"&&(Y.preventDefault(),B(Ie=>Ie.slice(0,-1))))};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[Bn,N,_]),(0,Le.useEffect)(()=>{_.isActive||(B(""),V(""))},[_.isActive]),(0,Le.useEffect)(()=>{_.status==="in-call"&&_.isActive&&V(_.callSid?`Connected (CallSid: ${_.callSid}). When the bot asks for the code, type it on the keypad and press Enter.`:"Connected. When the bot asks for the code, type it on the keypad and press Enter.")},[_.status,_.isActive]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Oc,{children:!o&&(0,k.jsxs)(Tn.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},className:"fixed bottom-6 right-6 z-50 flex items-center group",children:[(0,k.jsx)("div",{className:"absolute bottom-full mb-4 right-0 bg-navy-800 text-foreground px-4 py-2 rounded-xl text-sm whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none shadow-[0_0_15px_rgba(0,0,0,0.5)] border border-primary/20",children:"How can I help you?"}),(0,k.jsx)("button",{onClick:()=>s(!0),className:"w-16 h-16 bg-gradient-to-tr from-primary to-teal-400 text-navy-900 rounded-full flex items-center justify-center shadow-[0_0_30px_rgba(32,201,151,0.8)] hover:scale-105 transition-all duration-300 border border-white/20 animate-pulse",children:(0,k.jsx)(Du,{size:32})})]})}),(0,k.jsx)(Oc,{children:o&&(0,k.jsxs)(Tn.div,{initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.95},className:"fixed bottom-6 left-3 right-3 sm:left-auto sm:right-6 z-50 w-auto sm:w-full max-w-[500px] h-[750px] max-h-[90vh] bg-navy-900 backdrop-blur-2xl border border-foreground/10 shadow-[0_20px_50px_rgba(0,0,0,0.5)] shadow-primary/10 rounded-3xl flex flex-col overflow-hidden",children:[(0,k.jsxs)("div",{className:"h-16 border-b border-white/10 bg-navy-800/50 flex items-center justify-between px-5 shrink-0",children:[(0,k.jsxs)("div",{className:"flex items-center gap-3",children:[(0,k.jsx)("button",{onClick:yt,className:"text-gray-400 hover:text-white transition-colors",title:"New chat",children:(0,k.jsx)(Bu,{size:20})}),(0,k.jsxs)("div",{className:"flex items-center gap-3",children:[(0,k.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-primary/30 to-teal-500/30 rounded-xl flex items-center justify-center border border-primary/20 shadow-inner",children:(0,k.jsx)(Uu,{size:20,className:"text-primary"})}),(0,k.jsxs)("div",{children:[(0,k.jsx)("h3",{className:"font-bold text-sm text-white",children:"Aegis AI Support"}),(0,k.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,k.jsx)("div",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-pulse"}),(0,k.jsx)("p",{className:"text-[10px] text-gray-400 font-medium tracking-wide",children:"ONLINE"})]})]})]})]}),(0,k.jsxs)("div",{className:"flex items-center gap-1",children:[e.supportPhone&&(0,k.jsx)("button",{onClick:()=>Ve(!0),className:"flex items-center justify-center text-gray-400 hover:text-green-400 transition-colors p-2 hover:bg-green-400/10 rounded-full",title:"Voice Call",children:(0,k.jsx)(Wi,{size:18})}),(0,k.jsx)("button",{onClick:Lr,className:"text-xs font-bold text-gray-400 hover:text-red-400 transition-colors px-3 py-1.5 hover:bg-red-400/10 rounded-lg mr-1 border border-transparent hover:border-red-400/20",children:"End Chat"}),(0,k.jsx)("button",{onClick:()=>s(!1),className:"text-gray-400 hover:text-white transition-colors p-2 hover:bg-white/5 rounded-full",children:(0,k.jsx)(Vu,{size:20})})]})]}),(0,k.jsxs)("div",{className:"flex flex-1 overflow-hidden relative",children:[(0,k.jsxs)("div",{className:"flex-1 flex flex-col h-full w-full relative z-0 bg-gradient-to-b from-navy-900/50 to-navy-900",children:[(0,k.jsxs)("div",{className:"flex-1 overflow-y-auto overflow-x-hidden p-5 space-y-5 custom-scrollbar",children:[Mt.map(P=>(0,k.jsxs)("div",{id:P.id,className:`flex flex-col ${P.sender==="user"?"items-end":"items-start"}`,children:[P.sender==="bot"&&P.type!=="system"&&(0,k.jsxs)("div",{className:"flex items-center gap-1.5 mb-1 ml-1",children:[(0,k.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-primary"}),(0,k.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-primary",children:"AI Assistant"})]}),P.type==="text"&&(0,k.jsx)("div",{className:`max-w-[85%] rounded-2xl px-5 py-3 text-base shadow-sm break-words overflow-hidden whitespace-pre-wrap chat-markdown ${P.sender==="user"?"bg-gradient-to-r from-primary to-teal-400 text-navy-900 font-medium rounded-tr-sm":"bg-navy-800/80 backdrop-blur-sm border border-white/10 text-foreground rounded-tl-sm"}`,children:(0,k.jsx)(xC,{remarkPlugins:[Gh],children:P.text})}),P.type==="error"&&(0,k.jsxs)("div",{className:"max-w-[85%] rounded-2xl px-5 py-3 border border-red-500/30 bg-red-500/10 text-foreground rounded-tl-sm",children:[(0,k.jsx)("p",{className:"text-base text-red-300 flex items-start gap-2",children:(0,k.jsx)("span",{children:P.text})}),(0,k.jsxs)("button",{onClick:()=>On(P.payload?.retryText),className:"mt-3 flex items-center gap-2 px-4 py-2 bg-primary text-navy-900 rounded-xl text-sm font-bold hover:bg-primary/90 transition-colors",children:[(0,k.jsx)(Ms,{size:14}),"Try Again"]})]}),P.type==="suggestions"&&(0,k.jsx)("div",{className:"flex flex-wrap gap-2 mt-3 max-w-[90%]",children:P.payload.map((Y,Ie)=>(0,k.jsx)("button",{onClick:()=>{Nt(Y)},className:"px-4 py-2 bg-navy-800/50 border border-primary/30 text-primary rounded-xl text-sm hover:bg-primary/10 hover:border-primary/50 transition-all font-medium shadow-sm hover:shadow-[0_0_10px_rgba(32,201,151,0.15)]",children:Y},Ie))}),P.type==="resolution"&&(0,k.jsxs)("div",{className:"mt-3 w-full max-w-[85%] bg-navy-800/80 backdrop-blur-md border border-white/10 rounded-2xl p-5 shadow-lg",children:[(0,k.jsxs)("p",{className:"text-sm text-foreground font-medium mb-4 flex items-center gap-2",children:[(0,k.jsx)(Jr,{size:18,className:"text-primary"})," Was your issue resolved?"]}),(0,k.jsxs)("div",{className:"flex gap-3",children:[(0,k.jsx)("button",{onClick:()=>Bo(!0),className:"flex-1 py-2 bg-green-500/10 text-green-500 border border-green-500/20 rounded-xl text-sm font-bold hover:bg-green-500/20 hover:border-green-500/40 transition-all shadow-sm",children:"Yes"}),(0,k.jsx)("button",{onClick:()=>Bo(!1),className:"flex-1 py-2 bg-red-500/10 text-red-500 border border-red-500/20 rounded-xl text-sm font-bold hover:bg-red-500/20 hover:border-red-500/40 transition-all shadow-sm",children:"No"})]})]}),P.type==="rating"&&(0,k.jsxs)("div",{className:"mt-3 w-full max-w-[85%] bg-navy-800/80 backdrop-blur-md border border-white/10 rounded-2xl p-5 shadow-lg",children:[(0,k.jsx)("p",{className:"text-sm text-foreground font-medium mb-3",children:"Rate your experience"}),(0,k.jsx)("div",{className:"flex gap-1 mb-4",children:[1,2,3,4,5].map(Y=>(0,k.jsx)("button",{onClick:()=>S(Y),className:`transition-all hover:scale-110 ${v>=Y?"text-yellow-400 drop-shadow-[0_0_5px_rgba(250,204,21,0.5)]":"text-gray-600 hover:text-yellow-400/50"}`,children:(0,k.jsx)(zu,{size:24,fill:"currentColor"})},Y))}),(0,k.jsx)("textarea",{value:g,onChange:Y=>x(Y.target.value),className:"w-full bg-navy-900/50 border border-white/10 rounded-xl p-3 text-sm text-foreground focus:border-primary focus:ring-1 focus:ring-primary focus:outline-none resize-none transition-all placeholder-gray-500",placeholder:"Leave feedback (optional)...",rows:2}),(0,k.jsx)("button",{onClick:vg,disabled:v===0||L,className:"mt-3 w-full py-2.5 bg-primary text-navy-900 font-bold rounded-xl text-sm disabled:opacity-50 disabled:cursor-not-allowed hover:bg-primary/90 transition-colors shadow-[0_0_15px_rgba(32,201,151,0.2)]",children:L?"Submitting...":"Submit Feedback"})]}),P.type==="payment"&&(0,k.jsx)("div",{className:"w-full max-w-[85%] mt-3 overflow-hidden",children:(0,k.jsxs)("div",{className:"rounded-2xl border border-primary/30 bg-gradient-to-br from-primary/10 to-cyan-500/10 p-5 overflow-hidden break-words",children:[(0,k.jsxs)("div",{className:"mb-4",children:[(0,k.jsx)("h3",{className:"text-xl font-bold",children:P.payload.plan}),(0,k.jsx)("p",{className:"text-sm text-gray-400",children:"Stripe Secure Checkout"})]}),(0,k.jsxs)("div",{className:"space-y-3 mb-5",children:[(0,k.jsxs)("div",{className:"flex justify-between",children:[(0,k.jsx)("span",{children:"Plan"}),(0,k.jsx)("span",{className:"font-semibold",children:P.payload.plan})]}),(0,k.jsxs)("div",{className:"flex justify-between",children:[(0,k.jsx)("span",{children:"Billing"}),(0,k.jsx)("span",{className:"capitalize",children:P.payload.billing})]}),(0,k.jsxs)("div",{className:"flex justify-between",children:[(0,k.jsx)("span",{children:"Amount"}),(0,k.jsxs)("span",{className:"text-primary font-bold text-lg",children:["$",P.payload.amount]})]})]}),(0,k.jsxs)("div",{className:"space-y-2",children:[(0,k.jsx)("a",{href:P.payload.url,target:"_blank",rel:"noopener noreferrer",className:"w-full rounded-xl bg-primary py-3 font-bold text-navy-900 hover:opacity-90 text-center block",children:"Continue to Secure Payment"}),(0,k.jsx)("button",{onClick:()=>Nt("I have completed the payment"),className:"w-full rounded-xl border border-primary/30 py-2.5 font-semibold text-primary hover:bg-primary/10 text-sm",children:"\u2713 Payment Done"})]})]})}),P.type==="article"&&(0,k.jsxs)("div",{onClick:()=>{s(!1),e.onNavigateToKnowledgeBase?.()},className:"mt-3 w-full max-w-[85%] bg-navy-800/80 backdrop-blur-md border border-white/10 rounded-2xl p-4 hover:border-primary/40 hover:shadow-[0_0_15px_rgba(32,201,151,0.1)] transition-all cursor-pointer group",children:[(0,k.jsxs)("div",{className:"flex items-start gap-3 mb-3",children:[(0,k.jsx)("div",{className:"p-2 bg-primary/10 text-primary rounded-xl shrink-0 mt-0.5",children:(0,k.jsx)(Ru,{size:18})}),(0,k.jsx)("h4",{className:"text-sm font-bold text-foreground group-hover:text-primary transition-colors line-clamp-2 leading-tight",children:P.payload.title})]}),(0,k.jsx)("p",{className:"text-xs text-gray-400 line-clamp-2 mb-3 leading-relaxed",children:P.payload.content}),(0,k.jsxs)("div",{className:"flex items-center justify-between border-t border-white/5 pt-3",children:[(0,k.jsxs)("span",{className:"text-[10px] text-gray-500 font-medium uppercase tracking-wider",children:[P.payload.readTime," read"]}),(0,k.jsxs)("span",{className:"text-xs text-primary font-bold flex items-center group-hover:translate-x-1 transition-transform",children:["Read Article ",(0,k.jsx)(Mu,{size:14,className:"ml-1"})]})]})]}),P.type==="refund"&&(0,k.jsxs)("div",{className:"mt-3 w-full max-w-[85%] bg-navy-800/80 backdrop-blur-md border border-white/10 rounded-2xl p-5 shadow-lg",children:[(0,k.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,k.jsx)("div",{className:"w-10 h-10 bg-primary/10 rounded-xl flex items-center justify-center",children:(0,k.jsx)(Ms,{size:20,className:"text-primary"})}),(0,k.jsx)("h4",{className:"text-sm font-bold text-foreground",children:"Refund Request"})]}),(0,k.jsx)("p",{className:"text-sm text-gray-300 mb-5 leading-relaxed",children:"Your current plan is eligible for a refund under our 30-day guarantee."}),(0,k.jsx)("button",{onClick:()=>Nt("Create Refund Request"),className:"w-full py-2.5 bg-primary/10 text-primary border border-primary/20 rounded-xl text-sm font-bold hover:bg-primary/20 transition-colors shadow-sm",children:"Proceed with Refund"})]})]},P.id)),T&&(0,k.jsx)(Tn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0},className:"flex items-start",children:(0,k.jsx)("div",{className:"bg-navy-800/80 backdrop-blur-sm border border-white/10 rounded-2xl rounded-tl-sm px-5 py-4 z-10",children:(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)(Tn.div,{className:"w-2 h-2 rounded-full bg-primary",animate:{y:[0,-5,0]},transition:{duration:.6,repeat:1/0,delay:0}}),(0,k.jsx)(Tn.div,{className:"w-2 h-2 rounded-full bg-primary",animate:{y:[0,-5,0]},transition:{duration:.6,repeat:1/0,delay:.2}}),(0,k.jsx)(Tn.div,{className:"w-2 h-2 rounded-full bg-primary",animate:{y:[0,-5,0]},transition:{duration:.6,repeat:1/0,delay:.4}})]})})}),(0,k.jsx)("div",{ref:A})]}),(0,k.jsxs)("div",{className:"p-4 border-t border-white/10 bg-navy-800/80 backdrop-blur-md shrink-0",children:[(0,k.jsxs)("div",{className:"relative flex items-center",children:[(0,k.jsx)("input",{type:"text",value:p,onChange:P=>h(P.target.value),onKeyDown:P=>{P.key==="Enter"&&Nt(p)},placeholder:c?"Listening...":"Ask Aegis AI anything...",className:"w-full bg-navy-900 border border-white/10 rounded-2xl py-3.5 pl-5 pr-24 text-base text-foreground focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/50 transition-all shadow-inner"}),(0,k.jsx)("button",{type:"button",onClick:Ii,className:`absolute right-14 w-10 h-10 rounded-xl flex items-center justify-center transition-all ${c?"bg-red-500 text-white animate-pulse":"bg-navy-700 text-gray-300 hover:text-white"}`,children:c?(0,k.jsx)(ei,{size:30}):(0,k.jsx)(Ds,{size:18})}),(0,k.jsx)("button",{onClick:()=>Nt(p),disabled:!p.trim(),className:"absolute right-2 w-10 h-10 bg-gradient-to-r from-primary to-teal-400 text-navy-900 rounded-xl flex items-center justify-center disabled:opacity-50",children:(0,k.jsx)(Fu,{size:16})})]}),(0,k.jsx)("div",{className:"text-center mt-2",children:(0,k.jsx)("span",{className:"text-[10px] text-gray-500",children:"Aegis AI can make mistakes. Verify important info."})})]})]}),(0,k.jsx)(Oc,{children:ue&&e.supportPhone&&(0,k.jsx)(Tn.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 z-50 bg-navy-900/95 backdrop-blur-xl flex items-center justify-center p-6",children:(0,k.jsxs)(Tn.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",bounce:0,duration:.3},className:"w-full max-w-sm bg-navy-800/90 backdrop-blur-md border border-white/10 rounded-3xl p-6 shadow-2xl text-center",children:[(0,k.jsx)("div",{className:"w-14 h-14 bg-gradient-to-br from-primary/30 to-teal-500/30 rounded-full flex items-center justify-center mx-auto mb-4 border border-primary/20",children:(0,k.jsx)(Wi,{size:24,className:"text-primary"})}),(0,k.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:"Voice Support"}),(0,k.jsx)("p",{className:"text-sm text-gray-400 mb-5 leading-relaxed",children:"If you want this chatbot experience in voice, then call to this number:"}),(0,k.jsx)("a",{href:`tel:${e.supportPhone.replace(/[^+\d]/g,"")}`,className:"text-2xl font-bold text-primary tracking-wider hover:opacity-80 transition-opacity",children:e.supportPhone}),(0,k.jsxs)("div",{className:"flex gap-3 mt-6",children:[(0,k.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e.supportPhone),Me(!0),setTimeout(()=>Me(!1),2e3)},className:"flex-1 py-2.5 bg-navy-700 text-gray-200 border border-white/10 rounded-xl text-sm font-bold hover:bg-navy-600 transition-colors",children:pe?"Copied!":"Copy Number"}),(0,k.jsx)("button",{onClick:()=>Ve(!1),className:"flex-1 py-2.5 bg-navy-700 text-gray-200 border border-white/10 rounded-xl text-sm font-bold hover:bg-navy-600 transition-colors",children:"Close"})]}),(0,k.jsx)("button",{onClick:()=>{Ve(!1),M()},className:"mt-3 w-full py-2.5 bg-primary text-navy-900 rounded-xl text-sm font-bold hover:bg-primary/90 transition-colors shadow-[0_0_15px_rgba(32,201,151,0.2)]",children:"Call Now"})]})})}),_.isActive&&(0,k.jsx)("div",{className:"absolute inset-0 z-50 bg-navy-900/98 backdrop-blur-xl flex items-center justify-center overflow-hidden p-4",children:(0,k.jsxs)("div",{className:"flex flex-col items-center gap-2.5 w-full max-w-[240px]",children:[(0,k.jsxs)("div",{className:"relative",children:[(0,k.jsx)("div",{className:"w-16 h-16 bg-gradient-to-br from-primary/30 to-teal-500/30 rounded-full flex items-center justify-center border-2 border-primary/30",children:(0,k.jsx)(Wi,{size:24,className:"text-primary"})}),_.status==="in-call"&&(0,k.jsx)("div",{className:"absolute inset-0 rounded-full border-2 border-primary/40 animate-ping"})]}),(0,k.jsxs)("div",{className:"text-center",children:[(0,k.jsx)("h3",{className:"font-bold text-white text-sm",children:"Aegis AI Support"}),(0,k.jsxs)("p",{className:"text-xs text-gray-400 mt-0.5",children:[_.status==="connecting"&&"Connecting...",_.status==="in-call"&&`In call \xB7 ${String(Math.floor(_.duration/60)).padStart(2,"0")}:${String(_.duration%60).padStart(2,"0")}`]})]}),Bn&&(0,k.jsxs)("div",{className:"w-full flex flex-col items-center gap-2",children:[(0,k.jsx)("div",{className:"text-xl tracking-[0.35em] min-h-[28px] text-center text-white border-b border-white/15 pb-0.5 w-full",children:N}),(0,k.jsx)("div",{className:"grid grid-cols-3 gap-1.5 w-full",children:["1","2","3","4","5","6","7","8","9","*","0","#"].map(P=>(0,k.jsx)("button",{onClick:()=>Il(P),className:"py-1 text-base font-semibold bg-navy-800 hover:bg-navy-700 text-white rounded-lg border border-white/10 active:scale-95 transition-all",children:P},P))}),(0,k.jsxs)("div",{className:"grid grid-cols-2 gap-1.5 w-full",children:[(0,k.jsx)("button",{onClick:()=>{B(""),V("")},className:"py-1 text-xs bg-navy-800 text-gray-300 rounded-lg border border-white/10 hover:bg-navy-700 transition-colors",children:"Clear"}),(0,k.jsx)("button",{onClick:_l,className:"py-1 text-xs font-bold bg-primary text-navy-900 rounded-lg hover:bg-primary/90 transition-colors",children:"Enter \u2713"})]}),(0,k.jsx)("button",{onClick:Sg,className:"py-0.5 text-[10px] text-primary underline underline-offset-4 hover:text-primary/80 transition-colors",children:"Resend code"}),q&&(0,k.jsx)("p",{className:"text-[10px] text-center text-gray-400 min-h-[12px] leading-tight",children:q})]}),(0,k.jsxs)("div",{className:"flex items-center gap-3",children:[Bn&&(0,k.jsx)("button",{onClick:U,className:`w-11 h-11 rounded-full flex items-center justify-center transition-colors ${_.isMuted?"bg-yellow-500 hover:bg-yellow-600":"bg-navy-700 hover:bg-navy-600"}`,title:_.isMuted?"Unmute":"Mute",children:_.isMuted?(0,k.jsx)(Pu,{size:18,className:"text-white"}):(0,k.jsx)(Ds,{size:18,className:"text-white"})}),(0,k.jsx)("button",{onClick:C,className:"w-12 h-12 bg-red-500 hover:bg-red-600 rounded-full flex items-center justify-center transition-colors shadow-lg shadow-red-500/30",children:(0,k.jsx)(Ou,{size:20,className:"text-white"})})]})]})})]})]})})]})}var Le,k,y5=m(()=>{"use strict";"use client";Le=H(re());Hk();TR();AB();TF();EF();MF();PF();BF();o5();l5();p5();k=H(ir())});var M7=It(()=>{var S5=H(re()),b5=H(mk());y5();function D7(e){if(!e)return null;let t=e.dataset;return t.apiBaseUrl?{apiBaseUrl:t.apiBaseUrl,organisationId:t.organisationId,supportPhone:t.supportPhone}:null}function v5(e){let t=document.createElement("div");t.style.display="none",document.body.appendChild(t),(0,b5.createRoot)(t).render((0,S5.createElement)(x5,{config:e}))}if(typeof window<"u"){window.GarudaChat={init:v5};let e=D7(document.currentScript);e?.apiBaseUrl&&v5(e)}});return M7();})();
|
|
78
|
+
/*! Bundled license information:
|
|
79
|
+
|
|
80
|
+
react/cjs/react.production.js:
|
|
81
|
+
(**
|
|
82
|
+
* @license React
|
|
83
|
+
* react.production.js
|
|
84
|
+
*
|
|
85
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the MIT license found in the
|
|
88
|
+
* LICENSE file in the root directory of this source tree.
|
|
89
|
+
*)
|
|
90
|
+
|
|
91
|
+
scheduler/cjs/scheduler.production.js:
|
|
92
|
+
(**
|
|
93
|
+
* @license React
|
|
94
|
+
* scheduler.production.js
|
|
95
|
+
*
|
|
96
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the MIT license found in the
|
|
99
|
+
* LICENSE file in the root directory of this source tree.
|
|
100
|
+
*)
|
|
101
|
+
|
|
102
|
+
react-dom/cjs/react-dom.production.js:
|
|
103
|
+
(**
|
|
104
|
+
* @license React
|
|
105
|
+
* react-dom.production.js
|
|
106
|
+
*
|
|
107
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the MIT license found in the
|
|
110
|
+
* LICENSE file in the root directory of this source tree.
|
|
111
|
+
*)
|
|
112
|
+
|
|
113
|
+
react-dom/cjs/react-dom-client.production.js:
|
|
114
|
+
(**
|
|
115
|
+
* @license React
|
|
116
|
+
* react-dom-client.production.js
|
|
117
|
+
*
|
|
118
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the MIT license found in the
|
|
121
|
+
* LICENSE file in the root directory of this source tree.
|
|
122
|
+
*)
|
|
123
|
+
|
|
124
|
+
lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs:
|
|
125
|
+
lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs:
|
|
126
|
+
lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs:
|
|
127
|
+
lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs:
|
|
128
|
+
lucide-react/dist/esm/defaultAttributes.mjs:
|
|
129
|
+
lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs:
|
|
130
|
+
lucide-react/dist/esm/context.mjs:
|
|
131
|
+
lucide-react/dist/esm/Icon.mjs:
|
|
132
|
+
lucide-react/dist/esm/createLucideIcon.mjs:
|
|
133
|
+
lucide-react/dist/esm/icons/bot.mjs:
|
|
134
|
+
lucide-react/dist/esm/icons/chevron-right.mjs:
|
|
135
|
+
lucide-react/dist/esm/icons/circle-check.mjs:
|
|
136
|
+
lucide-react/dist/esm/icons/circle-stop.mjs:
|
|
137
|
+
lucide-react/dist/esm/icons/file-text.mjs:
|
|
138
|
+
lucide-react/dist/esm/icons/mic-off.mjs:
|
|
139
|
+
lucide-react/dist/esm/icons/mic.mjs:
|
|
140
|
+
lucide-react/dist/esm/icons/phone-off.mjs:
|
|
141
|
+
lucide-react/dist/esm/icons/phone.mjs:
|
|
142
|
+
lucide-react/dist/esm/icons/plus.mjs:
|
|
143
|
+
lucide-react/dist/esm/icons/refresh-ccw.mjs:
|
|
144
|
+
lucide-react/dist/esm/icons/send.mjs:
|
|
145
|
+
lucide-react/dist/esm/icons/shield-check.mjs:
|
|
146
|
+
lucide-react/dist/esm/icons/star.mjs:
|
|
147
|
+
lucide-react/dist/esm/icons/x.mjs:
|
|
148
|
+
lucide-react/dist/esm/lucide-react.mjs:
|
|
149
|
+
(**
|
|
150
|
+
* @license lucide-react v1.34.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*)
|
|
155
|
+
|
|
156
|
+
react/cjs/react-jsx-runtime.production.js:
|
|
157
|
+
(**
|
|
158
|
+
* @license React
|
|
159
|
+
* react-jsx-runtime.production.js
|
|
160
|
+
*
|
|
161
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the MIT license found in the
|
|
164
|
+
* LICENSE file in the root directory of this source tree.
|
|
165
|
+
*)
|
|
166
|
+
*/
|