var Rp=Object.defineProperty;var Pp=(e,t,n)=>t in e?Rp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Zn=(e,t,n)=>(Pp(e,typeof t!="symbol"?t+"":t,n),n);function Np(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Lp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wc={exports:{}},mi={},Sc={exports:{}},$={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var br=Symbol.for("react.element"),_p=Symbol.for("react.portal"),Up=Symbol.for("react.fragment"),Op=Symbol.for("react.strict_mode"),Fp=Symbol.for("react.profiler"),Ap=Symbol.for("react.provider"),Dp=Symbol.for("react.context"),Mp=Symbol.for("react.forward_ref"),$p=Symbol.for("react.suspense"),Ip=Symbol.for("react.memo"),zp=Symbol.for("react.lazy"),bs=Symbol.iterator;function Bp(e){return e===null||typeof e!="object"?null:(e=bs&&e[bs]||e["@@iterator"],typeof e=="function"?e:null)}var Ec={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kc=Object.assign,Cc={};function Wn(e,t,n){this.props=e,this.context=t,this.refs=Cc,this.updater=n||Ec}Wn.prototype.isReactComponent={};Wn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Wn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xc(){}xc.prototype=Wn.prototype;function Au(e,t,n){this.props=e,this.context=t,this.refs=Cc,this.updater=n||Ec}var Du=Au.prototype=new xc;Du.constructor=Au;kc(Du,Wn.prototype);Du.isPureReactComponent=!0;var Ws=Array.isArray,Tc=Object.prototype.hasOwnProperty,Mu={current:null},Rc={key:!0,ref:!0,__self:!0,__source:!0};function Pc(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)Tc.call(t,r)&&!Rc.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(u===1)o.children=n;else if(1>>1,H=L[j];if(0>>1;jo(Jn,O))ato(vn,Jn)?(L[j]=vn,L[at]=O,j=at):(L[j]=Jn,L[oe]=O,j=oe);else if(ato(vn,O))L[j]=vn,L[at]=O,j=at;else break e}}return U}function o(L,U){var O=L.sortIndex-U.sortIndex;return O!==0?O:L.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var s=[],a=[],c=1,f=null,h=3,v=!1,y=!1,g=!1,k=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(L){for(var U=n(a);U!==null;){if(U.callback===null)r(a);else if(U.startTime<=L)r(a),U.sortIndex=U.expirationTime,t(s,U);else break;U=n(a)}}function E(L){if(g=!1,p(L),!y)if(n(s)!==null)y=!0,Yt(T);else{var U=n(a);U!==null&&We(E,U.startTime-L)}}function T(L,U){y=!1,g&&(g=!1,m(N),N=-1),v=!0;var O=h;try{for(p(U),f=n(s);f!==null&&(!(f.expirationTime>U)||L&&!ue());){var j=f.callback;if(typeof j=="function"){f.callback=null,h=f.priorityLevel;var H=j(f.expirationTime<=U);U=e.unstable_now(),typeof H=="function"?f.callback=H:f===n(s)&&r(s),p(U)}else r(s);f=n(s)}if(f!==null)var xt=!0;else{var oe=n(a);oe!==null&&We(E,oe.startTime-U),xt=!1}return xt}finally{f=null,h=O,v=!1}}var x=!1,P=null,N=-1,F=5,A=-1;function ue(){return!(e.unstable_now()-AL||125j?(L.sortIndex=O,t(a,L),n(s)===null&&L===n(a)&&(g?(m(N),N=-1):g=!0,We(E,O-j))):(L.sortIndex=H,t(s,L),y||v||(y=!0,Yt(T))),L},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(L){var U=h;return function(){var O=h;h=U;try{return L.apply(this,arguments)}finally{h=O}}}})(Oc);Uc.exports=Oc;var Yp=Uc.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Jp=w,Le=Yp;function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nl=Object.prototype.hasOwnProperty,Zp=/^[: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]*$/,Ks={},qs={};function em(e){return Nl.call(qs,e)?!0:Nl.call(Ks,e)?!1:Zp.test(e)?qs[e]=!0:(Ks[e]=!0,!1)}function tm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function nm(e,t,n,r){if(t===null||typeof t>"u"||tm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function we(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var ce={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ce[e]=new we(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ce[t]=new we(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ce[e]=new we(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ce[e]=new we(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ce[e]=new we(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ce[e]=new we(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ce[e]=new we(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ce[e]=new we(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ce[e]=new we(e,5,!1,e.toLowerCase(),null,!1,!1)});var zu=/[\-:]([a-z])/g;function Bu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(zu,Bu);ce[t]=new we(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(zu,Bu);ce[t]=new we(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(zu,Bu);ce[t]=new we(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ce[e]=new we(e,1,!1,e.toLowerCase(),null,!1,!1)});ce.xlinkHref=new we("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ce[e]=new we(e,1,!1,e.toLowerCase(),null,!0,!0)});function ju(e,t,n,r){var o=ce.hasOwnProperty(t)?ce[t]:null;(o!==null?o.type!==0:r||!(2u||o[l]!==i[u]){var s=` `+o[l].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=l&&0<=u);break}}}finally{Vi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fr(e):""}function rm(e){switch(e.tag){case 5:return fr(e.type);case 16:return fr("Lazy");case 13:return fr("Suspense");case 19:return fr("SuspenseList");case 0:case 2:case 15:return e=bi(e.type,!1),e;case 11:return e=bi(e.type.render,!1),e;case 1:return e=bi(e.type,!0),e;default:return""}}function Ol(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case En:return"Fragment";case Sn:return"Portal";case Ll:return"Profiler";case Hu:return"StrictMode";case _l:return"Suspense";case Ul:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Dc:return(e.displayName||"Context")+".Consumer";case Ac:return(e._context.displayName||"Context")+".Provider";case Vu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bu:return t=e.displayName||null,t!==null?t:Ol(e.type)||"Memo";case Nt:t=e._payload,e=e._init;try{return Ol(e(t))}catch{}}return null}function om(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ol(t);case 8:return t===Hu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Qt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $c(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function im(e){var t=$c(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function no(e){e._valueTracker||(e._valueTracker=im(e))}function Ic(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$c(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Fl(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Xs(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Qt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zc(e,t){t=t.checked,t!=null&&ju(e,"checked",t,!1)}function Al(e,t){zc(e,t);var n=Qt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Dl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Dl(e,t.type,Qt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ys(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Dl(e,t,n){(t!=="number"||Mo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var dr=Array.isArray;function On(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=ro.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var yr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lm=["Webkit","ms","Moz","O"];Object.keys(yr).forEach(function(e){lm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),yr[t]=yr[e]})});function Vc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||yr.hasOwnProperty(e)&&yr[e]?(""+t).trim():t+"px"}function bc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Vc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var um=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Il(e,t){if(t){if(um[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function zl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Bl=null;function Wu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jl=null,Fn=null,An=null;function ea(e){if(e=Kr(e)){if(typeof jl!="function")throw Error(C(280));var t=e.stateNode;t&&(t=wi(t),jl(e.stateNode,e.type,t))}}function Wc(e){Fn?An?An.push(e):An=[e]:Fn=e}function Qc(){if(Fn){var e=Fn,t=An;if(An=Fn=null,ea(e),t)for(e=0;e>>=0,e===0?32:31-(vm(e)/wm|0)|0}var oo=64,io=4194304;function pr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var u=l&~o;u!==0?r=pr(u):(i&=l,i!==0&&(r=pr(i)))}else l=n&~o,l!==0?r=pr(l):i!==0&&(r=pr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Wr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xe(t),e[t]=n}function Cm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=vr),aa=String.fromCharCode(32),ca=!1;function pf(e,t){switch(e){case"keyup":return Ym.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kn=!1;function Zm(e,t){switch(e){case"compositionend":return mf(t);case"keypress":return t.which!==32?null:(ca=!0,aa);case"textInput":return e=t.data,e===aa&&ca?null:e;default:return null}}function eh(e,t){if(kn)return e==="compositionend"||!Zu&&pf(e,t)?(e=ff(),Co=Xu=Ft=null,kn=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ma(n)}}function vf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wf(){for(var e=window,t=Mo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mo(e.document)}return t}function es(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ah(e){var t=wf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&vf(n.ownerDocument.documentElement,n)){if(r!==null&&es(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ha(n,i);var l=ha(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Cn=null,Kl=null,Sr=null,ql=!1;function ya(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ql||Cn==null||Cn!==Mo(r)||(r=Cn,"selectionStart"in r&&es(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Sr&&Fr(Sr,r)||(Sr=r,r=Vo(Kl,"onSelect"),0Rn||(e.current=eu[Rn],eu[Rn]=null,Rn--)}function V(e,t){Rn++,eu[Rn]=e.current,e.current=t}var Kt={},he=Gt(Kt),ke=Gt(!1),an=Kt;function zn(e,t){var n=e.type.contextTypes;if(!n)return Kt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ce(e){return e=e.childContextTypes,e!=null}function Wo(){W(ke),W(he)}function Ca(e,t,n){if(he.current!==Kt)throw Error(C(168));V(he,t),V(ke,n)}function Nf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(C(108,om(e)||"Unknown",o));return X({},n,r)}function Qo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kt,an=he.current,V(he,e),V(ke,ke.current),!0}function xa(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=Nf(e,t,an),r.__reactInternalMemoizedMergedChildContext=e,W(ke),W(he),V(he,e)):W(ke),V(ke,n)}var dt=null,Si=!1,ol=!1;function Lf(e){dt===null?dt=[e]:dt.push(e)}function Eh(e){Si=!0,Lf(e)}function Xt(){if(!ol&&dt!==null){ol=!0;var e=0,t=B;try{var n=dt;for(B=1;e>=l,o-=l,pt=1<<32-Xe(t)+o|n<N?(F=P,P=null):F=P.sibling;var A=h(m,P,p[N],E);if(A===null){P===null&&(P=F);break}e&&P&&A.alternate===null&&t(m,P),d=i(A,d,N),x===null?T=A:x.sibling=A,x=A,P=F}if(N===p.length)return n(m,P),Q&&Jt(m,N),T;if(P===null){for(;NN?(F=P,P=null):F=P.sibling;var ue=h(m,P,A.value,E);if(ue===null){P===null&&(P=F);break}e&&P&&ue.alternate===null&&t(m,P),d=i(ue,d,N),x===null?T=ue:x.sibling=ue,x=ue,P=F}if(A.done)return n(m,P),Q&&Jt(m,N),T;if(P===null){for(;!A.done;N++,A=p.next())A=f(m,A.value,E),A!==null&&(d=i(A,d,N),x===null?T=A:x.sibling=A,x=A);return Q&&Jt(m,N),T}for(P=r(m,P);!A.done;N++,A=p.next())A=v(P,m,N,A.value,E),A!==null&&(e&&A.alternate!==null&&P.delete(A.key===null?N:A.key),d=i(A,d,N),x===null?T=A:x.sibling=A,x=A);return e&&P.forEach(function(Fe){return t(m,Fe)}),Q&&Jt(m,N),T}function k(m,d,p,E){if(typeof p=="object"&&p!==null&&p.type===En&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case to:e:{for(var T=p.key,x=d;x!==null;){if(x.key===T){if(T=p.type,T===En){if(x.tag===7){n(m,x.sibling),d=o(x,p.props.children),d.return=m,m=d;break e}}else if(x.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Nt&&Pa(T)===x.type){n(m,x.sibling),d=o(x,p.props),d.ref=ir(m,x,p),d.return=m,m=d;break e}n(m,x);break}else t(m,x);x=x.sibling}p.type===En?(d=un(p.props.children,m.mode,E,p.key),d.return=m,m=d):(E=Uo(p.type,p.key,p.props,null,m.mode,E),E.ref=ir(m,d,p),E.return=m,m=E)}return l(m);case Sn:e:{for(x=p.key;d!==null;){if(d.key===x)if(d.tag===4&&d.stateNode.containerInfo===p.containerInfo&&d.stateNode.implementation===p.implementation){n(m,d.sibling),d=o(d,p.children||[]),d.return=m,m=d;break e}else{n(m,d);break}else t(m,d);d=d.sibling}d=dl(p,m.mode,E),d.return=m,m=d}return l(m);case Nt:return x=p._init,k(m,d,x(p._payload),E)}if(dr(p))return y(m,d,p,E);if(er(p))return g(m,d,p,E);po(m,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,d!==null&&d.tag===6?(n(m,d.sibling),d=o(d,p),d.return=m,m=d):(n(m,d),d=fl(p,m.mode,E),d.return=m,m=d),l(m)):n(m,d)}return k}var jn=Ff(!0),Af=Ff(!1),Go=Gt(null),Xo=null,Ln=null,os=null;function is(){os=Ln=Xo=null}function ls(e){var t=Go.current;W(Go),e._currentValue=t}function ru(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Mn(e,t){Xo=e,os=Ln=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ee=!0),e.firstContext=null)}function Be(e){var t=e._currentValue;if(os!==e)if(e={context:e,memoizedValue:t,next:null},Ln===null){if(Xo===null)throw Error(C(308));Ln=e,Xo.dependencies={lanes:0,firstContext:e}}else Ln=Ln.next=e;return t}var nn=null;function us(e){nn===null?nn=[e]:nn.push(e)}function Df(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,us(t)):(n.next=o.next,o.next=n),t.interleaved=n,St(e,r)}function St(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Lt=!1;function ss(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ht(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ht(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,I&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,St(e,n)}return o=r.interleaved,o===null?(t.next=t,us(r)):(t.next=o.next,o.next=t),r.interleaved=t,St(e,n)}function To(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ku(e,n)}}function Na(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Yo(e,t,n,r){var o=e.updateQueue;Lt=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,u=o.shared.pending;if(u!==null){o.shared.pending=null;var s=u,a=s.next;s.next=null,l===null?i=a:l.next=a,l=s;var c=e.alternate;c!==null&&(c=c.updateQueue,u=c.lastBaseUpdate,u!==l&&(u===null?c.firstBaseUpdate=a:u.next=a,c.lastBaseUpdate=s))}if(i!==null){var f=o.baseState;l=0,c=a=s=null,u=i;do{var h=u.lane,v=u.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:v,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var y=e,g=u;switch(h=t,v=n,g.tag){case 1:if(y=g.payload,typeof y=="function"){f=y.call(v,f,h);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,h=typeof y=="function"?y.call(v,f,h):y,h==null)break e;f=X({},f,h);break e;case 2:Lt=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[u]:h.push(u))}else v={eventTime:v,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},c===null?(a=c=v,s=f):c=c.next=v,l|=h;if(u=u.next,u===null){if(u=o.shared.pending,u===null)break;h=u,u=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(1);if(c===null&&(s=f),o.baseState=s,o.firstBaseUpdate=a,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);dn|=l,e.lanes=l,e.memoizedState=f}}function La(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ll.transition;ll.transition={};try{e(!1),t()}finally{B=n,ll.transition=r}}function Zf(){return je().memoizedState}function Th(e,t,n){var r=bt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ed(e))td(t,n);else if(n=Df(e,t,n,r),n!==null){var o=ge();Ye(n,e,r,o),nd(n,t,r)}}function Rh(e,t,n){var r=bt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ed(e))td(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,u=i(l,n);if(o.hasEagerState=!0,o.eagerState=u,et(u,l)){var s=t.interleaved;s===null?(o.next=o,us(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=Df(e,t,o,r),n!==null&&(o=ge(),Ye(n,e,r,o),nd(n,t,r))}}function ed(e){var t=e.alternate;return e===G||t!==null&&t===G}function td(e,t){Er=Zo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ku(e,n)}}var ei={readContext:Be,useCallback:fe,useContext:fe,useEffect:fe,useImperativeHandle:fe,useInsertionEffect:fe,useLayoutEffect:fe,useMemo:fe,useReducer:fe,useRef:fe,useState:fe,useDebugValue:fe,useDeferredValue:fe,useTransition:fe,useMutableSource:fe,useSyncExternalStore:fe,useId:fe,unstable_isNewReconciler:!1},Ph={readContext:Be,useCallback:function(e,t){return ot().memoizedState=[e,t===void 0?null:t],e},useContext:Be,useEffect:Ua,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Po(4194308,4,qf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Po(4194308,4,e,t)},useInsertionEffect:function(e,t){return Po(4,2,e,t)},useMemo:function(e,t){var n=ot();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ot();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Th.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=ot();return e={current:e},t.memoizedState=e},useState:_a,useDebugValue:ys,useDeferredValue:function(e){return ot().memoizedState=e},useTransition:function(){var e=_a(!1),t=e[0];return e=xh.bind(null,e[1]),ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=G,o=ot();if(Q){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),le===null)throw Error(C(349));fn&30||Bf(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ua(Hf.bind(null,r,i,e),[e]),r.flags|=2048,jr(9,jf.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ot(),t=le.identifierPrefix;if(Q){var n=mt,r=pt;n=(r&~(1<<32-Xe(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[it]=t,e[Mr]=r,dd(e,t,!1,!1),t.stateNode=e;e:{switch(l=zl(n,r),n){case"dialog":b("cancel",e),b("close",e),o=r;break;case"iframe":case"object":case"embed":b("load",e),o=r;break;case"video":case"audio":for(o=0;obn&&(t.flags|=128,r=!0,lr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Jo(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Q)return de(t),null}else 2*Z()-i.renderingStartTime>bn&&n!==1073741824&&(t.flags|=128,r=!0,lr(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Z(),t.sibling=null,n=q.current,V(q,r?n&1|2:n&1),t):(de(t),null);case 22:case 23:return ks(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Te&1073741824&&(de(t),t.subtreeFlags&6&&(t.flags|=8192)):de(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function Dh(e,t){switch(ns(t),t.tag){case 1:return Ce(t.type)&&Wo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hn(),W(ke),W(he),fs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cs(t),null;case 13:if(W(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));Bn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(q),null;case 4:return Hn(),null;case 10:return ls(t.type._context),null;case 22:case 23:return ks(),null;case 24:return null;default:return null}}var ho=!1,pe=!1,Mh=typeof WeakSet=="function"?WeakSet:Set,_=null;function _n(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){J(e,t,r)}else n.current=null}function du(e,t,n){try{n()}catch(r){J(e,t,r)}}var Ha=!1;function $h(e,t){if(Gl=jo,e=wf(),es(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,u=-1,s=-1,a=0,c=0,f=e,h=null;t:for(;;){for(var v;f!==n||o!==0&&f.nodeType!==3||(u=l+o),f!==i||r!==0&&f.nodeType!==3||(s=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(v=f.firstChild)!==null;)h=f,f=v;for(;;){if(f===e)break t;if(h===n&&++a===o&&(u=l),h===i&&++c===r&&(s=l),(v=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=v}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xl={focusedElem:e,selectionRange:n},jo=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,k=y.memoizedState,m=t.stateNode,d=m.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ke(t.type,g),k);m.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(E){J(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return y=Ha,Ha=!1,y}function kr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&du(t,n,i)}o=o.next}while(o!==r)}}function Ci(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function pu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function hd(e){var t=e.alternate;t!==null&&(e.alternate=null,hd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[it],delete t[Mr],delete t[Zl],delete t[wh],delete t[Sh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function yd(e){return e.tag===5||e.tag===3||e.tag===4}function Va(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yd(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.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 mu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bo));else if(r!==4&&(e=e.child,e!==null))for(mu(e,t,n),e=e.sibling;e!==null;)mu(e,t,n),e=e.sibling}function hu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(hu(e,t,n),e=e.sibling;e!==null;)hu(e,t,n),e=e.sibling}var se=null,qe=!1;function Tt(e,t,n){for(n=n.child;n!==null;)gd(e,t,n),n=n.sibling}function gd(e,t,n){if(lt&&typeof lt.onCommitFiberUnmount=="function")try{lt.onCommitFiberUnmount(hi,n)}catch{}switch(n.tag){case 5:pe||_n(n,t);case 6:var r=se,o=qe;se=null,Tt(e,t,n),se=r,qe=o,se!==null&&(qe?(e=se,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):se.removeChild(n.stateNode));break;case 18:se!==null&&(qe?(e=se,n=n.stateNode,e.nodeType===8?rl(e.parentNode,n):e.nodeType===1&&rl(e,n),Ur(e)):rl(se,n.stateNode));break;case 4:r=se,o=qe,se=n.stateNode.containerInfo,qe=!0,Tt(e,t,n),se=r,qe=o;break;case 0:case 11:case 14:case 15:if(!pe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&du(n,t,l),o=o.next}while(o!==r)}Tt(e,t,n);break;case 1:if(!pe&&(_n(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){J(n,t,u)}Tt(e,t,n);break;case 21:Tt(e,t,n);break;case 22:n.mode&1?(pe=(r=pe)||n.memoizedState!==null,Tt(e,t,n),pe=r):Tt(e,t,n);break;default:Tt(e,t,n)}}function ba(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Mh),t.forEach(function(r){var o=Qh.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Qe(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=Z()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*zh(r/1960))-r,10e?16:e,At===null)var r=!1;else{if(e=At,At=null,ri=0,I&6)throw Error(C(331));var o=I;for(I|=4,_=e.current;_!==null;){var i=_,l=i.child;if(_.flags&16){var u=i.deletions;if(u!==null){for(var s=0;sZ()-Ss?ln(e,0):ws|=n),xe(e,t)}function Td(e,t){t===0&&(e.mode&1?(t=io,io<<=1,!(io&130023424)&&(io=4194304)):t=1);var n=ge();e=St(e,t),e!==null&&(Wr(e,t,n),xe(e,n))}function Wh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Td(e,n)}function Qh(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(C(314))}r!==null&&r.delete(t),Td(e,n)}var Rd;Rd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ke.current)Ee=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ee=!1,Fh(e,t,n);Ee=!!(e.flags&131072)}else Ee=!1,Q&&t.flags&1048576&&_f(t,qo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;No(e,t),e=t.pendingProps;var o=zn(t,he.current);Mn(t,n),o=ps(null,t,r,e,o,n);var i=ms();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ce(r)?(i=!0,Qo(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ss(t),o.updater=ki,t.stateNode=o,o._reactInternals=t,iu(t,r,e,n),t=su(null,t,r,!0,i,n)):(t.tag=0,Q&&i&&ts(t),ye(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(No(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=qh(r),e=Ke(r,e),o){case 0:t=uu(null,t,r,e,n);break e;case 1:t=za(null,t,r,e,n);break e;case 11:t=$a(null,t,r,e,n);break e;case 14:t=Ia(null,t,r,Ke(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ke(r,o),uu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ke(r,o),za(e,t,r,o,n);case 3:e:{if(ad(t),e===null)throw Error(C(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Mf(e,t),Yo(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Vn(Error(C(423)),t),t=Ba(e,t,r,n,o);break e}else if(r!==o){o=Vn(Error(C(424)),t),t=Ba(e,t,r,n,o);break e}else for(Pe=jt(t.stateNode.containerInfo.firstChild),Ne=t,Q=!0,Ge=null,n=Af(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Bn(),r===o){t=Et(e,t,n);break e}ye(e,t,r,n)}t=t.child}return t;case 5:return $f(t),e===null&&nu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,Yl(r,o)?l=null:i!==null&&Yl(r,i)&&(t.flags|=32),sd(e,t),ye(e,t,l,n),t.child;case 6:return e===null&&nu(t),null;case 13:return cd(e,t,n);case 4:return as(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=jn(t,null,r,n):ye(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ke(r,o),$a(e,t,r,o,n);case 7:return ye(e,t,t.pendingProps,n),t.child;case 8:return ye(e,t,t.pendingProps.children,n),t.child;case 12:return ye(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,V(Go,r._currentValue),r._currentValue=l,i!==null)if(et(i.value,l)){if(i.children===o.children&&!ke.current){t=Et(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){l=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=ht(-1,n&-n),s.tag=2;var a=i.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),ru(i.return,n,t),u.lanes|=n;break}s=s.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(C(341));l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),ru(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}ye(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Mn(t,n),o=Be(o),r=r(o),t.flags|=1,ye(e,t,r,n),t.child;case 14:return r=t.type,o=Ke(r,t.pendingProps),o=Ke(r.type,o),Ia(e,t,r,o,n);case 15:return ld(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ke(r,o),No(e,t),t.tag=1,Ce(r)?(e=!0,Qo(t)):e=!1,Mn(t,n),rd(t,r,o),iu(t,r,o,n),su(null,t,r,!0,e,n);case 19:return fd(e,t,n);case 22:return ud(e,t,n)}throw Error(C(156,t.tag))};function Pd(e,t){return Zc(e,t)}function Kh(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $e(e,t,n,r){return new Kh(e,t,n,r)}function xs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qh(e){if(typeof e=="function")return xs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vu)return 11;if(e===bu)return 14}return 2}function Wt(e,t){var n=e.alternate;return n===null?(n=$e(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Uo(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")xs(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case En:return un(n.children,o,i,t);case Hu:l=8,o|=8;break;case Ll:return e=$e(12,n,t,o|2),e.elementType=Ll,e.lanes=i,e;case _l:return e=$e(13,n,t,o),e.elementType=_l,e.lanes=i,e;case Ul:return e=$e(19,n,t,o),e.elementType=Ul,e.lanes=i,e;case Mc:return Ti(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ac:l=10;break e;case Dc:l=9;break e;case Vu:l=11;break e;case bu:l=14;break e;case Nt:l=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=$e(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function un(e,t,n,r){return e=$e(7,e,r,t),e.lanes=n,e}function Ti(e,t,n,r){return e=$e(22,e,r,t),e.elementType=Mc,e.lanes=n,e.stateNode={isHidden:!1},e}function fl(e,t,n){return e=$e(6,e,null,t),e.lanes=n,e}function dl(e,t,n){return t=$e(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Gh(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qi(0),this.expirationTimes=Qi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qi(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ts(e,t,n,r,o,i,l,u,s){return e=new Gh(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=$e(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ss(i),e}function Xh(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ud)}catch(e){console.error(e)}}Ud(),_c.exports=_e;var Od=_c.exports,Ja=Od;Pl.createRoot=Ja.createRoot,Pl.hydrateRoot=Ja.hydrateRoot;function Fd(e,t){return function(){return e.apply(t,arguments)}}const{toString:t0}=Object.prototype,{getPrototypeOf:Ls}=Object,_i=(e=>t=>{const n=t0.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),tt=e=>(e=e.toLowerCase(),t=>_i(t)===e),Ui=e=>t=>typeof t===e,{isArray:qn}=Array,Vr=Ui("undefined");function n0(e){return e!==null&&!Vr(e)&&e.constructor!==null&&!Vr(e.constructor)&&ze(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ad=tt("ArrayBuffer");function r0(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ad(e.buffer),t}const o0=Ui("string"),ze=Ui("function"),Dd=Ui("number"),Oi=e=>e!==null&&typeof e=="object",i0=e=>e===!0||e===!1,Oo=e=>{if(_i(e)!=="object")return!1;const t=Ls(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},l0=tt("Date"),u0=tt("File"),s0=tt("Blob"),a0=tt("FileList"),c0=e=>Oi(e)&&ze(e.pipe),f0=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ze(e.append)&&((t=_i(e))==="formdata"||t==="object"&&ze(e.toString)&&e.toString()==="[object FormData]"))},d0=tt("URLSearchParams"),[p0,m0,h0,y0]=["ReadableStream","Request","Response","Headers"].map(tt),g0=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Gr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),qn(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const $d=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Id=e=>!Vr(e)&&e!==$d;function Su(){const{caseless:e}=Id(this)&&this||{},t={},n=(r,o)=>{const i=e&&Md(t,o)||o;Oo(t[i])&&Oo(r)?t[i]=Su(t[i],r):Oo(r)?t[i]=Su({},r):qn(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(Gr(t,(o,i)=>{n&&ze(o)?e[i]=Fd(o,n):e[i]=o},{allOwnKeys:r}),e),w0=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),S0=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},E0=(e,t,n,r)=>{let o,i,l;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)l=o[i],(!r||r(l,e,t))&&!u[l]&&(t[l]=e[l],u[l]=!0);e=n!==!1&&Ls(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},k0=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},C0=e=>{if(!e)return null;if(qn(e))return e;let t=e.length;if(!Dd(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},x0=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ls(Uint8Array)),T0=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},R0=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},P0=tt("HTMLFormElement"),N0=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Za=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),L0=tt("RegExp"),zd=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Gr(n,(o,i)=>{let l;(l=t(o,i,e))!==!1&&(r[i]=l||o)}),Object.defineProperties(e,r)},_0=e=>{zd(e,(t,n)=>{if(ze(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ze(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},U0=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return qn(e)?r(e):r(String(e).split(t)),n},O0=()=>{},F0=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,pl="abcdefghijklmnopqrstuvwxyz",ec="0123456789",Bd={DIGIT:ec,ALPHA:pl,ALPHA_DIGIT:pl+pl.toUpperCase()+ec},A0=(e=16,t=Bd.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function D0(e){return!!(e&&ze(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const M0=e=>{const t=new Array(10),n=(r,o)=>{if(Oi(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=qn(r)?[]:{};return Gr(r,(l,u)=>{const s=n(l,o+1);!Vr(s)&&(i[u]=s)}),t[o]=void 0,i}}return r};return n(e,0)},$0=tt("AsyncFunction"),I0=e=>e&&(Oi(e)||ze(e))&&ze(e.then)&&ze(e.catch),S={isArray:qn,isArrayBuffer:Ad,isBuffer:n0,isFormData:f0,isArrayBufferView:r0,isString:o0,isNumber:Dd,isBoolean:i0,isObject:Oi,isPlainObject:Oo,isReadableStream:p0,isRequest:m0,isResponse:h0,isHeaders:y0,isUndefined:Vr,isDate:l0,isFile:u0,isBlob:s0,isRegExp:L0,isFunction:ze,isStream:c0,isURLSearchParams:d0,isTypedArray:x0,isFileList:a0,forEach:Gr,merge:Su,extend:v0,trim:g0,stripBOM:w0,inherits:S0,toFlatObject:E0,kindOf:_i,kindOfTest:tt,endsWith:k0,toArray:C0,forEachEntry:T0,matchAll:R0,isHTMLForm:P0,hasOwnProperty:Za,hasOwnProp:Za,reduceDescriptors:zd,freezeMethods:_0,toObjectSet:U0,toCamelCase:N0,noop:O0,toFiniteNumber:F0,findKey:Md,global:$d,isContextDefined:Id,ALPHABET:Bd,generateString:A0,isSpecCompliantForm:D0,toJSONObject:M0,isAsyncFn:$0,isThenable:I0};function D(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}S.inherits(D,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:S.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const jd=D.prototype,Hd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Hd[e]={value:e}});Object.defineProperties(D,Hd);Object.defineProperty(jd,"isAxiosError",{value:!0});D.from=(e,t,n,r,o,i)=>{const l=Object.create(jd);return S.toFlatObject(e,l,function(s){return s!==Error.prototype},u=>u!=="isAxiosError"),D.call(l,e.message,t,n,r,o),l.cause=e,l.name=e.name,i&&Object.assign(l,i),l};const z0=null;function Eu(e){return S.isPlainObject(e)||S.isArray(e)}function Vd(e){return S.endsWith(e,"[]")?e.slice(0,-2):e}function tc(e,t,n){return e?e.concat(t).map(function(o,i){return o=Vd(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function B0(e){return S.isArray(e)&&!e.some(Eu)}const j0=S.toFlatObject(S,{},null,function(t){return/^is[A-Z]/.test(t)});function Fi(e,t,n){if(!S.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=S.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,k){return!S.isUndefined(k[g])});const r=n.metaTokens,o=n.visitor||c,i=n.dots,l=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&S.isSpecCompliantForm(t);if(!S.isFunction(o))throw new TypeError("visitor must be a function");function a(y){if(y===null)return"";if(S.isDate(y))return y.toISOString();if(!s&&S.isBlob(y))throw new D("Blob is not supported. Use a Buffer instead.");return S.isArrayBuffer(y)||S.isTypedArray(y)?s&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function c(y,g,k){let m=y;if(y&&!k&&typeof y=="object"){if(S.endsWith(g,"{}"))g=r?g:g.slice(0,-2),y=JSON.stringify(y);else if(S.isArray(y)&&B0(y)||(S.isFileList(y)||S.endsWith(g,"[]"))&&(m=S.toArray(y)))return g=Vd(g),m.forEach(function(p,E){!(S.isUndefined(p)||p===null)&&t.append(l===!0?tc([g],E,i):l===null?g:g+"[]",a(p))}),!1}return Eu(y)?!0:(t.append(tc(k,g,i),a(y)),!1)}const f=[],h=Object.assign(j0,{defaultVisitor:c,convertValue:a,isVisitable:Eu});function v(y,g){if(!S.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(y),S.forEach(y,function(m,d){(!(S.isUndefined(m)||m===null)&&o.call(t,m,S.isString(d)?d.trim():d,g,h))===!0&&v(m,g?g.concat(d):[d])}),f.pop()}}if(!S.isObject(e))throw new TypeError("data must be an object");return v(e),t}function nc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function _s(e,t){this._pairs=[],e&&Fi(e,this,t)}const bd=_s.prototype;bd.append=function(t,n){this._pairs.push([t,n])};bd.toString=function(t){const n=t?function(r){return t.call(this,r,nc)}:nc;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function H0(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wd(e,t,n){if(!t)return e;const r=n&&n.encode||H0,o=n&&n.serialize;let i;if(o?i=o(t,n):i=S.isURLSearchParams(t)?t.toString():new _s(t,n).toString(r),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class V0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){S.forEach(this.handlers,function(r){r!==null&&t(r)})}}const rc=V0,Qd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},b0=typeof URLSearchParams<"u"?URLSearchParams:_s,W0=typeof FormData<"u"?FormData:null,Q0=typeof Blob<"u"?Blob:null,K0={isBrowser:!0,classes:{URLSearchParams:b0,FormData:W0,Blob:Q0},protocols:["http","https","file","blob","url","data"]},Us=typeof window<"u"&&typeof document<"u",q0=(e=>Us&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),G0=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),X0=Us&&window.location.href||"http://localhost",Y0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Us,hasStandardBrowserEnv:q0,hasStandardBrowserWebWorkerEnv:G0,origin:X0},Symbol.toStringTag,{value:"Module"})),Je={...Y0,...K0};function J0(e,t){return Fi(e,new Je.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Je.isNode&&S.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Z0(e){return S.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ey(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return l=!l&&S.isArray(o)?o.length:l,s?(S.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!u):((!o[l]||!S.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],i)&&S.isArray(o[l])&&(o[l]=ey(o[l])),!u)}if(S.isFormData(e)&&S.isFunction(e.entries)){const n={};return S.forEachEntry(e,(r,o)=>{t(Z0(r),o,n,0)}),n}return null}function ty(e,t,n){if(S.isString(e))try{return(t||JSON.parse)(e),S.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Os={transitional:Qd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=S.isObject(t);if(i&&S.isHTMLForm(t)&&(t=new FormData(t)),S.isFormData(t))return o?JSON.stringify(Kd(t)):t;if(S.isArrayBuffer(t)||S.isBuffer(t)||S.isStream(t)||S.isFile(t)||S.isBlob(t)||S.isReadableStream(t))return t;if(S.isArrayBufferView(t))return t.buffer;if(S.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return J0(t,this.formSerializer).toString();if((u=S.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Fi(u?{"files[]":t}:t,s&&new s,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),ty(t)):t}],transformResponse:[function(t){const n=this.transitional||Os.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(S.isResponse(t)||S.isReadableStream(t))return t;if(t&&S.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(u){if(l)throw u.name==="SyntaxError"?D.from(u,D.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Je.classes.FormData,Blob:Je.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};S.forEach(["delete","get","head","post","put","patch"],e=>{Os.headers[e]={}});const Fs=Os,ny=S.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ry=e=>{const t={};let n,r,o;return e&&e.split(` `).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!n||t[n]&&ny[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},oc=Symbol("internals");function sr(e){return e&&String(e).trim().toLowerCase()}function Fo(e){return e===!1||e==null?e:S.isArray(e)?e.map(Fo):String(e)}function oy(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const iy=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ml(e,t,n,r,o){if(S.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!S.isString(t)){if(S.isString(r))return t.indexOf(r)!==-1;if(S.isRegExp(r))return r.test(t)}}function ly(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function uy(e,t){const n=S.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,l){return this[r].call(this,t,o,i,l)},configurable:!0})})}class Ai{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(u,s,a){const c=sr(s);if(!c)throw new Error("header name must be a non-empty string");const f=S.findKey(o,c);(!f||o[f]===void 0||a===!0||a===void 0&&o[f]!==!1)&&(o[f||s]=Fo(u))}const l=(u,s)=>S.forEach(u,(a,c)=>i(a,c,s));if(S.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(S.isString(t)&&(t=t.trim())&&!iy(t))l(ry(t),n);else if(S.isHeaders(t))for(const[u,s]of t.entries())i(s,u,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=sr(t),t){const r=S.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return oy(o);if(S.isFunction(n))return n.call(this,o,r);if(S.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=sr(t),t){const r=S.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ml(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(l){if(l=sr(l),l){const u=S.findKey(r,l);u&&(!n||ml(r,r[u],u,n))&&(delete r[u],o=!0)}}return S.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||ml(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return S.forEach(this,(o,i)=>{const l=S.findKey(r,i);if(l){n[l]=Fo(o),delete n[i];return}const u=t?ly(i):String(i).trim();u!==i&&delete n[i],n[u]=Fo(o),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return S.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&S.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[oc]=this[oc]={accessors:{}}).accessors,o=this.prototype;function i(l){const u=sr(l);r[u]||(uy(o,l),r[u]=!0)}return S.isArray(t)?t.forEach(i):i(t),this}}Ai.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.reduceDescriptors(Ai.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});S.freezeMethods(Ai);const Ze=Ai;function hl(e,t){const n=this||Fs,r=t||n,o=Ze.from(r.headers);let i=r.data;return S.forEach(e,function(u){i=u.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function qd(e){return!!(e&&e.__CANCEL__)}function Gn(e,t,n){D.call(this,e??"canceled",D.ERR_CANCELED,t,n),this.name="CanceledError"}S.inherits(Gn,D,{__CANCEL__:!0});function Gd(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function sy(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ay(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,l;return t=t!==void 0?t:1e3,function(s){const a=Date.now(),c=r[i];l||(l=a),n[o]=s,r[o]=a;let f=i,h=0;for(;f!==o;)h+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),a-lr)return o&&(clearTimeout(o),o=null),n=u,e.apply(null,arguments);o||(o=setTimeout(()=>(o=null,n=Date.now(),e.apply(null,arguments)),r-(u-n)))}}const li=(e,t,n=3)=>{let r=0;const o=ay(50,250);return cy(i=>{const l=i.loaded,u=i.lengthComputable?i.total:void 0,s=l-r,a=o(s),c=l<=u;r=l;const f={loaded:l,total:u,progress:u?l/u:void 0,bytes:s,rate:a||void 0,estimated:a&&u&&c?(u-l)/a:void 0,event:i,lengthComputable:u!=null};f[t?"download":"upload"]=!0,e(f)},n)},fy=Je.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let l=i;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(l){const u=S.isString(l)?o(l):l;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}(),dy=Je.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const l=[e+"="+encodeURIComponent(t)];S.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),S.isString(r)&&l.push("path="+r),S.isString(o)&&l.push("domain="+o),i===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function py(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function my(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xd(e,t){return e&&!py(t)?my(e,t):t}const ic=e=>e instanceof Ze?{...e}:e;function mn(e,t){t=t||{};const n={};function r(a,c,f){return S.isPlainObject(a)&&S.isPlainObject(c)?S.merge.call({caseless:f},a,c):S.isPlainObject(c)?S.merge({},c):S.isArray(c)?c.slice():c}function o(a,c,f){if(S.isUndefined(c)){if(!S.isUndefined(a))return r(void 0,a,f)}else return r(a,c,f)}function i(a,c){if(!S.isUndefined(c))return r(void 0,c)}function l(a,c){if(S.isUndefined(c)){if(!S.isUndefined(a))return r(void 0,a)}else return r(void 0,c)}function u(a,c,f){if(f in t)return r(a,c);if(f in e)return r(void 0,a)}const s={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:u,headers:(a,c)=>o(ic(a),ic(c),!0)};return S.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=s[c]||o,h=f(e[c],t[c],c);S.isUndefined(h)&&f!==u||(n[c]=h)}),n}const Yd=e=>{const t=mn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:l,auth:u}=t;t.headers=l=Ze.from(l),t.url=Wd(Xd(t.baseURL,t.url),e.params,e.paramsSerializer),u&&l.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let s;if(S.isFormData(n)){if(Je.hasStandardBrowserEnv||Je.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((s=l.getContentType())!==!1){const[a,...c]=s?s.split(";").map(f=>f.trim()).filter(Boolean):[];l.setContentType([a||"multipart/form-data",...c].join("; "))}}if(Je.hasStandardBrowserEnv&&(r&&S.isFunction(r)&&(r=r(t)),r||r!==!1&&fy(t.url))){const a=o&&i&&dy.read(i);a&&l.set(o,a)}return t},hy=typeof XMLHttpRequest<"u",yy=hy&&function(e){return new Promise(function(n,r){const o=Yd(e);let i=o.data;const l=Ze.from(o.headers).normalize();let{responseType:u}=o,s;function a(){o.cancelToken&&o.cancelToken.unsubscribe(s),o.signal&&o.signal.removeEventListener("abort",s)}let c=new XMLHttpRequest;c.open(o.method.toUpperCase(),o.url,!0),c.timeout=o.timeout;function f(){if(!c)return;const v=Ze.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),g={data:!u||u==="text"||u==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:v,config:e,request:c};Gd(function(m){n(m),a()},function(m){r(m),a()},g),c=null}"onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(f)},c.onabort=function(){c&&(r(new D("Request aborted",D.ECONNABORTED,o,c)),c=null)},c.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,o,c)),c=null},c.ontimeout=function(){let y=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const g=o.transitional||Qd;o.timeoutErrorMessage&&(y=o.timeoutErrorMessage),r(new D(y,g.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,o,c)),c=null},i===void 0&&l.setContentType(null),"setRequestHeader"in c&&S.forEach(l.toJSON(),function(y,g){c.setRequestHeader(g,y)}),S.isUndefined(o.withCredentials)||(c.withCredentials=!!o.withCredentials),u&&u!=="json"&&(c.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&c.addEventListener("progress",li(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",li(o.onUploadProgress)),(o.cancelToken||o.signal)&&(s=v=>{c&&(r(!v||v.type?new Gn(null,e,c):v),c.abort(),c=null)},o.cancelToken&&o.cancelToken.subscribe(s),o.signal&&(o.signal.aborted?s():o.signal.addEventListener("abort",s)));const h=sy(o.url);if(h&&Je.protocols.indexOf(h)===-1){r(new D("Unsupported protocol "+h+":",D.ERR_BAD_REQUEST,e));return}c.send(i||null)})},gy=(e,t)=>{let n=new AbortController,r;const o=function(s){if(!r){r=!0,l();const a=s instanceof Error?s:this.reason;n.abort(a instanceof D?a:new Gn(a instanceof Error?a.message:a))}};let i=t&&setTimeout(()=>{o(new D(`timeout ${t} of ms exceeded`,D.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(s=>{s&&(s.removeEventListener?s.removeEventListener("abort",o):s.unsubscribe(o))}),e=null)};e.forEach(s=>s&&s.addEventListener&&s.addEventListener("abort",o));const{signal:u}=n;return u.unsubscribe=l,[u,()=>{i&&clearTimeout(i),i=null}]},vy=gy,wy=function*(e,t){let n=e.byteLength;if(!t||n{const i=Sy(e,t,o);let l=0;return new ReadableStream({type:"bytes",async pull(u){const{done:s,value:a}=await i.next();if(s){u.close(),r();return}let c=a.byteLength;n&&n(l+=c),u.enqueue(new Uint8Array(a))},cancel(u){return r(u),i.return()}},{highWaterMark:2})},uc=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},Di=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Jd=Di&&typeof ReadableStream=="function",ku=Di&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ey=Jd&&(()=>{let e=!1;const t=new Request(Je.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),sc=64*1024,Cu=Jd&&!!(()=>{try{return S.isReadableStream(new Response("").body)}catch{}})(),ui={stream:Cu&&(e=>e.body)};Di&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ui[t]&&(ui[t]=S.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new D(`Response type '${t}' is not supported`,D.ERR_NOT_SUPPORT,r)})})})(new Response);const ky=async e=>{if(e==null)return 0;if(S.isBlob(e))return e.size;if(S.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(S.isArrayBufferView(e))return e.byteLength;if(S.isURLSearchParams(e)&&(e=e+""),S.isString(e))return(await ku(e)).byteLength},Cy=async(e,t)=>{const n=S.toFiniteNumber(e.getContentLength());return n??ky(t)},xy=Di&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:l,onDownloadProgress:u,onUploadProgress:s,responseType:a,headers:c,withCredentials:f="same-origin",fetchOptions:h}=Yd(e);a=a?(a+"").toLowerCase():"text";let[v,y]=o||i||l?vy([o,i],l):[],g,k;const m=()=>{!g&&setTimeout(()=>{v&&v.unsubscribe()}),g=!0};let d;try{if(s&&Ey&&n!=="get"&&n!=="head"&&(d=await Cy(c,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),P;S.isFormData(r)&&(P=x.headers.get("content-type"))&&c.setContentType(P),x.body&&(r=lc(x.body,sc,uc(d,li(s)),null,ku))}S.isString(f)||(f=f?"cors":"omit"),k=new Request(t,{...h,signal:v,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",withCredentials:f});let p=await fetch(k);const E=Cu&&(a==="stream"||a==="response");if(Cu&&(u||E)){const x={};["status","statusText","headers"].forEach(N=>{x[N]=p[N]});const P=S.toFiniteNumber(p.headers.get("content-length"));p=new Response(lc(p.body,sc,u&&uc(P,li(u,!0)),E&&m,ku),x)}a=a||"text";let T=await ui[S.findKey(ui,a)||"text"](p,e);return!E&&m(),y&&y(),await new Promise((x,P)=>{Gd(x,P,{data:T,headers:Ze.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:k})})}catch(p){throw m(),p&&p.name==="TypeError"&&/fetch/i.test(p.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,e,k),{cause:p.cause||p}):D.from(p,p&&p.code,e,k)}}),xu={http:z0,xhr:yy,fetch:xy};S.forEach(xu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ac=e=>`- ${e}`,Ty=e=>S.isFunction(e)||e===null||e===!1,Zd={getAdapter:e=>{e=S.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${u} `+(s===!1?"is not supported by the environment":"is not available in the build"));let l=t?i.length>1?`since : `+i.map(ac).join(` `):" "+ac(i[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:xu};function yl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gn(null,e)}function cc(e){return yl(e),e.headers=Ze.from(e.headers),e.data=hl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Zd.getAdapter(e.adapter||Fs.adapter)(e).then(function(r){return yl(e),r.data=hl.call(e,e.transformResponse,r),r.headers=Ze.from(r.headers),r},function(r){return qd(r)||(yl(e),r&&r.response&&(r.response.data=hl.call(e,e.transformResponse,r.response),r.response.headers=Ze.from(r.response.headers))),Promise.reject(r)})}const ep="1.7.2",As={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{As[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const fc={};As.transitional=function(t,n,r){function o(i,l){return"[Axios v"+ep+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,u)=>{if(t===!1)throw new D(o(l," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!fc[l]&&(fc[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,u):!0}};function Ry(e,t,n){if(typeof e!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],l=t[i];if(l){const u=e[i],s=u===void 0||l(u,i,e);if(s!==!0)throw new D("option "+i+" must be "+s,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+i,D.ERR_BAD_OPTION)}}const Tu={assertOptions:Ry,validators:As},Rt=Tu.validators;class si{constructor(t){this.defaults=t,this.interceptors={request:new rc,response:new rc}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Tu.assertOptions(r,{silentJSONParsing:Rt.transitional(Rt.boolean),forcedJSONParsing:Rt.transitional(Rt.boolean),clarifyTimeoutError:Rt.transitional(Rt.boolean)},!1),o!=null&&(S.isFunction(o)?n.paramsSerializer={serialize:o}:Tu.assertOptions(o,{encode:Rt.function,serialize:Rt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&S.merge(i.common,i[n.method]);i&&S.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=Ze.concat(l,i);const u=[];let s=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(s=s&&g.synchronous,u.unshift(g.fulfilled,g.rejected))});const a=[];this.interceptors.response.forEach(function(g){a.push(g.fulfilled,g.rejected)});let c,f=0,h;if(!s){const y=[cc.bind(this),void 0];for(y.unshift.apply(y,u),y.push.apply(y,a),h=y.length,c=Promise.resolve(n);f{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const l=new Promise(u=>{r.subscribe(u),i=u}).then(o);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,u){r.reason||(r.reason=new Gn(i,l,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ds(function(o){t=o}),cancel:t}}}const Py=Ds;function Ny(e){return function(n){return e.apply(null,n)}}function Ly(e){return S.isObject(e)&&e.isAxiosError===!0}const Ru={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ru).forEach(([e,t])=>{Ru[t]=e});const _y=Ru;function tp(e){const t=new Ao(e),n=Fd(Ao.prototype.request,t);return S.extend(n,Ao.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return tp(mn(e,o))},n}const te=tp(Fs);te.Axios=Ao;te.CanceledError=Gn;te.CancelToken=Py;te.isCancel=qd;te.VERSION=ep;te.toFormData=Fi;te.AxiosError=D;te.Cancel=te.CanceledError;te.all=function(t){return Promise.all(t)};te.spread=Ny;te.isAxiosError=Ly;te.mergeConfig=mn;te.AxiosHeaders=Ze;te.formToJSON=e=>Kd(S.isHTMLForm(e)?new FormData(e):e);te.getAdapter=Zd.getAdapter;te.HttpStatusCode=_y;te.default=te;const Uy=te;var Oy=Object.defineProperty,Fy=(e,t,n)=>t in e?Oy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gl=(e,t,n)=>(Fy(e,typeof t!="symbol"?t+"":t,n),n);let Ay=class{constructor(){gl(this,"current",this.detect()),gl(this,"handoffState","pending"),gl(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},yt=new Ay,He=(e,t)=>{yt.isServer?w.useEffect(e,t):w.useLayoutEffect(e,t)};function gt(e){let t=w.useRef(e);return He(()=>{t.current=e},[e]),t}let K=function(e){let t=gt(e);return M.useCallback((...n)=>t.current(...n),[t])};function Mi(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function gn(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Mi(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=gn();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Ms(){let[e]=w.useState(gn);return w.useEffect(()=>()=>e.dispose(),[e]),e}function Dy(){let e=typeof document>"u";return"useSyncExternalStore"in Tr?(t=>t.useSyncExternalStore)(Tr)(()=>()=>{},()=>!1,()=>!e):!1}function Xn(){let e=Dy(),[t,n]=w.useState(yt.isHandoffComplete);return t&&yt.isHandoffComplete===!1&&n(!1),w.useEffect(()=>{t!==!0&&n(!0)},[t]),w.useEffect(()=>yt.handoff(),[]),e?!1:t}var dc;let Yn=(dc=M.useId)!=null?dc:function(){let e=Xn(),[t,n]=M.useState(e?()=>yt.nextId():null);return He(()=>{t===null&&n(yt.nextId())},[t]),t!=null?""+t:void 0};function me(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,me),r}function np(e){return yt.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Pu=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var en=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(en||{}),rp=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(rp||{}),My=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(My||{});function $y(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Pu)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var op=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(op||{});function Iy(e,t=0){var n;return e===((n=np(e))==null?void 0:n.body)?!1:me(t,{0(){return e.matches(Pu)},1(){let r=e;for(;r!==null;){if(r.matches(Pu))return!0;r=r.parentElement}return!1}})}var zy=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(zy||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function sn(e){e==null||e.focus({preventScroll:!0})}let By=["textarea","input"].join(",");function jy(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,By))!=null?n:!1}function Hy(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Do(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?Hy(e):e:$y(e);o.length>0&&l.length>1&&(l=l.filter(v=>!o.includes(v))),r=r??i.activeElement;let u=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=t&32?{preventScroll:!0}:{},c=0,f=l.length,h;do{if(c>=f||c+f<=0)return 0;let v=s+c;if(t&16)v=(v+f)%f;else{if(v<0)return 3;if(v>=f)return 1}h=l[v],h==null||h.focus(a),c+=u}while(h!==i.activeElement);return t&6&&jy(h)&&h.select(),2}function ip(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Vy(){return/Android/gi.test(window.navigator.userAgent)}function by(){return ip()||Vy()}function vo(e,t,n){let r=gt(t);w.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function lp(e,t,n){let r=gt(t);w.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function Wy(e,t,n=!0){let r=w.useRef(!1);w.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(l,u){if(!r.current||l.defaultPrevented)return;let s=u(l);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let a=function c(f){return typeof f=="function"?c(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let c of a){if(c===null)continue;let f=c instanceof HTMLElement?c:c.current;if(f!=null&&f.contains(s)||l.composed&&l.composedPath().includes(f))return}return!Iy(s,op.Loose)&&s.tabIndex!==-1&&l.preventDefault(),t(l,s)}let i=w.useRef(null);vo("pointerdown",l=>{var u,s;r.current&&(i.current=((s=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:s[0])||l.target)},!0),vo("mousedown",l=>{var u,s;r.current&&(i.current=((s=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:s[0])||l.target)},!0),vo("click",l=>{by()||i.current&&(o(l,()=>i.current),i.current=null)},!0),vo("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),lp("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Xr(...e){return w.useMemo(()=>np(...e),[...e])}let up=Symbol();function Qy(e,t=!0){return Object.assign(e,{[up]:t})}function nt(...e){let t=w.useRef(e);w.useEffect(()=>{t.current=e},[e]);let n=K(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[up]))?void 0:n}function $s(e,t){let n=w.useRef([]),r=K(e);w.useEffect(()=>{let o=[...n.current];for(let[i,l]of t.entries())if(n.current[i]!==l){let u=r(t,o);return n.current=t,u}},[r,...t])}function ai(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var ci=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ci||{}),Dt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Dt||{});function Ve({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:u}){u=u??Ky;let s=sp(t,e);if(i)return wo(s,n,r,l,u);let a=o??0;if(a&2){let{static:c=!1,...f}=s;if(c)return wo(f,n,r,l,u)}if(a&1){let{unmount:c=!0,...f}=s;return me(c?0:1,{0(){return null},1(){return wo({...f,hidden:!0,style:{display:"none"}},n,r,l,u)}})}return wo(s,n,r,l,u)}function wo(e,t={},n,r,o){let{as:i=n,children:l,refName:u="ref",...s}=vl(e,["unmount","static"]),a=e.ref!==void 0?{[u]:e.ref}:{},c=typeof l=="function"?l(t):l;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t));let f={};if(t){let h=!1,v=[];for(let[y,g]of Object.entries(t))typeof g=="boolean"&&(h=!0),g===!0&&v.push(y);h&&(f["data-headlessui-state"]=v.join(" "))}if(i===w.Fragment&&Object.keys(pc(s)).length>0){if(!w.isValidElement(c)||Array.isArray(c)&&c.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(g=>` - ${g}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(` `)].join(` `));let h=c.props,v=typeof(h==null?void 0:h.className)=="function"?(...g)=>ai(h==null?void 0:h.className(...g),s.className):ai(h==null?void 0:h.className,s.className),y=v?{className:v}:{};return w.cloneElement(c,Object.assign({},sp(c.props,pc(vl(s,["ref"]))),f,a,{ref:o(c.ref,a.ref)},y))}return w.createElement(i,Object.assign({},vl(s,["ref"]),i!==w.Fragment&&a,i!==w.Fragment&&f),c)}function Ky(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function sp(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let u of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;u(o,...i)}}});return t}function Oe(e){var t;return Object.assign(w.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function pc(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function vl(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let qy="div";var fi=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(fi||{});function Gy(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Ve({ourProps:i,theirProps:o,slot:{},defaultTag:qy,name:"Hidden"})}let Nu=Oe(Gy),Is=w.createContext(null);Is.displayName="OpenClosedContext";var Re=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Re||{});function zs(){return w.useContext(Is)}function Xy({value:e,children:t}){return M.createElement(Is.Provider,{value:e},t)}function Yy(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Ot=[];Yy(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Ot[0]!==t.target&&(Ot.unshift(t.target),Ot=Ot.filter(n=>n!=null&&n.isConnected),Ot.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Jy(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Zy(n)?!1:r}function Zy(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}var ap=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ap||{});function cp(e,t,n,r){let o=gt(n);w.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function Yr(){let e=w.useRef(!1);return He(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fp(e){let t=K(e),n=w.useRef(!1);w.useEffect(()=>(n.current=!1,()=>{n.current=!0,Mi(()=>{n.current&&t()})}),[t])}var hr=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(hr||{});function eg(){let e=w.useRef(0);return lp("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function dp(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let tg="div";var pp=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(pp||{});function ng(e,t){let n=w.useRef(null),r=nt(n,t),{initialFocus:o,containers:i,features:l=30,...u}=e;Xn()||(l=1);let s=Xr(n);ig({ownerDocument:s},!!(l&16));let a=lg({ownerDocument:s,container:n,initialFocus:o},!!(l&2));ug({ownerDocument:s,container:n,containers:i,previousActiveElement:a},!!(l&8));let c=eg(),f=K(g=>{let k=n.current;k&&(m=>m())(()=>{me(c.current,{[hr.Forwards]:()=>{Do(k,en.First,{skipElements:[g.relatedTarget]})},[hr.Backwards]:()=>{Do(k,en.Last,{skipElements:[g.relatedTarget]})}})})}),h=Ms(),v=w.useRef(!1),y={ref:r,onKeyDown(g){g.key=="Tab"&&(v.current=!0,h.requestAnimationFrame(()=>{v.current=!1}))},onBlur(g){let k=dp(i);n.current instanceof HTMLElement&&k.add(n.current);let m=g.relatedTarget;m instanceof HTMLElement&&m.dataset.headlessuiFocusGuard!=="true"&&(mp(k,m)||(v.current?Do(n.current,me(c.current,{[hr.Forwards]:()=>en.Next,[hr.Backwards]:()=>en.Previous})|en.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&sn(g.target)))}};return M.createElement(M.Fragment,null,!!(l&4)&&M.createElement(Nu,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:fi.Focusable}),Ve({ourProps:y,theirProps:u,defaultTag:tg,name:"FocusTrap"}),!!(l&4)&&M.createElement(Nu,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:fi.Focusable}))}let rg=Oe(ng),ar=Object.assign(rg,{features:pp});function og(e=!0){let t=w.useRef(Ot.slice());return $s(([n],[r])=>{r===!0&&n===!1&&Mi(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Ot.slice())},[e,Ot,t]),K(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function ig({ownerDocument:e},t){let n=og(t);$s(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&sn(n())},[t]),fp(()=>{t&&sn(n())})}function lg({ownerDocument:e,container:t,initialFocus:n},r){let o=w.useRef(null),i=Yr();return $s(()=>{if(!r)return;let l=t.current;l&&Mi(()=>{if(!i.current)return;let u=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===u){o.current=u;return}}else if(l.contains(u)){o.current=u;return}n!=null&&n.current?sn(n.current):Do(l,en.First)===rp.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[r]),o}function ug({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=Yr();cp(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let u=dp(n);t.current instanceof HTMLElement&&u.add(t.current);let s=r.current;if(!s)return;let a=l.target;a&&a instanceof HTMLElement?mp(u,a)?(r.current=a,sn(a)):(l.preventDefault(),l.stopPropagation(),sn(s)):sn(r.current)},!0)}function mp(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let hp=w.createContext(!1);function sg(){return w.useContext(hp)}function Lu(e){return M.createElement(hp.Provider,{value:e.force},e.children)}function ag(e){let t=sg(),n=w.useContext(yp),r=Xr(e),[o,i]=w.useState(()=>{if(!t&&n!==null||yt.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let u=r.createElement("div");return u.setAttribute("id","headlessui-portal-root"),r.body.appendChild(u)});return w.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),w.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let cg=w.Fragment;function fg(e,t){let n=e,r=w.useRef(null),o=nt(Qy(c=>{r.current=c}),t),i=Xr(r),l=ag(r),[u]=w.useState(()=>{var c;return yt.isServer?null:(c=i==null?void 0:i.createElement("div"))!=null?c:null}),s=w.useContext(_u),a=Xn();return He(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),He(()=>{if(u&&s)return s.register(u)},[s,u]),fp(()=>{var c;!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((c=l.parentElement)==null||c.removeChild(l)))}),a?!l||!u?null:Od.createPortal(Ve({ourProps:{ref:o},theirProps:n,defaultTag:cg,name:"Portal"}),u):null}let dg=w.Fragment,yp=w.createContext(null);function pg(e,t){let{target:n,...r}=e,o={ref:nt(t)};return M.createElement(yp.Provider,{value:n},Ve({ourProps:o,theirProps:r,defaultTag:dg,name:"Popover.Group"}))}let _u=w.createContext(null);function mg(){let e=w.useContext(_u),t=w.useRef([]),n=K(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=K(i=>{let l=t.current.indexOf(i);l!==-1&&t.current.splice(l,1),e&&e.unregister(i)}),o=w.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,w.useMemo(()=>function({children:i}){return M.createElement(_u.Provider,{value:o},i)},[o])]}let hg=Oe(fg),yg=Oe(pg),Uu=Object.assign(hg,{Group:yg});function gg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const vg=typeof Object.is=="function"?Object.is:gg,{useState:wg,useEffect:Sg,useLayoutEffect:Eg,useDebugValue:kg}=Tr;function Cg(e,t,n){const r=t(),[{inst:o},i]=wg({inst:{value:r,getSnapshot:t}});return Eg(()=>{o.value=r,o.getSnapshot=t,wl(o)&&i({inst:o})},[e,r,t]),Sg(()=>(wl(o)&&i({inst:o}),e(()=>{wl(o)&&i({inst:o})})),[e]),kg(r),r}function wl(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!vg(n,r)}catch{return!0}}function xg(e,t,n){return t()}const Tg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Rg=!Tg,Pg=Rg?xg:Cg,Ng="useSyncExternalStore"in Tr?(e=>e.useSyncExternalStore)(Tr):Pg;function Lg(e){return Ng(e.subscribe,e.getSnapshot,e.getSnapshot)}function _g(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=t[o].call(n,...i);l&&(n=l,r.forEach(u=>u()))}}}function Ug(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function Og(){return ip()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let u=gn();u.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>u.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;t.addEventListener(e,"click",u=>{if(u.target instanceof HTMLElement)try{let s=u.target.closest("a");if(!s)return;let{hash:a}=new URL(s.href),c=e.querySelector(a);c&&!r(c)&&(l=c)}catch{}},!0),t.addEventListener(e,"touchstart",u=>{if(u.target instanceof HTMLElement)if(r(u.target)){let s=u.target;for(;s.parentElement&&r(s.parentElement);)s=s.parentElement;t.style(s,"overscrollBehavior","contain")}else t.style(u.target,"touchAction","none")}),t.addEventListener(e,"touchmove",u=>{if(u.target instanceof HTMLElement)if(r(u.target)){let s=u.target;for(;s.parentElement&&s.dataset.headlessuiPortal!==""&&!(s.scrollHeight>s.clientHeight||s.scrollWidth>s.clientWidth);)s=s.parentElement;s.dataset.headlessuiPortal===""&&u.preventDefault()}else u.preventDefault()},{passive:!1}),t.add(()=>{var u;let s=(u=window.scrollY)!=null?u:window.pageYOffset;i!==s&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function Fg(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Ag(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let on=_g(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:gn(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Ag(n)},o=[Og(),Ug(),Fg()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});on.subscribe(()=>{let e=on.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&on.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&on.dispatch("TEARDOWN",n)}});function Dg(e,t,n){let r=Lg(on),o=e?r.get(e):void 0,i=o?o.count>0:!1;return He(()=>{if(!(!e||!t))return on.dispatch("PUSH",e,n),()=>on.dispatch("POP",e,n)},[t,e]),i}let Sl=new Map,cr=new Map;function mc(e,t=!0){He(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let u=(l=cr.get(r))!=null?l:1;if(u===1?cr.delete(r):cr.set(r,u-1),u!==1)return;let s=Sl.get(r);s&&(s["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",s["aria-hidden"]),r.inert=s.inert,Sl.delete(r))}let i=(n=cr.get(r))!=null?n:0;return cr.set(r,i+1),i!==0||(Sl.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,t])}function Mg({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=w.useRef((r=n==null?void 0:n.current)!=null?r:null),i=Xr(o),l=K(()=>{var u,s,a;let c=[];for(let f of e)f!==null&&(f instanceof HTMLElement?c.push(f):"current"in f&&f.current instanceof HTMLElement&&c.push(f.current));if(t!=null&&t.current)for(let f of t.current)c.push(f);for(let f of(u=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?u:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(o.current)||f.contains((a=(s=o.current)==null?void 0:s.getRootNode())==null?void 0:a.host)||c.some(h=>f.contains(h))||c.push(f));return c});return{resolveContainers:l,contains:K(u=>l().some(s=>s.contains(u))),mainTreeNodeRef:o,MainTreeNode:w.useMemo(()=>function(){return n!=null?null:M.createElement(Nu,{features:fi.Hidden,ref:o})},[o,n])}}let Bs=w.createContext(()=>{});Bs.displayName="StackContext";var Ou=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Ou||{});function $g(){return w.useContext(Bs)}function Ig({children:e,onUpdate:t,type:n,element:r,enabled:o}){let i=$g(),l=K((...u)=>{t==null||t(...u),i(...u)});return He(()=>{let u=o===void 0||o===!0;return u&&l(0,n,r),()=>{u&&l(1,n,r)}},[l,n,r,o]),M.createElement(Bs.Provider,{value:l},e)}let gp=w.createContext(null);function vp(){let e=w.useContext(gp);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,vp),t}return e}function zg(){let[e,t]=w.useState([]);return[e.length>0?e.join(" "):void 0,w.useMemo(()=>function(n){let r=K(i=>(t(l=>[...l,i]),()=>t(l=>{let u=l.slice(),s=u.indexOf(i);return s!==-1&&u.splice(s,1),u}))),o=w.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return M.createElement(gp.Provider,{value:o},n.children)},[t])]}let Bg="p";function jg(e,t){let n=Yn(),{id:r=`headlessui-description-${n}`,...o}=e,i=vp(),l=nt(t);He(()=>i.register(r),[r,i.register]);let u={ref:l,...i.props,id:r};return Ve({ourProps:u,theirProps:o,slot:i.slot||{},defaultTag:Bg,name:i.name||"Description"})}let Hg=Oe(jg),Vg=Object.assign(Hg,{});var bg=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(bg||{}),Wg=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Wg||{});let Qg={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},di=w.createContext(null);di.displayName="DialogContext";function Jr(e){let t=w.useContext(di);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Jr),n}return t}function Kg(e,t,n=()=>[document.body]){Dg(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function qg(e,t){return me(t.type,Qg,e,t)}let Gg="div",Xg=ci.RenderStrategy|ci.Static;function Yg(e,t){let n=Yn(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:i,initialFocus:l,role:u="dialog",__demoMode:s=!1,...a}=e,[c,f]=w.useState(0),h=w.useRef(!1);u=function(){return u==="dialog"||u==="alertdialog"?u:(h.current||(h.current=!0,console.warn(`Invalid role [${u}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let v=zs();o===void 0&&v!==null&&(o=(v&Re.Open)===Re.Open);let y=w.useRef(null),g=nt(y,t),k=Xr(y),m=e.hasOwnProperty("open")||v!==null,d=e.hasOwnProperty("onClose");if(!m&&!d)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!m)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!d)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof i!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let p=o?0:1,[E,T]=w.useReducer(qg,{titleId:null,descriptionId:null,panelRef:w.createRef()}),x=K(()=>i(!1)),P=K(Y=>T({type:0,id:Y})),N=Xn()?s?!1:p===0:!1,F=c>1,A=w.useContext(di)!==null,[ue,Fe]=mg(),be={get current(){var Y;return(Y=E.panelRef.current)!=null?Y:y.current}},{resolveContainers:Ct,mainTreeNodeRef:st,MainTreeNode:Yt}=Mg({portals:ue,defaultContainers:[be]}),We=F?"parent":"leaf",L=v!==null?(v&Re.Closing)===Re.Closing:!1,U=(()=>A||L?!1:N)(),O=w.useCallback(()=>{var Y,ct;return(ct=Array.from((Y=k==null?void 0:k.querySelectorAll("body > *"))!=null?Y:[]).find(Ae=>Ae.id==="headlessui-portal-root"?!1:Ae.contains(st.current)&&Ae instanceof HTMLElement))!=null?ct:null},[st]);mc(O,U);let j=(()=>F?!0:N)(),H=w.useCallback(()=>{var Y,ct;return(ct=Array.from((Y=k==null?void 0:k.querySelectorAll("[data-headlessui-portal]"))!=null?Y:[]).find(Ae=>Ae.contains(st.current)&&Ae instanceof HTMLElement))!=null?ct:null},[st]);mc(H,j);let xt=(()=>!(!N||F))();Wy(Ct,Y=>{Y.preventDefault(),x()},xt);let oe=(()=>!(F||p!==0))();cp(k==null?void 0:k.defaultView,"keydown",Y=>{oe&&(Y.defaultPrevented||Y.key===ap.Escape&&(Y.preventDefault(),Y.stopPropagation(),x()))});let Jn=(()=>!(L||p!==0||A))();Kg(k,Jn,Ct),w.useEffect(()=>{if(p!==0||!y.current)return;let Y=new ResizeObserver(ct=>{for(let Ae of ct){let Zr=Ae.target.getBoundingClientRect();Zr.x===0&&Zr.y===0&&Zr.width===0&&Zr.height===0&&x()}});return Y.observe(y.current),()=>Y.disconnect()},[p,y,x]);let[at,vn]=zg(),xp=w.useMemo(()=>[{dialogState:p,close:x,setTitleId:P},E],[p,E,x,P]),Vs=w.useMemo(()=>({open:p===0}),[p]),Tp={ref:g,id:r,role:u,"aria-modal":p===0?!0:void 0,"aria-labelledby":E.titleId,"aria-describedby":at};return M.createElement(Ig,{type:"Dialog",enabled:p===0,element:y,onUpdate:K((Y,ct)=>{ct==="Dialog"&&me(Y,{[Ou.Add]:()=>f(Ae=>Ae+1),[Ou.Remove]:()=>f(Ae=>Ae-1)})})},M.createElement(Lu,{force:!0},M.createElement(Uu,null,M.createElement(di.Provider,{value:xp},M.createElement(Uu.Group,{target:y},M.createElement(Lu,{force:!1},M.createElement(vn,{slot:Vs,name:"Dialog.Description"},M.createElement(ar,{initialFocus:l,containers:Ct,features:N?me(We,{parent:ar.features.RestoreFocus,leaf:ar.features.All&~ar.features.FocusLock}):ar.features.None},M.createElement(Fe,null,Ve({ourProps:Tp,theirProps:a,slot:Vs,defaultTag:Gg,features:Xg,visible:p===0,name:"Dialog"}))))))))),M.createElement(Yt,null))}let Jg="div";function Zg(e,t){let n=Yn(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:i,close:l}]=Jr("Dialog.Overlay"),u=nt(t),s=K(c=>{if(c.target===c.currentTarget){if(Jy(c.currentTarget))return c.preventDefault();c.preventDefault(),c.stopPropagation(),l()}}),a=w.useMemo(()=>({open:i===0}),[i]);return Ve({ourProps:{ref:u,id:r,"aria-hidden":!0,onClick:s},theirProps:o,slot:a,defaultTag:Jg,name:"Dialog.Overlay"})}let e1="div";function t1(e,t){let n=Yn(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:i},l]=Jr("Dialog.Backdrop"),u=nt(t);w.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[l.panelRef]);let s=w.useMemo(()=>({open:i===0}),[i]);return M.createElement(Lu,{force:!0},M.createElement(Uu,null,Ve({ourProps:{ref:u,id:r,"aria-hidden":!0},theirProps:o,slot:s,defaultTag:e1,name:"Dialog.Backdrop"})))}let n1="div";function r1(e,t){let n=Yn(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:i},l]=Jr("Dialog.Panel"),u=nt(t,l.panelRef),s=w.useMemo(()=>({open:i===0}),[i]),a=K(c=>{c.stopPropagation()});return Ve({ourProps:{ref:u,id:r,onClick:a},theirProps:o,slot:s,defaultTag:n1,name:"Dialog.Panel"})}let o1="h2";function i1(e,t){let n=Yn(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:l}]=Jr("Dialog.Title"),u=nt(t);w.useEffect(()=>(l(r),()=>l(null)),[r,l]);let s=w.useMemo(()=>({open:i===0}),[i]);return Ve({ourProps:{ref:u,id:r},theirProps:o,slot:s,defaultTag:o1,name:"Dialog.Title"})}let l1=Oe(Yg),u1=Oe(t1),s1=Oe(r1),a1=Oe(Zg),c1=Oe(i1),El=Object.assign(l1,{Backdrop:u1,Panel:s1,Overlay:a1,Title:c1,Description:Vg});function f1(e=0){let[t,n]=w.useState(e),r=Yr(),o=w.useCallback(s=>{r.current&&n(a=>a|s)},[t,r]),i=w.useCallback(s=>!!(t&s),[t]),l=w.useCallback(s=>{r.current&&n(a=>a&~s)},[n,r]),u=w.useCallback(s=>{r.current&&n(a=>a^s)},[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:u}}function d1(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function kl(e,...t){e&&t.length>0&&e.classList.add(...t)}function Cl(e,...t){e&&t.length>0&&e.classList.remove(...t)}function p1(e,t){let n=gn();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(s=>{let[a=0]=s.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,f)=>f-c);return a}),u=i+l;if(u!==0){n.group(a=>{a.setTimeout(()=>{t(),a.dispose()},u),a.addEventListener(e,"transitionrun",c=>{c.target===c.currentTarget&&a.dispose()})});let s=n.addEventListener(e,"transitionend",a=>{a.target===a.currentTarget&&(t(),s())})}else t();return n.add(()=>t()),n.dispose}function m1(e,t,n,r){let o=n?"enter":"leave",i=gn(),l=r!==void 0?d1(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let u=me(o,{enter:()=>t.enter,leave:()=>t.leave}),s=me(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),a=me(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Cl(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),kl(e,...t.base,...u,...a),i.nextFrame(()=>{Cl(e,...t.base,...u,...a),kl(e,...t.base,...u,...s),p1(e,()=>(Cl(e,...t.base,...u),kl(e,...t.base,...t.entered),l()))}),i.dispose}function h1({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let l=Yr(),u=Ms(),s=gt(n);He(()=>{e&&(s.current="enter")},[e]),He(()=>{let a=gn();u.add(a.dispose);let c=t.current;if(c&&s.current!=="idle"&&l.current)return a.dispose(),o.current(s.current),a.add(m1(c,r.current,s.current==="enter",()=>{a.dispose(),i.current(s.current)})),a.dispose},[n])}function Pt(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let $i=w.createContext(null);$i.displayName="TransitionContext";var y1=(e=>(e.Visible="visible",e.Hidden="hidden",e))(y1||{});function g1(){let e=w.useContext($i);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function v1(){let e=w.useContext(Ii);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let Ii=w.createContext(null);Ii.displayName="NestingContext";function zi(e){return"children"in e?zi(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function wp(e,t){let n=gt(e),r=w.useRef([]),o=Yr(),i=Ms(),l=K((v,y=Dt.Hidden)=>{let g=r.current.findIndex(({el:k})=>k===v);g!==-1&&(me(y,{[Dt.Unmount](){r.current.splice(g,1)},[Dt.Hidden](){r.current[g].state="hidden"}}),i.microTask(()=>{var k;!zi(r)&&o.current&&((k=n.current)==null||k.call(n))}))}),u=K(v=>{let y=r.current.find(({el:g})=>g===v);return y?y.state!=="visible"&&(y.state="visible"):r.current.push({el:v,state:"visible"}),()=>l(v,Dt.Unmount)}),s=w.useRef([]),a=w.useRef(Promise.resolve()),c=w.useRef({enter:[],leave:[],idle:[]}),f=K((v,y,g)=>{s.current.splice(0),t&&(t.chains.current[y]=t.chains.current[y].filter(([k])=>k!==v)),t==null||t.chains.current[y].push([v,new Promise(k=>{s.current.push(k)})]),t==null||t.chains.current[y].push([v,new Promise(k=>{Promise.all(c.current[y].map(([m,d])=>d)).then(()=>k())})]),y==="enter"?a.current=a.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(y)):g(y)}),h=K((v,y,g)=>{Promise.all(c.current[y].splice(0).map(([k,m])=>m)).then(()=>{var k;(k=s.current.shift())==null||k()}).then(()=>g(y))});return w.useMemo(()=>({children:r,register:u,unregister:l,onStart:f,onStop:h,wait:a,chains:c}),[u,l,r,f,h,c,a])}function w1(){}let S1=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function hc(e){var t;let n={};for(let r of S1)n[r]=(t=e[r])!=null?t:w1;return n}function E1(e){let t=w.useRef(hc(e));return w.useEffect(()=>{t.current=hc(e)},[e]),t}let k1="div",Sp=ci.RenderStrategy;function C1(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:u,enter:s,enterFrom:a,enterTo:c,entered:f,leave:h,leaveFrom:v,leaveTo:y,...g}=e,k=w.useRef(null),m=nt(k,t),d=(n=g.unmount)==null||n?Dt.Unmount:Dt.Hidden,{show:p,appear:E,initial:T}=g1(),[x,P]=w.useState(p?"visible":"hidden"),N=v1(),{register:F,unregister:A}=N;w.useEffect(()=>F(k),[F,k]),w.useEffect(()=>{if(d===Dt.Hidden&&k.current){if(p&&x!=="visible"){P("visible");return}return me(x,{hidden:()=>A(k),visible:()=>F(k)})}},[x,k,F,A,p,d]);let ue=gt({base:Pt(g.className),enter:Pt(s),enterFrom:Pt(a),enterTo:Pt(c),entered:Pt(f),leave:Pt(h),leaveFrom:Pt(v),leaveTo:Pt(y)}),Fe=E1({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:u}),be=Xn();w.useEffect(()=>{if(be&&x==="visible"&&k.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[k,x,be]);let Ct=T&&!E,st=E&&p&&T,Yt=(()=>!be||Ct?"idle":p?"enter":"leave")(),We=f1(0),L=K(oe=>me(oe,{enter:()=>{We.addFlag(Re.Opening),Fe.current.beforeEnter()},leave:()=>{We.addFlag(Re.Closing),Fe.current.beforeLeave()},idle:()=>{}})),U=K(oe=>me(oe,{enter:()=>{We.removeFlag(Re.Opening),Fe.current.afterEnter()},leave:()=>{We.removeFlag(Re.Closing),Fe.current.afterLeave()},idle:()=>{}})),O=wp(()=>{P("hidden"),A(k)},N),j=w.useRef(!1);h1({immediate:st,container:k,classes:ue,direction:Yt,onStart:gt(oe=>{j.current=!0,O.onStart(k,oe,L)}),onStop:gt(oe=>{j.current=!1,O.onStop(k,oe,U),oe==="leave"&&!zi(O)&&(P("hidden"),A(k))})});let H=g,xt={ref:m};return st?H={...H,className:ai(g.className,...ue.current.enter,...ue.current.enterFrom)}:j.current&&(H.className=ai(g.className,(r=k.current)==null?void 0:r.className),H.className===""&&delete H.className),M.createElement(Ii.Provider,{value:O},M.createElement(Xy,{value:me(x,{visible:Re.Open,hidden:Re.Closed})|We.flags},Ve({ourProps:xt,theirProps:H,defaultTag:k1,features:Sp,visible:x==="visible",name:"Transition.Child"})))}function x1(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=w.useRef(null),u=nt(l,t);Xn();let s=zs();if(n===void 0&&s!==null&&(n=(s&Re.Open)===Re.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[a,c]=w.useState(n?"visible":"hidden"),f=wp(()=>{c("hidden")}),[h,v]=w.useState(!0),y=w.useRef([n]);He(()=>{h!==!1&&y.current[y.current.length-1]!==n&&(y.current.push(n),v(!1))},[y,n]);let g=w.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);w.useEffect(()=>{if(n)c("visible");else if(!zi(f))c("hidden");else{let p=l.current;if(!p)return;let E=p.getBoundingClientRect();E.x===0&&E.y===0&&E.width===0&&E.height===0&&c("hidden")}},[n,f]);let k={unmount:o},m=K(()=>{var p;h&&v(!1),(p=e.beforeEnter)==null||p.call(e)}),d=K(()=>{var p;h&&v(!1),(p=e.beforeLeave)==null||p.call(e)});return M.createElement(Ii.Provider,{value:f},M.createElement($i.Provider,{value:g},Ve({ourProps:{...k,as:w.Fragment,children:M.createElement(Ep,{ref:u,...k,...i,beforeEnter:m,beforeLeave:d})},theirProps:{},defaultTag:w.Fragment,features:Sp,visible:a==="visible",name:"Transition"})))}function T1(e,t){let n=w.useContext($i)!==null,r=zs()!==null;return M.createElement(M.Fragment,null,!n&&r?M.createElement(Fu,{ref:t,...e}):M.createElement(Ep,{ref:t,...e}))}let Fu=Oe(x1),Ep=Oe(C1),R1=Oe(T1),xl=Object.assign(Fu,{Child:R1,Root:Fu});function js({show:e,onClose:t,onSubmit:n,title:r,content:o,submitText:i,submitEnabled:l=!0}){return R(xl,{appear:!0,show:e,as:w.Fragment,children:z(El,{as:"div",className:"relative z-10",onClose:t,children:[R(xl.Child,{as:w.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:R("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),R("div",{className:"fixed inset-0 overflow-y-auto",children:R("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:R(xl.Child,{as:w.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:z(El.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[R(El.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:r}),R("div",{className:"mt-3 text-sm text-gray-500",children:o}),z("div",{className:"mt-4 flex flex-row-reverse",children:[i&&R("button",{type:"button",disabled:!l,className:`inline-flex ml-4 justify-center rounded-md border border-transparent ${l?"bg-indigo-600":"bg-grey-300"} px-4 py-2 text-sm font-medium text-indigo-100 ${l?"hover:bg-indigo-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2":""} transition-all duration-300`,onClick:n,children:i}),R("button",{type:"button",className:"inline-flex justify-center rounded-md border border-transparent bg-indigo-100 px-4 py-2 text-sm font-medium text-indigo-900 hover:bg-indigo-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2 transition-all duration-300",onClick:t,children:"Close"})]})]})})})})]})})}function P1(e){return R("div",{children:R("input",{...e,type:"url",className:"my-2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"www.example.com",required:!0})})}function N1(e){const t=w.useRef(null),n=w.useRef(null);return w.useEffect(()=>{t.current&&n.current&&(n.current.src=e.audioUrl,t.current.load())},[e.audioUrl]),R("div",{className:"flex relative z-10 p-4 w-full mt-4",children:R("audio",{ref:t,controls:!0,className:"w-full h-14 rounded-lg bg-white shadow-xl shadow-black/5 ring-1 ring-slate-700/10",children:R("source",{ref:n,type:e.mimeType})})})}function L1(e){const{isModelLoading:t,isTranscribing:n,onClick:r,...o}=e;return R("button",{...o,onClick:i=>{r&&!n&&!t&&r(i)},disabled:n,className:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 inline-flex items-center",children:t?R(yc,{text:"Loading model..."}):n?R(yc,{text:"Transcribing..."}):"Transcribe Audio"})}function yc(e){return z("div",{role:"status",children:[z("svg",{"aria-hidden":"true",role:"status",className:"inline w-4 h-4 mr-3 text-white animate-spin",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"#E5E7EB"}),R("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]}),e.text]})}function _1(){let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||("opera"in window&&typeof window.opera=="string"?window.opera:"")),e}const Tl=_1(),Mt={SAMPLING_RATE:16e3,DEFAULT_AUDIO_URL:`https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/${Tl?"jfk":"ted_60_16k"}.wav`,DEFAULT_MODEL:Tl?"onnx-community/whisper-tiny":"onnx-community/whisper-base",DEFAULT_SUBTASK:"transcribe",DEFAULT_LANGUAGE:"english",DEFAULT_QUANTIZED:Tl,DEFAULT_MULTILINGUAL:!0};function U1({text:e,percentage:t}){return t=t??0,R("div",{className:"mt-0.5 w-full relative text-sm text-white background-bg-cyan-400 bg-gray-200 border-1 border-gray-400 rounded-lg text-left overflow-hidden",children:z("div",{className:"top-0 h-full bg-blue-500 whitespace-nowrap px-2",style:{width:`${t}%`},children:[e," (",`${t.toFixed(2)}%`,")"]})})}function Rl(e){return String(e).padStart(2,"0")}function kp(e){const t=e/3600|0;e-=t*(60*60);const n=e/60|0;e-=n*60;const r=e|0;return`${t?Rl(t)+":":""}${Rl(n)}:${Rl(r)}`}const O1={172351395:{name:"EBML",type:"Container"},646:{name:"EBMLVersion",type:"Uint"},759:{name:"EBMLReadVersion",type:"Uint"},754:{name:"EBMLMaxIDLength",type:"Uint"},755:{name:"EBMLMaxSizeLength",type:"Uint"},642:{name:"DocType",type:"String"},647:{name:"DocTypeVersion",type:"Uint"},645:{name:"DocTypeReadVersion",type:"Uint"},108:{name:"Void",type:"Binary"},63:{name:"CRC-32",type:"Binary"},190023271:{name:"SignatureSlot",type:"Container"},16010:{name:"SignatureAlgo",type:"Uint"},16026:{name:"SignatureHash",type:"Uint"},16037:{name:"SignaturePublicKey",type:"Binary"},16053:{name:"Signature",type:"Binary"},15963:{name:"SignatureElements",type:"Container"},15995:{name:"SignatureElementList",type:"Container"},9522:{name:"SignedElement",type:"Binary"},139690087:{name:"Segment",type:"Container"},21863284:{name:"SeekHead",type:"Container"},3515:{name:"Seek",type:"Container"},5035:{name:"SeekID",type:"Binary"},5036:{name:"SeekPosition",type:"Uint"},88713574:{name:"Info",type:"Container"},13220:{name:"SegmentUID",type:"Binary"},13188:{name:"SegmentFilename",type:"String"},1882403:{name:"PrevUID",type:"Binary"},1868715:{name:"PrevFilename",type:"String"},2013475:{name:"NextUID",type:"Binary"},1999803:{name:"NextFilename",type:"String"},1092:{name:"SegmentFamily",type:"Binary"},10532:{name:"ChapterTranslate",type:"Container"},10748:{name:"ChapterTranslateEditionUID",type:"Uint"},10687:{name:"ChapterTranslateCodec",type:"Uint"},10661:{name:"ChapterTranslateID",type:"Binary"},710577:{name:"TimecodeScale",type:"Uint"},1161:{name:"Duration",type:"Float"},1121:{name:"DateUTC",type:"Date"},15273:{name:"Title",type:"String"},3456:{name:"MuxingApp",type:"String"},5953:{name:"WritingApp",type:"String"},103:{name:"Timecode",type:"Uint"},6228:{name:"SilentTracks",type:"Container"},6359:{name:"SilentTrackNumber",type:"Uint"},39:{name:"Position",type:"Uint"},43:{name:"PrevSize",type:"Uint"},35:{name:"SimpleBlock",type:"Binary"},32:{name:"BlockGroup",type:"Container"},33:{name:"Block",type:"Binary"},34:{name:"BlockVirtual",type:"Binary"},13729:{name:"BlockAdditions",type:"Container"},38:{name:"BlockMore",type:"Container"},110:{name:"BlockAddID",type:"Uint"},37:{name:"BlockAdditional",type:"Binary"},27:{name:"BlockDuration",type:"Uint"},122:{name:"ReferencePriority",type:"Uint"},123:{name:"ReferenceBlock",type:"Int"},125:{name:"ReferenceVirtual",type:"Int"},36:{name:"CodecState",type:"Binary"},13730:{name:"DiscardPadding",type:"Int"},14:{name:"Slices",type:"Container"},104:{name:"TimeSlice",type:"Container"},76:{name:"LaceNumber",type:"Uint"},77:{name:"FrameNumber",type:"Uint"},75:{name:"BlockAdditionID",type:"Uint"},78:{name:"Delay",type:"Uint"},79:{name:"SliceDuration",type:"Uint"},72:{name:"ReferenceFrame",type:"Container"},73:{name:"ReferenceOffset",type:"Uint"},74:{name:"ReferenceTimeCode",type:"Uint"},47:{name:"EncryptedBlock",type:"Binary"},106212971:{name:"Tracks",type:"Container"},46:{name:"TrackEntry",type:"Container"},87:{name:"TrackNumber",type:"Uint"},13253:{name:"TrackUID",type:"Uint"},3:{name:"TrackType",type:"Uint"},57:{name:"FlagEnabled",type:"Uint"},8:{name:"FlagDefault",type:"Uint"},5546:{name:"FlagForced",type:"Uint"},28:{name:"FlagLacing",type:"Uint"},11751:{name:"MinCache",type:"Uint"},11768:{name:"MaxCache",type:"Uint"},254851:{name:"DefaultDuration",type:"Uint"},216698:{name:"DefaultDecodedFieldDuration",type:"Uint"},209231:{name:"TrackTimecodeScale",type:"Float"},4991:{name:"TrackOffset",type:"Int"},5614:{name:"MaxBlockAdditionID",type:"Uint"},4974:{name:"Name",type:"String"},177564:{name:"Language",type:"String"},6:{name:"CodecID",type:"String"},9122:{name:"CodecPrivate",type:"Binary"},362120:{name:"CodecName",type:"String"},13382:{name:"AttachmentLink",type:"Uint"},1742487:{name:"CodecSettings",type:"String"},1785920:{name:"CodecInfoURL",type:"String"},438848:{name:"CodecDownloadURL",type:"String"},42:{name:"CodecDecodeAll",type:"Uint"},12203:{name:"TrackOverlay",type:"Uint"},5802:{name:"CodecDelay",type:"Uint"},5819:{name:"SeekPreRoll",type:"Uint"},9764:{name:"TrackTranslate",type:"Container"},9980:{name:"TrackTranslateEditionUID",type:"Uint"},9919:{name:"TrackTranslateCodec",type:"Uint"},9893:{name:"TrackTranslateTrackID",type:"Binary"},96:{name:"Video",type:"Container"},26:{name:"FlagInterlaced",type:"Uint"},5048:{name:"StereoMode",type:"Uint"},5056:{name:"AlphaMode",type:"Uint"},5049:{name:"OldStereoMode",type:"Uint"},48:{name:"PixelWidth",type:"Uint"},58:{name:"PixelHeight",type:"Uint"},5290:{name:"PixelCropBottom",type:"Uint"},5307:{name:"PixelCropTop",type:"Uint"},5324:{name:"PixelCropLeft",type:"Uint"},5341:{name:"PixelCropRight",type:"Uint"},5296:{name:"DisplayWidth",type:"Uint"},5306:{name:"DisplayHeight",type:"Uint"},5298:{name:"DisplayUnit",type:"Uint"},5299:{name:"AspectRatioType",type:"Uint"},963876:{name:"ColourSpace",type:"Binary"},1029411:{name:"GammaValue",type:"Float"},230371:{name:"FrameRate",type:"Float"},97:{name:"Audio",type:"Container"},53:{name:"SamplingFrequency",type:"Float"},14517:{name:"OutputSamplingFrequency",type:"Float"},31:{name:"Channels",type:"Uint"},15739:{name:"ChannelPositions",type:"Binary"},8804:{name:"BitDepth",type:"Uint"},98:{name:"TrackOperation",type:"Container"},99:{name:"TrackCombinePlanes",type:"Container"},100:{name:"TrackPlane",type:"Container"},101:{name:"TrackPlaneUID",type:"Uint"},102:{name:"TrackPlaneType",type:"Uint"},105:{name:"TrackJoinBlocks",type:"Container"},109:{name:"TrackJoinUID",type:"Uint"},64:{name:"TrickTrackUID",type:"Uint"},65:{name:"TrickTrackSegmentUID",type:"Binary"},70:{name:"TrickTrackFlag",type:"Uint"},71:{name:"TrickMasterTrackUID",type:"Uint"},68:{name:"TrickMasterTrackSegmentUID",type:"Binary"},11648:{name:"ContentEncodings",type:"Container"},8768:{name:"ContentEncoding",type:"Container"},4145:{name:"ContentEncodingOrder",type:"Uint"},4146:{name:"ContentEncodingScope",type:"Uint"},4147:{name:"ContentEncodingType",type:"Uint"},4148:{name:"ContentCompression",type:"Container"},596:{name:"ContentCompAlgo",type:"Uint"},597:{name:"ContentCompSettings",type:"Binary"},4149:{name:"ContentEncryption",type:"Container"},2017:{name:"ContentEncAlgo",type:"Uint"},2018:{name:"ContentEncKeyID",type:"Binary"},2019:{name:"ContentSignature",type:"Binary"},2020:{name:"ContentSigKeyID",type:"Binary"},2021:{name:"ContentSigAlgo",type:"Uint"},2022:{name:"ContentSigHashAlgo",type:"Uint"},206814059:{name:"Cues",type:"Container"},59:{name:"CuePoint",type:"Container"},51:{name:"CueTime",type:"Uint"},55:{name:"CueTrackPositions",type:"Container"},119:{name:"CueTrack",type:"Uint"},113:{name:"CueClusterPosition",type:"Uint"},112:{name:"CueRelativePosition",type:"Uint"},50:{name:"CueDuration",type:"Uint"},4984:{name:"CueBlockNumber",type:"Uint"},106:{name:"CueCodecState",type:"Uint"},91:{name:"CueReference",type:"Container"},22:{name:"CueRefTime",type:"Uint"},23:{name:"CueRefCluster",type:"Uint"},4959:{name:"CueRefNumber",type:"Uint"},107:{name:"CueRefCodecState",type:"Uint"},155296873:{name:"Attachments",type:"Container"},8615:{name:"AttachedFile",type:"Container"},1662:{name:"FileDescription",type:"String"},1646:{name:"FileName",type:"String"},1632:{name:"FileMimeType",type:"String"},1628:{name:"FileData",type:"Binary"},1710:{name:"FileUID",type:"Uint"},1653:{name:"FileReferral",type:"Binary"},1633:{name:"FileUsedStartTime",type:"Uint"},1634:{name:"FileUsedEndTime",type:"Uint"},4433776:{name:"Chapters",type:"Container"},1465:{name:"EditionEntry",type:"Container"},1468:{name:"EditionUID",type:"Uint"},1469:{name:"EditionFlagHidden",type:"Uint"},1499:{name:"EditionFlagDefault",type:"Uint"},1501:{name:"EditionFlagOrdered",type:"Uint"},54:{name:"ChapterAtom",type:"Container"},13252:{name:"ChapterUID",type:"Uint"},5716:{name:"ChapterStringUID",type:"String"},17:{name:"ChapterTimeStart",type:"Uint"},18:{name:"ChapterTimeEnd",type:"Uint"},24:{name:"ChapterFlagHidden",type:"Uint"},1432:{name:"ChapterFlagEnabled",type:"Uint"},11879:{name:"ChapterSegmentUID",type:"Binary"},11964:{name:"ChapterSegmentEditionUID",type:"Uint"},9155:{name:"ChapterPhysicalEquiv",type:"Uint"},15:{name:"ChapterTrack",type:"Container"},9:{name:"ChapterTrackNumber",type:"Uint"},0:{name:"ChapterDisplay",type:"Container"},5:{name:"ChapString",type:"String"},892:{name:"ChapLanguage",type:"String"},894:{name:"ChapCountry",type:"String"},10564:{name:"ChapProcess",type:"Container"},10581:{name:"ChapProcessCodecID",type:"Uint"},1293:{name:"ChapProcessPrivate",type:"Binary"},10513:{name:"ChapProcessCommand",type:"Container"},10530:{name:"ChapProcessTime",type:"Uint"},10547:{name:"ChapProcessData",type:"Binary"},39109479:{name:"Tags",type:"Container"},13171:{name:"Tag",type:"Container"},9152:{name:"Targets",type:"Container"},10442:{name:"TargetTypeValue",type:"Uint"},9162:{name:"TargetType",type:"String"},9157:{name:"TagTrackUID",type:"Uint"},9161:{name:"TagEditionUID",type:"Uint"},9156:{name:"TagChapterUID",type:"Uint"},9158:{name:"TagAttachmentUID",type:"Uint"},10184:{name:"SimpleTag",type:"Container"},1443:{name:"TagName",type:"String"},1146:{name:"TagLanguage",type:"String"},1156:{name:"TagDefault",type:"Uint"},1159:{name:"TagString",type:"String"},1157:{name:"TagBinary",type:"Binary"}};class pi{constructor(t="Unknown",n="Unknown"){Zn(this,"source");Zn(this,"data");this.name=t,this.type=n}updateBySource(){}setSource(t){this.source=t,this.updateBySource()}updateByData(){}setData(t){this.data=t,this.updateByData()}}class F1 extends pi{constructor(t,n){super(t,n||"Uint")}updateBySource(){this.data="";for(let t=0;t=i&&o<8;o++,i*=128);if(!r){let l=i+n;for(let u=o-1;u>=0;u--){const s=l%256;this.source[this.offset+u]=s,l=(l-s)/256}}this.offset+=o}writeSections(n=!1){this.offset=0;for(let r=0;rnew Promise((r,o)=>{try{const i=new FileReader;i.addEventListener("loadend",()=>{try{const l=i.result,u=new A1(new Uint8Array(l));u.fixDuration(t)?r(u.toBlob(n)):r(e)}catch(l){o(l)}}),i.addEventListener("error",()=>o()),i.readAsArrayBuffer(e)}catch(i){o(i)}});function M1(){const e=["audio/webm","audio/mp4","audio/ogg","audio/wav","audio/aac"];for(let t=0;t{l(null);try{u.current||(u.current=await navigator.mediaDevices.getUserMedia({audio:!0}));let y=Date.now();const g=M1(),k=new MediaRecorder(u.current,{mimeType:g});s.current=k,k.addEventListener("dataavailable",async m=>{if(m.data.size===0)return;a.current.push(m.data);const d=Date.now()-y;let p=new Blob(a.current,{type:g});k.state==="inactive"?(g==="audio/webm"&&(p=await D1(p,d,p.type)),l(p),e.onRecordingComplete(p),a.current=[]):k.state==="recording"&&e.onRecordingProgress(p)}),k.start(),n(!0)}catch(y){console.error("Error accessing microphone:",y)}},h=()=>{var y;((y=s.current)==null?void 0:y.state)==="recording"&&(s.current.stop(),o(0),n(!1))};return w.useEffect(()=>{if(t){const y=setInterval(()=>{o(g=>g+1)},1e3);return()=>{clearInterval(y)}}},[t]),z("div",{className:"flex flex-col justify-center items-center",children:[R("button",{type:"button",className:`m-2 inline-flex justify-center rounded-md border border-transparent px-4 py-2 text-sm font-medium text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2 transition-all duration-200 ${t?"bg-red-500 hover:bg-red-600":"bg-green-500 hover:bg-green-600"}`,onClick:()=>{t?h():f()},children:t?`Stop Recording (${kp(r)})`:"Start Recording"}),i&&R("audio",{className:"w-full",ref:c,controls:!0,children:R("source",{src:URL.createObjectURL(i),type:i.type})})]})}function I1(e){return e=e.toLowerCase(),(e.match(/\w+.?/g)||[]).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}const z1={en:"english",zh:"chinese",de:"german",es:"spanish/castilian",ru:"russian",ko:"korean",fr:"french",ja:"japanese",pt:"portuguese",tr:"turkish",pl:"polish",ca:"catalan/valencian",nl:"dutch/flemish",ar:"arabic",sv:"swedish",it:"italian",id:"indonesian",hi:"hindi",fi:"finnish",vi:"vietnamese",he:"hebrew",uk:"ukrainian",el:"greek",ms:"malay",cs:"czech",ro:"romanian/moldavian/moldovan",da:"danish",hu:"hungarian",ta:"tamil",no:"norwegian",th:"thai",ur:"urdu",hr:"croatian",bg:"bulgarian",lt:"lithuanian",la:"latin",mi:"maori",ml:"malayalam",cy:"welsh",sk:"slovak",te:"telugu",fa:"persian",lv:"latvian",bn:"bengali",sr:"serbian",az:"azerbaijani",sl:"slovenian",kn:"kannada",et:"estonian",mk:"macedonian",br:"breton",eu:"basque",is:"icelandic",hy:"armenian",ne:"nepali",mn:"mongolian",bs:"bosnian",kk:"kazakh",sq:"albanian",sw:"swahili",gl:"galician",mr:"marathi",pa:"punjabi/panjabi",si:"sinhala/sinhalese",km:"khmer",sn:"shona",yo:"yoruba",so:"somali",af:"afrikaans",oc:"occitan",ka:"georgian",be:"belarusian",tg:"tajik",sd:"sindhi",gu:"gujarati",am:"amharic",yi:"yiddish",lo:"lao",uz:"uzbek",fo:"faroese",ht:"haitian creole/haitian",ps:"pashto/pushto",tk:"turkmen",nn:"nynorsk",mt:"maltese",sa:"sanskrit",lb:"luxembourgish/letzeburgesch",my:"myanmar/burmese",bo:"tibetan",tl:"tagalog",mg:"malagasy",as:"assamese",tt:"tatar",haw:"hawaiian",ln:"lingala",ha:"hausa",ba:"bashkir",jw:"javanese",su:"sundanese"},B1=Object.entries({"omartariq612/whisper_onnx_small_test":1127});function j1(e){e.transcriber.setLanguage("ar");const[t,n]=w.useState(0),[r,o]=w.useState(void 0),[i,l]=w.useState(void 0),u=()=>{o(void 0),l(void 0)},s=async(f,h)=>{const v=new AudioContext({sampleRate:Mt.SAMPLING_RATE}),y=URL.createObjectURL(new Blob([f],{type:"audio/*"})),g=await v.decodeAudioData(f);o({buffer:g,url:y,source:"URL",mimeType:h})},a=async f=>{u(),n(0);const h=URL.createObjectURL(f),v=new FileReader;v.onprogress=y=>{n(y.loaded/y.total||0)},v.onloadend=async()=>{const y=new AudioContext({sampleRate:Mt.SAMPLING_RATE}),g=v.result,k=await y.decodeAudioData(g);n(void 0),o({buffer:k,url:h,source:"RECORDING",mimeType:f.type})},v.readAsArrayBuffer(f)},c=async f=>{if(i)try{o(void 0),n(0);const{data:h,headers:v}=await Uy.get(i,{signal:f.signal,responseType:"arraybuffer",onDownloadProgress(g){n(g.progress||0)}});let y=v["content-type"];(!y||y==="audio/wave")&&(y="audio/wav"),s(h,y)}catch(h){console.log("Request failed or aborted",h),n(void 0)}};return w.useEffect(()=>{if(i){const f=new AbortController;return c(f),()=>{f.abort()}}},[i]),z($t,{children:[z("div",{className:"flex flex-col justify-center items-center rounded-lg bg-white shadow-xl shadow-black/5 ring-1 ring-slate-700/10",children:[z("div",{className:"flex flex-row space-x-2 py-2 w-full px-2",children:[R(Q1,{icon:R(Y1,{}),text:"From URL",onUrlUpdate:f=>{e.transcriber.onInputChange(),l(f)}}),R(vc,{}),R(q1,{icon:R(J1,{}),text:"From file",onFileUpdate:(f,h,v)=>{e.transcriber.onInputChange(),o({buffer:f,url:h,source:"FILE",mimeType:v})}}),navigator.mediaDevices&&z($t,{children:[R(vc,{}),R(G1,{icon:R(ev,{}),text:"Record",setAudioData:f=>{e.transcriber.onInputChange(),a(f)}})]})]}),R(b1,{progress:t!==void 0&&r?1:t??0})]}),r&&z($t,{children:[R(N1,{audioUrl:r.url,mimeType:r.mimeType}),R("div",{className:"relative w-full flex justify-center items-center",children:R(L1,{onClick:()=>{e.transcriber.start(r.buffer)},isModelLoading:e.transcriber.isModelLoading,isTranscribing:e.transcriber.isBusy})}),e.transcriber.progressItems.length>0&&z("div",{className:"relative z-10 p-4 w-full text-center",children:[R("label",{children:"Loading model files... (only run once)"}),e.transcriber.progressItems.map(f=>R("div",{children:R(U1,{text:f.file,percentage:f.progress})},f.file))]})]}),R(H1,{className:"absolute bottom-4 right-4",transcriber:e.transcriber,icon:R(Z1,{})})]})}function H1(e){const[t,n]=w.useState(!1),r=()=>{n(!0)},o=()=>{n(!1)},i=l=>{o()};return z("div",{className:e.className,children:[R(Bi,{icon:e.icon,onClick:r}),R(V1,{show:t,onSubmit:i,onClose:o,transcriber:e.transcriber})]})}function V1(e){Object.values(z1).map(I1);const t=B1.filter(([n,r])=>!e.transcriber.multilingual||!n.includes("/distil-")).map(([n,r])=>({key:n,size:r,id:`${n}${e.transcriber.multilingual||n.includes("/distil-")?"":".en"}`}));return R(js,{show:e.show,title:"Settings",content:z($t,{children:[R("label",{children:"Select the model to use."}),R("select",{className:"mt-1 mb-1 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",value:e.transcriber.model,onChange:n=>{e.transcriber.setModel(n.target.value)},children:t.map(({key:n,id:r,size:o})=>R("option",{value:r,children:`${r} (${o}MB)`},n))})]}),onClose:e.onClose,onSubmit:()=>{}})}function vc(){return R("div",{className:"w-[1px] bg-slate-200"})}function b1(e){return R(W1,{progress:`${Math.round(e.progress*100)}%`})}function W1(e){return R("div",{className:"w-full rounded-full h-1 bg-gray-200 dark:bg-gray-700",children:R("div",{className:"bg-blue-600 h-1 rounded-full transition-all duration-100",style:{width:e.progress}})})}function Q1(e){const[t,n]=w.useState(!1),r=()=>{n(!0)},o=()=>{n(!1)},i=l=>{e.onUrlUpdate(l),o()};return z($t,{children:[R(Bi,{icon:e.icon,text:e.text,onClick:r}),R(K1,{show:t,onSubmit:i,onClose:o})]})}function K1(e){const[t,n]=w.useState(Mt.DEFAULT_AUDIO_URL),r=i=>{n(i.target.value)},o=()=>{e.onSubmit(t)};return R(js,{show:e.show,title:"From URL",content:z($t,{children:["Enter the URL of the audio file you want to load.",R(P1,{onChange:r,value:t})]}),onClose:e.onClose,submitText:"Load",onSubmit:o})}function q1(e){const t=document.createElement("input");return t.type="file",t.oninput=n=>{const r=n.target.files;if(!r)return;const o=URL.createObjectURL(r[0]),i=r[0].type,l=new FileReader;l.addEventListener("load",async u=>{var f;const s=(f=u.target)==null?void 0:f.result;if(!s)return;const c=await new AudioContext({sampleRate:Mt.SAMPLING_RATE}).decodeAudioData(s);e.onFileUpdate(c,o,i)}),l.readAsArrayBuffer(r[0]),t.value=""},R(Bi,{icon:e.icon,text:e.text,onClick:()=>t.click()})}function G1(e){const[t,n]=w.useState(!1),r=()=>{n(!0)},o=()=>{n(!1)},i=l=>{l&&(e.setAudioData(l),o())};return z($t,{children:[R(Bi,{icon:e.icon,text:e.text,onClick:r}),R(X1,{show:t,onSubmit:i,onProgress:l=>{},onClose:o})]})}function X1(e){const[t,n]=w.useState(),r=l=>{n(l)},o=()=>{e.onSubmit(t),n(void 0)},i=()=>{e.onClose(),n(void 0)};return R(js,{show:e.show,title:"From Recording",content:z($t,{children:["Record audio using your microphone",R($1,{onRecordingProgress:l=>{e.onProgress(l)},onRecordingComplete:r})]}),onClose:i,submitText:"Load",submitEnabled:t!==void 0,onSubmit:o})}function Bi(e){return z("button",{onClick:e.onClick,className:"flex items-center justify-center rounded-lg p-2 bg-blue text-slate-500 hover:text-indigo-600 hover:bg-indigo-50 transition-all duration-200",children:[R("div",{className:"w-7 h-7",children:e.icon}),e.text&&R("div",{className:"ml-2 break-text text-center text-md w-30",children:e.text})]})}function Y1(){return R("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:R("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"})})}function J1(){return R("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:R("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 00-1.883 2.542l.857 6a2.25 2.25 0 002.227 1.932H19.05a2.25 2.25 0 002.227-1.932l.857-6a2.25 2.25 0 00-1.883-2.542m-16.5 0V6A2.25 2.25 0 016 3.75h3.879a1.5 1.5 0 011.06.44l2.122 2.12a1.5 1.5 0 001.06.44H18A2.25 2.25 0 0120.25 9v.776"})})}function Z1(){return z("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.25",stroke:"currentColor",children:[R("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),R("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}function ev(){return R("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:R("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z"})})}function tv({transcribedData:e}){const t=w.useRef(null),n=(i,l)=>{const u=URL.createObjectURL(i),s=document.createElement("a");s.href=u,s.download=l,s.click(),URL.revokeObjectURL(u)},r=()=>{let l=((e==null?void 0:e.chunks)??[]).map(s=>s.text).join("").trim();const u=new Blob([l],{type:"text/plain"});n(u,"transcript.txt")},o=()=>{let i=JSON.stringify((e==null?void 0:e.chunks)??[],null,2);const l=/( "timestamp": )\[\s+(\S+)\s+(\S+)\s+\]/gm;i=i.replace(l,"$1[$2 $3]");const u=new Blob([i],{type:"application/json"});n(u,"transcript.json")};return w.useEffect(()=>{t.current&&Math.abs(t.current.offsetHeight+t.current.scrollTop-t.current.scrollHeight)<=100&&(t.current.scrollTop=t.current.scrollHeight)}),z("div",{ref:t,className:"w-full flex flex-col my-2 p-4 max-h-[20rem] overflow-y-auto",children:[(e==null?void 0:e.chunks)&&e.chunks.map((i,l)=>z("div",{className:`w-full flex flex-row mb-2 ${e!=null&&e.isBusy?"bg-gray-100":"bg-white"} rounded-lg p-4 shadow-xl shadow-black/5 ring-1 ring-slate-700/10`,children:[R("div",{className:"mr-5",children:kp(i.timestamp[0])}),i.text]},`${l}-${i.text}`)),(e==null?void 0:e.tps)&&z("p",{className:"text-sm text-center mt-4 mb-1",children:[R("span",{className:"font-semibold text-black",children:e==null?void 0:e.tps.toFixed(2)})," ",R("span",{className:"text-gray-500",children:"tokens/second"})]}),e&&!e.isBusy&&z("div",{className:"w-full text-right",children:[R("button",{onClick:r,className:"text-white bg-green-500 hover:bg-green-600 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-4 py-2 text-center mr-2 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800 inline-flex items-center",children:"Export TXT"}),R("button",{onClick:o,className:"text-white bg-green-500 hover:bg-green-600 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-4 py-2 text-center mr-2 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800 inline-flex items-center",children:"Export JSON"})]})]})}function nv(e){const[t]=w.useState(()=>rv(e));return t}function rv(e){const t=new Worker(new URL("/assets/worker-be9da778.js",self.location),{type:"module"});return t.addEventListener("message",e),t}function ov(){const[e,t]=w.useState(void 0),[n,r]=w.useState(!1),[o,i]=w.useState(!1),[l,u]=w.useState([]),s=nv(E=>{const T=E.data;switch(T.status){case"progress":u(N=>N.map(F=>F.file===T.file?{...F,progress:T.progress}:F));break;case"update":case"complete":const x=T.status==="update",P=T;t({isBusy:x,text:P.data.text,tps:P.data.tps,chunks:P.data.chunks}),r(x);break;case"initiate":i(!0),u(N=>[...N,T]);break;case"ready":i(!1);break;case"error":r(!1),alert(`An error occurred: "${T.data.message}". Please file a bug report.`);break;case"done":u(N=>N.filter(F=>F.file!==T.file));break}}),[a,c]=w.useState(Mt.DEFAULT_MODEL),[f,h]=w.useState(Mt.DEFAULT_SUBTASK),[v,y]=w.useState(Mt.DEFAULT_MULTILINGUAL),[g,k]=w.useState(Mt.DEFAULT_LANGUAGE),m=w.useCallback(()=>{t(void 0)},[]),d=w.useCallback(async E=>{if(E){t(void 0),r(!0);let T;if(E.numberOfChannels===2){const x=Math.sqrt(2);let P=E.getChannelData(0),N=E.getChannelData(1);T=new Float32Array(P.length);for(let F=0;F({onInputChange:m,isBusy:n,isModelLoading:o,progressItems:l,start:d,output:e,model:a,setModel:c,multilingual:v,setMultilingual:y,subtask:f,setSubtask:h,language:g,setLanguage:k}),[n,o,l,d,e,a,v,f,g])}const iv=!!navigator.gpu;function lv(){const e=ov();return iv?z("div",{className:"flex justify-center items-center min-h-screen",children:[z("div",{className:"container flex flex-col justify-center items-center",children:[R("h1",{className:"text-5xl font-extrabold tracking-tight text-slate-900 sm:text-7xl text-center",children:"Al-Ajawd WebGPU 🐴"}),R("h2",{className:"mt-3 mb-5 px-4 text-center text-1xl font-semibold tracking-tight text-slate-900 sm:text-2xl",children:"ML-powered speech recognition directly in your browser"}),R(j1,{transcriber:e}),R(tv,{transcribedData:e.output})]}),z("div",{className:"absolute bottom-4",children:["Made with"," ",R("a",{className:"underline",href:"https://github.com/xenova/transformers.js",children:"🤗 Transformers.js"})]})]}):z("div",{className:"fixed w-screen h-screen bg-black z-10 bg-opacity-[92%] text-white text-2xl font-semibold flex justify-center items-center text-center",children:["WebGPU is not supported",R("br",{}),"by this browser :("]})}Pl.createRoot(document.getElementById("root")).render(R(M.StrictMode,{children:R(lv,{})}));