var Us=Object.defineProperty;var zs=(s,i,a)=>i in s?Us(s,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[i]=a;var Qt=(s,i,a)=>(zs(s,typeof i!="symbol"?i+"":i,a),a),ds=(s,i,a)=>{if(!i.has(s))throw TypeError("Cannot "+a)};var xt=(s,i,a)=>(ds(s,i,"read from private field"),a?a.call(s):i.get(s)),zt=(s,i,a)=>{if(i.has(s))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(s):i.set(s,a)},Dt=(s,i,a,c)=>(ds(s,i,"write to private field"),c?c.call(s,a):i.set(s,a),a);var ss=(s,i,a,c)=>({set _(d){Dt(s,i,d,a)},get _(){return xt(s,i,c)}}),Xt=(s,i,a)=>(ds(s,i,"access private method"),a);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function getAugmentedNamespace(s){if(s.__esModule)return s;var i=s.default;if(typeof i=="function"){var a=function c(){return this instanceof c?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};a.prototype=i.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(s).forEach(function(c){var d=Object.getOwnPropertyDescriptor(s,c);Object.defineProperty(a,c,d.get?d:{enumerable:!0,get:function(){return s[c]}})}),a}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/** * @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 l$2=Symbol.for("react.element"),n$3=Symbol.for("react.portal"),p$4=Symbol.for("react.fragment"),q$3=Symbol.for("react.strict_mode"),r$4=Symbol.for("react.profiler"),t$2=Symbol.for("react.provider"),u$2=Symbol.for("react.context"),v$2=Symbol.for("react.forward_ref"),w$1=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z$1=Symbol.iterator;function A$1(s){return s===null||typeof s!="object"?null:(s=z$1&&s[z$1]||s["@@iterator"],typeof s=="function"?s:null)}var B$1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C$1=Object.assign,D$1={};function E$1(s,i,a){this.props=s,this.context=i,this.refs=D$1,this.updater=a||B$1}E$1.prototype.isReactComponent={};E$1.prototype.setState=function(s,i){if(typeof s!="object"&&typeof s!="function"&&s!=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,s,i,"setState")};E$1.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,"forceUpdate")};function F(){}F.prototype=E$1.prototype;function G$1(s,i,a){this.props=s,this.context=i,this.refs=D$1,this.updater=a||B$1}var H$1=G$1.prototype=new F;H$1.constructor=G$1;C$1(H$1,E$1.prototype);H$1.isPureReactComponent=!0;var I$1=Array.isArray,J=Object.prototype.hasOwnProperty,K$1={current:null},L$1={key:!0,ref:!0,__self:!0,__source:!0};function M$1(s,i,a){var c,d={},g=null,b=null;if(i!=null)for(c in i.ref!==void 0&&(b=i.ref),i.key!==void 0&&(g=""+i.key),i)J.call(i,c)&&!L$1.hasOwnProperty(c)&&(d[c]=i[c]);var $=arguments.length-2;if($===1)d.children=a;else if(1<$){for(var j=Array($),_=0;_<$;_++)j[_]=arguments[_+2];d.children=j}if(s&&s.defaultProps)for(c in $=s.defaultProps,$)d[c]===void 0&&(d[c]=$[c]);return{$$typeof:l$2,type:s,key:g,ref:b,props:d,_owner:K$1.current}}function N$1(s,i){return{$$typeof:l$2,type:s.type,key:i,ref:s.ref,props:s.props,_owner:s._owner}}function O$1(s){return typeof s=="object"&&s!==null&&s.$$typeof===l$2}function escape(s){var i={"=":"=0",":":"=2"};return"$"+s.replace(/[=:]/g,function(a){return i[a]})}var P$1=/\/+/g;function Q$1(s,i){return typeof s=="object"&&s!==null&&s.key!=null?escape(""+s.key):i.toString(36)}function R$1(s,i,a,c,d){var g=typeof s;(g==="undefined"||g==="boolean")&&(s=null);var b=!1;if(s===null)b=!0;else switch(g){case"string":case"number":b=!0;break;case"object":switch(s.$$typeof){case l$2:case n$3:b=!0}}if(b)return b=s,d=d(b),s=c===""?"."+Q$1(b,0):c,I$1(d)?(a="",s!=null&&(a=s.replace(P$1,"$&/")+"/"),R$1(d,i,a,"",function(_){return _})):d!=null&&(O$1(d)&&(d=N$1(d,a+(!d.key||b&&b.key===d.key?"":(""+d.key).replace(P$1,"$&/")+"/")+s)),i.push(d)),1;if(b=0,c=c===""?".":c+":",I$1(s))for(var $=0;$>>1,Ft=wt[At];if(0>>1;Atd(nr,Lt))trd(ir,nr)?(wt[At]=ir,wt[tr]=Lt,At=tr):(wt[At]=nr,wt[rr]=Lt,At=rr);else if(trd(ir,Lt))wt[At]=ir,wt[tr]=Lt,At=tr;else break e}}return kt}function d(wt,kt){var Lt=wt.sortIndex-kt.sortIndex;return Lt!==0?Lt:wt.id-kt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var g=performance;s.unstable_now=function(){return g.now()}}else{var b=Date,$=b.now();s.unstable_now=function(){return b.now()-$}}var j=[],_=[],_e=1,et=null,tt=3,rt=!1,nt=!1,at=!1,ut=typeof setTimeout=="function"?setTimeout:null,ot=typeof clearTimeout=="function"?clearTimeout:null,st=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function it(wt){for(var kt=a(_);kt!==null;){if(kt.callback===null)c(_);else if(kt.startTime<=wt)c(_),kt.sortIndex=kt.expirationTime,i(j,kt);else break;kt=a(_)}}function ct(wt){if(at=!1,it(wt),!nt)if(a(j)!==null)nt=!0,St(lt);else{var kt=a(_);kt!==null&&$t(ct,kt.startTime-wt)}}function lt(wt,kt){nt=!1,at&&(at=!1,ot(ht),ht=-1),rt=!0;var Lt=tt;try{for(it(kt),et=a(j);et!==null&&(!(et.expirationTime>kt)||wt&&!Pt());){var At=et.callback;if(typeof At=="function"){et.callback=null,tt=et.priorityLevel;var Ft=At(et.expirationTime<=kt);kt=s.unstable_now(),typeof Ft=="function"?et.callback=Ft:et===a(j)&&c(j),it(kt)}else c(j);et=a(j)}if(et!==null)var qt=!0;else{var rr=a(_);rr!==null&&$t(ct,rr.startTime-kt),qt=!1}return qt}finally{et=null,tt=Lt,rt=!1}}var dt=!1,mt=null,ht=-1,Rt=5,Ct=-1;function Pt(){return!(s.unstable_now()-Ctwt||125At?(wt.sortIndex=Lt,i(_,wt),a(j)===null&&wt===a(_)&&(at?(ot(ht),ht=-1):at=!0,$t(ct,Lt-At))):(wt.sortIndex=Ft,i(j,wt),nt||rt||(nt=!0,St(lt))),wt},s.unstable_shouldYield=Pt,s.unstable_wrapCallback=function(wt){var kt=tt;return function(){var Lt=tt;tt=kt;try{return wt.apply(this,arguments)}finally{tt=Lt}}}})(scheduler_production_min);scheduler.exports=scheduler_production_min;var schedulerExports=scheduler.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 aa=reactExports,ca=schedulerExports;function p$2(s){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+s,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ja=Object.prototype.hasOwnProperty,ka=/^[: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]*$/,la={},ma={};function oa(s){return ja.call(ma,s)?!0:ja.call(la,s)?!1:ka.test(s)?ma[s]=!0:(la[s]=!0,!1)}function pa(s,i,a,c){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function qa(s,i,a,c){if(i===null||typeof i>"u"||pa(s,i,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function v$1(s,i,a,c,d,g,b){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=d,this.mustUseProperty=a,this.propertyName=s,this.type=i,this.sanitizeURL=g,this.removeEmptyString=b}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){z[s]=new v$1(s,0,!1,s,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var i=s[0];z[i]=new v$1(i,1,!1,s[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(s){z[s]=new v$1(s,2,!1,s.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){z[s]=new v$1(s,2,!1,s,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(s){z[s]=new v$1(s,3,!1,s.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(s){z[s]=new v$1(s,3,!0,s,null,!1,!1)});["capture","download"].forEach(function(s){z[s]=new v$1(s,4,!1,s,null,!1,!1)});["cols","rows","size","span"].forEach(function(s){z[s]=new v$1(s,6,!1,s,null,!1,!1)});["rowSpan","start"].forEach(function(s){z[s]=new v$1(s,5,!1,s.toLowerCase(),null,!1,!1)});var ra=/[\-:]([a-z])/g;function sa(s){return s[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(s){var i=s.replace(ra,sa);z[i]=new v$1(i,1,!1,s,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var i=s.replace(ra,sa);z[i]=new v$1(i,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(s){var i=s.replace(ra,sa);z[i]=new v$1(i,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(s){z[s]=new v$1(s,1,!1,s.toLowerCase(),null,!1,!1)});z.xlinkHref=new v$1("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(s){z[s]=new v$1(s,1,!1,s.toLowerCase(),null,!0,!0)});function ta(s,i,a,c){var d=z.hasOwnProperty(i)?z[i]:null;(d!==null?d.type!==0:c||!(2$||d[b]!==g[$]){var j=` `+d[b].replace(" at new "," at ");return s.displayName&&j.includes("")&&(j=j.replace("",s.displayName)),j}while(1<=b&&0<=$);break}}}finally{Na=!1,Error.prepareStackTrace=a}return(s=s?s.displayName||s.name:"")?Ma(s):""}function Pa(s){switch(s.tag){case 5:return Ma(s.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return s=Oa(s.type,!1),s;case 11:return s=Oa(s.type.render,!1),s;case 1:return s=Oa(s.type,!0),s;default:return""}}function Qa(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case Ca:return(s.displayName||"Context")+".Consumer";case Ba:return(s._context.displayName||"Context")+".Provider";case Da:var i=s.render;return s=s.displayName,s||(s=i.displayName||i.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case Ga:return i=s.displayName||null,i!==null?i:Qa(s.type)||"Memo";case Ha:i=s._payload,s=s._init;try{return Qa(s(i))}catch{}}return null}function Ra(s){var i=s.type;switch(s.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=i.render,s=s.displayName||s.name||"",i.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(i);case 8:return i===za?"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 i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Sa(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Ta(s){var i=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Ua(s){var i=Ta(s)?"checked":"value",a=Object.getOwnPropertyDescriptor(s.constructor.prototype,i),c=""+s[i];if(!s.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,g=a.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return d.call(this)},set:function(b){c=""+b,g.call(this,b)}}),Object.defineProperty(s,i,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(b){c=""+b},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}function Va(s){s._valueTracker||(s._valueTracker=Ua(s))}function Wa(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return s&&(c=Ta(s)?s.checked?"true":"false":s.value),s=c,s!==a?(i.setValue(s),!0):!1}function Xa(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Ya(s,i){var a=i.checked;return A({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??s._wrapperState.initialChecked})}function Za(s,i){var a=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;a=Sa(i.value!=null?i.value:a),s._wrapperState={initialChecked:c,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function ab(s,i){i=i.checked,i!=null&&ta(s,"checked",i,!1)}function bb(s,i){ab(s,i);var a=Sa(i.value),c=i.type;if(a!=null)c==="number"?(a===0&&s.value===""||s.value!=a)&&(s.value=""+a):s.value!==""+a&&(s.value=""+a);else if(c==="submit"||c==="reset"){s.removeAttribute("value");return}i.hasOwnProperty("value")?cb(s,i.type,a):i.hasOwnProperty("defaultValue")&&cb(s,i.type,Sa(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(s.defaultChecked=!!i.defaultChecked)}function db(s,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+s._wrapperState.initialValue,a||i===s.value||(s.value=i),s.defaultValue=i}a=s.name,a!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,a!==""&&(s.name=a)}function cb(s,i,a){(i!=="number"||Xa(s.ownerDocument)!==s)&&(a==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+a&&(s.defaultValue=""+a))}var eb=Array.isArray;function fb(s,i,a,c){if(s=s.options,i){i={};for(var d=0;d"+i.valueOf().toString()+"",i=mb.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;i.firstChild;)s.appendChild(i.firstChild)}});function ob(s,i){if(i){var a=s.firstChild;if(a&&a===s.lastChild&&a.nodeType===3){a.nodeValue=i;return}}s.textContent=i}var pb={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},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(s){qb.forEach(function(i){i=i+s.charAt(0).toUpperCase()+s.substring(1),pb[i]=pb[s]})});function rb(s,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||pb.hasOwnProperty(s)&&pb[s]?(""+i).trim():i+"px"}function sb(s,i){s=s.style;for(var a in i)if(i.hasOwnProperty(a)){var c=a.indexOf("--")===0,d=rb(a,i[a],c);a==="float"&&(a="cssFloat"),c?s.setProperty(a,d):s[a]=d}}var tb=A({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 ub(s,i){if(i){if(tb[s]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(p$2(137,s));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(p$2(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(p$2(61))}if(i.style!=null&&typeof i.style!="object")throw Error(p$2(62))}}function vb(s,i){if(s.indexOf("-")===-1)return typeof i.is=="string";switch(s){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 wb=null;function xb(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var yb=null,zb=null,Ab=null;function Bb(s){if(s=Cb(s)){if(typeof yb!="function")throw Error(p$2(280));var i=s.stateNode;i&&(i=Db(i),yb(s.stateNode,s.type,i))}}function Eb(s){zb?Ab?Ab.push(s):Ab=[s]:zb=s}function Fb(){if(zb){var s=zb,i=Ab;if(Ab=zb=null,Bb(s),i)for(s=0;s>>=0,s===0?32:31-(pc(s)/qc|0)|0}var rc=64,sc=4194304;function tc(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function uc(s,i){var a=s.pendingLanes;if(a===0)return 0;var c=0,d=s.suspendedLanes,g=s.pingedLanes,b=a&268435455;if(b!==0){var $=b&~d;$!==0?c=tc($):(g&=b,g!==0&&(c=tc(g)))}else b=a&~d,b!==0?c=tc(b):g!==0&&(c=tc(g));if(c===0)return 0;if(i!==0&&i!==c&&!(i&d)&&(d=c&-c,g=i&-i,d>=g||d===16&&(g&4194240)!==0))return i;if(c&4&&(c|=a&16),i=s.entangledLanes,i!==0)for(s=s.entanglements,i&=c;0a;a++)i.push(s);return i}function Ac(s,i,a){s.pendingLanes|=i,i!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,i=31-oc(i),s[i]=a}function Bc(s,i){var a=s.pendingLanes&~i;s.pendingLanes=i,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=i,s.mutableReadLanes&=i,s.entangledLanes&=i,i=s.entanglements;var c=s.eventTimes;for(s=s.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;function ge(s,i){switch(s){case"keyup":return $d.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var ie=!1;function je(s,i){switch(s){case"compositionend":return he(i);case"keypress":return i.which!==32?null:(fe=!0,ee);case"textInput":return s=i.data,s===ee&&fe?null:s;default:return null}}function ke(s,i){if(ie)return s==="compositionend"||!ae&&ge(s,i)?(s=nd(),md=ld=kd=null,ie=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:a,offset:i-s};s=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Je(a)}}function Le(s,i){return s&&i?s===i?!0:s&&s.nodeType===3?!1:i&&i.nodeType===3?Le(s,i.parentNode):"contains"in s?s.contains(i):s.compareDocumentPosition?!!(s.compareDocumentPosition(i)&16):!1:!1}function Me(){for(var s=window,i=Xa();i instanceof s.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)s=i.contentWindow;else break;i=Xa(s.document)}return i}function Ne(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i&&(i==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||i==="textarea"||s.contentEditable==="true")}function Oe(s){var i=Me(),a=s.focusedElem,c=s.selectionRange;if(i!==a&&a&&a.ownerDocument&&Le(a.ownerDocument.documentElement,a)){if(c!==null&&Ne(a)){if(i=c.start,s=c.end,s===void 0&&(s=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(s,a.value.length);else if(s=(i=a.ownerDocument||document)&&i.defaultView||window,s.getSelection){s=s.getSelection();var d=a.textContent.length,g=Math.min(c.start,d);c=c.end===void 0?g:Math.min(c.end,d),!s.extend&&g>c&&(d=c,c=g,g=d),d=Ke(a,g);var b=Ke(a,c);d&&b&&(s.rangeCount!==1||s.anchorNode!==d.node||s.anchorOffset!==d.offset||s.focusNode!==b.node||s.focusOffset!==b.offset)&&(i=i.createRange(),i.setStart(d.node,d.offset),s.removeAllRanges(),g>c?(s.addRange(i),s.extend(b.node,b.offset)):(i.setEnd(b.node,b.offset),s.addRange(i)))}}for(i=[],s=a;s=s.parentNode;)s.nodeType===1&&i.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;function Ue(s,i,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Te||Qe==null||Qe!==Xa(c)||(c=Qe,"selectionStart"in c&&Ne(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Se&&Ie(Se,c)||(Se=c,c=oe(Re,"onSelect"),0Tf||(s.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(s,i){Tf++,Sf[Tf]=s.current,s.current=i}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(s,i){var a=s.type.contextTypes;if(!a)return Vf;var c=s.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var d={},g;for(g in a)d[g]=i[g];return c&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=d),d}function Zf(s){return s=s.childContextTypes,s!=null}function $f(){E(Wf),E(H)}function ag(s,i,a){if(H.current!==Vf)throw Error(p$2(168));G(H,i),G(Wf,a)}function bg(s,i,a){var c=s.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var d in c)if(!(d in i))throw Error(p$2(108,Ra(s)||"Unknown",d));return A({},a,c)}function cg(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Vf,Xf=H.current,G(H,s),G(Wf,Wf.current),!0}function dg(s,i,a){var c=s.stateNode;if(!c)throw Error(p$2(169));a?(s=bg(s,i,Xf),c.__reactInternalMemoizedMergedChildContext=s,E(Wf),E(H),G(H,s)):E(Wf),G(Wf,a)}var eg=null,fg=!1,gg=!1;function hg(s){eg===null?eg=[s]:eg.push(s)}function ig(s){fg=!0,hg(s)}function jg(){if(!gg&&eg!==null){gg=!0;var s=0,i=C;try{var a=eg;for(C=1;s>=b,d-=b,rg=1<<32-oc(i)+d|a<ht?(Rt=mt,mt=null):Rt=mt.sibling;var Ct=tt(ot,mt,it[ht],ct);if(Ct===null){mt===null&&(mt=Rt);break}s&&mt&&Ct.alternate===null&&i(ot,mt),st=g(Ct,st,ht),dt===null?lt=Ct:dt.sibling=Ct,dt=Ct,mt=Rt}if(ht===it.length)return a(ot,mt),I&&tg(ot,ht),lt;if(mt===null){for(;htht?(Rt=mt,mt=null):Rt=mt.sibling;var Pt=tt(ot,mt,Ct.value,ct);if(Pt===null){mt===null&&(mt=Rt);break}s&&mt&&Pt.alternate===null&&i(ot,mt),st=g(Pt,st,ht),dt===null?lt=Pt:dt.sibling=Pt,dt=Pt,mt=Rt}if(Ct.done)return a(ot,mt),I&&tg(ot,ht),lt;if(mt===null){for(;!Ct.done;ht++,Ct=it.next())Ct=et(ot,Ct.value,ct),Ct!==null&&(st=g(Ct,st,ht),dt===null?lt=Ct:dt.sibling=Ct,dt=Ct);return I&&tg(ot,ht),lt}for(mt=c(ot,mt);!Ct.done;ht++,Ct=it.next())Ct=rt(mt,ot,ht,Ct.value,ct),Ct!==null&&(s&&Ct.alternate!==null&&mt.delete(Ct.key===null?ht:Ct.key),st=g(Ct,st,ht),dt===null?lt=Ct:dt.sibling=Ct,dt=Ct);return s&&mt.forEach(function(gt){return i(ot,gt)}),I&&tg(ot,ht),lt}function ut(ot,st,it,ct){if(typeof it=="object"&&it!==null&&it.type===ya&&it.key===null&&(it=it.props.children),typeof it=="object"&&it!==null){switch(it.$$typeof){case va:e:{for(var lt=it.key,dt=st;dt!==null;){if(dt.key===lt){if(lt=it.type,lt===ya){if(dt.tag===7){a(ot,dt.sibling),st=d(dt,it.props.children),st.return=ot,ot=st;break e}}else if(dt.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===Ha&&uh(lt)===dt.type){a(ot,dt.sibling),st=d(dt,it.props),st.ref=sh(ot,dt,it),st.return=ot,ot=st;break e}a(ot,dt);break}else i(ot,dt);dt=dt.sibling}it.type===ya?(st=Ah(it.props.children,ot.mode,ct,it.key),st.return=ot,ot=st):(ct=yh(it.type,it.key,it.props,null,ot.mode,ct),ct.ref=sh(ot,st,it),ct.return=ot,ot=ct)}return b(ot);case wa:e:{for(dt=it.key;st!==null;){if(st.key===dt)if(st.tag===4&&st.stateNode.containerInfo===it.containerInfo&&st.stateNode.implementation===it.implementation){a(ot,st.sibling),st=d(st,it.children||[]),st.return=ot,ot=st;break e}else{a(ot,st);break}else i(ot,st);st=st.sibling}st=zh(it,ot.mode,ct),st.return=ot,ot=st}return b(ot);case Ha:return dt=it._init,ut(ot,st,dt(it._payload),ct)}if(eb(it))return nt(ot,st,it,ct);if(Ka(it))return at(ot,st,it,ct);th(ot,it)}return typeof it=="string"&&it!==""||typeof it=="number"?(it=""+it,st!==null&&st.tag===6?(a(ot,st.sibling),st=d(st,it),st.return=ot,ot=st):(a(ot,st),st=xh(it,ot.mode,ct),st.return=ot,ot=st),b(ot)):a(ot,st)}return ut}var Bh=vh$1(!0),Ch=vh$1(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(s){if(s===Dh)throw Error(p$2(174));return s}function Ih(s,i){switch(G(Gh,i),G(Fh,s),G(Eh,Dh),s=i.nodeType,s){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:lb(null,"");break;default:s=s===8?i.parentNode:i,i=s.namespaceURI||null,s=s.tagName,i=lb(i,s)}E(Eh),G(Eh,i)}function Jh(){E(Eh),E(Fh),E(Gh)}function Kh(s){Hh(Gh.current);var i=Hh(Eh.current),a=lb(i,s.type);i!==a&&(G(Fh,s),G(Eh,a))}function Lh(s){Fh.current===s&&(E(Eh),E(Fh))}var M=Uf(0);function Mh(s){for(var i=s;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if(i.flags&128)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Nh=[];function Oh(){for(var s=0;sa?a:4,s(!0);var c=Qh.transition;Qh.transition={};try{s(!1),i()}finally{C=a,Qh.transition=c}}function Fi(){return di().memoizedState}function Gi(s,i,a){var c=lh(s);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},Hi(s))Ii(i,a);else if(a=Yg(s,i,a,c),a!==null){var d=L();mh(a,s,c,d),Ji(a,i,c)}}function ri(s,i,a){var c=lh(s),d={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(Hi(s))Ii(i,d);else{var g=s.alternate;if(s.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var b=i.lastRenderedState,$=g(b,a);if(d.hasEagerState=!0,d.eagerState=$,He($,b)){var j=i.interleaved;j===null?(d.next=d,Xg(i)):(d.next=j.next,j.next=d),i.interleaved=d;return}}catch{}finally{}a=Yg(s,i,d,c),a!==null&&(d=L(),mh(a,s,c,d),Ji(a,i,c))}}function Hi(s){var i=s.alternate;return s===N||i!==null&&i===N}function Ii(s,i){Th=Sh=!0;var a=s.pending;a===null?i.next=i:(i.next=a.next,a.next=i),s.pending=i}function Ji(s,i,a){if(a&4194240){var c=i.lanes;c&=s.pendingLanes,a|=c,i.lanes=a,Cc(s,a)}}var ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(s,i){return ci().memoizedState=[s,i===void 0?null:i],s},useContext:Vg,useEffect:vi,useImperativeHandle:function(s,i,a){return a=a!=null?a.concat([s]):null,ti(4194308,4,yi.bind(null,i,s),a)},useLayoutEffect:function(s,i){return ti(4194308,4,s,i)},useInsertionEffect:function(s,i){return ti(4,2,s,i)},useMemo:function(s,i){var a=ci();return i=i===void 0?null:i,s=s(),a.memoizedState=[s,i],s},useReducer:function(s,i,a){var c=ci();return i=a!==void 0?a(i):i,c.memoizedState=c.baseState=i,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:i},c.queue=s,s=s.dispatch=Gi.bind(null,N,s),[c.memoizedState,s]},useRef:function(s){var i=ci();return s={current:s},i.memoizedState=s},useState:qi,useDebugValue:Ai,useDeferredValue:function(s){return ci().memoizedState=s},useTransition:function(){var s=qi(!1),i=s[0];return s=Ei.bind(null,s[1]),ci().memoizedState=s,[i,s]},useMutableSource:function(){},useSyncExternalStore:function(s,i,a){var c=N,d=ci();if(I){if(a===void 0)throw Error(p$2(407));a=a()}else{if(a=i(),R===null)throw Error(p$2(349));Rh&30||ni(c,i,a)}d.memoizedState=a;var g={value:a,getSnapshot:i};return d.queue=g,vi(ki.bind(null,c,g,s),[s]),c.flags|=2048,li(9,mi.bind(null,c,g,a,i),void 0,null),a},useId:function(){var s=ci(),i=R.identifierPrefix;if(I){var a=sg,c=rg;a=(c&~(1<<32-oc(c)-1)).toString(32)+a,i=":"+i+"R"+a,a=Uh++,0<\/script>",s=s.removeChild(s.firstChild)):typeof c.is=="string"?s=b.createElement(a,{is:c.is}):(s=b.createElement(a),a==="select"&&(b=s,c.multiple?b.multiple=!0:c.size&&(b.size=c.size))):s=b.createElementNS(s,a),s[Of]=i,s[Pf]=c,Aj(s,i,!1,!1),i.stateNode=s;e:{switch(b=vb(a,c),a){case"dialog":D("cancel",s),D("close",s),d=c;break;case"iframe":case"object":case"embed":D("load",s),d=c;break;case"video":case"audio":for(d=0;dHj&&(i.flags|=128,c=!0,Ej(g,!1),i.lanes=4194304)}else{if(!c)if(s=Mh(b),s!==null){if(i.flags|=128,c=!0,a=s.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),Ej(g,!0),g.tail===null&&g.tailMode==="hidden"&&!b.alternate&&!I)return S(i),null}else 2*B()-g.renderingStartTime>Hj&&a!==1073741824&&(i.flags|=128,c=!0,Ej(g,!1),i.lanes=4194304);g.isBackwards?(b.sibling=i.child,i.child=b):(a=g.last,a!==null?a.sibling=b:i.child=b,g.last=b)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=B(),i.sibling=null,a=M.current,G(M,c?a&1|2:a&1),i):(S(i),null);case 22:case 23:return Ij(),c=i.memoizedState!==null,s!==null&&s.memoizedState!==null!==c&&(i.flags|=8192),c&&i.mode&1?gj&1073741824&&(S(i),i.subtreeFlags&6&&(i.flags|=8192)):S(i),null;case 24:return null;case 25:return null}throw Error(p$2(156,i.tag))}function Jj(s,i){switch(wg(i),i.tag){case 1:return Zf(i.type)&&$f(),s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 3:return Jh(),E(Wf),E(H),Oh(),s=i.flags,s&65536&&!(s&128)?(i.flags=s&-65537|128,i):null;case 5:return Lh(i),null;case 13:if(E(M),s=i.memoizedState,s!==null&&s.dehydrated!==null){if(i.alternate===null)throw Error(p$2(340));Ig()}return s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(i.type._context),null;case 22:case 23:return Ij(),null;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=typeof WeakSet=="function"?WeakSet:Set,V=null;function Mj(s,i){var a=s.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){W(s,i,c)}else a.current=null}function Nj(s,i,a){try{a()}catch(c){W(s,i,c)}}var Oj=!1;function Pj(s,i){if(Cf=dd,s=Me(),Ne(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var d=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var b=0,$=-1,j=-1,_=0,_e=0,et=s,tt=null;t:for(;;){for(var rt;et!==a||d!==0&&et.nodeType!==3||($=b+d),et!==g||c!==0&&et.nodeType!==3||(j=b+c),et.nodeType===3&&(b+=et.nodeValue.length),(rt=et.firstChild)!==null;)tt=et,et=rt;for(;;){if(et===s)break t;if(tt===a&&++_===d&&($=b),tt===g&&++_e===c&&(j=b),(rt=et.nextSibling)!==null)break;et=tt,tt=et.parentNode}et=rt}a=$===-1||j===-1?null:{start:$,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(Df={focusedElem:s,selectionRange:a},dd=!1,V=i;V!==null;)if(i=V,s=i.child,(i.subtreeFlags&1028)!==0&&s!==null)s.return=i,V=s;else for(;V!==null;){i=V;try{var nt=i.alternate;if(i.flags&1024)switch(i.tag){case 0:case 11:case 15:break;case 1:if(nt!==null){var at=nt.memoizedProps,ut=nt.memoizedState,ot=i.stateNode,st=ot.getSnapshotBeforeUpdate(i.elementType===i.type?at:Lg(i.type,at),ut);ot.__reactInternalSnapshotBeforeUpdate=st}break;case 3:var it=i.stateNode.containerInfo;it.nodeType===1?it.textContent="":it.nodeType===9&&it.documentElement&&it.removeChild(it.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p$2(163))}}catch(ct){W(i,i.return,ct)}if(s=i.sibling,s!==null){s.return=i.return,V=s;break}V=i.return}return nt=Oj,Oj=!1,nt}function Qj(s,i,a){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var d=c=c.next;do{if((d.tag&s)===s){var g=d.destroy;d.destroy=void 0,g!==void 0&&Nj(i,a,g)}d=d.next}while(d!==c)}}function Rj(s,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&s)===s){var c=a.create;a.destroy=c()}a=a.next}while(a!==i)}}function Sj(s){var i=s.ref;if(i!==null){var a=s.stateNode;switch(s.tag){case 5:s=a;break;default:s=a}typeof i=="function"?i(s):i.current=s}}function Tj(s){var i=s.alternate;i!==null&&(s.alternate=null,Tj(i)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(i=s.stateNode,i!==null&&(delete i[Of],delete i[Pf],delete i[of],delete i[Qf],delete i[Rf])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Uj(s){return s.tag===5||s.tag===3||s.tag===4}function Vj(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Uj(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Wj(s,i,a){var c=s.tag;if(c===5||c===6)s=s.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(s,i):a.insertBefore(s,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(s,a)):(i=a,i.appendChild(s)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Bf));else if(c!==4&&(s=s.child,s!==null))for(Wj(s,i,a),s=s.sibling;s!==null;)Wj(s,i,a),s=s.sibling}function Xj(s,i,a){var c=s.tag;if(c===5||c===6)s=s.stateNode,i?a.insertBefore(s,i):a.appendChild(s);else if(c!==4&&(s=s.child,s!==null))for(Xj(s,i,a),s=s.sibling;s!==null;)Xj(s,i,a),s=s.sibling}var X=null,Yj=!1;function Zj(s,i,a){for(a=a.child;a!==null;)ak(s,i,a),a=a.sibling}function ak(s,i,a){if(lc&&typeof lc.onCommitFiberUnmount=="function")try{lc.onCommitFiberUnmount(kc,a)}catch{}switch(a.tag){case 5:U||Mj(a,i);case 6:var c=X,d=Yj;X=null,Zj(s,i,a),X=c,Yj=d,X!==null&&(Yj?(s=X,a=a.stateNode,s.nodeType===8?s.parentNode.removeChild(a):s.removeChild(a)):X.removeChild(a.stateNode));break;case 18:X!==null&&(Yj?(s=X,a=a.stateNode,s.nodeType===8?Kf(s.parentNode,a):s.nodeType===1&&Kf(s,a),bd(s)):Kf(X,a.stateNode));break;case 4:c=X,d=Yj,X=a.stateNode.containerInfo,Yj=!0,Zj(s,i,a),X=c,Yj=d;break;case 0:case 11:case 14:case 15:if(!U&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){d=c=c.next;do{var g=d,b=g.destroy;g=g.tag,b!==void 0&&(g&2||g&4)&&Nj(a,i,b),d=d.next}while(d!==c)}Zj(s,i,a);break;case 1:if(!U&&(Mj(a,i),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch($){W(a,i,$)}Zj(s,i,a);break;case 21:Zj(s,i,a);break;case 22:a.mode&1?(U=(c=U)||a.memoizedState!==null,Zj(s,i,a),U=c):Zj(s,i,a);break;default:Zj(s,i,a)}}function bk(s){var i=s.updateQueue;if(i!==null){s.updateQueue=null;var a=s.stateNode;a===null&&(a=s.stateNode=new Lj),i.forEach(function(c){var d=ck.bind(null,s,c);a.has(c)||(a.add(c),c.then(d,d))})}}function dk(s,i){var a=i.deletions;if(a!==null)for(var c=0;cd&&(d=b),c&=~g}if(c=d,c=B()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*mk(c/1960))-c,10s?16:s,xk===null)var c=!1;else{if(s=xk,xk=null,yk=0,K&6)throw Error(p$2(331));var d=K;for(K|=4,V=s.current;V!==null;){var g=V,b=g.child;if(V.flags&16){var $=g.deletions;if($!==null){for(var j=0;j<$.length;j++){var _=$[j];for(V=_;V!==null;){var _e=V;switch(_e.tag){case 0:case 11:case 15:Qj(8,_e,g)}var et=_e.child;if(et!==null)et.return=_e,V=et;else for(;V!==null;){_e=V;var tt=_e.sibling,rt=_e.return;if(Tj(_e),_e===_){V=null;break}if(tt!==null){tt.return=rt,V=tt;break}V=rt}}}var nt=g.alternate;if(nt!==null){var at=nt.child;if(at!==null){nt.child=null;do{var ut=at.sibling;at.sibling=null,at=ut}while(at!==null)}}V=g}}if(g.subtreeFlags&2064&&b!==null)b.return=g,V=b;else e:for(;V!==null;){if(g=V,g.flags&2048)switch(g.tag){case 0:case 11:case 15:Qj(9,g,g.return)}var ot=g.sibling;if(ot!==null){ot.return=g.return,V=ot;break e}V=g.return}}var st=s.current;for(V=st;V!==null;){b=V;var it=b.child;if(b.subtreeFlags&2064&&it!==null)it.return=b,V=it;else e:for(b=st;V!==null;){if($=V,$.flags&2048)try{switch($.tag){case 0:case 11:case 15:Rj(9,$)}}catch(lt){W($,$.return,lt)}if($===b){V=null;break e}var ct=$.sibling;if(ct!==null){ct.return=$.return,V=ct;break e}V=$.return}}if(K=d,jg(),lc&&typeof lc.onPostCommitFiberRoot=="function")try{lc.onPostCommitFiberRoot(kc,s)}catch{}c=!0}return c}finally{C=a,pk.transition=i}}return!1}function Yk(s,i,a){i=Ki(a,i),i=Oi(s,i,1),s=dh(s,i,1),i=L(),s!==null&&(Ac(s,1,i),Ek(s,i))}function W(s,i,a){if(s.tag===3)Yk(s,s,a);else for(;i!==null;){if(i.tag===3){Yk(i,s,a);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Si===null||!Si.has(c))){s=Ki(a,s),s=Ri(i,s,1),i=dh(i,s,1),s=L(),i!==null&&(Ac(i,1,s),Ek(i,s));break}}i=i.return}}function Ui(s,i,a){var c=s.pingCache;c!==null&&c.delete(i),i=L(),s.pingedLanes|=s.suspendedLanes&a,R===s&&(Z&a)===a&&(T===4||T===3&&(Z&130023424)===Z&&500>B()-gk?Lk(s,0):sk|=a),Ek(s,i)}function Zk(s,i){i===0&&(s.mode&1?(i=sc,sc<<=1,!(sc&130023424)&&(sc=4194304)):i=1);var a=L();s=Zg(s,i),s!==null&&(Ac(s,i,a),Ek(s,a))}function vj(s){var i=s.memoizedState,a=0;i!==null&&(a=i.retryLane),Zk(s,a)}function ck(s,i){var a=0;switch(s.tag){case 13:var c=s.stateNode,d=s.memoizedState;d!==null&&(a=d.retryLane);break;case 19:c=s.stateNode;break;default:throw Error(p$2(314))}c!==null&&c.delete(i),Zk(s,a)}var Wk;Wk=function(s,i,a){if(s!==null)if(s.memoizedProps!==i.pendingProps||Wf.current)Ug=!0;else{if(!(s.lanes&a)&&!(i.flags&128))return Ug=!1,zj(s,i,a);Ug=!!(s.flags&131072)}else Ug=!1,I&&i.flags&1048576&&ug(i,ng,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;jj(s,i),s=i.pendingProps;var d=Yf(i,H.current);Tg(i,a),d=Xh(null,i,c,s,d,a);var g=bi();return i.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Zf(c)?(g=!0,cg(i)):g=!1,i.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,ah(i),d.updater=nh,i.stateNode=d,d._reactInternals=i,rh(i,c,s,a),i=kj(null,i,c,!0,g,a)):(i.tag=0,I&&g&&vg(i),Yi(null,i,d,a),i=i.child),i;case 16:c=i.elementType;e:{switch(jj(s,i),s=i.pendingProps,d=c._init,c=d(c._payload),i.type=c,d=i.tag=$k(c),s=Lg(c,s),d){case 0:i=dj(null,i,c,s,a);break e;case 1:i=ij(null,i,c,s,a);break e;case 11:i=Zi(null,i,c,s,a);break e;case 14:i=aj(null,i,c,Lg(c.type,s),a);break e}throw Error(p$2(306,c,""))}return i;case 0:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:Lg(c,d),dj(s,i,c,d,a);case 1:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:Lg(c,d),ij(s,i,c,d,a);case 3:e:{if(lj(i),s===null)throw Error(p$2(387));c=i.pendingProps,g=i.memoizedState,d=g.element,bh(s,i),gh(i,c,null,a);var b=i.memoizedState;if(c=b.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){d=Ki(Error(p$2(423)),i),i=mj(s,i,c,a,d);break e}else if(c!==d){d=Ki(Error(p$2(424)),i),i=mj(s,i,c,a,d);break e}else for(yg=Lf(i.stateNode.containerInfo.firstChild),xg=i,I=!0,zg=null,a=Ch(i,null,c,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ig(),c===d){i=$i(s,i,a);break e}Yi(s,i,c,a)}i=i.child}return i;case 5:return Kh(i),s===null&&Eg(i),c=i.type,d=i.pendingProps,g=s!==null?s.memoizedProps:null,b=d.children,Ef(c,d)?b=null:g!==null&&Ef(c,g)&&(i.flags|=32),hj(s,i),Yi(s,i,b,a),i.child;case 6:return s===null&&Eg(i),null;case 13:return pj(s,i,a);case 4:return Ih(i,i.stateNode.containerInfo),c=i.pendingProps,s===null?i.child=Bh(i,null,c,a):Yi(s,i,c,a),i.child;case 11:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:Lg(c,d),Zi(s,i,c,d,a);case 7:return Yi(s,i,i.pendingProps,a),i.child;case 8:return Yi(s,i,i.pendingProps.children,a),i.child;case 12:return Yi(s,i,i.pendingProps.children,a),i.child;case 10:e:{if(c=i.type._context,d=i.pendingProps,g=i.memoizedProps,b=d.value,G(Mg,c._currentValue),c._currentValue=b,g!==null)if(He(g.value,b)){if(g.children===d.children&&!Wf.current){i=$i(s,i,a);break e}}else for(g=i.child,g!==null&&(g.return=i);g!==null;){var $=g.dependencies;if($!==null){b=g.child;for(var j=$.firstContext;j!==null;){if(j.context===c){if(g.tag===1){j=ch(-1,a&-a),j.tag=2;var _=g.updateQueue;if(_!==null){_=_.shared;var _e=_.pending;_e===null?j.next=j:(j.next=_e.next,_e.next=j),_.pending=j}}g.lanes|=a,j=g.alternate,j!==null&&(j.lanes|=a),Sg(g.return,a,i),$.lanes|=a;break}j=j.next}}else if(g.tag===10)b=g.type===i.type?null:g.child;else if(g.tag===18){if(b=g.return,b===null)throw Error(p$2(341));b.lanes|=a,$=b.alternate,$!==null&&($.lanes|=a),Sg(b,a,i),b=g.sibling}else b=g.child;if(b!==null)b.return=g;else for(b=g;b!==null;){if(b===i){b=null;break}if(g=b.sibling,g!==null){g.return=b.return,b=g;break}b=b.return}g=b}Yi(s,i,d.children,a),i=i.child}return i;case 9:return d=i.type,c=i.pendingProps.children,Tg(i,a),d=Vg(d),c=c(d),i.flags|=1,Yi(s,i,c,a),i.child;case 14:return c=i.type,d=Lg(c,i.pendingProps),d=Lg(c.type,d),aj(s,i,c,d,a);case 15:return cj(s,i,i.type,i.pendingProps,a);case 17:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:Lg(c,d),jj(s,i),i.tag=1,Zf(c)?(s=!0,cg(i)):s=!1,Tg(i,a),ph(i,c,d),rh(i,c,d,a),kj(null,i,c,!0,s,a);case 19:return yj(s,i,a);case 22:return ej(s,i,a)}throw Error(p$2(156,i.tag))};function Gk(s,i){return ac(s,i)}function al(s,i,a,c){this.tag=s,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(s,i,a,c){return new al(s,i,a,c)}function bj(s){return s=s.prototype,!(!s||!s.isReactComponent)}function $k(s){if(typeof s=="function")return bj(s)?1:0;if(s!=null){if(s=s.$$typeof,s===Da)return 11;if(s===Ga)return 14}return 2}function wh(s,i){var a=s.alternate;return a===null?(a=Bg(s.tag,i,s.key,s.mode),a.elementType=s.elementType,a.type=s.type,a.stateNode=s.stateNode,a.alternate=s,s.alternate=a):(a.pendingProps=i,a.type=s.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=s.flags&14680064,a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,i=s.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=s.sibling,a.index=s.index,a.ref=s.ref,a}function yh(s,i,a,c,d,g){var b=2;if(c=s,typeof s=="function")bj(s)&&(b=1);else if(typeof s=="string")b=5;else e:switch(s){case ya:return Ah(a.children,d,g,i);case za:b=8,d|=8;break;case Aa:return s=Bg(12,a,i,d|2),s.elementType=Aa,s.lanes=g,s;case Ea:return s=Bg(13,a,i,d),s.elementType=Ea,s.lanes=g,s;case Fa:return s=Bg(19,a,i,d),s.elementType=Fa,s.lanes=g,s;case Ia:return qj(a,d,g,i);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case Ba:b=10;break e;case Ca:b=9;break e;case Da:b=11;break e;case Ga:b=14;break e;case Ha:b=16,c=null;break e}throw Error(p$2(130,s==null?s:typeof s,""))}return i=Bg(b,a,i,d),i.elementType=s,i.type=c,i.lanes=g,i}function Ah(s,i,a,c){return s=Bg(7,s,c,i),s.lanes=a,s}function qj(s,i,a,c){return s=Bg(22,s,c,i),s.elementType=Ia,s.lanes=a,s.stateNode={isHidden:!1},s}function xh(s,i,a){return s=Bg(6,s,null,i),s.lanes=a,s}function zh(s,i,a){return i=Bg(4,s.children!==null?s.children:[],s.key,i),i.lanes=a,i.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},i}function bl(s,i,a,c,d){this.tag=i,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=c,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function cl(s,i,a,c,d,g,b,$,j){return s=new bl(s,i,a,$,j),i===1?(i=1,g===!0&&(i|=8)):i=0,g=Bg(3,null,null,i),s.current=g,g.stateNode=s,g.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},ah(g),s}function dl(s,i,a){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(s){console.error(s)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM=getDefaultExportFromCjs(reactDomExports);var hydrateRoot,createRoot,m$2=reactDomExports;createRoot=m$2.createRoot,hydrateRoot=m$2.hydrateRoot;var Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},isServer=typeof window>"u"||"Deno"in window;function noop$3(){}function functionalUpdate(s,i){return typeof s=="function"?s(i):s}function isValidTimeout(s){return typeof s=="number"&&s>=0&&s!==1/0}function timeUntilStale(s,i){return Math.max(s+(i||0)-Date.now(),0)}function matchQuery(s,i){const{type:a="all",exact:c,fetchStatus:d,predicate:g,queryKey:b,stale:$}=s;if(b){if(c){if(i.queryHash!==hashQueryKeyByOptions(b,i.options))return!1}else if(!partialMatchKey(i.queryKey,b))return!1}if(a!=="all"){const j=i.isActive();if(a==="active"&&!j||a==="inactive"&&j)return!1}return!(typeof $=="boolean"&&i.isStale()!==$||typeof d<"u"&&d!==i.state.fetchStatus||g&&!g(i))}function matchMutation(s,i){const{exact:a,status:c,predicate:d,mutationKey:g}=s;if(g){if(!i.options.mutationKey)return!1;if(a){if(hashKey(i.options.mutationKey)!==hashKey(g))return!1}else if(!partialMatchKey(i.options.mutationKey,g))return!1}return!(c&&i.state.status!==c||d&&!d(i))}function hashQueryKeyByOptions(s,i){return((i==null?void 0:i.queryKeyHashFn)||hashKey)(s)}function hashKey(s){return JSON.stringify(s,(i,a)=>isPlainObject$4(a)?Object.keys(a).sort().reduce((c,d)=>(c[d]=a[d],c),{}):a)}function partialMatchKey(s,i){return s===i?!0:typeof s!=typeof i?!1:s&&i&&typeof s=="object"&&typeof i=="object"?!Object.keys(i).some(a=>!partialMatchKey(s[a],i[a])):!1}function replaceEqualDeep(s,i){if(s===i)return s;const a=isPlainArray(s)&&isPlainArray(i);if(a||isPlainObject$4(s)&&isPlainObject$4(i)){const c=a?s.length:Object.keys(s).length,d=a?i:Object.keys(i),g=d.length,b=a?[]:{};let $=0;for(let j=0;j"u")return!0;const a=i.prototype;return!(!hasObjectPrototype(a)||!a.hasOwnProperty("isPrototypeOf"))}function hasObjectPrototype(s){return Object.prototype.toString.call(s)==="[object Object]"}function sleep(s){return new Promise(i=>{setTimeout(i,s)})}function scheduleMicrotask(s){sleep(0).then(s)}function replaceData(s,i,a){return typeof a.structuralSharing=="function"?a.structuralSharing(s,i):a.structuralSharing!==!1?replaceEqualDeep(s,i):i}function keepPreviousData(s){return s}function addToEnd(s,i,a=0){const c=[...s,i];return a&&c.length>a?c.slice(1):c}function addToStart(s,i,a=0){const c=[i,...s];return a&&c.length>a?c.slice(0,-1):c}var tn,Wr,gn,ws,FocusManager=(ws=class extends Subscribable{constructor(){super();zt(this,tn,void 0);zt(this,Wr,void 0);zt(this,gn,void 0);Dt(this,gn,i=>{if(!isServer&&window.addEventListener){const a=()=>i();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){xt(this,Wr)||this.setEventListener(xt(this,gn))}onUnsubscribe(){var i;this.hasListeners()||((i=xt(this,Wr))==null||i.call(this),Dt(this,Wr,void 0))}setEventListener(i){var a;Dt(this,gn,i),(a=xt(this,Wr))==null||a.call(this),Dt(this,Wr,i(c=>{typeof c=="boolean"?this.setFocused(c):this.onFocus()}))}setFocused(i){xt(this,tn)!==i&&(Dt(this,tn,i),this.onFocus())}onFocus(){this.listeners.forEach(i=>{i()})}isFocused(){var i;return typeof xt(this,tn)=="boolean"?xt(this,tn):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},tn=new WeakMap,Wr=new WeakMap,gn=new WeakMap,ws),focusManager=new FocusManager,xn,Kr,yn,Rs,OnlineManager=(Rs=class extends Subscribable{constructor(){super();zt(this,xn,!0);zt(this,Kr,void 0);zt(this,yn,void 0);Dt(this,yn,i=>{if(!isServer&&window.addEventListener){const a=()=>i(!0),c=()=>i(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",c,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",c)}}})}onSubscribe(){xt(this,Kr)||this.setEventListener(xt(this,yn))}onUnsubscribe(){var i;this.hasListeners()||((i=xt(this,Kr))==null||i.call(this),Dt(this,Kr,void 0))}setEventListener(i){var a;Dt(this,yn,i),(a=xt(this,Kr))==null||a.call(this),Dt(this,Kr,i(this.setOnline.bind(this)))}setOnline(i){xt(this,xn)!==i&&(Dt(this,xn,i),this.listeners.forEach(c=>{c(i)}))}isOnline(){return xt(this,xn)}},xn=new WeakMap,Kr=new WeakMap,yn=new WeakMap,Rs),onlineManager=new OnlineManager;function defaultRetryDelay(s){return Math.min(1e3*2**s,3e4)}function canFetch(s){return(s??"online")==="online"?onlineManager.isOnline():!0}var CancelledError=class{constructor(s){this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function isCancelledError(s){return s instanceof CancelledError}function createRetryer(s){let i=!1,a=0,c=!1,d,g,b;const $=new Promise((ut,ot)=>{g=ut,b=ot}),j=ut=>{var ot;c||(rt(new CancelledError(ut)),(ot=s.abort)==null||ot.call(s))},_=()=>{i=!0},_e=()=>{i=!1},et=()=>!focusManager.isFocused()||s.networkMode!=="always"&&!onlineManager.isOnline(),tt=ut=>{var ot;c||(c=!0,(ot=s.onSuccess)==null||ot.call(s,ut),d==null||d(),g(ut))},rt=ut=>{var ot;c||(c=!0,(ot=s.onError)==null||ot.call(s,ut),d==null||d(),b(ut))},nt=()=>new Promise(ut=>{var ot;d=st=>{const it=c||!et();return it&&ut(st),it},(ot=s.onPause)==null||ot.call(s)}).then(()=>{var ut;d=void 0,c||(ut=s.onContinue)==null||ut.call(s)}),at=()=>{if(c)return;let ut;try{ut=s.fn()}catch(ot){ut=Promise.reject(ot)}Promise.resolve(ut).then(tt).catch(ot=>{var dt;if(c)return;const st=s.retry??(isServer?0:3),it=s.retryDelay??defaultRetryDelay,ct=typeof it=="function"?it(a,ot):it,lt=st===!0||typeof st=="number"&&a{if(et())return nt()}).then(()=>{i?rt(ot):at()})})};return canFetch(s.networkMode)?at():nt().then(at),{promise:$,cancel:j,continue:()=>(d==null?void 0:d())?$:Promise.resolve(),cancelRetry:_,continueRetry:_e}}function createNotifyManager(){let s=[],i=0,a=_e=>{_e()},c=_e=>{_e()};const d=_e=>{let et;i++;try{et=_e()}finally{i--,i||$()}return et},g=_e=>{i?s.push(_e):scheduleMicrotask(()=>{a(_e)})},b=_e=>(...et)=>{g(()=>{_e(...et)})},$=()=>{const _e=s;s=[],_e.length&&scheduleMicrotask(()=>{c(()=>{_e.forEach(et=>{a(et)})})})};return{batch:d,batchCalls:b,schedule:g,setNotifyFunction:_e=>{a=_e},setBatchNotifyFunction:_e=>{c=_e}}}var notifyManager=createNotifyManager(),rn,Cs,Removable=(Cs=class{constructor(){zt(this,rn,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.gcTime)&&Dt(this,rn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(isServer?1/0:5*60*1e3))}clearGcTimeout(){xt(this,rn)&&(clearTimeout(xt(this,rn)),Dt(this,rn,void 0))}},rn=new WeakMap,Cs),vn,bn,_r,qr,Tr,vr,Dn,nn,En,os,Lr,Ur,js,Query=(js=class extends Removable{constructor(i){super();zt(this,En);zt(this,Lr);zt(this,vn,void 0);zt(this,bn,void 0);zt(this,_r,void 0);zt(this,qr,void 0);zt(this,Tr,void 0);zt(this,vr,void 0);zt(this,Dn,void 0);zt(this,nn,void 0);Dt(this,nn,!1),Dt(this,Dn,i.defaultOptions),Xt(this,En,os).call(this,i.options),Dt(this,vr,[]),Dt(this,_r,i.cache),this.queryKey=i.queryKey,this.queryHash=i.queryHash,Dt(this,vn,i.state||getDefaultState$1(this.options)),this.state=xt(this,vn),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!xt(this,vr).length&&this.state.fetchStatus==="idle"&&xt(this,_r).remove(this)}setData(i,a){const c=replaceData(this.state.data,i,this.options);return Xt(this,Lr,Ur).call(this,{data:c,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),c}setState(i,a){Xt(this,Lr,Ur).call(this,{type:"setState",state:i,setStateOptions:a})}cancel(i){var c;const a=xt(this,qr);return(c=xt(this,Tr))==null||c.cancel(i),a?a.then(noop$3).catch(noop$3):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(xt(this,vn))}isActive(){return xt(this,vr).some(i=>i.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||xt(this,vr).some(i=>i.getCurrentResult().isStale)}isStaleByTime(i=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!timeUntilStale(this.state.dataUpdatedAt,i)}onFocus(){var a;const i=xt(this,vr).find(c=>c.shouldFetchOnWindowFocus());i==null||i.refetch({cancelRefetch:!1}),(a=xt(this,Tr))==null||a.continue()}onOnline(){var a;const i=xt(this,vr).find(c=>c.shouldFetchOnReconnect());i==null||i.refetch({cancelRefetch:!1}),(a=xt(this,Tr))==null||a.continue()}addObserver(i){xt(this,vr).includes(i)||(xt(this,vr).push(i),this.clearGcTimeout(),xt(this,_r).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){xt(this,vr).includes(i)&&(Dt(this,vr,xt(this,vr).filter(a=>a!==i)),xt(this,vr).length||(xt(this,Tr)&&(xt(this,nn)?xt(this,Tr).cancel({revert:!0}):xt(this,Tr).cancelRetry()),this.scheduleGc()),xt(this,_r).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return xt(this,vr).length}invalidate(){this.state.isInvalidated||Xt(this,Lr,Ur).call(this,{type:"invalidate"})}fetch(i,a){var _,_e,et,tt;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(xt(this,qr))return(_=xt(this,Tr))==null||_.continueRetry(),xt(this,qr)}if(i&&Xt(this,En,os).call(this,i),!this.options.queryFn){const rt=xt(this,vr).find(nt=>nt.options.queryFn);rt&&Xt(this,En,os).call(this,rt.options)}const c=new AbortController,d={queryKey:this.queryKey,meta:this.meta},g=rt=>{Object.defineProperty(rt,"signal",{enumerable:!0,get:()=>(Dt(this,nn,!0),c.signal)})};g(d);const b=()=>this.options.queryFn?(Dt(this,nn,!1),this.options.persister?this.options.persister(this.options.queryFn,d,this):this.options.queryFn(d)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),$={fetchOptions:a,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:b};g($),(_e=this.options.behavior)==null||_e.onFetch($,this),Dt(this,bn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((et=$.fetchOptions)==null?void 0:et.meta))&&Xt(this,Lr,Ur).call(this,{type:"fetch",meta:(tt=$.fetchOptions)==null?void 0:tt.meta});const j=rt=>{var nt,at,ut,ot;isCancelledError(rt)&&rt.silent||Xt(this,Lr,Ur).call(this,{type:"error",error:rt}),isCancelledError(rt)||((at=(nt=xt(this,_r).config).onError)==null||at.call(nt,rt,this),(ot=(ut=xt(this,_r).config).onSettled)==null||ot.call(ut,this.state.data,rt,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return Dt(this,Tr,createRetryer({fn:$.fetchFn,abort:c.abort.bind(c),onSuccess:rt=>{var nt,at,ut,ot;if(typeof rt>"u"){j(new Error(`${this.queryHash} data is undefined`));return}this.setData(rt),(at=(nt=xt(this,_r).config).onSuccess)==null||at.call(nt,rt,this),(ot=(ut=xt(this,_r).config).onSettled)==null||ot.call(ut,rt,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:j,onFail:(rt,nt)=>{Xt(this,Lr,Ur).call(this,{type:"failed",failureCount:rt,error:nt})},onPause:()=>{Xt(this,Lr,Ur).call(this,{type:"pause"})},onContinue:()=>{Xt(this,Lr,Ur).call(this,{type:"continue"})},retry:$.options.retry,retryDelay:$.options.retryDelay,networkMode:$.options.networkMode})),Dt(this,qr,xt(this,Tr).promise),xt(this,qr)}},vn=new WeakMap,bn=new WeakMap,_r=new WeakMap,qr=new WeakMap,Tr=new WeakMap,vr=new WeakMap,Dn=new WeakMap,nn=new WeakMap,En=new WeakSet,os=function(i){this.options={...xt(this,Dn),...i},this.updateGcTime(this.options.gcTime)},Lr=new WeakSet,Ur=function(i){const a=c=>{switch(i.type){case"failed":return{...c,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...c,fetchStatus:"paused"};case"continue":return{...c,fetchStatus:"fetching"};case"fetch":return{...c,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:i.meta??null,fetchStatus:canFetch(this.options.networkMode)?"fetching":"paused",...!c.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...c,data:i.data,dataUpdateCount:c.dataUpdateCount+1,dataUpdatedAt:i.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const d=i.error;return isCancelledError(d)&&d.revert&&xt(this,bn)?{...xt(this,bn),fetchStatus:"idle"}:{...c,error:d,errorUpdateCount:c.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:c.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error"};case"invalidate":return{...c,isInvalidated:!0};case"setState":return{...c,...i.state}}};this.state=a(this.state),notifyManager.batch(()=>{xt(this,vr).forEach(c=>{c.onQueryUpdate()}),xt(this,_r).notify({query:this,type:"updated",action:i})})},js);function getDefaultState$1(s){const i=typeof s.initialData=="function"?s.initialData():s.initialData,a=typeof i<"u",c=a?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:a?c??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var Or,_s,QueryCache=(_s=class extends Subscribable{constructor(i={}){super();zt(this,Or,void 0);this.config=i,Dt(this,Or,new Map)}build(i,a,c){const d=a.queryKey,g=a.queryHash??hashQueryKeyByOptions(d,a);let b=this.get(g);return b||(b=new Query({cache:this,queryKey:d,queryHash:g,options:i.defaultQueryOptions(a),state:c,defaultOptions:i.getQueryDefaults(d)}),this.add(b)),b}add(i){xt(this,Or).has(i.queryHash)||(xt(this,Or).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const a=xt(this,Or).get(i.queryHash);a&&(i.destroy(),a===i&&xt(this,Or).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){notifyManager.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return xt(this,Or).get(i)}getAll(){return[...xt(this,Or).values()]}find(i){const a={exact:!0,...i};return this.getAll().find(c=>matchQuery(a,c))}findAll(i={}){const a=this.getAll();return Object.keys(i).length>0?a.filter(c=>matchQuery(i,c)):a}notify(i){notifyManager.batch(()=>{this.listeners.forEach(a=>{a(i)})})}onFocus(){notifyManager.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},Or=new WeakMap,_s),Dr,Nn,jr,Sn,Nr,Hr,Ts,Mutation=(Ts=class extends Removable{constructor(i){super();zt(this,Nr);zt(this,Dr,void 0);zt(this,Nn,void 0);zt(this,jr,void 0);zt(this,Sn,void 0);this.mutationId=i.mutationId,Dt(this,Nn,i.defaultOptions),Dt(this,jr,i.mutationCache),Dt(this,Dr,[]),this.state=i.state||getDefaultState(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options={...xt(this,Nn),...i},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){xt(this,Dr).includes(i)||(xt(this,Dr).push(i),this.clearGcTimeout(),xt(this,jr).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){Dt(this,Dr,xt(this,Dr).filter(a=>a!==i)),this.scheduleGc(),xt(this,jr).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){xt(this,Dr).length||(this.state.status==="pending"?this.scheduleGc():xt(this,jr).remove(this))}continue(){var i;return((i=xt(this,Sn))==null?void 0:i.continue())??this.execute(this.state.variables)}async execute(i){var d,g,b,$,j,_,_e,et,tt,rt,nt,at,ut,ot,st,it,ct,lt,dt,mt;const a=()=>(Dt(this,Sn,createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(i):Promise.reject(new Error("No mutationFn found")),onFail:(ht,Rt)=>{Xt(this,Nr,Hr).call(this,{type:"failed",failureCount:ht,error:Rt})},onPause:()=>{Xt(this,Nr,Hr).call(this,{type:"pause"})},onContinue:()=>{Xt(this,Nr,Hr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),xt(this,Sn).promise),c=this.state.status==="pending";try{if(!c){Xt(this,Nr,Hr).call(this,{type:"pending",variables:i}),await((g=(d=xt(this,jr).config).onMutate)==null?void 0:g.call(d,i,this));const Rt=await(($=(b=this.options).onMutate)==null?void 0:$.call(b,i));Rt!==this.state.context&&Xt(this,Nr,Hr).call(this,{type:"pending",context:Rt,variables:i})}const ht=await a();return await((_=(j=xt(this,jr).config).onSuccess)==null?void 0:_.call(j,ht,i,this.state.context,this)),await((et=(_e=this.options).onSuccess)==null?void 0:et.call(_e,ht,i,this.state.context)),await((rt=(tt=xt(this,jr).config).onSettled)==null?void 0:rt.call(tt,ht,null,this.state.variables,this.state.context,this)),await((at=(nt=this.options).onSettled)==null?void 0:at.call(nt,ht,null,i,this.state.context)),Xt(this,Nr,Hr).call(this,{type:"success",data:ht}),ht}catch(ht){try{throw await((ot=(ut=xt(this,jr).config).onError)==null?void 0:ot.call(ut,ht,i,this.state.context,this)),await((it=(st=this.options).onError)==null?void 0:it.call(st,ht,i,this.state.context)),await((lt=(ct=xt(this,jr).config).onSettled)==null?void 0:lt.call(ct,void 0,ht,this.state.variables,this.state.context,this)),await((mt=(dt=this.options).onSettled)==null?void 0:mt.call(dt,void 0,ht,i,this.state.context)),ht}finally{Xt(this,Nr,Hr).call(this,{type:"error",error:ht})}}}},Dr=new WeakMap,Nn=new WeakMap,jr=new WeakMap,Sn=new WeakMap,Nr=new WeakSet,Hr=function(i){const a=c=>{switch(i.type){case"failed":return{...c,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...c,isPaused:!0};case"continue":return{...c,isPaused:!1};case"pending":return{...c,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!canFetch(this.options.networkMode),status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...c,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...c,data:void 0,error:i.error,failureCount:c.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=a(this.state),notifyManager.batch(()=>{xt(this,Dr).forEach(c=>{c.onMutationUpdate(i)}),xt(this,jr).notify({mutation:this,type:"updated",action:i})})},Ts);function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pr,Fn,sn,Ps,MutationCache=(Ps=class extends Subscribable{constructor(i={}){super();zt(this,Pr,void 0);zt(this,Fn,void 0);zt(this,sn,void 0);this.config=i,Dt(this,Pr,[]),Dt(this,Fn,0)}build(i,a,c){const d=new Mutation({mutationCache:this,mutationId:++ss(this,Fn)._,options:i.defaultMutationOptions(a),state:c});return this.add(d),d}add(i){xt(this,Pr).push(i),this.notify({type:"added",mutation:i})}remove(i){Dt(this,Pr,xt(this,Pr).filter(a=>a!==i)),this.notify({type:"removed",mutation:i})}clear(){notifyManager.batch(()=>{xt(this,Pr).forEach(i=>{this.remove(i)})})}getAll(){return xt(this,Pr)}find(i){const a={exact:!0,...i};return xt(this,Pr).find(c=>matchMutation(a,c))}findAll(i={}){return xt(this,Pr).filter(a=>matchMutation(i,a))}notify(i){notifyManager.batch(()=>{this.listeners.forEach(a=>{a(i)})})}resumePausedMutations(){return Dt(this,sn,(xt(this,sn)??Promise.resolve()).then(()=>{const i=xt(this,Pr).filter(a=>a.state.isPaused);return notifyManager.batch(()=>i.reduce((a,c)=>a.then(()=>c.continue().catch(noop$3)),Promise.resolve()))}).then(()=>{Dt(this,sn,void 0)})),xt(this,sn)}},Pr=new WeakMap,Fn=new WeakMap,sn=new WeakMap,Ps);function infiniteQueryBehavior(s){return{onFetch:(i,a)=>{const c=async()=>{var nt,at,ut,ot,st;const d=i.options,g=(ut=(at=(nt=i.fetchOptions)==null?void 0:nt.meta)==null?void 0:at.fetchMore)==null?void 0:ut.direction,b=((ot=i.state.data)==null?void 0:ot.pages)||[],$=((st=i.state.data)==null?void 0:st.pageParams)||[],j={pages:[],pageParams:[]};let _=!1;const _e=it=>{Object.defineProperty(it,"signal",{enumerable:!0,get:()=>(i.signal.aborted?_=!0:i.signal.addEventListener("abort",()=>{_=!0}),i.signal)})},et=i.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${i.options.queryHash}'`))),tt=async(it,ct,lt)=>{if(_)return Promise.reject();if(ct==null&&it.pages.length)return Promise.resolve(it);const dt={queryKey:i.queryKey,pageParam:ct,direction:lt?"backward":"forward",meta:i.options.meta};_e(dt);const mt=await et(dt),{maxPages:ht}=i.options,Rt=lt?addToStart:addToEnd;return{pages:Rt(it.pages,mt,ht),pageParams:Rt(it.pageParams,ct,ht)}};let rt;if(g&&b.length){const it=g==="backward",ct=it?getPreviousPageParam:getNextPageParam,lt={pages:b,pageParams:$},dt=ct(d,lt);rt=await tt(lt,dt,it)}else{rt=await tt(j,$[0]??d.initialPageParam);const it=s??b.length;for(let ct=1;ct{var d,g;return(g=(d=i.options).persister)==null?void 0:g.call(d,c,{queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},a)}:i.fetchFn=c}}}function getNextPageParam(s,{pages:i,pageParams:a}){const c=i.length-1;return s.getNextPageParam(i[c],i,a[c],a)}function getPreviousPageParam(s,{pages:i,pageParams:a}){var c;return(c=s.getPreviousPageParam)==null?void 0:c.call(s,i[0],i,a[0],a)}function hasNextPage(s,i){return i?getNextPageParam(s,i)!=null:!1}function hasPreviousPage(s,i){return!i||!s.getPreviousPageParam?!1:getPreviousPageParam(s,i)!=null}var yr,Gr,Zr,$n,wn,Qr,Rn,Cn,ks,QueryClient=(ks=class{constructor(s={}){zt(this,yr,void 0);zt(this,Gr,void 0);zt(this,Zr,void 0);zt(this,$n,void 0);zt(this,wn,void 0);zt(this,Qr,void 0);zt(this,Rn,void 0);zt(this,Cn,void 0);Dt(this,yr,s.queryCache||new QueryCache),Dt(this,Gr,s.mutationCache||new MutationCache),Dt(this,Zr,s.defaultOptions||{}),Dt(this,$n,new Map),Dt(this,wn,new Map),Dt(this,Qr,0)}mount(){ss(this,Qr)._++,xt(this,Qr)===1&&(Dt(this,Rn,focusManager.subscribe(()=>{focusManager.isFocused()&&(this.resumePausedMutations(),xt(this,yr).onFocus())})),Dt(this,Cn,onlineManager.subscribe(()=>{onlineManager.isOnline()&&(this.resumePausedMutations(),xt(this,yr).onOnline())})))}unmount(){var s,i;ss(this,Qr)._--,xt(this,Qr)===0&&((s=xt(this,Rn))==null||s.call(this),Dt(this,Rn,void 0),(i=xt(this,Cn))==null||i.call(this),Dt(this,Cn,void 0))}isFetching(s){return xt(this,yr).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return xt(this,Gr).findAll({...s,status:"pending"}).length}getQueryData(s){var i;return(i=xt(this,yr).find({queryKey:s}))==null?void 0:i.state.data}ensureQueryData(s){const i=this.getQueryData(s.queryKey);return i!==void 0?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(s){return this.getQueryCache().findAll(s).map(({queryKey:i,state:a})=>{const c=a.data;return[i,c]})}setQueryData(s,i,a){const c=xt(this,yr).find({queryKey:s}),d=c==null?void 0:c.state.data,g=functionalUpdate(i,d);if(typeof g>"u")return;const b=this.defaultQueryOptions({queryKey:s});return xt(this,yr).build(this,b).setData(g,{...a,manual:!0})}setQueriesData(s,i,a){return notifyManager.batch(()=>this.getQueryCache().findAll(s).map(({queryKey:c})=>[c,this.setQueryData(c,i,a)]))}getQueryState(s){var i;return(i=xt(this,yr).find({queryKey:s}))==null?void 0:i.state}removeQueries(s){const i=xt(this,yr);notifyManager.batch(()=>{i.findAll(s).forEach(a=>{i.remove(a)})})}resetQueries(s,i){const a=xt(this,yr),c={type:"active",...s};return notifyManager.batch(()=>(a.findAll(s).forEach(d=>{d.reset()}),this.refetchQueries(c,i)))}cancelQueries(s={},i={}){const a={revert:!0,...i},c=notifyManager.batch(()=>xt(this,yr).findAll(s).map(d=>d.cancel(a)));return Promise.all(c).then(noop$3).catch(noop$3)}invalidateQueries(s={},i={}){return notifyManager.batch(()=>{if(xt(this,yr).findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const a={...s,type:s.refetchType??s.type??"active"};return this.refetchQueries(a,i)})}refetchQueries(s={},i){const a={...i,cancelRefetch:(i==null?void 0:i.cancelRefetch)??!0},c=notifyManager.batch(()=>xt(this,yr).findAll(s).filter(d=>!d.isDisabled()).map(d=>{let g=d.fetch(void 0,a);return a.throwOnError||(g=g.catch(noop$3)),d.state.fetchStatus==="paused"?Promise.resolve():g}));return Promise.all(c).then(noop$3)}fetchQuery(s){const i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const a=xt(this,yr).build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(noop$3).catch(noop$3)}fetchInfiniteQuery(s){return s.behavior=infiniteQueryBehavior(s.pages),this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(noop$3).catch(noop$3)}resumePausedMutations(){return xt(this,Gr).resumePausedMutations()}getQueryCache(){return xt(this,yr)}getMutationCache(){return xt(this,Gr)}getDefaultOptions(){return xt(this,Zr)}setDefaultOptions(s){Dt(this,Zr,s)}setQueryDefaults(s,i){xt(this,$n).set(hashKey(s),{queryKey:s,defaultOptions:i})}getQueryDefaults(s){const i=[...xt(this,$n).values()];let a={};return i.forEach(c=>{partialMatchKey(s,c.queryKey)&&(a={...a,...c.defaultOptions})}),a}setMutationDefaults(s,i){xt(this,wn).set(hashKey(s),{mutationKey:s,defaultOptions:i})}getMutationDefaults(s){const i=[...xt(this,wn).values()];let a={};return i.forEach(c=>{partialMatchKey(s,c.mutationKey)&&(a={...a,...c.defaultOptions})}),a}defaultQueryOptions(s){if(s!=null&&s._defaulted)return s;const i={...xt(this,Zr).queries,...(s==null?void 0:s.queryKey)&&this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return i.queryHash||(i.queryHash=hashQueryKeyByOptions(i.queryKey,i)),typeof i.refetchOnReconnect>"u"&&(i.refetchOnReconnect=i.networkMode!=="always"),typeof i.throwOnError>"u"&&(i.throwOnError=!!i.suspense),typeof i.networkMode>"u"&&i.persister&&(i.networkMode="offlineFirst"),i}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...xt(this,Zr).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){xt(this,yr).clear(),xt(this,Gr).clear()}},yr=new WeakMap,Gr=new WeakMap,Zr=new WeakMap,$n=new WeakMap,wn=new WeakMap,Qr=new WeakMap,Rn=new WeakMap,Cn=new WeakMap,ks),Cr,lr,jn,Sr,on,_n,Fr,Mn,Tn,Pn,an,ln,Yr,un,cn,On,Un,fs,zn,ps,Vn,ms,Bn,hs,Hn,gs,Wn,xs,Kn,ys,ls,Is,Ls,QueryObserver=(Ls=class extends Subscribable{constructor(i,a){super();zt(this,cn);zt(this,Un);zt(this,zn);zt(this,Vn);zt(this,Bn);zt(this,Hn);zt(this,Wn);zt(this,Kn);zt(this,ls);zt(this,Cr,void 0);zt(this,lr,void 0);zt(this,jn,void 0);zt(this,Sr,void 0);zt(this,on,void 0);zt(this,_n,void 0);zt(this,Fr,void 0);zt(this,Mn,void 0);zt(this,Tn,void 0);zt(this,Pn,void 0);zt(this,an,void 0);zt(this,ln,void 0);zt(this,Yr,void 0);zt(this,un,void 0);Dt(this,lr,void 0),Dt(this,jn,void 0),Dt(this,Sr,void 0),Dt(this,un,new Set),Dt(this,Cr,i),this.options=a,Dt(this,Fr,null),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(xt(this,lr).addObserver(this),shouldFetchOnMount(xt(this,lr),this.options)?Xt(this,cn,On).call(this):this.updateResult(),Xt(this,Bn,hs).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(xt(this,lr),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(xt(this,lr),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Xt(this,Hn,gs).call(this),Xt(this,Wn,xs).call(this),xt(this,lr).removeObserver(this)}setOptions(i,a){const c=this.options,d=xt(this,lr);if(this.options=xt(this,Cr).defaultQueryOptions(i),shallowEqualObjects(c,this.options)||xt(this,Cr).getQueryCache().notify({type:"observerOptionsUpdated",query:xt(this,lr),observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=c.queryKey),Xt(this,Kn,ys).call(this);const g=this.hasListeners();g&&shouldFetchOptionally(xt(this,lr),d,this.options,c)&&Xt(this,cn,On).call(this),this.updateResult(a),g&&(xt(this,lr)!==d||this.options.enabled!==c.enabled||this.options.staleTime!==c.staleTime)&&Xt(this,Un,fs).call(this);const b=Xt(this,zn,ps).call(this);g&&(xt(this,lr)!==d||this.options.enabled!==c.enabled||b!==xt(this,Yr))&&Xt(this,Vn,ms).call(this,b)}getOptimisticResult(i){const a=xt(this,Cr).getQueryCache().build(xt(this,Cr),i),c=this.createResult(a,i);return shouldAssignObserverCurrentProperties(this,c)&&(Dt(this,Sr,c),Dt(this,_n,this.options),Dt(this,on,xt(this,lr).state)),c}getCurrentResult(){return xt(this,Sr)}trackResult(i){const a={};return Object.keys(i).forEach(c=>{Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:()=>(xt(this,un).add(c),i[c])})}),a}getCurrentQuery(){return xt(this,lr)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const a=xt(this,Cr).defaultQueryOptions(i),c=xt(this,Cr).getQueryCache().build(xt(this,Cr),a);return c.isFetchingOptimistic=!0,c.fetch().then(()=>this.createResult(c,a))}fetch(i){return Xt(this,cn,On).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),xt(this,Sr)))}createResult(i,a){var dt;const c=xt(this,lr),d=this.options,g=xt(this,Sr),b=xt(this,on),$=xt(this,_n),_=i!==c?i.state:xt(this,jn),{state:_e}=i;let{error:et,errorUpdatedAt:tt,fetchStatus:rt,status:nt}=_e,at=!1,ut;if(a._optimisticResults){const mt=this.hasListeners(),ht=!mt&&shouldFetchOnMount(i,a),Rt=mt&&shouldFetchOptionally(i,c,a,d);(ht||Rt)&&(rt=canFetch(i.options.networkMode)?"fetching":"paused",_e.dataUpdatedAt||(nt="pending")),a._optimisticResults==="isRestoring"&&(rt="idle")}if(a.select&&typeof _e.data<"u")if(g&&_e.data===(b==null?void 0:b.data)&&a.select===xt(this,Mn))ut=xt(this,Tn);else try{Dt(this,Mn,a.select),ut=a.select(_e.data),ut=replaceData(g==null?void 0:g.data,ut,a),Dt(this,Tn,ut),Dt(this,Fr,null)}catch(mt){Dt(this,Fr,mt)}else ut=_e.data;if(typeof a.placeholderData<"u"&&typeof ut>"u"&&nt==="pending"){let mt;if(g!=null&&g.isPlaceholderData&&a.placeholderData===($==null?void 0:$.placeholderData))mt=g.data;else if(mt=typeof a.placeholderData=="function"?a.placeholderData((dt=xt(this,Pn))==null?void 0:dt.state.data,xt(this,Pn)):a.placeholderData,a.select&&typeof mt<"u")try{mt=a.select(mt),Dt(this,Fr,null)}catch(ht){Dt(this,Fr,ht)}typeof mt<"u"&&(nt="success",ut=replaceData(g==null?void 0:g.data,mt,a),at=!0)}xt(this,Fr)&&(et=xt(this,Fr),ut=xt(this,Tn),tt=Date.now(),nt="error");const ot=rt==="fetching",st=nt==="pending",it=nt==="error",ct=st&&ot;return{status:nt,fetchStatus:rt,isPending:st,isSuccess:nt==="success",isError:it,isInitialLoading:ct,isLoading:ct,data:ut,dataUpdatedAt:_e.dataUpdatedAt,error:et,errorUpdatedAt:tt,failureCount:_e.fetchFailureCount,failureReason:_e.fetchFailureReason,errorUpdateCount:_e.errorUpdateCount,isFetched:_e.dataUpdateCount>0||_e.errorUpdateCount>0,isFetchedAfterMount:_e.dataUpdateCount>_.dataUpdateCount||_e.errorUpdateCount>_.errorUpdateCount,isFetching:ot,isRefetching:ot&&!st,isLoadingError:it&&_e.dataUpdatedAt===0,isPaused:rt==="paused",isPlaceholderData:at,isRefetchError:it&&_e.dataUpdatedAt!==0,isStale:isStale(i,a),refetch:this.refetch}}updateResult(i){const a=xt(this,Sr),c=this.createResult(xt(this,lr),this.options);if(Dt(this,on,xt(this,lr).state),Dt(this,_n,this.options),shallowEqualObjects(c,a))return;xt(this,on).data!==void 0&&Dt(this,Pn,xt(this,lr)),Dt(this,Sr,c);const d={},g=()=>{if(!a)return!0;const{notifyOnChangeProps:b}=this.options,$=typeof b=="function"?b():b;if($==="all"||!$&&!xt(this,un).size)return!0;const j=new Set($??xt(this,un));return this.options.throwOnError&&j.add("error"),Object.keys(xt(this,Sr)).some(_=>{const _e=_;return xt(this,Sr)[_e]!==a[_e]&&j.has(_e)})};(i==null?void 0:i.listeners)!==!1&&g()&&(d.listeners=!0),Xt(this,ls,Is).call(this,{...d,...i})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Xt(this,Bn,hs).call(this)}},Cr=new WeakMap,lr=new WeakMap,jn=new WeakMap,Sr=new WeakMap,on=new WeakMap,_n=new WeakMap,Fr=new WeakMap,Mn=new WeakMap,Tn=new WeakMap,Pn=new WeakMap,an=new WeakMap,ln=new WeakMap,Yr=new WeakMap,un=new WeakMap,cn=new WeakSet,On=function(i){Xt(this,Kn,ys).call(this);let a=xt(this,lr).fetch(this.options,i);return i!=null&&i.throwOnError||(a=a.catch(noop$3)),a},Un=new WeakSet,fs=function(){if(Xt(this,Hn,gs).call(this),isServer||xt(this,Sr).isStale||!isValidTimeout(this.options.staleTime))return;const a=timeUntilStale(xt(this,Sr).dataUpdatedAt,this.options.staleTime)+1;Dt(this,an,setTimeout(()=>{xt(this,Sr).isStale||this.updateResult()},a))},zn=new WeakSet,ps=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(xt(this,lr)):this.options.refetchInterval)??!1},Vn=new WeakSet,ms=function(i){Xt(this,Wn,xs).call(this),Dt(this,Yr,i),!(isServer||this.options.enabled===!1||!isValidTimeout(xt(this,Yr))||xt(this,Yr)===0)&&Dt(this,ln,setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&Xt(this,cn,On).call(this)},xt(this,Yr)))},Bn=new WeakSet,hs=function(){Xt(this,Un,fs).call(this),Xt(this,Vn,ms).call(this,Xt(this,zn,ps).call(this))},Hn=new WeakSet,gs=function(){xt(this,an)&&(clearTimeout(xt(this,an)),Dt(this,an,void 0))},Wn=new WeakSet,xs=function(){xt(this,ln)&&(clearInterval(xt(this,ln)),Dt(this,ln,void 0))},Kn=new WeakSet,ys=function(){const i=xt(this,Cr).getQueryCache().build(xt(this,Cr),this.options);if(i===xt(this,lr))return;const a=xt(this,lr);Dt(this,lr,i),Dt(this,jn,i.state),this.hasListeners()&&(a==null||a.removeObserver(this),i.addObserver(this))},ls=new WeakSet,Is=function(i){notifyManager.batch(()=>{i.listeners&&this.listeners.forEach(a=>{a(xt(this,Sr))}),xt(this,Cr).getQueryCache().notify({query:xt(this,lr),type:"observerResultsUpdated"})})},Ls);function shouldLoadOnMount(s,i){return i.enabled!==!1&&!s.state.dataUpdatedAt&&!(s.state.status==="error"&&i.retryOnMount===!1)}function shouldFetchOnMount(s,i){return shouldLoadOnMount(s,i)||s.state.dataUpdatedAt>0&&shouldFetchOn(s,i,i.refetchOnMount)}function shouldFetchOn(s,i,a){if(i.enabled!==!1){const c=typeof a=="function"?a(s):a;return c==="always"||c!==!1&&isStale(s,i)}return!1}function shouldFetchOptionally(s,i,a,c){return a.enabled!==!1&&(s!==i||c.enabled===!1)&&(!a.suspense||s.state.status!=="error")&&isStale(s,a)}function isStale(s,i){return s.isStaleByTime(i.staleTime)}function shouldAssignObserverCurrentProperties(s,i){return!shallowEqualObjects(s.getCurrentResult(),i)}var Xr,wr,kr,zr,kn,as,qn,vs,As,MutationObserver$1=(As=class extends Subscribable{constructor(a,c){super();zt(this,kn);zt(this,qn);zt(this,Xr,void 0);zt(this,wr,void 0);zt(this,kr,void 0);zt(this,zr,void 0);Dt(this,wr,void 0),Dt(this,Xr,a),this.setOptions(c),this.bindMethods(),Xt(this,kn,as).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){var d;const c=this.options;this.options=xt(this,Xr).defaultMutationOptions(a),shallowEqualObjects(c,this.options)||xt(this,Xr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:xt(this,kr),observer:this}),(d=xt(this,kr))==null||d.setOptions(this.options)}onUnsubscribe(){var a;this.hasListeners()||(a=xt(this,kr))==null||a.removeObserver(this)}onMutationUpdate(a){Xt(this,kn,as).call(this),Xt(this,qn,vs).call(this,a)}getCurrentResult(){return xt(this,wr)}reset(){Dt(this,kr,void 0),Xt(this,kn,as).call(this),Xt(this,qn,vs).call(this)}mutate(a,c){var d;return Dt(this,zr,c),(d=xt(this,kr))==null||d.removeObserver(this),Dt(this,kr,xt(this,Xr).getMutationCache().build(xt(this,Xr),this.options)),xt(this,kr).addObserver(this),xt(this,kr).execute(a)}},Xr=new WeakMap,wr=new WeakMap,kr=new WeakMap,zr=new WeakMap,kn=new WeakSet,as=function(){var c;const a=((c=xt(this,kr))==null?void 0:c.state)??getDefaultState();Dt(this,wr,{...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset})},qn=new WeakSet,vs=function(a){notifyManager.batch(()=>{var c,d,g,b,$,j,_,_e;xt(this,zr)&&this.hasListeners()&&((a==null?void 0:a.type)==="success"?((d=(c=xt(this,zr)).onSuccess)==null||d.call(c,a.data,xt(this,wr).variables,xt(this,wr).context),(b=(g=xt(this,zr)).onSettled)==null||b.call(g,a.data,null,xt(this,wr).variables,xt(this,wr).context)):(a==null?void 0:a.type)==="error"&&((j=($=xt(this,zr)).onError)==null||j.call($,a.error,xt(this,wr).variables,xt(this,wr).context),(_e=(_=xt(this,zr)).onSettled)==null||_e.call(_,void 0,a.error,xt(this,wr).variables,xt(this,wr).context))),this.listeners.forEach(et=>{et(xt(this,wr))})})},As),QueryClientContext=reactExports.createContext(void 0),useQueryClient=s=>{const i=reactExports.useContext(QueryClientContext);if(s)return s;if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},QueryClientProvider=({client:s,children:i})=>(reactExports.useEffect(()=>(s.mount(),()=>{s.unmount()}),[s]),reactExports.createElement(QueryClientContext.Provider,{value:s},i)),IsRestoringContext=reactExports.createContext(!1),useIsRestoring=()=>reactExports.useContext(IsRestoringContext);IsRestoringContext.Provider;function createValue(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var QueryErrorResetBoundaryContext=reactExports.createContext(createValue()),useQueryErrorResetBoundary=()=>reactExports.useContext(QueryErrorResetBoundaryContext);function shouldThrowError(s,i){return typeof s=="function"?s(...i):!!s}var ensurePreventErrorBoundaryRetry=(s,i)=>{(s.suspense||s.throwOnError)&&(i.isReset()||(s.retryOnMount=!1))},useClearResetErrorBoundary=s=>{reactExports.useEffect(()=>{s.clearReset()},[s])},getHasError=({result:s,errorResetBoundary:i,throwOnError:a,query:c})=>s.isError&&!i.isReset()&&!s.isFetching&&shouldThrowError(a,[s.error,c]),ensureStaleTime=s=>{s.suspense&&typeof s.staleTime!="number"&&(s.staleTime=1e3)},willFetch=(s,i)=>s.isLoading&&s.isFetching&&!i,shouldSuspend=(s,i,a)=>(s==null?void 0:s.suspense)&&willFetch(i,a),fetchOptimistic=(s,i,a)=>i.fetchOptimistic(s).catch(()=>{a.clearReset()});function useBaseQuery(s,i,a){const c=useQueryClient(a),d=useIsRestoring(),g=useQueryErrorResetBoundary(),b=c.defaultQueryOptions(s);b._optimisticResults=d?"isRestoring":"optimistic",ensureStaleTime(b),ensurePreventErrorBoundaryRetry(b,g),useClearResetErrorBoundary(g);const[$]=reactExports.useState(()=>new i(c,b)),j=$.getOptimisticResult(b);if(reactExports.useSyncExternalStore(reactExports.useCallback(_=>{const _e=d?()=>{}:$.subscribe(notifyManager.batchCalls(_));return $.updateResult(),_e},[$,d]),()=>$.getCurrentResult(),()=>$.getCurrentResult()),reactExports.useEffect(()=>{$.setOptions(b,{listeners:!1})},[b,$]),shouldSuspend(b,j,d))throw fetchOptimistic(b,$,g);if(getHasError({result:j,errorResetBoundary:g,throwOnError:b.throwOnError,query:$.getCurrentQuery()}))throw j.error;return b.notifyOnChangeProps?j:$.trackResult(j)}function useQuery(s,i){return useBaseQuery(s,QueryObserver,i)}function useMutation(s,i){const a=useQueryClient(i),[c]=reactExports.useState(()=>new MutationObserver$1(a,s));reactExports.useEffect(()=>{c.setOptions(s)},[c,s]);const d=reactExports.useSyncExternalStore(reactExports.useCallback(b=>c.subscribe(notifyManager.batchCalls(b)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g=reactExports.useCallback((b,$)=>{c.mutate(b,$).catch(noop$2)},[c]);if(d.error&&shouldThrowError(c.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:g,mutateAsync:d.mutate}}function noop$2(){}const MotionConfigContext=reactExports.createContext({transformPagePoint:s=>s,isStatic:!1,reducedMotion:"never"}),MotionContext=reactExports.createContext({}),PresenceContext=reactExports.createContext(null),isBrowser$1=typeof document<"u",useIsomorphicLayoutEffect$1=isBrowser$1?reactExports.useLayoutEffect:reactExports.useEffect,LazyContext=reactExports.createContext({strict:!1});function useVisualElement(s,i,a,c){const{visualElement:d}=reactExports.useContext(MotionContext),g=reactExports.useContext(LazyContext),b=reactExports.useContext(PresenceContext),$=reactExports.useContext(MotionConfigContext).reducedMotion,j=reactExports.useRef();c=c||g.renderer,!j.current&&c&&(j.current=c(s,{visualState:i,parent:d,props:a,presenceContext:b,blockInitialAnimation:b?b.initial===!1:!1,reducedMotionConfig:$}));const _=j.current;reactExports.useInsertionEffect(()=>{_&&_.update(a,b)});const _e=reactExports.useRef(!!window.HandoffAppearAnimations);return useIsomorphicLayoutEffect$1(()=>{_&&(_.render(),_e.current&&_.animationState&&_.animationState.animateChanges())}),reactExports.useEffect(()=>{_&&(_.updateFeatures(),!_e.current&&_.animationState&&_.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,_e.current=!1)}),_}function isRefObject(s){return typeof s=="object"&&Object.prototype.hasOwnProperty.call(s,"current")}function useMotionRef(s,i,a){return reactExports.useCallback(c=>{c&&s.mount&&s.mount(c),i&&(c?i.mount(c):i.unmount()),a&&(typeof a=="function"?a(c):isRefObject(a)&&(a.current=c))},[i])}function isVariantLabel(s){return typeof s=="string"||Array.isArray(s)}function isAnimationControls(s){return typeof s=="object"&&typeof s.start=="function"}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(s){return isAnimationControls(s.animate)||variantProps.some(i=>isVariantLabel(s[i]))}function isVariantNode(s){return!!(isControllingVariants(s)||s.variants)}function getCurrentTreeVariants(s,i){if(isControllingVariants(s)){const{initial:a,animate:c}=s;return{initial:a===!1||isVariantLabel(a)?a:void 0,animate:isVariantLabel(c)?c:void 0}}return s.inherit!==!1?i:{}}function useCreateMotionContext(s){const{initial:i,animate:a}=getCurrentTreeVariants(s,reactExports.useContext(MotionContext));return reactExports.useMemo(()=>({initial:i,animate:a}),[variantLabelsAsDependency(i),variantLabelsAsDependency(a)])}function variantLabelsAsDependency(s){return Array.isArray(s)?s.join(" "):s}const featureProps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},featureDefinitions={};for(const s in featureProps)featureDefinitions[s]={isEnabled:i=>featureProps[s].some(a=>!!i[a])};function loadFeatures(s){for(const i in s)featureDefinitions[i]={...featureDefinitions[i],...s[i]}}const LayoutGroupContext=reactExports.createContext({}),SwitchLayoutGroupContext=reactExports.createContext({}),motionComponentSymbol=Symbol.for("motionComponentSymbol");function createMotionComponent({preloadedFeatures:s,createVisualElement:i,useRender:a,useVisualState:c,Component:d}){s&&loadFeatures(s);function g($,j){let _;const _e={...reactExports.useContext(MotionConfigContext),...$,layoutId:useLayoutId($)},{isStatic:et}=_e,tt=useCreateMotionContext($),rt=c($,et);if(!et&&isBrowser$1){tt.visualElement=useVisualElement(d,rt,_e,i);const nt=reactExports.useContext(SwitchLayoutGroupContext),at=reactExports.useContext(LazyContext).strict;tt.visualElement&&(_=tt.visualElement.loadFeatures(_e,at,s,nt))}return reactExports.createElement(MotionContext.Provider,{value:tt},_&&tt.visualElement?reactExports.createElement(_,{visualElement:tt.visualElement,..._e}):null,a(d,$,useMotionRef(rt,tt.visualElement,j),rt,et,tt.visualElement))}const b=reactExports.forwardRef(g);return b[motionComponentSymbol]=d,b}function useLayoutId({layoutId:s}){const i=reactExports.useContext(LayoutGroupContext).id;return i&&s!==void 0?i+"-"+s:s}function createMotionProxy(s){function i(c,d={}){return createMotionComponent(s(c,d))}if(typeof Proxy>"u")return i;const a=new Map;return new Proxy(i,{get:(c,d)=>(a.has(d)||a.set(d,i(d)),a.get(d))})}const lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(s){return typeof s!="string"||s.includes("-")?!1:!!(lowercaseSVGElements.indexOf(s)>-1||/[A-Z]/.test(s))}const scaleCorrectors={},transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder);function isForcedMotionValue(s,{layout:i,layoutId:a}){return transformProps.has(s)||s.startsWith("origin")||(i||a!==void 0)&&(!!scaleCorrectors[s]||s==="opacity")}const isMotionValue=s=>!!(s&&s.getVelocity),translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(s,{enableHardwareAcceleration:i=!0,allowTransformNone:a=!0},c,d){let g="";for(let b=0;bi=>typeof i=="string"&&i.startsWith(s),isCSSVariableName=checkStringStartsWith("--"),isCSSVariableToken=checkStringStartsWith("var(--"),cssVariableRegex=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,getValueAsType=(s,i)=>i&&typeof s=="number"?i.transform(s):s,clamp$2=(s,i,a)=>Math.min(Math.max(a,s),i),number={test:s=>typeof s=="number",parse:parseFloat,transform:s=>s},alpha={...number,transform:s=>clamp$2(0,1,s)},scale={...number,default:1},sanitize=s=>Math.round(s*1e5)/1e5,floatRegex=/(-)?([\d]*\.?[\d])+/g,colorRegex=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,singleColorRegex=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function isString$3(s){return typeof s=="string"}const createUnitType=s=>({test:i=>isString$3(i)&&i.endsWith(s)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${s}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:s=>percent.parse(s)/100,transform:s=>percent.transform(s*100)},int={...number,transform:Math.round},numberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:int,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int};function buildHTMLStyles(s,i,a,c){const{style:d,vars:g,transform:b,transformOrigin:$}=s;let j=!1,_=!1,_e=!0;for(const et in i){const tt=i[et];if(isCSSVariableName(et)){g[et]=tt;continue}const rt=numberValueTypes[et],nt=getValueAsType(tt,rt);if(transformProps.has(et)){if(j=!0,b[et]=nt,!_e)continue;tt!==(rt.default||0)&&(_e=!1)}else et.startsWith("origin")?(_=!0,$[et]=nt):d[et]=nt}if(i.transform||(j||c?d.transform=buildTransform(s.transform,a,_e,c):d.transform&&(d.transform="none")),_){const{originX:et="50%",originY:tt="50%",originZ:rt=0}=$;d.transformOrigin=`${et} ${tt} ${rt}`}}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(s,i,a){for(const c in i)!isMotionValue(i[c])&&!isForcedMotionValue(c,a)&&(s[c]=i[c])}function useInitialMotionValues({transformTemplate:s},i,a){return reactExports.useMemo(()=>{const c=createHtmlRenderState();return buildHTMLStyles(c,i,{enableHardwareAcceleration:!a},s),Object.assign({},c.vars,c.style)},[i])}function useStyle(s,i,a){const c=s.style||{},d={};return copyRawValuesOnly(d,c,s),Object.assign(d,useInitialMotionValues(s,i,a)),s.transformValues?s.transformValues(d):d}function useHTMLProps(s,i,a){const c={},d=useStyle(s,i,a);return s.drag&&s.dragListener!==!1&&(c.draggable=!1,d.userSelect=d.WebkitUserSelect=d.WebkitTouchCallout="none",d.touchAction=s.drag===!0?"none":`pan-${s.drag==="x"?"y":"x"}`),s.tabIndex===void 0&&(s.onTap||s.onTapStart||s.whileTap)&&(c.tabIndex=0),c.style=d,c}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function isValidMotionProp(s){return s.startsWith("while")||s.startsWith("drag")&&s!=="draggable"||s.startsWith("layout")||s.startsWith("onTap")||s.startsWith("onPan")||validMotionProps.has(s)}let shouldForward=s=>!isValidMotionProp(s);function loadExternalIsValidProp(s){s&&(shouldForward=i=>i.startsWith("on")?!isValidMotionProp(i):s(i))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch{}function filterProps(s,i,a){const c={};for(const d in s)d==="values"&&typeof s.values=="object"||(shouldForward(d)||a===!0&&isValidMotionProp(d)||!i&&!isValidMotionProp(d)||s.draggable&&d.startsWith("onDrag"))&&(c[d]=s[d]);return c}function calcOrigin(s,i,a){return typeof s=="string"?s:px.transform(i+a*s)}function calcSVGTransformOrigin(s,i,a){const c=calcOrigin(i,s.x,s.width),d=calcOrigin(a,s.y,s.height);return`${c} ${d}`}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(s,i,a=1,c=0,d=!0){s.pathLength=1;const g=d?dashKeys:camelKeys;s[g.offset]=px.transform(-c);const b=px.transform(i),$=px.transform(a);s[g.array]=`${b} ${$}`}function buildSVGAttrs(s,{attrX:i,attrY:a,attrScale:c,originX:d,originY:g,pathLength:b,pathSpacing:$=1,pathOffset:j=0,..._},_e,et,tt){if(buildHTMLStyles(s,_,_e,tt),et){s.style.viewBox&&(s.attrs.viewBox=s.style.viewBox);return}s.attrs=s.style,s.style={};const{attrs:rt,style:nt,dimensions:at}=s;rt.transform&&(at&&(nt.transform=rt.transform),delete rt.transform),at&&(d!==void 0||g!==void 0||nt.transform)&&(nt.transformOrigin=calcSVGTransformOrigin(at,d!==void 0?d:.5,g!==void 0?g:.5)),i!==void 0&&(rt.x=i),a!==void 0&&(rt.y=a),c!==void 0&&(rt.scale=c),b!==void 0&&buildSVGPath(rt,b,$,j,!1)}const createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=s=>typeof s=="string"&&s.toLowerCase()==="svg";function useSVGProps(s,i,a,c){const d=reactExports.useMemo(()=>{const g=createSvgRenderState();return buildSVGAttrs(g,i,{enableHardwareAcceleration:!1},isSVGTag(c),s.transformTemplate),{...g.attrs,style:{...g.style}}},[i]);if(s.style){const g={};copyRawValuesOnly(g,s.style,s),d.style={...g,...d.style}}return d}function createUseRender(s=!1){return(a,c,d,{latestValues:g},b)=>{const j=(isSVGComponent(a)?useSVGProps:useHTMLProps)(c,g,b,a),_e={...filterProps(c,typeof a=="string",s),...j,ref:d},{children:et}=c,tt=reactExports.useMemo(()=>isMotionValue(et)?et.get():et,[et]);return reactExports.createElement(a,{..._e,children:tt})}}const camelToDash=s=>s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function renderHTML(s,{style:i,vars:a},c,d){Object.assign(s.style,i,d&&d.getProjectionStyles(c));for(const g in a)s.style.setProperty(g,a[g])}const camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(s,i,a,c){renderHTML(s,i,void 0,c);for(const d in i.attrs)s.setAttribute(camelCaseAttributes.has(d)?d:camelToDash(d),i.attrs[d])}function scrapeMotionValuesFromProps$1(s,i){const{style:a}=s,c={};for(const d in a)(isMotionValue(a[d])||i.style&&isMotionValue(i.style[d])||isForcedMotionValue(d,s))&&(c[d]=a[d]);return c}function scrapeMotionValuesFromProps(s,i){const a=scrapeMotionValuesFromProps$1(s,i);for(const c in s)if(isMotionValue(s[c])||isMotionValue(i[c])){const d=transformPropOrder.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;a[d]=s[c]}return a}function resolveVariantFromProps(s,i,a,c={},d={}){return typeof i=="function"&&(i=i(a!==void 0?a:s.custom,c,d)),typeof i=="string"&&(i=s.variants&&s.variants[i]),typeof i=="function"&&(i=i(a!==void 0?a:s.custom,c,d)),i}function useConstant(s){const i=reactExports.useRef(null);return i.current===null&&(i.current=s()),i.current}const isKeyframesTarget=s=>Array.isArray(s),isCustomValue=s=>!!(s&&typeof s=="object"&&s.mix&&s.toValue),resolveFinalValueInKeyframes=s=>isKeyframesTarget(s)?s[s.length-1]||0:s;function resolveMotionValue(s){const i=isMotionValue(s)?s.get():s;return isCustomValue(i)?i.toValue():i}function makeState({scrapeMotionValuesFromProps:s,createRenderState:i,onMount:a},c,d,g){const b={latestValues:makeLatestValues(c,d,g,s),renderState:i()};return a&&(b.mount=$=>a(c,$,b)),b}const makeUseVisualState=s=>(i,a)=>{const c=reactExports.useContext(MotionContext),d=reactExports.useContext(PresenceContext),g=()=>makeState(s,i,c,d);return a?g():useConstant(g)};function makeLatestValues(s,i,a,c){const d={},g=c(s,{});for(const tt in g)d[tt]=resolveMotionValue(g[tt]);let{initial:b,animate:$}=s;const j=isControllingVariants(s),_=isVariantNode(s);i&&_&&!j&&s.inherit!==!1&&(b===void 0&&(b=i.initial),$===void 0&&($=i.animate));let _e=a?a.initial===!1:!1;_e=_e||b===!1;const et=_e?$:b;return et&&typeof et!="boolean"&&!isAnimationControls(et)&&(Array.isArray(et)?et:[et]).forEach(rt=>{const nt=resolveVariantFromProps(s,rt);if(!nt)return;const{transitionEnd:at,transition:ut,...ot}=nt;for(const st in ot){let it=ot[st];if(Array.isArray(it)){const ct=_e?it.length-1:0;it=it[ct]}it!==null&&(d[st]=it)}for(const st in at)d[st]=at[st]}),d}const noop$1=s=>s;class Queue{constructor(){this.order=[],this.scheduled=new Set}add(i){if(!this.scheduled.has(i))return this.scheduled.add(i),this.order.push(i),!0}remove(i){const a=this.order.indexOf(i);a!==-1&&(this.order.splice(a,1),this.scheduled.delete(i))}clear(){this.order.length=0,this.scheduled.clear()}}function createRenderStep(s){let i=new Queue,a=new Queue,c=0,d=!1,g=!1;const b=new WeakSet,$={schedule:(j,_=!1,_e=!1)=>{const et=_e&&d,tt=et?i:a;return _&&b.add(j),tt.add(j)&&et&&d&&(c=i.order.length),j},cancel:j=>{a.remove(j),b.delete(j)},process:j=>{if(d){g=!0;return}if(d=!0,[i,a]=[a,i],a.clear(),c=i.order.length,c)for(let _=0;_(et[tt]=createRenderStep(()=>a=!0),et),{}),b=et=>g[et].process(d),$=()=>{const et=performance.now();a=!1,d.delta=c?1e3/60:Math.max(Math.min(et-d.timestamp,maxElapsed),1),d.timestamp=et,d.isProcessing=!0,stepsOrder.forEach(b),d.isProcessing=!1,a&&i&&(c=!1,s($))},j=()=>{a=!0,c=!0,d.isProcessing||s($)};return{schedule:stepsOrder.reduce((et,tt)=>{const rt=g[tt];return et[tt]=(nt,at=!1,ut=!1)=>(a||j(),rt.schedule(nt,at,ut)),et},{}),cancel:et=>stepsOrder.forEach(tt=>g[tt].cancel(et)),state:d,steps:g}}const{schedule:frame,cancel:cancelFrame,state:frameData,steps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop$1,!0),svgMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onMount:(s,i,{renderState:a,latestValues:c})=>{frame.read(()=>{try{a.dimensions=typeof i.getBBox=="function"?i.getBBox():i.getBoundingClientRect()}catch{a.dimensions={x:0,y:0,width:0,height:0}}}),frame.render(()=>{buildSVGAttrs(a,c,{enableHardwareAcceleration:!1},isSVGTag(i.tagName),s.transformTemplate),renderSVG(i,a)})}})},htmlMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState})};function createDomMotionConfig(s,{forwardMotionProps:i=!1},a,c){return{...isSVGComponent(s)?svgMotionConfig:htmlMotionConfig,preloadedFeatures:a,useRender:createUseRender(i),createVisualElement:c,Component:s}}function addDomEvent(s,i,a,c={passive:!0}){return s.addEventListener(i,a,c),()=>s.removeEventListener(i,a)}const isPrimaryPointer=s=>s.pointerType==="mouse"?typeof s.button!="number"||s.button<=0:s.isPrimary!==!1;function extractEventInfo(s,i="page"){return{point:{x:s[i+"X"],y:s[i+"Y"]}}}const addPointerInfo=s=>i=>isPrimaryPointer(i)&&s(i,extractEventInfo(i));function addPointerEvent(s,i,a,c){return addDomEvent(s,i,addPointerInfo(a),c)}const combineFunctions=(s,i)=>a=>i(s(a)),pipe=(...s)=>s.reduce(combineFunctions);function createLock(s){let i=null;return()=>{const a=()=>{i=null};return i===null?(i=s,a):!1}}const globalHorizontalLock=createLock("dragHorizontal"),globalVerticalLock=createLock("dragVertical");function getGlobalLock(s){let i=!1;if(s==="y")i=globalVerticalLock();else if(s==="x")i=globalHorizontalLock();else{const a=globalHorizontalLock(),c=globalVerticalLock();a&&c?i=()=>{a(),c()}:(a&&a(),c&&c())}return i}function isDragActive(){const s=getGlobalLock(!0);return s?(s(),!1):!0}class Feature{constructor(i){this.isMounted=!1,this.node=i}update(){}}function addHoverEvent(s,i){const a="pointer"+(i?"enter":"leave"),c="onHover"+(i?"Start":"End"),d=(g,b)=>{if(g.type==="touch"||isDragActive())return;const $=s.getProps();s.animationState&&$.whileHover&&s.animationState.setActive("whileHover",i),$[c]&&frame.update(()=>$[c](g,b))};return addPointerEvent(s.current,a,d,{passive:!s.getProps()[c]})}class HoverGesture extends Feature{mount(){this.unmount=pipe(addHoverEvent(this.node,!0),addHoverEvent(this.node,!1))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const isNodeOrChild=(s,i)=>i?s===i?!0:isNodeOrChild(s,i.parentElement):!1;function fireSyntheticPointerEvent(s,i){if(!i)return;const a=new PointerEvent("pointer"+s);i(a,extractEventInfo(a))}class PressGesture extends Feature{constructor(){super(...arguments),this.removeStartListeners=noop$1,this.removeEndListeners=noop$1,this.removeAccessibleListeners=noop$1,this.startPointerPress=(i,a)=>{if(this.removeEndListeners(),this.isPressing)return;const c=this.node.getProps(),g=addPointerEvent(window,"pointerup",($,j)=>{if(!this.checkPressEnd())return;const{onTap:_,onTapCancel:_e}=this.node.getProps();frame.update(()=>{isNodeOrChild(this.node.current,$.target)?_&&_($,j):_e&&_e($,j)})},{passive:!(c.onTap||c.onPointerUp)}),b=addPointerEvent(window,"pointercancel",($,j)=>this.cancelPress($,j),{passive:!(c.onTapCancel||c.onPointerCancel)});this.removeEndListeners=pipe(g,b),this.startPress(i,a)},this.startAccessiblePress=()=>{const i=g=>{if(g.key!=="Enter"||this.isPressing)return;const b=$=>{$.key!=="Enter"||!this.checkPressEnd()||fireSyntheticPointerEvent("up",(j,_)=>{const{onTap:_e}=this.node.getProps();_e&&frame.update(()=>_e(j,_))})};this.removeEndListeners(),this.removeEndListeners=addDomEvent(this.node.current,"keyup",b),fireSyntheticPointerEvent("down",($,j)=>{this.startPress($,j)})},a=addDomEvent(this.node.current,"keydown",i),c=()=>{this.isPressing&&fireSyntheticPointerEvent("cancel",(g,b)=>this.cancelPress(g,b))},d=addDomEvent(this.node.current,"blur",c);this.removeAccessibleListeners=pipe(a,d)}}startPress(i,a){this.isPressing=!0;const{onTapStart:c,whileTap:d}=this.node.getProps();d&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),c&&frame.update(()=>c(i,a))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!isDragActive()}cancelPress(i,a){if(!this.checkPressEnd())return;const{onTapCancel:c}=this.node.getProps();c&&frame.update(()=>c(i,a))}mount(){const i=this.node.getProps(),a=addPointerEvent(this.node.current,"pointerdown",this.startPointerPress,{passive:!(i.onTapStart||i.onPointerStart)}),c=addDomEvent(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pipe(a,c)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=s=>{const i=observerCallbacks.get(s.target);i&&i(s)},fireAllObserverCallbacks=s=>{s.forEach(fireObserverCallback)};function initIntersectionObserver({root:s,...i}){const a=s||document;observers.has(a)||observers.set(a,{});const c=observers.get(a),d=JSON.stringify(i);return c[d]||(c[d]=new IntersectionObserver(fireAllObserverCallbacks,{root:s,...i})),c[d]}function observeIntersection(s,i,a){const c=initIntersectionObserver(i);return observerCallbacks.set(s,a),c.observe(s),()=>{observerCallbacks.delete(s),c.unobserve(s)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:i={}}=this.node.getProps(),{root:a,margin:c,amount:d="some",once:g}=i,b={root:a?a.current:void 0,rootMargin:c,threshold:typeof d=="number"?d:thresholdNames[d]},$=j=>{const{isIntersecting:_}=j;if(this.isInView===_||(this.isInView=_,g&&!_&&this.hasEnteredView))return;_&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",_);const{onViewportEnter:_e,onViewportLeave:et}=this.node.getProps(),tt=_?_e:et;tt&&tt(j)};return observeIntersection(this.node.current,b,$)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:a}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(i,a))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:s={}},{viewport:i={}}={}){return a=>s[a]!==i[a]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}};function shallowCompare(s,i){if(!Array.isArray(i))return!1;const a=i.length;if(a!==s.length)return!1;for(let c=0;ci[c]=a.get()),i}function getVelocity(s){const i={};return s.values.forEach((a,c)=>i[c]=a.getVelocity()),i}function resolveVariant(s,i,a){const c=s.getProps();return resolveVariantFromProps(c,i,a!==void 0?a:c.custom,getCurrent(s),getVelocity(s))}const optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId);let warning$1=noop$1,invariant$1=noop$1;const secondsToMilliseconds=s=>s*1e3,millisecondsToSeconds=s=>s/1e3,instantAnimationState={current:!1},isBezierDefinition=s=>Array.isArray(s)&&typeof s[0]=="number";function isWaapiSupportedEasing(s){return!!(!s||typeof s=="string"&&supportedWaapiEasing[s]||isBezierDefinition(s)||Array.isArray(s)&&s.every(isWaapiSupportedEasing))}const cubicBezierAsString=([s,i,a,c])=>`cubic-bezier(${s}, ${i}, ${a}, ${c})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasing(s){if(s)return isBezierDefinition(s)?cubicBezierAsString(s):Array.isArray(s)?s.map(mapEasingToNativeEasing):supportedWaapiEasing[s]}function animateStyle(s,i,a,{delay:c=0,duration:d,repeat:g=0,repeatType:b="loop",ease:$,times:j}={}){const _={[i]:a};j&&(_.offset=j);const _e=mapEasingToNativeEasing($);return Array.isArray(_e)&&(_.easing=_e),s.animate(_,{delay:c,duration:d,easing:Array.isArray(_e)?"linear":_e,fill:"both",iterations:g+1,direction:b==="reverse"?"alternate":"normal"})}function getFinalKeyframe(s,{repeat:i,repeatType:a="loop"}){const c=i&&a!=="loop"&&i%2===1?0:s.length-1;return s[c]}const calcBezier=(s,i,a)=>(((1-3*a+3*i)*s+(3*a-6*i))*s+3*i)*s,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(s,i,a,c,d){let g,b,$=0;do b=i+(a-i)/2,g=calcBezier(b,c,d)-s,g>0?a=b:i=b;while(Math.abs(g)>subdivisionPrecision&&++$binarySubdivide(g,0,1,s,a);return g=>g===0||g===1?g:calcBezier(d(g),i,c)}const easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=s=>Array.isArray(s)&&typeof s[0]!="number",mirrorEasing=s=>i=>i<=.5?s(2*i)/2:(2-s(2*(1-i)))/2,reverseEasing=s=>i=>1-s(1-i),circIn=s=>1-Math.sin(Math.acos(s)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circOut),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=s=>(s*=2)<1?.5*backIn(s):.5*(2-Math.pow(2,-10*(s-1))),easingLookup={linear:noop$1,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},easingDefinitionToFunction=s=>{if(Array.isArray(s)){invariant$1(s.length===4);const[i,a,c,d]=s;return cubicBezier(i,a,c,d)}else if(typeof s=="string")return easingLookup[s];return s},isColorString=(s,i)=>a=>!!(isString$3(a)&&singleColorRegex.test(a)&&a.startsWith(s)||i&&Object.prototype.hasOwnProperty.call(a,i)),splitColor=(s,i,a)=>c=>{if(!isString$3(c))return c;const[d,g,b,$]=c.match(floatRegex);return{[s]:parseFloat(d),[i]:parseFloat(g),[a]:parseFloat(b),alpha:$!==void 0?parseFloat($):1}},clampRgbUnit=s=>clamp$2(0,255,s),rgbUnit={...number,transform:s=>Math.round(clampRgbUnit(s))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:s,green:i,blue:a,alpha:c=1})=>"rgba("+rgbUnit.transform(s)+", "+rgbUnit.transform(i)+", "+rgbUnit.transform(a)+", "+sanitize(alpha.transform(c))+")"};function parseHex(s){let i="",a="",c="",d="";return s.length>5?(i=s.substring(1,3),a=s.substring(3,5),c=s.substring(5,7),d=s.substring(7,9)):(i=s.substring(1,2),a=s.substring(2,3),c=s.substring(3,4),d=s.substring(4,5),i+=i,a+=a,c+=c,d+=d),{red:parseInt(i,16),green:parseInt(a,16),blue:parseInt(c,16),alpha:d?parseInt(d,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:s,saturation:i,lightness:a,alpha:c=1})=>"hsla("+Math.round(s)+", "+percent.transform(sanitize(i))+", "+percent.transform(sanitize(a))+", "+sanitize(alpha.transform(c))+")"},color={test:s=>rgba.test(s)||hex.test(s)||hsla.test(s),parse:s=>rgba.test(s)?rgba.parse(s):hsla.test(s)?hsla.parse(s):hex.parse(s),transform:s=>isString$3(s)?s:s.hasOwnProperty("red")?rgba.transform(s):hsla.transform(s)},mix=(s,i,a)=>-a*s+a*i+s;function hueToRgb(s,i,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?s+(i-s)*6*a:a<1/2?i:a<2/3?s+(i-s)*(2/3-a)*6:s}function hslaToRgba({hue:s,saturation:i,lightness:a,alpha:c}){s/=360,i/=100,a/=100;let d=0,g=0,b=0;if(!i)d=g=b=a;else{const $=a<.5?a*(1+i):a+i-a*i,j=2*a-$;d=hueToRgb(j,$,s+1/3),g=hueToRgb(j,$,s),b=hueToRgb(j,$,s-1/3)}return{red:Math.round(d*255),green:Math.round(g*255),blue:Math.round(b*255),alpha:c}}const mixLinearColor=(s,i,a)=>{const c=s*s;return Math.sqrt(Math.max(0,a*(i*i-c)+c))},colorTypes=[hex,rgba,hsla],getColorType=s=>colorTypes.find(i=>i.test(s));function asRGBA(s){const i=getColorType(s);let a=i.parse(s);return i===hsla&&(a=hslaToRgba(a)),a}const mixColor=(s,i)=>{const a=asRGBA(s),c=asRGBA(i),d={...a};return g=>(d.red=mixLinearColor(a.red,c.red,g),d.green=mixLinearColor(a.green,c.green,g),d.blue=mixLinearColor(a.blue,c.blue,g),d.alpha=mix(a.alpha,c.alpha,g),rgba.transform(d))};function test(s){var i,a;return isNaN(s)&&isString$3(s)&&(((i=s.match(floatRegex))===null||i===void 0?void 0:i.length)||0)+(((a=s.match(colorRegex))===null||a===void 0?void 0:a.length)||0)>0}const cssVarTokeniser={regex:cssVariableRegex,countKey:"Vars",token:"${v}",parse:noop$1},colorTokeniser={regex:colorRegex,countKey:"Colors",token:"${c}",parse:color.parse},numberTokeniser={regex:floatRegex,countKey:"Numbers",token:"${n}",parse:number.parse};function tokenise(s,{regex:i,countKey:a,token:c,parse:d}){const g=s.tokenised.match(i);g&&(s["num"+a]=g.length,s.tokenised=s.tokenised.replace(i,c),s.values.push(...g.map(d)))}function analyseComplexValue(s){const i=s.toString(),a={value:i,tokenised:i,values:[],numVars:0,numColors:0,numNumbers:0};return a.value.includes("var(--")&&tokenise(a,cssVarTokeniser),tokenise(a,colorTokeniser),tokenise(a,numberTokeniser),a}function parseComplexValue(s){return analyseComplexValue(s).values}function createTransformer(s){const{values:i,numColors:a,numVars:c,tokenised:d}=analyseComplexValue(s),g=i.length;return b=>{let $=d;for(let j=0;jtypeof s=="number"?0:s;function getAnimatableNone$1(s){const i=parseComplexValue(s);return createTransformer(s)(i.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1},mixImmediate=(s,i)=>a=>`${a>0?i:s}`;function getMixer(s,i){return typeof s=="number"?a=>mix(s,i,a):color.test(s)?mixColor(s,i):s.startsWith("var(")?mixImmediate(s,i):mixComplex(s,i)}const mixArray=(s,i)=>{const a=[...s],c=a.length,d=s.map((g,b)=>getMixer(g,i[b]));return g=>{for(let b=0;b{const a={...s,...i},c={};for(const d in a)s[d]!==void 0&&i[d]!==void 0&&(c[d]=getMixer(s[d],i[d]));return d=>{for(const g in c)a[g]=c[g](d);return a}},mixComplex=(s,i)=>{const a=complex.createTransformer(i),c=analyseComplexValue(s),d=analyseComplexValue(i);return c.numVars===d.numVars&&c.numColors===d.numColors&&c.numNumbers>=d.numNumbers?pipe(mixArray(c.values,d.values),a):mixImmediate(s,i)},progress=(s,i,a)=>{const c=i-s;return c===0?1:(a-s)/c},mixNumber=(s,i)=>a=>mix(s,i,a);function detectMixerFactory(s){return typeof s=="number"?mixNumber:typeof s=="string"?color.test(s)?mixColor:mixComplex:Array.isArray(s)?mixArray:typeof s=="object"?mixObject:mixNumber}function createMixers(s,i,a){const c=[],d=a||detectMixerFactory(s[0]),g=s.length-1;for(let b=0;bi[0];s[0]>s[g-1]&&(s=[...s].reverse(),i=[...i].reverse());const b=createMixers(i,c,d),$=b.length,j=_=>{let _e=0;if($>1)for(;_ej(clamp$2(s[0],s[g-1],_)):j}function fillOffset(s,i){const a=s[s.length-1];for(let c=1;c<=i;c++){const d=progress(0,i,c);s.push(mix(a,1,d))}}function defaultOffset(s){const i=[0];return fillOffset(i,s.length-1),i}function convertOffsetToTimes(s,i){return s.map(a=>a*i)}function defaultEasing(s,i){return s.map(()=>i||easeInOut).splice(0,s.length-1)}function keyframes({duration:s=300,keyframes:i,times:a,ease:c="easeInOut"}){const d=isEasingArray(c)?c.map(easingDefinitionToFunction):easingDefinitionToFunction(c),g={done:!1,value:i[0]},b=convertOffsetToTimes(a&&a.length===i.length?a:defaultOffset(i),s),$=interpolate(b,i,{ease:Array.isArray(d)?d:defaultEasing(i,d)});return{calculatedDuration:s,next:j=>(g.value=$(j),g.done=j>=s,g)}}function velocityPerSecond(s,i){return i?s*(1e3/i):0}const velocitySampleDuration=5;function calcGeneratorVelocity(s,i,a){const c=Math.max(i-velocitySampleDuration,0);return velocityPerSecond(a-s(c),i-c)}const safeMin=.001,minDuration=.01,maxDuration$1=10,minDamping=.05,maxDamping=1;function findSpring({duration:s=800,bounce:i=.25,velocity:a=0,mass:c=1}){let d,g;warning$1(s<=secondsToMilliseconds(maxDuration$1));let b=1-i;b=clamp$2(minDamping,maxDamping,b),s=clamp$2(minDuration,maxDuration$1,millisecondsToSeconds(s)),b<1?(d=_=>{const _e=_*b,et=_e*s,tt=_e-a,rt=calcAngularFreq(_,b),nt=Math.exp(-et);return safeMin-tt/rt*nt},g=_=>{const et=_*b*s,tt=et*a+a,rt=Math.pow(b,2)*Math.pow(_,2)*s,nt=Math.exp(-et),at=calcAngularFreq(Math.pow(_,2),b);return(-d(_)+safeMin>0?-1:1)*((tt-rt)*nt)/at}):(d=_=>{const _e=Math.exp(-_*s),et=(_-a)*s+1;return-safeMin+_e*et},g=_=>{const _e=Math.exp(-_*s),et=(a-_)*(s*s);return _e*et});const $=5/s,j=approximateRoot(d,g,$);if(s=secondsToMilliseconds(s),isNaN(j))return{stiffness:100,damping:10,duration:s};{const _=Math.pow(j,2)*c;return{stiffness:_,damping:b*2*Math.sqrt(c*_),duration:s}}}const rootIterations=12;function approximateRoot(s,i,a){let c=a;for(let d=1;ds[a]!==void 0)}function getSpringOptions(s){let i={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...s};if(!isSpringType(s,physicsKeys)&&isSpringType(s,durationKeys)){const a=findSpring(s);i={...i,...a,velocity:0,mass:1},i.isResolvedFromDuration=!0}return i}function spring({keyframes:s,restDelta:i,restSpeed:a,...c}){const d=s[0],g=s[s.length-1],b={done:!1,value:d},{stiffness:$,damping:j,mass:_,velocity:_e,duration:et,isResolvedFromDuration:tt}=getSpringOptions(c),rt=_e?-millisecondsToSeconds(_e):0,nt=j/(2*Math.sqrt($*_)),at=g-d,ut=millisecondsToSeconds(Math.sqrt($/_)),ot=Math.abs(at)<5;a||(a=ot?.01:2),i||(i=ot?.005:.5);let st;if(nt<1){const it=calcAngularFreq(ut,nt);st=ct=>{const lt=Math.exp(-nt*ut*ct);return g-lt*((rt+nt*ut*at)/it*Math.sin(it*ct)+at*Math.cos(it*ct))}}else if(nt===1)st=it=>g-Math.exp(-ut*it)*(at+(rt+ut*at)*it);else{const it=ut*Math.sqrt(nt*nt-1);st=ct=>{const lt=Math.exp(-nt*ut*ct),dt=Math.min(it*ct,300);return g-lt*((rt+nt*ut*at)*Math.sinh(dt)+it*at*Math.cosh(dt))/it}}return{calculatedDuration:tt&&et||null,next:it=>{const ct=st(it);if(tt)b.done=it>=et;else{let lt=rt;it!==0&&(nt<1?lt=calcGeneratorVelocity(st,it,ct):lt=0);const dt=Math.abs(lt)<=a,mt=Math.abs(g-ct)<=i;b.done=dt&&mt}return b.value=b.done?g:ct,b}}}function inertia({keyframes:s,velocity:i=0,power:a=.8,timeConstant:c=325,bounceDamping:d=10,bounceStiffness:g=500,modifyTarget:b,min:$,max:j,restDelta:_=.5,restSpeed:_e}){const et=s[0],tt={done:!1,value:et},rt=ht=>$!==void 0&&ht<$||j!==void 0&&ht>j,nt=ht=>$===void 0?j:j===void 0||Math.abs($-ht)-at*Math.exp(-ht/c),it=ht=>ot+st(ht),ct=ht=>{const Rt=st(ht),Ct=it(ht);tt.done=Math.abs(Rt)<=_,tt.value=tt.done?ot:Ct};let lt,dt;const mt=ht=>{rt(tt.value)&&(lt=ht,dt=spring({keyframes:[tt.value,nt(tt.value)],velocity:calcGeneratorVelocity(it,ht,tt.value),damping:d,stiffness:g,restDelta:_,restSpeed:_e}))};return mt(0),{calculatedDuration:null,next:ht=>{let Rt=!1;return!dt&<===void 0&&(Rt=!0,ct(ht),mt(ht)),lt!==void 0&&ht>lt?dt.next(ht-lt):(!Rt&&ct(ht),tt)}}}const frameloopDriver=s=>{const i=({timestamp:a})=>s(a);return{start:()=>frame.update(i,!0),stop:()=>cancelFrame(i),now:()=>frameData.isProcessing?frameData.timestamp:performance.now()}},maxGeneratorDuration=2e4;function calcGeneratorDuration(s){let i=0;const a=50;let c=s.next(i);for(;!c.done&&i=maxGeneratorDuration?1/0:i}const types={decay:inertia,inertia,tween:keyframes,keyframes,spring};function animateValue({autoplay:s=!0,delay:i=0,driver:a=frameloopDriver,keyframes:c,type:d="keyframes",repeat:g=0,repeatDelay:b=0,repeatType:$="loop",onPlay:j,onStop:_,onComplete:_e,onUpdate:et,...tt}){let rt=1,nt=!1,at,ut;const ot=()=>{ut=new Promise(At=>{at=At})};ot();let st;const it=types[d]||keyframes;let ct;it!==keyframes&&typeof c[0]!="number"&&(ct=interpolate([0,100],c,{clamp:!1}),c=[0,100]);const lt=it({...tt,keyframes:c});let dt;$==="mirror"&&(dt=it({...tt,keyframes:[...c].reverse(),velocity:-(tt.velocity||0)}));let mt="idle",ht=null,Rt=null,Ct=null;lt.calculatedDuration===null&&g&&(lt.calculatedDuration=calcGeneratorDuration(lt));const{calculatedDuration:Pt}=lt;let gt=1/0,ft=1/0;Pt!==null&&(gt=Pt+b,ft=gt*(g+1)-b);let pt=0;const bt=At=>{if(Rt===null)return;rt>0&&(Rt=Math.min(Rt,At)),rt<0&&(Rt=Math.min(At-ft/rt,Rt)),ht!==null?pt=ht:pt=Math.round(At-Rt)*rt;const Ft=pt-i*(rt>=0?1:-1),qt=rt>=0?Ft<0:Ft>ft;pt=Math.max(Ft,0),mt==="finished"&&ht===null&&(pt=ft);let rr=pt,nr=lt;if(g){const Gt=pt/gt;let dr=Math.floor(Gt),sr=Gt%1;!sr&&Gt>=1&&(sr=1),sr===1&&dr--,dr=Math.min(dr,g+1);const Rr=!!(dr%2);Rr&&($==="reverse"?(sr=1-sr,b&&(sr-=b/gt)):$==="mirror"&&(nr=dt));let $r=clamp$2(0,1,sr);pt>ft&&($r=$==="reverse"&&Rr?1:0),rr=$r*gt}const tr=qt?{done:!1,value:c[0]}:nr.next(rr);ct&&(tr.value=ct(tr.value));let{done:ir}=tr;!qt&&Pt!==null&&(ir=rt>=0?pt>=ft:pt<=0);const pr=ht===null&&(mt==="finished"||mt==="running"&&ir);return et&&et(tr.value),pr&&wt(),tr},St=()=>{st&&st.stop(),st=void 0},$t=()=>{mt="idle",St(),at(),ot(),Rt=Ct=null},wt=()=>{mt="finished",_e&&_e(),St(),at()},kt=()=>{if(nt)return;st||(st=a(bt));const At=st.now();j&&j(),ht!==null?Rt=At-ht:(!Rt||mt==="finished")&&(Rt=At),mt==="finished"&&ot(),Ct=Rt,ht=null,mt="running",st.start()};s&&kt();const Lt={then(At,Ft){return ut.then(At,Ft)},get time(){return millisecondsToSeconds(pt)},set time(At){At=secondsToMilliseconds(At),pt=At,ht!==null||!st||rt===0?ht=At:Rt=st.now()-At/rt},get duration(){const At=lt.calculatedDuration===null?calcGeneratorDuration(lt):lt.calculatedDuration;return millisecondsToSeconds(At)},get speed(){return rt},set speed(At){At===rt||!st||(rt=At,Lt.time=millisecondsToSeconds(pt))},get state(){return mt},play:kt,pause:()=>{mt="paused",ht=pt},stop:()=>{nt=!0,mt!=="idle"&&(mt="idle",_&&_(),$t())},cancel:()=>{Ct!==null&&bt(Ct),$t()},complete:()=>{mt="finished"},sample:At=>(Rt=0,bt(At))};return Lt}function memo(s){let i;return()=>(i===void 0&&(i=s()),i)}const supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),acceleratedValues=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),sampleDelta=10,maxDuration=2e4,requiresPregeneratedKeyframes=(s,i)=>i.type==="spring"||s==="backgroundColor"||!isWaapiSupportedEasing(i.ease);function createAcceleratedAnimation(s,i,{onUpdate:a,onComplete:c,...d}){if(!(supportsWaapi()&&acceleratedValues.has(i)&&!d.repeatDelay&&d.repeatType!=="mirror"&&d.damping!==0&&d.type!=="inertia"))return!1;let b=!1,$,j;const _=()=>{j=new Promise(st=>{$=st})};_();let{keyframes:_e,duration:et=300,ease:tt,times:rt}=d;if(requiresPregeneratedKeyframes(i,d)){const st=animateValue({...d,repeat:0,delay:0});let it={done:!1,value:_e[0]};const ct=[];let lt=0;for(;!it.done&<nt.cancel(),ut=()=>{frame.update(at),$(),_()};return nt.onfinish=()=>{s.set(getFinalKeyframe(_e,d)),c&&c(),ut()},{then(st,it){return j.then(st,it)},attachTimeline(st){return nt.timeline=st,nt.onfinish=null,noop$1},get time(){return millisecondsToSeconds(nt.currentTime||0)},set time(st){nt.currentTime=secondsToMilliseconds(st)},get speed(){return nt.playbackRate},set speed(st){nt.playbackRate=st},get duration(){return millisecondsToSeconds(et)},play:()=>{b||(nt.play(),cancelFrame(at))},pause:()=>nt.pause(),stop:()=>{if(b=!0,nt.playState==="idle")return;const{currentTime:st}=nt;if(st){const it=animateValue({...d,autoplay:!1});s.setWithVelocity(it.sample(st-sampleDelta).value,it.sample(st).value,sampleDelta)}ut()},complete:()=>nt.finish(),cancel:ut}}function createInstantAnimation({keyframes:s,delay:i,onUpdate:a,onComplete:c}){const d=()=>(a&&a(s[s.length-1]),c&&c(),{time:0,speed:1,duration:0,play:noop$1,pause:noop$1,stop:noop$1,then:g=>(g(),Promise.resolve()),cancel:noop$1,complete:noop$1});return i?animateValue({keyframes:[0,1],duration:0,delay:i,onComplete:d}):d()}const underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=s=>({type:"spring",stiffness:550,damping:s===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(s,{keyframes:i})=>i.length>2?keyframesTransition:transformProps.has(s)?s.startsWith("scale")?criticallyDampedSpring(i[1]):underDampedSpring:ease,isAnimatable=(s,i)=>s==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(complex.test(i)||i==="0")&&!i.startsWith("url(")),maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(s){const[i,a]=s.slice(0,-1).split("(");if(i==="drop-shadow")return s;const[c]=a.match(floatRegex)||[];if(!c)return s;const d=a.replace(c,"");let g=maxDefaults.has(i)?1:0;return c!==a&&(g*=100),i+"("+g+d+")"}const functionRegex=/([a-z-]*)\(.*?\)/g,filter={...complex,getAnimatableNone:s=>{const i=s.match(functionRegex);return i?i.map(applyDefaultFilter).join(" "):s}},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter,WebkitFilter:filter},getDefaultValueType=s=>defaultValueTypes[s];function getAnimatableNone(s,i){let a=getDefaultValueType(s);return a!==filter&&(a=complex),a.getAnimatableNone?a.getAnimatableNone(i):void 0}const isZeroValueString=s=>/^0[^.\s]+$/.test(s);function isNone(s){if(typeof s=="number")return s===0;if(s!==null)return s==="none"||s==="0"||isZeroValueString(s)}function getKeyframes(s,i,a,c){const d=isAnimatable(i,a);let g;Array.isArray(a)?g=[...a]:g=[null,a];const b=c.from!==void 0?c.from:s.get();let $;const j=[];for(let _=0;_d=>{const g=getValueTransition(c,s)||{},b=g.delay||c.delay||0;let{elapsed:$=0}=c;$=$-secondsToMilliseconds(b);const j=getKeyframes(i,s,a,g),_=j[0],_e=j[j.length-1],et=isAnimatable(s,_),tt=isAnimatable(s,_e);let rt={keyframes:j,velocity:i.getVelocity(),ease:"easeOut",...g,delay:-$,onUpdate:nt=>{i.set(nt),g.onUpdate&&g.onUpdate(nt)},onComplete:()=>{d(),g.onComplete&&g.onComplete()}};if(isTransitionDefined(g)||(rt={...rt,...getDefaultTransition(s,rt)}),rt.duration&&(rt.duration=secondsToMilliseconds(rt.duration)),rt.repeatDelay&&(rt.repeatDelay=secondsToMilliseconds(rt.repeatDelay)),!et||!tt||instantAnimationState.current||g.type===!1)return createInstantAnimation(rt);if(i.owner&&i.owner.current instanceof HTMLElement&&!i.owner.getProps().onUpdate){const nt=createAcceleratedAnimation(i,s,rt);if(nt)return nt}return animateValue(rt)};function isWillChangeMotionValue(s){return!!(isMotionValue(s)&&s.add)}const isNumericalString=s=>/^\-?\d*\.?\d+$/.test(s);function addUniqueItem(s,i){s.indexOf(i)===-1&&s.push(i)}function removeItem(s,i){const a=s.indexOf(i);a>-1&&s.splice(a,1)}class SubscriptionManager{constructor(){this.subscriptions=[]}add(i){return addUniqueItem(this.subscriptions,i),()=>removeItem(this.subscriptions,i)}notify(i,a,c){const d=this.subscriptions.length;if(d)if(d===1)this.subscriptions[0](i,a,c);else for(let g=0;g!isNaN(parseFloat(s));class MotionValue{constructor(i,a={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(c,d=!0)=>{this.prev=this.current,this.current=c;const{delta:g,timestamp:b}=frameData;this.lastUpdated!==b&&(this.timeDelta=g,this.lastUpdated=b,frame.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),d&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>frame.postRender(this.velocityCheck),this.velocityCheck=({timestamp:c})=>{c!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=i,this.canTrackVelocity=isFloat(this.current),this.owner=a.owner}onChange(i){return this.on("change",i)}on(i,a){this.events[i]||(this.events[i]=new SubscriptionManager);const c=this.events[i].add(a);return i==="change"?()=>{c(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:c}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,a){this.passiveEffect=i,this.stopPassiveEffect=a}set(i,a=!0){!a||!this.passiveEffect?this.updateAndNotify(i,a):this.passiveEffect(i,this.updateAndNotify)}setWithVelocity(i,a,c){this.set(a),this.prev=i,this.timeDelta=c}jump(i){this.updateAndNotify(i),this.prev=i,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?velocityPerSecond(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(i){return this.stop(),new Promise(a=>{this.hasAnimated=!0,this.animation=i(a),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function motionValue(s,i){return new MotionValue(s,i)}const testValueType=s=>i=>i.test(s),auto={test:s=>s==="auto",parse:s=>s},dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=s=>dimensionValueTypes.find(testValueType(s)),valueTypes=[...dimensionValueTypes,color,complex],findValueType=s=>valueTypes.find(testValueType(s));function setMotionValue(s,i,a){s.hasValue(i)?s.getValue(i).set(a):s.addValue(i,motionValue(a))}function setTarget(s,i){const a=resolveVariant(s,i);let{transitionEnd:c={},transition:d={},...g}=a?s.makeTargetAnimatable(a,!1):{};g={...g,...c};for(const b in g){const $=resolveFinalValueInKeyframes(g[b]);setMotionValue(s,b,$)}}function checkTargetForNewValues(s,i,a){var c,d;const g=Object.keys(i).filter($=>!s.hasValue($)),b=g.length;if(b)for(let $=0;$j.remove(et))),_.push(at)}return b&&Promise.all(_).then(()=>{b&&setTarget(s,b)}),_}function animateVariant(s,i,a={}){const c=resolveVariant(s,i,a.custom);let{transition:d=s.getDefaultTransition()||{}}=c||{};a.transitionOverride&&(d=a.transitionOverride);const g=c?()=>Promise.all(animateTarget(s,c,a)):()=>Promise.resolve(),b=s.variantChildren&&s.variantChildren.size?(j=0)=>{const{delayChildren:_=0,staggerChildren:_e,staggerDirection:et}=d;return animateChildren(s,i,_+j,_e,et,a)}:()=>Promise.resolve(),{when:$}=d;if($){const[j,_]=$==="beforeChildren"?[g,b]:[b,g];return j().then(()=>_())}else return Promise.all([g(),b(a.delay)])}function animateChildren(s,i,a=0,c=0,d=1,g){const b=[],$=(s.variantChildren.size-1)*c,j=d===1?(_=0)=>_*c:(_=0)=>$-_*c;return Array.from(s.variantChildren).sort(sortByTreeOrder).forEach((_,_e)=>{_.notify("AnimationStart",i),b.push(animateVariant(_,i,{...g,delay:a+j(_e)}).then(()=>_.notify("AnimationComplete",i)))}),Promise.all(b)}function sortByTreeOrder(s,i){return s.sortNodePosition(i)}function animateVisualElement(s,i,a={}){s.notify("AnimationStart",i);let c;if(Array.isArray(i)){const d=i.map(g=>animateVariant(s,g,a));c=Promise.all(d)}else if(typeof i=="string")c=animateVariant(s,i,a);else{const d=typeof i=="function"?resolveVariant(s,i,a.custom):i;c=Promise.all(animateTarget(s,d,a))}return c.then(()=>s.notify("AnimationComplete",i))}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(s){return i=>Promise.all(i.map(({animation:a,options:c})=>animateVisualElement(s,a,c)))}function createAnimationState(s){let i=animateList(s);const a=createState();let c=!0;const d=(j,_)=>{const _e=resolveVariant(s,_);if(_e){const{transition:et,transitionEnd:tt,...rt}=_e;j={...j,...rt,...tt}}return j};function g(j){i=j(s)}function b(j,_){const _e=s.getProps(),et=s.getVariantContext(!0)||{},tt=[],rt=new Set;let nt={},at=1/0;for(let ot=0;otat&<const Ct=Array.isArray(ct)?ct:[ct];let Pt=Ct.reduce(d,{});dt===!1&&(Pt={});const{prevResolvedValues:gt={}}=it,ft={...gt,...Pt},pt=bt=>{Rt=!0,rt.delete(bt),it.needsAnimating[bt]=!0};for(const bt in ft){const St=Pt[bt],$t=gt[bt];nt.hasOwnProperty(bt)||(St!==$t?isKeyframesTarget(St)&&isKeyframesTarget($t)?!shallowCompare(St,$t)||ht?pt(bt):it.protectedKeys[bt]=!0:St!==void 0?pt(bt):rt.add(bt):St!==void 0&&rt.has(bt)?pt(bt):it.protectedKeys[bt]=!0)}it.prevProp=ct,it.prevResolvedValues=Pt,it.isActive&&(nt={...nt,...Pt}),c&&s.blockInitialAnimation&&(Rt=!1),Rt&&!mt&&tt.push(...Ct.map(bt=>({animation:bt,options:{type:st,...j}})))}if(rt.size){const ot={};rt.forEach(st=>{const it=s.getBaseTarget(st);it!==void 0&&(ot[st]=it)}),tt.push({animation:ot})}let ut=!!tt.length;return c&&_e.initial===!1&&!s.manuallyAnimateOnMount&&(ut=!1),c=!1,ut?i(tt):Promise.resolve()}function $(j,_,_e){var et;if(a[j].isActive===_)return Promise.resolve();(et=s.variantChildren)===null||et===void 0||et.forEach(rt=>{var nt;return(nt=rt.animationState)===null||nt===void 0?void 0:nt.setActive(j,_)}),a[j].isActive=_;const tt=b(_e,j);for(const rt in a)a[rt].protectedKeys={};return tt}return{animateChanges:b,setActive:$,setAnimateFunction:g,getState:()=>a}}function checkVariantsDidChange(s,i){return typeof i=="string"?i!==s:Array.isArray(i)?!shallowCompare(i,s):!1}function createTypeState(s=!1){return{isActive:s,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class AnimationFeature extends Feature{constructor(i){super(i),i.animationState||(i.animationState=createAnimationState(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();this.unmount(),isAnimationControls(i)&&(this.unmount=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:a}=this.node.prevProps||{};i!==a&&this.updateAnimationControlsSubscription()}unmount(){}}let id=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id++}update(){if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:a,custom:c}=this.node.presenceContext,{isPresent:d}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===d)return;const g=this.node.animationState.setActive("exit",!i,{custom:c??this.node.getProps().custom});a&&!i&&g.then(()=>a(this.id))}mount(){const{register:i}=this.node.presenceContext||{};i&&(this.unmount=i(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}},createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function convertBoundingBoxToBox({top:s,left:i,right:a,bottom:c}){return{x:{min:i,max:a},y:{min:s,max:c}}}function transformBoxPoints(s,i){if(!i)return s;const a=i({x:s.left,y:s.top}),c=i({x:s.right,y:s.bottom});return{top:a.y,left:a.x,bottom:c.y,right:c.x}}function measureViewportBox(s,i){return convertBoundingBoxToBox(transformBoxPoints(s.getBoundingClientRect(),i))}const splitCSSVariableRegex=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function parseCSSVariable(s){const i=splitCSSVariableRegex.exec(s);if(!i)return[,];const[,a,c]=i;return[a,c]}function getVariableValue(s,i,a=1){const[c,d]=parseCSSVariable(s);if(!c)return;const g=window.getComputedStyle(i).getPropertyValue(c);if(g){const b=g.trim();return isNumericalString(b)?parseFloat(b):b}else return isCSSVariableToken(d)?getVariableValue(d,i,a+1):d}function resolveCSSVariables(s,{...i},a){const c=s.current;if(!(c instanceof Element))return{target:i,transitionEnd:a};a&&(a={...a}),s.values.forEach(d=>{const g=d.get();if(!isCSSVariableToken(g))return;const b=getVariableValue(g,c);b&&d.set(b)});for(const d in i){const g=i[d];if(!isCSSVariableToken(g))continue;const b=getVariableValue(g,c);b&&(i[d]=b,a||(a={}),a[d]===void 0&&(a[d]=g))}return{target:i,transitionEnd:a}}const positionalKeys=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),isPositionalKey=s=>positionalKeys.has(s),hasPositionalKey=s=>Object.keys(s).some(isPositionalKey),isNumOrPxType=s=>s===number||s===px,getPosFromMatrix=(s,i)=>parseFloat(s.split(", ")[i]),getTranslateFromMatrix=(s,i)=>(a,{transform:c})=>{if(c==="none"||!c)return 0;const d=c.match(/^matrix3d\((.+)\)$/);if(d)return getPosFromMatrix(d[1],i);{const g=c.match(/^matrix\((.+)\)$/);return g?getPosFromMatrix(g[1],s):0}},transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(s=>!transformKeys.has(s));function removeNonTranslationalTransform(s){const i=[];return nonTranslationalTransformKeys.forEach(a=>{const c=s.getValue(a);c!==void 0&&(i.push([a,c.get()]),c.set(a.startsWith("scale")?1:0))}),i.length&&s.render(),i}const positionalValues={width:({x:s},{paddingLeft:i="0",paddingRight:a="0"})=>s.max-s.min-parseFloat(i)-parseFloat(a),height:({y:s},{paddingTop:i="0",paddingBottom:a="0"})=>s.max-s.min-parseFloat(i)-parseFloat(a),top:(s,{top:i})=>parseFloat(i),left:(s,{left:i})=>parseFloat(i),bottom:({y:s},{top:i})=>parseFloat(i)+(s.max-s.min),right:({x:s},{left:i})=>parseFloat(i)+(s.max-s.min),x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};positionalValues.translateX=positionalValues.x;positionalValues.translateY=positionalValues.y;const convertChangedValueTypes=(s,i,a)=>{const c=i.measureViewportBox(),d=i.current,g=getComputedStyle(d),{display:b}=g,$={};b==="none"&&i.setStaticValue("display",s.display||"block"),a.forEach(_=>{$[_]=positionalValues[_](c,g)}),i.render();const j=i.measureViewportBox();return a.forEach(_=>{const _e=i.getValue(_);_e&&_e.jump($[_]),s[_]=positionalValues[_](j,g)}),s},checkAndConvertChangedValueTypes=(s,i,a={},c={})=>{i={...i},c={...c};const d=Object.keys(i).filter(isPositionalKey);let g=[],b=!1;const $=[];if(d.forEach(j=>{const _=s.getValue(j);if(!s.hasValue(j))return;let _e=a[j],et=findDimensionValueType(_e);const tt=i[j];let rt;if(isKeyframesTarget(tt)){const nt=tt.length,at=tt[0]===null?1:0;_e=tt[at],et=findDimensionValueType(_e);for(let ut=at;ut=0?window.pageYOffset:null,_=convertChangedValueTypes(i,s,$);return g.length&&g.forEach(([_e,et])=>{s.getValue(_e).set(et)}),s.render(),isBrowser$1&&j!==null&&window.scrollTo({top:j}),{target:_,transitionEnd:c}}else return{target:i,transitionEnd:c}};function unitConversion(s,i,a,c){return hasPositionalKey(i)?checkAndConvertChangedValueTypes(s,i,a,c):{target:i,transitionEnd:c}}const parseDomVariant=(s,i,a,c)=>{const d=resolveCSSVariables(s,i,c);return i=d.target,c=d.transitionEnd,unitConversion(s,i,a,c)},prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser$1)if(window.matchMedia){const s=window.matchMedia("(prefers-reduced-motion)"),i=()=>prefersReducedMotion.current=s.matches;s.addListener(i),i()}else prefersReducedMotion.current=!1}function updateMotionValuesFromProps(s,i,a){const{willChange:c}=i;for(const d in i){const g=i[d],b=a[d];if(isMotionValue(g))s.addValue(d,g),isWillChangeMotionValue(c)&&c.add(d);else if(isMotionValue(b))s.addValue(d,motionValue(g,{owner:s})),isWillChangeMotionValue(c)&&c.remove(d);else if(b!==g)if(s.hasValue(d)){const $=s.getValue(d);!$.hasAnimated&&$.set(g)}else{const $=s.getStaticValue(d);s.addValue(d,motionValue($!==void 0?$:g,{owner:s}))}}for(const d in a)i[d]===void 0&&s.removeValue(d);return i}const visualElementStore=new WeakMap,featureNames=Object.keys(featureDefinitions),numFeatures=featureNames.length,propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],numVariantProps=variantProps.length;class VisualElement{constructor({parent:i,props:a,presenceContext:c,reducedMotionConfig:d,visualState:g},b={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>frame.render(this.render,!1,!0);const{latestValues:$,renderState:j}=g;this.latestValues=$,this.baseTarget={...$},this.initialValues=a.initial?{...$}:{},this.renderState=j,this.parent=i,this.props=a,this.presenceContext=c,this.depth=i?i.depth+1:0,this.reducedMotionConfig=d,this.options=b,this.isControllingVariants=isControllingVariants(a),this.isVariantNode=isVariantNode(a),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:_,..._e}=this.scrapeMotionValuesFromProps(a,{});for(const et in _e){const tt=_e[et];$[et]!==void 0&&isMotionValue(tt)&&(tt.set($[et],!1),isWillChangeMotionValue(_)&&_.add(et))}}scrapeMotionValuesFromProps(i,a){return{}}mount(i){this.current=i,visualElementStore.set(i,this),this.projection&&!this.projection.instance&&this.projection.mount(i),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((a,c)=>this.bindToMotionValue(c,a)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){visualElementStore.delete(this.current),this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(i=>i()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const i in this.events)this.events[i].clear();for(const i in this.features)this.features[i].unmount();this.current=null}bindToMotionValue(i,a){const c=transformProps.has(i),d=a.on("change",b=>{this.latestValues[i]=b,this.props.onUpdate&&frame.update(this.notifyUpdate,!1,!0),c&&this.projection&&(this.projection.isTransformDirty=!0)}),g=a.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(i,()=>{d(),g()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}loadFeatures({children:i,...a},c,d,g){let b,$;for(let j=0;jthis.scheduleRender(),animationType:typeof _=="string"?_:"both",initialPromotionConfig:g,layoutScroll:tt,layoutRoot:rt})}return $}updateFeatures(){for(const i in this.features){const a=this.features[i];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,a){this.latestValues[i]=a}makeTargetAnimatable(i,a=!0){return this.makeTargetAnimatableFromInstance(i,this.props,a)}update(i,a){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=a;for(let c=0;ca.variantChildren.delete(i)}addValue(i,a){a!==this.values.get(i)&&(this.removeValue(i),this.bindToMotionValue(i,a)),this.values.set(i,a),this.latestValues[i]=a.get()}removeValue(i){this.values.delete(i);const a=this.valueSubscriptions.get(i);a&&(a(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,a){if(this.props.values&&this.props.values[i])return this.props.values[i];let c=this.values.get(i);return c===void 0&&a!==void 0&&(c=motionValue(a,{owner:this}),this.addValue(i,c)),c}readValue(i){var a;return this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:(a=this.getBaseTargetFromProps(this.props,i))!==null&&a!==void 0?a:this.readValueFromInstance(this.current,i,this.options)}setBaseTarget(i,a){this.baseTarget[i]=a}getBaseTarget(i){var a;const{initial:c}=this.props,d=typeof c=="string"||typeof c=="object"?(a=resolveVariantFromProps(this.props,c))===null||a===void 0?void 0:a[i]:void 0;if(c&&d!==void 0)return d;const g=this.getBaseTargetFromProps(this.props,i);return g!==void 0&&!isMotionValue(g)?g:this.initialValues[i]!==void 0&&d===void 0?void 0:this.baseTarget[i]}on(i,a){return this.events[i]||(this.events[i]=new SubscriptionManager),this.events[i].add(a)}notify(i,...a){this.events[i]&&this.events[i].notify(...a)}}class DOMVisualElement extends VisualElement{sortInstanceNodePosition(i,a){return i.compareDocumentPosition(a)&2?1:-1}getBaseTargetFromProps(i,a){return i.style?i.style[a]:void 0}removeValueFromRenderState(i,{vars:a,style:c}){delete a[i],delete c[i]}makeTargetAnimatableFromInstance({transition:i,transitionEnd:a,...c},{transformValues:d},g){let b=getOrigin(c,i||{},this);if(d&&(a&&(a=d(a)),c&&(c=d(c)),b&&(b=d(b))),g){checkTargetForNewValues(this,c,b);const $=parseDomVariant(this,c,b,a);a=$.transitionEnd,c=$.target}return{transition:i,transitionEnd:a,...c}}}function getComputedStyle$2(s){return window.getComputedStyle(s)}class HTMLVisualElement extends DOMVisualElement{readValueFromInstance(i,a){if(transformProps.has(a)){const c=getDefaultValueType(a);return c&&c.default||0}else{const c=getComputedStyle$2(i),d=(isCSSVariableName(a)?c.getPropertyValue(a):c[a])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(i,{transformPagePoint:a}){return measureViewportBox(i,a)}build(i,a,c,d){buildHTMLStyles(i,a,c,d.transformTemplate)}scrapeMotionValuesFromProps(i,a){return scrapeMotionValuesFromProps$1(i,a)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;isMotionValue(i)&&(this.childSubscription=i.on("change",a=>{this.current&&(this.current.textContent=`${a}`)}))}renderInstance(i,a,c,d){renderHTML(i,a,c,d)}}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(i,a){return i[a]}readValueFromInstance(i,a){if(transformProps.has(a)){const c=getDefaultValueType(a);return c&&c.default||0}return a=camelCaseAttributes.has(a)?a:camelToDash(a),i.getAttribute(a)}measureInstanceViewportBox(){return createBox()}scrapeMotionValuesFromProps(i,a){return scrapeMotionValuesFromProps(i,a)}build(i,a,c,d){buildSVGAttrs(i,a,c,this.isSVGTag,d.transformTemplate)}renderInstance(i,a,c,d){renderSVG(i,a,c,d)}mount(i){this.isSVGTag=isSVGTag(i.tagName),super.mount(i)}}const createDomVisualElement=(s,i)=>isSVGComponent(s)?new SVGVisualElement(i,{enableHardwareAcceleration:!1}):new HTMLVisualElement(i,{enableHardwareAcceleration:!0}),m$1=createMotionProxy(createDomMotionConfig);function useIsMounted(){const s=reactExports.useRef(!1);return useIsomorphicLayoutEffect$1(()=>(s.current=!0,()=>{s.current=!1}),[]),s}function useForceUpdate(){const s=useIsMounted(),[i,a]=reactExports.useState(0),c=reactExports.useCallback(()=>{s.current&&a(i+1)},[i]);return[reactExports.useCallback(()=>frame.postRender(c),[c]),i]}class PopChildMeasure extends reactExports.Component{getSnapshotBeforeUpdate(i){const a=this.props.childRef.current;if(a&&i.isPresent&&!this.props.isPresent){const c=this.props.sizeRef.current;c.height=a.offsetHeight||0,c.width=a.offsetWidth||0,c.top=a.offsetTop,c.left=a.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function PopChild({children:s,isPresent:i}){const a=reactExports.useId(),c=reactExports.useRef(null),d=reactExports.useRef({width:0,height:0,top:0,left:0});return reactExports.useInsertionEffect(()=>{const{width:g,height:b,top:$,left:j}=d.current;if(i||!c.current||!g||!b)return;c.current.dataset.motionPopId=a;const _=document.createElement("style");return document.head.appendChild(_),_.sheet&&_.sheet.insertRule(` [data-motion-pop-id="${a}"] { position: absolute !important; width: ${g}px !important; height: ${b}px !important; top: ${$}px !important; left: ${j}px !important; } `),()=>{document.head.removeChild(_)}},[i]),reactExports.createElement(PopChildMeasure,{isPresent:i,childRef:c,sizeRef:d},reactExports.cloneElement(s,{ref:c}))}const PresenceChild=({children:s,initial:i,isPresent:a,onExitComplete:c,custom:d,presenceAffectsLayout:g,mode:b})=>{const $=useConstant(newChildrenMap),j=reactExports.useId(),_=reactExports.useMemo(()=>({id:j,initial:i,isPresent:a,custom:d,onExitComplete:_e=>{$.set(_e,!0);for(const et of $.values())if(!et)return;c&&c()},register:_e=>($.set(_e,!1),()=>$.delete(_e))}),g?void 0:[a]);return reactExports.useMemo(()=>{$.forEach((_e,et)=>$.set(et,!1))},[a]),reactExports.useEffect(()=>{!a&&!$.size&&c&&c()},[a]),b==="popLayout"&&(s=reactExports.createElement(PopChild,{isPresent:a},s)),reactExports.createElement(PresenceContext.Provider,{value:_},s)};function newChildrenMap(){return new Map}function useUnmountEffect(s){return reactExports.useEffect(()=>()=>s(),[])}const getChildKey=s=>s.key||"";function updateChildLookup(s,i){s.forEach(a=>{const c=getChildKey(a);i.set(c,a)})}function onlyElements(s){const i=[];return reactExports.Children.forEach(s,a=>{reactExports.isValidElement(a)&&i.push(a)}),i}const AnimatePresence=({children:s,custom:i,initial:a=!0,onExitComplete:c,exitBeforeEnter:d,presenceAffectsLayout:g=!0,mode:b="sync"})=>{const $=reactExports.useContext(LayoutGroupContext).forceRender||useForceUpdate()[0],j=useIsMounted(),_=onlyElements(s);let _e=_;const et=reactExports.useRef(new Map).current,tt=reactExports.useRef(_e),rt=reactExports.useRef(new Map).current,nt=reactExports.useRef(!0);if(useIsomorphicLayoutEffect$1(()=>{nt.current=!1,updateChildLookup(_,rt),tt.current=_e}),useUnmountEffect(()=>{nt.current=!0,rt.clear(),et.clear()}),nt.current)return reactExports.createElement(reactExports.Fragment,null,_e.map(st=>reactExports.createElement(PresenceChild,{key:getChildKey(st),isPresent:!0,initial:a?void 0:!1,presenceAffectsLayout:g,mode:b},st)));_e=[..._e];const at=tt.current.map(getChildKey),ut=_.map(getChildKey),ot=at.length;for(let st=0;st{if(ut.indexOf(it)!==-1)return;const ct=rt.get(it);if(!ct)return;const lt=at.indexOf(it);let dt=st;if(!dt){const mt=()=>{rt.delete(it),et.delete(it);const ht=tt.current.findIndex(Rt=>Rt.key===it);if(tt.current.splice(ht,1),!et.size){if(tt.current=_,j.current===!1)return;$(),c&&c()}};dt=reactExports.createElement(PresenceChild,{key:getChildKey(ct),isPresent:!1,onExitComplete:mt,custom:i,presenceAffectsLayout:g,mode:b},ct),et.set(it,dt)}_e.splice(lt,0,dt)}),_e=_e.map(st=>{const it=st.key;return et.has(it)?st:reactExports.createElement(PresenceChild,{key:getChildKey(st),isPresent:!0,presenceAffectsLayout:g,mode:b},st)}),reactExports.createElement(reactExports.Fragment,null,et.size?_e:_e.map(st=>reactExports.cloneElement(st)))};function LazyMotion({children:s,features:i,strict:a=!1}){const[,c]=reactExports.useState(!isLazyBundle(i)),d=reactExports.useRef(void 0);if(!isLazyBundle(i)){const{renderer:g,...b}=i;d.current=g,loadFeatures(b)}return reactExports.useEffect(()=>{isLazyBundle(i)&&i().then(({renderer:g,...b})=>{loadFeatures(b),d.current=g,c(!0)})},[]),reactExports.createElement(LazyContext.Provider,{value:{renderer:d.current,strict:a}},s)}function isLazyBundle(s){return typeof s=="function"}const domAnimation={renderer:createDomVisualElement,...animations,...gestureAnimations};function bind(s,i){return function(){return s.apply(i,arguments)}}const{toString:toString$1}=Object.prototype,{getPrototypeOf:getPrototypeOf$1}=Object,kindOf=(s=>i=>{const a=toString$1.call(i);return s[a]||(s[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=s=>(s=s.toLowerCase(),i=>kindOf(i)===s),typeOfTest=s=>i=>typeof i===s,{isArray}=Array,isUndefined$1=typeOfTest("undefined");function isBuffer(s){return s!==null&&!isUndefined$1(s)&&s.constructor!==null&&!isUndefined$1(s.constructor)&&isFunction$1(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(s){let i;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?i=ArrayBuffer.isView(s):i=s&&s.buffer&&isArrayBuffer(s.buffer),i}const isString$2=typeOfTest("string"),isFunction$1=typeOfTest("function"),isNumber=typeOfTest("number"),isObject$2=s=>s!==null&&typeof s=="object",isBoolean$1=s=>s===!0||s===!1,isPlainObject$3=s=>{if(kindOf(s)!=="object")return!1;const i=getPrototypeOf$1(s);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},isDate$1=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=s=>isObject$2(s)&&isFunction$1(s.pipe),isFormData=s=>{let i;return s&&(typeof FormData=="function"&&s instanceof FormData||isFunction$1(s.append)&&((i=kindOf(s))==="formdata"||i==="object"&&isFunction$1(s.toString)&&s.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),trim=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(s,i,{allOwnKeys:a=!1}={}){if(s===null||typeof s>"u")return;let c,d;if(typeof s!="object"&&(s=[s]),isArray(s))for(c=0,d=s.length;c0;)if(d=a[c],i===d.toLowerCase())return d;return null}const _global=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),isContextDefined=s=>!isUndefined$1(s)&&s!==_global;function merge(){const{caseless:s}=isContextDefined(this)&&this||{},i={},a=(c,d)=>{const g=s&&findKey(i,d)||d;isPlainObject$3(i[g])&&isPlainObject$3(c)?i[g]=merge(i[g],c):isPlainObject$3(c)?i[g]=merge({},c):isArray(c)?i[g]=c.slice():i[g]=c};for(let c=0,d=arguments.length;c(forEach(i,(d,g)=>{a&&isFunction$1(d)?s[g]=bind(d,a):s[g]=d},{allOwnKeys:c}),s),stripBOM=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),inherits=(s,i,a,c)=>{s.prototype=Object.create(i.prototype,c),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:i.prototype}),a&&Object.assign(s.prototype,a)},toFlatObject=(s,i,a,c)=>{let d,g,b;const $={};if(i=i||{},s==null)return i;do{for(d=Object.getOwnPropertyNames(s),g=d.length;g-- >0;)b=d[g],(!c||c(b,s,i))&&!$[b]&&(i[b]=s[b],$[b]=!0);s=a!==!1&&getPrototypeOf$1(s)}while(s&&(!a||a(s,i))&&s!==Object.prototype);return i},endsWith=(s,i,a)=>{s=String(s),(a===void 0||a>s.length)&&(a=s.length),a-=i.length;const c=s.indexOf(i,a);return c!==-1&&c===a},toArray=s=>{if(!s)return null;if(isArray(s))return s;let i=s.length;if(!isNumber(i))return null;const a=new Array(i);for(;i-- >0;)a[i]=s[i];return a},isTypedArray=(s=>i=>s&&i instanceof s)(typeof Uint8Array<"u"&&getPrototypeOf$1(Uint8Array)),forEachEntry=(s,i)=>{const c=(s&&s[Symbol.iterator]).call(s);let d;for(;(d=c.next())&&!d.done;){const g=d.value;i.call(s,g[0],g[1])}},matchAll=(s,i)=>{let a;const c=[];for(;(a=s.exec(i))!==null;)c.push(a);return c},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,c,d){return c.toUpperCase()+d}),hasOwnProperty$1=(({hasOwnProperty:s})=>(i,a)=>s.call(i,a))(Object.prototype),isRegExp$1=kindOfTest("RegExp"),reduceDescriptors=(s,i)=>{const a=Object.getOwnPropertyDescriptors(s),c={};forEach(a,(d,g)=>{let b;(b=i(d,g,s))!==!1&&(c[g]=b||d)}),Object.defineProperties(s,c)},freezeMethods=s=>{reduceDescriptors(s,(i,a)=>{if(isFunction$1(s)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const c=s[a];if(isFunction$1(c)){if(i.enumerable=!1,"writable"in i){i.writable=!1;return}i.set||(i.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},toObjectSet=(s,i)=>{const a={},c=d=>{d.forEach(g=>{a[g]=!0})};return isArray(s)?c(s):c(String(s).split(i)),a},noop=()=>{},toFiniteNumber=(s,i)=>(s=+s,Number.isFinite(s)?s:i),ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(s=16,i=ALPHABET.ALPHA_DIGIT)=>{let a="";const{length:c}=i;for(;s--;)a+=i[Math.random()*c|0];return a};function isSpecCompliantForm(s){return!!(s&&isFunction$1(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const toJSONObject=s=>{const i=new Array(10),a=(c,d)=>{if(isObject$2(c)){if(i.indexOf(c)>=0)return;if(!("toJSON"in c)){i[d]=c;const g=isArray(c)?[]:{};return forEach(c,(b,$)=>{const j=a(b,d+1);!isUndefined$1(j)&&(g[$]=j)}),i[d]=void 0,g}}return c};return a(s,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable$1=s=>s&&(isObject$2(s)||isFunction$1(s))&&isFunction$1(s.then)&&isFunction$1(s.catch),utils={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString:isString$2,isNumber,isBoolean:isBoolean$1,isObject:isObject$2,isPlainObject:isPlainObject$3,isUndefined:isUndefined$1,isDate:isDate$1,isFile,isBlob,isRegExp:isRegExp$1,isFunction:isFunction$1,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$1,hasOwnProp:hasOwnProperty$1,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable:isThenable$1};function AxiosError(s,i,a,c,d){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",i&&(this.code=i),a&&(this.config=a),c&&(this.request=c),d&&(this.response=d)}utils.inherits(AxiosError,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:utils.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError.prototype,descriptors={};["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(s=>{descriptors[s]={value:s}});Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError.from=(s,i,a,c,d,g)=>{const b=Object.create(prototype$1);return utils.toFlatObject(s,b,function(j){return j!==Error.prototype},$=>$!=="isAxiosError"),AxiosError.call(b,s.message,i,a,c,d),b.cause=s,b.name=s.name,g&&Object.assign(b,g),b};const httpAdapter=null;function isVisitable(s){return utils.isPlainObject(s)||utils.isArray(s)}function removeBrackets(s){return utils.endsWith(s,"[]")?s.slice(0,-2):s}function renderKey(s,i,a){return s?s.concat(i).map(function(d,g){return d=removeBrackets(d),!a&&g?"["+d+"]":d}).join(a?".":""):i}function isFlatArray(s){return utils.isArray(s)&&!s.some(isVisitable)}const predicates=utils.toFlatObject(utils,{},null,function(i){return/^is[A-Z]/.test(i)});function toFormData(s,i,a){if(!utils.isObject(s))throw new TypeError("target must be an object");i=i||new FormData,a=utils.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(at,ut){return!utils.isUndefined(ut[at])});const c=a.metaTokens,d=a.visitor||_e,g=a.dots,b=a.indexes,j=(a.Blob||typeof Blob<"u"&&Blob)&&utils.isSpecCompliantForm(i);if(!utils.isFunction(d))throw new TypeError("visitor must be a function");function _(nt){if(nt===null)return"";if(utils.isDate(nt))return nt.toISOString();if(!j&&utils.isBlob(nt))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils.isArrayBuffer(nt)||utils.isTypedArray(nt)?j&&typeof Blob=="function"?new Blob([nt]):Buffer.from(nt):nt}function _e(nt,at,ut){let ot=nt;if(nt&&!ut&&typeof nt=="object"){if(utils.endsWith(at,"{}"))at=c?at:at.slice(0,-2),nt=JSON.stringify(nt);else if(utils.isArray(nt)&&isFlatArray(nt)||(utils.isFileList(nt)||utils.endsWith(at,"[]"))&&(ot=utils.toArray(nt)))return at=removeBrackets(at),ot.forEach(function(it,ct){!(utils.isUndefined(it)||it===null)&&i.append(b===!0?renderKey([at],ct,g):b===null?at:at+"[]",_(it))}),!1}return isVisitable(nt)?!0:(i.append(renderKey(ut,at,g),_(nt)),!1)}const et=[],tt=Object.assign(predicates,{defaultVisitor:_e,convertValue:_,isVisitable});function rt(nt,at){if(!utils.isUndefined(nt)){if(et.indexOf(nt)!==-1)throw Error("Circular reference detected in "+at.join("."));et.push(nt),utils.forEach(nt,function(ot,st){(!(utils.isUndefined(ot)||ot===null)&&d.call(i,ot,utils.isString(st)?st.trim():st,at,tt))===!0&&rt(ot,at?at.concat(st):[st])}),et.pop()}}if(!utils.isObject(s))throw new TypeError("data must be an object");return rt(s),i}function encode$3(s){const i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(c){return i[c]})}function AxiosURLSearchParams(s,i){this._pairs=[],s&&toFormData(s,this,i)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(i,a){this._pairs.push([i,a])};prototype.toString=function(i){const a=i?function(c){return i.call(this,c,encode$3)}:encode$3;return this._pairs.map(function(d){return a(d[0])+"="+a(d[1])},"").join("&")};function encode$2(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(s,i,a){if(!i)return s;const c=a&&a.encode||encode$2,d=a&&a.serialize;let g;if(d?g=d(i,a):g=utils.isURLSearchParams(i)?i.toString():new AxiosURLSearchParams(i,a).toString(c),g){const b=s.indexOf("#");b!==-1&&(s=s.slice(0,b)),s+=(s.indexOf("?")===-1?"?":"&")+g}return s}class InterceptorManager{constructor(){this.handlers=[]}use(i,a,c){return this.handlers.push({fulfilled:i,rejected:a,synchronous:c?c.synchronous:!1,runWhen:c?c.runWhen:null}),this.handlers.length-1}eject(i){this.handlers[i]&&(this.handlers[i]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(i){utils.forEach(this.handlers,function(c){c!==null&&i(c)})}}const InterceptorManager$1=InterceptorManager,transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,isStandardBrowserEnv=(()=>{let s;return typeof navigator<"u"&&((s=navigator.product)==="ReactNative"||s==="NativeScript"||s==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),isStandardBrowserWebWorkerEnv=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},isStandardBrowserEnv,isStandardBrowserWebWorkerEnv,protocols:["http","https","file","blob","url","data"]};function toURLEncodedForm(s,i){return toFormData(s,new platform$1.classes.URLSearchParams,Object.assign({visitor:function(a,c,d,g){return platform$1.isNode&&utils.isBuffer(a)?(this.append(c,a.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)}},i))}function parsePropPath(s){return utils.matchAll(/\w+|\[(\w*)]/g,s).map(i=>i[0]==="[]"?"":i[1]||i[0])}function arrayToObject(s){const i={},a=Object.keys(s);let c;const d=a.length;let g;for(c=0;c=a.length;return b=!b&&utils.isArray(d)?d.length:b,j?(utils.hasOwnProp(d,b)?d[b]=[d[b],c]:d[b]=c,!$):((!d[b]||!utils.isObject(d[b]))&&(d[b]=[]),i(a,c,d[b],g)&&utils.isArray(d[b])&&(d[b]=arrayToObject(d[b])),!$)}if(utils.isFormData(s)&&utils.isFunction(s.entries)){const a={};return utils.forEachEntry(s,(c,d)=>{i(parsePropPath(c),d,a,0)}),a}return null}function stringifySafely(s,i,a){if(utils.isString(s))try{return(i||JSON.parse)(s),utils.trim(s)}catch(c){if(c.name!=="SyntaxError")throw c}return(a||JSON.stringify)(s)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function(i,a){const c=a.getContentType()||"",d=c.indexOf("application/json")>-1,g=utils.isObject(i);if(g&&utils.isHTMLForm(i)&&(i=new FormData(i)),utils.isFormData(i))return d&&d?JSON.stringify(formDataToJSON(i)):i;if(utils.isArrayBuffer(i)||utils.isBuffer(i)||utils.isStream(i)||utils.isFile(i)||utils.isBlob(i))return i;if(utils.isArrayBufferView(i))return i.buffer;if(utils.isURLSearchParams(i))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),i.toString();let $;if(g){if(c.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(i,this.formSerializer).toString();if(($=utils.isFileList(i))||c.indexOf("multipart/form-data")>-1){const j=this.env&&this.env.FormData;return toFormData($?{"files[]":i}:i,j&&new j,this.formSerializer)}}return g||d?(a.setContentType("application/json",!1),stringifySafely(i)):i}],transformResponse:[function(i){const a=this.transitional||defaults.transitional,c=a&&a.forcedJSONParsing,d=this.responseType==="json";if(i&&utils.isString(i)&&(c&&!this.responseType||d)){const b=!(a&&a.silentJSONParsing)&&d;try{return JSON.parse(i)}catch($){if(b)throw $.name==="SyntaxError"?AxiosError.from($,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):$}}return i}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform$1.classes.FormData,Blob:platform$1.classes.Blob},validateStatus:function(i){return i>=200&&i<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils.forEach(["delete","get","head","post","put","patch"],s=>{defaults.headers[s]={}});const defaults$1=defaults,ignoreDuplicateOf=utils.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"]),parseHeaders=s=>{const i={};let a,c,d;return s&&s.split(` `).forEach(function(b){d=b.indexOf(":"),a=b.substring(0,d).trim().toLowerCase(),c=b.substring(d+1).trim(),!(!a||i[a]&&ignoreDuplicateOf[a])&&(a==="set-cookie"?i[a]?i[a].push(c):i[a]=[c]:i[a]=i[a]?i[a]+", "+c:c)}),i},$internals=Symbol("internals");function normalizeHeader(s){return s&&String(s).trim().toLowerCase()}function normalizeValue(s){return s===!1||s==null?s:utils.isArray(s)?s.map(normalizeValue):String(s)}function parseTokens(s){const i=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let c;for(;c=a.exec(s);)i[c[1]]=c[2];return i}const isValidHeaderName=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function matchHeaderValue(s,i,a,c,d){if(utils.isFunction(c))return c.call(this,i,a);if(d&&(i=a),!!utils.isString(i)){if(utils.isString(c))return i.indexOf(c)!==-1;if(utils.isRegExp(c))return c.test(i)}}function formatHeader(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(i,a,c)=>a.toUpperCase()+c)}function buildAccessors(s,i){const a=utils.toCamelCase(" "+i);["get","set","has"].forEach(c=>{Object.defineProperty(s,c+a,{value:function(d,g,b){return this[c].call(this,i,d,g,b)},configurable:!0})})}class AxiosHeaders{constructor(i){i&&this.set(i)}set(i,a,c){const d=this;function g($,j,_){const _e=normalizeHeader(j);if(!_e)throw new Error("header name must be a non-empty string");const et=utils.findKey(d,_e);(!et||d[et]===void 0||_===!0||_===void 0&&d[et]!==!1)&&(d[et||j]=normalizeValue($))}const b=($,j)=>utils.forEach($,(_,_e)=>g(_,_e,j));return utils.isPlainObject(i)||i instanceof this.constructor?b(i,a):utils.isString(i)&&(i=i.trim())&&!isValidHeaderName(i)?b(parseHeaders(i),a):i!=null&&g(a,i,c),this}get(i,a){if(i=normalizeHeader(i),i){const c=utils.findKey(this,i);if(c){const d=this[c];if(!a)return d;if(a===!0)return parseTokens(d);if(utils.isFunction(a))return a.call(this,d,c);if(utils.isRegExp(a))return a.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(i,a){if(i=normalizeHeader(i),i){const c=utils.findKey(this,i);return!!(c&&this[c]!==void 0&&(!a||matchHeaderValue(this,this[c],c,a)))}return!1}delete(i,a){const c=this;let d=!1;function g(b){if(b=normalizeHeader(b),b){const $=utils.findKey(c,b);$&&(!a||matchHeaderValue(c,c[$],$,a))&&(delete c[$],d=!0)}}return utils.isArray(i)?i.forEach(g):g(i),d}clear(i){const a=Object.keys(this);let c=a.length,d=!1;for(;c--;){const g=a[c];(!i||matchHeaderValue(this,this[g],g,i,!0))&&(delete this[g],d=!0)}return d}normalize(i){const a=this,c={};return utils.forEach(this,(d,g)=>{const b=utils.findKey(c,g);if(b){a[b]=normalizeValue(d),delete a[g];return}const $=i?formatHeader(g):String(g).trim();$!==g&&delete a[g],a[$]=normalizeValue(d),c[$]=!0}),this}concat(...i){return this.constructor.concat(this,...i)}toJSON(i){const a=Object.create(null);return utils.forEach(this,(c,d)=>{c!=null&&c!==!1&&(a[d]=i&&utils.isArray(c)?c.join(", "):c)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([i,a])=>i+": "+a).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(i){return i instanceof this?i:new this(i)}static concat(i,...a){const c=new this(i);return a.forEach(d=>c.set(d)),c}static accessor(i){const c=(this[$internals]=this[$internals]={accessors:{}}).accessors,d=this.prototype;function g(b){const $=normalizeHeader(b);c[$]||(buildAccessors(d,b),c[$]=!0)}return utils.isArray(i)?i.forEach(g):g(i),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils.reduceDescriptors(AxiosHeaders.prototype,({value:s},i)=>{let a=i[0].toUpperCase()+i.slice(1);return{get:()=>s,set(c){this[a]=c}}});utils.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(s,i){const a=this||defaults$1,c=i||a,d=AxiosHeaders$1.from(c.headers);let g=c.data;return utils.forEach(s,function($){g=$.call(a,g,d.normalize(),i?i.status:void 0)}),d.normalize(),g}function isCancel(s){return!!(s&&s.__CANCEL__)}function CanceledError(s,i,a){AxiosError.call(this,s??"canceled",AxiosError.ERR_CANCELED,i,a),this.name="CanceledError"}utils.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(s,i,a){const c=a.config.validateStatus;!a.status||!c||c(a.status)?s(a):i(new AxiosError("Request failed with status code "+a.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}const cookies=platform$1.isStandardBrowserEnv?function(){return{write:function(a,c,d,g,b,$){const j=[];j.push(a+"="+encodeURIComponent(c)),utils.isNumber(d)&&j.push("expires="+new Date(d).toGMTString()),utils.isString(g)&&j.push("path="+g),utils.isString(b)&&j.push("domain="+b),$===!0&&j.push("secure"),document.cookie=j.join("; ")},read:function(a){const c=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return c?decodeURIComponent(c[3]):null},remove:function(a){this.write(a,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function isAbsoluteURL(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function combineURLs(s,i){return i?s.replace(/\/+$/,"")+"/"+i.replace(/^\/+/,""):s}function buildFullPath(s,i){return s&&!isAbsoluteURL(i)?combineURLs(s,i):i}const isURLSameOrigin=platform$1.isStandardBrowserEnv?function(){const i=/(msie|trident)/i.test(navigator.userAgent),a=document.createElement("a");let c;function d(g){let b=g;return i&&(a.setAttribute("href",b),b=a.href),a.setAttribute("href",b),{href:a.href,protocol:a.protocol?a.protocol.replace(/:$/,""):"",host:a.host,search:a.search?a.search.replace(/^\?/,""):"",hash:a.hash?a.hash.replace(/^#/,""):"",hostname:a.hostname,port:a.port,pathname:a.pathname.charAt(0)==="/"?a.pathname:"/"+a.pathname}}return c=d(window.location.href),function(b){const $=utils.isString(b)?d(b):b;return $.protocol===c.protocol&&$.host===c.host}}():function(){return function(){return!0}}();function parseProtocol(s){const i=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return i&&i[1]||""}function speedometer(s,i){s=s||10;const a=new Array(s),c=new Array(s);let d=0,g=0,b;return i=i!==void 0?i:1e3,function(j){const _=Date.now(),_e=c[g];b||(b=_),a[d]=j,c[d]=_;let et=g,tt=0;for(;et!==d;)tt+=a[et++],et=et%s;if(d=(d+1)%s,d===g&&(g=(g+1)%s),_-b{const g=d.loaded,b=d.lengthComputable?d.total:void 0,$=g-a,j=c($),_=g<=b;a=g;const _e={loaded:g,total:b,progress:b?g/b:void 0,bytes:$,rate:j||void 0,estimated:j&&b&&_?(b-g)/j:void 0,event:d};_e[i?"download":"upload"]=!0,s(_e)}}const isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(s){return new Promise(function(a,c){let d=s.data;const g=AxiosHeaders$1.from(s.headers).normalize(),b=s.responseType;let $;function j(){s.cancelToken&&s.cancelToken.unsubscribe($),s.signal&&s.signal.removeEventListener("abort",$)}let _;utils.isFormData(d)&&(platform$1.isStandardBrowserEnv||platform$1.isStandardBrowserWebWorkerEnv?g.setContentType(!1):g.getContentType(/^\s*multipart\/form-data/)?utils.isString(_=g.getContentType())&&g.setContentType(_.replace(/^\s*(multipart\/form-data);+/,"$1")):g.setContentType("multipart/form-data"));let _e=new XMLHttpRequest;if(s.auth){const nt=s.auth.username||"",at=s.auth.password?unescape(encodeURIComponent(s.auth.password)):"";g.set("Authorization","Basic "+btoa(nt+":"+at))}const et=buildFullPath(s.baseURL,s.url);_e.open(s.method.toUpperCase(),buildURL(et,s.params,s.paramsSerializer),!0),_e.timeout=s.timeout;function tt(){if(!_e)return;const nt=AxiosHeaders$1.from("getAllResponseHeaders"in _e&&_e.getAllResponseHeaders()),ut={data:!b||b==="text"||b==="json"?_e.responseText:_e.response,status:_e.status,statusText:_e.statusText,headers:nt,config:s,request:_e};settle(function(st){a(st),j()},function(st){c(st),j()},ut),_e=null}if("onloadend"in _e?_e.onloadend=tt:_e.onreadystatechange=function(){!_e||_e.readyState!==4||_e.status===0&&!(_e.responseURL&&_e.responseURL.indexOf("file:")===0)||setTimeout(tt)},_e.onabort=function(){_e&&(c(new AxiosError("Request aborted",AxiosError.ECONNABORTED,s,_e)),_e=null)},_e.onerror=function(){c(new AxiosError("Network Error",AxiosError.ERR_NETWORK,s,_e)),_e=null},_e.ontimeout=function(){let at=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const ut=s.transitional||transitionalDefaults;s.timeoutErrorMessage&&(at=s.timeoutErrorMessage),c(new AxiosError(at,ut.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,s,_e)),_e=null},platform$1.isStandardBrowserEnv){const nt=isURLSameOrigin(et)&&s.xsrfCookieName&&cookies.read(s.xsrfCookieName);nt&&g.set(s.xsrfHeaderName,nt)}d===void 0&&g.setContentType(null),"setRequestHeader"in _e&&utils.forEach(g.toJSON(),function(at,ut){_e.setRequestHeader(ut,at)}),utils.isUndefined(s.withCredentials)||(_e.withCredentials=!!s.withCredentials),b&&b!=="json"&&(_e.responseType=s.responseType),typeof s.onDownloadProgress=="function"&&_e.addEventListener("progress",progressEventReducer(s.onDownloadProgress,!0)),typeof s.onUploadProgress=="function"&&_e.upload&&_e.upload.addEventListener("progress",progressEventReducer(s.onUploadProgress)),(s.cancelToken||s.signal)&&($=nt=>{_e&&(c(!nt||nt.type?new CanceledError(null,s,_e):nt),_e.abort(),_e=null)},s.cancelToken&&s.cancelToken.subscribe($),s.signal&&(s.signal.aborted?$():s.signal.addEventListener("abort",$)));const rt=parseProtocol(et);if(rt&&platform$1.protocols.indexOf(rt)===-1){c(new AxiosError("Unsupported protocol "+rt+":",AxiosError.ERR_BAD_REQUEST,s));return}_e.send(d||null)})},knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils.forEach(knownAdapters,(s,i)=>{if(s){try{Object.defineProperty(s,"name",{value:i})}catch{}Object.defineProperty(s,"adapterName",{value:i})}});const renderReason=s=>`- ${s}`,isResolvedHandle=s=>utils.isFunction(s)||s===null||s===!1,adapters={getAdapter:s=>{s=utils.isArray(s)?s:[s];const{length:i}=s;let a,c;const d={};for(let g=0;g`adapter ${$} `+(j===!1?"is not supported by the environment":"is not available in the build"));let b=i?g.length>1?`since : `+g.map(renderReason).join(` `):" "+renderReason(g[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return c},adapters:knownAdapters};function throwIfCancellationRequested(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new CanceledError(null,s)}function dispatchRequest(s){return throwIfCancellationRequested(s),s.headers=AxiosHeaders$1.from(s.headers),s.data=transformData.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(s.adapter||defaults$1.adapter)(s).then(function(c){return throwIfCancellationRequested(s),c.data=transformData.call(s,s.transformResponse,c),c.headers=AxiosHeaders$1.from(c.headers),c},function(c){return isCancel(c)||(throwIfCancellationRequested(s),c&&c.response&&(c.response.data=transformData.call(s,s.transformResponse,c.response),c.response.headers=AxiosHeaders$1.from(c.response.headers))),Promise.reject(c)})}const headersToObject=s=>s instanceof AxiosHeaders$1?s.toJSON():s;function mergeConfig(s,i){i=i||{};const a={};function c(_,_e,et){return utils.isPlainObject(_)&&utils.isPlainObject(_e)?utils.merge.call({caseless:et},_,_e):utils.isPlainObject(_e)?utils.merge({},_e):utils.isArray(_e)?_e.slice():_e}function d(_,_e,et){if(utils.isUndefined(_e)){if(!utils.isUndefined(_))return c(void 0,_,et)}else return c(_,_e,et)}function g(_,_e){if(!utils.isUndefined(_e))return c(void 0,_e)}function b(_,_e){if(utils.isUndefined(_e)){if(!utils.isUndefined(_))return c(void 0,_)}else return c(void 0,_e)}function $(_,_e,et){if(et in i)return c(_,_e);if(et in s)return c(void 0,_)}const j={url:g,method:g,data:g,baseURL:b,transformRequest:b,transformResponse:b,paramsSerializer:b,timeout:b,timeoutMessage:b,withCredentials:b,adapter:b,responseType:b,xsrfCookieName:b,xsrfHeaderName:b,onUploadProgress:b,onDownloadProgress:b,decompress:b,maxContentLength:b,maxBodyLength:b,beforeRedirect:b,transport:b,httpAgent:b,httpsAgent:b,cancelToken:b,socketPath:b,responseEncoding:b,validateStatus:$,headers:(_,_e)=>d(headersToObject(_),headersToObject(_e),!0)};return utils.forEach(Object.keys(Object.assign({},s,i)),function(_e){const et=j[_e]||d,tt=et(s[_e],i[_e],_e);utils.isUndefined(tt)&&et!==$||(a[_e]=tt)}),a}const VERSION$1="1.6.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((s,i)=>{validators$1[s]=function(c){return typeof c===s||"a"+(i<1?"n ":" ")+s}});const deprecatedWarnings={};validators$1.transitional=function(i,a,c){function d(g,b){return"[Axios v"+VERSION$1+"] Transitional option '"+g+"'"+b+(c?". "+c:"")}return(g,b,$)=>{if(i===!1)throw new AxiosError(d(b," has been removed"+(a?" in "+a:"")),AxiosError.ERR_DEPRECATED);return a&&!deprecatedWarnings[b]&&(deprecatedWarnings[b]=!0,console.warn(d(b," has been deprecated since v"+a+" and will be removed in the near future"))),i?i(g,b,$):!0}};function assertOptions(s,i,a){if(typeof s!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const c=Object.keys(s);let d=c.length;for(;d-- >0;){const g=c[d],b=i[g];if(b){const $=s[g],j=$===void 0||b($,g,s);if(j!==!0)throw new AxiosError("option "+g+" must be "+j,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new AxiosError("Unknown option "+g,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(i){this.defaults=i,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}request(i,a){typeof i=="string"?(a=a||{},a.url=i):a=i||{},a=mergeConfig(this.defaults,a);const{transitional:c,paramsSerializer:d,headers:g}=a;c!==void 0&&validator.assertOptions(c,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),d!=null&&(utils.isFunction(d)?a.paramsSerializer={serialize:d}:validator.assertOptions(d,{encode:validators.function,serialize:validators.function},!0)),a.method=(a.method||this.defaults.method||"get").toLowerCase();let b=g&&utils.merge(g.common,g[a.method]);g&&utils.forEach(["delete","get","head","post","put","patch","common"],nt=>{delete g[nt]}),a.headers=AxiosHeaders$1.concat(b,g);const $=[];let j=!0;this.interceptors.request.forEach(function(at){typeof at.runWhen=="function"&&at.runWhen(a)===!1||(j=j&&at.synchronous,$.unshift(at.fulfilled,at.rejected))});const _=[];this.interceptors.response.forEach(function(at){_.push(at.fulfilled,at.rejected)});let _e,et=0,tt;if(!j){const nt=[dispatchRequest.bind(this),void 0];for(nt.unshift.apply(nt,$),nt.push.apply(nt,_),tt=nt.length,_e=Promise.resolve(a);et{if(!c._listeners)return;let g=c._listeners.length;for(;g-- >0;)c._listeners[g](d);c._listeners=null}),this.promise.then=d=>{let g;const b=new Promise($=>{c.subscribe($),g=$}).then(d);return b.cancel=function(){c.unsubscribe(g)},b},i(function(g,b,$){c.reason||(c.reason=new CanceledError(g,b,$),a(c.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(i){if(this.reason){i(this.reason);return}this._listeners?this._listeners.push(i):this._listeners=[i]}unsubscribe(i){if(!this._listeners)return;const a=this._listeners.indexOf(i);a!==-1&&this._listeners.splice(a,1)}static source(){let i;return{token:new CancelToken(function(d){i=d}),cancel:i}}}const CancelToken$1=CancelToken;function spread(s){return function(a){return s.apply(null,a)}}function isAxiosError(s){return utils.isObject(s)&&s.isAxiosError===!0}const HttpStatusCode={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(HttpStatusCode).forEach(([s,i])=>{HttpStatusCode[i]=s});const HttpStatusCode$1=HttpStatusCode;function createInstance(s){const i=new Axios$1(s),a=bind(Axios$1.prototype.request,i);return utils.extend(a,Axios$1.prototype,i,{allOwnKeys:!0}),utils.extend(a,i,null,{allOwnKeys:!0}),a.create=function(d){return createInstance(mergeConfig(s,d))},a}const axios=createInstance(defaults$1);axios.Axios=Axios$1;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel;axios.VERSION=VERSION$1;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function(i){return Promise.all(i)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=s=>formDataToJSON(utils.isHTMLForm(s)?new FormData(s):s);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const axios$1=axios;let activeWorkspaceId=0;function getActiveWorkspaceId(){return activeWorkspaceId}function setActiveWorkspaceId(s){activeWorkspaceId=s}function isAbsoluteUrl(s){return s?/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(s):!1}function errorStatusIs(s,i){var a;return axios$1.isAxiosError(s)&&((a=s.response)==null?void 0:a.status)==i}const queryClient=new QueryClient({defaultOptions:{queries:{staleTime:3e4,retry:(s,i)=>!errorStatusIs(i,401)&&!errorStatusIs(i,403)&&!errorStatusIs(i,404)&&s<2}}}),apiClient=axios$1.create();apiClient.defaults.withCredentials=!0;apiClient.defaults.responseType="json";apiClient.defaults.headers={common:{Accept:"application/json"}};const internalEndpoints=["auth","secure","log-viewer","horizon"];apiClient.interceptors.request.use(s=>{var c,d,g,b,$,j;!internalEndpoints.some(_=>{var _e;return(_e=s.url)==null?void 0:_e.startsWith(_)})&&!isAbsoluteUrl(s==null?void 0:s.url)&&(s.url=`api/v1/${s.url}`);const i=(c=s.method)==null?void 0:c.toUpperCase();i==="GET"&&Array.isArray((d=s.params)==null?void 0:d.with)&&(s.params.with=s.params.with.join(",")),i==="GET"&&Array.isArray((g=s.params)==null?void 0:g.load)&&(s.params.load=s.params.load.join(",")),i==="GET"&&Array.isArray((b=s.params)==null?void 0:b.loadCount)&&(s.params.loadCount=s.params.loadCount.join(","));const a=getActiveWorkspaceId();if(a){const _=($=s.method)==null?void 0:$.toLowerCase();["get","post","put"].includes(_)&&((j=s.params)==null?void 0:j.workspaceId)==null&&(s.params={...s.params,workspaceId:a})}return(i==="PUT"||i==="DELETE"||i==="PATCH")&&(s.headers={...s.headers,"X-HTTP-Method-Override":i},s.method="POST",s.params={...s.params,_method:i}),s});const SiteConfigContext=React.createContext(null);function message(s,i){return{...i,message:s}}const filePreviewSrc=""+new URL("file-preview-8afa3b5f.png",import.meta.url).href,driveSrc=""+new URL("drive-d7c1e515.png",import.meta.url).href,landingTopSrc=""+new URL("landing-top-e0e553bc.png",import.meta.url).href;function r$3(s){var i,a,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s))for(i=0;i{const{attr:a,size:c,title:d,className:g,color:b,style:$,children:j,viewBox:_,width:_e,height:et,...tt}=s;return jsxRuntimeExports.jsxs("svg",{"aria-hidden":!d,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:_||"0 0 24 24",...a,...tt,className:clsx("svg-icon",g,getSizeClassName$2(c)),style:{color:b,...$},ref:i,height:et||"1em",width:_e||"1em",children:[d&&jsxRuntimeExports.jsx("title",{children:d}),j]})});function getSizeClassName$2(s){switch(s){case"2xs":return"icon-2xs";case"xs":return"icon-xs";case"sm":return"icon-sm";case"md":return"icon-md";case"lg":return"icon-lg";case"xl":return"icon-xl";default:return s}}function createSvgIcon(s,i="",a){const c=(d,g)=>jsxRuntimeExports.jsx(SvgIcon,{"data-testid":`${i}Icon`,ref:g,viewBox:a,...d,size:d.size||"md",children:s});return React.memo(React.forwardRef(c))}function createSvgIconFromTree(s,i=""){const a=treeToElement(s);return createSvgIcon(a,i)}function treeToElement(s){return(s==null?void 0:s.map)&&s.map((i,a)=>React.createElement(i.tag,{key:a,...i.attr},treeToElement(i.child)))}function elementToTree(s){const i={},a={tag:s.tagName,attr:i};return Array.from(s.attributes).forEach(c=>{i[c.name]=c.value}),s.children.length&&(a.child=Array.from(s.children).map(c=>elementToTree(c))),a}const GroupAddIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm6 5H2v-.99C2.2 16.29 5.3 15 8 15s5.8 1.29 6 2v1zM12.51 4.05C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95zm4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17z"}),"GroupAddOutlined"),PeopleIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M9 13.75c-2.34 0-7 1.17-7 3.5V19h14v-1.75c0-2.33-4.66-3.5-7-3.5zM4.34 17c.84-.58 2.87-1.25 4.66-1.25s3.82.67 4.66 1.25H4.34zM9 12c1.93 0 3.5-1.57 3.5-3.5S10.93 5 9 5 5.5 6.57 5.5 8.5 7.07 12 9 12zm0-5c.83 0 1.5.67 1.5 1.5S9.83 10 9 10s-1.5-.67-1.5-1.5S8.17 7 9 7zm7.04 6.81c1.16.84 1.96 1.96 1.96 3.44V19h4v-1.75c0-2.02-3.5-3.17-5.96-3.44zM15 12c1.93 0 3.5-1.57 3.5-3.5S16.93 5 15 5c-.54 0-1.04.13-1.5.35.63.89 1 1.98 1 3.15s-.37 2.26-1 3.15c.46.22.96.35 1.5.35z"}),"PeopleOutlined"),FileDownloadDoneIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M20.13 5.41 18.72 4l-9.19 9.19-4.25-4.24-1.41 1.41 5.66 5.66zM5 18h14v2H5z"}),"FileDownloadDoneOutlined"),SvgImage=reactExports.memo(({src:s,className:i,height:a="h-full"})=>{const c=useSvgImageContent(s);return jsxRuntimeExports.jsx("div",{className:clsx("svg-image-container inline-block bg-no-repeat",a,i),dangerouslySetInnerHTML:c?{__html:c}:void 0})}),svgCache=new Map;function useSvgImageContent(s){const[i,a]=reactExports.useState(null);return reactExports.useEffect(()=>{const c=svgCache.get(s);if(c)typeof c=="string"?a(c):c.then(a);else{const d=fetchSvgImageContent(s);svgCache.set(s,d),d.then(g=>{svgCache.set(s,g),a(g)})}},[s]),i}function fetchSvgImageContent(s){return fetch(s).then(i=>i.text())}const MixedImage=reactExports.memo(({src:s,className:i,...a})=>{let c=null;if(s?typeof s=="object"?c="icon":s.endsWith(".svg")&&!isAbsoluteUrl(s)?c="svg":c="image":c=null,c==="svg")return jsxRuntimeExports.jsx(SvgImage,{...a,className:i,src:s,height:!1});if(c==="image")return jsxRuntimeExports.jsx("img",{...a,className:i,src:s,alt:""});if(c==="icon"){const d=s;return jsxRuntimeExports.jsx(d,{...a,className:i})}return null});function getButtonSizeStyle(s,{padding:i,equalWidth:a,variant:c}={}){switch(s){case"2xs":return c==="link"?"text-xs":`text-xs h-24 ${a?"w-24":i||"px-10"}`;case"xs":return c==="link"?"text-xs":`text-xs h-30 ${a?"w-30":i||"px-14"}`;case"sm":return c==="link"?"text-sm":`text-sm h-36 ${a?"w-36":i||"px-18"}`;case"md":return c==="link"?"text-base":`text-base h-42 ${a?"w-42":i||"px-22"}`;case"lg":return c==="link"?"text-lg":`text-base h-50 ${a?"w-50":i||"px-26"}`;case"xl":return c==="link"?"text-xl":`text-lg h-60 ${a?"w-60":i||"px-32"}`;default:return s||""}}function getSharedButtonStyle(s){const{variant:i,shadow:a,whitespace:c="whitespace-nowrap",display:d="inline-flex"}=s,g={...s,border:s.border||"border"};let b=[];return i==="outline"?b=outline(g):i==="text"?b=text(g):i==="flat"||i==="raised"?b=contained(g):i==="link"&&(b=link(g)),[...b,a||i==="raised"&&"shadow-md",c,d,i&&"align-middle flex-shrink-0 items-center transition-button duration-200","select-none appearance-none no-underline outline-none disabled:pointer-events-none disabled:cursor-default"]}function outline({color:s,border:i}){const a="disabled:text-disabled disabled:bg-transparent disabled:border-disabled-bg";switch(s){case"primary":return[`text-primary bg-transparent ${i} border-primary/50`,"hover:bg-primary/hover hover:border-primary",a];case"danger":return[`text-danger bg-transparent ${i} border-danger/50`,"hover:bg-danger/4 hover:border-danger",a];case"positive":return[`text-positive bg-transparent ${i} border-positive/50`,"hover:bg-positive/4 hover:border-positive",a];case"paper":return[`text bg-paper ${i}`,"hover:bg-hover",a];case"white":return["text-white bg-transparent border border-white","hover:bg-white/20","disabled:text-white/70 disabled:border-white/70 disabled:bg-transparent"];default:return[`bg-transparent ${i}`,"hover:bg-hover",a]}}function text({color:s}){const i="disabled:text-disabled disabled:bg-transparent";switch(s){case"primary":return["text-primary bg-transparent border-transparent","hover:bg-primary/4",i];case"danger":return["text-danger bg-transparent border-transparent","hover:bg-danger/4",i];case"positive":return["text-positive bg-transparent border-transparent","hover:bg-positive/4",i];case"white":return["text-white bg-transparent border-transparent","hover:bg-white/20","disabled:text-white/70 disabled:bg-transparent"];default:return["bg-transparent border-transparent","hover:bg-hover",i]}}function link({color:s}){switch(s){case"primary":return["text-primary","hover:underline","disabled:text-disabled"];case"danger":return["text-danger","hover:underline","disabled:text-disabled"];default:return["text-main","hover:underline","disabled:text-disabled"]}}function contained({color:s,border:i}){const a="disabled:text-disabled disabled:bg-disabled disabled:border-transparent disabled:shadow-none";switch(s){case"primary":return[`text-on-primary bg-primary ${i} border-primary`,"hover:bg-primary-dark hover:border-primary-dark",a];case"danger":return[`text-white bg-danger ${i} border-danger`,"hover:bg-danger/90 hover:border-danger/90",a];case"chip":return[`text-main bg-chip ${i} border-chip`,"hover:bg-chip/90 hover:border-chip/90",a];case"paper":return[`text-main bg-paper ${i} border-paper`,"hover:bg-paper/90 hover:border-paper/90",a];case"white":return[`text-black bg-white ${i} border-white`,"hover:bg-white/90",a];default:return[`bg ${i} border-background`,"hover:bg-hover",a]}}function createEventHandler(s){return s&&(i=>{i.currentTarget.contains(i.target)&&s(i)})}const ButtonBase=reactExports.forwardRef((s,i)=>{const{children:a,color:c=null,variant:d,radius:g,shadow:b,whitespace:$,justify:j="justify-center",className:_,href:_e,form:et,border:tt,elementType:rt,to:nt,state:at,relative:ut,replace:ot,end:st,display:it,type:ct="button",onClick:lt,onPointerDown:dt,onPointerUp:mt,onKeyDown:ht,...Rt}=s,Ct=rt||(_e?"a":"button"),Pt=Ct==="a";return jsxRuntimeExports.jsx(Ct,{ref:i,form:Pt?void 0:et,href:_e,to:nt,state:at,relative:ut,type:Pt?void 0:ct,replace:ot,end:st,onPointerDown:createEventHandler(dt),onPointerUp:createEventHandler(mt),onClick:createEventHandler(lt),onKeyDown:createEventHandler(ht),className:clsx("focus-visible:ring",getSharedButtonStyle({variant:d,color:c,border:tt,whitespace:$,display:it,shadow:b}),g,j,_),...Rt,children:a})}),Button=React.forwardRef(({children:s,startIcon:i,endIcon:a,size:c="sm",sizeClassName:d,className:g,equalWidth:b=!1,radius:$="rounded-button",variant:j="text",disabled:_,elementType:_e,to:et,replace:tt,href:rt,download:nt,...at},ut)=>{const ot=clsx("font-semibold",d||getButtonSizeStyle(c,{equalWidth:b,variant:j}),g);return jsxRuntimeExports.jsxs(ButtonBase,{className:ot,ref:ut,radius:$,variant:j,disabled:_,to:_?void 0:et,href:_?void 0:rt,download:_?void 0:nt,elementType:_?void 0:_e,replace:_?void 0:tt,...at,children:[i&&jsxRuntimeExports.jsx(InlineIcon,{position:"start",icon:i,size:c}),s,a&&jsxRuntimeExports.jsx(InlineIcon,{position:"end",icon:a,size:c})]})});function InlineIcon({icon:s,position:i,size:a}){const c=clsx("m-auto",{"-ml-4 mr-8":i==="start","-mr-4 ml-8":i==="end"},s.props.className);return React.cloneElement(s,{className:c,size:s.props.size??a})}function _check_private_redeclaration(s,i){if(i.has(s))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _class_private_field_init(s,i,a){_check_private_redeclaration(s,i),i.set(s,a)}function $2b4dce13dd5a17fa$export$842a2cf37af977e1(s,i){return s-i*Math.floor(s/i)}const $3b62074eb05584b2$var$EPOCH=1721426;function $3b62074eb05584b2$export$f297eb839006d339(s,i,a,c){i=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(s,i);let d=i-1,g=-2;return a<=2?g=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(i)&&(g=-1),$3b62074eb05584b2$var$EPOCH-1+365*d+Math.floor(d/4)-Math.floor(d/100)+Math.floor(d/400)+Math.floor((367*a-362)/12+g+c)}function $3b62074eb05584b2$export$553d7fa8e3805fc0(s){return s%4===0&&(s%100!==0||s%400===0)}function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(s,i){return s==="BC"?1-i:i}function $3b62074eb05584b2$export$4475b7e617eb123c(s){let i="AD";return s<=0&&(i="BC",s=1-s),[i,s]}const $3b62074eb05584b2$var$daysInMonth={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class $3b62074eb05584b2$export$80ee6245ec4f29ec{fromJulianDay(i){let a=i,c=a-$3b62074eb05584b2$var$EPOCH,d=Math.floor(c/146097),g=$2b4dce13dd5a17fa$export$842a2cf37af977e1(c,146097),b=Math.floor(g/36524),$=$2b4dce13dd5a17fa$export$842a2cf37af977e1(g,36524),j=Math.floor($/1461),_=$2b4dce13dd5a17fa$export$842a2cf37af977e1($,1461),_e=Math.floor(_/365),et=d*400+b*100+j*4+_e+(b!==4&&_e!==4?1:0),[tt,rt]=$3b62074eb05584b2$export$4475b7e617eb123c(et),nt=a-$3b62074eb05584b2$export$f297eb839006d339(tt,rt,1,1),at=2;a<$3b62074eb05584b2$export$f297eb839006d339(tt,rt,3,1)?at=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(rt)&&(at=1);let ut=Math.floor(((nt+at)*12+373)/367),ot=a-$3b62074eb05584b2$export$f297eb839006d339(tt,rt,ut,1)+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(tt,rt,ut,ot)}toJulianDay(i){return $3b62074eb05584b2$export$f297eb839006d339(i.era,i.year,i.month,i.day)}getDaysInMonth(i){return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(i.year)?"leapyear":"standard"][i.month-1]}getMonthsInYear(i){return 12}getDaysInYear(i){return $3b62074eb05584b2$export$553d7fa8e3805fc0(i.year)?366:365}getYearsInEra(i){return 9999}getEras(){return["BC","AD"]}isInverseEra(i){return i.era==="BC"}balanceDate(i){i.year<=0&&(i.era=i.era==="BC"?"AD":"BC",i.year=1-i.year)}constructor(){this.identifier="gregory"}}const $2fe286d2fb449abb$export$7a5acbd77d414bd9={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function $14e0f24ef4ac5c92$export$ea39ec197993aef0(s,i){return i=$11d87f3f76e88657$export$b4a036af3fc0b032(i,s.calendar),s.era===i.era&&s.year===i.year&&s.month===i.month&&s.day===i.day}function $14e0f24ef4ac5c92$export$a18c89cbd24170ff(s,i){return i=$11d87f3f76e88657$export$b4a036af3fc0b032(i,s.calendar),s=$14e0f24ef4ac5c92$export$a5a3b454ada2268e(s),i=$14e0f24ef4ac5c92$export$a5a3b454ada2268e(i),s.era===i.era&&s.year===i.year&&s.month===i.month}function $14e0f24ef4ac5c92$export$629b0a497aa65267(s,i){return $14e0f24ef4ac5c92$export$ea39ec197993aef0(s,$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(i))}function $14e0f24ef4ac5c92$export$2061056d06d7cdf7(s,i){let a=s.calendar.toJulianDay(s),c=Math.ceil(a+1-$14e0f24ef4ac5c92$var$getWeekStart(i))%7;return c<0&&(c+=7),c}function $14e0f24ef4ac5c92$export$461939dd4422153(s){return $11d87f3f76e88657$export$1b96692a1ba042ac(Date.now(),s)}function $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(s){return $11d87f3f76e88657$export$93522d1a439f3617($14e0f24ef4ac5c92$export$461939dd4422153(s))}function $14e0f24ef4ac5c92$export$68781ddf31c0090f(s,i){return s.calendar.toJulianDay(s)-i.calendar.toJulianDay(i)}function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(s,i){return $14e0f24ef4ac5c92$var$timeToMs(s)-$14e0f24ef4ac5c92$var$timeToMs(i)}function $14e0f24ef4ac5c92$var$timeToMs(s){return s.hour*36e5+s.minute*6e4+s.second*1e3+s.millisecond}let $14e0f24ef4ac5c92$var$localTimeZone=null;function $14e0f24ef4ac5c92$export$aa8b41735afcabd2(){return $14e0f24ef4ac5c92$var$localTimeZone==null&&($14e0f24ef4ac5c92$var$localTimeZone=new Intl.DateTimeFormat().resolvedOptions().timeZone),$14e0f24ef4ac5c92$var$localTimeZone}function $14e0f24ef4ac5c92$export$a5a3b454ada2268e(s){return s.subtract({days:s.day-1})}function $14e0f24ef4ac5c92$export$a2258d9c4118825c(s){return s.add({days:s.calendar.getDaysInMonth(s)-s.day})}function $14e0f24ef4ac5c92$export$f91e89d3d0406102(s){return $14e0f24ef4ac5c92$export$a5a3b454ada2268e(s.subtract({months:s.month-1}))}function $14e0f24ef4ac5c92$export$8b7aa55c66d5569e(s){return $14e0f24ef4ac5c92$export$a2258d9c4118825c(s.add({months:s.calendar.getMonthsInYear(s)-s.month}))}function $14e0f24ef4ac5c92$export$5412ac11713b72ad(s){return s.calendar.getMinimumMonthInYear?s.calendar.getMinimumMonthInYear(s):1}function $14e0f24ef4ac5c92$export$b2f4953d301981d5(s){return s.calendar.getMinimumDayInMonth?s.calendar.getMinimumDayInMonth(s):1}function $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(s,i){let a=$14e0f24ef4ac5c92$export$2061056d06d7cdf7(s,i);return s.subtract({days:a})}function $14e0f24ef4ac5c92$export$ef8b6d9133084f4e(s,i){return $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(s,i).add({days:6})}const $14e0f24ef4ac5c92$var$cachedRegions=new Map;function $14e0f24ef4ac5c92$var$getRegion(s){if(Intl.Locale){let a=$14e0f24ef4ac5c92$var$cachedRegions.get(s);return a||(a=new Intl.Locale(s).maximize().region,$14e0f24ef4ac5c92$var$cachedRegions.set(s,a)),a}let i=s.split("-")[1];return i==="u"?null:i}function $14e0f24ef4ac5c92$var$getWeekStart(s){let i=$14e0f24ef4ac5c92$var$getRegion(s);return $2fe286d2fb449abb$export$7a5acbd77d414bd9[i]||0}function $14e0f24ef4ac5c92$export$ccc1b2479e7dd654(s,i){let a=s.calendar.getDaysInMonth(s);return Math.ceil(($14e0f24ef4ac5c92$export$2061056d06d7cdf7($14e0f24ef4ac5c92$export$a5a3b454ada2268e(s),i)+a)/7)}function $14e0f24ef4ac5c92$export$5c333a116e949cdd(s,i){return s&&i?s.compare(i)<=0?s:i:s||i}function $14e0f24ef4ac5c92$export$a75f2bff57811055(s,i){return s&&i?s.compare(i)>=0?s:i:s||i}function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(s){s=$11d87f3f76e88657$export$b4a036af3fc0b032(s,new $3b62074eb05584b2$export$80ee6245ec4f29ec);let i=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(s.era,s.year);return $11d87f3f76e88657$var$epochFromParts(i,s.month,s.day,s.hour,s.minute,s.second,s.millisecond)}function $11d87f3f76e88657$var$epochFromParts(s,i,a,c,d,g,b){let $=new Date;return $.setUTCHours(c,d,g,b),$.setUTCFullYear(s,i-1,a),$.getTime()}function $11d87f3f76e88657$export$59c99f3515d3493f(s,i){if(i==="UTC")return 0;if(s>0&&i===$14e0f24ef4ac5c92$export$aa8b41735afcabd2())return new Date(s).getTimezoneOffset()*-6e4;let{year:a,month:c,day:d,hour:g,minute:b,second:$}=$11d87f3f76e88657$var$getTimeZoneParts(s,i);return $11d87f3f76e88657$var$epochFromParts(a,c,d,g,b,$,0)-Math.floor(s/1e3)*1e3}const $11d87f3f76e88657$var$formattersByTimeZone=new Map;function $11d87f3f76e88657$var$getTimeZoneParts(s,i){let a=$11d87f3f76e88657$var$formattersByTimeZone.get(i);a||(a=new Intl.DateTimeFormat("en-US",{timeZone:i,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),$11d87f3f76e88657$var$formattersByTimeZone.set(i,a));let c=a.formatToParts(new Date(s)),d={};for(let g of c)g.type!=="literal"&&(d[g.type]=g.value);return{year:d.era==="BC"||d.era==="B"?-d.year+1:+d.year,month:+d.month,day:+d.day,hour:d.hour==="24"?0:+d.hour,minute:+d.minute,second:+d.second}}const $11d87f3f76e88657$var$DAYMILLIS=864e5;function $11d87f3f76e88657$var$getValidWallTimes(s,i,a,c){return(a===c?[a]:[a,c]).filter(g=>$11d87f3f76e88657$var$isValidWallTime(s,i,g))}function $11d87f3f76e88657$var$isValidWallTime(s,i,a){let c=$11d87f3f76e88657$var$getTimeZoneParts(a,i);return s.year===c.year&&s.month===c.month&&s.day===c.day&&s.hour===c.hour&&s.minute===c.minute&&s.second===c.second}function $11d87f3f76e88657$export$5107c82f94518f5c(s,i,a="compatible"){let c=$11d87f3f76e88657$export$b21e0b124e224484(s);if(i==="UTC")return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(c);if(i===$14e0f24ef4ac5c92$export$aa8b41735afcabd2()&&a==="compatible"){c=$11d87f3f76e88657$export$b4a036af3fc0b032(c,new $3b62074eb05584b2$export$80ee6245ec4f29ec);let j=new Date,_=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(c.era,c.year);return j.setFullYear(_,c.month-1,c.day),j.setHours(c.hour,c.minute,c.second,c.millisecond),j.getTime()}let d=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(c),g=$11d87f3f76e88657$export$59c99f3515d3493f(d-$11d87f3f76e88657$var$DAYMILLIS,i),b=$11d87f3f76e88657$export$59c99f3515d3493f(d+$11d87f3f76e88657$var$DAYMILLIS,i),$=$11d87f3f76e88657$var$getValidWallTimes(c,i,d-g,d-b);if($.length===1)return $[0];if($.length>1)switch(a){case"compatible":case"earlier":return $[0];case"later":return $[$.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(a){case"earlier":return Math.min(d-g,d-b);case"compatible":case"later":return Math.max(d-g,d-b);case"reject":throw new RangeError("No such absolute time found")}}function $11d87f3f76e88657$export$e67a095c620b86fe(s,i,a="compatible"){return new Date($11d87f3f76e88657$export$5107c82f94518f5c(s,i,a))}function $11d87f3f76e88657$export$1b96692a1ba042ac(s,i){let a=$11d87f3f76e88657$export$59c99f3515d3493f(s,i),c=new Date(s+a),d=c.getUTCFullYear(),g=c.getUTCMonth()+1,b=c.getUTCDate(),$=c.getUTCHours(),j=c.getUTCMinutes(),_=c.getUTCSeconds(),_e=c.getUTCMilliseconds();return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(d,g,b,i,a,$,j,_,_e)}function $11d87f3f76e88657$export$93522d1a439f3617(s){return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(s.calendar,s.era,s.year,s.month,s.day)}function $11d87f3f76e88657$export$b21e0b124e224484(s,i){let a=0,c=0,d=0,g=0;if("timeZone"in s)({hour:a,minute:c,second:d,millisecond:g}=s);else if("hour"in s&&!i)return s;return i&&({hour:a,minute:c,second:d,millisecond:g}=i),new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(s.calendar,s.era,s.year,s.month,s.day,a,c,d,g)}function $11d87f3f76e88657$export$b4a036af3fc0b032(s,i){if(s.calendar.identifier===i.identifier)return s;let a=i.fromJulianDay(s.calendar.toJulianDay(s)),c=s.copy();return c.calendar=i,c.era=a.era,c.year=a.year,c.month=a.month,c.day=a.day,$735220c2d4774dd3$export$c4e2ecac49351ef2(c),c}function $11d87f3f76e88657$export$84c95a83c799e074(s,i,a){if(s instanceof $35ea8db9cb2ccb90$export$d3b7288e7994edea)return s.timeZone===i?s:$11d87f3f76e88657$export$538b00033cc11c75(s,i);let c=$11d87f3f76e88657$export$5107c82f94518f5c(s,i,a);return $11d87f3f76e88657$export$1b96692a1ba042ac(c,i)}function $11d87f3f76e88657$export$83aac07b4c37b25(s){let i=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(s)-s.offset;return new Date(i)}function $11d87f3f76e88657$export$538b00033cc11c75(s,i){let a=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(s)-s.offset;return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(a,i),s.calendar)}const $735220c2d4774dd3$var$ONE_HOUR=36e5;function $735220c2d4774dd3$export$e16d8520af44a096(s,i){let a=s.copy(),c="hour"in a?$735220c2d4774dd3$var$addTimeFields(a,i):0;$735220c2d4774dd3$var$addYears(a,i.years||0),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,s),a.month+=i.months||0,$735220c2d4774dd3$var$balanceYearMonth(a),$735220c2d4774dd3$var$constrainMonthDay(a),a.day+=(i.weeks||0)*7,a.day+=i.days||0,a.day+=c,$735220c2d4774dd3$var$balanceDay(a),a.calendar.balanceDate&&a.calendar.balanceDate(a),a.year<1&&(a.year=1,a.month=1,a.day=1);let d=a.calendar.getYearsInEra(a);if(a.year>d){var g,b;let j=(b=(g=a.calendar).isInverseEra)===null||b===void 0?void 0:b.call(g,a);a.year=d,a.month=j?1:a.calendar.getMonthsInYear(a),a.day=j?1:a.calendar.getDaysInMonth(a)}a.month<1&&(a.month=1,a.day=1);let $=a.calendar.getMonthsInYear(a);return a.month>$&&(a.month=$,a.day=a.calendar.getDaysInMonth(a)),a.day=Math.max(1,Math.min(a.calendar.getDaysInMonth(a),a.day)),a}function $735220c2d4774dd3$var$addYears(s,i){var a,c;!((c=(a=s.calendar).isInverseEra)===null||c===void 0)&&c.call(a,s)&&(i=-i),s.year+=i}function $735220c2d4774dd3$var$balanceYearMonth(s){for(;s.month<1;)$735220c2d4774dd3$var$addYears(s,-1),s.month+=s.calendar.getMonthsInYear(s);let i=0;for(;s.month>(i=s.calendar.getMonthsInYear(s));)s.month-=i,$735220c2d4774dd3$var$addYears(s,1)}function $735220c2d4774dd3$var$balanceDay(s){for(;s.day<1;)s.month--,$735220c2d4774dd3$var$balanceYearMonth(s),s.day+=s.calendar.getDaysInMonth(s);for(;s.day>s.calendar.getDaysInMonth(s);)s.day-=s.calendar.getDaysInMonth(s),s.month++,$735220c2d4774dd3$var$balanceYearMonth(s)}function $735220c2d4774dd3$var$constrainMonthDay(s){s.month=Math.max(1,Math.min(s.calendar.getMonthsInYear(s),s.month)),s.day=Math.max(1,Math.min(s.calendar.getDaysInMonth(s),s.day))}function $735220c2d4774dd3$export$c4e2ecac49351ef2(s){s.calendar.constrainDate&&s.calendar.constrainDate(s),s.year=Math.max(1,Math.min(s.calendar.getYearsInEra(s),s.year)),$735220c2d4774dd3$var$constrainMonthDay(s)}function $735220c2d4774dd3$export$3e2544e88a25bff8(s){let i={};for(let a in s)typeof s[a]=="number"&&(i[a]=-s[a]);return i}function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(s,i){return $735220c2d4774dd3$export$e16d8520af44a096(s,$735220c2d4774dd3$export$3e2544e88a25bff8(i))}function $735220c2d4774dd3$export$adaa4cf7ef1b65be(s,i){let a=s.copy();return i.era!=null&&(a.era=i.era),i.year!=null&&(a.year=i.year),i.month!=null&&(a.month=i.month),i.day!=null&&(a.day=i.day),$735220c2d4774dd3$export$c4e2ecac49351ef2(a),a}function $735220c2d4774dd3$export$e5d5e1c1822b6e56(s,i){let a=s.copy();return i.hour!=null&&(a.hour=i.hour),i.minute!=null&&(a.minute=i.minute),i.second!=null&&(a.second=i.second),i.millisecond!=null&&(a.millisecond=i.millisecond),$735220c2d4774dd3$export$7555de1e070510cb(a),a}function $735220c2d4774dd3$var$balanceTime(s){s.second+=Math.floor(s.millisecond/1e3),s.millisecond=$735220c2d4774dd3$var$nonNegativeMod(s.millisecond,1e3),s.minute+=Math.floor(s.second/60),s.second=$735220c2d4774dd3$var$nonNegativeMod(s.second,60),s.hour+=Math.floor(s.minute/60),s.minute=$735220c2d4774dd3$var$nonNegativeMod(s.minute,60);let i=Math.floor(s.hour/24);return s.hour=$735220c2d4774dd3$var$nonNegativeMod(s.hour,24),i}function $735220c2d4774dd3$export$7555de1e070510cb(s){s.millisecond=Math.max(0,Math.min(s.millisecond,1e3)),s.second=Math.max(0,Math.min(s.second,59)),s.minute=Math.max(0,Math.min(s.minute,59)),s.hour=Math.max(0,Math.min(s.hour,23))}function $735220c2d4774dd3$var$nonNegativeMod(s,i){let a=s%i;return a<0&&(a+=i),a}function $735220c2d4774dd3$var$addTimeFields(s,i){return s.hour+=i.hours||0,s.minute+=i.minutes||0,s.second+=i.seconds||0,s.millisecond+=i.milliseconds||0,$735220c2d4774dd3$var$balanceTime(s)}function $735220c2d4774dd3$export$d52ced6badfb9a4c(s,i,a,c){let d=s.copy();switch(i){case"era":{let $=s.calendar.getEras(),j=$.indexOf(s.era);if(j<0)throw new Error("Invalid era: "+s.era);j=$735220c2d4774dd3$var$cycleValue(j,a,0,$.length-1,c==null?void 0:c.round),d.era=$[j],$735220c2d4774dd3$export$c4e2ecac49351ef2(d);break}case"year":var g,b;!((b=(g=d.calendar).isInverseEra)===null||b===void 0)&&b.call(g,d)&&(a=-a),d.year=$735220c2d4774dd3$var$cycleValue(s.year,a,-1/0,9999,c==null?void 0:c.round),d.year===-1/0&&(d.year=1),d.calendar.balanceYearMonth&&d.calendar.balanceYearMonth(d,s);break;case"month":d.month=$735220c2d4774dd3$var$cycleValue(s.month,a,1,s.calendar.getMonthsInYear(s),c==null?void 0:c.round);break;case"day":d.day=$735220c2d4774dd3$var$cycleValue(s.day,a,1,s.calendar.getDaysInMonth(s),c==null?void 0:c.round);break;default:throw new Error("Unsupported field "+i)}return s.calendar.balanceDate&&s.calendar.balanceDate(d),$735220c2d4774dd3$export$c4e2ecac49351ef2(d),d}function $735220c2d4774dd3$export$dd02b3e0007dfe28(s,i,a,c){let d=s.copy();switch(i){case"hour":{let g=s.hour,b=0,$=23;if((c==null?void 0:c.hourCycle)===12){let j=g>=12;b=j?12:0,$=j?23:11}d.hour=$735220c2d4774dd3$var$cycleValue(g,a,b,$,c==null?void 0:c.round);break}case"minute":d.minute=$735220c2d4774dd3$var$cycleValue(s.minute,a,0,59,c==null?void 0:c.round);break;case"second":d.second=$735220c2d4774dd3$var$cycleValue(s.second,a,0,59,c==null?void 0:c.round);break;case"millisecond":d.millisecond=$735220c2d4774dd3$var$cycleValue(s.millisecond,a,0,999,c==null?void 0:c.round);break;default:throw new Error("Unsupported field "+i)}return d}function $735220c2d4774dd3$var$cycleValue(s,i,a,c,d=!1){if(d){s+=Math.sign(i),s0?s=Math.ceil(s/g)*g:s=Math.floor(s/g)*g,s>c&&(s=a)}else s+=i,sc&&(s=a+(s-c-1));return s}function $735220c2d4774dd3$export$96b1d28349274637(s,i){let a;if(i.years!=null&&i.years!==0||i.months!=null&&i.months!==0||i.weeks!=null&&i.weeks!==0||i.days!=null&&i.days!==0){let d=$735220c2d4774dd3$export$e16d8520af44a096($11d87f3f76e88657$export$b21e0b124e224484(s),{years:i.years,months:i.months,weeks:i.weeks,days:i.days});a=$11d87f3f76e88657$export$5107c82f94518f5c(d,s.timeZone)}else a=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(s)-s.offset;a+=i.milliseconds||0,a+=(i.seconds||0)*1e3,a+=(i.minutes||0)*6e4,a+=(i.hours||0)*36e5;let c=$11d87f3f76e88657$export$1b96692a1ba042ac(a,s.timeZone);return $11d87f3f76e88657$export$b4a036af3fc0b032(c,s.calendar)}function $735220c2d4774dd3$export$6814caac34ca03c7(s,i){return $735220c2d4774dd3$export$96b1d28349274637(s,$735220c2d4774dd3$export$3e2544e88a25bff8(i))}function $735220c2d4774dd3$export$9a297d111fc86b79(s,i,a,c){switch(i){case"hour":{let d=0,g=23;if((c==null?void 0:c.hourCycle)===12){let nt=s.hour>=12;d=nt?12:0,g=nt?23:11}let b=$11d87f3f76e88657$export$b21e0b124e224484(s),$=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(b,{hour:d}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),j=[$11d87f3f76e88657$export$5107c82f94518f5c($,s.timeZone,"earlier"),$11d87f3f76e88657$export$5107c82f94518f5c($,s.timeZone,"later")].filter(nt=>$11d87f3f76e88657$export$1b96692a1ba042ac(nt,s.timeZone).day===$.day)[0],_=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(b,{hour:g}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),_e=[$11d87f3f76e88657$export$5107c82f94518f5c(_,s.timeZone,"earlier"),$11d87f3f76e88657$export$5107c82f94518f5c(_,s.timeZone,"later")].filter(nt=>$11d87f3f76e88657$export$1b96692a1ba042ac(nt,s.timeZone).day===_.day).pop(),et=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(s)-s.offset,tt=Math.floor(et/$735220c2d4774dd3$var$ONE_HOUR),rt=et%$735220c2d4774dd3$var$ONE_HOUR;return et=$735220c2d4774dd3$var$cycleValue(tt,a,Math.floor(j/$735220c2d4774dd3$var$ONE_HOUR),Math.floor(_e/$735220c2d4774dd3$var$ONE_HOUR),c==null?void 0:c.round)*$735220c2d4774dd3$var$ONE_HOUR+rt,$11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(et,s.timeZone),s.calendar)}case"minute":case"second":case"millisecond":return $735220c2d4774dd3$export$dd02b3e0007dfe28(s,i,a,c);case"era":case"year":case"month":case"day":{let d=$735220c2d4774dd3$export$d52ced6badfb9a4c($11d87f3f76e88657$export$b21e0b124e224484(s),i,a,c),g=$11d87f3f76e88657$export$5107c82f94518f5c(d,s.timeZone);return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(g,s.timeZone),s.calendar)}default:throw new Error("Unsupported field "+i)}}function $735220c2d4774dd3$export$31b5430eb18be4f8(s,i,a){let c=$11d87f3f76e88657$export$b21e0b124e224484(s),d=$735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(c,i),i);if(d.compare(c)===0)return s;let g=$11d87f3f76e88657$export$5107c82f94518f5c(d,s.timeZone,a);return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(g,s.timeZone),s.calendar)}const $fae977aafc393c5c$var$ABSOLUTE_RE=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function $fae977aafc393c5c$export$5adfdab05168c219(s,i){let a=s.match($fae977aafc393c5c$var$ABSOLUTE_RE);if(!a)throw new Error("Invalid ISO 8601 date time string: "+s);let c=new $35ea8db9cb2ccb90$export$d3b7288e7994edea($fae977aafc393c5c$var$parseNumber(a[1],1,9999),$fae977aafc393c5c$var$parseNumber(a[2],1,12),1,i,0,a[4]?$fae977aafc393c5c$var$parseNumber(a[4],0,23):0,a[5]?$fae977aafc393c5c$var$parseNumber(a[5],0,59):0,a[6]?$fae977aafc393c5c$var$parseNumber(a[6],0,59):0,a[7]?$fae977aafc393c5c$var$parseNumber(a[7],0,1/0)*1e3:0);c.day=$fae977aafc393c5c$var$parseNumber(a[3],0,c.calendar.getDaysInMonth(c));var d;return a[8]&&(c.offset=$fae977aafc393c5c$var$parseNumber(a[8],-23,23)*36e5+$fae977aafc393c5c$var$parseNumber((d=a[9])!==null&&d!==void 0?d:"0",0,59)*6e4),$11d87f3f76e88657$export$538b00033cc11c75(c,i)}function $fae977aafc393c5c$export$8e384432362ed0f0(s){return $fae977aafc393c5c$export$5adfdab05168c219(s,$14e0f24ef4ac5c92$export$aa8b41735afcabd2())}function $fae977aafc393c5c$var$parseNumber(s,i,a){let c=Number(s);if(ca)throw new RangeError(`Value out of range: ${i} <= ${c} <= ${a}`);return c}function $fae977aafc393c5c$export$f59dee82248f5ad4(s){return`${String(s.hour).padStart(2,"0")}:${String(s.minute).padStart(2,"0")}:${String(s.second).padStart(2,"0")}${s.millisecond?String(s.millisecond/1e3).slice(1):""}`}function $fae977aafc393c5c$export$60dfd74aa96791bd(s){let i=$11d87f3f76e88657$export$b4a036af3fc0b032(s,new $3b62074eb05584b2$export$80ee6245ec4f29ec);return`${String(i.year).padStart(4,"0")}-${String(i.month).padStart(2,"0")}-${String(i.day).padStart(2,"0")}`}function $fae977aafc393c5c$export$4223de14708adc63(s){return`${$fae977aafc393c5c$export$60dfd74aa96791bd(s)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(s)}`}function $fae977aafc393c5c$var$offsetToString(s){let i=Math.sign(s)<0?"-":"+";s=Math.abs(s);let a=Math.floor(s/36e5),c=s%36e5/6e4;return`${i}${String(a).padStart(2,"0")}:${String(c).padStart(2,"0")}`}function $fae977aafc393c5c$export$bf79f1ebf4b18792(s){return`${$fae977aafc393c5c$export$4223de14708adc63(s)}${$fae977aafc393c5c$var$offsetToString(s.offset)}[${s.timeZone}]`}function $35ea8db9cb2ccb90$var$shiftArgs(s){let i=typeof s[0]=="object"?s.shift():new $3b62074eb05584b2$export$80ee6245ec4f29ec,a;if(typeof s[0]=="string")a=s.shift();else{let b=i.getEras();a=b[b.length-1]}let c=s.shift(),d=s.shift(),g=s.shift();return[i,a,c,d,g]}var $35ea8db9cb2ccb90$var$_type=new WeakMap;class $35ea8db9cb2ccb90$export$99faa760c7908e4f{copy(){return this.era?new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar,this.era,this.year,this.month,this.day):new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar,this.year,this.month,this.day)}add(i){return $735220c2d4774dd3$export$e16d8520af44a096(this,i)}subtract(i){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,i)}set(i){return $735220c2d4774dd3$export$adaa4cf7ef1b65be(this,i)}cycle(i,a,c){return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,i,a,c)}toDate(i){return $11d87f3f76e88657$export$e67a095c620b86fe(this,i)}toString(){return $fae977aafc393c5c$export$60dfd74aa96791bd(this)}compare(i){return $14e0f24ef4ac5c92$export$68781ddf31c0090f(this,i)}constructor(...i){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type,{writable:!0,value:void 0});let[a,c,d,g,b]=$35ea8db9cb2ccb90$var$shiftArgs(i);this.calendar=a,this.era=c,this.year=d,this.month=g,this.day=b,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}}var $35ea8db9cb2ccb90$var$_type2=new WeakMap;class $35ea8db9cb2ccb90$export$ca871e8dbb80966f{copy(){return this.era?new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(i){return $735220c2d4774dd3$export$e16d8520af44a096(this,i)}subtract(i){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,i)}set(i){return $735220c2d4774dd3$export$adaa4cf7ef1b65be($735220c2d4774dd3$export$e5d5e1c1822b6e56(this,i),i)}cycle(i,a,c){switch(i){case"era":case"year":case"month":case"day":return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,i,a,c);default:return $735220c2d4774dd3$export$dd02b3e0007dfe28(this,i,a,c)}}toDate(i,a){return $11d87f3f76e88657$export$e67a095c620b86fe(this,i,a)}toString(){return $fae977aafc393c5c$export$4223de14708adc63(this)}compare(i){let a=$14e0f24ef4ac5c92$export$68781ddf31c0090f(this,i);return a===0?$14e0f24ef4ac5c92$export$c19a80a9721b80f6(this,$11d87f3f76e88657$export$b21e0b124e224484(i)):a}constructor(...i){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type2,{writable:!0,value:void 0});let[a,c,d,g,b]=$35ea8db9cb2ccb90$var$shiftArgs(i);this.calendar=a,this.era=c,this.year=d,this.month=g,this.day=b,this.hour=i.shift()||0,this.minute=i.shift()||0,this.second=i.shift()||0,this.millisecond=i.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}}var $35ea8db9cb2ccb90$var$_type3=new WeakMap;class $35ea8db9cb2ccb90$export$d3b7288e7994edea{copy(){return this.era?new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(i){return $735220c2d4774dd3$export$96b1d28349274637(this,i)}subtract(i){return $735220c2d4774dd3$export$6814caac34ca03c7(this,i)}set(i,a){return $735220c2d4774dd3$export$31b5430eb18be4f8(this,i,a)}cycle(i,a,c){return $735220c2d4774dd3$export$9a297d111fc86b79(this,i,a,c)}toDate(){return $11d87f3f76e88657$export$83aac07b4c37b25(this)}toString(){return $fae977aafc393c5c$export$bf79f1ebf4b18792(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(i){return this.toDate().getTime()-$11d87f3f76e88657$export$84c95a83c799e074(i,this.timeZone).toDate().getTime()}constructor(...i){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type3,{writable:!0,value:void 0});let[a,c,d,g,b]=$35ea8db9cb2ccb90$var$shiftArgs(i),$=i.shift(),j=i.shift();this.calendar=a,this.era=c,this.year=d,this.month=g,this.day=b,this.timeZone=$,this.offset=j,this.hour=i.shift()||0,this.minute=i.shift()||0,this.second=i.shift()||0,this.millisecond=i.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}}let $fb18d541ea1ad717$var$formatterCache=new Map;class $fb18d541ea1ad717$export$ad991b66133851cf{format(i){return this.formatter.format(i)}formatToParts(i){return this.formatter.formatToParts(i)}formatRange(i,a){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(i,a);if(a= start date");return`${this.formatter.format(i)} – ${this.formatter.format(a)}`}formatRangeToParts(i,a){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(i,a);if(a= start date");let c=this.formatter.formatToParts(i),d=this.formatter.formatToParts(a);return[...c.map(g=>({...g,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...d.map(g=>({...g,source:"endRange"}))]}resolvedOptions(){let i=this.formatter.resolvedOptions();return $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle()&&(this.resolvedHourCycle||(this.resolvedHourCycle=$fb18d541ea1ad717$var$getResolvedHourCycle(i.locale,this.options)),i.hourCycle=this.resolvedHourCycle,i.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),i.calendar==="ethiopic-amete-alem"&&(i.calendar="ethioaa"),i}constructor(i,a={}){this.formatter=$fb18d541ea1ad717$var$getCachedDateFormatter(i,a),this.options=a}}const $fb18d541ea1ad717$var$hour12Preferences={true:{ja:"h11"},false:{}};function $fb18d541ea1ad717$var$getCachedDateFormatter(s,i={}){if(typeof i.hour12=="boolean"&&$fb18d541ea1ad717$var$hasBuggyHour12Behavior()){i={...i};let d=$fb18d541ea1ad717$var$hour12Preferences[String(i.hour12)][s.split("-")[0]],g=i.hour12?"h12":"h23";i.hourCycle=d??g,delete i.hour12}let a=s+(i?Object.entries(i).sort((d,g)=>d[0]g.type==="hour").value,10),d=parseInt(a.formatToParts(new Date(2020,2,3,23)).find(g=>g.type==="hour").value,10);if(c===0&&d===23)return"h23";if(c===24&&d===23)return"h24";if(c===0&&d===11)return"h11";if(c===12&&d===11)return"h12";throw new Error("Unexpected hour cycle result")}function shallowEqual(s,i){if(s===i)return!0;if(!s||!i)return!1;const a=Object.keys(s),c=Object.keys(i),d=a.length;if(c.length!==d)return!1;for(let g=0;g{let i;const a=new Set,c=(j,_)=>{const _e=typeof j=="function"?j(i):j;if(!Object.is(_e,i)){const et=i;i=_??typeof _e!="object"?_e:Object.assign({},i,_e),a.forEach(tt=>tt(i,et))}},d=()=>i,$={setState:c,getState:d,subscribe:j=>(a.add(j),()=>a.delete(j)),destroy:()=>{a.clear()}};return i=s(c,d,$),$},createStore=s=>s?createStoreImpl(s):createStoreImpl;var withSelector={exports:{}},withSelector_production_min={},shim={exports:{}},useSyncExternalStoreShim_production_min={};/** * @license React * use-sync-external-store-shim.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 e=reactExports;function h$1(s,i){return s===i&&(s!==0||1/s===1/i)||s!==s&&i!==i}var k=typeof Object.is=="function"?Object.is:h$1,l=e.useState,m=e.useEffect,n$1=e.useLayoutEffect,p$1=e.useDebugValue;function q$1(s,i){var a=i(),c=l({inst:{value:a,getSnapshot:i}}),d=c[0].inst,g=c[1];return n$1(function(){d.value=a,d.getSnapshot=i,r$2(d)&&g({inst:d})},[s,a,i]),m(function(){return r$2(d)&&g({inst:d}),s(function(){r$2(d)&&g({inst:d})})},[s]),p$1(a),a}function r$2(s){var i=s.getSnapshot;s=s.value;try{var a=i();return!k(s,a)}catch{return!0}}function t$1(s,i){return i()}var u$1=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?t$1:q$1;useSyncExternalStoreShim_production_min.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u$1;shim.exports=useSyncExternalStoreShim_production_min;var shimExports=shim.exports;/** * @license React * use-sync-external-store-shim/with-selector.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 h=reactExports,n=shimExports;function p(s,i){return s===i&&(s!==0||1/s===1/i)||s!==s&&i!==i}var q=typeof Object.is=="function"?Object.is:p,r$1=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;withSelector_production_min.useSyncExternalStoreWithSelector=function(s,i,a,c,d){var g=t(null);if(g.current===null){var b={hasValue:!1,value:null};g.current=b}else b=g.current;g=v(function(){function j(rt){if(!_){if(_=!0,_e=rt,rt=c(rt),d!==void 0&&b.hasValue){var nt=b.value;if(d(nt,rt))return et=nt}return et=rt}if(nt=et,q(_e,rt))return nt;var at=c(rt);return d!==void 0&&d(nt,at)?nt:(_e=rt,et=at)}var _=!1,_e,et,tt=a===void 0?null:a;return[function(){return j(i())},tt===null?void 0:function(){return j(tt())}]},[i,a,c,d]);var $=r$1(s,g[0],g[1]);return u(function(){b.hasValue=!0,b.value=$},[$]),w($),$};withSelector.exports=withSelector_production_min;var withSelectorExports=withSelector.exports;const useSyncExternalStoreExports=getDefaultExportFromCjs(withSelectorExports),{useDebugValue:useDebugValue$1}=React,{useSyncExternalStoreWithSelector:useSyncExternalStoreWithSelector$1}=useSyncExternalStoreExports;let didWarnAboutEqualityFn=!1;function useStore(s,i=s.getState,a){const c=useSyncExternalStoreWithSelector$1(s.subscribe,s.getState,s.getServerState||s.getState,i,a);return useDebugValue$1(c),c}const createImpl=s=>{const i=typeof s=="function"?createStore(s):s,a=(c,d)=>useStore(i,c,d);return Object.assign(a,i),a},create=s=>s?createImpl(s):createImpl,useBootstrapDataStore=create()(s=>({data:typeof window<"u"&&window.bootstrapData?decodeBootstrapData(window.bootstrapData):null,setData:i=>{const a=typeof i=="string"?decodeBootstrapData(i):i;s({data:a})},mergeData:i=>{s(a=>({data:{...a.data,...i}}))}})),getBootstrapData=()=>useBootstrapDataStore.getState().data,setBootstrapData=useBootstrapDataStore.getState().setData,mergeBootstrapData=useBootstrapDataStore.getState().mergeData;function decodeBootstrapData(s){return typeof s=="string"?JSON.parse(s):s}function useSelectedLocale(){var i,a;const s=useBootstrapDataStore(c=>c.data);return{locale:s==null?void 0:s.i18n,localeCode:((i=s==null?void 0:s.i18n)==null?void 0:i.language)||"en",lines:(a=s==null?void 0:s.i18n)==null?void 0:a.lines}}function useUserTimezone(){const{user:s,settings:i}=useBootstrapDataStore(d=>d.data),a=i.dates.default_timezone,c=(s==null?void 0:s.timezone)||a||"auto";return reactExports.useMemo(()=>!c||c==="auto"?$14e0f24ef4ac5c92$export$aa8b41735afcabd2():c,[c])}var nanoMemoize={exports:{}};(function(s){(function(){var i=Object.assign;typeof i!="function"&&(i=function(){var d=arguments,g=arguments[0];if(g==null)throw new TypeError("Cannot convert undefined or null to object");g=Object(g);for(var b=1;b=0&&(b=0)}function c(d,g){g||(g={});var b=g.vargs||a(d),$=Object.create(null),j=[],_=[],_e,et=new WeakMap,tt=function(it,ct,lt){return setTimeout(function(){if(lt){ct.splice(it,1),lt.splice(it,1);return}ct instanceof WeakMap?ct.delete(it):delete ct[it]},g.maxAge)},rt=g.maxAge>0&&g.maxAge<1/0?tt:0,nt=g.equals?g.equals:function(it,ct){return it===ct},at=g.maxArgs,ut=g.serializer,ot,st;return d.length===1&&!g.equals&&!b?(ot=(function(it){var ct=typeof it;if(!ut&&(ct==="object"&&it||ct==="function")){var lt;return et.get(it)||(!rt||rt(it,et),et.set(it,lt=d.call(this,it)),lt)}var dt=ct==="number"||ct==="boolean"||it==null?it:ct==="string"?JSON.stringify(it):ut(it);return $[dt]||(!rt||rt(dt,$),$[dt]=d.call(this,it))}).bind(this),st=1):ot=(function(){var it=arguments.length;if(!it&&_e!=null)return _[_e];var ct=at||it,lt;for(lt=j.length-1;lt>=0;lt--)if(!(!at&&j[lt].length!==ct)){for(var dt=ct-1;dt>=0&&nt(j[lt][dt],arguments[dt]);dt--)if(dt===0)return _[lt]}return lt=j.length-(lt+1),!it&&_e==null&&(_e=lt),!rt||rt(lt,_,j),_[lt]=d.apply(this,j[lt]=arguments)}).bind(this),ot.clear=function(){et=new WeakMap,$=Object.create(null),j=[],_=[],_e=void 0},ot.keys=function(){return st?null:j.slice()},ot.values=function(){return st?null:_.slice()},ot.keyValues=function(){return st?{primitives:i({},$),objects:et}:null},ot}s.exports=c,typeof window<"u"&&(window.nanomemoize=c)}).call(commonjsGlobal)})(nanoMemoize);var nanoMemoizeExports=nanoMemoize.exports;const memoize=getDefaultExportFromCjs(nanoMemoizeExports);function handlePluralMessage(s,{message:i,values:a}){const c=i.match(/\[(.+?)]/),d=a==null?void 0:a.count;if(c&&c[1]&&!Number.isNaN(d)){const[g,b]=c,$=b.split("|");if(!$.length)return i;const _=getRules(s).select(d);let _e=$.find(tt=>tt.startsWith(_));_e||(_e=$[0]);const et=_e.substring(_e.indexOf(" ")+1);return i.replace(g,et)}return i}const getRules=memoize(s=>new Intl.PluralRules(s));function hasOwn(s,i){return s==null?!1:Object.hasOwn!==void 0?Object.hasOwn(s,i):Object.hasOwnProperty(i)}const Trans=reactExports.memo(s=>{const{message:i,values:a}=s,{lines:c,localeCode:d}=useSelectedLocale();let g;if(hasOwn(c,i)?g=c==null?void 0:c[i]:hasOwn(c,i==null?void 0:i.toLowerCase())?g=c==null?void 0:c[i==null?void 0:i.toLowerCase()]:g=i,!a||!g)return jsxRuntimeExports.jsx(reactExports.Fragment,{children:g});g=handlePluralMessage(d,{message:g,values:a});const b=[],$=[];if(Object.entries(a).forEach(([j,_])=>{typeof _=="function"?$.push(j):reactExports.isValidElement(_)?b.push(j):_!=null&&(g=g==null?void 0:g.replace(`:${j}`,`${_}`))}),$.length||b.length){const j=[];if($.length){const tt=$.join("");j.push(`(<[${tt}]>.+?<\\/[${tt}]>)`)}if(b.length){const tt=b.join("|");j.push(`(:(?:${tt}))`)}const _=new RegExp(j.join("|"),"gm"),et=g.split(_).filter(Boolean).map((tt,rt)=>{if(tt.startsWith("<")&&tt.endsWith(">")){const nt=tt.match(/<([a-z]+)>(.+?)<\/([a-z]+)>/);if(nt){const[,at,ut]=nt,ot=a==null?void 0:a[at];if(typeof ot=="function"){const st=ot(ut);return reactExports.cloneElement(st,{key:rt})}}}if(tt.startsWith(":")){const nt=tt.replace(":",""),at=a==null?void 0:a[nt];if(reactExports.isValidElement(at))return reactExports.cloneElement(at,{key:rt})}return tt});return jsxRuntimeExports.jsx(reactExports.Fragment,{children:et})}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:g})},areEqual);function areEqual(s,i){const{values:a,...c}=s,{values:d,...g}=i;return shallowEqual(d,a)&&shallowEqual(c,g)}const DIVISIONS=[{amount:60,name:"seconds"},{amount:60,name:"minutes"},{amount:24,name:"hours"},{amount:7,name:"days"},{amount:4.34524,name:"weeks"},{amount:12,name:"months"},{amount:Number.POSITIVE_INFINITY,name:"years"}],FormattedRelativeTime=reactExports.memo(({date:s,style:i})=>{const{localeCode:a}=useSelectedLocale(),c=useUserTimezone(),d=reactExports.useMemo(()=>new Intl.RelativeTimeFormat(a,{numeric:"auto",style:i}),[a,i]);if(!s)return null;try{typeof s=="string"?s=$fae977aafc393c5c$export$8e384432362ed0f0(s).toDate():"toDate"in s&&(s=s.toDate(c))}catch{return null}let g=(s.getTime()-Date.now())/1e3;for(let b=0;b<=DIVISIONS.length;b++){const $=DIVISIONS[b];if(Math.abs(g)<$.amount)return $.name==="seconds"?jsxRuntimeExports.jsx(Trans,{message:"a few seconds ago"}):jsxRuntimeExports.jsx(reactExports.Fragment,{children:d.format(Math.round(g),$.name)});g/=$.amount}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:d.format(Math.round(g),"day")})},shallowEqual);function Line({notification:s,line:i,index:a,iconRenderer:c}){var $,j;const d=i.type==="primary"||a===0,g=c||DefaultIconRenderer,b=i.action?"a":"div";return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(b,{className:clsx("flex items-center gap-8",i.action&&"hover:underline",d?"mnarktext-main whitespace-nowrap text-sm":"mt-6 text-xs text-muted"),href:($=i.action)==null?void 0:$.action,title:(j=i.action)==null?void 0:j.label,children:[i.icon&&jsxRuntimeExports.jsx(g,{icon:i.icon}),jsxRuntimeExports.jsx("div",{className:"overflow-hidden text-ellipsis",dangerouslySetInnerHTML:{__html:i.content}})]},a),a===0&&jsxRuntimeExports.jsx("time",{className:"text-xs text-muted",children:jsxRuntimeExports.jsx(FormattedRelativeTime,{date:s.created_at})})]})}function DefaultIconRenderer({icon:s}){return jsxRuntimeExports.jsx(MixedImage,{src:s})}const Endpoint="notifications";function useUserNotifications(s){return useQuery({queryKey:useUserNotifications.key,queryFn:()=>fetchUserNotifications(s)})}function fetchUserNotifications(s){return apiClient.get(Endpoint,{params:s}).then(i=>i.data)}useUserNotifications.key=[Endpoint];var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state");function die(s,...i){throw new Error(`[Immer] minified error nr: ${s}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(s){return!!s&&!!s[DRAFT_STATE]}function isDraftable(s){var i;return s?isPlainObject$2(s)||Array.isArray(s)||!!s[DRAFTABLE]||!!((i=s.constructor)!=null&&i[DRAFTABLE])||isMap(s)||isSet(s):!1}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject$2(s){if(!s||typeof s!="object")return!1;const i=getPrototypeOf(s);if(i===null)return!0;const a=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return a===Object?!0:typeof a=="function"&&Function.toString.call(a)===objectCtorString}function each(s,i){getArchtype(s)===0?Object.entries(s).forEach(([a,c])=>{i(a,c,s)}):s.forEach((a,c)=>i(c,a,s))}function getArchtype(s){const i=s[DRAFT_STATE];return i?i.type_:Array.isArray(s)?1:isMap(s)?2:isSet(s)?3:0}function has$1(s,i){return getArchtype(s)===2?s.has(i):Object.prototype.hasOwnProperty.call(s,i)}function set$2(s,i,a){const c=getArchtype(s);c===2?s.set(i,a):c===3?s.add(a):s[i]=a}function is(s,i){return s===i?s!==0||1/s===1/i:s!==s&&i!==i}function isMap(s){return s instanceof Map}function isSet(s){return s instanceof Set}function latest(s){return s.copy_||s.base_}function shallowCopy(s,i){if(isMap(s))return new Map(s);if(isSet(s))return new Set(s);if(Array.isArray(s))return Array.prototype.slice.call(s);if(!i&&isPlainObject$2(s))return getPrototypeOf(s)?{...s}:Object.assign(Object.create(null),s);const a=Object.getOwnPropertyDescriptors(s);delete a[DRAFT_STATE];let c=Reflect.ownKeys(a);for(let d=0;d1&&(s.set=s.add=s.clear=s.delete=dontMutateFrozenCollections),Object.freeze(s),i&&each(s,(a,c)=>freeze(c,!0))),s}function dontMutateFrozenCollections(){die(2)}function isFrozen(s){return Object.isFrozen(s)}var plugins={};function getPlugin(s){const i=plugins[s];return i||die(0,s),i}function loadPlugin(s,i){plugins[s]||(plugins[s]=i)}var currentScope;function getCurrentScope(){return currentScope}function createScope(s,i){return{drafts_:[],parent_:s,immer_:i,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(s,i){i&&(getPlugin("Patches"),s.patches_=[],s.inversePatches_=[],s.patchListener_=i)}function revokeScope(s){leaveScope(s),s.drafts_.forEach(revokeDraft),s.drafts_=null}function leaveScope(s){s===currentScope&&(currentScope=s.parent_)}function enterScope(s){return currentScope=createScope(currentScope,s)}function revokeDraft(s){const i=s[DRAFT_STATE];i.type_===0||i.type_===1?i.revoke_():i.revoked_=!0}function processResult(s,i){i.unfinalizedDrafts_=i.drafts_.length;const a=i.drafts_[0];return s!==void 0&&s!==a?(a[DRAFT_STATE].modified_&&(revokeScope(i),die(4)),isDraftable(s)&&(s=finalize(i,s),i.parent_||maybeFreeze(i,s)),i.patches_&&getPlugin("Patches").generateReplacementPatches_(a[DRAFT_STATE].base_,s,i.patches_,i.inversePatches_)):s=finalize(i,a,[]),revokeScope(i),i.patches_&&i.patchListener_(i.patches_,i.inversePatches_),s!==NOTHING?s:void 0}function finalize(s,i,a){if(isFrozen(i))return i;const c=i[DRAFT_STATE];if(!c)return each(i,(d,g)=>finalizeProperty(s,c,i,d,g,a)),i;if(c.scope_!==s)return i;if(!c.modified_)return maybeFreeze(s,c.base_,!0),c.base_;if(!c.finalized_){c.finalized_=!0,c.scope_.unfinalizedDrafts_--;const d=c.copy_;let g=d,b=!1;c.type_===3&&(g=new Set(d),d.clear(),b=!0),each(g,($,j)=>finalizeProperty(s,c,d,$,j,a,b)),maybeFreeze(s,d,!1),a&&s.patches_&&getPlugin("Patches").generatePatches_(c,a,s.patches_,s.inversePatches_)}return c.copy_}function finalizeProperty(s,i,a,c,d,g,b){if(isDraft(d)){const $=g&&i&&i.type_!==3&&!has$1(i.assigned_,c)?g.concat(c):void 0,j=finalize(s,d,$);if(set$2(a,c,j),isDraft(j))s.canAutoFreeze_=!1;else return}else b&&a.add(d);if(isDraftable(d)&&!isFrozen(d)){if(!s.immer_.autoFreeze_&&s.unfinalizedDrafts_<1)return;finalize(s,d),(!i||!i.scope_.parent_)&&maybeFreeze(s,d)}}function maybeFreeze(s,i,a=!1){!s.parent_&&s.immer_.autoFreeze_&&s.canAutoFreeze_&&freeze(i,a)}function createProxyProxy(s,i){const a=Array.isArray(s),c={type_:a?1:0,scope_:i?i.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:i,base_:s,draft_:null,copy_:null,revoke_:null,isManual_:!1};let d=c,g=objectTraps;a&&(d=[c],g=arrayTraps);const{revoke:b,proxy:$}=Proxy.revocable(d,g);return c.draft_=$,c.revoke_=b,$}var objectTraps={get(s,i){if(i===DRAFT_STATE)return s;const a=latest(s);if(!has$1(a,i))return readPropFromProto(s,a,i);const c=a[i];return s.finalized_||!isDraftable(c)?c:c===peek(s.base_,i)?(prepareCopy(s),s.copy_[i]=createProxy(c,s)):c},has(s,i){return i in latest(s)},ownKeys(s){return Reflect.ownKeys(latest(s))},set(s,i,a){const c=getDescriptorFromProto(latest(s),i);if(c!=null&&c.set)return c.set.call(s.draft_,a),!0;if(!s.modified_){const d=peek(latest(s),i),g=d==null?void 0:d[DRAFT_STATE];if(g&&g.base_===a)return s.copy_[i]=a,s.assigned_[i]=!1,!0;if(is(a,d)&&(a!==void 0||has$1(s.base_,i)))return!0;prepareCopy(s),markChanged(s)}return s.copy_[i]===a&&(a!==void 0||i in s.copy_)||Number.isNaN(a)&&Number.isNaN(s.copy_[i])||(s.copy_[i]=a,s.assigned_[i]=!0),!0},deleteProperty(s,i){return peek(s.base_,i)!==void 0||i in s.base_?(s.assigned_[i]=!1,prepareCopy(s),markChanged(s)):delete s.assigned_[i],s.copy_&&delete s.copy_[i],!0},getOwnPropertyDescriptor(s,i){const a=latest(s),c=Reflect.getOwnPropertyDescriptor(a,i);return c&&{writable:!0,configurable:s.type_!==1||i!=="length",enumerable:c.enumerable,value:a[i]}},defineProperty(){die(11)},getPrototypeOf(s){return getPrototypeOf(s.base_)},setPrototypeOf(){die(12)}},arrayTraps={};each(objectTraps,(s,i)=>{arrayTraps[s]=function(){return arguments[0]=arguments[0][0],i.apply(this,arguments)}});arrayTraps.deleteProperty=function(s,i){return arrayTraps.set.call(this,s,i,void 0)};arrayTraps.set=function(s,i,a){return objectTraps.set.call(this,s[0],i,a,s[0])};function peek(s,i){const a=s[DRAFT_STATE];return(a?latest(a):s)[i]}function readPropFromProto(s,i,a){var d;const c=getDescriptorFromProto(i,a);return c?"value"in c?c.value:(d=c.get)==null?void 0:d.call(s.draft_):void 0}function getDescriptorFromProto(s,i){if(!(i in s))return;let a=getPrototypeOf(s);for(;a;){const c=Object.getOwnPropertyDescriptor(a,i);if(c)return c;a=getPrototypeOf(a)}}function markChanged(s){s.modified_||(s.modified_=!0,s.parent_&&markChanged(s.parent_))}function prepareCopy(s){s.copy_||(s.copy_=shallowCopy(s.base_,s.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(s){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(i,a,c)=>{if(typeof i=="function"&&typeof a!="function"){const g=a;a=i;const b=this;return function(j=g,..._){return b.produce(j,_e=>a.call(this,_e,..._))}}typeof a!="function"&&die(6),c!==void 0&&typeof c!="function"&&die(7);let d;if(isDraftable(i)){const g=enterScope(this),b=createProxy(i,void 0);let $=!0;try{d=a(b),$=!1}finally{$?revokeScope(g):leaveScope(g)}return usePatchesInScope(g,c),processResult(d,g)}else if(!i||typeof i!="object"){if(d=a(i),d===void 0&&(d=i),d===NOTHING&&(d=void 0),this.autoFreeze_&&freeze(d,!0),c){const g=[],b=[];getPlugin("Patches").generateReplacementPatches_(i,d,g,b),c(g,b)}return d}else die(1,i)},this.produceWithPatches=(i,a)=>{if(typeof i=="function")return(b,...$)=>this.produceWithPatches(b,j=>i(j,...$));let c,d;return[this.produce(i,a,(b,$)=>{c=b,d=$}),c,d]},typeof(s==null?void 0:s.autoFreeze)=="boolean"&&this.setAutoFreeze(s.autoFreeze),typeof(s==null?void 0:s.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(s.useStrictShallowCopy)}createDraft(s){isDraftable(s)||die(8),isDraft(s)&&(s=current(s));const i=enterScope(this),a=createProxy(s,void 0);return a[DRAFT_STATE].isManual_=!0,leaveScope(i),a}finishDraft(s,i){const a=s&&s[DRAFT_STATE];(!a||!a.isManual_)&&die(9);const{scope_:c}=a;return usePatchesInScope(c,i),processResult(void 0,c)}setAutoFreeze(s){this.autoFreeze_=s}setUseStrictShallowCopy(s){this.useStrictShallowCopy_=s}applyPatches(s,i){let a;for(a=i.length-1;a>=0;a--){const d=i[a];if(d.path.length===0&&d.op==="replace"){s=d.value;break}}a>-1&&(i=i.slice(a+1));const c=getPlugin("Patches").applyPatches_;return isDraft(s)?c(s,i):this.produce(s,d=>c(d,i))}};function createProxy(s,i){const a=isMap(s)?getPlugin("MapSet").proxyMap_(s,i):isSet(s)?getPlugin("MapSet").proxySet_(s,i):createProxyProxy(s,i);return(i?i.scope_:getCurrentScope()).drafts_.push(a),a}function current(s){return isDraft(s)||die(10,s),currentImpl(s)}function currentImpl(s){if(!isDraftable(s)||isFrozen(s))return s;const i=s[DRAFT_STATE];let a;if(i){if(!i.modified_)return i.base_;i.finalized_=!0,a=shallowCopy(s,i.scope_.immer_.useStrictShallowCopy_)}else a=shallowCopy(s,!0);return each(a,(c,d)=>{set$2(a,c,currentImpl(d))}),i&&(i.finalized_=!1),a}function enableMapSet(){class s extends Map{constructor(j,_){super(),this[DRAFT_STATE]={type_:2,parent_:_,scope_:_?_.scope_:getCurrentScope(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:j,draft_:this,isManual_:!1,revoked_:!1}}get size(){return latest(this[DRAFT_STATE]).size}has(j){return latest(this[DRAFT_STATE]).has(j)}set(j,_){const _e=this[DRAFT_STATE];return b(_e),(!latest(_e).has(j)||latest(_e).get(j)!==_)&&(a(_e),markChanged(_e),_e.assigned_.set(j,!0),_e.copy_.set(j,_),_e.assigned_.set(j,!0)),this}delete(j){if(!this.has(j))return!1;const _=this[DRAFT_STATE];return b(_),a(_),markChanged(_),_.base_.has(j)?_.assigned_.set(j,!1):_.assigned_.delete(j),_.copy_.delete(j),!0}clear(){const j=this[DRAFT_STATE];b(j),latest(j).size&&(a(j),markChanged(j),j.assigned_=new Map,each(j.base_,_=>{j.assigned_.set(_,!1)}),j.copy_.clear())}forEach(j,_){const _e=this[DRAFT_STATE];latest(_e).forEach((et,tt,rt)=>{j.call(_,this.get(tt),tt,this)})}get(j){const _=this[DRAFT_STATE];b(_);const _e=latest(_).get(j);if(_.finalized_||!isDraftable(_e)||_e!==_.base_.get(j))return _e;const et=createProxy(_e,_);return a(_),_.copy_.set(j,et),et}keys(){return latest(this[DRAFT_STATE]).keys()}values(){const j=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const _=j.next();return _.done?_:{done:!1,value:this.get(_.value)}}}}entries(){const j=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const _=j.next();if(_.done)return _;const _e=this.get(_.value);return{done:!1,value:[_.value,_e]}}}}[Symbol.iterator](){return this.entries()}}function i($,j){return new s($,j)}function a($){$.copy_||($.assigned_=new Map,$.copy_=new Map($.base_))}class c extends Set{constructor(j,_){super(),this[DRAFT_STATE]={type_:3,parent_:_,scope_:_?_.scope_:getCurrentScope(),modified_:!1,finalized_:!1,copy_:void 0,base_:j,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return latest(this[DRAFT_STATE]).size}has(j){const _=this[DRAFT_STATE];return b(_),_.copy_?!!(_.copy_.has(j)||_.drafts_.has(j)&&_.copy_.has(_.drafts_.get(j))):_.base_.has(j)}add(j){const _=this[DRAFT_STATE];return b(_),this.has(j)||(g(_),markChanged(_),_.copy_.add(j)),this}delete(j){if(!this.has(j))return!1;const _=this[DRAFT_STATE];return b(_),g(_),markChanged(_),_.copy_.delete(j)||(_.drafts_.has(j)?_.copy_.delete(_.drafts_.get(j)):!1)}clear(){const j=this[DRAFT_STATE];b(j),latest(j).size&&(g(j),markChanged(j),j.copy_.clear())}values(){const j=this[DRAFT_STATE];return b(j),g(j),j.copy_.values()}entries(){const j=this[DRAFT_STATE];return b(j),g(j),j.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(j,_){const _e=this.values();let et=_e.next();for(;!et.done;)j.call(_,et.value,et.value,this),et=_e.next()}}function d($,j){return new c($,j)}function g($){$.copy_||($.copy_=new Set,$.base_.forEach(j=>{if(isDraftable(j)){const _=createProxy(j,$);$.drafts_.set(j,_),$.copy_.add(_)}else $.copy_.add(j)}))}function b($){$.revoked_&&die(3,JSON.stringify(latest($)))}loadPlugin("MapSet",{proxyMap_:i,proxySet_:d})}var immer$1=new Immer2,produce=immer$1.produce;immer$1.produceWithPatches.bind(immer$1);immer$1.setAutoFreeze.bind(immer$1);immer$1.setUseStrictShallowCopy.bind(immer$1);immer$1.applyPatches.bind(immer$1);immer$1.createDraft.bind(immer$1);immer$1.finishDraft.bind(immer$1);const immerImpl=s=>(i,a,c)=>(c.setState=(d,g,...b)=>{const $=typeof d=="function"?produce(d):d;return i($,g,...b)},s(c.setState,a,c)),immer=immerImpl;let nanoid=(s=21)=>crypto.getRandomValues(new Uint8Array(s)).reduce((i,a)=>(a&=63,a<36?i+=a.toString(36):a<62?i+=(a-26).toString(36).toUpperCase():a>62?i+="-":i+="_",i),"");class ToastTimer{constructor(i,a){Qt(this,"timerId");Qt(this,"createdAt",0);this.callback=i,this.remaining=a,this.resume()}pause(){clearTimeout(this.timerId),this.remaining-=Date.now()-this.createdAt}resume(){this.createdAt=Date.now(),this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(this.callback,this.remaining)}clear(){clearTimeout(this.timerId)}}const maximumVisible=1;function getDefaultDuration(s){switch(s){case"danger":return 8e3;case"loading":return 0;default:return 3e3}}const useToastStore=create()(immer((s,i)=>({toasts:[],add:(a,c)=>{const d=i().toasts.length+1-maximumVisible;d>0&&s(_e=>{_e.toasts.splice(0,d)});const g=(c==null?void 0:c.id)||nanoid(6),b=(c==null?void 0:c.type)||"positive",$=(c==null?void 0:c.duration)??getDefaultDuration(b),j={timer:$>0?new ToastTimer(()=>i().remove(g),$):null,message:a,...c,id:g,type:b,position:(c==null?void 0:c.position)||"bottom-center",duration:$,disableExitAnimation:c==null?void 0:c.disableExitAnimation,disableEnterAnimation:c==null?void 0:c.disableEnterAnimation},_=i().toasts.findIndex(_e=>_e.id===j.id);_>-1?s(_e=>{_e.toasts[_]=j}):s(_e=>{_e.toasts.push(j)})},remove:a=>{const c=i().toasts.filter(d=>{var g;return a===d.id?((g=d.timer)==null||g.clear(),!1):!0});s(d=>{d.toasts=c})}})));function toastState(){return useToastStore.getState()}function toast(s,i){toastState().add(s,i)}toast.danger=(s,i)=>{toastState().add(s,{...i,type:"danger"})};toast.positive=(s,i)=>{toastState().add(s,{...i,type:"positive"})};toast.loading=(s,i)=>{toastState().add(s,{...i,type:"loading"})};function getAxiosErrorMessage(s,i){var a;if(axios$1.isAxiosError(s)&&s.response){const c=s.response.data;if(i!=null){const d=(a=c.errors)==null?void 0:a[i];return Array.isArray(d)?d[0]:d}return c==null?void 0:c.message}}const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c=typeof document<"u"?React.useLayoutEffect:()=>{},$b5e257d569688ac6$var$defaultContext={prefix:String(Math.round(Math.random()*1e10)),current:0},$b5e257d569688ac6$var$SSRContext=React.createContext($b5e257d569688ac6$var$defaultContext),$b5e257d569688ac6$var$IsSSRContext=React.createContext(!1);let $b5e257d569688ac6$var$canUseDOM=!!(typeof window<"u"&&window.document&&window.document.createElement),$b5e257d569688ac6$var$componentIds=new WeakMap;function $b5e257d569688ac6$var$useCounter(s=!1){let i=reactExports.useContext($b5e257d569688ac6$var$SSRContext),a=reactExports.useRef(null);if(a.current===null&&!s){var c,d;let g=(d=React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||d===void 0||(c=d.ReactCurrentOwner)===null||c===void 0?void 0:c.current;if(g){let b=$b5e257d569688ac6$var$componentIds.get(g);b==null?$b5e257d569688ac6$var$componentIds.set(g,{id:i.current,state:g.memoizedState}):g.memoizedState!==b.state&&(i.current=b.id,$b5e257d569688ac6$var$componentIds.delete(g))}a.current=++i.current}return a.current}function $b5e257d569688ac6$var$useLegacySSRSafeId(s){let i=reactExports.useContext($b5e257d569688ac6$var$SSRContext);i===$b5e257d569688ac6$var$defaultContext&&!$b5e257d569688ac6$var$canUseDOM&&console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let a=$b5e257d569688ac6$var$useCounter(!!s),c=`react-aria${i.prefix}`;return s||`${c}-${a}`}function $b5e257d569688ac6$var$useModernSSRSafeId(s){let i=React.useId(),[a]=reactExports.useState($b5e257d569688ac6$export$535bd6ca7f90a273()),c=a?"react-aria":`react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;return s||`${c}-${i}`}React.useId;function $b5e257d569688ac6$var$getSnapshot(){return!1}function $b5e257d569688ac6$var$getServerSnapshot(){return!0}function $b5e257d569688ac6$var$subscribe(s){return()=>{}}function $b5e257d569688ac6$export$535bd6ca7f90a273(){return typeof React.useSyncExternalStore=="function"?React.useSyncExternalStore($b5e257d569688ac6$var$subscribe,$b5e257d569688ac6$var$getSnapshot,$b5e257d569688ac6$var$getServerSnapshot):reactExports.useContext($b5e257d569688ac6$var$IsSSRContext)}let $bdb11010cef70236$var$idsUpdaterMap=new Map;function $bdb11010cef70236$export$cd8c9cb68f842629(s,i){if(s===i)return s;let a=$bdb11010cef70236$var$idsUpdaterMap.get(s);if(a)return a(i),i;let c=$bdb11010cef70236$var$idsUpdaterMap.get(i);return c?(c(s),s):i}function $ff5963eb1fccf552$export$e08e3b67e392101e(...s){return(...i)=>{for(let a of s)typeof a=="function"&&a(...i)}}const $431fbd86ca7dc216$export$b204af158042fbac=s=>{var i;return(i=s==null?void 0:s.ownerDocument)!==null&&i!==void 0?i:document},$431fbd86ca7dc216$export$f21a1ffae260145a=s=>s&&"window"in s&&s.window===s?s:$431fbd86ca7dc216$export$b204af158042fbac(s).defaultView||window;function $3ef42575df84b30b$export$9d1611c77c2fe928(...s){let i={...s[0]};for(let a=1;a=65&&d.charCodeAt(2)<=90?i[d]=$ff5963eb1fccf552$export$e08e3b67e392101e(g,b):(d==="className"||d==="UNSAFE_className")&&typeof g=="string"&&typeof b=="string"?i[d]=clsx(g,b):d==="id"&&g&&b?i.id=$bdb11010cef70236$export$cd8c9cb68f842629(g,b):i[d]=b!==void 0?b:g}}return i}function $7215afc6de606d6b$export$de79e2c695e052f3(s){if($7215afc6de606d6b$var$supportsPreventScroll())s.focus({preventScroll:!0});else{let i=$7215afc6de606d6b$var$getScrollableElements(s);s.focus(),$7215afc6de606d6b$var$restoreScrollPosition(i)}}let $7215afc6de606d6b$var$supportsPreventScrollCached=null;function $7215afc6de606d6b$var$supportsPreventScroll(){if($7215afc6de606d6b$var$supportsPreventScrollCached==null){$7215afc6de606d6b$var$supportsPreventScrollCached=!1;try{document.createElement("div").focus({get preventScroll(){return $7215afc6de606d6b$var$supportsPreventScrollCached=!0,!0}})}catch{}}return $7215afc6de606d6b$var$supportsPreventScrollCached}function $7215afc6de606d6b$var$getScrollableElements(s){let i=s.parentNode,a=[],c=document.scrollingElement||document.documentElement;for(;i instanceof HTMLElement&&i!==c;)(i.offsetHeight"u"||window.navigator==null?!1:((i=window.navigator.userAgentData)===null||i===void 0?void 0:i.brands.some(a=>s.test(a.brand)))||s.test(window.navigator.userAgent)}function $c87311424ea30a05$var$testPlatform(s){var i;return typeof window<"u"&&window.navigator!=null?s.test(((i=window.navigator.userAgentData)===null||i===void 0?void 0:i.platform)||window.navigator.platform):!1}function $c87311424ea30a05$export$9ac100e40613ea10(){return $c87311424ea30a05$var$testPlatform(/^Mac/i)}function $c87311424ea30a05$export$a11b0059900ceec8(){return $c87311424ea30a05$var$testUserAgent(/Android/i)}let $bbed8b41f857bcc0$var$transitionsByElement=new Map,$bbed8b41f857bcc0$var$transitionCallbacks=new Set;function $bbed8b41f857bcc0$var$setupGlobalEvents(){if(typeof window>"u")return;function s(c){return"propertyName"in c}let i=c=>{if(!s(c)||!c.target)return;let d=$bbed8b41f857bcc0$var$transitionsByElement.get(c.target);d||(d=new Set,$bbed8b41f857bcc0$var$transitionsByElement.set(c.target,d),c.target.addEventListener("transitioncancel",a,{once:!0})),d.add(c.propertyName)},a=c=>{if(!s(c)||!c.target)return;let d=$bbed8b41f857bcc0$var$transitionsByElement.get(c.target);if(d&&(d.delete(c.propertyName),d.size===0&&(c.target.removeEventListener("transitioncancel",a),$bbed8b41f857bcc0$var$transitionsByElement.delete(c.target)),$bbed8b41f857bcc0$var$transitionsByElement.size===0)){for(let g of $bbed8b41f857bcc0$var$transitionCallbacks)g();$bbed8b41f857bcc0$var$transitionCallbacks.clear()}};document.body.addEventListener("transitionrun",i),document.body.addEventListener("transitionend",a)}typeof document<"u"&&(document.readyState!=="loading"?$bbed8b41f857bcc0$var$setupGlobalEvents():document.addEventListener("DOMContentLoaded",$bbed8b41f857bcc0$var$setupGlobalEvents));function $bbed8b41f857bcc0$export$24490316f764c430(s){requestAnimationFrame(()=>{$bbed8b41f857bcc0$var$transitionsByElement.size===0?s():$bbed8b41f857bcc0$var$transitionCallbacks.add(s)})}function $df56164dff5785e2$export$4338b53315abf666(s){const i=reactExports.useRef(null);return reactExports.useMemo(()=>({get current(){return i.current},set current(a){i.current=a,typeof s=="function"?s(a):s&&(s.current=a)}}),[s])}function $cc38e7bd3fc7b213$export$2bb74740c4e19def(s,i){let a=window.getComputedStyle(s),c=/(auto|scroll)/.test(a.overflow+a.overflowX+a.overflowY);return c&&i&&(c=s.scrollHeight!==s.clientHeight||s.scrollWidth!==s.clientWidth),c}function $62d8ded9296f3872$export$cfa2225e87938781(s,i){let a=s;for($cc38e7bd3fc7b213$export$2bb74740c4e19def(a,i)&&(a=a.parentElement);a&&!$cc38e7bd3fc7b213$export$2bb74740c4e19def(a,i);)a=a.parentElement;return a||document.scrollingElement||document.documentElement}let $5df64b3807dc15ee$var$visualViewport=typeof document<"u"&&window.visualViewport;function $5df64b3807dc15ee$export$d699905dd57c73ca(){let s=$b5e257d569688ac6$export$535bd6ca7f90a273(),[i,a]=reactExports.useState(()=>s?{width:0,height:0}:$5df64b3807dc15ee$var$getViewportSize());return reactExports.useEffect(()=>{let c=()=>{a(d=>{let g=$5df64b3807dc15ee$var$getViewportSize();return g.width===d.width&&g.height===d.height?d:g})};return $5df64b3807dc15ee$var$visualViewport?$5df64b3807dc15ee$var$visualViewport.addEventListener("resize",c):window.addEventListener("resize",c),()=>{$5df64b3807dc15ee$var$visualViewport?$5df64b3807dc15ee$var$visualViewport.removeEventListener("resize",c):window.removeEventListener("resize",c)}},[]),i}function $5df64b3807dc15ee$var$getViewportSize(){return{width:$5df64b3807dc15ee$var$visualViewport&&($5df64b3807dc15ee$var$visualViewport==null?void 0:$5df64b3807dc15ee$var$visualViewport.width)||window.innerWidth,height:$5df64b3807dc15ee$var$visualViewport&&($5df64b3807dc15ee$var$visualViewport==null?void 0:$5df64b3807dc15ee$var$visualViewport.height)||window.innerHeight}}function $6a7db85432448f7f$export$60278871457622de(s){return s.mozInputSource===0&&s.isTrusted?!0:$c87311424ea30a05$export$a11b0059900ceec8()&&s.pointerType?s.type==="click"&&s.buttons===1:s.detail===0&&!s.pointerType}function $458b0a5536c1a7cf$export$40bfa8c7b0832715(s,i,a){let[c,d]=reactExports.useState(s||i),g=reactExports.useRef(s!==void 0),b=s!==void 0;reactExports.useEffect(()=>{let _=g.current;_!==b&&console.warn(`WARN: A component changed from ${_?"controlled":"uncontrolled"} to ${b?"controlled":"uncontrolled"}.`),g.current=b},[b]);let $=b?s:c,j=reactExports.useCallback((_,..._e)=>{let et=(tt,...rt)=>{a&&(Object.is($,tt)||a(tt,...rt)),b||($=tt)};typeof _=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),d((rt,...nt)=>{let at=_(b?$:rt,...nt);return et(at,..._e),b?rt:at})):(b||d(_),et(_,..._e))},[b,$,a]);return[$,j]}const DialogContext=React.createContext(null);function useDialogContext(){return reactExports.useContext(DialogContext)}function useTrans(){const{lines:s,localeCode:i}=useSelectedLocale();return{trans:reactExports.useCallback(c=>translate({...c,lines:s,localeCode:i}),[s,i])}}const translate=memoize(s=>{let{lines:i,message:a,values:c,localeCode:d}=s;return a==null?"":(a=(i==null?void 0:i[a])||(i==null?void 0:i[a.toLowerCase()])||a,c&&(a=handlePluralMessage(d,s),Object.entries(c).forEach(([g,b])=>{a=a.replace(`:${g}`,`${b}`)})),a)},{equals:shallowEqual,callTimeout:0});function DismissButton({onDismiss:s}){const{trans:i}=useTrans(),a=()=>{s&&s()};return jsxRuntimeExports.jsx("button",{className:"sr-only","aria-label":i(message("Dismiss")),tabIndex:-1,onClick:a})}function Dialog(s){const{type:i="modal",dialogProps:a,...c}=reactExports.useContext(DialogContext),{children:d,className:g,size:b="md",background:$,radius:j="rounded-lg",maxWidth:_="max-w-dialog",maxHeight:_e="max-h-dialog",shadow:et="shadow-2xl",...tt}=s;let rt=null;(i==="popover"||i==="tray")&&(rt=jsxRuntimeExports.jsx(DismissButton,{onDismiss:c.close}));const nt=b==="fullscreenTakeover"||i==="tray",at=clsx("mx-auto pointer-events-auto outline-none flex flex-col overflow-hidden",$||"bg",i!=="tray"&&sizeStyle(b),i==="tray"&&"rounded-t border-b-bg",b!=="fullscreenTakeover"&&`${et} border ${_e}`,!nt&&`${j} ${_}`,g);return jsxRuntimeExports.jsxs("div",{...$3ef42575df84b30b$export$9d1611c77c2fe928({role:"dialog",tabIndex:-1},a,tt),style:{...s.style,"--be-dialog-padding":"24px"},"aria-modal":!0,className:at,children:[reactExports.Children.toArray(d).map(ut=>reactExports.isValidElement(ut)?reactExports.cloneElement(ut,{size:ut.props.size??b}):ut),rt]})}function sizeStyle(s){switch(s){case"2xs":return"w-256";case"xs":return"w-320";case"sm":return"w-384";case"md":return"w-440";case"lg":return"w-620";case"xl":return"w-780";case"2xl":return"w-850";case"fullscreen":return"w-1280";case"fullscreenTakeover":return"w-full h-full";default:return s}}const IconButton=reactExports.forwardRef(({children:s,size:i="md",iconSize:a=i&&i.length<=3?i:"md",variant:c="text",radius:d="rounded-button",className:g,padding:b,equalWidth:$=!0,badge:j,..._},_e)=>{const et=clsx(getButtonSizeStyle(i,{padding:b,equalWidth:$,variant:c}),g,j&&"relative");return jsxRuntimeExports.jsxs(ButtonBase,{..._,ref:_e,radius:d,variant:c,className:et,children:[reactExports.cloneElement(s,{size:a}),j]})}),CloseIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}),"CloseOutlined");function DialogHeader(s){const{children:i,className:a,color:c,onDismiss:d,leftAdornment:g,rightAdornment:b,hideDismissButton:$=!1,size:j,showDivider:_,justify:_e="justify-between",titleFontWeight:et="font-semibold",titleTextSize:tt=j==="xs"?"text-xs":"text-sm",closeButtonSize:rt=j==="xs"?"xs":"sm",actions:nt,closeButtonIcon:at}=s,{labelId:ut,isDismissable:ot,close:st}=reactExports.useContext(DialogContext);return jsxRuntimeExports.jsxs("div",{className:clsx(a,"flex flex-shrink-0 items-center gap-10",et,_&&"border-b",getPadding$2(s),c||"text-main",_e),children:[g,jsxRuntimeExports.jsx("h3",{id:ut,className:clsx(tt,"mr-auto leading-5 opacity-90"),children:i}),b,nt,ot&&!$&&jsxRuntimeExports.jsx(IconButton,{"aria-label":"Dismiss",onClick:()=>{d?d():st()},size:rt,className:clsx("-mr-8 text-muted",b&&"sr-only"),children:at||jsxRuntimeExports.jsx(CloseIcon,{})})]})}function getPadding$2({size:s,padding:i}){if(i)return i;switch(s){case"2xs":case"xs":return"px-14 py-4";case"sm":return"px-18 py-4";default:return"px-24 py-6"}}const DialogBody=reactExports.forwardRef((s,i)=>{const{children:a,className:c,padding:d,size:g,...b}=s;return jsxRuntimeExports.jsx("div",{...b,ref:i,className:clsx(c,getPadding$1(s),"overflow-y-auto overflow-x-hidden overscroll-contain text-sm flex-auto"),children:a})});function getPadding$1({size:s,padding:i}){if(i)return i;switch(s){case"xs":return"p-14";case"sm":return"p-18";default:return"px-24 py-20"}}let $507fabe10e71c6fb$var$currentModality=null,$507fabe10e71c6fb$var$changeHandlers=new Set,$507fabe10e71c6fb$export$d90243b58daecda7=new Map,$507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!1;function $507fabe10e71c6fb$var$triggerChangeHandlers(s,i){for(let a of $507fabe10e71c6fb$var$changeHandlers)a(s,i)}function $507fabe10e71c6fb$var$isValidKey(s){return!(s.metaKey||!$c87311424ea30a05$export$9ac100e40613ea10()&&s.altKey||s.ctrlKey||s.key==="Control"||s.key==="Shift"||s.key==="Meta")}function $507fabe10e71c6fb$var$handleKeyboardEvent(s){$507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$isValidKey(s)&&($507fabe10e71c6fb$var$currentModality="keyboard",$507fabe10e71c6fb$var$triggerChangeHandlers("keyboard",s))}function $507fabe10e71c6fb$var$handlePointerEvent(s){$507fabe10e71c6fb$var$currentModality="pointer",(s.type==="mousedown"||s.type==="pointerdown")&&($507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$triggerChangeHandlers("pointer",s))}function $507fabe10e71c6fb$var$handleClickEvent(s){$6a7db85432448f7f$export$60278871457622de(s)&&($507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$currentModality="virtual")}function $507fabe10e71c6fb$var$handleFocusEvent(s){s.target===window||s.target===document||(!$507fabe10e71c6fb$var$hasEventBeforeFocus&&!$507fabe10e71c6fb$var$hasBlurredWindowRecently&&($507fabe10e71c6fb$var$currentModality="virtual",$507fabe10e71c6fb$var$triggerChangeHandlers("virtual",s)),$507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!1)}function $507fabe10e71c6fb$var$handleWindowBlur(){$507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!0}function $507fabe10e71c6fb$var$setupGlobalFocusEvents(s){if(typeof window>"u"||$507fabe10e71c6fb$export$d90243b58daecda7.get($431fbd86ca7dc216$export$f21a1ffae260145a(s)))return;const i=$431fbd86ca7dc216$export$f21a1ffae260145a(s),a=$431fbd86ca7dc216$export$b204af158042fbac(s);let c=i.HTMLElement.prototype.focus;i.HTMLElement.prototype.focus=function(){$507fabe10e71c6fb$var$hasEventBeforeFocus=!0,c.apply(this,arguments)},a.addEventListener("keydown",$507fabe10e71c6fb$var$handleKeyboardEvent,!0),a.addEventListener("keyup",$507fabe10e71c6fb$var$handleKeyboardEvent,!0),a.addEventListener("click",$507fabe10e71c6fb$var$handleClickEvent,!0),i.addEventListener("focus",$507fabe10e71c6fb$var$handleFocusEvent,!0),i.addEventListener("blur",$507fabe10e71c6fb$var$handleWindowBlur,!1),typeof PointerEvent<"u"?(a.addEventListener("pointerdown",$507fabe10e71c6fb$var$handlePointerEvent,!0),a.addEventListener("pointermove",$507fabe10e71c6fb$var$handlePointerEvent,!0),a.addEventListener("pointerup",$507fabe10e71c6fb$var$handlePointerEvent,!0)):(a.addEventListener("mousedown",$507fabe10e71c6fb$var$handlePointerEvent,!0),a.addEventListener("mousemove",$507fabe10e71c6fb$var$handlePointerEvent,!0),a.addEventListener("mouseup",$507fabe10e71c6fb$var$handlePointerEvent,!0)),i.addEventListener("beforeunload",()=>{$507fabe10e71c6fb$var$tearDownWindowFocusTracking(s)},{once:!0}),$507fabe10e71c6fb$export$d90243b58daecda7.set(i,{focus:c})}const $507fabe10e71c6fb$var$tearDownWindowFocusTracking=(s,i)=>{const a=$431fbd86ca7dc216$export$f21a1ffae260145a(s),c=$431fbd86ca7dc216$export$b204af158042fbac(s);i&&c.removeEventListener("DOMContentLoaded",i),$507fabe10e71c6fb$export$d90243b58daecda7.has(a)&&(a.HTMLElement.prototype.focus=$507fabe10e71c6fb$export$d90243b58daecda7.get(a).focus,c.removeEventListener("keydown",$507fabe10e71c6fb$var$handleKeyboardEvent,!0),c.removeEventListener("keyup",$507fabe10e71c6fb$var$handleKeyboardEvent,!0),c.removeEventListener("click",$507fabe10e71c6fb$var$handleClickEvent,!0),a.removeEventListener("focus",$507fabe10e71c6fb$var$handleFocusEvent,!0),a.removeEventListener("blur",$507fabe10e71c6fb$var$handleWindowBlur,!1),typeof PointerEvent<"u"?(c.removeEventListener("pointerdown",$507fabe10e71c6fb$var$handlePointerEvent,!0),c.removeEventListener("pointermove",$507fabe10e71c6fb$var$handlePointerEvent,!0),c.removeEventListener("pointerup",$507fabe10e71c6fb$var$handlePointerEvent,!0)):(c.removeEventListener("mousedown",$507fabe10e71c6fb$var$handlePointerEvent,!0),c.removeEventListener("mousemove",$507fabe10e71c6fb$var$handlePointerEvent,!0),c.removeEventListener("mouseup",$507fabe10e71c6fb$var$handlePointerEvent,!0)),$507fabe10e71c6fb$export$d90243b58daecda7.delete(a))};function $507fabe10e71c6fb$export$2f1888112f558a7d(s){const i=$431fbd86ca7dc216$export$b204af158042fbac(s);let a;return i.readyState!=="loading"?$507fabe10e71c6fb$var$setupGlobalFocusEvents(s):(a=()=>{$507fabe10e71c6fb$var$setupGlobalFocusEvents(s)},i.addEventListener("DOMContentLoaded",a)),()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(s,a)}typeof document<"u"&&$507fabe10e71c6fb$export$2f1888112f558a7d();function $507fabe10e71c6fb$export$630ff653c5ada6a9(){return $507fabe10e71c6fb$var$currentModality}function $6a99195332edec8b$export$80f3e147d781571c(s){const i=$431fbd86ca7dc216$export$b204af158042fbac(s);if($507fabe10e71c6fb$export$630ff653c5ada6a9()==="virtual"){let a=i.activeElement;$bbed8b41f857bcc0$export$24490316f764c430(()=>{i.activeElement===a&&s.isConnected&&$7215afc6de606d6b$export$de79e2c695e052f3(s)})}else $7215afc6de606d6b$export$de79e2c695e052f3(s)}function $645f2e67b85a24c9$var$isStyleVisible(s){const i=$431fbd86ca7dc216$export$f21a1ffae260145a(s);if(!(s instanceof i.HTMLElement)&&!(s instanceof i.SVGElement))return!1;let{display:a,visibility:c}=s.style,d=a!=="none"&&c!=="hidden"&&c!=="collapse";if(d){const{getComputedStyle:g}=s.ownerDocument.defaultView;let{display:b,visibility:$}=g(s);d=b!=="none"&&$!=="hidden"&&$!=="collapse"}return d}function $645f2e67b85a24c9$var$isAttributeVisible(s,i){return!s.hasAttribute("hidden")&&!s.hasAttribute("data-react-aria-prevent-focus")&&(s.nodeName==="DETAILS"&&i&&i.nodeName!=="SUMMARY"?s.hasAttribute("open"):!0)}function $645f2e67b85a24c9$export$e989c0fffaa6b27a(s,i){return s.nodeName!=="#comment"&&$645f2e67b85a24c9$var$isStyleVisible(s)&&$645f2e67b85a24c9$var$isAttributeVisible(s,i)&&(!s.parentElement||$645f2e67b85a24c9$export$e989c0fffaa6b27a(s.parentElement,s))}const $9bf71ea28793e738$var$FocusContext=React.createContext(null);let $9bf71ea28793e738$var$activeScope=null;function $9bf71ea28793e738$export$20e40289641fbbb6(s){let{children:i,contain:a,restoreFocus:c,autoFocus:d}=s,g=reactExports.useRef(null),b=reactExports.useRef(null),$=reactExports.useRef([]),{parentNode:j}=reactExports.useContext($9bf71ea28793e738$var$FocusContext)||{},_=reactExports.useMemo(()=>new $9bf71ea28793e738$var$TreeNode({scopeRef:$}),[$]);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let tt=j||$9bf71ea28793e738$export$d06fae2ee68b101e.root;if($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(tt.scopeRef)&&$9bf71ea28793e738$var$activeScope&&!$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,tt.scopeRef)){let rt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);rt&&(tt=rt)}tt.addChild(_),$9bf71ea28793e738$export$d06fae2ee68b101e.addNode(_)},[_,j]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let tt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($);tt&&(tt.contain=!!a)},[a]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{var tt;let rt=(tt=g.current)===null||tt===void 0?void 0:tt.nextSibling,nt=[];for(;rt&&rt!==b.current;)nt.push(rt),rt=rt.nextSibling;$.current=nt},[i]),$9bf71ea28793e738$var$useActiveScopeTracker($,c,a),$9bf71ea28793e738$var$useFocusContainment($,a),$9bf71ea28793e738$var$useRestoreFocus($,c,a),$9bf71ea28793e738$var$useAutoFocus($,d),reactExports.useEffect(()=>{const tt=$431fbd86ca7dc216$export$b204af158042fbac($.current?$.current[0]:void 0).activeElement;let rt=null;if($9bf71ea28793e738$var$isElementInScope(tt,$.current)){for(let nt of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse())nt.scopeRef&&$9bf71ea28793e738$var$isElementInScope(tt,nt.scopeRef.current)&&(rt=nt);rt===$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($)&&($9bf71ea28793e738$var$activeScope=rt.scopeRef)}},[$]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>()=>{var tt,rt,nt;let at=(nt=(rt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($))===null||rt===void 0||(tt=rt.parent)===null||tt===void 0?void 0:tt.scopeRef)!==null&&nt!==void 0?nt:null;($===$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope($,$9bf71ea28793e738$var$activeScope))&&(!at||$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(at))&&($9bf71ea28793e738$var$activeScope=at),$9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode($)},[$]);let _e=reactExports.useMemo(()=>$9bf71ea28793e738$var$createFocusManagerForScope($),[]),et=reactExports.useMemo(()=>({focusManager:_e,parentNode:_}),[_,_e]);return React.createElement($9bf71ea28793e738$var$FocusContext.Provider,{value:et},React.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:g}),i,React.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:b}))}function $9bf71ea28793e738$export$10c5169755ce7bd7(){var s;return(s=reactExports.useContext($9bf71ea28793e738$var$FocusContext))===null||s===void 0?void 0:s.focusManager}function $9bf71ea28793e738$var$createFocusManagerForScope(s){return{focusNext(i={}){let a=s.current,{from:c,tabbable:d,wrap:g,accept:b}=i,$=c||$431fbd86ca7dc216$export$b204af158042fbac(a[0]).activeElement,j=a[0].previousElementSibling,_=$9bf71ea28793e738$var$getScopeRoot(a),_e=$9bf71ea28793e738$export$2d6ec8fc375ceafa(_,{tabbable:d,accept:b},a);_e.currentNode=$9bf71ea28793e738$var$isElementInScope($,a)?$:j;let et=_e.nextNode();return!et&&g&&(_e.currentNode=j,et=_e.nextNode()),et&&$9bf71ea28793e738$var$focusElement(et,!0),et},focusPrevious(i={}){let a=s.current,{from:c,tabbable:d,wrap:g,accept:b}=i,$=c||$431fbd86ca7dc216$export$b204af158042fbac(a[0]).activeElement,j=a[a.length-1].nextElementSibling,_=$9bf71ea28793e738$var$getScopeRoot(a),_e=$9bf71ea28793e738$export$2d6ec8fc375ceafa(_,{tabbable:d,accept:b},a);_e.currentNode=$9bf71ea28793e738$var$isElementInScope($,a)?$:j;let et=_e.previousNode();return!et&&g&&(_e.currentNode=j,et=_e.previousNode()),et&&$9bf71ea28793e738$var$focusElement(et,!0),et},focusFirst(i={}){let a=s.current,{tabbable:c,accept:d}=i,g=$9bf71ea28793e738$var$getScopeRoot(a),b=$9bf71ea28793e738$export$2d6ec8fc375ceafa(g,{tabbable:c,accept:d},a);b.currentNode=a[0].previousElementSibling;let $=b.nextNode();return $&&$9bf71ea28793e738$var$focusElement($,!0),$},focusLast(i={}){let a=s.current,{tabbable:c,accept:d}=i,g=$9bf71ea28793e738$var$getScopeRoot(a),b=$9bf71ea28793e738$export$2d6ec8fc375ceafa(g,{tabbable:c,accept:d},a);b.currentNode=a[a.length-1].nextElementSibling;let $=b.previousNode();return $&&$9bf71ea28793e738$var$focusElement($,!0),$}}}const $9bf71ea28793e738$var$focusableElements=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],$9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR=$9bf71ea28793e738$var$focusableElements.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";$9bf71ea28793e738$var$focusableElements.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const $9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR=$9bf71ea28793e738$var$focusableElements.join(':not([hidden]):not([tabindex="-1"]),');function $9bf71ea28793e738$var$getScopeRoot(s){return s[0].parentElement}function $9bf71ea28793e738$var$shouldContainFocus(s){let i=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);for(;i&&i.scopeRef!==s;){if(i.contain)return!1;i=i.parent}return!0}function $9bf71ea28793e738$var$useFocusContainment(s,i){let a=reactExports.useRef(),c=reactExports.useRef();$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let d=s.current;if(!i){c.current&&(cancelAnimationFrame(c.current),c.current=void 0);return}const g=$431fbd86ca7dc216$export$b204af158042fbac(d?d[0]:void 0);let b=_=>{if(_.key!=="Tab"||_.altKey||_.ctrlKey||_.metaKey||!$9bf71ea28793e738$var$shouldContainFocus(s)||_.isComposing)return;let _e=g.activeElement,et=s.current;if(!et||!$9bf71ea28793e738$var$isElementInScope(_e,et))return;let tt=$9bf71ea28793e738$var$getScopeRoot(et),rt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(tt,{tabbable:!0},et);if(!_e)return;rt.currentNode=_e;let nt=_.shiftKey?rt.previousNode():rt.nextNode();nt||(rt.currentNode=_.shiftKey?et[et.length-1].nextElementSibling:et[0].previousElementSibling,nt=_.shiftKey?rt.previousNode():rt.nextNode()),_.preventDefault(),nt&&$9bf71ea28793e738$var$focusElement(nt,!0)},$=_=>{(!$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,s))&&$9bf71ea28793e738$var$isElementInScope(_.target,s.current)?($9bf71ea28793e738$var$activeScope=s,a.current=_.target):$9bf71ea28793e738$var$shouldContainFocus(s)&&!$9bf71ea28793e738$var$isElementInChildScope(_.target,s)?a.current?a.current.focus():$9bf71ea28793e738$var$activeScope&&$9bf71ea28793e738$var$activeScope.current&&$9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current):$9bf71ea28793e738$var$shouldContainFocus(s)&&(a.current=_.target)},j=_=>{c.current&&cancelAnimationFrame(c.current),c.current=requestAnimationFrame(()=>{if(g.activeElement&&$9bf71ea28793e738$var$shouldContainFocus(s)&&!$9bf71ea28793e738$var$isElementInChildScope(g.activeElement,s))if($9bf71ea28793e738$var$activeScope=s,g.body.contains(_.target)){var _e;a.current=_.target,(_e=a.current)===null||_e===void 0||_e.focus()}else $9bf71ea28793e738$var$activeScope.current&&$9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current)})};return g.addEventListener("keydown",b,!1),g.addEventListener("focusin",$,!1),d==null||d.forEach(_=>_.addEventListener("focusin",$,!1)),d==null||d.forEach(_=>_.addEventListener("focusout",j,!1)),()=>{g.removeEventListener("keydown",b,!1),g.removeEventListener("focusin",$,!1),d==null||d.forEach(_=>_.removeEventListener("focusin",$,!1)),d==null||d.forEach(_=>_.removeEventListener("focusout",j,!1))}},[s,i]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>()=>{c.current&&cancelAnimationFrame(c.current)},[c])}function $9bf71ea28793e738$var$isElementInAnyScope(s){return $9bf71ea28793e738$var$isElementInChildScope(s)}function $9bf71ea28793e738$var$isElementInScope(s,i){return!s||!i?!1:i.some(a=>a.contains(s))}function $9bf71ea28793e738$var$isElementInChildScope(s,i=null){if(s instanceof Element&&s.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:a}of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(i)))if(a&&$9bf71ea28793e738$var$isElementInScope(s,a.current))return!0;return!1}function $9bf71ea28793e738$var$isAncestorScope(s,i){var a;let c=(a=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(i))===null||a===void 0?void 0:a.parent;for(;c;){if(c.scopeRef===s)return!0;c=c.parent}return!1}function $9bf71ea28793e738$var$focusElement(s,i=!1){if(s!=null&&!i)try{$6a99195332edec8b$export$80f3e147d781571c(s)}catch{}else if(s!=null)try{s.focus()}catch{}}function $9bf71ea28793e738$var$focusFirstInScope(s,i=!0){let a=s[0].previousElementSibling,c=$9bf71ea28793e738$var$getScopeRoot(s),d=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:i},s);d.currentNode=a;let g=d.nextNode();i&&!g&&(c=$9bf71ea28793e738$var$getScopeRoot(s),d=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:!1},s),d.currentNode=a,g=d.nextNode()),$9bf71ea28793e738$var$focusElement(g)}function $9bf71ea28793e738$var$useAutoFocus(s,i){const a=React.useRef(i);reactExports.useEffect(()=>{if(a.current){$9bf71ea28793e738$var$activeScope=s;const c=$431fbd86ca7dc216$export$b204af158042fbac(s.current?s.current[0]:void 0);!$9bf71ea28793e738$var$isElementInScope(c.activeElement,$9bf71ea28793e738$var$activeScope.current)&&s.current&&$9bf71ea28793e738$var$focusFirstInScope(s.current)}a.current=!1},[s])}function $9bf71ea28793e738$var$useActiveScopeTracker(s,i,a){$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(i||a)return;let c=s.current;const d=$431fbd86ca7dc216$export$b204af158042fbac(c?c[0]:void 0);let g=b=>{let $=b.target;$9bf71ea28793e738$var$isElementInScope($,s.current)?$9bf71ea28793e738$var$activeScope=s:$9bf71ea28793e738$var$isElementInAnyScope($)||($9bf71ea28793e738$var$activeScope=null)};return d.addEventListener("focusin",g,!1),c==null||c.forEach(b=>b.addEventListener("focusin",g,!1)),()=>{d.removeEventListener("focusin",g,!1),c==null||c.forEach(b=>b.removeEventListener("focusin",g,!1))}},[s,i,a])}function $9bf71ea28793e738$var$shouldRestoreFocus(s){let i=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);for(;i&&i.scopeRef!==s;){if(i.nodeToRestore)return!1;i=i.parent}return(i==null?void 0:i.scopeRef)===s}function $9bf71ea28793e738$var$useRestoreFocus(s,i,a){const c=reactExports.useRef(typeof document<"u"?$431fbd86ca7dc216$export$b204af158042fbac(s.current?s.current[0]:void 0).activeElement:null);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let d=s.current;const g=$431fbd86ca7dc216$export$b204af158042fbac(d?d[0]:void 0);if(!i||a)return;let b=()=>{(!$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,s))&&$9bf71ea28793e738$var$isElementInScope(g.activeElement,s.current)&&($9bf71ea28793e738$var$activeScope=s)};return g.addEventListener("focusin",b,!1),d==null||d.forEach($=>$.addEventListener("focusin",b,!1)),()=>{g.removeEventListener("focusin",b,!1),d==null||d.forEach($=>$.removeEventListener("focusin",b,!1))}},[s,a]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{const d=$431fbd86ca7dc216$export$b204af158042fbac(s.current?s.current[0]:void 0);if(!i)return;let g=b=>{if(b.key!=="Tab"||b.altKey||b.ctrlKey||b.metaKey||!$9bf71ea28793e738$var$shouldContainFocus(s)||b.isComposing)return;let $=d.activeElement;if(!$9bf71ea28793e738$var$isElementInScope($,s.current))return;let j=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(s);if(!j)return;let _=j.nodeToRestore,_e=$9bf71ea28793e738$export$2d6ec8fc375ceafa(d.body,{tabbable:!0});_e.currentNode=$;let et=b.shiftKey?_e.previousNode():_e.nextNode();if((!_||!d.body.contains(_)||_===d.body)&&(_=void 0,j.nodeToRestore=void 0),(!et||!$9bf71ea28793e738$var$isElementInScope(et,s.current))&&_){_e.currentNode=_;do et=b.shiftKey?_e.previousNode():_e.nextNode();while($9bf71ea28793e738$var$isElementInScope(et,s.current));b.preventDefault(),b.stopPropagation(),et?$9bf71ea28793e738$var$focusElement(et,!0):$9bf71ea28793e738$var$isElementInAnyScope(_)?$9bf71ea28793e738$var$focusElement(_,!0):$.blur()}};return a||d.addEventListener("keydown",g,!0),()=>{a||d.removeEventListener("keydown",g,!0)}},[s,i,a]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{const d=$431fbd86ca7dc216$export$b204af158042fbac(s.current?s.current[0]:void 0);if(!i)return;let g=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(s);if(g){var b;return g.nodeToRestore=(b=c.current)!==null&&b!==void 0?b:void 0,()=>{let $=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(s);if(!$)return;let j=$.nodeToRestore;if(i&&j&&($9bf71ea28793e738$var$isElementInScope(d.activeElement,s.current)||d.activeElement===d.body&&$9bf71ea28793e738$var$shouldRestoreFocus(s))){let _=$9bf71ea28793e738$export$d06fae2ee68b101e.clone();requestAnimationFrame(()=>{if(d.activeElement===d.body){let _e=_.getTreeNode(s);for(;_e;){if(_e.nodeToRestore&&_e.nodeToRestore.isConnected){$9bf71ea28793e738$var$focusElement(_e.nodeToRestore);return}_e=_e.parent}for(_e=_.getTreeNode(s);_e;){if(_e.scopeRef&&_e.scopeRef.current&&$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(_e.scopeRef)){$9bf71ea28793e738$var$focusFirstInScope(_e.scopeRef.current,!0);return}_e=_e.parent}}})}}}},[s,i])}function $9bf71ea28793e738$export$2d6ec8fc375ceafa(s,i,a){let c=i!=null&&i.tabbable?$9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR:$9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR,d=$431fbd86ca7dc216$export$b204af158042fbac(s).createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode(g){var b;return!(i==null||(b=i.from)===null||b===void 0)&&b.contains(g)?NodeFilter.FILTER_REJECT:g.matches(c)&&$645f2e67b85a24c9$export$e989c0fffaa6b27a(g)&&(!a||$9bf71ea28793e738$var$isElementInScope(g,a))&&(!(i!=null&&i.accept)||i.accept(g))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return i!=null&&i.from&&(d.currentNode=i.from),d}function $9bf71ea28793e738$export$c5251b9e124bf29(s,i={}){return{focusNext(a={}){let c=s.current;if(!c)return null;let{from:d,tabbable:g=i.tabbable,wrap:b=i.wrap,accept:$=i.accept}=a,j=d||$431fbd86ca7dc216$export$b204af158042fbac(c).activeElement,_=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:g,accept:$});c.contains(j)&&(_.currentNode=j);let _e=_.nextNode();return!_e&&b&&(_.currentNode=c,_e=_.nextNode()),_e&&$9bf71ea28793e738$var$focusElement(_e,!0),_e},focusPrevious(a=i){let c=s.current;if(!c)return null;let{from:d,tabbable:g=i.tabbable,wrap:b=i.wrap,accept:$=i.accept}=a,j=d||$431fbd86ca7dc216$export$b204af158042fbac(c).activeElement,_=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:g,accept:$});if(c.contains(j))_.currentNode=j;else{let et=$9bf71ea28793e738$var$last(_);return et&&$9bf71ea28793e738$var$focusElement(et,!0),et??null}let _e=_.previousNode();if(!_e&&b){_.currentNode=c;let et=$9bf71ea28793e738$var$last(_);if(!et)return null;_e=et}return _e&&$9bf71ea28793e738$var$focusElement(_e,!0),_e??null},focusFirst(a=i){let c=s.current;if(!c)return null;let{tabbable:d=i.tabbable,accept:g=i.accept}=a,$=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:d,accept:g}).nextNode();return $&&$9bf71ea28793e738$var$focusElement($,!0),$},focusLast(a=i){let c=s.current;if(!c)return null;let{tabbable:d=i.tabbable,accept:g=i.accept}=a,b=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:d,accept:g}),$=$9bf71ea28793e738$var$last(b);return $&&$9bf71ea28793e738$var$focusElement($,!0),$??null}}}function $9bf71ea28793e738$var$last(s){let i,a;do a=s.lastChild(),a&&(i=a);while(a);return i}class $9bf71ea28793e738$var$Tree{get size(){return this.fastMap.size}getTreeNode(i){return this.fastMap.get(i)}addTreeNode(i,a,c){let d=this.fastMap.get(a??null);if(!d)return;let g=new $9bf71ea28793e738$var$TreeNode({scopeRef:i});d.addChild(g),g.parent=d,this.fastMap.set(i,g),c&&(g.nodeToRestore=c)}addNode(i){this.fastMap.set(i.scopeRef,i)}removeTreeNode(i){if(i===null)return;let a=this.fastMap.get(i);if(!a)return;let c=a.parent;for(let g of this.traverse())g!==a&&a.nodeToRestore&&g.nodeToRestore&&a.scopeRef&&a.scopeRef.current&&$9bf71ea28793e738$var$isElementInScope(g.nodeToRestore,a.scopeRef.current)&&(g.nodeToRestore=a.nodeToRestore);let d=a.children;c&&(c.removeChild(a),d.size>0&&d.forEach(g=>c&&c.addChild(g))),this.fastMap.delete(a.scopeRef)}*traverse(i=this.root){if(i.scopeRef!=null&&(yield i),i.children.size>0)for(let a of i.children)yield*this.traverse(a)}clone(){var i;let a=new $9bf71ea28793e738$var$Tree;var c;for(let d of this.traverse())a.addTreeNode(d.scopeRef,(c=(i=d.parent)===null||i===void 0?void 0:i.scopeRef)!==null&&c!==void 0?c:null,d.nodeToRestore);return a}constructor(){this.fastMap=new Map,this.root=new $9bf71ea28793e738$var$TreeNode({scopeRef:null}),this.fastMap.set(null,this.root)}}class $9bf71ea28793e738$var$TreeNode{addChild(i){this.children.add(i),i.parent=this}removeChild(i){this.children.delete(i),i.parent=void 0}constructor(i){this.children=new Set,this.contain=!1,this.scopeRef=i.scopeRef}}let $9bf71ea28793e738$export$d06fae2ee68b101e=new $9bf71ea28793e738$var$Tree;const CancelFilledIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})),WarningIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"WarningOutlined"),min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=s=>({x:s,y:s}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(s,i,a){return max(s,min(i,a))}function evaluate(s,i){return typeof s=="function"?s(i):s}function getSide(s){return s.split("-")[0]}function getAlignment(s){return s.split("-")[1]}function getOppositeAxis(s){return s==="x"?"y":"x"}function getAxisLength(s){return s==="y"?"height":"width"}function getSideAxis(s){return["top","bottom"].includes(getSide(s))?"y":"x"}function getAlignmentAxis(s){return getOppositeAxis(getSideAxis(s))}function getAlignmentSides(s,i,a){a===void 0&&(a=!1);const c=getAlignment(s),d=getAlignmentAxis(s),g=getAxisLength(d);let b=d==="x"?c===(a?"end":"start")?"right":"left":c==="start"?"bottom":"top";return i.reference[g]>i.floating[g]&&(b=getOppositePlacement(b)),[b,getOppositePlacement(b)]}function getExpandedPlacements(s){const i=getOppositePlacement(s);return[getOppositeAlignmentPlacement(s),i,getOppositeAlignmentPlacement(i)]}function getOppositeAlignmentPlacement(s){return s.replace(/start|end/g,i=>oppositeAlignmentMap[i])}function getSideList(s,i,a){const c=["left","right"],d=["right","left"],g=["top","bottom"],b=["bottom","top"];switch(s){case"top":case"bottom":return a?i?d:c:i?c:d;case"left":case"right":return i?g:b;default:return[]}}function getOppositeAxisPlacements(s,i,a,c){const d=getAlignment(s);let g=getSideList(getSide(s),a==="start",c);return d&&(g=g.map(b=>b+"-"+d),i&&(g=g.concat(g.map(getOppositeAlignmentPlacement)))),g}function getOppositePlacement(s){return s.replace(/left|right|bottom|top/g,i=>oppositeSideMap[i])}function expandPaddingObject(s){return{top:0,right:0,bottom:0,left:0,...s}}function getPaddingObject(s){return typeof s!="number"?expandPaddingObject(s):{top:s,right:s,bottom:s,left:s}}function rectToClientRect(s){return{...s,top:s.y,left:s.x,right:s.x+s.width,bottom:s.y+s.height}}function computeCoordsFromPlacement(s,i,a){let{reference:c,floating:d}=s;const g=getSideAxis(i),b=getAlignmentAxis(i),$=getAxisLength(b),j=getSide(i),_=g==="y",_e=c.x+c.width/2-d.width/2,et=c.y+c.height/2-d.height/2,tt=c[$]/2-d[$]/2;let rt;switch(j){case"top":rt={x:_e,y:c.y-d.height};break;case"bottom":rt={x:_e,y:c.y+c.height};break;case"right":rt={x:c.x+c.width,y:et};break;case"left":rt={x:c.x-d.width,y:et};break;default:rt={x:c.x,y:c.y}}switch(getAlignment(i)){case"start":rt[b]-=tt*(a&&_?-1:1);break;case"end":rt[b]+=tt*(a&&_?-1:1);break}return rt}const computePosition$1=async(s,i,a)=>{const{placement:c="bottom",strategy:d="absolute",middleware:g=[],platform:b}=a,$=g.filter(Boolean),j=await(b.isRTL==null?void 0:b.isRTL(i));let _=await b.getElementRects({reference:s,floating:i,strategy:d}),{x:_e,y:et}=computeCoordsFromPlacement(_,c,j),tt=c,rt={},nt=0;for(let at=0;at<$.length;at++){const{name:ut,fn:ot}=$[at],{x:st,y:it,data:ct,reset:lt}=await ot({x:_e,y:et,initialPlacement:c,placement:tt,strategy:d,middlewareData:rt,rects:_,platform:b,elements:{reference:s,floating:i}});if(_e=st??_e,et=it??et,rt={...rt,[ut]:{...rt[ut],...ct}},lt&&nt<=50){nt++,typeof lt=="object"&&(lt.placement&&(tt=lt.placement),lt.rects&&(_=lt.rects===!0?await b.getElementRects({reference:s,floating:i,strategy:d}):lt.rects),{x:_e,y:et}=computeCoordsFromPlacement(_,tt,j)),at=-1;continue}}return{x:_e,y:et,placement:tt,strategy:d,middlewareData:rt}};async function detectOverflow(s,i){var a;i===void 0&&(i={});const{x:c,y:d,platform:g,rects:b,elements:$,strategy:j}=s,{boundary:_="clippingAncestors",rootBoundary:_e="viewport",elementContext:et="floating",altBoundary:tt=!1,padding:rt=0}=evaluate(i,s),nt=getPaddingObject(rt),ut=$[tt?et==="floating"?"reference":"floating":et],ot=rectToClientRect(await g.getClippingRect({element:(a=await(g.isElement==null?void 0:g.isElement(ut)))==null||a?ut:ut.contextElement||await(g.getDocumentElement==null?void 0:g.getDocumentElement($.floating)),boundary:_,rootBoundary:_e,strategy:j})),st=et==="floating"?{...b.floating,x:c,y:d}:b.reference,it=await(g.getOffsetParent==null?void 0:g.getOffsetParent($.floating)),ct=await(g.isElement==null?void 0:g.isElement(it))?await(g.getScale==null?void 0:g.getScale(it))||{x:1,y:1}:{x:1,y:1},lt=rectToClientRect(g.convertOffsetParentRelativeRectToViewportRelativeRect?await g.convertOffsetParentRelativeRectToViewportRelativeRect({rect:st,offsetParent:it,strategy:j}):st);return{top:(ot.top-lt.top+nt.top)/ct.y,bottom:(lt.bottom-ot.bottom+nt.bottom)/ct.y,left:(ot.left-lt.left+nt.left)/ct.x,right:(lt.right-ot.right+nt.right)/ct.x}}const arrow$1=s=>({name:"arrow",options:s,async fn(i){const{x:a,y:c,placement:d,rects:g,platform:b,elements:$,middlewareData:j}=i,{element:_,padding:_e=0}=evaluate(s,i)||{};if(_==null)return{};const et=getPaddingObject(_e),tt={x:a,y:c},rt=getAlignmentAxis(d),nt=getAxisLength(rt),at=await b.getDimensions(_),ut=rt==="y",ot=ut?"top":"left",st=ut?"bottom":"right",it=ut?"clientHeight":"clientWidth",ct=g.reference[nt]+g.reference[rt]-tt[rt]-g.floating[nt],lt=tt[rt]-g.reference[rt],dt=await(b.getOffsetParent==null?void 0:b.getOffsetParent(_));let mt=dt?dt[it]:0;(!mt||!await(b.isElement==null?void 0:b.isElement(dt)))&&(mt=$.floating[it]||g.floating[nt]);const ht=ct/2-lt/2,Rt=mt/2-at[nt]/2-1,Ct=min(et[ot],Rt),Pt=min(et[st],Rt),gt=Ct,ft=mt-at[nt]-Pt,pt=mt/2-at[nt]/2+ht,bt=clamp$1(gt,pt,ft),St=!j.arrow&&getAlignment(d)!=null&&pt!=bt&&g.reference[nt]/2-(ptgt<=0)){var Rt,Ct;const gt=(((Rt=g.flip)==null?void 0:Rt.index)||0)+1,ft=lt[gt];if(ft)return{data:{index:gt,overflows:ht},reset:{placement:ft}};let pt=(Ct=ht.filter(bt=>bt.overflows[0]<=0).sort((bt,St)=>bt.overflows[1]-St.overflows[1])[0])==null?void 0:Ct.placement;if(!pt)switch(rt){case"bestFit":{var Pt;const bt=(Pt=ht.map(St=>[St.placement,St.overflows.filter($t=>$t>0).reduce(($t,wt)=>$t+wt,0)]).sort((St,$t)=>St[1]-$t[1])[0])==null?void 0:Pt[0];bt&&(pt=bt);break}case"initialPlacement":pt=$;break}if(d!==pt)return{reset:{placement:pt}}}return{}}}};async function convertValueToCoords(s,i){const{placement:a,platform:c,elements:d}=s,g=await(c.isRTL==null?void 0:c.isRTL(d.floating)),b=getSide(a),$=getAlignment(a),j=getSideAxis(a)==="y",_=["left","top"].includes(b)?-1:1,_e=g&&j?-1:1,et=evaluate(i,s);let{mainAxis:tt,crossAxis:rt,alignmentAxis:nt}=typeof et=="number"?{mainAxis:et,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...et};return $&&typeof nt=="number"&&(rt=$==="end"?nt*-1:nt),j?{x:rt*_e,y:tt*_}:{x:tt*_,y:rt*_e}}const offset=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(i){const{x:a,y:c}=i,d=await convertValueToCoords(i,s);return{x:a+d.x,y:c+d.y,data:d}}}},shift=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(i){const{x:a,y:c,placement:d}=i,{mainAxis:g=!0,crossAxis:b=!1,limiter:$={fn:ut=>{let{x:ot,y:st}=ut;return{x:ot,y:st}}},...j}=evaluate(s,i),_={x:a,y:c},_e=await detectOverflow(i,j),et=getSideAxis(getSide(d)),tt=getOppositeAxis(et);let rt=_[tt],nt=_[et];if(g){const ut=tt==="y"?"top":"left",ot=tt==="y"?"bottom":"right",st=rt+_e[ut],it=rt-_e[ot];rt=clamp$1(st,rt,it)}if(b){const ut=et==="y"?"top":"left",ot=et==="y"?"bottom":"right",st=nt+_e[ut],it=nt-_e[ot];nt=clamp$1(st,nt,it)}const at=$.fn({...i,[tt]:rt,[et]:nt});return{...at,data:{x:at.x-a,y:at.y-c}}}}},size=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(i){const{placement:a,rects:c,platform:d,elements:g}=i,{apply:b=()=>{},...$}=evaluate(s,i),j=await detectOverflow(i,$),_=getSide(a),_e=getAlignment(a),et=getSideAxis(a)==="y",{width:tt,height:rt}=c.floating;let nt,at;_==="top"||_==="bottom"?(nt=_,at=_e===(await(d.isRTL==null?void 0:d.isRTL(g.floating))?"start":"end")?"left":"right"):(at=_,nt=_e==="end"?"top":"bottom");const ut=rt-j[nt],ot=tt-j[at],st=!i.middlewareData.shift;let it=ut,ct=ot;if(et){const dt=tt-j.left-j.right;ct=_e||st?min(ot,dt):dt}else{const dt=rt-j.top-j.bottom;it=_e||st?min(ut,dt):dt}if(st&&!_e){const dt=max(j.left,0),mt=max(j.right,0),ht=max(j.top,0),Rt=max(j.bottom,0);et?ct=tt-2*(dt!==0||mt!==0?dt+mt:max(j.left,j.right)):it=rt-2*(ht!==0||Rt!==0?ht+Rt:max(j.top,j.bottom))}await b({...i,availableWidth:ct,availableHeight:it});const lt=await d.getDimensions(g.floating);return tt!==lt.width||rt!==lt.height?{reset:{rects:!0}}:{}}}};function getNodeName(s){return isNode(s)?(s.nodeName||"").toLowerCase():"#document"}function getWindow(s){var i;return(s==null||(i=s.ownerDocument)==null?void 0:i.defaultView)||window}function getDocumentElement(s){var i;return(i=(isNode(s)?s.ownerDocument:s.document)||window.document)==null?void 0:i.documentElement}function isNode(s){return s instanceof Node||s instanceof getWindow(s).Node}function isElement$1(s){return s instanceof Element||s instanceof getWindow(s).Element}function isHTMLElement$1(s){return s instanceof HTMLElement||s instanceof getWindow(s).HTMLElement}function isShadowRoot(s){return typeof ShadowRoot>"u"?!1:s instanceof ShadowRoot||s instanceof getWindow(s).ShadowRoot}function isOverflowElement(s){const{overflow:i,overflowX:a,overflowY:c,display:d}=getComputedStyle$1(s);return/auto|scroll|overlay|hidden|clip/.test(i+c+a)&&!["inline","contents"].includes(d)}function isTableElement(s){return["table","td","th"].includes(getNodeName(s))}function isContainingBlock(s){const i=isWebKit(),a=getComputedStyle$1(s);return a.transform!=="none"||a.perspective!=="none"||(a.containerType?a.containerType!=="normal":!1)||!i&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!i&&(a.filter?a.filter!=="none":!1)||["transform","perspective","filter"].some(c=>(a.willChange||"").includes(c))||["paint","layout","strict","content"].some(c=>(a.contain||"").includes(c))}function getContainingBlock(s){let i=getParentNode(s);for(;isHTMLElement$1(i)&&!isLastTraversableNode(i);){if(isContainingBlock(i))return i;i=getParentNode(i)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(s){return["html","body","#document"].includes(getNodeName(s))}function getComputedStyle$1(s){return getWindow(s).getComputedStyle(s)}function getNodeScroll(s){return isElement$1(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.pageXOffset,scrollTop:s.pageYOffset}}function getParentNode(s){if(getNodeName(s)==="html")return s;const i=s.assignedSlot||s.parentNode||isShadowRoot(s)&&s.host||getDocumentElement(s);return isShadowRoot(i)?i.host:i}function getNearestOverflowAncestor(s){const i=getParentNode(s);return isLastTraversableNode(i)?s.ownerDocument?s.ownerDocument.body:s.body:isHTMLElement$1(i)&&isOverflowElement(i)?i:getNearestOverflowAncestor(i)}function getOverflowAncestors(s,i,a){var c;i===void 0&&(i=[]),a===void 0&&(a=!0);const d=getNearestOverflowAncestor(s),g=d===((c=s.ownerDocument)==null?void 0:c.body),b=getWindow(d);return g?i.concat(b,b.visualViewport||[],isOverflowElement(d)?d:[],b.frameElement&&a?getOverflowAncestors(b.frameElement):[]):i.concat(d,getOverflowAncestors(d,[],a))}function getCssDimensions(s){const i=getComputedStyle$1(s);let a=parseFloat(i.width)||0,c=parseFloat(i.height)||0;const d=isHTMLElement$1(s),g=d?s.offsetWidth:a,b=d?s.offsetHeight:c,$=round(a)!==g||round(c)!==b;return $&&(a=g,c=b),{width:a,height:c,$}}function unwrapElement(s){return isElement$1(s)?s:s.contextElement}function getScale(s){const i=unwrapElement(s);if(!isHTMLElement$1(i))return createCoords(1);const a=i.getBoundingClientRect(),{width:c,height:d,$:g}=getCssDimensions(i);let b=(g?round(a.width):a.width)/c,$=(g?round(a.height):a.height)/d;return(!b||!Number.isFinite(b))&&(b=1),(!$||!Number.isFinite($))&&($=1),{x:b,y:$}}const noOffsets=createCoords(0);function getVisualOffsets(s){const i=getWindow(s);return!isWebKit()||!i.visualViewport?noOffsets:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function shouldAddVisualOffsets(s,i,a){return i===void 0&&(i=!1),!a||i&&a!==getWindow(s)?!1:i}function getBoundingClientRect(s,i,a,c){i===void 0&&(i=!1),a===void 0&&(a=!1);const d=s.getBoundingClientRect(),g=unwrapElement(s);let b=createCoords(1);i&&(c?isElement$1(c)&&(b=getScale(c)):b=getScale(s));const $=shouldAddVisualOffsets(g,a,c)?getVisualOffsets(g):createCoords(0);let j=(d.left+$.x)/b.x,_=(d.top+$.y)/b.y,_e=d.width/b.x,et=d.height/b.y;if(g){const tt=getWindow(g),rt=c&&isElement$1(c)?getWindow(c):c;let nt=tt.frameElement;for(;nt&&c&&rt!==tt;){const at=getScale(nt),ut=nt.getBoundingClientRect(),ot=getComputedStyle$1(nt),st=ut.left+(nt.clientLeft+parseFloat(ot.paddingLeft))*at.x,it=ut.top+(nt.clientTop+parseFloat(ot.paddingTop))*at.y;j*=at.x,_*=at.y,_e*=at.x,et*=at.y,j+=st,_+=it,nt=getWindow(nt).frameElement}}return rectToClientRect({width:_e,height:et,x:j,y:_})}function convertOffsetParentRelativeRectToViewportRelativeRect(s){let{rect:i,offsetParent:a,strategy:c}=s;const d=isHTMLElement$1(a),g=getDocumentElement(a);if(a===g)return i;let b={scrollLeft:0,scrollTop:0},$=createCoords(1);const j=createCoords(0);if((d||!d&&c!=="fixed")&&((getNodeName(a)!=="body"||isOverflowElement(g))&&(b=getNodeScroll(a)),isHTMLElement$1(a))){const _=getBoundingClientRect(a);$=getScale(a),j.x=_.x+a.clientLeft,j.y=_.y+a.clientTop}return{width:i.width*$.x,height:i.height*$.y,x:i.x*$.x-b.scrollLeft*$.x+j.x,y:i.y*$.y-b.scrollTop*$.y+j.y}}function getClientRects(s){return Array.from(s.getClientRects())}function getWindowScrollBarX(s){return getBoundingClientRect(getDocumentElement(s)).left+getNodeScroll(s).scrollLeft}function getDocumentRect(s){const i=getDocumentElement(s),a=getNodeScroll(s),c=s.ownerDocument.body,d=max(i.scrollWidth,i.clientWidth,c.scrollWidth,c.clientWidth),g=max(i.scrollHeight,i.clientHeight,c.scrollHeight,c.clientHeight);let b=-a.scrollLeft+getWindowScrollBarX(s);const $=-a.scrollTop;return getComputedStyle$1(c).direction==="rtl"&&(b+=max(i.clientWidth,c.clientWidth)-d),{width:d,height:g,x:b,y:$}}function getViewportRect(s,i){const a=getWindow(s),c=getDocumentElement(s),d=a.visualViewport;let g=c.clientWidth,b=c.clientHeight,$=0,j=0;if(d){g=d.width,b=d.height;const _=isWebKit();(!_||_&&i==="fixed")&&($=d.offsetLeft,j=d.offsetTop)}return{width:g,height:b,x:$,y:j}}function getInnerBoundingClientRect(s,i){const a=getBoundingClientRect(s,!0,i==="fixed"),c=a.top+s.clientTop,d=a.left+s.clientLeft,g=isHTMLElement$1(s)?getScale(s):createCoords(1),b=s.clientWidth*g.x,$=s.clientHeight*g.y,j=d*g.x,_=c*g.y;return{width:b,height:$,x:j,y:_}}function getClientRectFromClippingAncestor(s,i,a){let c;if(i==="viewport")c=getViewportRect(s,a);else if(i==="document")c=getDocumentRect(getDocumentElement(s));else if(isElement$1(i))c=getInnerBoundingClientRect(i,a);else{const d=getVisualOffsets(s);c={...i,x:i.x-d.x,y:i.y-d.y}}return rectToClientRect(c)}function hasFixedPositionAncestor(s,i){const a=getParentNode(s);return a===i||!isElement$1(a)||isLastTraversableNode(a)?!1:getComputedStyle$1(a).position==="fixed"||hasFixedPositionAncestor(a,i)}function getClippingElementAncestors(s,i){const a=i.get(s);if(a)return a;let c=getOverflowAncestors(s,[],!1).filter($=>isElement$1($)&&getNodeName($)!=="body"),d=null;const g=getComputedStyle$1(s).position==="fixed";let b=g?getParentNode(s):s;for(;isElement$1(b)&&!isLastTraversableNode(b);){const $=getComputedStyle$1(b),j=isContainingBlock(b);!j&&$.position==="fixed"&&(d=null),(g?!j&&!d:!j&&$.position==="static"&&!!d&&["absolute","fixed"].includes(d.position)||isOverflowElement(b)&&!j&&hasFixedPositionAncestor(s,b))?c=c.filter(_e=>_e!==b):d=$,b=getParentNode(b)}return i.set(s,c),c}function getClippingRect(s){let{element:i,boundary:a,rootBoundary:c,strategy:d}=s;const b=[...a==="clippingAncestors"?getClippingElementAncestors(i,this._c):[].concat(a),c],$=b[0],j=b.reduce((_,_e)=>{const et=getClientRectFromClippingAncestor(i,_e,d);return _.top=max(et.top,_.top),_.right=min(et.right,_.right),_.bottom=min(et.bottom,_.bottom),_.left=max(et.left,_.left),_},getClientRectFromClippingAncestor(i,$,d));return{width:j.right-j.left,height:j.bottom-j.top,x:j.left,y:j.top}}function getDimensions(s){return getCssDimensions(s)}function getRectRelativeToOffsetParent(s,i,a){const c=isHTMLElement$1(i),d=getDocumentElement(i),g=a==="fixed",b=getBoundingClientRect(s,!0,g,i);let $={scrollLeft:0,scrollTop:0};const j=createCoords(0);if(c||!c&&!g)if((getNodeName(i)!=="body"||isOverflowElement(d))&&($=getNodeScroll(i)),c){const _=getBoundingClientRect(i,!0,g,i);j.x=_.x+i.clientLeft,j.y=_.y+i.clientTop}else d&&(j.x=getWindowScrollBarX(d));return{x:b.left+$.scrollLeft-j.x,y:b.top+$.scrollTop-j.y,width:b.width,height:b.height}}function getTrueOffsetParent(s,i){return!isHTMLElement$1(s)||getComputedStyle$1(s).position==="fixed"?null:i?i(s):s.offsetParent}function getOffsetParent(s,i){const a=getWindow(s);if(!isHTMLElement$1(s))return a;let c=getTrueOffsetParent(s,i);for(;c&&isTableElement(c)&&getComputedStyle$1(c).position==="static";)c=getTrueOffsetParent(c,i);return c&&(getNodeName(c)==="html"||getNodeName(c)==="body"&&getComputedStyle$1(c).position==="static"&&!isContainingBlock(c))?a:c||getContainingBlock(s)||a}const getElementRects=async function(s){let{reference:i,floating:a,strategy:c}=s;const d=this.getOffsetParent||getOffsetParent,g=this.getDimensions;return{reference:getRectRelativeToOffsetParent(i,await d(a),c),floating:{x:0,y:0,...await g(a)}}};function isRTL(s){return getComputedStyle$1(s).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement:isElement$1,isRTL};function observeMove(s,i){let a=null,c;const d=getDocumentElement(s);function g(){clearTimeout(c),a&&a.disconnect(),a=null}function b($,j){$===void 0&&($=!1),j===void 0&&(j=1),g();const{left:_,top:_e,width:et,height:tt}=s.getBoundingClientRect();if($||i(),!et||!tt)return;const rt=floor(_e),nt=floor(d.clientWidth-(_+et)),at=floor(d.clientHeight-(_e+tt)),ut=floor(_),st={rootMargin:-rt+"px "+-nt+"px "+-at+"px "+-ut+"px",threshold:max(0,min(1,j))||1};let it=!0;function ct(lt){const dt=lt[0].intersectionRatio;if(dt!==j){if(!it)return b();dt?b(!1,dt):c=setTimeout(()=>{b(!1,1e-7)},100)}it=!1}try{a=new IntersectionObserver(ct,{...st,root:d.ownerDocument})}catch{a=new IntersectionObserver(ct,st)}a.observe(s)}return b(!0),g}function autoUpdate(s,i,a,c){c===void 0&&(c={});const{ancestorScroll:d=!0,ancestorResize:g=!0,elementResize:b=typeof ResizeObserver=="function",layoutShift:$=typeof IntersectionObserver=="function",animationFrame:j=!1}=c,_=unwrapElement(s),_e=d||g?[..._?getOverflowAncestors(_):[],...getOverflowAncestors(i)]:[];_e.forEach(ot=>{d&&ot.addEventListener("scroll",a,{passive:!0}),g&&ot.addEventListener("resize",a)});const et=_&&$?observeMove(_,a):null;let tt=-1,rt=null;b&&(rt=new ResizeObserver(ot=>{let[st]=ot;st&&st.target===_&&rt&&(rt.unobserve(i),cancelAnimationFrame(tt),tt=requestAnimationFrame(()=>{rt&&rt.observe(i)})),a()}),_&&!j&&rt.observe(_),rt.observe(i));let nt,at=j?getBoundingClientRect(s):null;j&&ut();function ut(){const ot=getBoundingClientRect(s);at&&(ot.x!==at.x||ot.y!==at.y||ot.width!==at.width||ot.height!==at.height)&&a(),at=ot,nt=requestAnimationFrame(ut)}return a(),()=>{_e.forEach(ot=>{d&&ot.removeEventListener("scroll",a),g&&ot.removeEventListener("resize",a)}),et&&et(),rt&&rt.disconnect(),rt=null,j&&cancelAnimationFrame(nt)}}const computePosition=(s,i,a)=>{const c=new Map,d={platform,...a},g={...d.platform,_c:c};return computePosition$1(s,i,{...d,platform:g})},arrow=s=>{function i(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:s,fn(a){const{element:c,padding:d}=typeof s=="function"?s(a):s;return c&&i(c)?c.current!=null?arrow$1({element:c.current,padding:d}).fn(a):{}:c?arrow$1({element:c,padding:d}).fn(a):{}}}};var index=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function deepEqual$1(s,i){if(s===i)return!0;if(typeof s!=typeof i)return!1;if(typeof s=="function"&&s.toString()===i.toString())return!0;let a,c,d;if(s&&i&&typeof s=="object"){if(Array.isArray(s)){if(a=s.length,a!=i.length)return!1;for(c=a;c--!==0;)if(!deepEqual$1(s[c],i[c]))return!1;return!0}if(d=Object.keys(s),a=d.length,a!==Object.keys(i).length)return!1;for(c=a;c--!==0;)if(!{}.hasOwnProperty.call(i,d[c]))return!1;for(c=a;c--!==0;){const g=d[c];if(!(g==="_owner"&&s.$$typeof)&&!deepEqual$1(s[g],i[g]))return!1}return!0}return s!==s&&i!==i}function getDPR(s){return typeof window>"u"?1:(s.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(s,i){const a=getDPR(s);return Math.round(i*a)/a}function useLatestRef(s){const i=reactExports.useRef(s);return index(()=>{i.current=s}),i}function useFloating(s){s===void 0&&(s={});const{placement:i="bottom",strategy:a="absolute",middleware:c=[],platform:d,elements:{reference:g,floating:b}={},transform:$=!0,whileElementsMounted:j,open:_}=s,[_e,et]=reactExports.useState({x:0,y:0,strategy:a,placement:i,middlewareData:{},isPositioned:!1}),[tt,rt]=reactExports.useState(c);deepEqual$1(tt,c)||rt(c);const[nt,at]=reactExports.useState(null),[ut,ot]=reactExports.useState(null),st=reactExports.useCallback(St=>{St!=dt.current&&(dt.current=St,at(St))},[at]),it=reactExports.useCallback(St=>{St!==mt.current&&(mt.current=St,ot(St))},[ot]),ct=g||nt,lt=b||ut,dt=reactExports.useRef(null),mt=reactExports.useRef(null),ht=reactExports.useRef(_e),Rt=useLatestRef(j),Ct=useLatestRef(d),Pt=reactExports.useCallback(()=>{if(!dt.current||!mt.current)return;const St={placement:i,strategy:a,middleware:tt};Ct.current&&(St.platform=Ct.current),computePosition(dt.current,mt.current,St).then($t=>{const wt={...$t,isPositioned:!0};gt.current&&!deepEqual$1(ht.current,wt)&&(ht.current=wt,reactDomExports.flushSync(()=>{et(wt)}))})},[tt,i,a,Ct]);index(()=>{_===!1&&ht.current.isPositioned&&(ht.current.isPositioned=!1,et(St=>({...St,isPositioned:!1})))},[_]);const gt=reactExports.useRef(!1);index(()=>(gt.current=!0,()=>{gt.current=!1}),[]),index(()=>{if(ct&&(dt.current=ct),lt&&(mt.current=lt),ct&<){if(Rt.current)return Rt.current(ct,lt,Pt);Pt()}},[ct,lt,Pt,Rt]);const ft=reactExports.useMemo(()=>({reference:dt,floating:mt,setReference:st,setFloating:it}),[st,it]),pt=reactExports.useMemo(()=>({reference:ct,floating:lt}),[ct,lt]),bt=reactExports.useMemo(()=>{const St={position:a,left:0,top:0};if(!pt.floating)return St;const $t=roundByDPR(pt.floating,_e.x),wt=roundByDPR(pt.floating,_e.y);return $?{...St,transform:"translate("+$t+"px, "+wt+"px)",...getDPR(pt.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:$t,top:wt}},[a,$,pt.floating,_e.x,_e.y]);return reactExports.useMemo(()=>({..._e,update:Pt,refs:ft,elements:pt,floatingStyles:bt}),[_e,Pt,ft,pt,bt])}function o(s){return i=>{s.forEach(a=>{typeof a=="function"?a(i):a!=null&&(a.current=i)})}}function useFloatingPosition({floatingWidth:s,ref:i,disablePositioning:a=!1,placement:c="bottom",offset:d=2,showArrow:g=!1,maxHeight:b,shiftMainAxis:$=!0,shiftCrossAxis:j=!0,fallbackPlacements:_}){const _e=reactExports.useRef(null),et={placement:c,strategy:"fixed"};a||(et.whileElementsMounted=autoUpdate,et.middleware=[offset(d),shift({padding:16,crossAxis:j,mainAxis:$}),flip({padding:16,fallbackPlacements:_}),size({apply({rects:st,availableHeight:it,availableWidth:ct,elements:lt}){s==="matchTrigger"&&b!=null?Object.assign(lt.floating.style,{width:`${st.reference.width}px`,maxWidth:`${ct}`,maxHeight:`${Math.min(it,b)}px`}):b!=null&&Object.assign(lt.floating.style,{maxHeight:`${Math.min(it,b)}px`})},padding:16})],g&&et.middleware.push(arrow({element:_e})));const tt=useFloating(et),rt=reactExports.useMemo(()=>o([i,tt.refs.setReference]),[tt.refs.setReference,i]),{x:nt,y:at}=tt.middlewareData.arrow||{},ut={top:"bottom",right:"left",bottom:"top",left:"right"}[tt.placement.split("-")[0]],ot={left:nt,top:at,right:"",bottom:"",[ut]:"-4px"};return{...tt,reference:rt,arrowRef:_e,arrowStyle:ot}}const PopoverAnimation={initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},transition:{type:"tween",duration:.125}};let rootEl=typeof document<"u"?document.getElementById("root")??document.body:void 0,themeEl=typeof document<"u"?document.documentElement:void 0;const TOOLTIP_COOLDOWN=500,tooltips={};let globalWarmedUp=!1,globalWarmUpTimeout=null,globalCooldownTimeout=null;const closeOpenTooltips=s=>{var i;for(const a in tooltips)a!==s&&((i=tooltips[a])==null||i.call(tooltips,!0),delete tooltips[a])},Tooltip=reactExports.forwardRef(({children:s,label:i,placement:a="top",offset:c=10,variant:d="neutral",delay:g=1500,isDisabled:b,usePortal:$=!0,...j},_)=>{const{x:_e,y:et,reference:tt,strategy:rt,arrowRef:nt,arrowStyle:at,refs:ut}=useFloatingPosition({placement:a,offset:c,ref:_,showArrow:!0}),[ot,st]=reactExports.useState(!1),it=reactExports.useId(),ct=reactExports.useRef(),lt=()=>{clearTimeout(ct.current),ct.current=void 0,closeOpenTooltips(it),tooltips[it]=dt,globalWarmedUp=!0,st(!0),globalWarmUpTimeout&&(clearTimeout(globalWarmUpTimeout),globalWarmUpTimeout=null),globalCooldownTimeout&&(clearTimeout(globalCooldownTimeout),globalCooldownTimeout=null)},dt=reactExports.useCallback(Ct=>{Ct?(clearTimeout(ct.current),ct.current=void 0,st(!1)):ct.current||(ct.current=setTimeout(()=>{ct.current=void 0,st(!1)},TOOLTIP_COOLDOWN)),globalWarmUpTimeout&&(clearTimeout(globalWarmUpTimeout),globalWarmUpTimeout=null),globalWarmedUp&&(globalCooldownTimeout&&clearTimeout(globalCooldownTimeout),globalCooldownTimeout=setTimeout(()=>{delete tooltips[it],globalCooldownTimeout=null,globalWarmedUp=!1},TOOLTIP_COOLDOWN))},[it]),mt=()=>{closeOpenTooltips(it),tooltips[it]=dt,!ot&&!globalWarmUpTimeout&&!globalWarmedUp?globalWarmUpTimeout=setTimeout(()=>{globalWarmUpTimeout=null,globalWarmedUp=!0,lt()},g):ot||lt()},ht=Ct=>{!Ct&&g>0&&!ct.current?mt():lt()};reactExports.useEffect(()=>()=>{clearTimeout(ct.current),tooltips[it]&&delete tooltips[it]},[it]),reactExports.useEffect(()=>{const Ct=Pt=>{Pt.key==="Escape"&&dt(!0)};if(ot)return document.addEventListener("keydown",Ct,!0),()=>{document.removeEventListener("keydown",Ct,!0)}},[ot,dt]);const Rt=jsxRuntimeExports.jsx(AnimatePresence,{children:ot&&jsxRuntimeExports.jsxs(m$1.div,{...PopoverAnimation,ref:ut.setFloating,id:it,role:"tooltip",onPointerEnter:()=>{ht(!0)},onPointerLeave:()=>{dt()},className:clsx("z-tooltip my-4 max-w-240 break-words rounded px-8 py-4 text-xs text-white shadow",d==="positive"&&"bg-positive",d==="danger"&&"bg-danger",d==="neutral"&&"bg-toast"),style:{position:rt,top:et??"",left:_e??""},children:[jsxRuntimeExports.jsx("div",{ref:nt,className:"absolute h-8 w-8 rotate-45 bg-inherit",style:at}),i]})});return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[reactExports.cloneElement(s,$3ef42575df84b30b$export$9d1611c77c2fe928({"aria-describedby":ot?it:void 0,ref:tt,onPointerEnter:Ct=>{Ct.pointerType==="mouse"&&ht()},onFocus:Ct=>{Ct.target.matches(":focus-visible")&&ht(!0)},onPointerLeave:Ct=>{Ct.pointerType==="mouse"&&dt()},onPointerDown:()=>{dt(!0)},onBlur:()=>{dt()},"aria-label":typeof i=="string"?i:i.props.message},j)),$?rootEl&&reactDomExports.createPortal(Rt,rootEl):Rt]})});function Chip(s){const{onRemove:i,disabled:a,invalid:c,errorMessage:d,children:g,className:b,selectable:$=!1,radius:j="rounded-full",elementType:_="div",to:_e,onClick:et}=s,tt=reactExports.useRef(null),rt=reactExports.useRef(null),nt=$9bf71ea28793e738$export$10c5169755ce7bd7(),at=ct=>{switch(ct.key){case"ArrowRight":case"ArrowDown":nt==null||nt.focusNext({tabbable:!0});break;case"ArrowLeft":case"ArrowUp":nt==null||nt.focusPrevious({tabbable:!0});break;case"Backspace":case"Delete":tt.current===document.activeElement&&(i==null||i());break}},ut=ct=>{ct.stopPropagation(),et?et(ct):tt.current.focus()},ot=sizeClassNames(s);let st=c||d!=null?jsxRuntimeExports.jsx(WarningIcon,{className:"text-danger",size:"sm"}):s.adornment&&reactExports.cloneElement(s.adornment,{size:ot.adornment.size,circle:!0,className:clsx(s.adornment.props.className,ot.adornment.margin)});d&&st&&(st=jsxRuntimeExports.jsx(Tooltip,{label:d,variant:"danger",children:st}));const it=_;return jsxRuntimeExports.jsxs(it,{tabIndex:$?0:void 0,ref:tt,to:_e,onKeyDown:$?at:void 0,onClick:$?ut:void 0,className:clsx("relative flex flex-shrink-0 items-center justify-center gap-10 overflow-hidden whitespace-nowrap outline-none transition-opacity","min-w-0 max-w-full after:pointer-events-none after:absolute after:inset-0",et&&"cursor-pointer",j,colorClassName(s),ot.chip,!a&&$&&"hover:after:bg-black/5 focus:after:bg-black/10",b,a&&"pointer-events-none opacity-70"),children:[st,jsxRuntimeExports.jsx("div",{className:"flex-auto overflow-hidden overflow-ellipsis",children:g}),i&&jsxRuntimeExports.jsx(ButtonBase,{ref:rt,className:clsx("text-black/30 dark:text-white/50",ot.closeButton),onClick:ct=>{ct.stopPropagation(),i()},tabIndex:-1,children:jsxRuntimeExports.jsx(CancelFilledIcon,{className:"block",width:"100%",height:"100%"})})]})}function sizeClassNames({size:s,onRemove:i}){switch(s){case"xs":return{adornment:{size:"xs",margin:"-ml-3"},chip:clsx("pl-8 h-20 text-xs font-medium w-max",!i&&"pr-8"),closeButton:"mr-4 w-14 h-14"};case"sm":return{adornment:{size:"xs",margin:"-ml-3"},chip:clsx("pl-8 h-26 text-xs",!i&&"pr-8"),closeButton:"mr-4 w-18 h-18"};case"lg":return{adornment:{size:"md",margin:"-ml-12"},chip:clsx("pl-18 h-38 text-base",!i&&"pr-18"),closeButton:"mr-6 w-24 h-24"};default:return{adornment:{size:"sm",margin:"-ml-6"},chip:clsx("pl-12 h-32 text-sm",!i&&"pr-12"),closeButton:"mr-6 w-22 h-22"}}}function colorClassName({color:s}){switch(s){case"primary":return"bg-primary text-on-primary";case"positive":return"bg-positive-lighter text-positive-darker";case"danger":return"bg-danger-lighter text-danger-darker";default:return"bg-chip text-main"}}const ErrorIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"ErrorOutlined"),scriptRel="modulepreload",assetsURL=function(s,i){return new URL(s,i).href},seen={},__vitePreload=function(i,a,c){if(!a||a.length===0)return i();const d=document.getElementsByTagName("link");return Promise.all(a.map(g=>{if(g=assetsURL(g,c),g in seen)return;seen[g]=!0;const b=g.endsWith(".css"),$=b?'[rel="stylesheet"]':"";if(!!c)for(let _e=d.length-1;_e>=0;_e--){const et=d[_e];if(et.href===g&&(!b||et.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${$}`))return;const _=document.createElement("link");if(_.rel=b?"stylesheet":scriptRel,b||(_.as="script",_.crossOrigin=""),_.href=g,document.head.appendChild(_),b)return new Promise((_e,et)=>{_.addEventListener("load",_e),_.addEventListener("error",()=>et(new Error(`Unable to preload CSS for ${g}`)))})})).then(()=>i()).catch(g=>{const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=g,window.dispatchEvent(b),!b.defaultPrevented)throw g})};function highlightAllCode(s,i="dark"){s.querySelectorAll("pre code").forEach(a=>{highlightCode(a,i)})}async function highlightCode(s,i="dark"){const{hljs:a}=await __vitePreload(()=>import("./highlight-e36522b6.js"),["./highlight-e36522b6.js","./c-e4cf58d6.js","./highlight-b5e2c008.css"],import.meta.url);s.dataset.highlighted||(s.classList.add(i==="dark"?"hljs-dark":"hljs-light"),a.highlightElement(s))}const KeyboardArrowDownIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),UnfoldMoreIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"}),"UnfoldMoreOutlined"),UnfoldLessIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"}),"UnfoldLessOutlined");function IgnitionStackTrace({trace:s,onSelectedIndexChange:i,selectedIndex:a,totalVendorGroups:c}){const[d,g]=reactExports.useState([]),b=d.length===c;return jsxRuntimeExports.jsxs("div",{className:"max-w-440 border-r text-sm",children:[jsxRuntimeExports.jsx("div",{className:"border-b px-30 py-16",children:jsxRuntimeExports.jsx(Button,{variant:"outline",size:"2xs",startIcon:b?jsxRuntimeExports.jsx(UnfoldLessIcon,{}):jsxRuntimeExports.jsx(UnfoldMoreIcon,{}),onClick:()=>{g(b?[]:s.map(($,j)=>"vendorGroup"in $?j:-1).filter($=>$!==-1))},children:b?jsxRuntimeExports.jsx(Trans,{message:"Collapse vendor frames"}):jsxRuntimeExports.jsx(Trans,{message:"Expand vendor frames"})})}),s.map(($,j)=>"vendorGroup"in $?d.includes(j)?jsxRuntimeExports.jsx(reactExports.Fragment,{children:$.items.map((_,_e)=>jsxRuntimeExports.jsx(StackTrackItem,{frame:_,onClick:()=>i(_.flatIndex),isSelected:a===_.flatIndex},`vendor-${_e}`))},j):jsxRuntimeExports.jsxs("div",{className:"flex cursor-pointer items-center gap-4 border-b px-30 py-16 hover:bg-hover",onClick:()=>g(_=>[..._,j]),children:[jsxRuntimeExports.jsx(Trans,{message:":count vendor [one frame|other frames]",values:{count:$.items.length}}),jsxRuntimeExports.jsx(KeyboardArrowDownIcon,{className:"text-muted"})]},j):jsxRuntimeExports.jsx(StackTrackItem,{frame:$,onClick:()=>i($.flatIndex),isSelected:a===$.flatIndex},j))]})}function StackTrackItem({frame:s,onClick:i,isSelected:a}){return jsxRuntimeExports.jsxs("div",{onClick:i,className:clsx("cursor-pointer border-b px-30 py-16",a?"bg-danger text-on-primary":"hover:bg-danger/10"),children:[jsxRuntimeExports.jsx(IgnitionFilePath,{frame:s}),jsxRuntimeExports.jsx("div",{className:"font-semibold",children:s.method})]})}function IgnitionFilePath({frame:s}){return jsxRuntimeExports.jsxs("div",{className:"inline-flex flex-wrap items-baseline",children:[s.path.map((i,a)=>s.path.length-1===a?jsxRuntimeExports.jsx("div",{className:"font-semibold",children:i},a):jsxRuntimeExports.jsxs("div",{children:[i,"/"]},a)),jsxRuntimeExports.jsxs("div",{children:[":",s.lineNumber]})]})}function IgnitionErrorDialog({error:s}){const[i,a]=reactExports.useState(()=>{for(const d of s.trace)if(!("vendorGroup"in d))return d.flatIndex;return 0}),c=reactExports.useMemo(()=>{for(const d of s.trace)if("vendorGroup"in d){for(const g of d.items)if(g.flatIndex===i)return g}else if(d.flatIndex===i)return d},[s,i]);return jsxRuntimeExports.jsxs(Dialog,{size:"fullscreen",children:[jsxRuntimeExports.jsx(DialogHeader,{showDivider:!0,leftAdornment:jsxRuntimeExports.jsx(ErrorIcon,{}),color:"text-danger",actions:jsxRuntimeExports.jsx(DownloadButton,{}),children:jsxRuntimeExports.jsx(Trans,{message:"An error occured"})}),jsxRuntimeExports.jsxs(DialogBody,{padding:"p-0 stack",children:[jsxRuntimeExports.jsxs("div",{className:"sticky top-0 z-10 border-b bg p-24",children:[jsxRuntimeExports.jsx(Chip,{className:"w-max",radius:"rounded-panel",children:s.exception}),jsxRuntimeExports.jsx("div",{className:"mt-16 line-clamp-2 text-lg font-semibold leading-snug",children:s.message})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-stretch gap-10",children:[jsxRuntimeExports.jsx(IgnitionStackTrace,{trace:s.trace,onSelectedIndexChange:a,selectedIndex:i,totalVendorGroups:s.totalVendorGroups}),c&&jsxRuntimeExports.jsx(CodeSnippet,{frame:c})]})]})]})}function CodeSnippet({frame:s}){const i=reactExports.useRef(null),a=Object.keys(s.codeSnippet).map(Number),c=a.indexOf(s.lineNumber),d=Object.values(s.codeSnippet);return jsxRuntimeExports.jsxs("div",{className:"sticky top-120 flex-auto",children:[jsxRuntimeExports.jsx("div",{className:"px-30 py-16 text-right text-muted",children:jsxRuntimeExports.jsx(IgnitionFilePath,{frame:s})}),jsxRuntimeExports.jsxs("div",{className:"flex",children:[jsxRuntimeExports.jsx("div",{className:"mr-8 select-none text-right",children:a.map((g,b)=>jsxRuntimeExports.jsx("div",{className:clsx("px-8 font-mono leading-loose text-muted",b==c&&"bg-danger/30"),children:g},b))}),jsxRuntimeExports.jsx("div",{className:"compact-scrollbar flex-grow overflow-x-auto",children:jsxRuntimeExports.jsx("pre",{children:jsxRuntimeExports.jsx("code",{className:"language-php",ref:i,children:d.map((g,b)=>jsxRuntimeExports.jsx(CodeSnippetLine,{isHighlighted:c===b,line:g},`${s.path}.${b}`))})})})]})]})}const CodeSnippetLine=reactExports.memo(({line:s,isHighlighted:i})=>{const a=reactExports.useRef(null);return reactExports.useEffect(()=>{const c=a.current;return highlightCode(c,"light"),()=>{delete c.dataset.highlighted}},[]),jsxRuntimeExports.jsx("span",{className:clsx("block leading-loose",i&&"bg-danger/20"),children:jsxRuntimeExports.jsx("span",{className:"language-php",ref:a,children:s+` `})})});function DownloadButton(){return jsxRuntimeExports.jsx(Button,{variant:"outline",className:"text-main",elementType:"a",download:!0,href:"api/v1/logs/error/download-latest",size:"2xs",children:jsxRuntimeExports.jsx(Trans,{message:"Download log"})})}const useDialogStore=create()(immer((s,i)=>({dialog:null,data:void 0,resolveClosePromise:null,openDialog:(a,c)=>new Promise(d=>{s(g=>{g.dialog=a,g.data=c,g.resolveClosePromise=d})}),closeActiveDialog:a=>{var c,d;(d=(c=i()).resolveClosePromise)==null||d.call(c,a),s(g=>{g.dialog=null,g.data=void 0,g.resolveClosePromise=null})}}))),openDialog=useDialogStore.getState().openDialog,closeDialog=s=>{useDialogStore.getState().closeActiveDialog(s)},defaultErrorMessage=message("There was an issue. Please try again.");function showHttpErrorToast(s,i=defaultErrorMessage,a,c){var d,g,b,$;axios$1.isAxiosError(s)&&((g=(d=s.response)==null?void 0:d.data)!=null&&g.ignitionTrace)?openDialog(IgnitionErrorDialog,{error:s.response.data}):toast.danger(getAxiosErrorMessage(s,a)||i,{action:($=(b=s.response)==null?void 0:b.data)==null?void 0:$.action,...c})}function useMarkNotificationsAsRead(){const s=useBootstrapDataStore(i=>i.data);return useMutation({mutationFn:i=>UseMarkNotificationsAsRead(i),onSuccess:i=>{queryClient.invalidateQueries({queryKey:useUserNotifications.key}),i.unreadCount===0&&mergeBootstrapData({user:{...s.user,unread_notifications_count:0}})},onError:i=>showHttpErrorToast(i)})}function UseMarkNotificationsAsRead(s){return apiClient.post("notifications/mark-as-read",s).then(i=>i.data)}var dist$1={};Object.defineProperty(dist$1,"__esModule",{value:!0});dist$1.parse=parse;dist$1.serialize=serialize;const cookieNameRegExp=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,cookieValueRegExp=/^[\u0021-\u003A\u003C-\u007E]*$/,domainValueRegExp=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,pathValueRegExp=/^[\u0020-\u003A\u003D-\u007E]*$/,__toString=Object.prototype.toString,NullObject=(()=>{const s=function(){};return s.prototype=Object.create(null),s})();function parse(s,i){const a=new NullObject,c=s.length;if(c<2)return a;const d=(i==null?void 0:i.decode)||decode$2;let g=0;do{const b=s.indexOf("=",g);if(b===-1)break;const $=s.indexOf(";",g),j=$===-1?c:$;if(b>j){g=s.lastIndexOf(";",b-1)+1;continue}const _=startIndex(s,g,b),_e=endIndex(s,b,_),et=s.slice(_,_e);if(a[et]===void 0){let tt=startIndex(s,b+1,j),rt=endIndex(s,j,tt);const nt=d(s.slice(tt,rt));a[et]=nt}g=j+1}while(ga;){const c=s.charCodeAt(--i);if(c!==32&&c!==9)return i+1}return a}function serialize(s,i,a){const c=(a==null?void 0:a.encode)||encodeURIComponent;if(!cookieNameRegExp.test(s))throw new TypeError(`argument name is invalid: ${s}`);const d=c(i);if(!cookieValueRegExp.test(d))throw new TypeError(`argument val is invalid: ${i}`);let g=s+"="+d;if(!a)return g;if(a.maxAge!==void 0){if(!Number.isInteger(a.maxAge))throw new TypeError(`option maxAge is invalid: ${a.maxAge}`);g+="; Max-Age="+a.maxAge}if(a.domain){if(!domainValueRegExp.test(a.domain))throw new TypeError(`option domain is invalid: ${a.domain}`);g+="; Domain="+a.domain}if(a.path){if(!pathValueRegExp.test(a.path))throw new TypeError(`option path is invalid: ${a.path}`);g+="; Path="+a.path}if(a.expires){if(!isDate(a.expires)||!Number.isFinite(a.expires.valueOf()))throw new TypeError(`option expires is invalid: ${a.expires}`);g+="; Expires="+a.expires.toUTCString()}if(a.httpOnly&&(g+="; HttpOnly"),a.secure&&(g+="; Secure"),a.partitioned&&(g+="; Partitioned"),a.priority)switch(typeof a.priority=="string"?a.priority.toLowerCase():void 0){case"low":g+="; Priority=Low";break;case"medium":g+="; Priority=Medium";break;case"high":g+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${a.priority}`)}if(a.sameSite)switch(typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite){case!0:case"strict":g+="; SameSite=Strict";break;case"lax":g+="; SameSite=Lax";break;case"none":g+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${a.sameSite}`)}return g}function decode$2(s){if(s.indexOf("%")===-1)return s;try{return decodeURIComponent(s)}catch{return s}}function isDate(s){return __toString.call(s)==="[object Date]"}var PopStateEventType="popstate";function createBrowserHistory(s={}){function i(c,d){let{pathname:g,search:b,hash:$}=c.location;return createLocation("",{pathname:g,search:b,hash:$},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function a(c,d){return typeof d=="string"?d:createPath(d)}return getUrlBasedHistory(i,a,null,s)}function invariant(s,i){if(s===!1||s===null||typeof s>"u")throw new Error(i)}function warning(s,i){if(!s){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function createKey(){return Math.random().toString(36).substring(2,10)}function getHistoryState(s,i){return{usr:s.state,key:s.key,idx:i}}function createLocation(s,i,a=null,c){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof i=="string"?parsePath$1(i):i,state:a,key:i&&i.key||c||createKey()}}function createPath({pathname:s="/",search:i="",hash:a=""}){return i&&i!=="?"&&(s+=i.charAt(0)==="?"?i:"?"+i),a&&a!=="#"&&(s+=a.charAt(0)==="#"?a:"#"+a),s}function parsePath$1(s){let i={};if(s){let a=s.indexOf("#");a>=0&&(i.hash=s.substring(a),s=s.substring(0,a));let c=s.indexOf("?");c>=0&&(i.search=s.substring(c),s=s.substring(0,c)),s&&(i.pathname=s)}return i}function getUrlBasedHistory(s,i,a,c={}){let{window:d=document.defaultView,v5Compat:g=!1}=c,b=d.history,$="POP",j=null,_=_e();_==null&&(_=0,b.replaceState({...b.state,idx:_},""));function _e(){return(b.state||{idx:null}).idx}function et(){$="POP";let ut=_e(),ot=ut==null?null:ut-_;_=ut,j&&j({action:$,location:at.location,delta:ot})}function tt(ut,ot){$="PUSH";let st=createLocation(at.location,ut,ot);a&&a(st,ut),_=_e()+1;let it=getHistoryState(st,_),ct=at.createHref(st);try{b.pushState(it,"",ct)}catch(lt){if(lt instanceof DOMException&<.name==="DataCloneError")throw lt;d.location.assign(ct)}g&&j&&j({action:$,location:at.location,delta:1})}function rt(ut,ot){$="REPLACE";let st=createLocation(at.location,ut,ot);a&&a(st,ut),_=_e();let it=getHistoryState(st,_),ct=at.createHref(st);b.replaceState(it,"",ct),g&&j&&j({action:$,location:at.location,delta:0})}function nt(ut){let ot=d.location.origin!=="null"?d.location.origin:d.location.href,st=typeof ut=="string"?ut:createPath(ut);return st=st.replace(/ $/,"%20"),invariant(ot,`No window.location.(origin|href) available to create URL for href: ${st}`),new URL(st,ot)}let at={get action(){return $},get location(){return s(d,b)},listen(ut){if(j)throw new Error("A history only accepts one active listener");return d.addEventListener(PopStateEventType,et),j=ut,()=>{d.removeEventListener(PopStateEventType,et),j=null}},createHref(ut){return i(d,ut)},createURL:nt,encodeLocation(ut){let ot=nt(ut);return{pathname:ot.pathname,search:ot.search,hash:ot.hash}},push:tt,replace:rt,go(ut){return b.go(ut)}};return at}var immutableRouteKeys=new Set(["lazy","caseSensitive","path","id","index","children"]);function isIndexRoute(s){return s.index===!0}function convertRoutesToDataRoutes(s,i,a=[],c={}){return s.map((d,g)=>{let b=[...a,String(g)],$=typeof d.id=="string"?d.id:b.join("-");if(invariant(d.index!==!0||!d.children,"Cannot specify children on an index route"),invariant(!c[$],`Found a route id collision on id "${$}". Route id's must be globally unique within Data Router usages`),isIndexRoute(d)){let j={...d,...i(d),id:$};return c[$]=j,j}else{let j={...d,...i(d),id:$,children:void 0};return c[$]=j,d.children&&(j.children=convertRoutesToDataRoutes(d.children,i,b,c)),j}})}function matchRoutes(s,i,a="/"){return matchRoutesImpl(s,i,a,!1)}function matchRoutesImpl(s,i,a,c){let d=typeof i=="string"?parsePath$1(i):i,g=stripBasename(d.pathname||"/",a);if(g==null)return null;let b=flattenRoutes(s);rankRouteBranches(b);let $=null;for(let j=0;$==null&&j{let j={relativePath:$===void 0?g.path||"":$,caseSensitive:g.caseSensitive===!0,childrenIndex:b,route:g};j.relativePath.startsWith("/")&&(invariant(j.relativePath.startsWith(c),`Absolute route path "${j.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(c.length));let _=joinPaths([c,j.relativePath]),_e=a.concat(j);g.children&&g.children.length>0&&(invariant(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${_}".`),flattenRoutes(g.children,i,_e,_)),!(g.path==null&&!g.index)&&i.push({path:_,score:computeScore(_,g.index),routesMeta:_e})};return s.forEach((g,b)=>{var $;if(g.path===""||!(($=g.path)!=null&&$.includes("?")))d(g,b);else for(let j of explodeOptionalSegments(g.path))d(g,b,j)}),i}function explodeOptionalSegments(s){let i=s.split("/");if(i.length===0)return[];let[a,...c]=i,d=a.endsWith("?"),g=a.replace(/\?$/,"");if(c.length===0)return d?[g,""]:[g];let b=explodeOptionalSegments(c.join("/")),$=[];return $.push(...b.map(j=>j===""?g:[g,j].join("/"))),d&&$.push(...b),$.map(j=>s.startsWith("/")&&j===""?"/":j)}function rankRouteBranches(s){s.sort((i,a)=>i.score!==a.score?a.score-i.score:compareIndexes(i.routesMeta.map(c=>c.childrenIndex),a.routesMeta.map(c=>c.childrenIndex)))}var paramRe=/^:[\w-]+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=s=>s==="*";function computeScore(s,i){let a=s.split("/"),c=a.length;return a.some(isSplat)&&(c+=splatPenalty),i&&(c+=indexRouteValue),a.filter(d=>!isSplat(d)).reduce((d,g)=>d+(paramRe.test(g)?dynamicSegmentValue:g===""?emptySegmentValue:staticSegmentValue),c)}function compareIndexes(s,i){return s.length===i.length&&s.slice(0,-1).every((c,d)=>c===i[d])?s[s.length-1]-i[i.length-1]:0}function matchRouteBranch(s,i,a=!1){let{routesMeta:c}=s,d={},g="/",b=[];for(let $=0;${if(_e==="*"){let nt=$[tt]||"";b=g.slice(0,g.length-nt.length).replace(/(.)\/+$/,"$1")}const rt=$[tt];return et&&!rt?_[_e]=void 0:_[_e]=(rt||"").replace(/%2F/g,"/"),_},{}),pathname:g,pathnameBase:b,pattern:s}}function compilePath(s,i=!1,a=!0){warning(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let c=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(b,$,j)=>(c.push({paramName:$,isOptional:j!=null}),j?"/?([^\\/]+)?":"/([^\\/]+)"));return s.endsWith("*")?(c.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,i?void 0:"i"),c]}function decodePath(s){try{return s.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return warning(!1,`The URL path "${s}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),s}}function stripBasename(s,i){if(i==="/")return s;if(!s.toLowerCase().startsWith(i.toLowerCase()))return null;let a=i.endsWith("/")?i.length-1:i.length,c=s.charAt(a);return c&&c!=="/"?null:s.slice(a)||"/"}function resolvePath(s,i="/"){let{pathname:a,search:c="",hash:d=""}=typeof s=="string"?parsePath$1(s):s;return{pathname:a?a.startsWith("/")?a:resolvePathname(a,i):i,search:normalizeSearch(c),hash:normalizeHash(d)}}function resolvePathname(s,i){let a=i.replace(/\/+$/,"").split("/");return s.split("/").forEach(d=>{d===".."?a.length>1&&a.pop():d!=="."&&a.push(d)}),a.length>1?a.join("/"):"/"}function getInvalidPathError(s,i,a,c){return`Cannot include a '${s}' character in a manually specified \`to.${i}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function getPathContributingMatches(s){return s.filter((i,a)=>a===0||i.route.path&&i.route.path.length>0)}function getResolveToMatches(s){let i=getPathContributingMatches(s);return i.map((a,c)=>c===i.length-1?a.pathname:a.pathnameBase)}function resolveTo(s,i,a,c=!1){let d;typeof s=="string"?d=parsePath$1(s):(d={...s},invariant(!d.pathname||!d.pathname.includes("?"),getInvalidPathError("?","pathname","search",d)),invariant(!d.pathname||!d.pathname.includes("#"),getInvalidPathError("#","pathname","hash",d)),invariant(!d.search||!d.search.includes("#"),getInvalidPathError("#","search","hash",d)));let g=s===""||d.pathname==="",b=g?"/":d.pathname,$;if(b==null)$=a;else{let et=i.length-1;if(!c&&b.startsWith("..")){let tt=b.split("/");for(;tt[0]==="..";)tt.shift(),et-=1;d.pathname=tt.join("/")}$=et>=0?i[et]:"/"}let j=resolvePath(d,$),_=b&&b!=="/"&&b.endsWith("/"),_e=(g||b===".")&&a.endsWith("/");return!j.pathname.endsWith("/")&&(_||_e)&&(j.pathname+="/"),j}var joinPaths=s=>s.join("/").replace(/\/\/+/g,"/"),normalizePathname=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),normalizeSearch=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,normalizeHash=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,redirect=(s,i=302)=>{let a=i;typeof a=="number"?a={status:a}:typeof a.status>"u"&&(a.status=302);let c=new Headers(a.headers);return c.set("Location",s),new Response(null,{...a,headers:c})},replace=(s,i)=>{let a=redirect(s,i);return a.headers.set("X-Remix-Replace","true"),a},ErrorResponseImpl=class{constructor(s,i,a,c=!1){this.status=s,this.statusText=i||"",this.internal=c,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function isRouteErrorResponse(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}var validMutationMethodsArr=["POST","PUT","PATCH","DELETE"],validMutationMethods=new Set(validMutationMethodsArr),validRequestMethodsArr=["GET",...validMutationMethodsArr],validRequestMethods=new Set(validRequestMethodsArr),redirectStatusCodes=new Set([301,302,303,307,308]),redirectPreserveMethodStatusCodes=new Set([307,308]),IDLE_NAVIGATION={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},IDLE_FETCHER={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},IDLE_BLOCKER={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ABSOLUTE_URL_REGEX=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,defaultMapRouteProperties=s=>({hasErrorBoundary:!!s.hasErrorBoundary}),TRANSITIONS_STORAGE_KEY="remix-router-transitions",ResetLoaderDataSymbol=Symbol("ResetLoaderData");function createRouter(s){const i=s.window?s.window:typeof window<"u"?window:void 0,a=typeof i<"u"&&typeof i.document<"u"&&typeof i.document.createElement<"u";invariant(s.routes.length>0,"You must provide a non-empty routes array to createRouter");let c=s.mapRouteProperties||defaultMapRouteProperties,d={},g=convertRoutesToDataRoutes(s.routes,c,void 0,d),b,$=s.basename||"/",j=s.dataStrategy||defaultDataStrategy,_=s.patchRoutesOnNavigation,_e={...s.future},et=null,tt=new Set,rt=null,nt=null,at=null,ut=s.hydrationData!=null,ot=matchRoutes(g,s.history.location,$),st=null;if(ot==null&&!_){let yt=getInternalRouterError(404,{pathname:s.history.location.pathname}),{matches:Et,route:_t}=getShortCircuitMatches(g);ot=Et,st={[_t.id]:yt}}ot&&!s.hydrationData&&Jn(ot,g,s.history.location.pathname).active&&(ot=null);let it;if(ot)if(ot.some(yt=>yt.route.lazy))it=!1;else if(!ot.some(yt=>yt.route.loader))it=!0;else{let yt=s.hydrationData?s.hydrationData.loaderData:null,Et=s.hydrationData?s.hydrationData.errors:null;if(Et){let _t=ot.findIndex(It=>Et[It.route.id]!==void 0);it=ot.slice(0,_t+1).every(It=>!shouldLoadRouteOnHydration(It.route,yt,Et))}else it=ot.every(_t=>!shouldLoadRouteOnHydration(_t.route,yt,Et))}else{it=!1,ot=[];let yt=Jn(null,g,s.history.location.pathname);yt.active&&yt.matches&&(ot=yt.matches)}let ct,lt={historyAction:s.history.action,location:s.history.location,matches:ot,initialized:it,navigation:IDLE_NAVIGATION,restoreScrollPosition:s.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:s.hydrationData&&s.hydrationData.loaderData||{},actionData:s.hydrationData&&s.hydrationData.actionData||null,errors:s.hydrationData&&s.hydrationData.errors||st,fetchers:new Map,blockers:new Map},dt="POP",mt=!1,ht,Rt=!1,Ct=new Map,Pt=null,gt=!1,ft=!1,pt=new Set,bt=new Map,St=0,$t=-1,wt=new Map,kt=new Set,Lt=new Map,At=new Map,Ft=new Set,qt=new Map,rr,nr=null;function tr(){if(et=s.history.listen(({action:yt,location:Et,delta:_t})=>{if(rr){rr(),rr=void 0;return}warning(qt.size===0||_t!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let It=bs({currentLocation:lt.location,nextLocation:Et,historyAction:yt});if(It&&_t!=null){let Vt=new Promise(Kt=>{rr=Kt});s.history.go(_t*-1),Jr(It,{state:"blocked",location:Et,proceed(){Jr(It,{state:"proceeding",proceed:void 0,reset:void 0,location:Et}),Vt.then(()=>s.history.go(_t))},reset(){let Kt=new Map(lt.blockers);Kt.set(It,IDLE_BLOCKER),Gt({blockers:Kt})}});return}return $r(yt,Et)}),a){restoreAppliedTransitions(i,Ct);let yt=()=>persistAppliedTransitions(i,Ct);i.addEventListener("pagehide",yt),Pt=()=>i.removeEventListener("pagehide",yt)}return lt.initialized||$r("POP",lt.location,{initialHydration:!0}),ct}function ir(){et&&et(),Pt&&Pt(),tt.clear(),ht&&ht.abort(),lt.fetchers.forEach((yt,Et)=>Vr(Et)),lt.blockers.forEach((yt,Et)=>Xn(Et))}function pr(yt){return tt.add(yt),()=>tt.delete(yt)}function Gt(yt,Et={}){lt={...lt,...yt};let _t=[],It=[];lt.fetchers.forEach((Vt,Kt)=>{Vt.state==="idle"&&(Ft.has(Kt)?_t.push(Kt):It.push(Kt))}),[...tt].forEach(Vt=>Vt(lt,{deletedFetchers:_t,viewTransitionOpts:Et.viewTransitionOpts,flushSync:Et.flushSync===!0})),_t.forEach(Vt=>Vr(Vt)),It.forEach(Vt=>lt.fetchers.delete(Vt))}function dr(yt,Et,{flushSync:_t}={}){var Mt,Yt;let It=lt.actionData!=null&<.navigation.formMethod!=null&&isMutationMethod(lt.navigation.formMethod)&<.navigation.state==="loading"&&((Mt=yt.state)==null?void 0:Mt._isRedirect)!==!0,Vt;Et.actionData?Object.keys(Et.actionData).length>0?Vt=Et.actionData:Vt=null:It?Vt=lt.actionData:Vt=null;let Kt=Et.loaderData?mergeLoaderData(lt.loaderData,Et.loaderData,Et.matches||[],Et.errors):lt.loaderData,Zt=lt.blockers;Zt.size>0&&(Zt=new Map(Zt),Zt.forEach((Jt,fr)=>Zt.set(fr,IDLE_BLOCKER)));let Bt=mt===!0||lt.navigation.formMethod!=null&&isMutationMethod(lt.navigation.formMethod)&&((Yt=yt.state)==null?void 0:Yt._isRedirect)!==!0;b&&(g=b,b=void 0),gt||dt==="POP"||(dt==="PUSH"?s.history.push(yt,yt.state):dt==="REPLACE"&&s.history.replace(yt,yt.state));let Wt;if(dt==="POP"){let Jt=Ct.get(lt.location.pathname);Jt&&Jt.has(yt.pathname)?Wt={currentLocation:lt.location,nextLocation:yt}:Ct.has(yt.pathname)&&(Wt={currentLocation:yt,nextLocation:lt.location})}else if(Rt){let Jt=Ct.get(lt.location.pathname);Jt?Jt.add(yt.pathname):(Jt=new Set([yt.pathname]),Ct.set(lt.location.pathname,Jt)),Wt={currentLocation:lt.location,nextLocation:yt}}Gt({...Et,actionData:Vt,loaderData:Kt,historyAction:dt,location:yt,initialized:!0,navigation:IDLE_NAVIGATION,revalidation:"idle",restoreScrollPosition:Ss(yt,Et.matches||lt.matches),preventScrollReset:Bt,blockers:Zt},{viewTransitionOpts:Wt,flushSync:_t===!0}),dt="POP",mt=!1,Rt=!1,gt=!1,ft=!1,nr==null||nr.resolve(),nr=null}async function sr(yt,Et){if(typeof yt=="number"){s.history.go(yt);return}let _t=normalizeTo(lt.location,lt.matches,$,yt,Et==null?void 0:Et.fromRouteId,Et==null?void 0:Et.relative),{path:It,submission:Vt,error:Kt}=normalizeNavigateOptions(!1,_t,Et),Zt=lt.location,Bt=createLocation(lt.location,It,Et&&Et.state);Bt={...Bt,...s.history.encodeLocation(Bt)};let Wt=Et&&Et.replace!=null?Et.replace:void 0,Mt="PUSH";Wt===!0?Mt="REPLACE":Wt===!1||Vt!=null&&isMutationMethod(Vt.formMethod)&&Vt.formAction===lt.location.pathname+lt.location.search&&(Mt="REPLACE");let Yt=Et&&"preventScrollReset"in Et?Et.preventScrollReset===!0:void 0,Jt=(Et&&Et.flushSync)===!0,fr=bs({currentLocation:Zt,nextLocation:Bt,historyAction:Mt});if(fr){Jr(fr,{state:"blocked",location:Bt,proceed(){Jr(fr,{state:"proceeding",proceed:void 0,reset:void 0,location:Bt}),sr(yt,Et)},reset(){let br=new Map(lt.blockers);br.set(fr,IDLE_BLOCKER),Gt({blockers:br})}});return}await $r(Mt,Bt,{submission:Vt,pendingError:Kt,preventScrollReset:Yt,replace:Et&&Et.replace,enableViewTransition:Et&&Et.viewTransition,flushSync:Jt})}function Rr(){nr||(nr=createDeferred()),Ot(),Gt({revalidation:"loading"});let yt=nr.promise;return lt.navigation.state==="submitting"?yt:lt.navigation.state==="idle"?($r(lt.historyAction,lt.location,{startUninterruptedRevalidation:!0}),yt):($r(dt||lt.historyAction,lt.navigation.location,{overrideNavigation:lt.navigation,enableViewTransition:Rt===!0}),yt)}async function $r(yt,Et,_t){ht&&ht.abort(),ht=null,dt=yt,gt=(_t&&_t.startUninterruptedRevalidation)===!0,Ds(lt.location,lt.matches),mt=(_t&&_t.preventScrollReset)===!0,Rt=(_t&&_t.enableViewTransition)===!0;let It=b||g,Vt=_t&&_t.overrideNavigation,Kt=matchRoutes(It,Et,$),Zt=(_t&&_t.flushSync)===!0,Bt=Jn(Kt,It,Et.pathname);if(Bt.active&&Bt.matches&&(Kt=Bt.matches),!Kt){let{error:hr,notFoundMatches:cr,route:xr}=us(Et.pathname);dr(Et,{matches:cr,loaderData:{},errors:{[xr.id]:hr}},{flushSync:Zt});return}if(lt.initialized&&!ft&&isHashChangeOnly(lt.location,Et)&&!(_t&&_t.submission&&isMutationMethod(_t.submission.formMethod))){dr(Et,{matches:Kt},{flushSync:Zt});return}ht=new AbortController;let Wt=createClientSideRequest(s.history,Et,ht.signal,_t&&_t.submission),Mt;if(_t&&_t.pendingError)Mt=[findNearestBoundary(Kt).route.id,{type:"error",error:_t.pendingError}];else if(_t&&_t.submission&&isMutationMethod(_t.submission.formMethod)){let hr=await ur(Wt,Et,_t.submission,Kt,Bt.active,{replace:_t.replace,flushSync:Zt});if(hr.shortCircuited)return;if(hr.pendingActionResult){let[cr,xr]=hr.pendingActionResult;if(isErrorResult(xr)&&isRouteErrorResponse(xr.error)&&xr.error.status===404){ht=null,dr(Et,{matches:hr.matches,loaderData:{},errors:{[cr]:xr.error}});return}}Kt=hr.matches||Kt,Mt=hr.pendingActionResult,Vt=getLoadingNavigation(Et,_t.submission),Zt=!1,Bt.active=!1,Wt=createClientSideRequest(s.history,Wt.url,Wt.signal)}let{shortCircuited:Yt,matches:Jt,loaderData:fr,errors:br}=await or(Wt,Et,Kt,Bt.active,Vt,_t&&_t.submission,_t&&_t.fetcherSubmission,_t&&_t.replace,_t&&_t.initialHydration===!0,Zt,Mt);Yt||(ht=null,dr(Et,{matches:Jt||Kt,...getActionDataForCommit(Mt),loaderData:fr,errors:br}))}async function ur(yt,Et,_t,It,Vt,Kt={}){Ot();let Zt=getSubmittingNavigation(Et,_t);if(Gt({navigation:Zt},{flushSync:Kt.flushSync===!0}),Vt){let Mt=await es(It,Et.pathname,yt.signal);if(Mt.type==="aborted")return{shortCircuited:!0};if(Mt.type==="error"){let Yt=findNearestBoundary(Mt.partialMatches).route.id;return{matches:Mt.partialMatches,pendingActionResult:[Yt,{type:"error",error:Mt.error}]}}else if(Mt.matches)It=Mt.matches;else{let{notFoundMatches:Yt,error:Jt,route:fr}=us(Et.pathname);return{matches:Yt,pendingActionResult:[fr.id,{type:"error",error:Jt}]}}}let Bt,Wt=getTargetMatch(It,Et);if(!Wt.route.action&&!Wt.route.lazy)Bt={type:"error",error:getInternalRouterError(405,{method:yt.method,pathname:Et.pathname,routeId:Wt.route.id})};else if(Bt=(await Ut("action",lt,yt,[Wt],It,null))[Wt.route.id],yt.signal.aborted)return{shortCircuited:!0};if(isRedirectResult(Bt)){let Mt;return Kt&&Kt.replace!=null?Mt=Kt.replace:Mt=normalizeRedirectLocation(Bt.response.headers.get("Location"),new URL(yt.url),$)===lt.location.pathname+lt.location.search,await Tt(yt,Bt,!0,{submission:_t,replace:Mt}),{shortCircuited:!0}}if(isErrorResult(Bt)){let Mt=findNearestBoundary(It,Wt.route.id);return(Kt&&Kt.replace)!==!0&&(dt="PUSH"),{matches:It,pendingActionResult:[Mt.route.id,Bt]}}return{matches:It,pendingActionResult:[Wt.route.id,Bt]}}async function or(yt,Et,_t,It,Vt,Kt,Zt,Bt,Wt,Mt,Yt){let Jt=Vt||getLoadingNavigation(Et,Kt),fr=Kt||Zt||getSubmissionFromNavigation(Jt),br=!gt&&!Wt;if(It){if(br){let Er=dn(Yt);Gt({navigation:Jt,...Er!==void 0?{actionData:Er}:{}},{flushSync:Mt})}let ar=await es(_t,Et.pathname,yt.signal);if(ar.type==="aborted")return{shortCircuited:!0};if(ar.type==="error"){let Er=findNearestBoundary(ar.partialMatches).route.id;return{matches:ar.partialMatches,loaderData:{},errors:{[Er]:ar.error}}}else if(ar.matches)_t=ar.matches;else{let{error:Er,notFoundMatches:ns,route:In}=us(Et.pathname);return{matches:ns,loaderData:{},errors:{[In.id]:Er}}}}let hr=b||g,[cr,xr]=getMatchesToLoad(s.history,lt,_t,fr,Et,Wt===!0,ft,pt,Ft,Lt,kt,hr,$,Yt);if($t=++St,cr.length===0&&xr.length===0){let ar=pn();return dr(Et,{matches:_t,loaderData:{},errors:Yt&&isErrorResult(Yt[1])?{[Yt[0]]:Yt[1].error}:null,...getActionDataForCommit(Yt),...ar?{fetchers:new Map(lt.fetchers)}:{}},{flushSync:Mt}),{shortCircuited:!0}}if(br){let ar={};if(!It){ar.navigation=Jt;let Er=dn(Yt);Er!==void 0&&(ar.actionData=Er)}xr.length>0&&(ar.fetchers=Gn(xr)),Gt(ar,{flushSync:Mt})}xr.forEach(ar=>{Ar(ar.key),ar.controller&&bt.set(ar.key,ar.controller)});let mn=()=>xr.forEach(ar=>Ar(ar.key));ht&&ht.signal.addEventListener("abort",mn);let{loaderResults:Ln,fetcherResults:Mr}=await Nt(lt,_t,cr,xr,yt);if(yt.signal.aborted)return{shortCircuited:!0};ht&&ht.signal.removeEventListener("abort",mn),xr.forEach(ar=>bt.delete(ar.key));let Ir=findRedirect(Ln);if(Ir)return await Tt(yt,Ir.result,!0,{replace:Bt}),{shortCircuited:!0};if(Ir=findRedirect(Mr),Ir)return kt.add(Ir.key),await Tt(yt,Ir.result,!0,{replace:Bt}),{shortCircuited:!0};let{loaderData:cs,errors:An}=processLoaderData(lt,_t,Ln,Yt,xr,Mr);Wt&<.errors&&(An={...lt.errors,...An});let en=pn(),ts=Qn($t),rs=en||ts||xr.length>0;return{matches:_t,loaderData:cs,errors:An,...rs?{fetchers:new Map(lt.fetchers)}:{}}}function dn(yt){if(yt&&!isErrorResult(yt[1]))return{[yt[0]]:yt[1].data};if(lt.actionData)return Object.keys(lt.actionData).length===0?null:lt.actionData}function Gn(yt){return yt.forEach(Et=>{let _t=lt.fetchers.get(Et.key),It=getLoadingFetcher(void 0,_t?_t.data:void 0);lt.fetchers.set(Et.key,It)}),new Map(lt.fetchers)}async function Zn(yt,Et,_t,It){Ar(yt);let Vt=(It&&It.flushSync)===!0,Kt=b||g,Zt=normalizeTo(lt.location,lt.matches,$,_t,Et,It==null?void 0:It.relative),Bt=matchRoutes(Kt,Zt,$),Wt=Jn(Bt,Kt,Zt);if(Wt.active&&Wt.matches&&(Bt=Wt.matches),!Bt){er(yt,Et,getInternalRouterError(404,{pathname:Zt}),{flushSync:Vt});return}let{path:Mt,submission:Yt,error:Jt}=normalizeNavigateOptions(!0,Zt,It);if(Jt){er(yt,Et,Jt,{flushSync:Vt});return}let fr=getTargetMatch(Bt,Mt),br=(It&&It.preventScrollReset)===!0;if(Yt&&isMutationMethod(Yt.formMethod)){await vt(yt,Et,Mt,fr,Bt,Wt.active,Vt,br,Yt);return}Lt.set(yt,{routeId:Et,path:Mt}),await jt(yt,Et,Mt,fr,Bt,Wt.active,Vt,br,Yt)}async function vt(yt,Et,_t,It,Vt,Kt,Zt,Bt,Wt){Ot(),Lt.delete(yt);function Mt(gr){if(!gr.route.action&&!gr.route.lazy){let hn=getInternalRouterError(405,{method:Wt.formMethod,pathname:_t,routeId:Et});return er(yt,Et,hn,{flushSync:Zt}),!0}return!1}if(!Kt&&Mt(It))return;let Yt=lt.fetchers.get(yt);Ht(yt,getSubmittingFetcher(Wt,Yt),{flushSync:Zt});let Jt=new AbortController,fr=createClientSideRequest(s.history,_t,Jt.signal,Wt);if(Kt){let gr=await es(Vt,_t,fr.signal);if(gr.type==="aborted")return;if(gr.type==="error"){er(yt,Et,gr.error,{flushSync:Zt});return}else if(gr.matches){if(Vt=gr.matches,It=getTargetMatch(Vt,_t),Mt(It))return}else{er(yt,Et,getInternalRouterError(404,{pathname:_t}),{flushSync:Zt});return}}bt.set(yt,Jt);let br=St,cr=(await Ut("action",lt,fr,[It],Vt,yt))[It.route.id];if(fr.signal.aborted){bt.get(yt)===Jt&&bt.delete(yt);return}if(Ft.has(yt)){if(isRedirectResult(cr)||isErrorResult(cr)){Ht(yt,getDoneFetcher(void 0));return}}else{if(isRedirectResult(cr))if(bt.delete(yt),$t>br){Ht(yt,getDoneFetcher(void 0));return}else return kt.add(yt),Ht(yt,getLoadingFetcher(Wt)),Tt(fr,cr,!1,{fetcherSubmission:Wt,preventScrollReset:Bt});if(isErrorResult(cr)){er(yt,Et,cr.error);return}}let xr=lt.navigation.location||lt.location,mn=createClientSideRequest(s.history,xr,Jt.signal),Ln=b||g,Mr=lt.navigation.state!=="idle"?matchRoutes(Ln,lt.navigation.location,$):lt.matches;invariant(Mr,"Didn't find any matches after fetcher action");let Ir=++St;wt.set(yt,Ir);let cs=getLoadingFetcher(Wt,cr.data);lt.fetchers.set(yt,cs);let[An,en]=getMatchesToLoad(s.history,lt,Mr,Wt,xr,!1,ft,pt,Ft,Lt,kt,Ln,$,[It.route.id,cr]);en.filter(gr=>gr.key!==yt).forEach(gr=>{let hn=gr.key,$s=lt.fetchers.get(hn),Ms=getLoadingFetcher(void 0,$s?$s.data:void 0);lt.fetchers.set(hn,Ms),Ar(hn),gr.controller&&bt.set(hn,gr.controller)}),Gt({fetchers:new Map(lt.fetchers)});let ts=()=>en.forEach(gr=>Ar(gr.key));Jt.signal.addEventListener("abort",ts);let{loaderResults:rs,fetcherResults:ar}=await Nt(lt,Mr,An,en,mn);if(Jt.signal.aborted)return;Jt.signal.removeEventListener("abort",ts),wt.delete(yt),bt.delete(yt),en.forEach(gr=>bt.delete(gr.key));let Er=findRedirect(rs);if(Er)return Tt(mn,Er.result,!1,{preventScrollReset:Bt});if(Er=findRedirect(ar),Er)return kt.add(Er.key),Tt(mn,Er.result,!1,{preventScrollReset:Bt});let{loaderData:ns,errors:In}=processLoaderData(lt,Mr,rs,void 0,en,ar);if(lt.fetchers.has(yt)){let gr=getDoneFetcher(cr.data);lt.fetchers.set(yt,gr)}Qn(Ir),lt.navigation.state==="loading"&&Ir>$t?(invariant(dt,"Expected pending action"),ht&&ht.abort(),dr(lt.navigation.location,{matches:Mr,loaderData:ns,errors:In,fetchers:new Map(lt.fetchers)})):(Gt({errors:In,loaderData:mergeLoaderData(lt.loaderData,ns,Mr,In),fetchers:new Map(lt.fetchers)}),ft=!1)}async function jt(yt,Et,_t,It,Vt,Kt,Zt,Bt,Wt){let Mt=lt.fetchers.get(yt);Ht(yt,getLoadingFetcher(Wt,Mt?Mt.data:void 0),{flushSync:Zt});let Yt=new AbortController,Jt=createClientSideRequest(s.history,_t,Yt.signal);if(Kt){let cr=await es(Vt,_t,Jt.signal);if(cr.type==="aborted")return;if(cr.type==="error"){er(yt,Et,cr.error,{flushSync:Zt});return}else if(cr.matches)Vt=cr.matches,It=getTargetMatch(Vt,_t);else{er(yt,Et,getInternalRouterError(404,{pathname:_t}),{flushSync:Zt});return}}bt.set(yt,Yt);let fr=St,hr=(await Ut("loader",lt,Jt,[It],Vt,yt))[It.route.id];if(bt.get(yt)===Yt&&bt.delete(yt),!Jt.signal.aborted){if(Ft.has(yt)){Ht(yt,getDoneFetcher(void 0));return}if(isRedirectResult(hr))if($t>fr){Ht(yt,getDoneFetcher(void 0));return}else{kt.add(yt),await Tt(Jt,hr,!1,{preventScrollReset:Bt});return}if(isErrorResult(hr)){er(yt,Et,hr.error);return}Ht(yt,getDoneFetcher(hr.data))}}async function Tt(yt,Et,_t,{submission:It,fetcherSubmission:Vt,preventScrollReset:Kt,replace:Zt}={}){Et.response.headers.has("X-Remix-Revalidate")&&(ft=!0);let Bt=Et.response.headers.get("Location");invariant(Bt,"Expected a Location header on the redirect Response"),Bt=normalizeRedirectLocation(Bt,new URL(yt.url),$);let Wt=createLocation(lt.location,Bt,{_isRedirect:!0});if(a){let hr=!1;if(Et.response.headers.has("X-Remix-Reload-Document"))hr=!0;else if(ABSOLUTE_URL_REGEX.test(Bt)){const cr=s.history.createURL(Bt);hr=cr.origin!==i.location.origin||stripBasename(cr.pathname,$)==null}if(hr){Zt?i.location.replace(Bt):i.location.assign(Bt);return}}ht=null;let Mt=Zt===!0||Et.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Yt,formAction:Jt,formEncType:fr}=lt.navigation;!It&&!Vt&&Yt&&Jt&&fr&&(It=getSubmissionFromNavigation(lt.navigation));let br=It||Vt;if(redirectPreserveMethodStatusCodes.has(Et.response.status)&&br&&isMutationMethod(br.formMethod))await $r(Mt,Wt,{submission:{...br,formAction:Bt},preventScrollReset:Kt||mt,enableViewTransition:_t?Rt:void 0});else{let hr=getLoadingNavigation(Wt,It);await $r(Mt,Wt,{overrideNavigation:hr,fetcherSubmission:Vt,preventScrollReset:Kt||mt,enableViewTransition:_t?Rt:void 0})}}async function Ut(yt,Et,_t,It,Vt,Kt){let Zt,Bt={};try{Zt=await callDataStrategyImpl(j,yt,Et,_t,It,Vt,Kt,d,c)}catch(Wt){return It.forEach(Mt=>{Bt[Mt.route.id]={type:"error",error:Wt}}),Bt}for(let[Wt,Mt]of Object.entries(Zt))if(isRedirectDataStrategyResult(Mt)){let Yt=Mt.result;Bt[Wt]={type:"redirect",response:normalizeRelativeRoutingRedirectResponse(Yt,_t,Wt,Vt,$)}}else Bt[Wt]=await convertDataStrategyResultToDataResult(Mt);return Bt}async function Nt(yt,Et,_t,It,Vt){let Kt=Ut("loader",yt,Vt,_t,Et,null),Zt=Promise.all(It.map(async Mt=>{if(Mt.matches&&Mt.match&&Mt.controller){let Jt=(await Ut("loader",yt,createClientSideRequest(s.history,Mt.path,Mt.controller.signal),[Mt.match],Mt.matches,Mt.key))[Mt.match.route.id];return{[Mt.key]:Jt}}else return Promise.resolve({[Mt.key]:{type:"error",error:getInternalRouterError(404,{pathname:Mt.path})}})})),Bt=await Kt,Wt=(await Zt).reduce((Mt,Yt)=>Object.assign(Mt,Yt),{});return{loaderResults:Bt,fetcherResults:Wt}}function Ot(){ft=!0,Lt.forEach((yt,Et)=>{bt.has(Et)&&pt.add(Et),Ar(Et)})}function Ht(yt,Et,_t={}){lt.fetchers.set(yt,Et),Gt({fetchers:new Map(lt.fetchers)},{flushSync:(_t&&_t.flushSync)===!0})}function er(yt,Et,_t,It={}){let Vt=findNearestBoundary(lt.matches,Et);Vr(yt),Gt({errors:{[Vt.route.id]:_t},fetchers:new Map(lt.fetchers)},{flushSync:(It&&It.flushSync)===!0})}function mr(yt){return At.set(yt,(At.get(yt)||0)+1),Ft.has(yt)&&Ft.delete(yt),lt.fetchers.get(yt)||IDLE_FETCHER}function Vr(yt){let Et=lt.fetchers.get(yt);bt.has(yt)&&!(Et&&Et.state==="loading"&&wt.has(yt))&&Ar(yt),Lt.delete(yt),wt.delete(yt),kt.delete(yt),Ft.delete(yt),pt.delete(yt),lt.fetchers.delete(yt)}function Br(yt){let Et=(At.get(yt)||0)-1;Et<=0?(At.delete(yt),Ft.add(yt)):At.set(yt,Et),Gt({fetchers:new Map(lt.fetchers)})}function Ar(yt){let Et=bt.get(yt);Et&&(Et.abort(),bt.delete(yt))}function fn(yt){for(let Et of yt){let _t=mr(Et),It=getDoneFetcher(_t.data);lt.fetchers.set(Et,It)}}function pn(){let yt=[],Et=!1;for(let _t of kt){let It=lt.fetchers.get(_t);invariant(It,`Expected fetcher: ${_t}`),It.state==="loading"&&(kt.delete(_t),yt.push(_t),Et=!0)}return fn(yt),Et}function Qn(yt){let Et=[];for(let[_t,It]of wt)if(It0}function Yn(yt,Et){let _t=lt.blockers.get(yt)||IDLE_BLOCKER;return qt.get(yt)!==Et&&qt.set(yt,Et),_t}function Xn(yt){lt.blockers.delete(yt),qt.delete(yt)}function Jr(yt,Et){let _t=lt.blockers.get(yt)||IDLE_BLOCKER;invariant(_t.state==="unblocked"&&Et.state==="blocked"||_t.state==="blocked"&&Et.state==="blocked"||_t.state==="blocked"&&Et.state==="proceeding"||_t.state==="blocked"&&Et.state==="unblocked"||_t.state==="proceeding"&&Et.state==="unblocked",`Invalid blocker state transition: ${_t.state} -> ${Et.state}`);let It=new Map(lt.blockers);It.set(yt,Et),Gt({blockers:It})}function bs({currentLocation:yt,nextLocation:Et,historyAction:_t}){if(qt.size===0)return;qt.size>1&&warning(!1,"A router only supports one blocker at a time");let It=Array.from(qt.entries()),[Vt,Kt]=It[It.length-1],Zt=lt.blockers.get(Vt);if(!(Zt&&Zt.state==="proceeding")&&Kt({currentLocation:yt,nextLocation:Et,historyAction:_t}))return Vt}function us(yt){let Et=getInternalRouterError(404,{pathname:yt}),_t=b||g,{matches:It,route:Vt}=getShortCircuitMatches(_t);return{notFoundMatches:It,route:Vt,error:Et}}function Os(yt,Et,_t){if(rt=yt,at=Et,nt=_t||null,!ut&<.navigation===IDLE_NAVIGATION){ut=!0;let It=Ss(lt.location,lt.matches);It!=null&&Gt({restoreScrollPosition:It})}return()=>{rt=null,at=null,nt=null}}function Es(yt,Et){return nt&&nt(yt,Et.map(It=>convertRouteMatchToUiMatch(It,lt.loaderData)))||yt.key}function Ds(yt,Et){if(rt&&at){let _t=Es(yt,Et);rt[_t]=at()}}function Ss(yt,Et){if(rt){let _t=Es(yt,Et),It=rt[_t];if(typeof It=="number")return It}return null}function Jn(yt,Et,_t){if(_)if(yt){if(Object.keys(yt[0].params).length>0)return{active:!0,matches:matchRoutesImpl(Et,_t,$,!0)}}else return{active:!0,matches:matchRoutesImpl(Et,_t,$,!0)||[]};return{active:!1,matches:null}}async function es(yt,Et,_t){if(!_)return{type:"success",matches:yt};let It=yt;for(;;){let Vt=b==null,Kt=b||g,Zt=d;try{await _({path:Et,matches:It,patch:(Mt,Yt)=>{_t.aborted||patchRoutesImpl(Mt,Yt,Kt,Zt,c)}})}catch(Mt){return{type:"error",error:Mt,partialMatches:It}}finally{Vt&&!_t.aborted&&(g=[...g])}if(_t.aborted)return{type:"aborted"};let Bt=matchRoutes(Kt,Et,$);if(Bt)return{type:"success",matches:Bt};let Wt=matchRoutesImpl(Kt,Et,$,!0);if(!Wt||It.length===Wt.length&&It.every((Mt,Yt)=>Mt.route.id===Wt[Yt].route.id))return{type:"success",matches:null};It=Wt}}function Ns(yt){d={},b=convertRoutesToDataRoutes(yt,c,void 0,d)}function Fs(yt,Et){let _t=b==null;patchRoutesImpl(yt,Et,b||g,d,c),_t&&(g=[...g],Gt({}))}return ct={get basename(){return $},get future(){return _e},get state(){return lt},get routes(){return g},get window(){return i},initialize:tr,subscribe:pr,enableScrollRestoration:Os,navigate:sr,fetch:Zn,revalidate:Rr,createHref:yt=>s.history.createHref(yt),encodeLocation:yt=>s.history.encodeLocation(yt),getFetcher:mr,deleteFetcher:Br,dispose:ir,getBlocker:Yn,deleteBlocker:Xn,patchRoutes:Fs,_internalFetchControllers:bt,_internalSetRoutes:Ns},ct}function isSubmissionNavigation(s){return s!=null&&("formData"in s&&s.formData!=null||"body"in s&&s.body!==void 0)}function normalizeTo(s,i,a,c,d,g){let b,$;if(d){b=[];for(let _ of i)if(b.push(_),_.route.id===d){$=_;break}}else b=i,$=i[i.length-1];let j=resolveTo(c||".",getResolveToMatches(b),stripBasename(s.pathname,a)||s.pathname,g==="path");if(c==null&&(j.search=s.search,j.hash=s.hash),(c==null||c===""||c===".")&&$){let _=hasNakedIndexQuery(j.search);if($.route.index&&!_)j.search=j.search?j.search.replace(/^\?/,"?index&"):"?index";else if(!$.route.index&&_){let _e=new URLSearchParams(j.search),et=_e.getAll("index");_e.delete("index"),et.filter(rt=>rt).forEach(rt=>_e.append("index",rt));let tt=_e.toString();j.search=tt?`?${tt}`:""}}return a!=="/"&&(j.pathname=j.pathname==="/"?a:joinPaths([a,j.pathname])),createPath(j)}function normalizeNavigateOptions(s,i,a){if(!a||!isSubmissionNavigation(a))return{path:i};if(a.formMethod&&!isValidMethod(a.formMethod))return{path:i,error:getInternalRouterError(405,{method:a.formMethod})};let c=()=>({path:i,error:getInternalRouterError(400,{type:"invalid-body"})}),g=(a.formMethod||"get").toUpperCase(),b=stripHashFromPath(i);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!isMutationMethod(g))return c();let et=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((tt,[rt,nt])=>`${tt}${rt}=${nt} `,""):String(a.body);return{path:i,submission:{formMethod:g,formAction:b,formEncType:a.formEncType,formData:void 0,json:void 0,text:et}}}else if(a.formEncType==="application/json"){if(!isMutationMethod(g))return c();try{let et=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:i,submission:{formMethod:g,formAction:b,formEncType:a.formEncType,formData:void 0,json:et,text:void 0}}}catch{return c()}}}invariant(typeof FormData=="function","FormData is not available in this environment");let $,j;if(a.formData)$=convertFormDataToSearchParams(a.formData),j=a.formData;else if(a.body instanceof FormData)$=convertFormDataToSearchParams(a.body),j=a.body;else if(a.body instanceof URLSearchParams)$=a.body,j=convertSearchParamsToFormData($);else if(a.body==null)$=new URLSearchParams,j=new FormData;else try{$=new URLSearchParams(a.body),j=convertSearchParamsToFormData($)}catch{return c()}let _={formMethod:g,formAction:b,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:j,json:void 0,text:void 0};if(isMutationMethod(_.formMethod))return{path:i,submission:_};let _e=parsePath$1(i);return s&&_e.search&&hasNakedIndexQuery(_e.search)&&$.append("index",""),_e.search=`?${$}`,{path:createPath(_e),submission:_}}function getLoaderMatchesUntilBoundary(s,i,a=!1){let c=s.findIndex(d=>d.route.id===i);return c>=0?s.slice(0,a?c+1:c):s}function getMatchesToLoad(s,i,a,c,d,g,b,$,j,_,_e,et,tt,rt){let nt=rt?isErrorResult(rt[1])?rt[1].error:rt[1].data:void 0,at=s.createURL(i.location),ut=s.createURL(d),ot=a;g&&i.errors?ot=getLoaderMatchesUntilBoundary(a,Object.keys(i.errors)[0],!0):rt&&isErrorResult(rt[1])&&(ot=getLoaderMatchesUntilBoundary(a,rt[0]));let st=rt?rt[1].statusCode:void 0,it=st&&st>=400,ct=ot.filter((dt,mt)=>{let{route:ht}=dt;if(ht.lazy)return!0;if(ht.loader==null)return!1;if(g)return shouldLoadRouteOnHydration(ht,i.loaderData,i.errors);if(isNewLoader(i.loaderData,i.matches[mt],dt))return!0;let Rt=i.matches[mt],Ct=dt;return shouldRevalidateLoader(dt,{currentUrl:at,currentParams:Rt.params,nextUrl:ut,nextParams:Ct.params,...c,actionResult:nt,actionStatus:st,defaultShouldRevalidate:it?!1:b||at.pathname+at.search===ut.pathname+ut.search||at.search!==ut.search||isNewRouteInstance(Rt,Ct)})}),lt=[];return _.forEach((dt,mt)=>{if(g||!a.some(gt=>gt.route.id===dt.routeId)||j.has(mt))return;let ht=matchRoutes(et,dt.path,tt);if(!ht){lt.push({key:mt,routeId:dt.routeId,path:dt.path,matches:null,match:null,controller:null});return}let Rt=i.fetchers.get(mt),Ct=getTargetMatch(ht,dt.path),Pt=!1;_e.has(mt)?Pt=!1:$.has(mt)?($.delete(mt),Pt=!0):Rt&&Rt.state!=="idle"&&Rt.data===void 0?Pt=b:Pt=shouldRevalidateLoader(Ct,{currentUrl:at,currentParams:i.matches[i.matches.length-1].params,nextUrl:ut,nextParams:a[a.length-1].params,...c,actionResult:nt,actionStatus:st,defaultShouldRevalidate:it?!1:b}),Pt&<.push({key:mt,routeId:dt.routeId,path:dt.path,matches:ht,match:Ct,controller:new AbortController})}),[ct,lt]}function shouldLoadRouteOnHydration(s,i,a){if(s.lazy)return!0;if(!s.loader)return!1;let c=i!=null&&i[s.id]!==void 0,d=a!=null&&a[s.id]!==void 0;return!c&&d?!1:typeof s.loader=="function"&&s.loader.hydrate===!0?!0:!c&&!d}function isNewLoader(s,i,a){let c=!i||a.route.id!==i.route.id,d=!s.hasOwnProperty(a.route.id);return c||d}function isNewRouteInstance(s,i){let a=s.route.path;return s.pathname!==i.pathname||a!=null&&a.endsWith("*")&&s.params["*"]!==i.params["*"]}function shouldRevalidateLoader(s,i){if(s.route.shouldRevalidate){let a=s.route.shouldRevalidate(i);if(typeof a=="boolean")return a}return i.defaultShouldRevalidate}function patchRoutesImpl(s,i,a,c,d){let g;if(s){let j=c[s];invariant(j,`No route found to patch children into: routeId = ${s}`),j.children||(j.children=[]),g=j.children}else g=a;let b=i.filter(j=>!g.some(_=>isSameRoute(j,_))),$=convertRoutesToDataRoutes(b,d,[s||"_","patch",String((g==null?void 0:g.length)||"0")],c);g.push(...$)}function isSameRoute(s,i){return"id"in s&&"id"in i&&s.id===i.id?!0:s.index===i.index&&s.path===i.path&&s.caseSensitive===i.caseSensitive?(!s.children||s.children.length===0)&&(!i.children||i.children.length===0)?!0:s.children.every((a,c)=>{var d;return(d=i.children)==null?void 0:d.some(g=>isSameRoute(a,g))}):!1}async function loadLazyRouteModule(s,i,a){if(!s.lazy)return;let c=await s.lazy();if(!s.lazy)return;let d=a[s.id];invariant(d,"No route found in manifest");let g={};for(let b in c){let j=d[b]!==void 0&&b!=="hasErrorBoundary";warning(!j,`Route "${d.id}" has a static property "${b}" defined but its lazy function is also returning a value for this property. The lazy route property "${b}" will be ignored.`),!j&&!immutableRouteKeys.has(b)&&(g[b]=c[b])}Object.assign(d,g),Object.assign(d,{...i(d),lazy:void 0})}async function defaultDataStrategy({matches:s}){let i=s.filter(c=>c.shouldLoad);return(await Promise.all(i.map(c=>c.resolve()))).reduce((c,d,g)=>Object.assign(c,{[i[g].route.id]:d}),{})}async function callDataStrategyImpl(s,i,a,c,d,g,b,$,j,_){let _e=g.map(rt=>rt.route.lazy?loadLazyRouteModule(rt.route,j,$):void 0),et=g.map((rt,nt)=>{let at=_e[nt],ut=d.some(st=>st.route.id===rt.route.id);return{...rt,shouldLoad:ut,resolve:async st=>(st&&c.method==="GET"&&(rt.route.lazy||rt.route.loader)&&(ut=!0),ut?callLoaderOrAction(i,c,rt,at,st,_):Promise.resolve({type:"data",result:void 0}))}}),tt=await s({matches:et,request:c,params:g[0].params,fetcherKey:b,context:_});try{await Promise.all(_e)}catch{}return tt}async function callLoaderOrAction(s,i,a,c,d,g){let b,$,j=_=>{let _e,et=new Promise((nt,at)=>_e=at);$=()=>_e(),i.signal.addEventListener("abort",$);let tt=nt=>typeof _!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${s}" [routeId: ${a.route.id}]`)):_({request:i,params:a.params,context:g},...nt!==void 0?[nt]:[]),rt=(async()=>{try{return{type:"data",result:await(d?d(at=>tt(at)):tt())}}catch(nt){return{type:"error",result:nt}}})();return Promise.race([rt,et])};try{let _=a.route[s];if(c)if(_){let _e,[et]=await Promise.all([j(_).catch(tt=>{_e=tt}),c]);if(_e!==void 0)throw _e;b=et}else if(await c,_=a.route[s],_)b=await j(_);else if(s==="action"){let _e=new URL(i.url),et=_e.pathname+_e.search;throw getInternalRouterError(405,{method:i.method,pathname:et,routeId:a.route.id})}else return{type:"data",result:void 0};else if(_)b=await j(_);else{let _e=new URL(i.url),et=_e.pathname+_e.search;throw getInternalRouterError(404,{pathname:et})}}catch(_){return{type:"error",result:_}}finally{$&&i.signal.removeEventListener("abort",$)}return b}async function convertDataStrategyResultToDataResult(s){var c,d,g,b;let{result:i,type:a}=s;if(isResponse(i)){let $;try{let j=i.headers.get("Content-Type");j&&/\bapplication\/json\b/.test(j)?i.body==null?$=null:$=await i.json():$=await i.text()}catch(j){return{type:"error",error:j}}return a==="error"?{type:"error",error:new ErrorResponseImpl(i.status,i.statusText,$),statusCode:i.status,headers:i.headers}:{type:"data",data:$,statusCode:i.status,headers:i.headers}}if(a==="error"){if(isDataWithResponseInit(i)){if(i.data instanceof Error)return{type:"error",error:i.data,statusCode:(c=i.init)==null?void 0:c.status};i=new ErrorResponseImpl(((d=i.init)==null?void 0:d.status)||500,void 0,i.data)}return{type:"error",error:i,statusCode:isRouteErrorResponse(i)?i.status:void 0}}return isDataWithResponseInit(i)?{type:"data",data:i.data,statusCode:(g=i.init)==null?void 0:g.status,headers:(b=i.init)!=null&&b.headers?new Headers(i.init.headers):void 0}:{type:"data",data:i}}function normalizeRelativeRoutingRedirectResponse(s,i,a,c,d){let g=s.headers.get("Location");if(invariant(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!ABSOLUTE_URL_REGEX.test(g)){let b=c.slice(0,c.findIndex($=>$.route.id===a)+1);g=normalizeTo(new URL(i.url),b,d,g),s.headers.set("Location",g)}return s}function normalizeRedirectLocation(s,i,a){if(ABSOLUTE_URL_REGEX.test(s)){let c=s,d=c.startsWith("//")?new URL(i.protocol+c):new URL(c),g=stripBasename(d.pathname,a)!=null;if(d.origin===i.origin&&g)return d.pathname+d.search+d.hash}return s}function createClientSideRequest(s,i,a,c){let d=s.createURL(stripHashFromPath(i)).toString(),g={signal:a};if(c&&isMutationMethod(c.formMethod)){let{formMethod:b,formEncType:$}=c;g.method=b.toUpperCase(),$==="application/json"?(g.headers=new Headers({"Content-Type":$}),g.body=JSON.stringify(c.json)):$==="text/plain"?g.body=c.text:$==="application/x-www-form-urlencoded"&&c.formData?g.body=convertFormDataToSearchParams(c.formData):g.body=c.formData}return new Request(d,g)}function convertFormDataToSearchParams(s){let i=new URLSearchParams;for(let[a,c]of s.entries())i.append(a,typeof c=="string"?c:c.name);return i}function convertSearchParamsToFormData(s){let i=new FormData;for(let[a,c]of s.entries())i.append(a,c);return i}function processRouteLoaderData(s,i,a,c=!1,d=!1){let g={},b=null,$,j=!1,_={},_e=a&&isErrorResult(a[1])?a[1].error:void 0;return s.forEach(et=>{if(!(et.route.id in i))return;let tt=et.route.id,rt=i[tt];if(invariant(!isRedirectResult(rt),"Cannot handle redirect results in processLoaderData"),isErrorResult(rt)){let nt=rt.error;if(_e!==void 0&&(nt=_e,_e=void 0),b=b||{},d)b[tt]=nt;else{let at=findNearestBoundary(s,tt);b[at.route.id]==null&&(b[at.route.id]=nt)}c||(g[tt]=ResetLoaderDataSymbol),j||(j=!0,$=isRouteErrorResponse(rt.error)?rt.error.status:500),rt.headers&&(_[tt]=rt.headers)}else g[tt]=rt.data,rt.statusCode&&rt.statusCode!==200&&!j&&($=rt.statusCode),rt.headers&&(_[tt]=rt.headers)}),_e!==void 0&&a&&(b={[a[0]]:_e},g[a[0]]=void 0),{loaderData:g,errors:b,statusCode:$||200,loaderHeaders:_}}function processLoaderData(s,i,a,c,d,g){let{loaderData:b,errors:$}=processRouteLoaderData(i,a,c);return d.forEach(j=>{let{key:_,match:_e,controller:et}=j,tt=g[_];if(invariant(tt,"Did not find corresponding fetcher result"),!(et&&et.signal.aborted))if(isErrorResult(tt)){let rt=findNearestBoundary(s.matches,_e==null?void 0:_e.route.id);$&&$[rt.route.id]||($={...$,[rt.route.id]:tt.error}),s.fetchers.delete(_)}else if(isRedirectResult(tt))invariant(!1,"Unhandled fetcher revalidation redirect");else{let rt=getDoneFetcher(tt.data);s.fetchers.set(_,rt)}}),{loaderData:b,errors:$}}function mergeLoaderData(s,i,a,c){let d=Object.entries(i).filter(([,g])=>g!==ResetLoaderDataSymbol).reduce((g,[b,$])=>(g[b]=$,g),{});for(let g of a){let b=g.route.id;if(!i.hasOwnProperty(b)&&s.hasOwnProperty(b)&&g.route.loader&&(d[b]=s[b]),c&&c.hasOwnProperty(b))break}return d}function getActionDataForCommit(s){return s?isErrorResult(s[1])?{actionData:{}}:{actionData:{[s[0]]:s[1].data}}:{}}function findNearestBoundary(s,i){return(i?s.slice(0,s.findIndex(c=>c.route.id===i)+1):[...s]).reverse().find(c=>c.route.hasErrorBoundary===!0)||s[0]}function getShortCircuitMatches(s){let i=s.length===1?s[0]:s.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:i}],route:i}}function getInternalRouterError(s,{pathname:i,routeId:a,method:c,type:d,message:g}={}){let b="Unknown Server Error",$="Unknown @remix-run/router error";return s===400?(b="Bad Request",c&&i&&a?$=`You made a ${c} request to "${i}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:d==="invalid-body"&&($="Unable to encode submission body")):s===403?(b="Forbidden",$=`Route "${a}" does not match URL "${i}"`):s===404?(b="Not Found",$=`No route matches URL "${i}"`):s===405&&(b="Method Not Allowed",c&&i&&a?$=`You made a ${c.toUpperCase()} request to "${i}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:c&&($=`Invalid request method "${c.toUpperCase()}"`)),new ErrorResponseImpl(s||500,b,new Error($),!0)}function findRedirect(s){let i=Object.entries(s);for(let a=i.length-1;a>=0;a--){let[c,d]=i[a];if(isRedirectResult(d))return{key:c,result:d}}}function stripHashFromPath(s){let i=typeof s=="string"?parsePath$1(s):s;return createPath({...i,hash:""})}function isHashChangeOnly(s,i){return s.pathname!==i.pathname||s.search!==i.search?!1:s.hash===""?i.hash!=="":s.hash===i.hash?!0:i.hash!==""}function isRedirectDataStrategyResult(s){return isResponse(s.result)&&redirectStatusCodes.has(s.result.status)}function isErrorResult(s){return s.type==="error"}function isRedirectResult(s){return(s&&s.type)==="redirect"}function isDataWithResponseInit(s){return typeof s=="object"&&s!=null&&"type"in s&&"data"in s&&"init"in s&&s.type==="DataWithResponseInit"}function isResponse(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.headers=="object"&&typeof s.body<"u"}function isValidMethod(s){return validRequestMethods.has(s.toUpperCase())}function isMutationMethod(s){return validMutationMethods.has(s.toUpperCase())}function hasNakedIndexQuery(s){return new URLSearchParams(s).getAll("index").some(i=>i==="")}function getTargetMatch(s,i){let a=typeof i=="string"?parsePath$1(i).search:i.search;if(s[s.length-1].route.index&&hasNakedIndexQuery(a||""))return s[s.length-1];let c=getPathContributingMatches(s);return c[c.length-1]}function getSubmissionFromNavigation(s){let{formMethod:i,formAction:a,formEncType:c,text:d,formData:g,json:b}=s;if(!(!i||!a||!c)){if(d!=null)return{formMethod:i,formAction:a,formEncType:c,formData:void 0,json:void 0,text:d};if(g!=null)return{formMethod:i,formAction:a,formEncType:c,formData:g,json:void 0,text:void 0};if(b!==void 0)return{formMethod:i,formAction:a,formEncType:c,formData:void 0,json:b,text:void 0}}}function getLoadingNavigation(s,i){return i?{state:"loading",location:s,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}:{state:"loading",location:s,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function getSubmittingNavigation(s,i){return{state:"submitting",location:s,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}}function getLoadingFetcher(s,i){return s?{state:"loading",formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text,data:i}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function getSubmittingFetcher(s,i){return{state:"submitting",formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text,data:i?i.data:void 0}}function getDoneFetcher(s){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:s}}function restoreAppliedTransitions(s,i){try{let a=s.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);if(a){let c=JSON.parse(a);for(let[d,g]of Object.entries(c||{}))g&&Array.isArray(g)&&i.set(d,new Set(g||[]))}}catch{}}function persistAppliedTransitions(s,i){if(i.size>0){let a={};for(let[c,d]of i)a[c]=[...d];try{s.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY,JSON.stringify(a))}catch(c){warning(!1,`Failed to save applied view transitions in sessionStorage (${c}).`)}}}function createDeferred(){let s,i,a=new Promise((c,d)=>{s=async g=>{c(g);try{await a}catch{}},i=async g=>{d(g);try{await a}catch{}}});return{promise:a,resolve:s,reject:i}}var DataRouterContext=reactExports.createContext(null);DataRouterContext.displayName="DataRouter";var DataRouterStateContext=reactExports.createContext(null);DataRouterStateContext.displayName="DataRouterState";var ViewTransitionContext=reactExports.createContext({isTransitioning:!1});ViewTransitionContext.displayName="ViewTransition";var FetchersContext=reactExports.createContext(new Map);FetchersContext.displayName="Fetchers";var AwaitContext=reactExports.createContext(null);AwaitContext.displayName="Await";var NavigationContext=reactExports.createContext(null);NavigationContext.displayName="Navigation";var LocationContext=reactExports.createContext(null);LocationContext.displayName="Location";var RouteContext=reactExports.createContext({outlet:null,matches:[],isDataRoute:!1});RouteContext.displayName="Route";var RouteErrorContext=reactExports.createContext(null);RouteErrorContext.displayName="RouteError";function useHref(s,{relative:i}={}){invariant(useInRouterContext(),"useHref() may be used only in the context of a component.");let{basename:a,navigator:c}=reactExports.useContext(NavigationContext),{hash:d,pathname:g,search:b}=useResolvedPath(s,{relative:i}),$=g;return a!=="/"&&($=g==="/"?a:joinPaths([a,g])),c.createHref({pathname:$,search:b,hash:d})}function useInRouterContext(){return reactExports.useContext(LocationContext)!=null}function useLocation(){return invariant(useInRouterContext(),"useLocation() may be used only in the context of a component."),reactExports.useContext(LocationContext).location}var navigateEffectWarning="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function useIsomorphicLayoutEffect(s){reactExports.useContext(NavigationContext).static||reactExports.useLayoutEffect(s)}function useNavigate$1(){let{isDataRoute:s}=reactExports.useContext(RouteContext);return s?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){invariant(useInRouterContext(),"useNavigate() may be used only in the context of a component.");let s=reactExports.useContext(DataRouterContext),{basename:i,navigator:a}=reactExports.useContext(NavigationContext),{matches:c}=reactExports.useContext(RouteContext),{pathname:d}=useLocation(),g=JSON.stringify(getResolveToMatches(c)),b=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{b.current=!0}),reactExports.useCallback((j,_={})=>{if(warning(b.current,navigateEffectWarning),!b.current)return;if(typeof j=="number"){a.go(j);return}let _e=resolveTo(j,JSON.parse(g),d,_.relative==="path");s==null&&i!=="/"&&(_e.pathname=_e.pathname==="/"?i:joinPaths([i,_e.pathname])),(_.replace?a.replace:a.push)(_e,_.state,_)},[i,a,g,d,s])}var OutletContext=reactExports.createContext(null);function useOutletContext(){return reactExports.useContext(OutletContext)}function useOutlet(s){let i=reactExports.useContext(RouteContext).outlet;return i&&reactExports.createElement(OutletContext.Provider,{value:s},i)}function useParams(){let{matches:s}=reactExports.useContext(RouteContext),i=s[s.length-1];return i?i.params:{}}function useResolvedPath(s,{relative:i}={}){let{matches:a}=reactExports.useContext(RouteContext),{pathname:c}=useLocation(),d=JSON.stringify(getResolveToMatches(a));return reactExports.useMemo(()=>resolveTo(s,JSON.parse(d),c,i==="path"),[s,d,c,i])}function useRoutesImpl(s,i,a,c){var ot;invariant(useInRouterContext(),"useRoutes() may be used only in the context of a component.");let{navigator:d}=reactExports.useContext(NavigationContext),{matches:g}=reactExports.useContext(RouteContext),b=g[g.length-1],$=b?b.params:{},j=b?b.pathname:"/",_=b?b.pathnameBase:"/",_e=b&&b.route;{let st=_e&&_e.path||"";warningOnce(j,!_e||st.endsWith("*")||st.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${j}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent to .`)}let et=useLocation(),tt;if(i){let st=typeof i=="string"?parsePath$1(i):i;invariant(_==="/"||((ot=st.pathname)==null?void 0:ot.startsWith(_)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${_}" but pathname "${st.pathname}" was given in the \`location\` prop.`),tt=st}else tt=et;let rt=tt.pathname||"/",nt=rt;if(_!=="/"){let st=_.replace(/^\//,"").split("/");nt="/"+rt.replace(/^\//,"").split("/").slice(st.length).join("/")}let at=matchRoutes(s,{pathname:nt});warning(_e||at!=null,`No routes matched location "${tt.pathname}${tt.search}${tt.hash}" `),warning(at==null||at[at.length-1].route.element!==void 0||at[at.length-1].route.Component!==void 0||at[at.length-1].route.lazy!==void 0,`Matched leaf route at location "${tt.pathname}${tt.search}${tt.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let ut=_renderMatches(at&&at.map(st=>Object.assign({},st,{params:Object.assign({},$,st.params),pathname:joinPaths([_,d.encodeLocation?d.encodeLocation(st.pathname).pathname:st.pathname]),pathnameBase:st.pathnameBase==="/"?_:joinPaths([_,d.encodeLocation?d.encodeLocation(st.pathnameBase).pathname:st.pathnameBase])})),g,a,c);return i&&ut?reactExports.createElement(LocationContext.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...tt},navigationType:"POP"}},ut):ut}function DefaultErrorComponent(){let s=useRouteError(),i=isRouteErrorResponse(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),a=s instanceof Error?s.stack:null,c="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:c},g={padding:"2px 4px",backgroundColor:c},b=null;return console.error("Error handled by React Router default ErrorBoundary:",s),b=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("p",null,"💿 Hey developer 👋"),reactExports.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",reactExports.createElement("code",{style:g},"ErrorBoundary")," or"," ",reactExports.createElement("code",{style:g},"errorElement")," prop on your route.")),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("h2",null,"Unexpected Application Error!"),reactExports.createElement("h3",{style:{fontStyle:"italic"}},i),a?reactExports.createElement("pre",{style:d},a):null,b)}var defaultErrorElement=reactExports.createElement(DefaultErrorComponent,null),RenderErrorBoundary=class extends reactExports.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,i){return i.location!==s.location||i.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:i.error,location:i.location,revalidation:s.revalidation||i.revalidation}}componentDidCatch(s,i){console.error("React Router caught the following error during render",s,i)}render(){return this.state.error!==void 0?reactExports.createElement(RouteContext.Provider,{value:this.props.routeContext},reactExports.createElement(RouteErrorContext.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function RenderedRoute({routeContext:s,match:i,children:a}){let c=reactExports.useContext(DataRouterContext);return c&&c.static&&c.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=i.route.id),reactExports.createElement(RouteContext.Provider,{value:s},a)}function _renderMatches(s,i=[],a=null,c=null){if(s==null){if(!a)return null;if(a.errors)s=a.matches;else if(i.length===0&&!a.initialized&&a.matches.length>0)s=a.matches;else return null}let d=s,g=a==null?void 0:a.errors;if(g!=null){let j=d.findIndex(_=>_.route.id&&(g==null?void 0:g[_.route.id])!==void 0);invariant(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(g).join(",")}`),d=d.slice(0,Math.min(d.length,j+1))}let b=!1,$=-1;if(a)for(let j=0;j=0?d=d.slice(0,$+1):d=[d[0]];break}}}return d.reduceRight((j,_,_e)=>{let et,tt=!1,rt=null,nt=null;a&&(et=g&&_.route.id?g[_.route.id]:void 0,rt=_.route.errorElement||defaultErrorElement,b&&($<0&&_e===0?(warningOnce("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),tt=!0,nt=null):$===_e&&(tt=!0,nt=_.route.hydrateFallbackElement||null)));let at=i.concat(d.slice(0,_e+1)),ut=()=>{let ot;return et?ot=rt:tt?ot=nt:_.route.Component?ot=reactExports.createElement(_.route.Component,null):_.route.element?ot=_.route.element:ot=j,reactExports.createElement(RenderedRoute,{match:_,routeContext:{outlet:j,matches:at,isDataRoute:a!=null},children:ot})};return a&&(_.route.ErrorBoundary||_.route.errorElement||_e===0)?reactExports.createElement(RenderErrorBoundary,{location:a.location,revalidation:a.revalidation,component:rt,error:et,children:ut(),routeContext:{outlet:null,matches:at,isDataRoute:!0}}):ut()},null)}function getDataRouterConsoleError(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext(s){let i=reactExports.useContext(DataRouterContext);return invariant(i,getDataRouterConsoleError(s)),i}function useDataRouterState(s){let i=reactExports.useContext(DataRouterStateContext);return invariant(i,getDataRouterConsoleError(s)),i}function useRouteContext(s){let i=reactExports.useContext(RouteContext);return invariant(i,getDataRouterConsoleError(s)),i}function useCurrentRouteId(s){let i=useRouteContext(s),a=i.matches[i.matches.length-1];return invariant(a.route.id,`${s} can only be used on routes that contain a unique "id"`),a.route.id}function useRouteId(){return useCurrentRouteId("useRouteId")}function useNavigation(){return useDataRouterState("useNavigation").navigation}function useMatches(){let{matches:s,loaderData:i}=useDataRouterState("useMatches");return reactExports.useMemo(()=>s.map(a=>convertRouteMatchToUiMatch(a,i)),[s,i])}function useRouteError(){var c;let s=reactExports.useContext(RouteErrorContext),i=useDataRouterState("useRouteError"),a=useCurrentRouteId("useRouteError");return s!==void 0?s:(c=i.errors)==null?void 0:c[a]}var blockerId=0;function useBlocker(s){let{router:i,basename:a}=useDataRouterContext("useBlocker"),c=useDataRouterState("useBlocker"),[d,g]=reactExports.useState(""),b=reactExports.useCallback($=>{if(typeof s!="function")return!!s;if(a==="/")return s($);let{currentLocation:j,nextLocation:_,historyAction:_e}=$;return s({currentLocation:{...j,pathname:stripBasename(j.pathname,a)||j.pathname},nextLocation:{..._,pathname:stripBasename(_.pathname,a)||_.pathname},historyAction:_e})},[a,s]);return reactExports.useEffect(()=>{let $=String(++blockerId);return g($),()=>i.deleteBlocker($)},[i]),reactExports.useEffect(()=>{d!==""&&i.getBlocker(d,b)},[i,d,b]),d&&c.blockers.has(d)?c.blockers.get(d):IDLE_BLOCKER}function useNavigateStable(){let{router:s}=useDataRouterContext("useNavigate"),i=useCurrentRouteId("useNavigate"),a=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{a.current=!0}),reactExports.useCallback(async(d,g={})=>{warning(a.current,navigateEffectWarning),a.current&&(typeof d=="number"?s.navigate(d):await s.navigate(d,{fromRouteId:i,...g}))},[s,i])}var alreadyWarned={};function warningOnce(s,i,a){!i&&!alreadyWarned[s]&&(alreadyWarned[s]=!0,warning(!1,a))}var alreadyWarned2={};function warnOnce(s,i){!s&&!alreadyWarned2[i]&&(alreadyWarned2[i]=!0,console.warn(i))}function mapRouteProperties(s){let i={hasErrorBoundary:s.hasErrorBoundary||s.ErrorBoundary!=null||s.errorElement!=null};return s.Component&&(s.element&&warning(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:reactExports.createElement(s.Component),Component:void 0})),s.HydrateFallback&&(s.hydrateFallbackElement&&warning(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:reactExports.createElement(s.HydrateFallback),HydrateFallback:void 0})),s.ErrorBoundary&&(s.errorElement&&warning(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:reactExports.createElement(s.ErrorBoundary),ErrorBoundary:void 0})),i}var Deferred=class{constructor(){this.status="pending",this.promise=new Promise((s,i)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",s(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",i(a))}})}};function RouterProvider({router:s,flushSync:i}){let[a,c]=reactExports.useState(s.state),[d,g]=reactExports.useState(),[b,$]=reactExports.useState({isTransitioning:!1}),[j,_]=reactExports.useState(),[_e,et]=reactExports.useState(),[tt,rt]=reactExports.useState(),nt=reactExports.useRef(new Map),at=reactExports.useCallback((it,{deletedFetchers:ct,flushSync:lt,viewTransitionOpts:dt})=>{ct.forEach(ht=>nt.current.delete(ht)),it.fetchers.forEach((ht,Rt)=>{ht.data!==void 0&&nt.current.set(Rt,ht.data)}),warnOnce(lt===!1||i!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let mt=s.window!=null&&s.window.document!=null&&typeof s.window.document.startViewTransition=="function";if(warnOnce(dt==null||mt,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!dt||!mt){i&<?i(()=>c(it)):reactExports.startTransition(()=>c(it));return}if(i&<){i(()=>{_e&&(j&&j.resolve(),_e.skipTransition()),$({isTransitioning:!0,flushSync:!0,currentLocation:dt.currentLocation,nextLocation:dt.nextLocation})});let ht=s.window.document.startViewTransition(()=>{i(()=>c(it))});ht.finished.finally(()=>{i(()=>{_(void 0),et(void 0),g(void 0),$({isTransitioning:!1})})}),i(()=>et(ht));return}_e?(j&&j.resolve(),_e.skipTransition(),rt({state:it,currentLocation:dt.currentLocation,nextLocation:dt.nextLocation})):(g(it),$({isTransitioning:!0,flushSync:!1,currentLocation:dt.currentLocation,nextLocation:dt.nextLocation}))},[s.window,i,_e,j]);reactExports.useLayoutEffect(()=>s.subscribe(at),[s,at]),reactExports.useEffect(()=>{b.isTransitioning&&!b.flushSync&&_(new Deferred)},[b]),reactExports.useEffect(()=>{if(j&&d&&s.window){let it=d,ct=j.promise,lt=s.window.document.startViewTransition(async()=>{reactExports.startTransition(()=>c(it)),await ct});lt.finished.finally(()=>{_(void 0),et(void 0),g(void 0),$({isTransitioning:!1})}),et(lt)}},[d,j,s.window]),reactExports.useEffect(()=>{j&&d&&a.location.key===d.location.key&&j.resolve()},[j,_e,a.location,d]),reactExports.useEffect(()=>{!b.isTransitioning&&tt&&(g(tt.state),$({isTransitioning:!0,flushSync:!1,currentLocation:tt.currentLocation,nextLocation:tt.nextLocation}),rt(void 0))},[b.isTransitioning,tt]);let ut=reactExports.useMemo(()=>({createHref:s.createHref,encodeLocation:s.encodeLocation,go:it=>s.navigate(it),push:(it,ct,lt)=>s.navigate(it,{state:ct,preventScrollReset:lt==null?void 0:lt.preventScrollReset}),replace:(it,ct,lt)=>s.navigate(it,{replace:!0,state:ct,preventScrollReset:lt==null?void 0:lt.preventScrollReset})}),[s]),ot=s.basename||"/",st=reactExports.useMemo(()=>({router:s,navigator:ut,static:!1,basename:ot}),[s,ut,ot]);return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(DataRouterContext.Provider,{value:st},reactExports.createElement(DataRouterStateContext.Provider,{value:a},reactExports.createElement(FetchersContext.Provider,{value:nt.current},reactExports.createElement(ViewTransitionContext.Provider,{value:b},reactExports.createElement(Router,{basename:ot,location:a.location,navigationType:a.historyAction,navigator:ut},reactExports.createElement(MemoizedDataRoutes,{routes:s.routes,future:s.future,state:a})))))),null)}var MemoizedDataRoutes=reactExports.memo(DataRoutes);function DataRoutes({routes:s,future:i,state:a}){return useRoutesImpl(s,void 0,a,i)}function Navigate({to:s,replace:i,state:a,relative:c}){invariant(useInRouterContext()," may be used only in the context of a component.");let{static:d}=reactExports.useContext(NavigationContext);warning(!d," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:g}=reactExports.useContext(RouteContext),{pathname:b}=useLocation(),$=useNavigate$1(),j=resolveTo(s,getResolveToMatches(g),b,c==="path"),_=JSON.stringify(j);return reactExports.useEffect(()=>{$(JSON.parse(_),{replace:i,state:a,relative:c})},[$,_,c,i,a]),null}function Outlet(s){return useOutlet(s.context)}function Router({basename:s="/",children:i=null,location:a,navigationType:c="POP",navigator:d,static:g=!1}){invariant(!useInRouterContext(),"You cannot render a inside another . You should never have more than one in your app.");let b=s.replace(/^\/*/,"/"),$=reactExports.useMemo(()=>({basename:b,navigator:d,static:g,future:{}}),[b,d,g]);typeof a=="string"&&(a=parsePath$1(a));let{pathname:j="/",search:_="",hash:_e="",state:et=null,key:tt="default"}=a,rt=reactExports.useMemo(()=>{let nt=stripBasename(j,b);return nt==null?null:{location:{pathname:nt,search:_,hash:_e,state:et,key:tt},navigationType:c}},[b,j,_,_e,et,tt,c]);return warning(rt!=null,` is not able to match the URL "${j}${_}${_e}" because it does not start with the basename, so the won't render anything.`),rt==null?null:reactExports.createElement(NavigationContext.Provider,{value:$},reactExports.createElement(LocationContext.Provider,{children:i,value:rt}))}var defaultMethod="get",defaultEncType="application/x-www-form-urlencoded";function isHtmlElement(s){return s!=null&&typeof s.tagName=="string"}function isButtonElement(s){return isHtmlElement(s)&&s.tagName.toLowerCase()==="button"}function isFormElement(s){return isHtmlElement(s)&&s.tagName.toLowerCase()==="form"}function isInputElement(s){return isHtmlElement(s)&&s.tagName.toLowerCase()==="input"}function isModifiedEvent(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function shouldProcessLinkClick(s,i){return s.button===0&&(!i||i==="_self")&&!isModifiedEvent(s)}function createSearchParams(s=""){return new URLSearchParams(typeof s=="string"||Array.isArray(s)||s instanceof URLSearchParams?s:Object.keys(s).reduce((i,a)=>{let c=s[a];return i.concat(Array.isArray(c)?c.map(d=>[a,d]):[[a,c]])},[]))}function getSearchParamsForLocation(s,i){let a=createSearchParams(s);return i&&i.forEach((c,d)=>{a.has(d)||i.getAll(d).forEach(g=>{a.append(d,g)})}),a}var _formDataSupportsSubmitter=null;function isFormDataSubmitterSupported(){if(_formDataSupportsSubmitter===null)try{new FormData(document.createElement("form"),0),_formDataSupportsSubmitter=!1}catch{_formDataSupportsSubmitter=!0}return _formDataSupportsSubmitter}var supportedFormEncTypes=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function getFormEncType(s){return s!=null&&!supportedFormEncTypes.has(s)?(warning(!1,`"${s}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${defaultEncType}"`),null):s}function getFormSubmissionInfo(s,i){let a,c,d,g,b;if(isFormElement(s)){let $=s.getAttribute("action");c=$?stripBasename($,i):null,a=s.getAttribute("method")||defaultMethod,d=getFormEncType(s.getAttribute("enctype"))||defaultEncType,g=new FormData(s)}else if(isButtonElement(s)||isInputElement(s)&&(s.type==="submit"||s.type==="image")){let $=s.form;if($==null)throw new Error('Cannot submit a