diff --git a/assets/Latin-Merriweather-Bold-IIXuWTHu.woff2 b/assets/Latin-Merriweather-Bold-IIXuWTHu.woff2 new file mode 100644 index 0000000..b71dc5a Binary files /dev/null and b/assets/Latin-Merriweather-Bold-IIXuWTHu.woff2 differ diff --git a/assets/Latin-Merriweather-BoldItalic-lANwydSD.woff2 b/assets/Latin-Merriweather-BoldItalic-lANwydSD.woff2 new file mode 100644 index 0000000..36d3abf Binary files /dev/null and b/assets/Latin-Merriweather-BoldItalic-lANwydSD.woff2 differ diff --git a/assets/Latin-Merriweather-Italic-DTbnHiv6.woff2 b/assets/Latin-Merriweather-Italic-DTbnHiv6.woff2 new file mode 100644 index 0000000..0991632 Binary files /dev/null and b/assets/Latin-Merriweather-Italic-DTbnHiv6.woff2 differ diff --git a/assets/Latin-Merriweather-Light-8OcT7uuF.woff2 b/assets/Latin-Merriweather-Light-8OcT7uuF.woff2 new file mode 100644 index 0000000..a0eadc3 Binary files /dev/null and b/assets/Latin-Merriweather-Light-8OcT7uuF.woff2 differ diff --git a/assets/Latin-Merriweather-LightItalic-B_O6_0Zw.woff2 b/assets/Latin-Merriweather-LightItalic-B_O6_0Zw.woff2 new file mode 100644 index 0000000..5112dab Binary files /dev/null and b/assets/Latin-Merriweather-LightItalic-B_O6_0Zw.woff2 differ diff --git a/assets/Latin-Merriweather-Regular-BwwdRmdN.woff2 b/assets/Latin-Merriweather-Regular-BwwdRmdN.woff2 new file mode 100644 index 0000000..9a9bd64 Binary files /dev/null and b/assets/Latin-Merriweather-Regular-BwwdRmdN.woff2 differ diff --git a/assets/hero-9qBhH4BY.jpg b/assets/hero-9qBhH4BY.jpg new file mode 100644 index 0000000..62320c4 Binary files /dev/null and b/assets/hero-9qBhH4BY.jpg differ diff --git a/assets/index-8RBVJHx5.js b/assets/index-8RBVJHx5.js new file mode 100644 index 0000000..c64f8c4 --- /dev/null +++ b/assets/index-8RBVJHx5.js @@ -0,0 +1,639 @@ +var qD=Object.defineProperty;var _x=e=>{throw TypeError(e)};var WD=(e,t,n)=>t in e?qD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>WD(e,typeof t!="symbol"?t+"":t,n),Ep=(e,t,n)=>t.has(e)||_x("Cannot "+n);var P=(e,t,n)=>(Ep(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?_x("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Ep(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Me=(e,t,n)=>(Ep(e,t,"access private method"),n);var nd=(e,t,n,r)=>({set _(i){he(e,t,i,n)},get _(){return P(e,t,r)}});function GD(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Uo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function KD(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var CT={exports:{}},n0={},AT={exports:{}},Te={};/** + * @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 Sc=Symbol.for("react.element"),YD=Symbol.for("react.portal"),QD=Symbol.for("react.fragment"),XD=Symbol.for("react.strict_mode"),ZD=Symbol.for("react.profiler"),JD=Symbol.for("react.provider"),e9=Symbol.for("react.context"),t9=Symbol.for("react.forward_ref"),n9=Symbol.for("react.suspense"),r9=Symbol.for("react.memo"),i9=Symbol.for("react.lazy"),xx=Symbol.iterator;function o9(e){return e===null||typeof e!="object"?null:(e=xx&&e[xx]||e["@@iterator"],typeof e=="function"?e:null)}var RT={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$T=Object.assign,TT={};function ll(e,t,n){this.props=e,this.context=t,this.refs=TT,this.updater=n||RT}ll.prototype.isReactComponent={};ll.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ll.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function kT(){}kT.prototype=ll.prototype;function Bv(e,t,n){this.props=e,this.context=t,this.refs=TT,this.updater=n||RT}var Hv=Bv.prototype=new kT;Hv.constructor=Bv;$T(Hv,ll.prototype);Hv.isPureReactComponent=!0;var Sx=Array.isArray,MT=Object.prototype.hasOwnProperty,qv={current:null},NT={key:!0,ref:!0,__self:!0,__source:!0};function LT(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)MT.call(t,r)&&!NT.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,N=V[Q];if(0>>1;Qi(re,W))Yi(pe,re)?(V[Q]=pe,V[Y]=W,Q=Y):(V[Q]=re,V[G]=W,Q=G);else if(Yi(pe,W))V[Q]=pe,V[Y]=W,Q=Y;else break e}}return q}function i(V,q){var W=V.sortIndex-q.sortIndex;return W!==0?W:V.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(V){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=V)r(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(u)}}function x(V){if(y=!1,v(V),!p)if(n(l)!==null)p=!0,H(S);else{var q=n(u);q!==null&&K(x,q.startTime-V)}}function S(V,q){p=!1,y&&(y=!1,m(A),A=-1),h=!0;var W=f;try{for(v(q),d=n(l);d!==null&&(!(d.expirationTime>q)||V&&!M());){var Q=d.callback;if(typeof Q=="function"){d.callback=null,f=d.priorityLevel;var N=Q(d.expirationTime<=q);q=e.unstable_now(),typeof N=="function"?d.callback=N:d===n(l)&&r(l),v(q)}else r(l);d=n(l)}if(d!==null)var B=!0;else{var G=n(u);G!==null&&K(x,G.startTime-q),B=!1}return B}finally{d=null,f=W,h=!1}}var w=!1,E=null,A=-1,k=5,R=-1;function M(){return!(e.unstable_now()-RV||125Q?(V.sortIndex=W,t(u,V),n(l)===null&&V===n(u)&&(y?(m(A),A=-1):y=!0,K(x,W-Q))):(V.sortIndex=N,t(l,V),p||h||(p=!0,H(S))),V},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(V){var q=f;return function(){var W=f;f=q;try{return V.apply(this,arguments)}finally{f=W}}}})(DT);OT.exports=DT;var y9=OT.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 jT=U,Tn=y9;function Z(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),a1=Object.prototype.hasOwnProperty,v9=/^[: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]*$/,bx={},Ex={};function _9(e){return a1.call(Ex,e)?!0:a1.call(bx,e)?!1:v9.test(e)?Ex[e]=!0:(bx[e]=!0,!1)}function x9(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function S9(e,t,n,r){if(t===null||typeof t>"u"||x9(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function en(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Lt[e]=new en(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Lt[t]=new en(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Lt[e]=new en(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Lt[e]=new en(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Lt[e]=new en(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Lt[e]=new en(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Lt[e]=new en(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Lt[e]=new en(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Lt[e]=new en(e,5,!1,e.toLowerCase(),null,!1,!1)});var Gv=/[\-:]([a-z])/g;function Kv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Gv,Kv);Lt[t]=new en(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Gv,Kv);Lt[t]=new en(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Gv,Kv);Lt[t]=new en(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Lt[e]=new en(e,1,!1,e.toLowerCase(),null,!1,!1)});Lt.xlinkHref=new en("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Lt[e]=new en(e,1,!1,e.toLowerCase(),null,!0,!0)});function Yv(e,t,n,r){var i=Lt.hasOwnProperty(t)?Lt[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` +`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Rp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zl(e):""}function w9(e){switch(e.tag){case 5:return Zl(e.type);case 16:return Zl("Lazy");case 13:return Zl("Suspense");case 19:return Zl("SuspenseList");case 0:case 2:case 15:return e=$p(e.type,!1),e;case 11:return e=$p(e.type.render,!1),e;case 1:return e=$p(e.type,!0),e;default:return""}}function d1(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xs:return"Fragment";case Qs:return"Portal";case l1:return"Profiler";case Qv:return"StrictMode";case u1:return"Suspense";case c1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VT:return(e.displayName||"Context")+".Consumer";case UT:return(e._context.displayName||"Context")+".Provider";case Xv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zv:return t=e.displayName||null,t!==null?t:d1(e.type)||"Memo";case Ii:t=e._payload,e=e._init;try{return d1(e(t))}catch{}}return null}function b9(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return d1(t);case 8:return t===Qv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function yo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function BT(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function E9(e){var t=BT(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function od(e){e._valueTracker||(e._valueTracker=E9(e))}function HT(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=BT(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Rf(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function f1(e,t){var n=t.checked;return nt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ax(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=yo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qT(e,t){t=t.checked,t!=null&&Yv(e,"checked",t,!1)}function h1(e,t){qT(e,t);var n=yo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?p1(e,t.type,n):t.hasOwnProperty("defaultValue")&&p1(e,t.type,yo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Rx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function p1(e,t,n){(t!=="number"||Rf(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jl=Array.isArray;function ha(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=sd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Iu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hu={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},C9=["Webkit","ms","Moz","O"];Object.keys(hu).forEach(function(e){C9.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hu[t]=hu[e]})});function YT(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hu.hasOwnProperty(e)&&hu[e]?(""+t).trim():t+"px"}function QT(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=YT(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var A9=nt({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 y1(e,t){if(t){if(A9[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Z(62))}}function v1(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _1=null;function Jv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var x1=null,pa=null,ga=null;function kx(e){if(e=Ec(e)){if(typeof x1!="function")throw Error(Z(280));var t=e.stateNode;t&&(t=a0(t),x1(e.stateNode,e.type,t))}}function XT(e){pa?ga?ga.push(e):ga=[e]:pa=e}function ZT(){if(pa){var e=pa,t=ga;if(ga=pa=null,kx(e),t)for(e=0;e>>=0,e===0?32:31-(D9(e)/j9|0)|0}var ad=64,ld=4194304;function eu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mf(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=eu(a):(o&=s,o!==0&&(r=eu(o)))}else s=n&~i,s!==0?r=eu(s):o!==0&&(r=eu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function wc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pr(t),e[t]=n}function z9(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=gu),Fx=" ",Ux=!1;function vk(e,t){switch(e){case"keyup":return m4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _k(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zs=!1;function v4(e,t){switch(e){case"compositionend":return _k(t);case"keypress":return t.which!==32?null:(Ux=!0,Fx);case"textInput":return e=t.data,e===Fx&&Ux?null:e;default:return null}}function _4(e,t){if(Zs)return e==="compositionend"||!a2&&vk(e,t)?(e=mk(),Zd=i2=Ji=null,Zs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Hx(n)}}function bk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ek(){for(var e=window,t=Rf();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rf(e.document)}return t}function l2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $4(e){var t=Ek(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&bk(n.ownerDocument.documentElement,n)){if(r!==null&&l2(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=qx(n,o);var s=qx(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Js=null,A1=null,yu=null,R1=!1;function Wx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;R1||Js==null||Js!==Rf(r)||(r=Js,"selectionStart"in r&&l2(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),yu&&Vu(yu,r)||(yu=r,r=Pf(A1,"onSelect"),0na||(e.current=L1[na],L1[na]=null,na--)}function qe(e,t){na++,L1[na]=e.current,e.current=t}var vo={},Vt=Eo(vo),pn=Eo(!1),cs=vo;function Fa(e,t){var n=e.type.contextTypes;if(!n)return vo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function gn(e){return e=e.childContextTypes,e!=null}function Of(){Ke(pn),Ke(Vt)}function Jx(e,t,n){if(Vt.current!==vo)throw Error(Z(168));qe(Vt,t),qe(pn,n)}function Lk(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Z(108,b9(e)||"Unknown",i));return nt({},n,r)}function Df(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vo,cs=Vt.current,qe(Vt,e),qe(pn,pn.current),!0}function eS(e,t,n){var r=e.stateNode;if(!r)throw Error(Z(169));n?(e=Lk(e,t,cs),r.__reactInternalMemoizedMergedChildContext=e,Ke(pn),Ke(Vt),qe(Vt,e)):Ke(pn),qe(pn,n)}var ii=null,l0=!1,zp=!1;function Pk(e){ii===null?ii=[e]:ii.push(e)}function U4(e){l0=!0,Pk(e)}function Co(){if(!zp&&ii!==null){zp=!0;var e=0,t=Ue;try{var n=ii;for(Ue=1;e>=s,i-=s,si=1<<32-pr(t)+i|n<A?(k=E,E=null):k=E.sibling;var R=f(m,E,v[A],x);if(R===null){E===null&&(E=k);break}e&&E&&R.alternate===null&&t(m,E),g=o(R,g,A),w===null?S=R:w.sibling=R,w=R,E=k}if(A===v.length)return n(m,E),Xe&&Po(m,A),S;if(E===null){for(;AA?(k=E,E=null):k=E.sibling;var M=f(m,E,R.value,x);if(M===null){E===null&&(E=k);break}e&&E&&M.alternate===null&&t(m,E),g=o(M,g,A),w===null?S=M:w.sibling=M,w=M,E=k}if(R.done)return n(m,E),Xe&&Po(m,A),S;if(E===null){for(;!R.done;A++,R=v.next())R=d(m,R.value,x),R!==null&&(g=o(R,g,A),w===null?S=R:w.sibling=R,w=R);return Xe&&Po(m,A),S}for(E=r(m,E);!R.done;A++,R=v.next())R=h(E,m,A,R.value,x),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?A:R.key),g=o(R,g,A),w===null?S=R:w.sibling=R,w=R);return e&&E.forEach(function($){return t(m,$)}),Xe&&Po(m,A),S}function _(m,g,v,x){if(typeof v=="object"&&v!==null&&v.type===Xs&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case id:e:{for(var S=v.key,w=g;w!==null;){if(w.key===S){if(S=v.type,S===Xs){if(w.tag===7){n(m,w.sibling),g=i(w,v.props.children),g.return=m,m=g;break e}}else if(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ii&&aS(S)===w.type){n(m,w.sibling),g=i(w,v.props),g.ref=Pl(m,w,v),g.return=m,m=g;break e}n(m,w);break}else t(m,w);w=w.sibling}v.type===Xs?(g=ts(v.props.children,m.mode,x,v.key),g.return=m,m=g):(x=af(v.type,v.key,v.props,null,m.mode,x),x.ref=Pl(m,g,v),x.return=m,m=x)}return s(m);case Qs:e:{for(w=v.key;g!==null;){if(g.key===w)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(m,g.sibling),g=i(g,v.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=Qp(v,m.mode,x),g.return=m,m=g}return s(m);case Ii:return w=v._init,_(m,g,w(v._payload),x)}if(Jl(v))return p(m,g,v,x);if(Tl(v))return y(m,g,v,x);gd(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(m,g.sibling),g=i(g,v),g.return=m,m=g):(n(m,g),g=Yp(v,m.mode,x),g.return=m,m=g),s(m)):n(m,g)}return _}var Va=zk(!0),Bk=zk(!1),Cc={},Ir=Eo(Cc),qu=Eo(Cc),Wu=Eo(Cc);function Bo(e){if(e===Cc)throw Error(Z(174));return e}function y2(e,t){switch(qe(Wu,t),qe(qu,e),qe(Ir,Cc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:m1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=m1(t,e)}Ke(Ir),qe(Ir,t)}function za(){Ke(Ir),Ke(qu),Ke(Wu)}function Hk(e){Bo(Wu.current);var t=Bo(Ir.current),n=m1(t,e.type);t!==n&&(qe(qu,e),qe(Ir,n))}function v2(e){qu.current===e&&(Ke(Ir),Ke(qu))}var Je=Eo(0);function Bf(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bp=[];function _2(){for(var e=0;en?n:4,e(!0);var r=Hp.transition;Hp.transition={};try{e(!1),t()}finally{Ue=n,Hp.transition=r}}function s8(){return Qn().memoizedState}function H4(e,t,n){var r=uo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},a8(e))l8(t,n);else if(n=jk(e,t,n,r),n!==null){var i=Xt();gr(n,e,r,i),u8(n,t,r)}}function q4(e,t,n){var r=uo(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(a8(e))l8(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,yr(a,s)){var l=t.interleaved;l===null?(i.next=i,g2(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=jk(e,t,i,r),n!==null&&(i=Xt(),gr(n,e,r,i),u8(n,t,r))}}function a8(e){var t=e.alternate;return e===et||t!==null&&t===et}function l8(e,t){vu=Hf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function u8(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,t2(e,n)}}var qf={readContext:Yn,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},W4={readContext:Yn,useCallback:function(e,t){return wr().memoizedState=[e,t===void 0?null:t],e},useContext:Yn,useEffect:uS,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,nf(4194308,4,t8.bind(null,t,e),n)},useLayoutEffect:function(e,t){return nf(4194308,4,e,t)},useInsertionEffect:function(e,t){return nf(4,2,e,t)},useMemo:function(e,t){var n=wr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=H4.bind(null,et,e),[r.memoizedState,e]},useRef:function(e){var t=wr();return e={current:e},t.memoizedState=e},useState:lS,useDebugValue:E2,useDeferredValue:function(e){return wr().memoizedState=e},useTransition:function(){var e=lS(!1),t=e[0];return e=B4.bind(null,e[1]),wr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=et,i=wr();if(Xe){if(n===void 0)throw Error(Z(407));n=n()}else{if(n=t(),At===null)throw Error(Z(349));fs&30||Gk(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,uS(Yk.bind(null,r,o,e),[e]),r.flags|=2048,Yu(9,Kk.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=wr(),t=At.identifierPrefix;if(Xe){var n=ai,r=si;n=(r&~(1<<32-pr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Gu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[kr]=t,e[Hu]=r,v8(e,t,!1,!1),t.stateNode=e;e:{switch(s=v1(n,r),n){case"dialog":We("cancel",e),We("close",e),i=r;break;case"iframe":case"object":case"embed":We("load",e),i=r;break;case"video":case"audio":for(i=0;iHa&&(t.flags|=128,r=!0,Il(o,!1),t.lanes=4194304)}else{if(!r)if(e=Bf(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Il(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Xe)return It(t),null}else 2*lt()-o.renderingStartTime>Ha&&n!==1073741824&&(t.flags|=128,r=!0,Il(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=lt(),t.sibling=null,n=Je.current,qe(Je,r?n&1|2:n&1),t):(It(t),null);case 22:case 23:return k2(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?An&1073741824&&(It(t),t.subtreeFlags&6&&(t.flags|=8192)):It(t),null;case 24:return null;case 25:return null}throw Error(Z(156,t.tag))}function ej(e,t){switch(c2(t),t.tag){case 1:return gn(t.type)&&Of(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return za(),Ke(pn),Ke(Vt),_2(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return v2(t),null;case 13:if(Ke(Je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));Ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ke(Je),null;case 4:return za(),null;case 10:return p2(t.type._context),null;case 22:case 23:return k2(),null;case 24:return null;default:return null}}var yd=!1,Ut=!1,tj=typeof WeakSet=="function"?WeakSet:Set,ce=null;function sa(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){it(e,t,r)}else n.current=null}function q1(e,t,n){try{n()}catch(r){it(e,t,r)}}var vS=!1;function nj(e,t){if($1=Nf,e=Ek(),l2(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(a=s),f===o&&++c===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(T1={focusedElem:e,selectionRange:n},Nf=!1,ce=t;ce!==null;)if(t=ce,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ce=e;else for(;ce!==null;){t=ce;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var y=p.memoizedProps,_=p.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:ir(t.type,y),_);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(163))}}catch(x){it(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,ce=e;break}ce=t.return}return p=vS,vS=!1,p}function _u(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&q1(t,n,o)}i=i.next}while(i!==r)}}function d0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function W1(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function S8(e){var t=e.alternate;t!==null&&(e.alternate=null,S8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kr],delete t[Hu],delete t[N1],delete t[j4],delete t[F4])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function w8(e){return e.tag===5||e.tag===3||e.tag===4}function _S(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||w8(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function G1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=If));else if(r!==4&&(e=e.child,e!==null))for(G1(e,t,n),e=e.sibling;e!==null;)G1(e,t,n),e=e.sibling}function K1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(K1(e,t,n),e=e.sibling;e!==null;)K1(e,t,n),e=e.sibling}var kt=null,sr=!1;function ki(e,t,n){for(n=n.child;n!==null;)b8(e,t,n),n=n.sibling}function b8(e,t,n){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(r0,n)}catch{}switch(n.tag){case 5:Ut||sa(n,t);case 6:var r=kt,i=sr;kt=null,ki(e,t,n),kt=r,sr=i,kt!==null&&(sr?(e=kt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):kt.removeChild(n.stateNode));break;case 18:kt!==null&&(sr?(e=kt,n=n.stateNode,e.nodeType===8?Vp(e.parentNode,n):e.nodeType===1&&Vp(e,n),Fu(e)):Vp(kt,n.stateNode));break;case 4:r=kt,i=sr,kt=n.stateNode.containerInfo,sr=!0,ki(e,t,n),kt=r,sr=i;break;case 0:case 11:case 14:case 15:if(!Ut&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&q1(n,t,s),i=i.next}while(i!==r)}ki(e,t,n);break;case 1:if(!Ut&&(sa(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){it(n,t,a)}ki(e,t,n);break;case 21:ki(e,t,n);break;case 22:n.mode&1?(Ut=(r=Ut)||n.memoizedState!==null,ki(e,t,n),Ut=r):ki(e,t,n);break;default:ki(e,t,n)}}function xS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tj),t.forEach(function(r){var i=dj.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function nr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=lt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ij(r/1960))-r,10e?16:e,eo===null)var r=!1;else{if(e=eo,eo=null,Kf=0,Oe&6)throw Error(Z(331));var i=Oe;for(Oe|=4,ce=e.current;ce!==null;){var o=ce,s=o.child;if(ce.flags&16){var a=o.deletions;if(a!==null){for(var l=0;llt()-$2?es(e,0):R2|=n),mn(e,t)}function M8(e,t){t===0&&(e.mode&1?(t=ld,ld<<=1,!(ld&130023424)&&(ld=4194304)):t=1);var n=Xt();e=mi(e,t),e!==null&&(wc(e,t,n),mn(e,n))}function cj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),M8(e,n)}function dj(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Z(314))}r!==null&&r.delete(t),M8(e,n)}var N8;N8=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||pn.current)hn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return hn=!1,Z4(e,t,n);hn=!!(e.flags&131072)}else hn=!1,Xe&&t.flags&1048576&&Ik(t,Ff,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;rf(e,t),e=t.pendingProps;var i=Fa(t,Vt.current);ya(t,n),i=S2(null,t,r,e,i,n);var o=w2();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,gn(r)?(o=!0,Df(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,m2(t),i.updater=u0,t.stateNode=i,i._reactInternals=t,j1(t,r,e,n),t=V1(null,t,r,!0,o,n)):(t.tag=0,Xe&&o&&u2(t),Gt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(rf(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=hj(r),e=ir(r,e),i){case 0:t=U1(null,t,r,e,n);break e;case 1:t=gS(null,t,r,e,n);break e;case 11:t=hS(null,t,r,e,n);break e;case 14:t=pS(null,t,r,ir(r.type,e),n);break e}throw Error(Z(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ir(r,i),U1(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ir(r,i),gS(e,t,r,i,n);case 3:e:{if(g8(t),e===null)throw Error(Z(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Fk(e,t),zf(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ba(Error(Z(423)),t),t=mS(e,t,r,n,i);break e}else if(r!==i){i=Ba(Error(Z(424)),t),t=mS(e,t,r,n,i);break e}else for(Rn=so(t.stateNode.containerInfo.firstChild),$n=t,Xe=!0,lr=null,n=Bk(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ua(),r===i){t=yi(e,t,n);break e}Gt(e,t,r,n)}t=t.child}return t;case 5:return Hk(t),e===null&&I1(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,k1(r,i)?s=null:o!==null&&k1(r,o)&&(t.flags|=32),p8(e,t),Gt(e,t,s,n),t.child;case 6:return e===null&&I1(t),null;case 13:return m8(e,t,n);case 4:return y2(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(t,null,r,n):Gt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ir(r,i),hS(e,t,r,i,n);case 7:return Gt(e,t,t.pendingProps,n),t.child;case 8:return Gt(e,t,t.pendingProps.children,n),t.child;case 12:return Gt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,qe(Uf,r._currentValue),r._currentValue=s,o!==null)if(yr(o.value,s)){if(o.children===i.children&&!pn.current){t=yi(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=di(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),O1(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Z(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),O1(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Gt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ya(t,n),i=Yn(i),r=r(i),t.flags|=1,Gt(e,t,r,n),t.child;case 14:return r=t.type,i=ir(r,t.pendingProps),i=ir(r.type,i),pS(e,t,r,i,n);case 15:return f8(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ir(r,i),rf(e,t),t.tag=1,gn(r)?(e=!0,Df(t)):e=!1,ya(t,n),Vk(t,r,i),j1(t,r,i,n),V1(null,t,r,!0,e,n);case 19:return y8(e,t,n);case 22:return h8(e,t,n)}throw Error(Z(156,t.tag))};function L8(e,t){return ok(e,t)}function fj(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qn(e,t,n,r){return new fj(e,t,n,r)}function N2(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hj(e){if(typeof e=="function")return N2(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xv)return 11;if(e===Zv)return 14}return 2}function co(e,t){var n=e.alternate;return n===null?(n=qn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function af(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")N2(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Xs:return ts(n.children,i,o,t);case Qv:s=8,i|=8;break;case l1:return e=qn(12,n,t,i|2),e.elementType=l1,e.lanes=o,e;case u1:return e=qn(13,n,t,i),e.elementType=u1,e.lanes=o,e;case c1:return e=qn(19,n,t,i),e.elementType=c1,e.lanes=o,e;case zT:return h0(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case UT:s=10;break e;case VT:s=9;break e;case Xv:s=11;break e;case Zv:s=14;break e;case Ii:s=16,r=null;break e}throw Error(Z(130,e==null?e:typeof e,""))}return t=qn(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ts(e,t,n,r){return e=qn(7,e,r,t),e.lanes=n,e}function h0(e,t,n,r){return e=qn(22,e,r,t),e.elementType=zT,e.lanes=n,e.stateNode={isHidden:!1},e}function Yp(e,t,n){return e=qn(6,e,null,t),e.lanes=n,e}function Qp(e,t,n){return t=qn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pj(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kp(0),this.expirationTimes=kp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kp(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function L2(e,t,n,r,i,o,s,a,l){return e=new pj(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},m2(o),e}function gj(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(D8)}catch(e){console.error(e)}}D8(),IT.exports=Mn;var j8=IT.exports;const xj=Fr(j8);var $S=j8;s1.createRoot=$S.createRoot,s1.hydrateRoot=$S.hydrateRoot;function Sj(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var F8={exports:{}};const wj={},bj=Object.freeze(Object.defineProperty({__proto__:null,default:wj},Symbol.toStringTag,{value:"Module"})),Ej=KD(bj);(function(e,t){(function(n,r){e.exports=r()})(Uo,function(){var n=n||function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Uo<"u"&&Uo.crypto&&(o=Uo.crypto),!o&&typeof Sj=="function")try{o=Ej}catch{}var s=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function g(){}return function(v){var x;return g.prototype=v,x=new g,g.prototype=null,x}}(),l={},u=l.lib={},c=u.Base=function(){return{extend:function(g){var v=a(this);return g&&v.mixIn(g),(!v.hasOwnProperty("init")||this.init===v.init)&&(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var g=this.extend();return g.init.apply(g,arguments),g},init:function(){},mixIn:function(g){for(var v in g)g.hasOwnProperty(v)&&(this[v]=g[v]);g.hasOwnProperty("toString")&&(this.toString=g.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),d=u.WordArray=c.extend({init:function(g,v){g=this.words=g||[],v!=i?this.sigBytes=v:this.sigBytes=g.length*4},toString:function(g){return(g||h).stringify(this)},concat:function(g){var v=this.words,x=g.words,S=this.sigBytes,w=g.sigBytes;if(this.clamp(),S%4)for(var E=0;E>>2]>>>24-E%4*8&255;v[S+E>>>2]|=A<<24-(S+E)%4*8}else for(var k=0;k>>2]=x[k>>>2];return this.sigBytes+=w,this},clamp:function(){var g=this.words,v=this.sigBytes;g[v>>>2]&=4294967295<<32-v%4*8,g.length=r.ceil(v/4)},clone:function(){var g=c.clone.call(this);return g.words=this.words.slice(0),g},random:function(g){for(var v=[],x=0;x>>2]>>>24-w%4*8&255;S.push((E>>>4).toString(16)),S.push((E&15).toString(16))}return S.join("")},parse:function(g){for(var v=g.length,x=[],S=0;S>>3]|=parseInt(g.substr(S,2),16)<<24-S%8*4;return new d.init(x,v/2)}},p=f.Latin1={stringify:function(g){for(var v=g.words,x=g.sigBytes,S=[],w=0;w>>2]>>>24-w%4*8&255;S.push(String.fromCharCode(E))}return S.join("")},parse:function(g){for(var v=g.length,x=[],S=0;S>>2]|=(g.charCodeAt(S)&255)<<24-S%4*8;return new d.init(x,v)}},y=f.Utf8={stringify:function(g){try{return decodeURIComponent(escape(p.stringify(g)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(g){return p.parse(unescape(encodeURIComponent(g)))}},_=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(g){typeof g=="string"&&(g=y.parse(g)),this._data.concat(g),this._nDataBytes+=g.sigBytes},_process:function(g){var v,x=this._data,S=x.words,w=x.sigBytes,E=this.blockSize,A=E*4,k=w/A;g?k=r.ceil(k):k=r.max((k|0)-this._minBufferSize,0);var R=k*E,M=r.min(R*4,w);if(R){for(var $=0;$>>7)^(k<<14|k>>>18)^k>>>3,M=d[A-2],$=(M<<15|M>>>17)^(M<<13|M>>>19)^M>>>10;d[A]=R+d[A-7]+$+d[A-16]}var T=x&S^~x&w,O=_&m^_&g^m&g,I=(_<<30|_>>>2)^(_<<19|_>>>13)^(_<<10|_>>>22),H=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),K=E+H+T+c[A]+d[A],V=I+O;E=w,w=S,S=x,x=v+K|0,v=g,g=m,m=_,_=K+V|0}y[0]=y[0]+_|0,y[1]=y[1]+m|0,y[2]=y[2]+g|0,y[3]=y[3]+v|0,y[4]=y[4]+x|0,y[5]=y[5]+S|0,y[6]=y[6]+w|0,y[7]=y[7]+E|0},_doFinalize:function(){var h=this._data,p=h.words,y=this._nDataBytes*8,_=h.sigBytes*8;return p[_>>>5]|=128<<24-_%32,p[(_+64>>>9<<4)+14]=r.floor(y/4294967296),p[(_+64>>>9<<4)+15]=y,h.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var h=a.clone.call(this);return h._hash=this._hash.clone(),h}});i.SHA256=a._createHelper(f),i.HmacSHA256=a._createHmacHelper(f)}(Math),n.SHA256})})(U8);var Aj=U8.exports;const Rj=Fr(Aj);var V8={exports:{}};(function(e,t){(function(n,r){e.exports=r(v0)})(Uo,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Base64={stringify:function(l){var u=l.words,c=l.sigBytes,d=this._map;l.clamp();for(var f=[],h=0;h>>2]>>>24-h%4*8&255,y=u[h+1>>>2]>>>24-(h+1)%4*8&255,_=u[h+2>>>2]>>>24-(h+2)%4*8&255,m=p<<16|y<<8|_,g=0;g<4&&h+g*.75>>6*(3-g)&63));var v=d.charAt(64);if(v)for(;f.length%4;)f.push(v);return f.join("")},parse:function(l){var u=l.length,c=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var f=0;f>>6-h%4*2,_=p|y;d[f>>>2]|=_<<24-f%4*8,f++}return o.create(d,f)}}(),n.enc.Base64})})(V8);var $j=V8.exports;const TS=Fr($j);var z8={exports:{}};(function(e,t){(function(n,r){e.exports=r(v0)})(Uo,function(n){return n.enc.Utf8})})(z8);var Tj=z8.exports;const kj=Fr(Tj);function J1(e){this.message=e}J1.prototype=new Error,J1.prototype.name="InvalidCharacterError";var kS=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new J1("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,o=0,s="";r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?s+=String.fromCharCode(255&n>>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return s};function Mj(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(kS(n).replace(/(.)/g,function(r,i){var o=i.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(t)}catch{return kS(t)}}function Xf(e){this.message=e}function Nj(e,t){if(typeof e!="string")throw new Xf("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Mj(e.split(".")[n]))}catch(r){throw new Xf("Invalid token specified: "+r.message)}}Xf.prototype=new Error,Xf.prototype.name="InvalidTokenError";var Lj={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},br,Er,Zf=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(Zf||{});(e=>{function t(){br=3,Er=Lj}e.reset=t;function n(i){if(!(0<=i&&i<=4))throw new Error("Invalid log level");br=i}e.setLevel=n;function r(i){Er=i}e.setLogger=r})(Zf||(Zf={}));var be=class{constructor(e){this._name=e}debug(...e){br>=4&&Er.debug(be._format(this._name,this._method),...e)}info(...e){br>=3&&Er.info(be._format(this._name,this._method),...e)}warn(...e){br>=2&&Er.warn(be._format(this._name,this._method),...e)}error(...e){br>=1&&Er.error(be._format(this._name,this._method),...e)}throw(e){throw this.error(e),e}create(e){const t=Object.create(this);return t._method=e,t.debug("begin"),t}static createStatic(e,t){const n=new be(`${e}.${t}`);return n.debug("begin"),n}static _format(e,t){const n=`[${e}]`;return t?`${n} ${t}:`:n}static debug(e,...t){br>=4&&Er.debug(be._format(e),...t)}static info(e,...t){br>=3&&Er.info(be._format(e),...t)}static warn(e,...t){br>=2&&Er.warn(be._format(e),...t)}static error(e,...t){br>=1&&Er.error(be._format(e),...t)}};Zf.reset();var Pj="10000000-1000-4000-8000-100000000000",Mr=class{static _randomWord(){return Cj.lib.WordArray.random(1).words[0]}static generateUUIDv4(){return Pj.replace(/[018]/g,t=>(+t^Mr._randomWord()&15>>+t/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return Mr.generateUUIDv4()+Mr.generateUUIDv4()+Mr.generateUUIDv4()}static generateCodeChallenge(e){try{const t=Rj(e);return TS.stringify(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(t){throw be.error("CryptoUtils.generateCodeChallenge",t),t}}static generateBasicAuth(e,t){const n=kj.parse([e,t].join(":"));return TS.stringify(n)}},Di=class{constructor(e){this._name=e,this._logger=new be(`Event('${this._name}')`),this._callbacks=[]}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){const t=this._callbacks.lastIndexOf(e);t>=0&&this._callbacks.splice(t,1)}raise(...e){this._logger.debug("raise:",...e);for(const t of this._callbacks)t(...e)}},ey=class{static decode(e){try{return Nj(e)}catch(t){throw be.error("JwtUtils.decode",t),t}}},MS=class{static center({...e}){var t,n,r;return e.width==null&&(e.width=(t=[800,720,600,480].find(i=>i<=window.outerWidth/1.618))!=null?t:360),(n=e.left)!=null||(e.left=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2))),e.height!=null&&((r=e.top)!=null||(e.top=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2)))),e}static serialize(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}=${typeof n!="boolean"?n:n?"yes":"no"}`).join(",")}},Gn=class extends Di{constructor(){super(...arguments),this._logger=new be(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{const e=this._expiration-Gn.getEpochTime();this._logger.debug("timer completes in",e),this._expiration<=Gn.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(e){const t=this._logger.create("init");e=Math.max(Math.floor(e),1);const n=Gn.getEpochTime()+e;if(this.expiration===n&&this._timerHandle){t.debug("skipping since already initialized for expiration at",this.expiration);return}this.cancel(),t.debug("using duration",e),this._expiration=n;const r=Math.min(e,5);this._timerHandle=setInterval(this._callback,r*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create("cancel"),this._timerHandle&&(clearInterval(this._timerHandle),this._timerHandle=null)}},ty=class{static readParams(e,t="query"){if(!e)throw new TypeError("Invalid URL");const r=new URL(e,"http://127.0.0.1")[t==="fragment"?"hash":"search"];return new URLSearchParams(r.slice(1))}},ny=";",gs=class extends Error{constructor(e,t){var n,r,i;if(super(e.error_description||e.error||""),this.form=t,this.name="ErrorResponse",!e.error)throw be.error("ErrorResponse","No error passed"),new Error("No error passed");this.error=e.error,this.error_description=(n=e.error_description)!=null?n:null,this.error_uri=(r=e.error_uri)!=null?r:null,this.state=e.userState,this.session_state=(i=e.session_state)!=null?i:null,this.url_state=e.url_state}},D2=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},Ij=class{constructor(e){this._logger=new be("AccessTokenEvents"),this._expiringTimer=new Gn("Access token expiring"),this._expiredTimer=new Gn("Access token expired"),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}load(e){const t=this._logger.create("load");if(e.access_token&&e.expires_in!==void 0){const n=e.expires_in;if(t.debug("access token present, remaining duration:",n),n>0){let i=n-this._expiringNotificationTimeInSeconds;i<=0&&(i=1),t.debug("registering expiring timer, raising in",i,"seconds"),this._expiringTimer.init(i)}else t.debug("canceling existing expiring timer because we're past expiration."),this._expiringTimer.cancel();const r=n+1;t.debug("registering expired timer, raising in",r,"seconds"),this._expiredTimer.init(r)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}unload(){this._logger.debug("unload: canceling existing access token timers"),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},Oj=class{constructor(e,t,n,r,i){this._callback=e,this._client_id=t,this._intervalInSeconds=r,this._stopOnError=i,this._logger=new be("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=s=>{s.origin===this._frame_origin&&s.source===this._frame.contentWindow&&(s.data==="error"?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):s.data==="changed"?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(s.data+" message from check session op iframe"))};const o=new URL(n);this._frame_origin=o.origin,this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="fixed",this._frame.style.left="-1000px",this._frame.style.top="0",this._frame.width="0",this._frame.height="0",this._frame.src=o.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener("message",this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create("start"),this.stop(),this._session_state=e;const t=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,this._intervalInSeconds*1e3)}stop(){this._logger.create("stop"),this._session_state=null,this._timer&&(clearInterval(this._timer),this._timer=null)}},B8=class{constructor(){this._logger=new be("InMemoryWebStorage"),this._data={}}clear(){this._logger.create("clear"),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},j2=class{constructor(e=[],t=null,n={}){this._jwtHandler=t,this._extraHeaders=n,this._logger=new be("JsonService"),this._contentTypes=[],this._contentTypes.push(...e,"application/json"),t&&this._contentTypes.push("application/jwt")}async fetchWithTimeout(e,t={}){const{timeoutInSeconds:n,...r}=t;if(!n)return await fetch(e,r);const i=new AbortController,o=setTimeout(()=>i.abort(),n*1e3);try{return await fetch(e,{...t,signal:i.signal})}catch(s){throw s instanceof DOMException&&s.name==="AbortError"?new D2("Network timed out"):s}finally{clearTimeout(o)}}async getJson(e,{token:t,credentials:n}={}){const r=this._logger.create("getJson"),i={Accept:this._contentTypes.join(", ")};t&&(r.debug("token passed, setting Authorization header"),i.Authorization="Bearer "+t),this.appendExtraHeaders(i);let o;try{r.debug("url:",e),o=await this.fetchWithTimeout(e,{method:"GET",headers:i,credentials:n})}catch(l){throw r.error("Network Error"),l}r.debug("HTTP response received, status",o.status);const s=o.headers.get("Content-Type");if(s&&!this._contentTypes.find(l=>s.startsWith(l))&&r.throw(new Error(`Invalid response Content-Type: ${s??"undefined"}, from URL: ${e}`)),o.ok&&this._jwtHandler&&(s!=null&&s.startsWith("application/jwt")))return await this._jwtHandler(await o.text());let a;try{a=await o.json()}catch(l){throw r.error("Error parsing JSON response",l),o.ok?l:new Error(`${o.statusText} (${o.status})`)}if(!o.ok)throw r.error("Error from server:",a),a.error?new gs(a):new Error(`${o.statusText} (${o.status}): ${JSON.stringify(a)}`);return a}async postForm(e,{body:t,basicAuth:n,timeoutInSeconds:r,initCredentials:i}){const o=this._logger.create("postForm"),s={Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded"};n!==void 0&&(s.Authorization="Basic "+n),this.appendExtraHeaders(s);let a;try{o.debug("url:",e),a=await this.fetchWithTimeout(e,{method:"POST",headers:s,body:t,timeoutInSeconds:r,credentials:i})}catch(d){throw o.error("Network error"),d}o.debug("HTTP response received, status",a.status);const l=a.headers.get("Content-Type");if(l&&!this._contentTypes.find(d=>l.startsWith(d)))throw new Error(`Invalid response Content-Type: ${l??"undefined"}, from URL: ${e}`);const u=await a.text();let c={};if(u)try{c=JSON.parse(u)}catch(d){throw o.error("Error parsing JSON response",d),a.ok?d:new Error(`${a.statusText} (${a.status})`)}if(!a.ok)throw o.error("Error from server:",c),c.error?new gs(c,t):new Error(`${a.statusText} (${a.status}): ${JSON.stringify(c)}`);return c}appendExtraHeaders(e){const t=this._logger.create("appendExtraHeaders"),n=Object.keys(this._extraHeaders),r=["authorization","accept","content-type"];n.length!==0&&n.forEach(i=>{if(r.includes(i.toLocaleLowerCase())){t.warn("Protected header could not be overridden",i,r);return}const o=typeof this._extraHeaders[i]=="function"?this._extraHeaders[i]():this._extraHeaders[i];o&&o!==""&&(e[i]=o)})}},Dj=class{constructor(e){this._settings=e,this._logger=new be("MetadataService"),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new j2(["application/jwk-set+json"],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug("using signingKeys from settings"),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug("using metadata from settings"),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug("using fetchRequestCredentials from settings"),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){const e=this._logger.create("getMetadata");if(this._metadata)return e.debug("using cached values"),this._metadata;if(!this._metadataUrl)throw e.throw(new Error("No authority or metadataUrl configured on settings")),null;e.debug("getting metadata from",this._metadataUrl);const t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials});return e.debug("merging remote JSON with seed metadata"),this._metadata=Object.assign({},this._settings.metadataSeed,t),this._metadata}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(e=!0){return this._getMetadataProperty("token_endpoint",e)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty("revocation_endpoint",e)}getKeysEndpoint(e=!0){return this._getMetadataProperty("jwks_uri",e)}async _getMetadataProperty(e,t=!1){const n=this._logger.create(`_getMetadataProperty('${e}')`),r=await this.getMetadata();if(n.debug("resolved"),r[e]===void 0){if(t===!0){n.warn("Metadata does not contain optional property");return}n.throw(new Error("Metadata does not contain property "+e))}return r[e]}async getSigningKeys(){const e=this._logger.create("getSigningKeys");if(this._signingKeys)return e.debug("returning signingKeys from cache"),this._signingKeys;const t=await this.getKeysEndpoint(!1);e.debug("got jwks_uri",t);const n=await this._jsonService.getJson(t);if(e.debug("got key set",n),!Array.isArray(n.keys))throw e.throw(new Error("Missing keys on keyset")),null;return this._signingKeys=n.keys,this._signingKeys}},F2=class{constructor({prefix:e="oidc.",store:t=localStorage}={}){this._logger=new be("WebStorageStateStore"),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;const t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create("getAllKeys");const e=await this._store.length,t=[];for(let n=0;n{const r=this._logger.create("_getClaimsFromJwt");try{const i=ey.decode(n);return r.debug("JWT decoding successful"),i}catch(i){throw r.error("Error parsing JWT response"),i}},this._jsonService=new j2(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){const t=this._logger.create("getClaims");e||this._logger.throw(new Error("No token passed"));const n=await this._metadataService.getUserInfoEndpoint();t.debug("got userinfo url",n);const r=await this._jsonService.getJson(n,{token:e,credentials:this._settings.fetchRequestCredentials});return t.debug("got claims",r),r}},H8=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new be("TokenClient"),this._jsonService=new j2(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e="authorization_code",redirect_uri:t=this._settings.redirect_uri,client_id:n=this._settings.client_id,client_secret:r=this._settings.client_secret,...i}){const o=this._logger.create("exchangeCode");n||o.throw(new Error("A client_id is required")),t||o.throw(new Error("A redirect_uri is required")),i.code||o.throw(new Error("A code is required"));const s=new URLSearchParams({grant_type:e,redirect_uri:t});for(const[c,d]of Object.entries(i))d!=null&&s.set(c,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!r)throw o.throw(new Error("A client_secret is required")),null;a=Mr.generateBasicAuth(n,r);break;case"client_secret_post":s.append("client_id",n),r&&s.append("client_secret",r);break}const l=await this._metadataService.getTokenEndpoint(!1);o.debug("got token endpoint");const u=await this._jsonService.postForm(l,{body:s,basicAuth:a,initCredentials:this._settings.fetchRequestCredentials});return o.debug("got response"),u}async exchangeCredentials({grant_type:e="password",client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,scope:r=this._settings.scope,...i}){const o=this._logger.create("exchangeCredentials");t||o.throw(new Error("A client_id is required"));const s=new URLSearchParams({grant_type:e,scope:r});for(const[c,d]of Object.entries(i))d!=null&&s.set(c,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!n)throw o.throw(new Error("A client_secret is required")),null;a=Mr.generateBasicAuth(t,n);break;case"client_secret_post":s.append("client_id",t),n&&s.append("client_secret",n);break}const l=await this._metadataService.getTokenEndpoint(!1);o.debug("got token endpoint");const u=await this._jsonService.postForm(l,{body:s,basicAuth:a,initCredentials:this._settings.fetchRequestCredentials});return o.debug("got response"),u}async exchangeRefreshToken({grant_type:e="refresh_token",client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,timeoutInSeconds:r,...i}){const o=this._logger.create("exchangeRefreshToken");t||o.throw(new Error("A client_id is required")),i.refresh_token||o.throw(new Error("A refresh_token is required"));const s=new URLSearchParams({grant_type:e});for(const[c,d]of Object.entries(i))Array.isArray(d)?d.forEach(f=>s.append(c,f)):d!=null&&s.set(c,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!n)throw o.throw(new Error("A client_secret is required")),null;a=Mr.generateBasicAuth(t,n);break;case"client_secret_post":s.append("client_id",t),n&&s.append("client_secret",n);break}const l=await this._metadataService.getTokenEndpoint(!1);o.debug("got token endpoint");const u=await this._jsonService.postForm(l,{body:s,basicAuth:a,timeoutInSeconds:r,initCredentials:this._settings.fetchRequestCredentials});return o.debug("got response"),u}async revoke(e){var t;const n=this._logger.create("revoke");e.token||n.throw(new Error("A token is required"));const r=await this._metadataService.getRevocationEndpoint(!1);n.debug(`got revocation endpoint, revoking ${(t=e.token_type_hint)!=null?t:"default token type"}`);const i=new URLSearchParams;for(const[o,s]of Object.entries(e))s!=null&&i.set(o,s);i.set("client_id",this._settings.client_id),this._settings.client_secret&&i.set("client_secret",this._settings.client_secret),await this._jsonService.postForm(r,{body:i}),n.debug("got response")}},qj=class{constructor(e,t,n){this._settings=e,this._metadataService=t,this._claimsService=n,this._logger=new be("ResponseValidator"),this._userInfoService=new Hj(this._settings,this._metadataService),this._tokenClient=new H8(this._settings,this._metadataService)}async validateSigninResponse(e,t){const n=this._logger.create("validateSigninResponse");this._processSigninState(e,t),n.debug("state processed"),await this._processCode(e,t),n.debug("code processed"),e.isOpenId&&this._validateIdTokenAttributes(e),n.debug("tokens validated"),await this._processClaims(e,t==null?void 0:t.skipUserInfo,e.isOpenId),n.debug("claims processed")}async validateCredentialsResponse(e,t){const n=this._logger.create("validateCredentialsResponse");e.isOpenId&&e.id_token&&this._validateIdTokenAttributes(e),n.debug("tokens validated"),await this._processClaims(e,t,e.isOpenId),n.debug("claims processed")}async validateRefreshResponse(e,t){var n,r;const i=this._logger.create("validateRefreshResponse");e.userState=t.data,(n=e.session_state)!=null||(e.session_state=t.session_state),(r=e.scope)!=null||(e.scope=t.scope),e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),i.debug("ID Token validated")),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);const o=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,o),i.debug("claims processed")}validateSignoutResponse(e,t){const n=this._logger.create("validateSignoutResponse");if(t.id!==e.state&&n.throw(new Error("State does not match")),n.debug("state validated"),e.userState=t.data,e.error)throw n.warn("Response was error",e.error),new gs(e)}_processSigninState(e,t){var n;const r=this._logger.create("_processSigninState");if(t.id!==e.state&&r.throw(new Error("State does not match")),t.client_id||r.throw(new Error("No client_id on state")),t.authority||r.throw(new Error("No authority on state")),this._settings.authority!==t.authority&&r.throw(new Error("authority mismatch on settings vs. signin state")),this._settings.client_id&&this._settings.client_id!==t.client_id&&r.throw(new Error("client_id mismatch on settings vs. signin state")),r.debug("state validated"),e.userState=t.data,e.url_state=t.url_state,(n=e.scope)!=null||(e.scope=t.scope),e.error)throw r.warn("Response was error",e.error),new gs(e);t.code_verifier&&!e.code&&r.throw(new Error("Expected code in response"))}async _processClaims(e,t=!1,n=!0){const r=this._logger.create("_processClaims");if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token){r.debug("not loading user info");return}r.debug("loading user info");const i=await this._userInfoService.getClaims(e.access_token);r.debug("user info claims received from user info endpoint"),n&&i.sub!==e.profile.sub&&r.throw(new Error("subject from UserInfo response does not match subject in ID Token")),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(i)),r.debug("user info claims received, updated profile:",e.profile)}async _processCode(e,t){const n=this._logger.create("_processCode");if(e.code){n.debug("Validating code");const r=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,...t.extraTokenParams});Object.assign(e,r)}else n.debug("No code to process")}_validateIdTokenAttributes(e,t){var n;const r=this._logger.create("_validateIdTokenAttributes");r.debug("decoding ID Token JWT");const i=ey.decode((n=e.id_token)!=null?n:"");if(i.sub||r.throw(new Error("ID Token is missing a subject claim")),t){const o=ey.decode(t);i.sub!==o.sub&&r.throw(new Error("sub in id_token does not match current sub")),i.auth_time&&i.auth_time!==o.auth_time&&r.throw(new Error("auth_time in id_token does not match original auth_time")),i.azp&&i.azp!==o.azp&&r.throw(new Error("azp in id_token does not match original azp")),!i.azp&&o.azp&&r.throw(new Error("azp not in id_token, but present in original id_token"))}e.profile=i}},qa=class{constructor(e){this.id=e.id||Mr.generateUUIDv4(),this.data=e.data,e.created&&e.created>0?this.created=e.created:this.created=Gn.getEpochTime(),this.request_type=e.request_type,this.url_state=e.url_state}toStorageString(){return new be("State").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(e){return be.createStatic("State","fromStorageString"),new qa(JSON.parse(e))}static async clearStaleState(e,t){const n=be.createStatic("State","clearStaleState"),r=Gn.getEpochTime()-t,i=await e.getAllKeys();n.debug("got keys",i);for(let o=0;og.searchParams.append("resource",S));for(const[x,S]of Object.entries({response_mode:a,...m,...p}))S!=null&&g.searchParams.append(x,S.toString());this.url=g.href}},Gj="openid",Xp=class{constructor(e){if(this.access_token="",this.token_type="",this.profile={},this.state=e.get("state"),this.session_state=e.get("session_state"),this.state){const t=decodeURIComponent(this.state).split(ny);this.state=t[0],t.length>1&&(this.url_state=t.slice(1).join(ny))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri"),this.code=e.get("code")}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-Gn.getEpochTime()}set expires_in(e){typeof e=="string"&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+Gn.getEpochTime())}get isOpenId(){var e;return((e=this.scope)==null?void 0:e.split(" ").includes(Gj))||!!this.id_token}},Kj=class{constructor({url:e,state_data:t,id_token_hint:n,post_logout_redirect_uri:r,extraQueryParams:i,request_type:o,client_id:s}){if(this._logger=new be("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),new Error("url");const a=new URL(e);n&&a.searchParams.append("id_token_hint",n),s&&a.searchParams.append("client_id",s),r&&(a.searchParams.append("post_logout_redirect_uri",r),t&&(this.state=new qa({data:t,request_type:o}),a.searchParams.append("state",this.state.id)));for(const[l,u]of Object.entries({...i}))u!=null&&a.searchParams.append(l,u.toString());this.url=a.href}},Yj=class{constructor(e){this.state=e.get("state"),this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri")}},Qj=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],Xj=["sub","iss","aud","exp","iat"],Zj=class{constructor(e){this._settings=e,this._logger=new be("ClaimsService")}filterProtocolClaims(e){const t={...e};if(this._settings.filterProtocolClaims){let n;Array.isArray(this._settings.filterProtocolClaims)?n=this._settings.filterProtocolClaims:n=Qj;for(const r of n)Xj.includes(r)||delete t[r]}return t}mergeClaims(e,t){const n={...e};for(const[r,i]of Object.entries(t))for(const o of Array.isArray(i)?i:[i]){const s=n[r];s===void 0?n[r]=o:Array.isArray(s)?s.includes(o)||s.push(o):n[r]!==o&&(typeof o=="object"&&this._settings.mergeClaims?n[r]=this.mergeClaims(s,o):n[r]=[s,o])}return n}},Jj=class{constructor(e,t){this._logger=new be("OidcClient"),this.settings=e instanceof ry?e:new ry(e),this.metadataService=t??new Dj(this.settings),this._claimsService=new Zj(this.settings),this._validator=new qj(this.settings,this.metadataService,this._claimsService),this._tokenClient=new H8(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:n,request_type:r,id_token_hint:i,login_hint:o,skipUserInfo:s,nonce:a,url_state:l,response_type:u=this.settings.response_type,scope:c=this.settings.scope,redirect_uri:d=this.settings.redirect_uri,prompt:f=this.settings.prompt,display:h=this.settings.display,max_age:p=this.settings.max_age,ui_locales:y=this.settings.ui_locales,acr_values:_=this.settings.acr_values,resource:m=this.settings.resource,response_mode:g=this.settings.response_mode,extraQueryParams:v=this.settings.extraQueryParams,extraTokenParams:x=this.settings.extraTokenParams}){const S=this._logger.create("createSigninRequest");if(u!=="code")throw new Error("Only the Authorization Code flow (with PKCE) is supported");const w=await this.metadataService.getAuthorizationEndpoint();S.debug("Received authorization endpoint",w);const E=new Wj({url:w,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:d,response_type:u,scope:c,state_data:e,url_state:l,prompt:f,display:h,max_age:p,ui_locales:y,id_token_hint:i,login_hint:o,acr_values:_,resource:m,request:t,request_uri:n,extraQueryParams:v,extraTokenParams:x,request_type:r,response_mode:g,client_secret:this.settings.client_secret,skipUserInfo:s,nonce:a,disablePKCE:this.settings.disablePKCE});await this.clearStaleState();const A=E.state;return await this.settings.stateStore.set(A.id,A.toStorageString()),E}async readSigninResponseState(e,t=!1){const n=this._logger.create("readSigninResponseState"),r=new Xp(ty.readParams(e,this.settings.response_mode));if(!r.state)throw n.throw(new Error("No state in response")),null;const i=await this.settings.stateStore[t?"remove":"get"](r.state);if(!i)throw n.throw(new Error("No matching state found in storage")),null;return{state:U2.fromStorageString(i),response:r}}async processSigninResponse(e){const t=this._logger.create("processSigninResponse"),{state:n,response:r}=await this.readSigninResponseState(e,!0);return t.debug("received state from storage; validating response"),await this._validator.validateSigninResponse(r,n),r}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n=!1,extraTokenParams:r={}}){const i=await this._tokenClient.exchangeCredentials({username:e,password:t,...r}),o=new Xp(new URLSearchParams);return Object.assign(o,i),await this._validator.validateCredentialsResponse(o,n),o}async useRefreshToken({state:e,timeoutInSeconds:t}){var n;const r=this._logger.create("useRefreshToken");let i;if(this.settings.refreshTokenAllowedScope===void 0)i=e.scope;else{const a=this.settings.refreshTokenAllowedScope.split(" ");i=(((n=e.scope)==null?void 0:n.split(" "))||[]).filter(u=>a.includes(u)).join(" ")}const o=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,resource:e.resource,scope:i,timeoutInSeconds:t}),s=new Xp(new URLSearchParams);return Object.assign(s,o),r.debug("validating response",s),await this._validator.validateRefreshResponse(s,{...e,scope:i}),s}async createSignoutRequest({state:e,id_token_hint:t,client_id:n,request_type:r,post_logout_redirect_uri:i=this.settings.post_logout_redirect_uri,extraQueryParams:o=this.settings.extraQueryParams}={}){const s=this._logger.create("createSignoutRequest"),a=await this.metadataService.getEndSessionEndpoint();if(!a)throw s.throw(new Error("No end session endpoint")),null;s.debug("Received end session endpoint",a),!n&&i&&!t&&(n=this.settings.client_id);const l=new Kj({url:a,id_token_hint:t,client_id:n,post_logout_redirect_uri:i,state_data:e,extraQueryParams:o,request_type:r});await this.clearStaleState();const u=l.state;return u&&(s.debug("Signout request has state to persist"),await this.settings.stateStore.set(u.id,u.toStorageString())),l}async readSignoutResponseState(e,t=!1){const n=this._logger.create("readSignoutResponseState"),r=new Yj(ty.readParams(e,this.settings.response_mode));if(!r.state){if(n.debug("No state in response"),r.error)throw n.warn("Response was error:",r.error),new gs(r);return{state:void 0,response:r}}const i=await this.settings.stateStore[t?"remove":"get"](r.state);if(!i)throw n.throw(new Error("No matching state found in storage")),null;return{state:qa.fromStorageString(i),response:r}}async processSignoutResponse(e){const t=this._logger.create("processSignoutResponse"),{state:n,response:r}=await this.readSignoutResponseState(e,!0);return n?(t.debug("Received state from storage; validating response"),this._validator.validateSignoutResponse(r,n)):t.debug("No state from storage; skipping response validation"),r}clearStaleState(){return this._logger.create("clearStaleState"),qa.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create("revokeToken"),await this._tokenClient.revoke({token:e,token_type_hint:t})}},eF=class{constructor(e){this._userManager=e,this._logger=new be("SessionMonitor"),this._start=async t=>{const n=t.session_state;if(!n)return;const r=this._logger.create("_start");if(t.profile?(this._sub=t.profile.sub,this._sid=t.profile.sid,r.debug("session_state",n,", sub",this._sub)):(this._sub=void 0,this._sid=void 0,r.debug("session_state",n,", anonymous user")),this._checkSessionIFrame){this._checkSessionIFrame.start(n);return}try{const i=await this._userManager.metadataService.getCheckSessionIframe();if(i){r.debug("initializing check session iframe");const o=this._userManager.settings.client_id,s=this._userManager.settings.checkSessionIntervalInSeconds,a=this._userManager.settings.stopCheckSessionOnError,l=new Oj(this._callback,o,i,s,a);await l.load(),this._checkSessionIFrame=l,l.start(n)}else r.warn("no check session iframe found in the metadata")}catch(i){r.error("Error from getCheckSessionIframe:",i instanceof Error?i.message:i)}},this._stop=()=>{const t=this._logger.create("_stop");if(this._sub=void 0,this._sid=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){const n=setInterval(async()=>{clearInterval(n);try{const r=await this._userManager.querySessionStatus();if(r){const i={session_state:r.session_state,profile:r.sub&&r.sid?{sub:r.sub,sid:r.sid}:null};this._start(i)}}catch(r){t.error("error from querySessionStatus",r instanceof Error?r.message:r)}},1e3)}},this._callback=async()=>{const t=this._logger.create("_callback");try{const n=await this._userManager.querySessionStatus();let r=!0;n&&this._checkSessionIFrame?n.sub===this._sub?(r=!1,this._checkSessionIFrame.start(n.session_state),n.sid===this._sid?t.debug("same sub still logged in at OP, restarting check session iframe; session_state",n.session_state):(t.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state",n.session_state),this._userManager.events._raiseUserSessionChanged())):t.debug("different subject signed into OP",n.sub):t.debug("subject no longer signed into OP"),r?this._sub?this._userManager.events._raiseUserSignedOut():this._userManager.events._raiseUserSignedIn():t.debug("no change in session detected, no event to raise")}catch(n){this._sub&&(t.debug("Error calling queryCurrentSigninSession; raising signed out event",n),this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(new Error("No user manager passed")),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(t=>{this._logger.error(t)})}async _init(){this._logger.create("_init");const e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){const t=await this._userManager.querySessionStatus();if(t){const n={session_state:t.session_state,profile:t.sub&&t.sid?{sub:t.sub,sid:t.sid}:null};this._start(n)}}}},lf=class{constructor(e){var t;this.id_token=e.id_token,this.session_state=(t=e.session_state)!=null?t:null,this.access_token=e.access_token,this.refresh_token=e.refresh_token,this.token_type=e.token_type,this.scope=e.scope,this.profile=e.profile,this.expires_at=e.expires_at,this.state=e.userState,this.url_state=e.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-Gn.getEpochTime()}set expires_in(e){e!==void 0&&(this.expires_at=Math.floor(e)+Gn.getEpochTime())}get expired(){const e=this.expires_in;if(e!==void 0)return e<=0}get scopes(){var e,t;return(t=(e=this.scope)==null?void 0:e.split(" "))!=null?t:[]}toStorageString(){return new be("User").create("toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(e){return be.createStatic("User","fromStorageString"),new lf(JSON.parse(e))}},NS="oidc-client",q8=class{constructor(){this._abort=new Di("Window navigation aborted"),this._disposeHandlers=new Set,this._window=null}async navigate(e){const t=this._logger.create("navigate");if(!this._window)throw new Error("Attempted to navigate on a disposed window");t.debug("setting URL in window"),this._window.location.replace(e.url);const{url:n,keepOpen:r}=await new Promise((i,o)=>{const s=a=>{var l;const u=a.data,c=(l=e.scriptOrigin)!=null?l:window.location.origin;if(!(a.origin!==c||(u==null?void 0:u.source)!==NS)){try{const d=ty.readParams(u.url,e.response_mode).get("state");if(d||t.warn("no state found in response url"),a.source!==this._window&&d!==e.state)return}catch{this._dispose(),o(new Error("Invalid response from window"))}i(u)}};window.addEventListener("message",s,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",s,!1)),this._disposeHandlers.add(this._abort.addHandler(a=>{this._dispose(),o(a)}))});return t.debug("got response from window"),this._dispose(),r||this.close(),{url:n}}_dispose(){this._logger.create("_dispose");for(const e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,t,n=!1,r=window.location.origin){e.postMessage({source:NS,url:t,keepOpen:n},r)}},W8={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},G8="_blank",tF=60,nF=2,K8=10,rF=class extends ry{constructor(e){const{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:r=W8,popupWindowTarget:i=G8,redirectMethod:o="assign",redirectTarget:s="self",iframeNotifyParentOrigin:a=e.iframeNotifyParentOrigin,iframeScriptOrigin:l=e.iframeScriptOrigin,silent_redirect_uri:u=e.redirect_uri,silentRequestTimeoutInSeconds:c=K8,automaticSilentRenew:d=!0,validateSubOnSilentRenew:f=!0,includeIdTokenInSilentRenew:h=!1,monitorSession:p=!1,monitorAnonymousSession:y=!1,checkSessionIntervalInSeconds:_=nF,query_status_response_type:m="code",stopCheckSessionOnError:g=!0,revokeTokenTypes:v=["access_token","refresh_token"],revokeTokensOnSignout:x=!1,includeIdTokenInSilentSignout:S=!1,accessTokenExpiringNotificationTimeInSeconds:w=tF,userStore:E}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=n,this.popupWindowFeatures=r,this.popupWindowTarget=i,this.redirectMethod=o,this.redirectTarget=s,this.iframeNotifyParentOrigin=a,this.iframeScriptOrigin=l,this.silent_redirect_uri=u,this.silentRequestTimeoutInSeconds=c,this.automaticSilentRenew=d,this.validateSubOnSilentRenew=f,this.includeIdTokenInSilentRenew=h,this.monitorSession=p,this.monitorAnonymousSession=y,this.checkSessionIntervalInSeconds=_,this.stopCheckSessionOnError=g,this.query_status_response_type=m,this.revokeTokenTypes=v,this.revokeTokensOnSignout=x,this.includeIdTokenInSilentSignout=S,this.accessTokenExpiringNotificationTimeInSeconds=w,E)this.userStore=E;else{const A=typeof window<"u"?window.sessionStorage:new B8;this.userStore=new F2({store:A})}}},iy=class extends q8{constructor({silentRequestTimeoutInSeconds:e=K8}){super(),this._logger=new be("IFrameWindow"),this._timeoutInSeconds=e,this._frame=iy.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){const e=window.document.createElement("iframe");return e.style.visibility="hidden",e.style.position="fixed",e.style.left="-1000px",e.style.top="0",e.width="0",e.height="0",window.document.body.appendChild(e),e}async navigate(e){this._logger.debug("navigate: Using timeout of:",this._timeoutInSeconds);const t=setTimeout(()=>this._abort.raise(new D2("IFrame timed out without a response")),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(t)),await super.navigate(e)}close(){var e;this._frame&&(this._frame.parentNode&&(this._frame.addEventListener("load",t=>{var n;const r=t.target;(n=r.parentNode)==null||n.removeChild(r),this._abort.raise(new Error("IFrame removed from DOM"))},!0),(e=this._frame.contentWindow)==null||e.location.replace("about:blank")),this._frame=null),this._window=null}static notifyParent(e,t){return super._notifyParent(window.parent,e,!1,t)}},iF=class{constructor(e){this._settings=e,this._logger=new be("IFrameNavigator")}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new iy({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create("callback"),iy.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},oF=500,sF=1e3,LS=class extends q8{constructor({popupWindowTarget:e=G8,popupWindowFeatures:t={}}){super(),this._logger=new be("PopupWindow");const n=MS.center({...W8,...t});this._window=window.open(void 0,e,MS.serialize(n)),t.closePopupWindowAfterInSeconds&&t.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!="boolean"||this._window.closed){this._abort.raise(new Error("Popup blocked by user"));return}this.close()},t.closePopupWindowAfterInSeconds*sF)}async navigate(e){var t;(t=this._window)==null||t.focus();const n=setInterval(()=>{(!this._window||this._window.closed)&&this._abort.raise(new Error("Popup closed by user"))},oF);return this._disposeHandlers.add(()=>clearInterval(n)),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(new Error("Popup closed")))),this._window=null}static notifyOpener(e,t){if(!window.opener)throw new Error("No window.opener. Can't complete notification.");return super._notifyParent(window.opener,e,t)}},aF=class{constructor(e){this._settings=e,this._logger=new be("PopupNavigator")}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget}){return new LS({popupWindowFeatures:e,popupWindowTarget:t})}async callback(e,{keepOpen:t=!1}){this._logger.create("callback"),LS.notifyOpener(e,t)}},lF=class{constructor(e){this._settings=e,this._logger=new be("RedirectNavigator")}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){var n;this._logger.create("prepare");let r=window.self;t==="top"&&(r=(n=window.top)!=null?n:window.self);const i=r.location[e].bind(r.location);let o;return{navigate:async s=>{this._logger.create("navigate");const a=new Promise((l,u)=>{o=u});return i(s.url),await a},close:()=>{this._logger.create("close"),o==null||o(new Error("Redirect aborted")),r.stop()}}}async callback(){}},uF=class extends Ij{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new be("UserManagerEvents"),this._userLoaded=new Di("User loaded"),this._userUnloaded=new Di("User unloaded"),this._silentRenewError=new Di("Silent renew error"),this._userSignedIn=new Di("User signed in"),this._userSignedOut=new Di("User signed out"),this._userSessionChanged=new Di("User session changed")}load(e,t=!0){super.load(e),t&&this._userLoaded.raise(e)}unload(){super.unload(),this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}_raiseSilentRenewError(e){this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}_raiseUserSignedIn(){this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}_raiseUserSignedOut(){this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}_raiseUserSessionChanged(){this._userSessionChanged.raise()}},cF=class{constructor(e){this._userManager=e,this._logger=new be("SilentRenewService"),this._isStarted=!1,this._retryTimer=new Gn("Retry Silent Renew"),this._tokenExpiring=async()=>{const t=this._logger.create("_tokenExpiring");try{await this._userManager.signinSilent(),t.debug("silent token renewal successful")}catch(n){if(n instanceof D2){t.warn("ErrorTimeout from signinSilent:",n,"retry in 5s"),this._retryTimer.init(5);return}t.error("Error from signinSilent:",n),this._userManager.events._raiseSilentRenewError(n)}}}async start(){const e=this._logger.create("start");if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error("getUser error",t)}}}stop(){this._isStarted&&(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),this._isStarted=!1)}},dF=class{constructor(e,t){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.resource=t,this.data=e.state}},fF=class{constructor(e,t,n,r){this._logger=new be("UserManager"),this.settings=new rF(e),this._client=new Jj(e),this._redirectNavigator=t??new lF(this.settings),this._popupNavigator=n??new aF(this.settings),this._iframeNavigator=r??new iF(this.settings),this._events=new uF(this.settings),this._silentRenewService=new cF(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new eF(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(){const e=this._logger.create("getUser"),t=await this._loadUser();return t?(e.info("user loaded"),this._events.load(t,!1),t):(e.info("user not found in storage"),null)}async removeUser(){const e=this._logger.create("removeUser");await this.storeUser(null),e.info("user removed from storage"),this._events.unload()}async signinRedirect(e={}){this._logger.create("signinRedirect");const{redirectMethod:t,...n}=e,r=await this._redirectNavigator.prepare({redirectMethod:t});await this._signinStart({request_type:"si:r",...n},r)}async signinRedirectCallback(e=window.location.href){const t=this._logger.create("signinRedirectCallback"),n=await this._signinEnd(e);return n.profile&&n.profile.sub?t.info("success, signed in subject",n.profile.sub):t.info("no subject"),n}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:n=!1}){const r=this._logger.create("signinResourceOwnerCredential"),i=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n,extraTokenParams:this.settings.extraTokenParams});r.debug("got signin response");const o=await this._buildUser(i);return o.profile&&o.profile.sub?r.info("success, signed in subject",o.profile.sub):r.info("no subject"),o}async signinPopup(e={}){const t=this._logger.create("signinPopup"),{popupWindowFeatures:n,popupWindowTarget:r,...i}=e,o=this.settings.popup_redirect_uri;o||t.throw(new Error("No popup_redirect_uri configured"));const s=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r}),a=await this._signin({request_type:"si:p",redirect_uri:o,display:"popup",...i},s);return a&&(a.profile&&a.profile.sub?t.info("success, signed in subject",a.profile.sub):t.info("no subject")),a}async signinPopupCallback(e=window.location.href,t=!1){const n=this._logger.create("signinPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),n.info("success")}async signinSilent(e={}){var t;const n=this._logger.create("signinSilent"),{silentRequestTimeoutInSeconds:r,resource:i,...o}=e;let s=await this._loadUser();if(s!=null&&s.refresh_token){n.debug("using refresh token");const c=new dF(s,i);return await this._useRefreshToken(c)}const a=this.settings.silent_redirect_uri;a||n.throw(new Error("No silent_redirect_uri configured"));let l;s&&this.settings.validateSubOnSilentRenew&&(n.debug("subject prior to silent renew:",s.profile.sub),l=s.profile.sub);const u=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r});return s=await this._signin({request_type:"si:s",redirect_uri:a,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?s==null?void 0:s.id_token:void 0,...o},u,l),s&&((t=s.profile)!=null&&t.sub?n.info("success, signed in subject",s.profile.sub):n.info("no subject")),s}async _useRefreshToken(e){const t=await this._client.useRefreshToken({state:e,timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds}),n=new lf({...e,...t});return await this.storeUser(n),this._events.load(n),n}async signinSilentCallback(e=window.location.href){const t=this._logger.create("signinSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async signinCallback(e=window.location.href){const{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case"si:r":return await this.signinRedirectCallback(e);case"si:p":return await this.signinPopupCallback(e);case"si:s":return await this.signinSilentCallback(e);default:throw new Error("invalid response_type in state")}}async signoutCallback(e=window.location.href,t=!1){const{state:n}=await this._client.readSignoutResponseState(e);if(n)switch(n.request_type){case"so:r":await this.signoutRedirectCallback(e);break;case"so:p":await this.signoutPopupCallback(e,t);break;case"so:s":await this.signoutSilentCallback(e);break;default:throw new Error("invalid response_type in state")}}async querySessionStatus(e={}){const t=this._logger.create("querySessionStatus"),{silentRequestTimeoutInSeconds:n,...r}=e,i=this.settings.silent_redirect_uri;i||t.throw(new Error("No silent_redirect_uri configured"));const o=await this._loadUser(),s=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n}),a=await this._signinStart({request_type:"si:s",redirect_uri:i,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?o==null?void 0:o.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0,...r},s);try{const l=await this._client.processSigninResponse(a.url);return t.debug("got signin response"),l.session_state&&l.profile.sub?(t.info("success for subject",l.profile.sub),{session_state:l.session_state,sub:l.profile.sub,sid:l.profile.sid}):(t.info("success, user not authenticated"),null)}catch(l){if(this.settings.monitorAnonymousSession&&l instanceof gs)switch(l.error){case"login_required":case"consent_required":case"interaction_required":case"account_selection_required":return t.info("success for anonymous user"),{session_state:l.session_state}}throw l}}async _signin(e,t,n){const r=await this._signinStart(e,t);return await this._signinEnd(r.url,n)}async _signinStart(e,t){const n=this._logger.create("_signinStart");try{const r=await this._client.createSigninRequest(e);return n.debug("got signin request"),await t.navigate({url:r.url,state:r.state.id,response_mode:r.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(r){throw n.debug("error after preparing navigator, closing navigator window"),t.close(),r}}async _signinEnd(e,t){const n=this._logger.create("_signinEnd"),r=await this._client.processSigninResponse(e);return n.debug("got signin response"),await this._buildUser(r,t)}async _buildUser(e,t){const n=this._logger.create("_buildUser"),r=new lf(e);if(t){if(t!==r.profile.sub)throw n.debug("current user does not match user returned from signin. sub from signin:",r.profile.sub),new gs({...e,error:"login_required"});n.debug("current user matches user returned from signin")}return await this.storeUser(r),n.debug("user stored"),this._events.load(r),r}async signoutRedirect(e={}){const t=this._logger.create("signoutRedirect"),{redirectMethod:n,...r}=e,i=await this._redirectNavigator.prepare({redirectMethod:n});await this._signoutStart({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...r},i),t.info("success")}async signoutRedirectCallback(e=window.location.href){const t=this._logger.create("signoutRedirectCallback"),n=await this._signoutEnd(e);return t.info("success"),n}async signoutPopup(e={}){const t=this._logger.create("signoutPopup"),{popupWindowFeatures:n,popupWindowTarget:r,...i}=e,o=this.settings.popup_post_logout_redirect_uri,s=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r});await this._signout({request_type:"so:p",post_logout_redirect_uri:o,state:o==null?void 0:{},...i},s),t.info("success")}async signoutPopupCallback(e=window.location.href,t=!1){const n=this._logger.create("signoutPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),n.info("success")}async _signout(e,t){const n=await this._signoutStart(e,t);return await this._signoutEnd(n.url)}async _signoutStart(e={},t){var n;const r=this._logger.create("_signoutStart");try{const i=await this._loadUser();r.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&await this._revokeInternal(i);const o=e.id_token_hint||i&&i.id_token;o&&(r.debug("setting id_token_hint in signout request"),e.id_token_hint=o),await this.removeUser(),r.debug("user removed, creating signout request");const s=await this._client.createSignoutRequest(e);return r.debug("got signout request"),await t.navigate({url:s.url,state:(n=s.state)==null?void 0:n.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(i){throw r.debug("error after preparing navigator, closing navigator window"),t.close(),i}}async _signoutEnd(e){const t=this._logger.create("_signoutEnd"),n=await this._client.processSignoutResponse(e);return t.debug("got signout response"),n}async signoutSilent(e={}){var t;const n=this._logger.create("signoutSilent"),{silentRequestTimeoutInSeconds:r,...i}=e,o=this.settings.includeIdTokenInSilentSignout?(t=await this._loadUser())==null?void 0:t.id_token:void 0,s=this.settings.popup_post_logout_redirect_uri,a=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r});await this._signout({request_type:"so:s",post_logout_redirect_uri:s,id_token_hint:o,...i},a),n.info("success")}async signoutSilentCallback(e=window.location.href){const t=this._logger.create("signoutSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async revokeTokens(e){const t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){const n=this._logger.create("_revokeInternal");if(!e)return;const r=t.filter(i=>typeof e[i]=="string");if(!r.length){n.debug("no need to revoke due to no token(s)");return}for(const i of r)await this._client.revokeToken(e[i],i),n.info(`${i} revoked successfully`),i!=="access_token"&&(e[i]=null);await this.storeUser(e),n.debug("user stored"),this._events.load(e)}startSilentRenew(){this._logger.create("startSilentRenew"),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){const e=this._logger.create("_loadUser"),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug("user storageString loaded"),lf.fromStorageString(t)):(e.debug("no user storageString"),null)}async storeUser(e){const t=this._logger.create("storeUser");if(e){t.debug("storing user");const n=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,n)}else this._logger.debug("removing user"),await this.settings.userStore.remove(this._userStoreKey)}async clearStaleState(){await this._client.clearStaleState()}},V2=b.createContext(void 0);V2.displayName="AuthContext";var hF={isLoading:!0,isAuthenticated:!1},pF=(e,t)=>{switch(t.type){case"INITIALISED":case"USER_LOADED":return{...e,user:t.user,isLoading:!1,isAuthenticated:t.user?!t.user.expired:!1,error:void 0};case"USER_UNLOADED":return{...e,user:void 0,isAuthenticated:!1};case"NAVIGATOR_INIT":return{...e,isLoading:!0,activeNavigator:t.method};case"NAVIGATOR_CLOSE":return{...e,isLoading:!1,activeNavigator:void 0};case"ERROR":return{...e,isLoading:!1,error:t.error};default:return{...e,isLoading:!1,error:new Error(`unknown type ${t.type}`)}}},gF=(e=window.location)=>{let t=new URLSearchParams(e.search);return!!((t.get("code")||t.get("error"))&&t.get("state")||(t=new URLSearchParams(e.hash.replace("#","?")),(t.get("code")||t.get("error"))&&t.get("state")))},mF=e=>t=>t instanceof Error?t:new Error(e),yF=mF("Login failed"),vF=["clearStaleState","querySessionStatus","revokeTokens","startSilentRenew","stopSilentRenew"],_F=["signinPopup","signinSilent","signinRedirect","signinResourceOwnerCredentials","signoutPopup","signoutRedirect","signoutSilent"],Zp=e=>()=>{throw new Error(`UserManager#${e} was called from an unsupported context. If this is a server-rendered page, defer this call with useEffect() or pass a custom UserManager implementation.`)},xF=typeof window>"u"?null:fF,SF=e=>{const{children:t,onSigninCallback:n,skipSigninCallback:r,onRemoveUser:i,onSignoutRedirect:o,onSignoutPopup:s,implementation:a=xF,userManager:l,...u}=e,[c]=U.useState(()=>l??(a?new a(u):{settings:u})),[d,f]=U.useReducer(pF,hF),h=U.useMemo(()=>Object.assign({settings:c.settings,events:c.events},Object.fromEntries(vF.map(v=>{var x,S;return[v,(S=(x=c[v])==null?void 0:x.bind(c))!=null?S:Zp(v)]})),Object.fromEntries(_F.map(v=>[v,c[v]?async x=>{f({type:"NAVIGATOR_INIT",method:v});try{return await c[v](x)}catch(S){return f({type:"ERROR",error:S}),null}finally{f({type:"NAVIGATOR_CLOSE"})}}:Zp(v)]))),[c]),p=U.useRef(!1);U.useEffect(()=>{!c||p.current||(p.current=!0,(async()=>{let v=null;try{gF()&&!r&&(v=await c.signinCallback(),n&&await n(v)),v=v||await c.getUser(),f({type:"INITIALISED",user:v})}catch(x){f({type:"ERROR",error:yF(x)})}})())},[c,r,n]),U.useEffect(()=>{if(!c)return;const v=w=>{f({type:"USER_LOADED",user:w})};c.events.addUserLoaded(v);const x=()=>{f({type:"USER_UNLOADED"})};c.events.addUserUnloaded(x);const S=w=>{f({type:"ERROR",error:w})};return c.events.addSilentRenewError(S),()=>{c.events.removeUserLoaded(v),c.events.removeUserUnloaded(x),c.events.removeSilentRenewError(S)}},[c]);const y=U.useCallback(c?()=>c.removeUser().then(i):Zp("removeUser"),[c,i]),_=U.useCallback(v=>h.signoutRedirect(v).then(o),[h.signoutRedirect,o]),m=U.useCallback(v=>h.signoutPopup(v).then(s),[h.signoutPopup,s]),g=U.useCallback(v=>h.signoutSilent(v),[h.signoutSilent]);return b.createElement(V2.Provider,{value:{...d,...h,removeUser:y,signoutRedirect:_,signoutPopup:m,signoutSilent:g}},t)},wF=()=>{const e=b.useContext(V2);return e||console.warn("AuthProvider context is undefined, please verify you are calling useAuth() as child of a component."),e};/** + * @remix-run/router v1.19.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Xu(){return Xu=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Y8(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function EF(){return Math.random().toString(36).substr(2,8)}function IS(e,t){return{usr:e.state,key:e.key,idx:t}}function oy(e,t,n,r){return n===void 0&&(n=null),Xu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?dl(t):t,{state:n,key:t&&t.key||r||EF()})}function Jf(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function dl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function CF(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=to.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(Xu({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=to.Pop;let _=c(),m=_==null?null:_-u;u=_,l&&l({action:a,location:y.location,delta:m})}function f(_,m){a=to.Push;let g=oy(y.location,_,m);u=c()+1;let v=IS(g,u),x=y.createHref(g);try{s.pushState(v,"",x)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(x)}o&&l&&l({action:a,location:y.location,delta:1})}function h(_,m){a=to.Replace;let g=oy(y.location,_,m);u=c();let v=IS(g,u),x=y.createHref(g);s.replaceState(v,"",x),o&&l&&l({action:a,location:y.location,delta:0})}function p(_){let m=i.location.origin!=="null"?i.location.origin:i.location.href,g=typeof _=="string"?_:Jf(_);return g=g.replace(/ $/,"%20"),tt(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let y={get action(){return a},get location(){return e(i,s)},listen(_){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(PS,d),l=_,()=>{i.removeEventListener(PS,d),l=null}},createHref(_){return t(i,_)},createURL:p,encodeLocation(_){let m=p(_);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:h,go(_){return s.go(_)}};return y}var OS;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(OS||(OS={}));function AF(e,t,n){return n===void 0&&(n="/"),RF(e,t,n,!1)}function RF(e,t,n,r){let i=typeof t=="string"?dl(t):t,o=Wa(i.pathname||"/",n);if(o==null)return null;let s=Q8(e);$F(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(tt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=fo([r,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(tt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Q8(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:IF(u,o.index),routesMeta:c})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of X8(o.path))i(o,s,l)}),t}function X8(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=X8(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function $F(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:OF(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const TF=/^:[\w-]+$/,kF=3,MF=2,NF=1,LF=10,PF=-2,DS=e=>e==="*";function IF(e,t){let n=e.split("/"),r=n.length;return n.some(DS)&&(r+=PF),t&&(r+=MF),n.filter(i=>!DS(i)).reduce((i,o)=>i+(TF.test(o)?kF:o===""?NF:LF),r)}function OF(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function DF(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a{let{paramName:f,isOptional:h}=c;if(f==="*"){let y=a[d]||"";s=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const p=a[d];return h&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:e}}function jF(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Y8(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function FF(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Y8(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Wa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function UF(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?dl(e):e;return{pathname:n?n.startsWith("/")?n:VF(n,t):t,search:HF(r),hash:qF(i)}}function VF(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Jp(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function zF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function z2(e,t){let n=zF(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function B2(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=dl(e):(i=Xu({},e),tt(!i.pathname||!i.pathname.includes("?"),Jp("?","pathname","search",i)),tt(!i.pathname||!i.pathname.includes("#"),Jp("#","pathname","hash",i)),tt(!i.search||!i.search.includes("#"),Jp("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=UF(i,a),u=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const fo=e=>e.join("/").replace(/\/\/+/g,"/"),BF=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),HF=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qF=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function WF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Z8=["post","put","patch","delete"];new Set(Z8);const GF=["get",...Z8];new Set(GF);/** + * React Router v6.26.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),U.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let d=B2(u,JSON.parse(s),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:fo([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,s,o,e])}const QF=U.createContext(null);function XF(e){let t=U.useContext(Ur).outlet;return t&&U.createElement(QF.Provider,{value:e},t)}function ZF(){let{matches:e}=U.useContext(Ur),t=e[e.length-1];return t?t.params:{}}function S0(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=U.useContext(bi),{matches:i}=U.useContext(Ur),{pathname:o}=Ao(),s=JSON.stringify(z2(i,r.v7_relativeSplatPath));return U.useMemo(()=>B2(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function JF(e,t){return eU(e,t)}function eU(e,t,n,r){fl()||tt(!1);let{navigator:i}=U.useContext(bi),{matches:o}=U.useContext(Ur),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=Ao(),c;if(t){var d;let _=typeof t=="string"?dl(t):t;l==="/"||(d=_.pathname)!=null&&d.startsWith(l)||tt(!1),c=_}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let _=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(_.length).join("/")}let p=AF(e,{pathname:h}),y=oU(p&&p.map(_=>Object.assign({},_,{params:Object.assign({},a,_.params),pathname:fo([l,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:fo([l,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),o,n,r);return t&&y?U.createElement(x0.Provider,{value:{location:Zu({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:to.Pop}},y):y}function tU(){let e=uU(),t=WF(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return U.createElement(U.Fragment,null,U.createElement("h2",null,"Unexpected Application Error!"),U.createElement("h3",{style:{fontStyle:"italic"}},t),n?U.createElement("pre",{style:i},n):null,null)}const nU=U.createElement(tU,null);class rU extends U.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?U.createElement(Ur.Provider,{value:this.props.routeContext},U.createElement(eM.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function iU(e){let{routeContext:t,match:n,children:r}=e,i=U.useContext(_0);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),U.createElement(Ur.Provider,{value:t},r)}function oU(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let c=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||tt(!1),s=s.slice(0,Math.min(s.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,d,f)=>{let h,p=!1,y=null,_=null;n&&(h=a&&d.route.id?a[d.route.id]:void 0,y=d.route.errorElement||nU,l&&(u<0&&f===0?(p=!0,_=null):u===f&&(p=!0,_=d.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,f+1)),g=()=>{let v;return h?v=y:p?v=_:d.route.Component?v=U.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=c,U.createElement(iU,{match:d,routeContext:{outlet:c,matches:m,isDataRoute:n!=null},children:v})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?U.createElement(rU,{location:n.location,revalidation:n.revalidation,component:y,error:h,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var nM=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(nM||{}),th=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(th||{});function sU(e){let t=U.useContext(_0);return t||tt(!1),t}function aU(e){let t=U.useContext(J8);return t||tt(!1),t}function lU(e){let t=U.useContext(Ur);return t||tt(!1),t}function rM(e){let t=lU(),n=t.matches[t.matches.length-1];return n.route.id||tt(!1),n.route.id}function uU(){var e;let t=U.useContext(eM),n=aU(th.UseRouteError),r=rM(th.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function cU(){let{router:e}=sU(nM.UseNavigateStable),t=rM(th.UseNavigateStable),n=U.useRef(!1);return tM(()=>{n.current=!0}),U.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Zu({fromRouteId:t},o)))},[e,t])}function dU(e){let{to:t,replace:n,state:r,relative:i}=e;fl()||tt(!1);let{future:o,static:s}=U.useContext(bi),{matches:a}=U.useContext(Ur),{pathname:l}=Ao(),u=Ac(),c=B2(t,z2(a,o.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(c);return U.useEffect(()=>u(JSON.parse(d),{replace:n,state:r,relative:i}),[u,d,i,n,r]),null}function fU(e){return XF(e.context)}function Oo(e){tt(!1)}function hU(e){let{basename:t="/",children:n=null,location:r,navigationType:i=to.Pop,navigator:o,static:s=!1,future:a}=e;fl()&&tt(!1);let l=t.replace(/^\/*/,"/"),u=U.useMemo(()=>({basename:l,navigator:o,static:s,future:Zu({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=dl(r));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:p="default"}=r,y=U.useMemo(()=>{let _=Wa(c,l);return _==null?null:{location:{pathname:_,search:d,hash:f,state:h,key:p},navigationType:i}},[l,c,d,f,h,p,i]);return y==null?null:U.createElement(bi.Provider,{value:u},U.createElement(x0.Provider,{children:n,value:y}))}function pU(e){let{children:t,location:n}=e;return JF(sy(t),n)}new Promise(()=>{});function sy(e,t){t===void 0&&(t=[]);let n=[];return U.Children.forEach(e,(r,i)=>{if(!U.isValidElement(r))return;let o=[...t,i];if(r.type===U.Fragment){n.push.apply(n,sy(r.props.children,o));return}r.type!==Oo&&tt(!1),!r.props.index||!r.props.children||tt(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=sy(r.props.children,o)),n.push(s)}),n}/** + * React Router DOM v6.26.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function nh(){return nh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function gU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mU(e,t){return e.button===0&&(!t||t==="_self")&&!gU(e)}function ay(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function yU(e,t){let n=ay(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const vU=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],_U=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],xU="6";try{window.__reactRouterVersion=xU}catch{}const SU=U.createContext({isTransitioning:!1}),wU="startTransition",jS=c9[wU];function bU(e){let{basename:t,children:n,future:r,window:i}=e,o=U.useRef();o.current==null&&(o.current=bF({window:i,v5Compat:!0}));let s=o.current,[a,l]=U.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=U.useCallback(d=>{u&&jS?jS(()=>l(d)):l(d)},[l,u]);return U.useLayoutEffect(()=>s.listen(c),[s,c]),U.createElement(hU,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const EU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",CU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oM=U.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:u,preventScrollReset:c,unstable_viewTransition:d}=t,f=iM(t,vU),{basename:h}=U.useContext(bi),p,y=!1;if(typeof u=="string"&&CU.test(u)&&(p=u,EU))try{let v=new URL(window.location.href),x=u.startsWith("//")?new URL(v.protocol+u):new URL(u),S=Wa(x.pathname,h);x.origin===v.origin&&S!=null?u=S+x.search+x.hash:y=!0}catch{}let _=KF(u,{relative:i}),m=RU(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:i,unstable_viewTransition:d});function g(v){r&&r(v),v.defaultPrevented||m(v)}return U.createElement("a",nh({},f,{href:p||_,onClick:y||o?r:g,ref:n,target:l}))}),wu=U.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,unstable_viewTransition:u,children:c}=t,d=iM(t,_U),f=S0(l,{relative:d.relative}),h=Ao(),p=U.useContext(J8),{navigator:y,basename:_}=U.useContext(bi),m=p!=null&&TU(f)&&u===!0,g=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,v=h.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(v=v.toLowerCase(),x=x?x.toLowerCase():null,g=g.toLowerCase()),x&&_&&(x=Wa(x,_)||x);const S=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let w=v===g||!s&&v.startsWith(g)&&v.charAt(S)==="/",E=x!=null&&(x===g||!s&&x.startsWith(g)&&x.charAt(g.length)==="/"),A={isActive:w,isPending:E,isTransitioning:m},k=w?r:void 0,R;typeof o=="function"?R=o(A):R=[o,w?"active":null,E?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let M=typeof a=="function"?a(A):a;return U.createElement(oM,nh({},d,{"aria-current":k,className:R,ref:n,style:M,to:l,unstable_viewTransition:u}),typeof c=="function"?c(A):c)});var ly;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ly||(ly={}));var FS;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(FS||(FS={}));function AU(e){let t=U.useContext(_0);return t||tt(!1),t}function RU(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=t===void 0?{}:t,l=Ac(),u=Ao(),c=S0(e,{relative:s});return U.useCallback(d=>{if(mU(d,n)){d.preventDefault();let f=r!==void 0?r:Jf(u)===Jf(c);l(e,{replace:f,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a})}},[u,l,c,r,i,n,e,o,s,a])}function $U(e){let t=U.useRef(ay(e)),n=U.useRef(!1),r=Ao(),i=U.useMemo(()=>yU(r.search,n.current?null:t.current),[r.search]),o=Ac(),s=U.useCallback((a,l)=>{const u=ay(typeof a=="function"?a(i):a);n.current=!0,o("?"+u,l)},[o,i]);return[i,s]}function TU(e,t){t===void 0&&(t={});let n=U.useContext(SU);n==null&&tt(!1);let{basename:r}=AU(ly.useViewTransitionState),i=S0(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Wa(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Wa(n.nextLocation.pathname,r)||n.nextLocation.pathname;return eh(i.pathname,s)!=null||eh(i.pathname,o)!=null}var sM={};function kU(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var MU=kU,Ae=MU;function NU(e){return!!e&&typeof e.then=="function"}var Ge=NU;function LU(e,t){if(e!=null)return e;throw Ae(t??"Got unexpected null or undefined")}var Ze=LU;function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class w0{getValue(){throw Ae("BaseLoadable")}toPromise(){throw Ae("BaseLoadable")}valueMaybe(){throw Ae("BaseLoadable")}valueOrThrow(){throw Ae(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw Ae("BaseLoadable")}promiseOrThrow(){throw Ae(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw Ae("BaseLoadable")}errorOrThrow(){throw Ae(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw Ae("BaseLoadable")}}class PU extends w0{constructor(t){super(),Ce(this,"state","hasValue"),Ce(this,"contents",void 0),this.contents=t}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(t){try{const n=t(this.contents);return Ge(n)?ms(n):Ga(n)?n:Rc(n)}catch(n){return Ge(n)?ms(n.next(()=>this.map(t))):b0(n)}}}class IU extends w0{constructor(t){super(),Ce(this,"state","hasError"),Ce(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(t){return this}}class aM extends w0{constructor(t){super(),Ce(this,"state","loading"),Ce(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(t){return ms(this.contents.then(n=>{const r=t(n);if(Ga(r)){const i=r;switch(i.state){case"hasValue":return i.contents;case"hasError":throw i.contents;case"loading":return i.contents}}return r}).catch(n=>{if(Ge(n))return n.then(()=>this.map(t).contents);throw n}))}}function Rc(e){return Object.freeze(new PU(e))}function b0(e){return Object.freeze(new IU(e))}function ms(e){return Object.freeze(new aM(e))}function lM(){return Object.freeze(new aM(new Promise(()=>{})))}function OU(e){return e.every(t=>t.state==="hasValue")?Rc(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?b0(Ze(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):ms(Promise.all(e.map(t=>t.contents)))}function uM(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(i=>e[i])).map(i=>Ga(i)?i:Ge(i)?ms(i):Rc(i)),r=OU(n);return Array.isArray(e)?r:r.map(i=>Object.getOwnPropertyNames(e).reduce((o,s,a)=>({...o,[s]:i[a]}),{}))}function Ga(e){return e instanceof w0}const DU={of:e=>Ge(e)?ms(e):Ga(e)?e:Rc(e),error:e=>b0(e),loading:()=>lM(),all:uM,isLoadable:Ga};var Rs={loadableWithValue:Rc,loadableWithError:b0,loadableWithPromise:ms,loadableLoading:lM,loadableAll:uM,isLoadable:Ga,RecoilLoadable:DU},jU=Rs.loadableWithValue,FU=Rs.loadableWithError,UU=Rs.loadableWithPromise,VU=Rs.loadableLoading,zU=Rs.loadableAll,BU=Rs.isLoadable,HU=Rs.RecoilLoadable,$c=Object.freeze({__proto__:null,loadableWithValue:jU,loadableWithError:FU,loadableWithPromise:UU,loadableLoading:VU,loadableAll:zU,isLoadable:BU,RecoilLoadable:HU});const uy={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};function qU(e,t){var n,r;const i=(n=sM[e])===null||n===void 0||(r=n.toLowerCase())===null||r===void 0?void 0:r.trim();if(i==null||i==="")return;if(!["true","false"].includes(i))throw Ae(`process.env.${e} value must be 'true', 'false', or empty: ${i}`);t(i==="true")}function WU(e,t){var n;const r=(n=sM[e])===null||n===void 0?void 0:n.trim();r==null||r===""||t(r.split(/\s*,\s*|\s+/))}function GU(){var e;typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)!=null&&(qU("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",t=>{uy.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=t}),WU("RECOIL_GKS_ENABLED",t=>{t.forEach(n=>{uy.RECOIL_GKS_ENABLED.add(n)})}))}GU();var hl=uy;function E0(e){return hl.RECOIL_GKS_ENABLED.has(e)}E0.setPass=e=>{hl.RECOIL_GKS_ENABLED.add(e)};E0.setFail=e=>{hl.RECOIL_GKS_ENABLED.delete(e)};E0.clear=()=>{hl.RECOIL_GKS_ENABLED.clear()};var Be=E0;function KU(e,t,{error:n}={}){return null}var YU=KU,H2=YU,eg,tg,ng;const QU=(eg=b.createMutableSource)!==null&&eg!==void 0?eg:b.unstable_createMutableSource,cM=(tg=b.useMutableSource)!==null&&tg!==void 0?tg:b.unstable_useMutableSource,dM=(ng=b.useSyncExternalStore)!==null&&ng!==void 0?ng:b.unstable_useSyncExternalStore;function XU(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;return((e=t==null?void 0:t.current)!==null&&e!==void 0?e:n.currentDispatcher).useSyncExternalStore!=null}function ZU(){return Be("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:Be("recoil_sync_external_store")&&dM!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:Be("recoil_mutable_source")&&cM!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?Be("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:Be("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function JU(){return!1}var Tc={createMutableSource:QU,useMutableSource:cM,useSyncExternalStore:dM,currentRendererSupportsUseSyncExternalStore:XU,reactMode:ZU,isFastRefreshEnabled:JU};class q2{constructor(t){Ce(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class fM extends q2{}class hM extends q2{}function eV(e){return e instanceof fM||e instanceof hM}var C0={AbstractRecoilValue:q2,RecoilState:fM,RecoilValueReadOnly:hM,isRecoilValue:eV},tV=C0.AbstractRecoilValue,nV=C0.RecoilState,rV=C0.RecoilValueReadOnly,iV=C0.isRecoilValue,Ka=Object.freeze({__proto__:null,AbstractRecoilValue:tV,RecoilState:nV,RecoilValueReadOnly:rV,isRecoilValue:iV});function oV(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var A0=oV;class pM{}const sV=new pM,ys=new Map,W2=new Map;function aV(e){return A0(e,t=>Ze(W2.get(t)))}function lV(e){if(ys.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in + production. But it is safe to ignore this warning if it occurred because of + hot module replacement.`;console.warn(t)}}function uV(e){hl.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&lV(e.key),ys.set(e.key,e);const t=e.set==null?new Ka.RecoilValueReadOnly(e.key):new Ka.RecoilState(e.key);return W2.set(e.key,t),t}class gM extends Error{}function cV(e){const t=ys.get(e);if(t==null)throw new gM(`Missing definition for RecoilValue: "${e}""`);return t}function dV(e){return ys.get(e)}const rh=new Map;function fV(e){var t;if(!Be("recoil_memory_managament_2020"))return;const n=ys.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;ys.delete(e),(r=mM(e))===null||r===void 0||r(),rh.delete(e)}}function hV(e,t){Be("recoil_memory_managament_2020")&&(t===void 0?rh.delete(e):rh.set(e,t))}function mM(e){return rh.get(e)}var xn={nodes:ys,recoilValues:W2,registerNode:uV,getNode:cV,getNodeMaybe:dV,deleteNodeConfigIfPossible:fV,setConfigDeletionHandler:hV,getConfigDeletionHandler:mM,recoilValuesForKeys:aV,NodeMissingError:gM,DefaultValue:pM,DEFAULT_VALUE:sV};function pV(e,t){t()}var gV={enqueueExecution:pV};function mV(e,t){return t={exports:{}},e(t,t.exports),t.exports}var yV=mV(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},n={},r=5,i=Math.pow(2,r),o=i-1,s=i/2,a=i/4,l={},u=function(D){return function(){return D}},c=n.hash=function(j){var D=typeof j>"u"?"undefined":t(j);if(D==="number")return j;D!=="string"&&(j+="");for(var X=0,se=0,ae=j.length;se>1&1431655765,D=(D&858993459)+(D>>2&858993459),D=D+(D>>4)&252645135,D+=D>>8,D+=D>>16,D&127},f=function(D,X){return X>>>D&o},h=function(D){return 1<=X;)ae[xe--]=ae[xe];return ae[X]=se,ae}for(var ve=0,_e=0,$e=new Array(fe+1);ve>>=1;return xe[X]=se,M(D,_e+1,xe)},O=function(D,X,se,ae){for(var fe=new Array(X-1),xe=0,ve=0,_e=0,$e=ae.length;_e<$e;++_e)if(_e!==se){var Qe=ae[_e];Qe&&!E(Qe)&&(fe[xe++]=Qe,ve|=1<<_e)}return R(D,ve,fe)},I=function j(D,X,se,ae,fe,xe){if(se===fe)return k(D,se,[xe,ae]);var ve=f(X,se),_e=f(X,fe);return R(D,h(ve)|h(_e),ve===_e?[j(D,X+r,se,ae,fe,xe)]:ve<_e?[ae,xe]:[xe,ae])},H=function(D,X,se,ae,fe,xe,ve,_e){for(var $e=fe.length,Qe=0;Qe<$e;++Qe){var nn=fe[Qe];if(se(ve,nn.key)){var Et=nn.value,On=xe(Et);return On===Et?fe:On===l?(--_e.value,_(D,Qe,fe)):y(D,Qe,A(X,ae,ve,On),fe)}}var tr=xe();return tr===l?fe:(++_e.value,y(D,$e,A(X,ae,ve,tr),fe))},K=function(D,X){return D===X.edit},V=function(D,X,se,ae,fe,xe,ve){if(X(xe,this.key)){var _e=ae(this.value);return _e===this.value?this:_e===l?(--ve.value,w):K(D,this)?(this.value=_e,this):A(D,fe,xe,_e)}var $e=ae();return $e===l?this:(++ve.value,I(D,se,this.hash,this,fe,A(D,fe,xe,$e)))},q=function(D,X,se,ae,fe,xe,ve){if(fe===this.hash){var _e=K(D,this),$e=H(_e,D,X,this.hash,this.children,ae,xe,ve);return $e===this.children?this:$e.length>1?k(D,this.hash,$e):$e[0]}var Qe=ae();return Qe===l?this:(++ve.value,I(D,se,this.hash,this,fe,A(D,fe,xe,Qe)))},W=function(D,X,se,ae,fe,xe,ve){var _e=this.mask,$e=this.children,Qe=f(se,fe),nn=h(Qe),Et=p(_e,nn),On=_e&nn,tr=On?$e[Et]:w,Us=tr._modify(D,X,se+r,ae,fe,xe,ve);if(tr===Us)return this;var td=K(D,this),Rl=_e,$l=void 0;if(On&&E(Us)){if(Rl&=~nn,!Rl)return w;if($e.length<=2&&$($e[Et^1]))return $e[Et^1];$l=_(td,Et,$e)}else if(!On&&!E(Us)){if($e.length>=s)return T(D,Qe,Us,_e,$e);Rl|=nn,$l=m(td,Et,Us,$e)}else $l=y(td,Et,Us,$e);return td?(this.mask=Rl,this.children=$l,this):R(D,Rl,$l)},Q=function(D,X,se,ae,fe,xe,ve){var _e=this.size,$e=this.children,Qe=f(se,fe),nn=$e[Qe],Et=(nn||w)._modify(D,X,se+r,ae,fe,xe,ve);if(nn===Et)return this;var On=K(D,this),tr=void 0;if(E(nn)&&!E(Et))++_e,tr=y(On,Qe,Et,$e);else if(!E(nn)&&E(Et)){if(--_e,_e<=a)return O(D,_e,Qe,$e);tr=y(On,Qe,w,$e)}else tr=y(On,Qe,Et,$e);return On?(this.size=_e,this.children=tr,this):M(D,_e,tr)};w._modify=function(j,D,X,se,ae,fe,xe){var ve=se();return ve===l?w:(++xe.value,A(j,ae,fe,ve))};function N(j,D,X,se,ae){this._editable=j,this._edit=D,this._config=X,this._root=se,this._size=ae}N.prototype.setTree=function(j,D){return this._editable?(this._root=j,this._size=D,this):j===this._root?this:new N(this._editable,this._edit,this._config,j,D)};var B=n.tryGetHash=function(j,D,X,se){for(var ae=se._root,fe=0,xe=se._config.keyEq;;)switch(ae.type){case g:return xe(X,ae.key)?ae.value:j;case v:{if(D===ae.hash)for(var ve=ae.children,_e=0,$e=ve.length;_e<$e;++_e){var Qe=ve[_e];if(xe(X,Qe.key))return Qe.value}return j}case x:{var nn=f(fe,D),Et=h(nn);if(ae.mask&Et){ae=ae.children[p(ae.mask,Et)],fe+=r;break}return j}case S:{if(ae=ae.children[f(fe,D)],ae){fe+=r;break}return j}default:return j}};N.prototype.tryGetHash=function(j,D,X){return B(j,D,X,this)};var G=n.tryGet=function(j,D,X){return B(j,X._config.hash(D),D,X)};N.prototype.tryGet=function(j,D){return G(j,D,this)};var re=n.getHash=function(j,D,X){return B(void 0,j,D,X)};N.prototype.getHash=function(j,D){return re(j,D,this)},n.get=function(j,D){return B(void 0,D._config.hash(j),j,D)},N.prototype.get=function(j,D){return G(D,j,this)};var Y=n.has=function(j,D,X){return B(l,j,D,X)!==l};N.prototype.hasHash=function(j,D){return Y(j,D,this)};var pe=n.has=function(j,D){return Y(D._config.hash(j),j,D)};N.prototype.has=function(j){return pe(j,this)};var ge=function(D,X){return D===X};n.make=function(j){return new N(0,0,{keyEq:j&&j.keyEq||ge,hash:j&&j.hash||c},w,0)},n.empty=n.make();var ue=n.isEmpty=function(j){return j&&!!E(j._root)};N.prototype.isEmpty=function(){return ue(this)};var Re=n.modifyHash=function(j,D,X,se){var ae={value:se._size},fe=se._root._modify(se._editable?se._edit:NaN,se._config.keyEq,0,j,D,X,ae);return se.setTree(fe,ae.value)};N.prototype.modifyHash=function(j,D,X){return Re(X,j,D,this)};var Ie=n.modify=function(j,D,X){return Re(j,X._config.hash(D),D,X)};N.prototype.modify=function(j,D){return Ie(D,j,this)};var we=n.setHash=function(j,D,X,se){return Re(u(X),j,D,se)};N.prototype.setHash=function(j,D,X){return we(j,D,X,this)};var ke=n.set=function(j,D,X){return we(X._config.hash(j),j,D,X)};N.prototype.set=function(j,D){return ke(j,D,this)};var De=u(l),In=n.removeHash=function(j,D,X){return Re(De,j,D,X)};N.prototype.removeHash=N.prototype.deleteHash=function(j,D){return In(j,D,this)};var bt=n.remove=function(j,D){return In(D._config.hash(j),j,D)};N.prototype.remove=N.prototype.delete=function(j){return bt(j,this)};var gt=n.beginMutation=function(j){return new N(j._editable+1,j._edit+1,j._config,j._root,j._size)};N.prototype.beginMutation=function(){return gt(this)};var L=n.endMutation=function(j){return j._editable=j._editable&&j._editable-1,j};N.prototype.endMutation=function(){return L(this)};var F=n.mutate=function(j,D){var X=gt(D);return j(X),L(X)};N.prototype.mutate=function(j){return F(j,this)};var z=function(D){return D&&oe(D[0],D[1],D[2],D[3],D[4])},oe=function(D,X,se,ae,fe){for(;se{n.set(i,t(r,i))}),n}var ih=bV;function EV(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function CV(e){return{nodeDeps:ih(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:ih(e.nodeToNodeSubscriptions,t=>new Set(t))}}function rg(e,t,n,r){const{nodeDeps:i,nodeToNodeSubscriptions:o}=n,s=i.get(e);if(s&&r&&s!==r.nodeDeps.get(e))return;i.set(e,t);const a=s==null?t:bu(t,s);for(const l of a)o.has(l)||o.set(l,new Set),Ze(o.get(l)).add(e);if(s){const l=bu(s,t);for(const u of l){if(!o.has(u))return;const c=Ze(o.get(u));c.delete(e),c.size===0&&o.delete(u)}}}function AV(e,t,n,r){var i,o,s,a;const l=n.getState();r===l.currentTree.version||r===((i=l.nextTree)===null||i===void 0?void 0:i.version)||((o=l.previousTree)===null||o===void 0||o.version);const u=n.getGraph(r);if(rg(e,t,u),r===((s=l.previousTree)===null||s===void 0?void 0:s.version)){const d=n.getGraph(l.currentTree.version);rg(e,t,d,u)}if(r===((a=l.previousTree)===null||a===void 0?void 0:a.version)||r===l.currentTree.version){var c;const d=(c=l.nextTree)===null||c===void 0?void 0:c.version;if(d!==void 0){const f=n.getGraph(d);rg(e,t,f,u)}}}var kc={cloneGraph:CV,graph:EV,saveDepsToStore:AV};let RV=0;const $V=()=>RV++;let TV=0;const kV=()=>TV++;let MV=0;const NV=()=>MV++;var R0={getNextTreeStateVersion:$V,getNextStoreID:kV,getNextComponentID:NV};const{persistentMap:US}=SV,{graph:LV}=kc,{getNextTreeStateVersion:yM}=R0;function vM(){const e=yM();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:US(),nonvalidatedAtoms:US()}}function PV(){const e=vM();return{currentTree:e,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(e.version,LV()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var _M={makeEmptyTreeState:vM,makeEmptyStoreState:PV,getNextTreeStateVersion:yM};class xM{}function IV(){return new xM}var $0={RetentionZone:xM,retentionZone:IV};function OV(e,t){const n=new Set(e);return n.add(t),n}function DV(e,t){const n=new Set(e);return n.delete(t),n}function jV(e,t,n){const r=new Map(e);return r.set(t,n),r}function FV(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function UV(e,t){const n=new Map(e);return n.delete(t),n}function VV(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var SM={setByAddingToSet:OV,setByDeletingFromSet:DV,mapBySettingInMap:jV,mapByUpdatingInMap:FV,mapByDeletingFromMap:UV,mapByDeletingMultipleFromMap:VV};function*zV(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var Y2=zV;function BV(e,t){return new Proxy(e,{get:(r,i)=>(!(i in r)&&i in t&&(r[i]=t[i]()),r[i]),ownKeys:r=>Object.keys(r)})}var wM=BV;const{getNode:Mc,getNodeMaybe:HV,recoilValuesForKeys:VS}=xn,{RetentionZone:zS}=$0,{setByAddingToSet:qV}=SM,WV=Object.freeze(new Set);class GV extends Error{}function KV(e,t,n){if(!Be("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function i(o){let s=r.get(o);s||r.set(o,s=new Set),s.add(t)}if(n instanceof zS)i(n);else if(Array.isArray(n))for(const o of n)i(o);return()=>{if(!Be("recoil_memory_managament_2020"))return;const{retention:o}=e.getState();function s(a){const l=o.nodesRetainedByZone.get(a);l==null||l.delete(t),l&&l.size===0&&o.nodesRetainedByZone.delete(a)}if(n instanceof zS)s(n);else if(Array.isArray(n))for(const a of n)s(a)}}function Q2(e,t,n,r){const i=e.getState();if(i.nodeCleanupFunctions.has(n))return;const o=Mc(n),s=KV(e,n,o.retainedBy),a=o.init(e,t,r);i.nodeCleanupFunctions.set(n,()=>{a(),s()})}function YV(e,t,n){Q2(e,e.getState().currentTree,t,n)}function QV(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function XV(e,t,n){return Q2(e,t,n,"get"),Mc(n).get(e,t)}function bM(e,t,n){return Mc(n).peek(e,t)}function ZV(e,t,n){var r;const i=HV(t);return i==null||(r=i.invalidate)===null||r===void 0||r.call(i,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:qV(e.dirtyAtoms,t)}}function JV(e,t,n,r){const i=Mc(n);if(i.set==null)throw new GV(`Attempt to set read-only RecoilValue: ${n}`);const o=i.set;return Q2(e,t,n,"set"),o(e,t,r)}function ez(e,t,n){const r=e.getState(),i=e.getGraph(t.version),o=Mc(n).nodeType;return wM({type:o},{loadable:()=>bM(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>o==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var s;return VS((s=i.nodeDeps.get(n))!==null&&s!==void 0?s:[])},subscribers:()=>{var s,a;return{nodes:VS(Y2(EM(e,t,new Set([n])),l=>l!==n)),components:A0((s=(a=r.nodeToComponentSubscriptions.get(n))===null||a===void 0?void 0:a.values())!==null&&s!==void 0?s:[],([l])=>({name:l}))}}})}function EM(e,t,n){const r=new Set,i=Array.from(n),o=e.getGraph(t.version);for(let a=i.pop();a;a=i.pop()){var s;r.add(a);const l=(s=o.nodeToNodeSubscriptions.get(a))!==null&&s!==void 0?s:WV;for(const u of l)r.has(u)||i.push(u)}return r}var Ro={getNodeLoadable:XV,peekNodeLoadable:bM,setNodeValue:JV,initializeNode:YV,cleanUpNode:QV,setUnvalidatedAtomValue_DEPRECATED:ZV,peekNodeInfo:ez,getDownstreamNodes:EM};let CM=null;function tz(e){CM=e}function nz(){var e;(e=CM)===null||e===void 0||e()}var AM={setInvalidateMemoizedSnapshot:tz,invalidateMemoizedSnapshot:nz};const{getDownstreamNodes:rz,getNodeLoadable:RM,setNodeValue:iz}=Ro,{getNextComponentID:oz}=R0,{getNode:sz,getNodeMaybe:$M}=xn,{DefaultValue:X2}=xn,{reactMode:az}=Tc,{AbstractRecoilValue:lz,RecoilState:uz,RecoilValueReadOnly:cz,isRecoilValue:dz}=Ka,{invalidateMemoizedSnapshot:fz}=AM;function hz(e,{key:t},n=e.getState().currentTree){var r,i;const o=e.getState();n.version===o.currentTree.version||n.version===((r=o.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(i=o.previousTree)===null||i===void 0||i.version);const s=RM(e,n,t);return s.state==="loading"&&s.contents.catch(()=>{}),s}function pz(e,t){const n=e.clone();return t.forEach((r,i)=>{r.state==="hasValue"&&r.contents instanceof X2?n.delete(i):n.set(i,r)}),n}function gz(e,t,{key:n},r){if(typeof r=="function"){const i=RM(e,t,n);if(i.state==="loading"){const o=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw Ae(o)}else if(i.state==="hasError")throw i.contents;return r(i.contents)}else return r}function mz(e,t,n){if(n.type==="set"){const{recoilValue:i,valueOrUpdater:o}=n,s=gz(e,t,i,o),a=iz(e,t,i.key,s);for(const[l,u]of a.entries())cy(t,l,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:i},loadable:o}=n;cy(t,i,o)}else if(n.type==="markModified"){const{recoilValue:{key:i}}=n;t.dirtyAtoms.add(i)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:i},unvalidatedValue:o}=n,s=$M(i);s==null||(r=s.invalidate)===null||r===void 0||r.call(s,t),t.atomValues.delete(i),t.nonvalidatedAtoms.set(i,o),t.dirtyAtoms.add(i)}else H2(`Unknown action ${n.type}`)}function cy(e,t,n){n.state==="hasValue"&&n.contents instanceof X2?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function TM(e,t){e.replaceState(n=>{const r=kM(n);for(const i of t)mz(e,r,i);return MM(e,r),fz(),r})}function T0(e,t){if(Eu.length){const n=Eu[Eu.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else TM(e,[t])}const Eu=[];function yz(){const e=new Map;return Eu.push(e),()=>{for(const[t,n]of e)TM(t,n);Eu.pop()}}function kM(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function MM(e,t){const n=rz(e,t,t.dirtyAtoms);for(const o of n){var r,i;(r=$M(o))===null||r===void 0||(i=r.invalidate)===null||i===void 0||i.call(r,t)}}function NM(e,t,n){T0(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function vz(e,t,n){if(n instanceof X2)return NM(e,t,n);T0(e,{type:"setLoadable",recoilValue:t,loadable:n})}function _z(e,t){T0(e,{type:"markModified",recoilValue:t})}function xz(e,t,n){T0(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function Sz(e,{key:t},n,r=null){const i=oz(),o=e.getState();o.nodeToComponentSubscriptions.has(t)||o.nodeToComponentSubscriptions.set(t,new Map),Ze(o.nodeToComponentSubscriptions.get(t)).set(i,[r??"",n]);const s=az();if(s.early&&(s.mode==="LEGACY"||s.mode==="MUTABLE_SOURCE")){const a=e.getState().nextTree;a&&a.dirtyAtoms.has(t)&&n(a)}return{release:()=>{const a=e.getState(),l=a.nodeToComponentSubscriptions.get(t);l===void 0||!l.has(i)||(l.delete(i),l.size===0&&a.nodeToComponentSubscriptions.delete(t))}}}function wz(e,t){var n;const{currentTree:r}=e.getState(),i=sz(t.key);(n=i.clearCache)===null||n===void 0||n.call(i,e,r)}var Vr={RecoilValueReadOnly:cz,AbstractRecoilValue:lz,RecoilState:uz,getRecoilValueAsLoadable:hz,setRecoilValue:NM,setRecoilValueLoadable:vz,markRecoilValueModified:_z,setUnvalidatedRecoilValue:xz,subscribeToRecoilValue:Sz,isRecoilValue:dz,applyAtomValueWrites:pz,batchStart:yz,writeLoadableToTreeState:cy,invalidateDownstreams:MM,copyTreeState:kM,refreshRecoilValue:wz};function bz(e,t,n){const r=e.entries();let i=r.next();for(;!i.done;){const o=i.value;if(t.call(n,o[1],o[0],e))return!0;i=r.next()}return!1}var Ez=bz;const{cleanUpNode:Cz}=Ro,{deleteNodeConfigIfPossible:Az,getNode:LM}=xn,{RetentionZone:PM}=$0,Rz=12e4,IM=new Set;function OM(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const i=new Set;for(const s of t)if(s instanceof PM)for(const a of Mz(n,s))i.add(a);else i.add(s);const o=$z(e,i);for(const s of o)kz(e,r,s)}function $z(e,t){const n=e.getState(),r=n.currentTree,i=e.getGraph(r.version),o=new Set,s=new Set;return a(t),o;function a(l){const u=new Set,c=Tz(e,r,l,o,s);for(const p of c){var d;if(LM(p).retainedBy==="recoilRoot"){s.add(p);continue}if(((d=n.retention.referenceCounts.get(p))!==null&&d!==void 0?d:0)>0){s.add(p);continue}if(DM(p).some(_=>n.retention.referenceCounts.get(_))){s.add(p);continue}const y=i.nodeToNodeSubscriptions.get(p);if(y&&Ez(y,_=>s.has(_))){s.add(p);continue}o.add(p),u.add(p)}const f=new Set;for(const p of u)for(const y of(h=i.nodeDeps.get(p))!==null&&h!==void 0?h:IM){var h;o.has(y)||f.add(y)}f.size&&a(f)}}function Tz(e,t,n,r,i){const o=e.getGraph(t.version),s=[],a=new Set;for(;n.size>0;)l(Ze(n.values().next().value));return s;function l(u){if(r.has(u)||i.has(u)){n.delete(u);return}if(a.has(u))return;const c=o.nodeToNodeSubscriptions.get(u);if(c)for(const d of c)l(d);a.add(u),n.delete(u),s.push(u)}}function kz(e,t,n){if(!Be("recoil_memory_managament_2020"))return;Cz(e,n);const r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const i=DM(n);for(const l of i){var o;(o=r.retention.nodesRetainedByZone.get(l))===null||o===void 0||o.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const s=r.graphsByVersion.get(t.version);if(s){const l=s.nodeDeps.get(n);if(l!==void 0){s.nodeDeps.delete(n);for(const u of l){var a;(a=s.nodeToNodeSubscriptions.get(u))===null||a===void 0||a.delete(n)}}s.nodeToNodeSubscriptions.delete(n)}Az(n)}function Mz(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:IM}function DM(e){const t=LM(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof PM?[t]:t}function Nz(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):OM(e,new Set([t]))}function Lz(e,t,n){var r;if(!Be("recoil_memory_managament_2020"))return;const i=e.getState().retention.referenceCounts,o=((r=i.get(t))!==null&&r!==void 0?r:0)+n;o===0?jM(e,t):i.set(t,o)}function jM(e,t){if(!Be("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),Nz(e,t)}function Pz(e){if(!Be("recoil_memory_managament_2020"))return;const t=e.getState();OM(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function Iz(e){return e===void 0?"recoilRoot":e}var $s={SUSPENSE_TIMEOUT_MS:Rz,updateRetainCount:Lz,updateRetainCountToZero:jM,releaseScheduledRetainablesNow:Pz,retainedByOptionWithDefault:Iz};const{unstable_batchedUpdates:Oz}=xj;var Dz={unstable_batchedUpdates:Oz};const{unstable_batchedUpdates:jz}=Dz;var Fz={unstable_batchedUpdates:jz};const{batchStart:Uz}=Vr,{unstable_batchedUpdates:Vz}=Fz;let Z2=Vz||(e=>e());const zz=e=>{Z2=e},Bz=()=>Z2,Hz=e=>{Z2(()=>{let t=()=>{};try{t=Uz(),e()}finally{t()}})};var k0={getBatcher:Bz,setBatcher:zz,batchUpdates:Hz};function*qz(e){for(const t of e)for(const n of t)yield n}var FM=qz;const UM=typeof Window>"u"||typeof window>"u",Wz=e=>!UM&&(e===window||e instanceof Window),Gz=typeof navigator<"u"&&navigator.product==="ReactNative";var M0={isSSR:UM,isReactNative:Gz,isWindow:Wz};function Kz(e,t){let n;return(...r)=>{n||(n={});const i=t(...r);return Object.hasOwnProperty.call(n,i)||(n[i]=e(...r)),n[i]}}function Yz(e,t){let n,r;return(...i)=>{const o=t(...i);return n===o||(n=o,r=e(...i)),r}}function Qz(e,t){let n,r;return[(...s)=>{const a=t(...s);return n===a||(n=a,r=e(...s)),r},()=>{n=null}]}var Xz={memoizeWithArgsHash:Kz,memoizeOneWithArgsHash:Yz,memoizeOneWithArgsHashAndInvalidation:Qz};const{batchUpdates:dy}=k0,{initializeNode:Zz,peekNodeInfo:Jz}=Ro,{graph:eB}=kc,{getNextStoreID:tB}=R0,{DEFAULT_VALUE:nB,recoilValues:BS,recoilValuesForKeys:HS}=xn,{AbstractRecoilValue:rB,getRecoilValueAsLoadable:iB,setRecoilValue:qS,setUnvalidatedRecoilValue:oB}=Vr,{updateRetainCount:uf}=$s,{setInvalidateMemoizedSnapshot:sB}=AM,{getNextTreeStateVersion:aB,makeEmptyStoreState:lB}=_M,{isSSR:uB}=M0,{memoizeOneWithArgsHashAndInvalidation:cB}=Xz;class N0{constructor(t,n){Ce(this,"_store",void 0),Ce(this,"_refCount",1),Ce(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),iB(this._store,r))),Ce(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),Ce(this,"getNodes_UNSTABLE",r=>{if(this.checkRefCount_INTERNAL(),(r==null?void 0:r.isModified)===!0){if((r==null?void 0:r.isInitialized)===!1)return[];const s=this._store.getState().currentTree;return HS(s.dirtyAtoms)}const i=this._store.getState().knownAtoms,o=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?BS.values():r.isInitialized===!0?HS(FM([i,o])):Y2(BS.values(),({key:s})=>!i.has(s)&&!o.has(s))}),Ce(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),Jz(this._store,this._store.getState().currentTree,r))),Ce(this,"map",r=>{this.checkRefCount_INTERNAL();const i=new fy(this,dy);return r(i),i}),Ce(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const i=new fy(this,dy);return i.retain(),await r(i),i.autoRelease_INTERNAL(),i}),this._store={storeID:tB(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const i=t.graphsByVersion;if(i.has(r))return Ze(i.get(r));const o=eB();return i.set(r,o),o},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Ae("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)Zz(this._store,r,"get"),uf(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){uB||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!Be("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){Be("recoil_memory_managament_2020")&&this._refCount<=0}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function VM(e,t,n=!1){const r=e.getState(),i=n?aB():t.version;return{currentTree:{version:n?i:t.version,stateID:n?i:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(i,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(A0(r.nodeCleanupFunctions.entries(),([o])=>[o,()=>{}]))}}function dB(e){const t=new N0(lB());return e!=null?t.map(e):t}const[WS,zM]=cB((e,t)=>{var n;const r=e.getState(),i=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:Ze(r.previousTree);return new N0(VM(e,i),e.storeID)},(e,t)=>{var n,r;return String(t)+String(e.storeID)+String((n=e.getState().nextTree)===null||n===void 0?void 0:n.version)+String(e.getState().currentTree.version)+String((r=e.getState().previousTree)===null||r===void 0?void 0:r.version)});sB(zM);function fB(e,t="latest"){const n=WS(e,t);return n.isRetained()?n:(zM(),WS(e,t))}class fy extends N0{constructor(t,n){super(VM(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),Ce(this,"_batch",void 0),Ce(this,"set",(r,i)=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{uf(o,r.key,1),qS(this.getStore_INTERNAL(),r,i)})}),Ce(this,"reset",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{uf(i,r.key,1),qS(this.getStore_INTERNAL(),r,nB)})}),Ce(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();dy(()=>{for(const[o,s]of r.entries())uf(i,o,1),oB(i,new rB(o),s)})}),this._batch=n}}var L0={Snapshot:N0,MutableSnapshot:fy,freshSnapshot:dB,cloneSnapshot:fB},hB=L0.Snapshot,pB=L0.MutableSnapshot,gB=L0.freshSnapshot,mB=L0.cloneSnapshot,P0=Object.freeze({__proto__:null,Snapshot:hB,MutableSnapshot:pB,freshSnapshot:gB,cloneSnapshot:mB});function yB(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var vB=yB;const{useRef:_B}=b;function xB(e){const t=_B(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var GS=xB;const{getNextTreeStateVersion:SB,makeEmptyStoreState:BM}=_M,{cleanUpNode:wB,getDownstreamNodes:bB,initializeNode:EB,setNodeValue:CB,setUnvalidatedAtomValue_DEPRECATED:AB}=Ro,{graph:RB}=kc,{cloneGraph:$B}=kc,{getNextStoreID:HM}=R0,{createMutableSource:ig,reactMode:qM}=Tc,{applyAtomValueWrites:TB}=Vr,{releaseScheduledRetainablesNow:WM}=$s,{freshSnapshot:kB}=P0,{useCallback:MB,useContext:GM,useEffect:hy,useMemo:NB,useRef:LB,useState:PB}=b;function Dl(){throw Ae("This component must be used inside a component.")}const KM=Object.freeze({storeID:HM(),getState:Dl,replaceState:Dl,getGraph:Dl,subscribeToTransactions:Dl,addTransactionMetadata:Dl});let py=!1;function KS(e){if(py)throw Ae("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(t.nextTree===null){Be("recoil_memory_managament_2020")&&Be("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&WM(e);const n=t.currentTree.version,r=SB();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,$B(Ze(t.graphsByVersion.get(n))))}}const YM=b.createContext({current:KM}),I0=()=>GM(YM),QM=b.createContext(null);function IB(){return GM(QM)}function J2(e,t,n){const r=bB(e,n,n.dirtyAtoms);for(const i of r){const o=t.nodeToComponentSubscriptions.get(i);if(o)for(const[s,[a,l]]of o)l(n)}}function XM(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[i,o]of t.nodeTransactionSubscriptions)if(r.has(i))for(const[s,a]of o)a(e);for(const[i,o]of t.transactionSubscriptions)o(e);(!qM().early||t.suspendedComponentResolvers.size>0)&&(J2(e,t,n),t.suspendedComponentResolvers.forEach(i=>i()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(i=>i(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function OB(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(n==null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,XM(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):H2("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,Be("recoil_memory_managament_2020")&&n==null&&WM(e)}finally{t.commitDepth--}}function DB({setNotifyBatcherOfChange:e}){const t=I0(),[,n]=PB([]);return e(()=>n({})),hy(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),hy(()=>{gV.enqueueExecution("Batcher",()=>{OB(t.current)})}),null}function jB(e,t){const n=BM();return t({set:(r,i)=>{const o=n.currentTree,s=CB(e,o,r.key,i),a=new Set(s.keys()),l=o.nonvalidatedAtoms.clone();for(const u of a)l.delete(u);n.currentTree={...o,dirtyAtoms:vB(o.dirtyAtoms,a),atomValues:TB(o.atomValues,s),nonvalidatedAtoms:l}},setUnvalidatedAtomValues:r=>{r.forEach((i,o)=>{n.currentTree=AB(n.currentTree,o,i)})}}),n}function FB(e){const t=kB(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let YS=0;function UB({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let i;const o=h=>{const p=i.current.graphsByVersion;if(p.has(h))return Ze(p.get(h));const y=RB();return p.set(h,y),y},s=(h,p)=>{if(p==null){const{transactionSubscriptions:y}=d.current.getState(),_=YS++;return y.set(_,h),{release:()=>{y.delete(_)}}}else{const{nodeTransactionSubscriptions:y}=d.current.getState();y.has(p)||y.set(p,new Map);const _=YS++;return Ze(y.get(p)).set(_,h),{release:()=>{const m=y.get(p);m&&(m.delete(_),m.size===0&&y.delete(p))}}}},a=h=>{KS(d.current);for(const p of Object.keys(h))Ze(d.current.getState().nextTree).transactionMetadata[p]=h[p]},l=h=>{KS(d.current);const p=Ze(i.current.nextTree);let y;try{py=!0,y=h(p)}finally{py=!1}y!==p&&(i.current.nextTree=y,qM().early&&J2(d.current,i.current,y),Ze(u.current)())},u=LB(null),c=MB(h=>{u.current=h},[u]),d=GS(()=>n??{storeID:HM(),getState:()=>i.current,replaceState:l,getGraph:o,subscribeToTransactions:s,addTransactionMetadata:a});n!=null&&(d.current=n),i=GS(()=>e!=null?jB(d.current,e):t!=null?FB(t):BM());const f=NB(()=>ig==null?void 0:ig(i,()=>i.current.currentTree.version),[i]);return hy(()=>{const h=d.current;for(const p of new Set(h.getState().knownAtoms))EB(h,p,"get");return()=>{for(const p of h.getState().knownAtoms)wB(h,p)}},[d]),b.createElement(YM.Provider,{value:d},b.createElement(QM.Provider,{value:f},b.createElement(DB,{setNotifyBatcherOfChange:c}),r))}function VB(e){const{override:t,...n}=e,r=I0();return t===!1&&r.current!==KM?e.children:b.createElement(UB,n)}function zB(){return I0().current.storeID}var Ei={RecoilRoot:VB,useStoreRef:I0,useRecoilMutableSource:IB,useRecoilStoreID:zB,notifyComponents_FOR_TESTING:J2,sendEndOfBatchNotifications_FOR_TESTING:XM};function BB(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n{t.current=e}),t.current}var ZM=GB;const{useStoreRef:KB}=Ei,{SUSPENSE_TIMEOUT_MS:YB}=$s,{updateRetainCount:jl}=$s,{RetentionZone:QB}=$0,{useEffect:XB,useRef:ZB}=b,{isSSR:QS}=M0;function JB(e){if(Be("recoil_memory_managament_2020"))return eH(e)}function eH(e){const n=(Array.isArray(e)?e:[e]).map(s=>s instanceof QB?s:s.key),r=KB();XB(()=>{if(!Be("recoil_memory_managament_2020"))return;const s=r.current;if(i.current&&!QS)window.clearTimeout(i.current),i.current=null;else for(const a of n)jl(s,a,1);return()=>{for(const a of n)jl(s,a,-1)}},[r,...n]);const i=ZB(),o=ZM(n);if(!QS&&(o===void 0||!HB(o,n))){const s=r.current;for(const a of n)jl(s,a,1);if(o)for(const a of o)jl(s,a,-1);i.current&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>{i.current=null;for(const a of n)jl(s,a,-1)},YB)}}var e5=JB;function tH(){return""}var Nc=tH;const{batchUpdates:nH}=k0,{DEFAULT_VALUE:JM}=xn,{currentRendererSupportsUseSyncExternalStore:rH,reactMode:pl,useMutableSource:iH,useSyncExternalStore:oH}=Tc,{useRecoilMutableSource:sH,useStoreRef:zr}=Ei,{AbstractRecoilValue:gy,getRecoilValueAsLoadable:Lc,setRecoilValue:oh,setUnvalidatedRecoilValue:aH,subscribeToRecoilValue:Ya}=Vr,{useCallback:yn,useEffect:Qa,useMemo:eN,useRef:Cu,useState:t5}=b,{setByAddingToSet:lH}=SM,{isSSR:uH}=M0;function n5(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(i=>{const o=n.current.getState().suspendedComponentResolvers;o.add(i),uH&&Ge(e.contents)&&e.contents.finally(()=>{o.delete(i)})}):e.state==="hasError"?e.contents:Ae(`Invalid value of loadable atom "${t.key}"`)}function cH(){const e=Nc(),t=zr(),[,n]=t5([]),r=Cu(new Set);r.current=new Set;const i=Cu(new Set),o=Cu(new Map),s=yn(l=>{const u=o.current.get(l);u&&(u.release(),o.current.delete(l))},[o]),a=yn((l,u)=>{o.current.has(u)&&n([])},[]);return Qa(()=>{const l=t.current;bu(r.current,i.current).forEach(u=>{if(o.current.has(u))return;const c=Ya(l,new gy(u),f=>a(f,u),e);o.current.set(u,c),l.getState().nextTree?l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a(l.getState(),u)}):a(l.getState(),u)}),bu(i.current,r.current).forEach(u=>{s(u)}),i.current=r.current}),Qa(()=>{const l=o.current;return bu(r.current,new Set(l.keys())).forEach(u=>{const c=Ya(t.current,new gy(u),d=>a(d,u),e);l.set(u,c)}),()=>l.forEach((u,c)=>s(c))},[e,t,s,a]),eN(()=>{function l(p){return y=>{oh(t.current,p,y)}}function u(p){return()=>oh(t.current,p,JM)}function c(p){var y;r.current.has(p.key)||(r.current=lH(r.current,p.key));const _=t.current.getState();return Lc(t.current,p,pl().early&&(y=_.nextTree)!==null&&y!==void 0?y:_.currentTree)}function d(p){const y=c(p);return n5(y,p,t)}function f(p){return[d(p),l(p)]}function h(p){return[c(p),l(p)]}return{getRecoilValue:d,getRecoilValueLoadable:c,getRecoilState:f,getRecoilStateLoadable:h,getSetRecoilState:l,getResetRecoilState:u}},[r,t])}const dH={current:0};function fH(e){const t=zr(),n=Nc(),r=yn(()=>{var a;const l=t.current,u=l.getState(),c=pl().early&&(a=u.nextTree)!==null&&a!==void 0?a:u.currentTree;return{loadable:Lc(l,e,c),key:e.key}},[t,e]),i=yn(a=>{let l;return()=>{var u,c;const d=a();return(u=l)!==null&&u!==void 0&&u.loadable.is(d.loadable)&&((c=l)===null||c===void 0?void 0:c.key)===d.key?l:(l=d,d)}},[]),o=eN(()=>i(r),[r,i]),s=yn(a=>{const l=t.current;return Ya(l,e,a,n).release},[t,e,n]);return oH(s,o,o).loadable}function hH(e){const t=zr(),n=yn(()=>{var u;const c=t.current,d=c.getState(),f=pl().early&&(u=d.nextTree)!==null&&u!==void 0?u:d.currentTree;return Lc(c,e,f)},[t,e]),r=yn(()=>n(),[n]),i=Nc(),o=yn((u,c)=>{const d=t.current;return Ya(d,e,()=>{if(!Be("recoil_suppress_rerender_in_callback"))return c();const h=n();l.current.is(h)||c(),l.current=h},i).release},[t,e,i,n]),s=sH();if(s==null)throw Ae("Recoil hooks must be used in components contained within a component.");const a=iH(s,r,o),l=Cu(a);return Qa(()=>{l.current=a}),a}function my(e){const t=zr(),n=Nc(),r=yn(()=>{var l;const u=t.current,c=u.getState(),d=pl().early&&(l=c.nextTree)!==null&&l!==void 0?l:c.currentTree;return Lc(u,e,d)},[t,e]),i=yn(()=>({loadable:r(),key:e.key}),[r,e.key]),o=yn(l=>{const u=i();return l.loadable.is(u.loadable)&&l.key===u.key?l:u},[i]);Qa(()=>{const l=Ya(t.current,e,u=>{a(o)},n);return a(o),l.release},[n,e,t,o]);const[s,a]=t5(i);return s.key!==e.key?i().loadable:s.loadable}function pH(e){const t=zr(),[,n]=t5([]),r=Nc(),i=yn(()=>{var a;const l=t.current,u=l.getState(),c=pl().early&&(a=u.nextTree)!==null&&a!==void 0?a:u.currentTree;return Lc(l,e,c)},[t,e]),o=i(),s=Cu(o);return Qa(()=>{s.current=o}),Qa(()=>{const a=t.current,l=a.getState(),u=Ya(a,e,d=>{var f;if(!Be("recoil_suppress_rerender_in_callback"))return n([]);const h=i();(f=s.current)!==null&&f!==void 0&&f.is(h)||n(h),s.current=h},r);if(l.nextTree)a.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{s.current=null,n([])});else{var c;if(!Be("recoil_suppress_rerender_in_callback"))return n([]);const d=i();(c=s.current)!==null&&c!==void 0&&c.is(d)||n(d),s.current=d}return u.release},[r,i,e,t]),o}function r5(e){return Be("recoil_memory_managament_2020")&&e5(e),{TRANSITION_SUPPORT:my,SYNC_EXTERNAL_STORE:rH()?fH:my,MUTABLE_SOURCE:hH,LEGACY:pH}[pl().mode](e)}function tN(e){const t=zr(),n=r5(e);return n5(n,e,t)}function O0(e){const t=zr();return yn(n=>{oh(t.current,e,n)},[t,e])}function gH(e){const t=zr();return yn(()=>{oh(t.current,e,JM)},[t,e])}function mH(e){return[tN(e),O0(e)]}function yH(e){return[r5(e),O0(e)]}function vH(){const e=zr();return(t,n={})=>{nH(()=>{e.current.addTransactionMetadata(n),t.forEach((r,i)=>aH(e.current,new gy(i),r))})}}function nN(e){return Be("recoil_memory_managament_2020")&&e5(e),my(e)}function rN(e){const t=zr(),n=nN(e);return n5(n,e,t)}function _H(e){return[rN(e),O0(e)]}var xH={recoilComponentGetRecoilValueCount_FOR_TESTING:dH,useRecoilInterface:cH,useRecoilState:mH,useRecoilStateLoadable:yH,useRecoilValue:tN,useRecoilValueLoadable:r5,useResetRecoilState:gH,useSetRecoilState:O0,useSetUnvalidatedAtomValues:vH,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:nN,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:rN,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:_H};function SH(e,t){const n=new Map;for(const[r,i]of e)t(i,r)&&n.set(r,i);return n}var wH=SH;function bH(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var EH=bH;function CH(...e){const t=new Map;for(let n=0;nt.current.subscribeToTransactions(e).release,[e,t])}function JS(e){const t=e.atomValues.toMap(),n=ih(wH(t,(r,i)=>{const s=iN(i).persistence_UNSTABLE;return s!=null&&s.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return AH(e.nonvalidatedAtoms.toMap(),n)}function PH(e){j0(D0(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const i=JS(r),o=JS(n),s=ih(TH,l=>{var u,c,d,f;return{persistence_UNSTABLE:{type:(u=(c=l.persistence_UNSTABLE)===null||c===void 0?void 0:c.type)!==null&&u!==void 0?u:"none",backButton:(d=(f=l.persistence_UNSTABLE)===null||f===void 0?void 0:f.backButton)!==null&&d!==void 0?d:!1}}}),a=EH(r.dirtyAtoms,l=>i.has(l)||o.has(l));e({atomValues:i,previousAtomValues:o,atomInfo:s,modifiedAtoms:a,transactionMetadata:{...r.transactionMetadata}})},[e]))}function IH(e){j0(D0(t=>{const n=sh(t,"latest"),r=sh(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function OH(){const e=i5(),[t,n]=LH(()=>sh(e.current)),r=ZM(t),i=XS(),o=XS();if(j0(D0(a=>n(sh(a)),[])),oN(()=>{const a=t.retain();if(i.current&&!ZS){var l;window.clearTimeout(i.current),i.current=null,(l=o.current)===null||l===void 0||l.call(o),o.current=null}return()=>{window.setTimeout(a,10)}},[t]),r!==t&&!ZS){if(i.current){var s;window.clearTimeout(i.current),i.current=null,(s=o.current)===null||s===void 0||s.call(o),o.current=null}o.current=t.retain(),i.current=window.setTimeout(()=>{var a;i.current=null,(a=o.current)===null||a===void 0||a.call(o),o.current=null},NH)}return t}function sN(e,t){var n;const r=e.getState(),i=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,o=t.getStore_INTERNAL().getState().currentTree;RH(()=>{const s=new Set;for(const u of[i.atomValues.keys(),o.atomValues.keys()])for(const c of u){var a,l;((a=i.atomValues.get(c))===null||a===void 0?void 0:a.contents)!==((l=o.atomValues.get(c))===null||l===void 0?void 0:l.contents)&&iN(c).shouldRestoreFromSnapshots&&s.add(c)}s.forEach(u=>{MH(e,new kH(u),o.atomValues.has(u)?Ze(o.atomValues.get(u)):$H)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function DH(){const e=i5();return D0(t=>sN(e.current,t),[e])}var aN={useRecoilSnapshot:OH,gotoSnapshot:sN,useGotoRecoilSnapshot:DH,useRecoilTransactionObserver:IH,useTransactionObservation_DEPRECATED:PH,useTransactionSubscription_DEPRECATED:j0};const{peekNodeInfo:jH}=Ro,{useStoreRef:FH}=Ei;function UH(){const e=FH();return({key:t})=>jH(e.current,e.current.getState().currentTree,t)}var VH=UH;const{reactMode:zH}=Tc,{RecoilRoot:BH,useStoreRef:HH}=Ei,{useMemo:qH}=b;function WH(){zH().mode==="MUTABLE_SOURCE"&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");const e=HH().current;return qH(()=>{function t({children:n}){return b.createElement(BH,{store_INTERNAL:e},n)}return t},[e])}var GH=WH;const{loadableWithValue:KH}=$c,{initializeNode:YH}=Ro,{DEFAULT_VALUE:QH,getNode:XH}=xn,{copyTreeState:ZH,getRecoilValueAsLoadable:JH,invalidateDownstreams:eq,writeLoadableToTreeState:tq}=Vr;function ew(e){return XH(e.key).nodeType==="atom"}class nq{constructor(t,n){Ce(this,"_store",void 0),Ce(this,"_treeState",void 0),Ce(this,"_changes",void 0),Ce(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!ew(r))throw Ae("Reading selectors within atomicUpdate is not supported");const i=JH(this._store,r,this._treeState);if(i.state==="hasValue")return i.contents;throw i.state==="hasError"?i.contents:Ae(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),Ce(this,"set",(r,i)=>{if(!ew(r))throw Ae("Setting selectors within atomicUpdate is not supported");if(typeof i=="function"){const o=this.get(r);this._changes.set(r.key,i(o))}else YH(this._store,r.key,"set"),this._changes.set(r.key,i)}),Ce(this,"reset",r=>{this.set(r,QH)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=ZH(this._treeState);for(const[n,r]of this._changes)tq(t,n,KH(r));return eq(this._store,t),t}}function rq(e){return t=>{e.replaceState(n=>{const r=new nq(e,n);return t(r),r.newTreeState_INTERNAL()})}}var iq={atomicUpdater:rq},oq=iq.atomicUpdater,lN=Object.freeze({__proto__:null,atomicUpdater:oq});function sq(e,t){if(!e)throw new Error(t)}var aq=sq,nu=aq;const{atomicUpdater:lq}=lN,{batchUpdates:uq}=k0,{DEFAULT_VALUE:cq}=xn,{useStoreRef:dq}=Ei,{refreshRecoilValue:fq,setRecoilValue:tw}=Vr,{cloneSnapshot:hq}=P0,{gotoSnapshot:pq}=aN,{useCallback:gq}=b;class uN{}const mq=new uN;function cN(e,t,n,r){let i=mq,o;if(uq(()=>{const a="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw Ae(a);const l=wM({...r??{},set:(c,d)=>tw(e,c,d),reset:c=>tw(e,c,cq),refresh:c=>fq(e,c),gotoSnapshot:c=>pq(e,c),transact_UNSTABLE:c=>lq(e)(c)},{snapshot:()=>{const c=hq(e);return o=c.retain(),c}}),u=t(l);if(typeof u!="function")throw Ae(a);i=u(...n)}),i instanceof uN&&nu(!1),Ge(i))i=i.finally(()=>{var a;(a=o)===null||a===void 0||a()});else{var s;(s=o)===null||s===void 0||s()}return i}function yq(e,t){const n=dq();return gq((...r)=>cN(n.current,e,r),t!=null?[...t,n]:void 0)}var dN={recoilCallback:cN,useRecoilCallback:yq};const{useStoreRef:vq}=Ei,{refreshRecoilValue:_q}=Vr,{useCallback:xq}=b;function Sq(e){const t=vq();return xq(()=>{const n=t.current;_q(n,e)},[e,t])}var wq=Sq;const{atomicUpdater:bq}=lN,{useStoreRef:Eq}=Ei,{useMemo:Cq}=b;function Aq(e,t){const n=Eq();return Cq(()=>(...r)=>{bq(n.current)(o=>{e(o)(...r)})},t!=null?[...t,n]:void 0)}var Rq=Aq;class $q{constructor(t){Ce(this,"value",void 0),this.value=t}}var Tq={WrappedValue:$q},kq=Tq.WrappedValue,fN=Object.freeze({__proto__:null,WrappedValue:kq});const{isFastRefreshEnabled:Mq}=Tc;class nw extends Error{}class Nq{constructor(t){var n,r,i;Ce(this,"_name",void 0),Ce(this,"_numLeafs",void 0),Ce(this,"_root",void 0),Ce(this,"_onHit",void 0),Ce(this,"_onSet",void 0),Ce(this,"_mapNodeValue",void 0),this._name=t==null?void 0:t.name,this._numLeafs=0,this._root=null,this._onHit=(n=t==null?void 0:t.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=t==null?void 0:t.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(i=t==null?void 0:t.mapNodeValue)!==null&&i!==void 0?i:o=>o}size(){return this._numLeafs}root(){return this._root}get(t,n){var r;return(r=this.getLeafNode(t,n))===null||r===void 0?void 0:r.value}getLeafNode(t,n){if(this._root==null)return;let r=this._root;for(;r;){if(n==null||n.onNodeVisit(r),r.type==="leaf")return this._onHit(r),r;const i=this._mapNodeValue(t(r.nodeKey));r=r.branches.get(i)}}set(t,n,r){const i=()=>{var o,s,a,l;let u,c;for(const[_,m]of t){var d,f,h;const g=this._root;if((g==null?void 0:g.type)==="leaf")throw this.invalidCacheError();const v=u;if(u=v?v.branches.get(c):g,u=(d=u)!==null&&d!==void 0?d:{type:"branch",nodeKey:_,parent:v,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==_)throw this.invalidCacheError();v==null||v.branches.set(c,u),r==null||(f=r.onNodeVisit)===null||f===void 0||f.call(r,u),c=this._mapNodeValue(m),this._root=(h=this._root)!==null&&h!==void 0?h:u}const p=u?(o=u)===null||o===void 0?void 0:o.branches.get(c):this._root;if(p!=null&&(p.type!=="leaf"||p.branchKey!==c))throw this.invalidCacheError();const y={type:"leaf",value:n,parent:u,branchKey:c};(s=u)===null||s===void 0||s.branches.set(c,y),this._root=(a=this._root)!==null&&a!==void 0?a:y,this._numLeafs++,this._onSet(y),r==null||(l=r.onNodeVisit)===null||l===void 0||l.call(r,y)};try{i()}catch(o){if(o instanceof nw)this.clear(),i();else throw o}}delete(t){const n=this.root();if(!n)return!1;if(t===n)return this._root=null,this._numLeafs=0,!0;let r=t.parent,i=t.branchKey;for(;r;){var o;if(r.branches.delete(i),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;i=(o=r)===null||o===void 0?void 0:o.branchKey,r=r.parent}for(;r!==n;r=r.parent)if(r==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const t=Mq()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw H2(t+(this._name!=null?` - ${this._name}`:"")),new nw}}var Lq={TreeCache:Nq},Pq=Lq.TreeCache,hN=Object.freeze({__proto__:null,TreeCache:Pq});class Iq{constructor(t){var n;Ce(this,"_maxSize",void 0),Ce(this,"_size",void 0),Ce(this,"_head",void 0),Ce(this,"_tail",void 0),Ce(this,"_map",void 0),Ce(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const n=this._keyMapper(t),r=this._map.get(n);if(r)return this.set(t,r.value),r.value}set(t,n){const r=this._keyMapper(t);this._map.get(r)&&this.delete(t);const o=this.head(),s={key:t,right:o,left:null,value:n};o?o.left=s:this._tail=s,this._map.set(r,s),this._head=s,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;const r=Ze(this._map.get(n)),i=r.right,o=r.left;i&&(i.left=r.left),o&&(o.right=r.right),r===this.head()&&(this._head=i),r===this.tail()&&(this._tail=o),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var Oq={LRUCache:Iq},Dq=Oq.LRUCache,pN=Object.freeze({__proto__:null,LRUCache:Dq});const{LRUCache:jq}=pN,{TreeCache:Fq}=hN;function Uq({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new jq({maxSize:t}),i=new Fq({name:e,mapNodeValue:n,onHit:o=>{r.set(o,!0)},onSet:o=>{const s=r.tail();r.set(o,!0),s&&i.size()>t&&i.delete(s.key)}});return i}var rw=Uq;function rr(e,t,n){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if((t==null?void 0:t.allowFunctions)!==!0)throw Ae("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var r;return(r=JSON.stringify(e))!==null&&r!==void 0?r:""}if(Ge(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((i,o)=>rr(i,t,o.toString()))}]`;if(typeof e.toJSON=="function")return rr(e.toJSON(n),t,n);if(e instanceof Map){const i={};for(const[o,s]of e)i[typeof o=="string"?o:rr(o,t)]=s;return rr(i,t,n)}return e instanceof Set?rr(Array.from(e).sort((i,o)=>rr(i,t).localeCompare(rr(o,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?rr(Array.from(e),t,n):`{${Object.keys(e).filter(i=>e[i]!==void 0).sort().map(i=>`${rr(i,t)}:${rr(e[i],t,i)}`).join(",")}}`}function Vq(e,t={allowFunctions:!1}){return rr(e,t)}var F0=Vq;const{TreeCache:zq}=hN,xd={equality:"reference",eviction:"keep-all",maxSize:1/0};function Bq({equality:e=xd.equality,eviction:t=xd.eviction,maxSize:n=xd.maxSize}=xd,r){const i=Hq(e);return qq(t,n,i,r)}function Hq(e){switch(e){case"reference":return t=>t;case"value":return t=>F0(t)}throw Ae(`Unrecognized equality policy ${e}`)}function qq(e,t,n,r){switch(e){case"keep-all":return new zq({name:r,mapNodeValue:n});case"lru":return rw({name:r,maxSize:Ze(t),mapNodeValue:n});case"most-recent":return rw({name:r,maxSize:1,mapNodeValue:n})}throw Ae(`Unrecognized eviction policy ${e}`)}var Wq=Bq;function Gq(e){return()=>null}var Kq={startPerfBlock:Gq};const{isLoadable:Yq,loadableWithError:Sd,loadableWithPromise:Qq,loadableWithValue:og}=$c,{WrappedValue:gN}=fN,{getNodeLoadable:wd,peekNodeLoadable:Xq,setNodeValue:Zq}=Ro,{saveDepsToStore:Jq}=kc,{DEFAULT_VALUE:eW,getConfigDeletionHandler:tW,getNode:nW,registerNode:iw}=xn,{isRecoilValue:rW}=Ka,{markRecoilValueModified:ow}=Vr,{retainedByOptionWithDefault:iW}=$s,{recoilCallback:oW}=dN,{startPerfBlock:sW}=Kq;class mN{}const Fl=new mN,Ul=[],bd=new Map,aW=(()=>{let e=0;return()=>e++})();function yN(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:i}=e,o=e.set!=null?e.set:void 0,s=new Set,a=Wq(i??{equality:"reference",eviction:"keep-all"},n),l=iW(e.retainedBy_UNSTABLE),u=new Map;let c=0;function d(){return!Be("recoil_memory_managament_2020")||c>0}function f(N){return N.getState().knownSelectors.add(n),c++,()=>{c--}}function h(){return tW(n)!==void 0&&!d()}function p(N,B,G,re,Y){H(B,re,Y),y(N,G)}function y(N,B){O(N,B)&&T(N),m(B,!0)}function _(N,B){O(N,B)&&(Ze(R(N)).stateVersions.clear(),m(B,!1))}function m(N,B){const G=bd.get(N);if(G!=null){for(const re of G)ow(re,Ze(t));B&&bd.delete(N)}}function g(N,B){let G=bd.get(B);G==null&&bd.set(B,G=new Set),G.add(N)}function v(N,B,G,re,Y,pe){return B.then(ge=>{if(!d())throw T(N),Fl;const ue=og(ge);return p(N,G,Y,ue,re),ge}).catch(ge=>{if(!d())throw T(N),Fl;if(Ge(ge))return x(N,ge,G,re,Y,pe);const ue=Sd(ge);throw p(N,G,Y,ue,re),ge})}function x(N,B,G,re,Y,pe){return B.then(ge=>{if(!d())throw T(N),Fl;pe.loadingDepKey!=null&&pe.loadingDepPromise===B?G.atomValues.set(pe.loadingDepKey,og(ge)):N.getState().knownSelectors.forEach(we=>{G.atomValues.delete(we)});const ue=E(N,G);if(ue&&ue.state!=="loading"){if((O(N,Y)||R(N)==null)&&y(N,Y),ue.state==="hasValue")return ue.contents;throw ue.contents}if(!O(N,Y)){const we=k(N,G);if(we!=null)return we.loadingLoadable.contents}const[Re,Ie]=w(N,G,Y);if(Re.state!=="loading"&&p(N,G,Y,Re,Ie),Re.state==="hasError")throw Re.contents;return Re.contents}).catch(ge=>{if(ge instanceof mN)throw Fl;if(!d())throw T(N),Fl;const ue=Sd(ge);throw p(N,G,Y,ue,re),ge})}function S(N,B,G,re){var Y,pe,ge,ue;if(O(N,re)||B.version===((Y=N.getState())===null||Y===void 0||(pe=Y.currentTree)===null||pe===void 0?void 0:pe.version)||B.version===((ge=N.getState())===null||ge===void 0||(ue=ge.nextTree)===null||ue===void 0?void 0:ue.version)){var Re,Ie,we;Jq(n,G,N,(Re=(Ie=N.getState())===null||Ie===void 0||(we=Ie.nextTree)===null||we===void 0?void 0:we.version)!==null&&Re!==void 0?Re:N.getState().currentTree.version)}for(const ke of G)s.add(ke)}function w(N,B,G){const re=sW(n);let Y=!0,pe=!0;const ge=()=>{re(),pe=!1};let ue,Re=!1,Ie;const we={loadingDepKey:null,loadingDepPromise:null},ke=new Map;function De({key:bt}){const gt=wd(N,B,bt);switch(ke.set(bt,gt),Y||(S(N,B,new Set(ke.keys()),G),_(N,G)),gt.state){case"hasValue":return gt.contents;case"hasError":throw gt.contents;case"loading":throw we.loadingDepKey=bt,we.loadingDepPromise=gt.contents,gt.contents}throw Ae("Invalid Loadable state")}const In=bt=>(...gt)=>{if(pe)throw Ae("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return t==null&&nu(!1),oW(N,bt,gt,{node:t})};try{ue=r({get:De,getCallback:In}),ue=rW(ue)?De(ue):ue,Yq(ue)&&(ue.state==="hasError"&&(Re=!0),ue=ue.contents),Ge(ue)?ue=v(N,ue,B,ke,G,we).finally(ge):ge(),ue=ue instanceof gN?ue.value:ue}catch(bt){ue=bt,Ge(ue)?ue=x(N,ue,B,ke,G,we).finally(ge):(Re=!0,ge())}return Re?Ie=Sd(ue):Ge(ue)?Ie=Qq(ue):Ie=og(ue),Y=!1,$(N,G,ke),S(N,B,new Set(ke.keys()),G),[Ie,ke]}function E(N,B){let G=B.atomValues.get(n);if(G!=null)return G;const re=new Set;try{G=a.get(pe=>(typeof pe!="string"&&nu(!1),wd(N,B,pe).contents),{onNodeVisit:pe=>{pe.type==="branch"&&pe.nodeKey!==n&&re.add(pe.nodeKey)}})}catch(pe){throw Ae(`Problem with cache lookup for selector "${n}": ${pe.message}`)}if(G){var Y;B.atomValues.set(n,G),S(N,B,re,(Y=R(N))===null||Y===void 0?void 0:Y.executionID)}return G}function A(N,B){const G=E(N,B);if(G!=null)return T(N),G;const re=k(N,B);if(re!=null){var Y;return((Y=re.loadingLoadable)===null||Y===void 0?void 0:Y.state)==="loading"&&g(N,re.executionID),re.loadingLoadable}const pe=aW(),[ge,ue]=w(N,B,pe);return ge.state==="loading"?(M(N,pe,ge,ue,B),g(N,pe)):(T(N),H(B,ge,ue)),ge}function k(N,B){const G=FM([u.has(N)?[Ze(u.get(N))]:[],A0(Y2(u,([Y])=>Y!==N),([,Y])=>Y)]);function re(Y){for(const[pe,ge]of Y)if(!wd(N,B,pe).is(ge))return!0;return!1}for(const Y of G){if(Y.stateVersions.get(B.version)||!re(Y.depValuesDiscoveredSoFarDuringAsyncWork))return Y.stateVersions.set(B.version,!0),Y;Y.stateVersions.set(B.version,!1)}}function R(N){return u.get(N)}function M(N,B,G,re,Y){u.set(N,{depValuesDiscoveredSoFarDuringAsyncWork:re,executionID:B,loadingLoadable:G,stateVersions:new Map([[Y.version,!0]])})}function $(N,B,G){if(O(N,B)){const re=R(N);re!=null&&(re.depValuesDiscoveredSoFarDuringAsyncWork=G)}}function T(N){u.delete(N)}function O(N,B){var G;return B===((G=R(N))===null||G===void 0?void 0:G.executionID)}function I(N){return Array.from(N.entries()).map(([B,G])=>[B,G.contents])}function H(N,B,G){N.atomValues.set(n,B);try{a.set(I(G),B)}catch(re){throw Ae(`Problem with setting cache for selector "${n}": ${re.message}`)}}function K(N){if(Ul.includes(n)){const B=`Recoil selector has circular dependencies: ${Ul.slice(Ul.indexOf(n)).join(" → ")}`;return Sd(Ae(B))}Ul.push(n);try{return N()}finally{Ul.pop()}}function V(N,B){const G=B.atomValues.get(n);return G??a.get(re=>{var Y;return typeof re!="string"&&nu(!1),(Y=Xq(N,B,re))===null||Y===void 0?void 0:Y.contents})}function q(N,B){return K(()=>A(N,B))}function W(N){N.atomValues.delete(n)}function Q(N,B){t==null&&nu(!1);for(const re of s){var G;const Y=nW(re);(G=Y.clearCache)===null||G===void 0||G.call(Y,N,B)}s.clear(),W(B),a.clear(),ow(N,t)}return o!=null?t=iw({key:n,nodeType:"selector",peek:V,get:q,set:(B,G,re)=>{let Y=!1;const pe=new Map;function ge({key:we}){if(Y)throw Ae("Recoil: Async selector sets are not currently supported.");const ke=wd(B,G,we);if(ke.state==="hasValue")return ke.contents;if(ke.state==="loading"){const De=`Getting value of asynchronous atom or selector "${we}" in a pending state while setting selector "${n}" is not yet supported.`;throw Ae(De)}else throw ke.contents}function ue(we,ke){if(Y)throw Ae("Recoil: Async selector sets are not currently supported.");const De=typeof ke=="function"?ke(ge(we)):ke;Zq(B,G,we.key,De).forEach((bt,gt)=>pe.set(gt,bt))}function Re(we){ue(we,eW)}const Ie=o({set:ue,get:ge,reset:Re},re);if(Ie!==void 0)throw Ge(Ie)?Ae("Recoil: Async selector sets are not currently supported."):Ae("Recoil: selector set should be a void function.");return Y=!0,pe},init:f,invalidate:W,clearCache:Q,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l}):t=iw({key:n,nodeType:"selector",peek:V,get:q,init:f,invalidate:W,clearCache:Q,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}yN.value=e=>new gN(e);var Xa=yN;const{isLoadable:lW,loadableWithError:sg,loadableWithPromise:ag,loadableWithValue:zs}=$c,{WrappedValue:vN}=fN,{peekNodeInfo:uW}=Ro,{DEFAULT_VALUE:jo,DefaultValue:ji,getConfigDeletionHandler:_N,registerNode:cW,setConfigDeletionHandler:dW}=xn,{isRecoilValue:fW}=Ka,{getRecoilValueAsLoadable:hW,markRecoilValueModified:pW,setRecoilValue:sw,setRecoilValueLoadable:gW}=Vr,{retainedByOptionWithDefault:mW}=$s,Vl=e=>e instanceof vN?e.value:e;function yW(e){const{key:t,persistence_UNSTABLE:n}=e,r=mW(e.retainedBy_UNSTABLE);let i=0;function o(g){return ag(g.then(v=>(s=zs(v),v)).catch(v=>{throw s=sg(v),v}))}let s=Ge(e.default)?o(e.default):lW(e.default)?e.default.state==="loading"?o(e.default.contents):e.default:zs(Vl(e.default));s.contents;let a;const l=new Map;function u(g){return g}function c(g,v){const x=v.then(S=>{var w,E;return((E=((w=g.getState().nextTree)!==null&&w!==void 0?w:g.getState().currentTree).atomValues.get(t))===null||E===void 0?void 0:E.contents)===x&&sw(g,m,S),S}).catch(S=>{var w,E;throw((E=((w=g.getState().nextTree)!==null&&w!==void 0?w:g.getState().currentTree).atomValues.get(t))===null||E===void 0?void 0:E.contents)===x&&gW(g,m,sg(S)),S});return x}function d(g,v,x){var S;i++;const w=()=>{var R;i--,(R=l.get(g))===null||R===void 0||R.forEach(M=>M()),l.delete(g)};if(g.getState().knownAtoms.add(t),s.state==="loading"){const R=()=>{var M;((M=g.getState().nextTree)!==null&&M!==void 0?M:g.getState().currentTree).atomValues.has(t)||pW(g,m)};s.contents.finally(R)}const E=(S=e.effects)!==null&&S!==void 0?S:e.effects_UNSTABLE;if(E!=null){let R=function(W){if(O&&W.key===t){const Q=T;return Q instanceof ji?f(g,v):Ge(Q)?ag(Q.then(N=>N instanceof ji?s.toPromise():N)):zs(Q)}return hW(g,W)},M=function(W){return R(W).toPromise()},$=function(W){var Q;const N=uW(g,(Q=g.getState().nextTree)!==null&&Q!==void 0?Q:g.getState().currentTree,W.key);return O&&W.key===t&&!(T instanceof ji)?{...N,isSet:!0,loadable:R(W)}:N},T=jo,O=!0,I=!1,H=null;const K=W=>Q=>{if(O){const N=R(m),B=N.state==="hasValue"?N.contents:jo;T=typeof Q=="function"?Q(B):Q,Ge(T)&&(T=T.then(G=>(H={effect:W,value:G},G)))}else{if(Ge(Q))throw Ae("Setting atoms to async values is not implemented.");typeof Q!="function"&&(H={effect:W,value:Vl(Q)}),sw(g,m,typeof Q=="function"?N=>{const B=Vl(Q(N));return H={effect:W,value:B},B}:Vl(Q))}},V=W=>()=>K(W)(jo),q=W=>Q=>{var N;const{release:B}=g.subscribeToTransactions(G=>{var re;let{currentTree:Y,previousTree:pe}=G.getState();pe||(pe=Y);const ge=(re=Y.atomValues.get(t))!==null&&re!==void 0?re:s;if(ge.state==="hasValue"){var ue,Re,Ie,we;const ke=ge.contents,De=(ue=pe.atomValues.get(t))!==null&&ue!==void 0?ue:s,In=De.state==="hasValue"?De.contents:jo;((Re=H)===null||Re===void 0?void 0:Re.effect)!==W||((Ie=H)===null||Ie===void 0?void 0:Ie.value)!==ke?Q(ke,In,!Y.atomValues.has(t)):((we=H)===null||we===void 0?void 0:we.effect)===W&&(H=null)}},t);l.set(g,[...(N=l.get(g))!==null&&N!==void 0?N:[],B])};for(const W of E)try{const Q=W({node:m,storeID:g.storeID,parentStoreID_UNSTABLE:g.parentStoreID,trigger:x,setSelf:K(W),resetSelf:V(W),onSet:q(W),getPromise:M,getLoadable:R,getInfo_UNSTABLE:$});if(Q!=null){var A;l.set(g,[...(A=l.get(g))!==null&&A!==void 0?A:[],Q])}}catch(Q){T=Q,I=!0}if(O=!1,!(T instanceof ji)){var k;const W=I?sg(T):Ge(T)?ag(c(g,T)):zs(Vl(T));W.contents,v.atomValues.set(t,W),(k=g.getState().nextTree)===null||k===void 0||k.atomValues.set(t,W)}}return w}function f(g,v){var x,S;return(x=(S=v.atomValues.get(t))!==null&&S!==void 0?S:a)!==null&&x!==void 0?x:s}function h(g,v){if(v.atomValues.has(t))return Ze(v.atomValues.get(t));if(v.nonvalidatedAtoms.has(t)){if(a!=null)return a;if(n==null)return s;const x=v.nonvalidatedAtoms.get(t),S=n.validator(x,jo);return a=S instanceof ji?s:zs(S),a}else return s}function p(){a=void 0}function y(g,v,x){if(v.atomValues.has(t)){const S=Ze(v.atomValues.get(t));if(S.state==="hasValue"&&x===S.contents)return new Map}else if(!v.nonvalidatedAtoms.has(t)&&x instanceof ji)return new Map;return a=void 0,new Map().set(t,zs(x))}function _(){return _N(t)!==void 0&&i<=0}const m=cW({key:t,nodeType:"atom",peek:f,get:h,set:y,init:d,invalidate:p,shouldDeleteConfigOnRelease:_,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return m}function o5(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return fW(n)?vW({...t,default:n}):yW({...t,default:n})}function vW(e){const t=o5({...e,default:jo,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof ji?r:Ze(e.persistence_UNSTABLE).validator(r,jo)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Xa({key:`${e.key}__withFallback`,get:({get:r})=>{const i=r(t);return i instanceof ji?e.default:i},set:({set:r},i)=>r(t,i),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return dW(n.key,_N(e.key)),n}o5.value=e=>new vN(e);var xN=o5;class _W{constructor(t){var n;Ce(this,"_map",void 0),Ce(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t==null?void 0:t.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var xW={MapCache:_W},SW=xW.MapCache,wW=Object.freeze({__proto__:null,MapCache:SW});const{LRUCache:aw}=pN,{MapCache:bW}=wW,Ed={equality:"reference",eviction:"none",maxSize:1/0};function EW({equality:e=Ed.equality,eviction:t=Ed.eviction,maxSize:n=Ed.maxSize}=Ed){const r=CW(e);return AW(t,n,r)}function CW(e){switch(e){case"reference":return t=>t;case"value":return t=>F0(t)}throw Ae(`Unrecognized equality policy ${e}`)}function AW(e,t,n){switch(e){case"keep-all":return new bW({mapKey:n});case"lru":return new aw({mapKey:n,maxSize:Ze(t)});case"most-recent":return new aw({mapKey:n,maxSize:1})}throw Ae(`Unrecognized eviction policy ${e}`)}var SN=EW;const{setConfigDeletionHandler:RW}=xn;function $W(e){var t,n;const r=SN({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var o,s;const a=r.get(i);if(a!=null)return a;const{cachePolicyForParams_UNSTABLE:l,...u}=e,c="default"in e?e.default:new Promise(()=>{}),d=xN({...u,key:`${e.key}__${(o=F0(i))!==null&&o!==void 0?o:"void"}`,default:typeof c=="function"?c(i):c,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE,effects:typeof e.effects=="function"?e.effects(i):typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(i):(s=e.effects)!==null&&s!==void 0?s:e.effects_UNSTABLE});return r.set(i,d),RW(d.key,()=>{r.delete(i)}),d}}var TW=$W;const{setConfigDeletionHandler:kW}=xn;let MW=0;function NW(e){var t,n;const r=SN({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var o;let s;try{s=r.get(i)}catch(f){throw Ae(`Problem with cache lookup for selector ${e.key}: ${f.message}`)}if(s!=null)return s;const a=`${e.key}__selectorFamily/${(o=F0(i,{allowFunctions:!0}))!==null&&o!==void 0?o:"void"}/${MW++}`,l=f=>e.get(i)(f),u=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE;let d;if(e.set!=null){const f=e.set;d=Xa({key:a,get:l,set:(p,y)=>f(i)(p,y),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else d=Xa({key:a,get:l,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return r.set(i,d),kW(d.key,()=>{r.delete(i)}),d}}var $o=NW;const LW=$o({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function PW(e){return LW(e)}var IW=PW;const OW=$o({key:"__error",get:e=>()=>{throw Ae(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function DW(e){return OW(e)}var jW=DW;function FW(e){return e}var UW=FW;const{loadableWithError:wN,loadableWithPromise:bN,loadableWithValue:EN}=$c;function U0(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[i,o]of t.entries())try{n[i]=e(o)}catch(s){r[i]=s}return[n,r]}function VW(e){return e!=null&&!Ge(e)}function V0(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function yy(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,i)=>({...n,[r]:t[i]}),{})}function _a(e,t,n){const r=n.map((i,o)=>i==null?EN(t[o]):Ge(i)?bN(i):wN(i));return yy(e,r)}function zW(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const BW=$o({key:"__waitForNone",get:e=>({get:t})=>{const n=V0(e),[r,i]=U0(t,n);return _a(e,r,i)},dangerouslyAllowMutability:!0}),HW=$o({key:"__waitForAny",get:e=>({get:t})=>{const n=V0(e),[r,i]=U0(t,n);return i.some(o=>!Ge(o))?_a(e,r,i):new Promise(o=>{for(const[s,a]of i.entries())Ge(a)&&a.then(l=>{r[s]=l,i[s]=void 0,o(_a(e,r,i))}).catch(l=>{i[s]=l,o(_a(e,r,i))})})},dangerouslyAllowMutability:!0}),qW=$o({key:"__waitForAll",get:e=>({get:t})=>{const n=V0(e),[r,i]=U0(t,n);if(i.every(s=>s==null))return yy(e,r);const o=i.find(VW);if(o!=null)throw o;return Promise.all(i).then(s=>yy(e,zW(r,s)))},dangerouslyAllowMutability:!0}),WW=$o({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=V0(e),[r,i]=U0(t,n);return i.every(o=>!Ge(o))?_a(e,r,i):Promise.all(i.map((o,s)=>Ge(o)?o.then(a=>{r[s]=a,i[s]=void 0}).catch(a=>{r[s]=void 0,i[s]=a}):null)).then(()=>_a(e,r,i))},dangerouslyAllowMutability:!0}),GW=$o({key:"__noWait",get:e=>({get:t})=>{try{return Xa.value(EN(t(e)))}catch(n){return Xa.value(Ge(n)?bN(n):wN(n))}},dangerouslyAllowMutability:!0});var KW={waitForNone:BW,waitForAny:HW,waitForAll:qW,waitForAllSettled:WW,noWait:GW};const{RecoilLoadable:YW}=$c,{DefaultValue:QW}=xn,{RecoilRoot:XW,useRecoilStoreID:ZW}=Ei,{isRecoilValue:JW}=Ka,{retentionZone:eG}=$0,{freshSnapshot:tG}=P0,{useRecoilState:nG,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:rG,useRecoilStateLoadable:iG,useRecoilValue:oG,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:sG,useRecoilValueLoadable:aG,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:lG,useResetRecoilState:uG,useSetRecoilState:cG}=xH,{useGotoRecoilSnapshot:dG,useRecoilSnapshot:fG,useRecoilTransactionObserver:hG}=aN,{useRecoilCallback:pG}=dN,{noWait:gG,waitForAll:mG,waitForAllSettled:yG,waitForAny:vG,waitForNone:_G}=KW;var s5={DefaultValue:QW,isRecoilValue:JW,RecoilLoadable:YW,RecoilEnv:hl,RecoilRoot:XW,useRecoilStoreID:ZW,useRecoilBridgeAcrossReactRoots_UNSTABLE:GH,atom:xN,selector:Xa,atomFamily:TW,selectorFamily:$o,constSelector:IW,errorSelector:jW,readOnlySelector:UW,noWait:gG,waitForNone:_G,waitForAny:vG,waitForAll:mG,waitForAllSettled:yG,useRecoilValue:oG,useRecoilValueLoadable:aG,useRecoilState:nG,useRecoilStateLoadable:iG,useSetRecoilState:cG,useResetRecoilState:uG,useGetRecoilValueInfo_UNSTABLE:VH,useRecoilRefresher_UNSTABLE:wq,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:lG,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:sG,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:rG,useRecoilCallback:pG,useRecoilTransaction_UNSTABLE:Rq,useGotoRecoilSnapshot:dG,useRecoilSnapshot:fG,useRecoilTransactionObserver_UNSTABLE:hG,snapshot_UNSTABLE:tG,useRetain:e5,retentionZone:eG},xG=s5.RecoilRoot,CN=s5.atom,lw=s5.useRecoilState,Pc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vs=typeof window>"u"||"Deno"in globalThis;function Un(){}function SG(e,t){return typeof e=="function"?e(t):e}function vy(e){return typeof e=="number"&&e>=0&&e!==1/0}function AN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xa(e,t){return typeof e=="function"?e(t):e}function ur(e,t){return typeof e=="function"?e(t):e}function uw(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==a5(s,t.options))return!1}else if(!ec(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||o&&!o(t))}function cw(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Ju(t.options.mutationKey)!==Ju(o))return!1}else if(!ec(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function a5(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ju)(e)}function Ju(e){return JSON.stringify(e,(t,n)=>xy(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ec(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ec(e[n],t[n])):!1}function RN(e,t){if(e===t)return e;const n=dw(e)&&dw(t);if(n||xy(e)&&xy(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{};let l=0;for(let u=0;u{setTimeout(t,e)})}function Sy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?RN(e,t):t}function bG(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function EG(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var $N=Symbol();function TN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===$N?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Go,Wi,Ca,mT,CG=(mT=class extends Pc{constructor(){super();Se(this,Go);Se(this,Wi);Se(this,Ca);he(this,Ca,t=>{if(!vs&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,Wi)||this.setEventListener(P(this,Ca))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Wi))==null||t.call(this),he(this,Wi,void 0))}setEventListener(t){var n;he(this,Ca,t),(n=P(this,Wi))==null||n.call(this),he(this,Wi,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,Go)!==t&&(he(this,Go,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof P(this,Go)=="boolean"?P(this,Go):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Go=new WeakMap,Wi=new WeakMap,Ca=new WeakMap,mT),l5=new CG,Aa,Gi,Ra,yT,AG=(yT=class extends Pc{constructor(){super();Se(this,Aa,!0);Se(this,Gi);Se(this,Ra);he(this,Ra,t=>{if(!vs&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,Gi)||this.setEventListener(P(this,Ra))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Gi))==null||t.call(this),he(this,Gi,void 0))}setEventListener(t){var n;he(this,Ra,t),(n=P(this,Gi))==null||n.call(this),he(this,Gi,t(this.setOnline.bind(this)))}setOnline(t){P(this,Aa)!==t&&(he(this,Aa,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,Aa)}},Aa=new WeakMap,Gi=new WeakMap,Ra=new WeakMap,yT),ah=new AG;function wy(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function RG(e){return Math.min(1e3*2**e,3e4)}function kN(e){return(e??"online")==="online"?ah.isOnline():!0}var MN=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function lg(e){return e instanceof MN}function NN(e){let t=!1,n=0,r=!1,i;const o=wy(),s=y=>{var _;r||(f(new MN(y)),(_=e.abort)==null||_.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>l5.isFocused()&&(e.networkMode==="always"||ah.isOnline())&&e.canRun(),c=()=>kN(e.networkMode)&&e.canRun(),d=y=>{var _;r||(r=!0,(_=e.onSuccess)==null||_.call(e,y),i==null||i(),o.resolve(y))},f=y=>{var _;r||(r=!0,(_=e.onError)==null||_.call(e,y),i==null||i(),o.reject(y))},h=()=>new Promise(y=>{var _;i=m=>{(r||u())&&y(m)},(_=e.onPause)==null||_.call(e)}).then(()=>{var y;i=void 0,r||(y=e.onContinue)==null||y.call(e)}),p=()=>{if(r)return;let y;const _=n===0?e.initialPromise:void 0;try{y=_??e.fn()}catch(m){y=Promise.reject(m)}Promise.resolve(y).then(d).catch(m=>{var w;if(r)return;const g=e.retry??(vs?0:3),v=e.retryDelay??RG,x=typeof v=="function"?v(n,m):v,S=g===!0||typeof g=="number"&&nu()?void 0:h()).then(()=>{t?f(m):p()})})};return{promise:o,cancel:s,continue:()=>(i==null||i(),o),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?p():h().then(p),o)}}function $G(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const o=a=>{t?e.push(a):i(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Mt=$G(),Ko,vT,LN=(vT=class{constructor(){Se(this,Ko)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vy(this.gcTime)&&he(this,Ko,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vs?1/0:5*60*1e3))}clearGcTimeout(){P(this,Ko)&&(clearTimeout(P(this,Ko)),he(this,Ko,void 0))}},Ko=new WeakMap,vT),$a,Ta,Fn,Ft,yc,Yo,or,Yr,_T,TG=(_T=class extends LN{constructor(t){super();Se(this,or);Se(this,$a);Se(this,Ta);Se(this,Fn);Se(this,Ft);Se(this,yc);Se(this,Yo);he(this,Yo,!1),he(this,yc,t.defaultOptions),this.setOptions(t.options),this.observers=[],he(this,Fn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,he(this,$a,kG(this.options)),this.state=t.state??P(this,$a),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,Ft))==null?void 0:t.promise}setOptions(t){this.options={...P(this,yc),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,Fn).remove(this)}setData(t,n){const r=Sy(this.state.data,t,this.options);return Me(this,or,Yr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Me(this,or,Yr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=P(this,Ft))==null?void 0:r.promise;return(i=P(this,Ft))==null||i.cancel(t),n?n.then(Un).catch(Un):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,$a))}isActive(){return this.observers.some(t=>ur(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!AN(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Ft))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Ft))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,Fn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(P(this,Ft)&&(P(this,Yo)?P(this,Ft).cancel({revert:!0}):P(this,Ft).cancelRetry()),this.scheduleGc()),P(this,Fn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,or,Yr).call(this,{type:"invalidate"})}fetch(t,n){var l,u,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,Ft))return P(this,Ft).continueRetry(),P(this,Ft).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(he(this,Yo,!0),r.signal)})},o=()=>{const d=TN(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),he(this,Yo,!1),this.options.persister?this.options.persister(d,f,this):d(f)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(s),(l=this.options.behavior)==null||l.onFetch(s,this),he(this,Ta,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&Me(this,or,Yr).call(this,{type:"fetch",meta:(c=s.fetchOptions)==null?void 0:c.meta});const a=d=>{var f,h,p,y;lg(d)&&d.silent||Me(this,or,Yr).call(this,{type:"error",error:d}),lg(d)||((h=(f=P(this,Fn).config).onError)==null||h.call(f,d,this),(y=(p=P(this,Fn).config).onSettled)==null||y.call(p,this.state.data,d,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return he(this,Ft,NN({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,h,p,y;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(_){a(_);return}(h=(f=P(this,Fn).config).onSuccess)==null||h.call(f,d,this),(y=(p=P(this,Fn).config).onSettled)==null||y.call(p,d,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:a,onFail:(d,f)=>{Me(this,or,Yr).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{Me(this,or,Yr).call(this,{type:"pause"})},onContinue:()=>{Me(this,or,Yr).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),P(this,Ft).start()}},$a=new WeakMap,Ta=new WeakMap,Fn=new WeakMap,Ft=new WeakMap,yc=new WeakMap,Yo=new WeakMap,or=new WeakSet,Yr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...PN(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return lg(i)&&i.revert&&P(this,Ta)?{...P(this,Ta),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Mt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,Fn).notify({query:this,type:"updated",action:t})})},_T);function PN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kG(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Cr,xT,MG=(xT=class extends Pc{constructor(t={}){super();Se(this,Cr);this.config=t,he(this,Cr,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??a5(i,n);let s=this.get(o);return s||(s=new TG({cache:this,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){P(this,Cr).has(t.queryHash)||(P(this,Cr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,Cr).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,Cr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Mt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,Cr).get(t)}getAll(){return[...P(this,Cr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>uw(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>uw(t,r)):n}notify(t){Mt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Mt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Mt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Cr=new WeakMap,xT),Ar,qt,Qo,Rr,Ni,ST,NG=(ST=class extends LN{constructor(t){super();Se(this,Rr);Se(this,Ar);Se(this,qt);Se(this,Qo);this.mutationId=t.mutationId,he(this,qt,t.mutationCache),he(this,Ar,[]),this.state=t.state||LG(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,Ar).includes(t)||(P(this,Ar).push(t),this.clearGcTimeout(),P(this,qt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){he(this,Ar,P(this,Ar).filter(n=>n!==t)),this.scheduleGc(),P(this,qt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,Ar).length||(this.state.status==="pending"?this.scheduleGc():P(this,qt).remove(this))}continue(){var t;return((t=P(this,Qo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,s,a,l,u,c,d,f,h,p,y,_,m,g,v,x,S,w,E;he(this,Qo,NN({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,k)=>{Me(this,Rr,Ni).call(this,{type:"failed",failureCount:A,error:k})},onPause:()=>{Me(this,Rr,Ni).call(this,{type:"pause"})},onContinue:()=>{Me(this,Rr,Ni).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,qt).canRun(this)}));const n=this.state.status==="pending",r=!P(this,Qo).canStart();try{if(!n){Me(this,Rr,Ni).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(i=P(this,qt).config).onMutate)==null?void 0:o.call(i,t,this));const k=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t));k!==this.state.context&&Me(this,Rr,Ni).call(this,{type:"pending",context:k,variables:t,isPaused:r})}const A=await P(this,Qo).start();return await((u=(l=P(this,qt).config).onSuccess)==null?void 0:u.call(l,A,t,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,A,t,this.state.context)),await((h=(f=P(this,qt).config).onSettled)==null?void 0:h.call(f,A,null,this.state.variables,this.state.context,this)),await((y=(p=this.options).onSettled)==null?void 0:y.call(p,A,null,t,this.state.context)),Me(this,Rr,Ni).call(this,{type:"success",data:A}),A}catch(A){try{throw await((m=(_=P(this,qt).config).onError)==null?void 0:m.call(_,A,t,this.state.context,this)),await((v=(g=this.options).onError)==null?void 0:v.call(g,A,t,this.state.context)),await((S=(x=P(this,qt).config).onSettled)==null?void 0:S.call(x,void 0,A,this.state.variables,this.state.context,this)),await((E=(w=this.options).onSettled)==null?void 0:E.call(w,void 0,A,t,this.state.context)),A}finally{Me(this,Rr,Ni).call(this,{type:"error",error:A})}}finally{P(this,qt).runNext(this)}}},Ar=new WeakMap,qt=new WeakMap,Qo=new WeakMap,Rr=new WeakSet,Ni=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Mt.batch(()=>{P(this,Ar).forEach(r=>{r.onMutationUpdate(t)}),P(this,qt).notify({mutation:this,type:"updated",action:t})})},ST);function LG(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Cn,vc,wT,PG=(wT=class extends Pc{constructor(t={}){super();Se(this,Cn);Se(this,vc);this.config=t,he(this,Cn,new Map),he(this,vc,Date.now())}build(t,n,r){const i=new NG({mutationCache:this,mutationId:++nd(this,vc)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Cd(t),r=P(this,Cn).get(n)??[];r.push(t),P(this,Cn).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Cd(t);if(P(this,Cn).has(n)){const i=(r=P(this,Cn).get(n))==null?void 0:r.filter(o=>o!==t);i&&(i.length===0?P(this,Cn).delete(n):P(this,Cn).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=P(this,Cn).get(Cd(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=P(this,Cn).get(Cd(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Mt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...P(this,Cn).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>cw(n,r))}findAll(t={}){return this.getAll().filter(n=>cw(t,n))}notify(t){Mt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Mt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Un))))}},Cn=new WeakMap,vc=new WeakMap,wT);function Cd(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function hw(e){return{onFetch:(t,n)=>{var c,d,f,h,p;const r=t.options,i=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],s=((p=t.state.data)==null?void 0:p.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const _=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},m=TN(t.options,t.fetchOptions),g=async(v,x,S)=>{if(y)return Promise.reject();if(x==null&&v.pages.length)return Promise.resolve(v);const w={queryKey:t.queryKey,pageParam:x,direction:S?"backward":"forward",meta:t.options.meta};_(w);const E=await m(w),{maxPages:A}=t.options,k=S?EG:bG;return{pages:k(v.pages,E,A),pageParams:k(v.pageParams,x,A)}};if(i&&o.length){const v=i==="backward",x=v?IG:pw,S={pages:o,pageParams:s},w=x(r,S);a=await g(S,w,v)}else{const v=e??o.length;do{const x=l===0?s[0]??r.initialPageParam:pw(r,a);if(l>0&&x==null)break;a=await g(a,x),l++}while(l{var y,_;return(_=(y=t.options).persister)==null?void 0:_.call(y,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function pw(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function IG(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var rt,Ki,Yi,ka,Ma,Qi,Na,La,bT,OG=(bT=class{constructor(e={}){Se(this,rt);Se(this,Ki);Se(this,Yi);Se(this,ka);Se(this,Ma);Se(this,Qi);Se(this,Na);Se(this,La);he(this,rt,e.queryCache||new MG),he(this,Ki,e.mutationCache||new PG),he(this,Yi,e.defaultOptions||{}),he(this,ka,new Map),he(this,Ma,new Map),he(this,Qi,0)}mount(){nd(this,Qi)._++,P(this,Qi)===1&&(he(this,Na,l5.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,rt).onFocus())})),he(this,La,ah.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,rt).onOnline())})))}unmount(){var e,t;nd(this,Qi)._--,P(this,Qi)===0&&((e=P(this,Na))==null||e.call(this),he(this,Na,void 0),(t=P(this,La))==null||t.call(this),he(this,La,void 0))}isFetching(e){return P(this,rt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,Ki).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,rt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=P(this,rt).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(xa(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return P(this,rt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=P(this,rt).get(r.queryHash),o=i==null?void 0:i.state.data,s=SG(t,o);if(s!==void 0)return P(this,rt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Mt.batch(()=>P(this,rt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,rt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=P(this,rt);Mt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,rt),r={type:"active",...e};return Mt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Mt.batch(()=>P(this,rt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Un).catch(Un)}invalidateQueries(e={},t={}){return Mt.batch(()=>{if(P(this,rt).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Mt.batch(()=>P(this,rt).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Un)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Un)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=P(this,rt).build(this,t);return n.isStaleByTime(xa(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Un).catch(Un)}fetchInfiniteQuery(e){return e.behavior=hw(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Un).catch(Un)}ensureInfiniteQueryData(e){return e.behavior=hw(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ah.isOnline()?P(this,Ki).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,rt)}getMutationCache(){return P(this,Ki)}getDefaultOptions(){return P(this,Yi)}setDefaultOptions(e){he(this,Yi,e)}setQueryDefaults(e,t){P(this,ka).set(Ju(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,ka).values()];let n={};return t.forEach(r=>{ec(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){P(this,Ma).set(Ju(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,Ma).values()];let n={};return t.forEach(r=>{ec(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,Yi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=a5(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===$N&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,Yi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,rt).clear(),P(this,Ki).clear()}},rt=new WeakMap,Ki=new WeakMap,Yi=new WeakMap,ka=new WeakMap,Ma=new WeakMap,Qi=new WeakMap,Na=new WeakMap,La=new WeakMap,bT),an,Ne,_c,Wt,Xo,Pa,Xi,$r,xc,Ia,Oa,Zo,Jo,Zi,Da,Fe,ru,by,Ey,Cy,Ay,Ry,$y,Ty,IN,ET,DG=(ET=class extends Pc{constructor(t,n){super();Se(this,Fe);Se(this,an);Se(this,Ne);Se(this,_c);Se(this,Wt);Se(this,Xo);Se(this,Pa);Se(this,Xi);Se(this,$r);Se(this,xc);Se(this,Ia);Se(this,Oa);Se(this,Zo);Se(this,Jo);Se(this,Zi);Se(this,Da,new Set);this.options=n,he(this,an,t),he(this,$r,null),he(this,Xi,wy()),this.options.experimental_prefetchInRender||P(this,Xi).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,Ne).addObserver(this),gw(P(this,Ne),this.options)?Me(this,Fe,ru).call(this):this.updateResult(),Me(this,Fe,Ay).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ky(P(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ky(P(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Me(this,Fe,Ry).call(this),Me(this,Fe,$y).call(this),P(this,Ne).removeObserver(this)}setOptions(t,n){const r=this.options,i=P(this,Ne);if(this.options=P(this,an).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ur(this.options.enabled,P(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Me(this,Fe,Ty).call(this),P(this,Ne).setOptions(this.options),r._defaulted&&!_y(this.options,r)&&P(this,an).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,Ne),observer:this});const o=this.hasListeners();o&&mw(P(this,Ne),i,this.options,r)&&Me(this,Fe,ru).call(this),this.updateResult(n),o&&(P(this,Ne)!==i||ur(this.options.enabled,P(this,Ne))!==ur(r.enabled,P(this,Ne))||xa(this.options.staleTime,P(this,Ne))!==xa(r.staleTime,P(this,Ne)))&&Me(this,Fe,by).call(this);const s=Me(this,Fe,Ey).call(this);o&&(P(this,Ne)!==i||ur(this.options.enabled,P(this,Ne))!==ur(r.enabled,P(this,Ne))||s!==P(this,Zi))&&Me(this,Fe,Cy).call(this,s)}getOptimisticResult(t){const n=P(this,an).getQueryCache().build(P(this,an),t),r=this.createResult(n,t);return FG(this,r)&&(he(this,Wt,r),he(this,Pa,this.options),he(this,Xo,P(this,Ne).state)),r}getCurrentResult(){return P(this,Wt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){P(this,Da).add(t)}getCurrentQuery(){return P(this,Ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=P(this,an).defaultQueryOptions(t),r=P(this,an).getQueryCache().build(P(this,an),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Me(this,Fe,ru).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,Wt)))}createResult(t,n){var E;const r=P(this,Ne),i=this.options,o=P(this,Wt),s=P(this,Xo),a=P(this,Pa),u=t!==r?t.state:P(this,_c),{state:c}=t;let d={...c},f=!1,h;if(n._optimisticResults){const A=this.hasListeners(),k=!A&&gw(t,n),R=A&&mw(t,r,n,i);(k||R)&&(d={...d,...PN(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:y,status:_}=d;if(n.select&&d.data!==void 0)if(o&&d.data===(s==null?void 0:s.data)&&n.select===P(this,xc))h=P(this,Ia);else try{he(this,xc,n.select),h=n.select(d.data),h=Sy(o==null?void 0:o.data,h,n),he(this,Ia,h),he(this,$r,null)}catch(A){he(this,$r,A)}else h=d.data;if(n.placeholderData!==void 0&&h===void 0&&_==="pending"){let A;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))A=o.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((E=P(this,Oa))==null?void 0:E.state.data,P(this,Oa)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),he(this,$r,null)}catch(k){he(this,$r,k)}A!==void 0&&(_="success",h=Sy(o==null?void 0:o.data,A,n),f=!0)}P(this,$r)&&(p=P(this,$r),h=P(this,Ia),y=Date.now(),_="error");const m=d.fetchStatus==="fetching",g=_==="pending",v=_==="error",x=g&&m,S=h!==void 0;return{status:_,fetchStatus:d.fetchStatus,isPending:g,isSuccess:_==="success",isError:v,isInitialLoading:x,isLoading:x,data:h,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:y,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:m,isRefetching:m&&!g,isLoadingError:v&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:v&&S,isStale:u5(t,n),refetch:this.refetch,promise:P(this,Xi)}}updateResult(t){const n=P(this,Wt),r=this.createResult(P(this,Ne),this.options);if(he(this,Xo,P(this,Ne).state),he(this,Pa,this.options),P(this,Xo).data!==void 0&&he(this,Oa,P(this,Ne)),_y(r,n))return;if(this.options.experimental_prefetchInRender){const s=u=>{r.status==="error"?u.reject(r.error):r.data!==void 0&&u.resolve(r.data)},a=()=>{const u=he(this,Xi,r.promise=wy());s(u)},l=P(this,Xi);switch(l.status){case"pending":s(l);break;case"fulfilled":(r.status==="error"||r.data!==l.value)&&a();break;case"rejected":(r.status!=="error"||r.error!==l.reason)&&a();break}}he(this,Wt,r);const i={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!P(this,Da).size)return!0;const l=new Set(a??P(this,Da));return this.options.throwOnError&&l.add("error"),Object.keys(P(this,Wt)).some(u=>{const c=u;return P(this,Wt)[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),Me(this,Fe,IN).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Me(this,Fe,Ay).call(this)}},an=new WeakMap,Ne=new WeakMap,_c=new WeakMap,Wt=new WeakMap,Xo=new WeakMap,Pa=new WeakMap,Xi=new WeakMap,$r=new WeakMap,xc=new WeakMap,Ia=new WeakMap,Oa=new WeakMap,Zo=new WeakMap,Jo=new WeakMap,Zi=new WeakMap,Da=new WeakMap,Fe=new WeakSet,ru=function(t){Me(this,Fe,Ty).call(this);let n=P(this,Ne).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Un)),n},by=function(){Me(this,Fe,Ry).call(this);const t=xa(this.options.staleTime,P(this,Ne));if(vs||P(this,Wt).isStale||!vy(t))return;const r=AN(P(this,Wt).dataUpdatedAt,t)+1;he(this,Zo,setTimeout(()=>{P(this,Wt).isStale||this.updateResult()},r))},Ey=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,Ne)):this.options.refetchInterval)??!1},Cy=function(t){Me(this,Fe,$y).call(this),he(this,Zi,t),!(vs||ur(this.options.enabled,P(this,Ne))===!1||!vy(P(this,Zi))||P(this,Zi)===0)&&he(this,Jo,setInterval(()=>{(this.options.refetchIntervalInBackground||l5.isFocused())&&Me(this,Fe,ru).call(this)},P(this,Zi)))},Ay=function(){Me(this,Fe,by).call(this),Me(this,Fe,Cy).call(this,Me(this,Fe,Ey).call(this))},Ry=function(){P(this,Zo)&&(clearTimeout(P(this,Zo)),he(this,Zo,void 0))},$y=function(){P(this,Jo)&&(clearInterval(P(this,Jo)),he(this,Jo,void 0))},Ty=function(){const t=P(this,an).getQueryCache().build(P(this,an),this.options);if(t===P(this,Ne))return;const n=P(this,Ne);he(this,Ne,t),he(this,_c,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},IN=function(t){Mt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(P(this,Wt))}),P(this,an).getQueryCache().notify({query:P(this,Ne),type:"observerResultsUpdated"})})},ET);function jG(e,t){return ur(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function gw(e,t){return jG(e,t)||e.state.data!==void 0&&ky(e,t,t.refetchOnMount)}function ky(e,t,n){if(ur(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&u5(e,t)}return!1}function mw(e,t,n,r){return(e!==t||ur(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&u5(e,n)}function u5(e,t){return ur(t.enabled,e)!==!1&&e.isStaleByTime(xa(t.staleTime,e))}function FG(e,t){return!_y(e.getCurrentResult(),t)}var ON=U.createContext(void 0),UG=e=>{const t=U.useContext(ON);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},VG=({client:e,children:t})=>(U.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),C.jsx(ON.Provider,{value:e,children:t})),DN=U.createContext(!1),zG=()=>U.useContext(DN);DN.Provider;function BG(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var HG=U.createContext(BG()),qG=()=>U.useContext(HG);function WG(e,t){return typeof e=="function"?e(...t):!!e}function GG(){}var KG=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},YG=e=>{U.useEffect(()=>{e.clearReset()},[e])},QG=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&WG(n,[e.error,r]),XG=e=>{e.suspense&&(typeof e.staleTime!="number"&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},ZG=(e,t)=>e.isLoading&&e.isFetching&&!t,JG=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,yw=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function eK(e,t,n){var c,d,f,h,p;const r=UG(),i=zG(),o=qG(),s=r.defaultQueryOptions(e);(d=(c=r.getDefaultOptions().queries)==null?void 0:c._experimental_beforeQuery)==null||d.call(c,s),s._optimisticResults=i?"isRestoring":"optimistic",XG(s),KG(s,o),YG(o);const a=!r.getQueryState(e.queryKey),[l]=U.useState(()=>new t(r,s)),u=l.getOptimisticResult(s);if(U.useSyncExternalStore(U.useCallback(y=>{const _=i?()=>{}:l.subscribe(Mt.batchCalls(y));return l.updateResult(),_},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),U.useEffect(()=>{l.setOptions(s,{listeners:!1})},[s,l]),JG(s,u))throw yw(s,l,o);if(QG({result:u,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw u.error;if((h=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||h.call(f,s,u),s.experimental_prefetchInRender&&!vs&&ZG(u,i)){const y=a?yw(s,l,o):(p=r.getQueryCache().get(s.queryHash))==null?void 0:p.promise;y==null||y.catch(GG).finally(()=>{l.hasListeners()||l.updateResult()})}return s.notifyOnChangeProps?u:l.trackResult(u)}function c5(e,t){return eK(e,DG)}const jN="Starter App",tK="This field is required.",FN=8,nK=`Password must be at least ${FN} characters long`,UN={required:tK},rK={...UN,minLength:{value:FN,message:nK}},iK="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24'%20viewBox='0%200%2024%2024'%20width='24'%3e%3cpath%20fill='none'%20d='M0%200h24v24H0z'/%3e%3cpath%20d='M22%2012c0-5.52-4.48-10-10-10S2%206.48%202%2012c0%204.84%203.44%208.87%208%209.8V15H8v-3h2V9.5C10%207.57%2011.57%206%2013.5%206H16v3h-2c-.55%200-1%20.45-1%201v2h3v3h-3v6.95c5.05-.5%209-4.76%209-9.95z'/%3e%3c/svg%3e",oK="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.273%203.063c-.958.045-1.612.198-2.184.423a4.41%204.41%200%200%200-1.592%201.04%204.409%204.409%200%200%200-1.035%201.596c-.222.572-.372%201.227-.414%202.185-.042.958-.052%201.266-.047%203.71.005%202.444.016%202.75.062%203.71.046.958.198%201.612.423%202.184a4.41%204.41%200%200%200%201.04%201.592%204.4%204.4%200%200%200%201.597%201.035c.572.221%201.227.372%202.185.414.958.042%201.266.052%203.71.047%202.443-.005%202.75-.016%203.71-.061.96-.046%201.611-.199%202.183-.423a4.411%204.411%200%200%200%201.592-1.04%204.41%204.41%200%200%200%201.035-1.597c.222-.572.372-1.227.414-2.184.042-.96.052-1.268.047-3.711-.005-2.444-.016-2.75-.061-3.71-.046-.96-.198-1.612-.423-2.184a4.418%204.418%200%200%200-1.04-1.592%204.4%204.4%200%200%200-1.597-1.035c-.572-.221-1.227-.372-2.185-.414-.958-.041-1.266-.052-3.71-.047-2.444.005-2.75.015-3.71.062m.105%2016.27c-.878-.038-1.354-.184-1.672-.306a2.802%202.802%200%200%201-1.036-.671%202.772%202.772%200%200%201-.675-1.034c-.124-.317-.272-.793-.313-1.67-.045-.95-.054-1.234-.06-3.637-.004-2.403.005-2.687.046-3.636.038-.877.184-1.354.306-1.671.162-.421.357-.72.672-1.036a2.778%202.778%200%200%201%201.033-.675c.317-.124.793-.272%201.67-.313.95-.045%201.234-.054%203.637-.06%202.402-.005%202.687.004%203.637.046.876.038%201.354.183%201.67.306.421.162.72.357%201.037.671.316.315.511.613.675%201.034.124.317.271.792.313%201.67.045.95.055%201.234.06%203.636.004%202.402-.004%202.688-.046%203.636-.038.878-.184%201.354-.306%201.672a2.79%202.79%200%200%201-.672%201.036%202.78%202.78%200%200%201-1.033.675c-.317.124-.794.271-1.67.313-.95.045-1.234.054-3.637.06-2.403.005-2.687-.005-3.636-.046M15.715%207.19a1.08%201.08%200%201%200%202.16-.004%201.08%201.08%200%200%200-2.16.004m-8.336%204.819a4.62%204.62%200%201%200%209.242-.018%204.62%204.62%200%200%200-9.242.018M9%2012.006a3%203%200%201%201%206-.012%203%203%200%200%201-6%20.012'/%3e%3c/svg%3e",sK="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3ccircle%20cx='6.18'%20cy='17.82'%20r='2.18'/%3e%3cpath%20d='M4%204.44v2.83c7.03%200%2012.73%205.7%2012.73%2012.73h2.83c0-8.59-6.97-15.56-15.56-15.56zm0%205.66v2.83c3.9%200%207.07%203.17%207.07%207.07h2.83c0-5.47-4.43-9.9-9.9-9.9z'/%3e%3c/svg%3e",aK="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.912%207.925v.527A11.562%2011.562%200%200%201%208.265%2020.098%2011.443%2011.443%200%200%201%202%2018.265c.328.017.657.017.985%200a8.132%208.132%200%200%200%205.093-1.698%204.092%204.092%200%200%201-3.786-2.852c.255.062.518.091.781.085.36-.002.72-.047%201.07-.136a4.109%204.109%200%200%201-3.21-4.024c.566.32%201.202.494%201.851.51a4.126%204.126%200%200%201-1.34-5.518%2011.613%2011.613%200%200%200%208.488%204.295%204.397%204.397%200%200%201-.119-.934%204.092%204.092%200%200%201%204.092-4.092%204.04%204.04%200%200%201%203.005%201.29%207.929%207.929%200%200%200%202.53-1c-.3.953-.94%201.763-1.8%202.274A7.725%207.725%200%200%200%2022%205.803a8.489%208.489%200%200%201-2.088%202.122Z'%20fill-rule='evenodd'/%3e%3c/svg%3e",lK="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.816%205.389a2.469%202.469%200%200%201%201.766%201.746c.291%201.598.43%203.22.417%204.843a25.867%2025.867%200%200%201-.417%204.794%202.468%202.468%200%200%201-1.766%201.795c-2.593.318-5.204.46-7.816.429a58.411%2058.411%200%200%201-7.816-.429%202.469%202.469%200%200%201-1.766-1.746%2025.879%2025.879%200%200%201-.417-4.843%2025.85%2025.85%200%200%201%20.417-4.793%202.468%202.468%200%200%201%201.766-1.796c2.594-.3%205.205-.427%207.816-.379a58.413%2058.413%200%200%201%207.816.379ZM9.95%209.046v5.864l5.233-2.932L9.95%209.046Z'/%3e%3c/svg%3e",uK="/comet-starter/img/logo.png",cK=()=>{const e=t=>{t.preventDefault(),window.scrollTo(0,0)};return C.jsxs("footer",{className:"usa-footer",children:[C.jsx("div",{className:"grid-container usa-footer__return-to-top",children:C.jsx("a",{href:"/#",onClick:t=>{e(t)},children:"Return to top"})}),C.jsx("div",{className:"usa-footer__primary-section",children:C.jsx("nav",{className:"usa-footer__nav","aria-label":"Footer navigation",children:C.jsxs("ul",{className:"grid-row grid-gap",children:[C.jsx("li",{className:` + mobile-lg:grid-col-4 + desktop:grid-col-auto + usa-footer__primary-content + `,children:C.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),C.jsx("li",{className:` + mobile-lg:grid-col-4 + desktop:grid-col-auto + usa-footer__primary-content + `,children:C.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),C.jsx("li",{className:` + mobile-lg:grid-col-4 + desktop:grid-col-auto + usa-footer__primary-content + `,children:C.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),C.jsx("li",{className:` + mobile-lg:grid-col-4 + desktop:grid-col-auto + usa-footer__primary-content + `,children:C.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),C.jsx("li",{className:` + mobile-lg:grid-col-4 + desktop:grid-col-auto + usa-footer__primary-content + `,children:C.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})})]})})}),C.jsx("div",{className:"usa-footer__secondary-section",children:C.jsx("div",{className:"grid-container",children:C.jsxs("div",{className:"grid-row grid-gap",children:[C.jsxs("div",{className:` + usa-footer__logo + grid-row + mobile-lg:grid-col-6 mobile-lg:grid-gap-2 + `,children:[C.jsx("div",{className:"mobile-lg:grid-col-auto",children:C.jsx("img",{className:"usa-footer__logo-img",src:uK,alt:"US Flag"})}),C.jsx("div",{className:"mobile-lg:grid-col-auto",children:C.jsx("p",{className:"usa-footer__logo-heading",children:jN})})]}),C.jsxs("div",{className:"usa-footer__contact-links mobile-lg:grid-col-6",children:[C.jsxs("div",{className:"usa-footer__social-links grid-row grid-gap-1",children:[C.jsx("div",{className:"grid-col-auto",children:C.jsx("a",{className:"usa-social-link",href:"/#",children:C.jsx("img",{className:"usa-social-link__icon",src:iK,alt:"Facebook"})})}),C.jsx("div",{className:"grid-col-auto",children:C.jsx("a",{className:"usa-social-link",href:"/#",children:C.jsx("img",{className:"usa-social-link__icon",src:aK,alt:"Twitter"})})}),C.jsx("div",{className:"grid-col-auto",children:C.jsx("a",{className:"usa-social-link",href:"/#",children:C.jsx("img",{className:"usa-social-link__icon",src:lK,alt:"YouTube"})})}),C.jsx("div",{className:"grid-col-auto",children:C.jsx("a",{className:"usa-social-link",href:"/#",children:C.jsx("img",{className:"usa-social-link__icon",src:oK,alt:"Instagram"})})}),C.jsx("div",{className:"grid-col-auto",children:C.jsx("a",{className:"usa-social-link",href:"/#",children:C.jsx("img",{className:"usa-social-link__icon",src:sK,alt:"RSS"})})})]}),C.jsx("h2",{className:"usa-footer__contact-heading",children:""}),C.jsx("address",{className:"usa-footer__address",children:C.jsxs("div",{className:"usa-footer__contact-info grid-row grid-gap",children:[C.jsx("div",{className:"grid-col-auto",children:C.jsx("a",{href:"tel:1-800-555-5555",children:" <(800) 555-GOVT> "})}),C.jsx("div",{className:"grid-col-auto",children:C.jsx("a",{href:"mailto:",children:""})})]})})]})]})})})]})},dK=e=>e&&typeof e=="object"&&e.nodeType===1;var Ci=(e,t)=>{if(typeof e!="string")return[];(!t||!dK(t))&&(t=window.document);const n=t.querySelectorAll(e);return Array.prototype.slice.call(n)};/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var vw=Object.getOwnPropertySymbols,fK=Object.prototype.hasOwnProperty,hK=Object.prototype.propertyIsEnumerable;function pK(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function gK(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(o){i[o]=o}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var d5=gK()?Object.assign:function(e,t){for(var n,r=pK(e),i,o=1;o-1?e.split(xw).map(function(s){return zN({type:s},o)}):(o.type=e,[o])};var Sw=function(e,t){var n=e[t];return delete e[t],n},BN=function(t,n){const r=Object.keys(t).reduce(function(i,o){var s=wK(o,t[o]);return i.concat(s)},[]);return zN({add:function(o){r.forEach(function(s){o.addEventListener(s.type,s.delegate,s.options)})},remove:function(o){r.forEach(function(s){o.removeEventListener(s.type,s.delegate,s.options)})}},n)};const bK=d5,EK=BN,ww=(...e)=>function(n=document.body){e.forEach(r=>{typeof this[r]=="function"&&this[r].call(this,n)})};var Bt=(e,t)=>EK(e,bK({on:ww("init","add"),off:ww("teardown","remove")},t));const bw="aria-expanded",CK="aria-controls",Ew="hidden";var z0=(e,t)=>{let n=t;typeof n!="boolean"&&(n=e.getAttribute(bw)==="false"),e.setAttribute(bw,n);const r=e.getAttribute(CK),i=document.getElementById(r);if(!i)throw new Error(`No toggle target found with id: "${r}"`);return n?i.removeAttribute(Ew):i.setAttribute(Ew,""),n};function AK(e,t=window,n=document.documentElement){const r=e.getBoundingClientRect();return r.top>=0&&r.left>=0&&r.bottom<=(t.innerHeight||n.clientHeight)&&r.right<=(t.innerWidth||n.clientWidth)}var HN=AK,To={CLICK:"click"},tn={prefix:"usa"};const qN=Ci,RK=Bt,Cw=z0,$K=HN,{CLICK:TK}=To,{prefix:lh}=tn,uh=`.${lh}-accordion, .${lh}-accordion--bordered`,kK=`.${lh}-banner__button`,Au=`.${lh}-accordion__button[aria-controls]:not(${kK})`,Aw="aria-expanded",MK="data-allow-multiple",WN=e=>qN(Au,e).filter(n=>n.closest(uh)===e),Ru=(e,t)=>{const n=e.closest(uh);let r=t;if(!n)throw new Error(`${Au} is missing outer ${uh}`);r=Cw(e,t);const i=n.hasAttribute(MK);r&&!i&&WN(n).forEach(o=>{o!==e&&Cw(o,!1)})},NK=e=>Ru(e,!0),LK=e=>Ru(e,!1),PK=RK({[TK]:{[Au](){Ru(this),this.getAttribute(Aw)==="true"&&($K(this)||this.scrollIntoView())}}},{init(e){qN(Au,e).forEach(t=>{const n=t.getAttribute(Aw)==="true";Ru(t,n)})},ACCORDION:uh,BUTTON:Au,show:NK,hide:LK,toggle:Ru,getButtons:WN});var h5=PK;const Rw=Fr(h5),IK="/comet-starter/assets/sprite-BJHKCx_5.svg",OK=Bt,DK=Ci,{CLICK:jK}=To,{prefix:GN}=tn,KN=z0,YN=`.${GN}-banner__header`,QN=`${GN}-banner__header--expanded`,My=`${YN} [aria-controls]`,FK=function(t){t.preventDefault();const n=t.target.closest(My);KN(n),this.closest(YN).classList.toggle(QN)};var UK=OK({[jK]:{[My]:FK}},{init(e){DK(My,e).forEach(t=>{const n=t.getAttribute(QN)==="true";KN(t,n)})}});const $w=Fr(UK),VK="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAsBAMAAAAncaPMAAAAAXNSR0IArs4c6QAAABtQTFRF////4EAg2z8g2z8f2z4f2j4fHjSyHjOxHTOxQEYPwgAAAIdJREFUeNrNkUENxDAMBEOhFJaCKZiCKZhCKBj2ebV3rdR71+pIq+Qxj1GyqjJ3U8VlHkc07hFm0awBYe91juq6MSI0yhSAEgkzJ4TMKiXyzFw3pgR9lmIBJlqj2AmBedf+IycExmlKZVzvZEJ4A0oBrjBl/m6PCy95B3fFAN6YuQPxhbcB4QMkEj04wQXD5wAAAABJRU5ErkJggg==",zK="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%3e%3ctitle%3eicon-https%3c/title%3e%3cpath%20fill='%23719F2A'%20fill-rule='evenodd'%20d='M32%200c17.673%200%2032%2014.327%2032%2032%200%2017.673-14.327%2032-32%2032C14.327%2064%200%2049.673%200%2032%200%2014.327%2014.327%200%2032%200zm0%201.208C14.994%201.208%201.208%2014.994%201.208%2032S14.994%2062.792%2032%2062.792%2062.792%2049.006%2062.792%2032%2049.006%201.208%2032%201.208zm0%2018.886a7.245%207.245%200%200%201%207.245%207.245v3.103h.52c.86%200%201.557.698%201.557%201.558v9.322c0%20.86-.697%201.558-1.557%201.558h-15.53c-.86%200-1.557-.697-1.557-1.558V32c0-.86.697-1.558%201.557-1.558h.52V27.34A7.245%207.245%200%200%201%2032%2020.094zm0%203.103a4.142%204.142%200%200%200-4.142%204.142v3.103h8.284V27.34A4.142%204.142%200%200%200%2032%2023.197z'/%3e%3c/svg%3e",BK="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%3e%3ctitle%3eicon-dot-gov%3c/title%3e%3cpath%20fill='%232378C3'%20fill-rule='evenodd'%20d='m32%200c17.7%200%2032%2014.3%2032%2032s-14.3%2032-32%2032-32-14.3-32-32%2014.3-32%2032-32zm0%201.2c-17%200-30.8%2013.8-30.8%2030.8s13.8%2030.8%2030.8%2030.8%2030.8-13.8%2030.8-30.8-13.8-30.8-30.8-30.8zm11.4%2038.9c.5%200%20.9.4.9.8v1.6h-24.6v-1.6c0-.5.4-.8.9-.8zm-17.1-12.3v9.8h1.6v-9.8h3.3v9.8h1.6v-9.8h3.3v9.8h1.6v-9.8h3.3v9.8h.8c.5%200%20.9.4.9.8v.8h-21.4v-.8c0-.5.4-.8.9-.8h.8v-9.8zm5.7-8.2%2012.3%204.9v1.6h-1.6c0%20.5-.4.8-.9.8h-19.6c-.5%200-.9-.4-.9-.8h-1.6v-1.6s12.3-4.9%2012.3-4.9z'/%3e%3c/svg%3e";var HK=function(t,n=500){let r=null;return(...i)=>{window.clearTimeout(r),r=window.setTimeout(()=>{t.apply(this,i)},n)}};const qK=Ci,WK=Bt,GK=HK,{prefix:B0}=tn,p5=`${B0}-character-count`,ug=`.${p5}`,Ny=`.${B0}-character-count__field`,Tw=`.${B0}-character-count__message`,Ly="The content is too long.",XN=`${B0}-character-count__status--invalid`,g5=`${p5}__status`,m5=`${p5}__sr-status`,KK=`.${g5}`,YK=`.${m5}`,y5="characters allowed",v5=e=>{const t=e.closest(ug);if(!t)throw new Error(`${Ny} is missing outer ${ug}`);const n=t.querySelector(Tw);if(!n)throw new Error(`${ug} is missing inner ${Tw}`);return{characterCountEl:t,messageEl:n}},QK=e=>{const{characterCountEl:t}=v5(e),n=e.getAttribute("maxlength");n&&(e.removeAttribute("maxlength"),t.setAttribute("data-maxlength",n))},ZN=e=>{const t=document.createElement("div"),n=document.createElement("div"),i=`${e.dataset.maxlength} ${y5}`;t.classList.add(`${g5}`,"usa-hint"),n.classList.add(`${m5}`,"usa-sr-only"),t.setAttribute("aria-hidden",!0),n.setAttribute("aria-live","polite"),t.textContent=i,n.textContent=i,e.append(t,n)},JN=(e,t)=>{let n="";if(e===0)n=`${t} ${y5}`;else{const r=Math.abs(t-e),i=`character${r===1?"":"s"}`,o=e>t?"over limit":"left";n=`${r} ${i} ${o}`}return n},XK=GK((e,t)=>{const n=e;n.textContent=t},1e3),kw=e=>{const{characterCountEl:t}=v5(e),n=e.value.length,r=parseInt(t.getAttribute("data-maxlength"),10),i=t.querySelector(KK),o=t.querySelector(YK),s=JN(n,r);if(!r)return;const a=n&&n>r;i.textContent=s,XK(o,s),a&&!e.validationMessage&&e.setCustomValidity(Ly),!a&&e.validationMessage===Ly&&e.setCustomValidity(""),i.classList.toggle(XN,a)},ZK=e=>{const{characterCountEl:t,messageEl:n}=v5(e);n.classList.add("usa-sr-only"),n.removeAttribute("aria-live"),QK(e),ZN(t)};WK({input:{[Ny](){kw(this)}}},{init(e){qK(Ny,e).forEach(t=>ZK(t))},MESSAGE_INVALID_CLASS:XN,VALIDATION_MESSAGE:Ly,STATUS_MESSAGE_CLASS:g5,STATUS_MESSAGE_SR_ONLY_CLASS:m5,DEFAULT_STATUS_LABEL:y5,createStatusMessages:ZN,getCountMessage:JN,updateCountMessage:kw});var _5={exports:{}},JK={exports:{}};(function(e,t){(function(){var n={polyfill:o,keys:{3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"}},r;for(r=1;r<25;r++)n.keys[111+r]="F"+r;var i="";for(r=65;r<91;r++)i=String.fromCharCode(r),n.keys[r]=[i.toLowerCase(),i.toUpperCase()];function o(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var s={get:function(a){var l=n.keys[this.which||this.keyCode];return Array.isArray(l)&&(l=l[+this.shiftKey]),l}};return Object.defineProperty(KeyboardEvent.prototype,"key",s),s}e.exports=n})()})(JK);const Py={Alt:"altKey",Control:"ctrlKey",Ctrl:"ctrlKey",Shift:"shiftKey"},eL="+",eY=function(e,t){var n=e.key;if(t)for(var r in Py)e[Py[r]]===!0&&(n=[r,n].join(eL));return n};_5.exports=function(t){const n=Object.keys(t).some(function(r){return r.indexOf(eL)>-1});return function(r){var i=eY(r,n);return[i,i.toLowerCase()].reduce(function(o,s){return s in t&&(o=t[i].call(this,r)),o},void 0)}};_5.exports.MODIFIERS=Py;var Ts=_5.exports;const tY=Ci,nY=e=>e&&typeof e=="object"&&e.nodeType===1;var Ai=(e,t)=>{const n=tY(e,t);return typeof e!="string"||nY(t)&&t.matches(e)&&n.push(t),n},tL={exports:{}};(function(e){tL.exports=e()})(function(){var e={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(t){return e._entities[t]},escapeHTML:function(t){for(var n="",r=0;r1?n-1:0),i=1;i{},Dr=(e,t="")=>{const n=e;n.value=t;const r=new CustomEvent("change",{bubbles:!0,cancelable:!0,detail:{value:t}});n.dispatchEvent(r)},$t=e=>{const t=e.closest(li);if(!t)throw new Error(`Element is missing outer ${li}`);const n=t.querySelector(cY),r=t.querySelector(cf),i=t.querySelector(dY),o=t.querySelector(hY),s=t.querySelector(uL),a=t.querySelector(fY),l=t.querySelector(lL),u=t.querySelector(aL),c=t.classList.contains(ks),d=t.dataset.disableFiltering==="true";return{comboBoxEl:t,selectEl:n,inputEl:r,listEl:i,statusEl:o,focusedOptionEl:s,selectedOptionEl:a,toggleListBtnEl:l,clearInputBtnEl:u,isPristine:c,disableFiltering:d}},cL=e=>{const{inputEl:t,toggleListBtnEl:n,clearInputBtnEl:r}=$t(e);r.hidden=!0,r.disabled=!0,n.disabled=!0,t.disabled=!0},mY=e=>{const{inputEl:t,toggleListBtnEl:n,clearInputBtnEl:r}=$t(e);r.hidden=!0,r.setAttribute("aria-disabled",!0),n.setAttribute("aria-disabled",!0),t.setAttribute("aria-disabled",!0)},yY=e=>{const{inputEl:t,toggleListBtnEl:n,clearInputBtnEl:r}=$t(e);r.hidden=!1,r.disabled=!1,n.disabled=!1,t.disabled=!1},Nw=e=>{const t=e.closest(li);if(t.dataset.enhanced)return;const n=t.querySelector("select");if(!n)throw new Error(`${li} is missing inner select`);const r=n.id,i=document.querySelector(`label[for="${r}"]`),o=`${r}--list`,s=`${r}-label`,a=`${r}--assistiveHint`,l=[],{defaultValue:u}=t.dataset,{placeholder:c}=t.dataset;let d;if(c&&l.push({placeholder:c}),u)for(let h=0,p=n.options.length;h{if(n.hasAttribute(h)){const p=n.getAttribute(h);l.push({[h]:p}),n.removeAttribute(h)}});const f=document.createElement("input");if(f.setAttribute("id",r),f.setAttribute("aria-owns",o),f.setAttribute("aria-controls",o),f.setAttribute("aria-autocomplete","list"),f.setAttribute("aria-describedby",a),f.setAttribute("aria-expanded","false"),f.setAttribute("autocapitalize","off"),f.setAttribute("autocomplete","off"),f.setAttribute("class",rL),f.setAttribute("type","text"),f.setAttribute("role","combobox"),l.forEach(h=>Object.keys(h).forEach(p=>{const y=Mw.escapeHTML`${h[p]}`;f.setAttribute(p,y)})),t.insertAdjacentElement("beforeend",f),t.insertAdjacentHTML("beforeend",Mw.escapeHTML` + + + +   + + + + +
+ + When autocomplete results are available use up and down arrows to review and enter to select. + Touch device users, explore by touch or with swipe gestures. + `),d){const{inputEl:h}=$t(t);Dr(n,d.value),Dr(h,d.text),t.classList.add(ks)}n.disabled&&(cL(t),n.disabled=!1),n.hasAttribute("aria-disabled")&&(mY(t),n.removeAttribute("aria-disabled")),t.dataset.enhanced="true"},Oc=(e,t,{skipFocus:n,preventScroll:r}={})=>{const{inputEl:i,listEl:o,focusedOptionEl:s}=$t(e);if(s&&(s.classList.remove(_s),s.setAttribute("tabIndex","-1")),t){if(i.setAttribute("aria-activedescendant",t.id),t.setAttribute("tabIndex","0"),t.classList.add(_s),!r){const a=t.offsetTop+t.offsetHeight,l=o.scrollTop+o.offsetHeight;a>l&&(o.scrollTop=a-o.offsetHeight),t.offsetTop{const r=o=>o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");let i=e.replace(/{{(.*?)}}/g,(o,s)=>{const a=s.trim(),l=n[a];if(a!=="query"&&l){const u=new RegExp(l,"i"),c=t.match(u);return c?r(c[1]):""}return r(t)});return i=`^(?:${i})$`,new RegExp(i,"i")},Za=e=>{const{comboBoxEl:t,selectEl:n,inputEl:r,listEl:i,statusEl:o,isPristine:s,disableFiltering:a}=$t(e);let l,u;const c=`${i.id}--option-`,d=(r.value||"").toLowerCase(),f=t.dataset.filter||pY,h=dL(f,d,t.dataset),p=[];for(let v=0,x=n.options.length;v{const S=`${c}${x}`,w=[tc];let E="-1",A="false";S===l&&(w.push(oL,_s),E="0",A="true"),!l&&x===0&&(w.push(_s),E="0");const k=document.createElement("li");return k.setAttribute("aria-setsize",p.length),k.setAttribute("aria-posinset",x+1),k.setAttribute("aria-selected",A),k.setAttribute("id",S),k.setAttribute("class",w.join(" ")),k.setAttribute("tabindex",E),k.setAttribute("role","option"),k.setAttribute("data-value",v.value),k.textContent=v.text,k}),m=document.createElement("li");m.setAttribute("class",`${tc}--no-results`),m.textContent="No results found",i.hidden=!1,y?(i.innerHTML="",_.forEach(v=>i.insertAdjacentElement("beforeend",v))):(i.innerHTML="",i.insertAdjacentElement("beforeend",m)),r.setAttribute("aria-expanded","true"),o.textContent=y?`${y} result${y>1?"s":""} available.`:"No results.";let g;s&&l?g=i.querySelector(`#${l}`):a&&u&&(g=i.querySelector(`#${u}`)),g&&Oc(i,g,{skipFocus:!0})},xs=e=>{const{inputEl:t,listEl:n,statusEl:r,focusedOptionEl:i}=$t(e);r.innerHTML="",t.setAttribute("aria-expanded","false"),t.setAttribute("aria-activedescendant",""),i&&i.classList.remove(_s),n.scrollTop=0,n.hidden=!0},w5=e=>{const{comboBoxEl:t,selectEl:n,inputEl:r}=$t(e);Dr(n,e.dataset.value),Dr(r,e.textContent),t.classList.add(ks),xs(t),r.focus()},vY=e=>{const{comboBoxEl:t,listEl:n,selectEl:r,inputEl:i}=$t(e),o=!n.hidden;r.value&&Dr(r),i.value&&Dr(i),t.classList.remove(ks),o&&Za(t),i.focus()},b5=e=>{const{comboBoxEl:t,selectEl:n,inputEl:r}=$t(e),i=n.value,o=(r.value||"").toLowerCase();if(i)for(let s=0,a=n.options.length;s{const{comboBoxEl:t,selectEl:n,inputEl:r,statusEl:i}=$t(e);i.textContent="";const o=(r.value||"").toLowerCase();if(o)for(let s=0,a=n.options.length;s{const{comboBoxEl:t,inputEl:n}=$t(e.target);xs(t),b5(t),n.focus()},Lw=e=>{const{comboBoxEl:t,listEl:n}=$t(e.target);n.hidden&&Za(t);const r=n.querySelector(uL)||n.querySelector(df);r&&Oc(t,r),e.preventDefault()},SY=e=>{const{comboBoxEl:t,listEl:n}=$t(e.target),r=!n.hidden;_Y(t),r&&xs(t),e.preventDefault()},Pw=e=>{const t=e.target,n=t.nextSibling;n&&Oc(t,n),e.preventDefault()},wY=e=>{w5(e.target),e.preventDefault()},bY=e=>{w5(e.target),e.preventDefault()},Iw=e=>{const{comboBoxEl:t,listEl:n,focusedOptionEl:r}=$t(e.target),i=r&&r.previousSibling,o=!n.hidden;Oc(t,i),o&&e.preventDefault(),i||xs(t)},EY=e=>{e.classList.contains(_s)||Oc(e,e,{preventScroll:!0})},CY=e=>{const{comboBoxEl:t,listEl:n,inputEl:r}=$t(e);n.hidden?Za(t):xs(t),r.focus()},AY=e=>{const{comboBoxEl:t,listEl:n}=$t(e);n.hidden&&Za(t)},RY=iY({[sY]:{[cf](){this.disabled||AY(this)},[lL](){this.disabled||CY(this)},[df](){this.disabled||w5(this)},[aL](){this.disabled||vY(this)}},focusout:{[li](e){this.contains(e.relatedTarget)||(b5(this),xs(this))}},keydown:{[li]:cg({Escape:xY}),[cf]:cg({Enter:SY,ArrowDown:Lw,Down:Lw}),[df]:cg({ArrowUp:Iw,Up:Iw,ArrowDown:Pw,Down:Pw,Enter:bY," ":wY,"Shift+Tab":gY})},input:{[cf](){this.closest(li).classList.remove(ks),Za(this)}},mouseover:{[df](){EY(this)}}},{init(e){rY(li,e).forEach(t=>{Nw(t)})},getComboBoxContext:$t,enhanceComboBox:Nw,generateDynamicRegExp:dL,disable:cL,enable:yY,displayList:Za,hideList:xs,COMBO_BOX_CLASS:_r});var $Y=RY,fL=(e=document)=>e.activeElement;function TY(){return typeof navigator<"u"&&(navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream}var kY=TY;const No=Ts,MY=Bt,NY=Ci,LY=Ai,{prefix:PY}=tn,{CLICK:IY}=To,OY=fL,DY=kY,Sa=Ic,Ri=`${PY}-date-picker`,jY=`${Ri}__wrapper`,FY=`${Ri}--initialized`,hL=`${Ri}--active`,pL=`${Ri}__internal-input`,gL=`${Ri}__external-input`,mL=`${Ri}__button`,ct=`${Ri}__calendar`,yL=`${Ri}__status`,er=`${ct}__date`,vL=`${er}--focused`,UY=`${er}--selected`,VY=`${er}--previous-month`,_L=`${er}--current-month`,zY=`${er}--next-month`,BY=`${er}--range-date`,HY=`${er}--today`,qY=`${er}--range-date-start`,WY=`${er}--range-date-end`,GY=`${er}--within-range`,xL=`${ct}__previous-year`,SL=`${ct}__previous-month`,wL=`${ct}__next-year`,bL=`${ct}__next-month`,EL=`${ct}__month-selection`,CL=`${ct}__year-selection`,H0=`${ct}__month`,E5=`${H0}--focused`,KY=`${H0}--selected`,q0=`${ct}__year`,C5=`${q0}--focused`,YY=`${q0}--selected`,AL=`${ct}__previous-year-chunk`,RL=`${ct}__next-year-chunk`,$L=`${ct}__date-picker`,TL=`${ct}__month-picker`,kL=`${ct}__year-picker`,ch=`${ct}__table`,QY=`${ct}__row`,Ks=`${ct}__cell`,Ad=`${Ks}--center-items`,XY=`${ct}__month-label`,ZY=`${ct}__day-of-week`,Ss=`.${Ri}`,ML=`.${mL}`,JY=`.${pL}`,ff=`.${gL}`,dh=`.${ct}`,eQ=`.${yL}`,Ow=`.${er}`,gl=`.${vL}`,tQ=`.${_L}`,A5=`.${xL}`,R5=`.${SL}`,$5=`.${wL}`,T5=`.${bL}`,NL=`.${CL}`,LL=`.${EL}`,Iy=`.${H0}`,fh=`.${q0}`,k5=`.${AL}`,M5=`.${RL}`,ml=`.${$L}`,nQ=`.${TL}`,N5=`.${kL}`,W0=`.${E5}`,yl=`.${C5}`,Dw="Please enter a valid date",Oy=["January","February","March","April","May","June","July","August","September","October","November","December"],rQ=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],iQ=13,Tr=12,oQ="0000-01-01",G0="MM/DD/YYYY",PL="YYYY-MM-DD",sQ=":not([disabled])",L5=(...e)=>e.map(t=>t+sQ).join(", "),aQ=L5(A5,R5,NL,LL,$5,T5,gl),lQ=L5(W0),uQ=L5(k5,M5,yl),P5=(e,t)=>(t!==e.getMonth()&&e.setDate(0),e),hh=(e,t,n)=>{const r=new Date(0);return r.setFullYear(e,t,n),r},I5=()=>{const e=new Date,t=e.getDate(),n=e.getMonth(),r=e.getFullYear();return hh(r,n,t)},O5=e=>{const t=new Date(0);return t.setFullYear(e.getFullYear(),e.getMonth(),1),t},IL=e=>{const t=new Date(0);return t.setFullYear(e.getFullYear(),e.getMonth()+1,0),t},ns=(e,t)=>{const n=new Date(e.getTime());return n.setDate(n.getDate()+t),n},D5=(e,t)=>ns(e,-t),OL=(e,t)=>ns(e,t*7),cQ=(e,t)=>OL(e,-t),DL=e=>{const t=e.getDay();return D5(e,t)},dQ=e=>{const t=e.getDay();return ns(e,6-t)},Dc=(e,t)=>{const n=new Date(e.getTime()),r=(n.getMonth()+12+t)%12;return n.setMonth(n.getMonth()+t),P5(n,r),n},j5=(e,t)=>Dc(e,-t),F5=(e,t)=>Dc(e,t*12),jL=(e,t)=>F5(e,-t),Ja=(e,t)=>{const n=new Date(e.getTime());return n.setMonth(t),P5(n,t),n},ho=(e,t)=>{const n=new Date(e.getTime()),r=n.getMonth();return n.setFullYear(t),P5(n,r),n},fQ=(e,t)=>{let n=e;return t{let n=e;return t>e&&(n=t),new Date(n.getTime())},FL=(e,t)=>e&&t&&e.getFullYear()===t.getFullYear(),Fo=(e,t)=>FL(e,t)&&e.getMonth()===t.getMonth(),Li=(e,t)=>Fo(e,t)&&e.getDate()===t.getDate(),Ln=(e,t,n)=>{let r=e;return en&&(r=n),new Date(r.getTime())},Dy=(e,t,n)=>e>=t&&(!n||e<=n),pQ=(e,t,n)=>IL(e)n,dg=(e,t,n)=>IL(Ja(e,11))n,ar=(e,t=PL,n=!1)=>{let r,i,o,s,a;if(e){let l,u,c;if(t===G0?[l,u,c]=e.split("/"):[c,l,u]=e.split("-"),c&&(a=parseInt(c,10),!Number.isNaN(a)&&(s=a,n&&(s=Math.max(0,s),c.length<3)))){const d=I5().getFullYear();s=d-d%10**c.length+a}if(l&&(a=parseInt(l,10),Number.isNaN(a)||(i=a,n&&(i=Math.max(1,i),i=Math.min(12,i)))),i&&u&&s!=null&&(a=parseInt(u,10),!Number.isNaN(a)&&(o=a,n))){const d=hh(s,i,0).getDate();o=Math.max(1,o),o=Math.min(d,o)}i&&o&&s!=null&&(r=hh(s,i-1,o))}return r},el=(e,t=PL)=>{const n=(s,a)=>`0000${s}`.slice(-a),r=e.getMonth()+1,i=e.getDate(),o=e.getFullYear();return t===G0?[n(r,2),n(i,2),n(o,4)].join("/"):[n(o,4),n(r,2),n(i,2)].join("-")},U5=(e,t)=>{const n=[];let r=[],i=0;for(;i{o.insertAdjacentElement("beforeend",s)}),n.push(o)}return n},V5=e=>{const t=document.createElement("tbody");return e.forEach(n=>{t.insertAdjacentElement("beforeend",n)}),t},jy=(e,t="")=>{const n=e;n.value=t;const r=new CustomEvent("change",{bubbles:!0,cancelable:!0,detail:{value:t}});n.dispatchEvent(r)},Ve=e=>{const t=e.closest(Ss);if(!t)throw new Error(`Element is missing outer ${Ss}`);const n=t.querySelector(JY),r=t.querySelector(ff),i=t.querySelector(dh),o=t.querySelector(ML),s=t.querySelector(eQ),a=t.querySelector(fh),l=ar(r.value,G0,!0),u=ar(n.value),c=ar(i.dataset.value),d=ar(t.dataset.minDate),f=ar(t.dataset.maxDate),h=ar(t.dataset.rangeDate),p=ar(t.dataset.defaultDate);if(d&&f&&d>f)throw new Error("Minimum date cannot be after maximum date");return{calendarDate:c,minDate:d,toggleBtnEl:o,selectedDate:u,maxDate:f,firstYearChunkEl:a,datePickerEl:t,inputDate:l,internalInputEl:n,externalInputEl:r,calendarEl:i,rangeDate:h,defaultDate:p,statusEl:s}},UL=e=>{const{externalInputEl:t,toggleBtnEl:n}=Ve(e);n.disabled=!0,t.disabled=!0},VL=e=>{const{externalInputEl:t,toggleBtnEl:n}=Ve(e);n.setAttribute("aria-disabled",!0),t.setAttribute("aria-disabled",!0)},gQ=e=>{const{externalInputEl:t,toggleBtnEl:n}=Ve(e);n.disabled=!1,t.disabled=!1},z5=e=>{const{externalInputEl:t,minDate:n,maxDate:r}=Ve(e),i=t.value;let o=!1;if(i){o=!0;const s=i.split("/"),[a,l,u]=s.map(c=>{let d;const f=parseInt(c,10);return Number.isNaN(f)||(d=f),d});if(a&&l&&u!=null){const c=hh(u,a-1,l);c.getMonth()===a-1&&c.getDate()===l&&c.getFullYear()===u&&s[2].length===4&&Dy(c,n,r)&&(o=!1)}}return o},ph=e=>{const{externalInputEl:t}=Ve(e),n=z5(t);n&&!t.validationMessage&&t.setCustomValidity(Dw),!n&&t.validationMessage===Dw&&t.setCustomValidity("")},mQ=e=>{const{internalInputEl:t,inputDate:n}=Ve(e);let r="";n&&!z5(e)&&(r=el(n)),t.value!==r&&jy(t,r)},B5=(e,t)=>{const n=ar(t);if(n){const r=el(n,G0),{datePickerEl:i,internalInputEl:o,externalInputEl:s}=Ve(e);jy(o,t),jy(s,r),ph(i)}},yQ=e=>{const t=e.closest(Ss),{defaultValue:n}=t.dataset,r=t.querySelector("input");if(!r)throw new Error(`${Ss} is missing inner input`);r.value&&(r.value="");const i=ar(t.dataset.minDate||r.getAttribute("min"));t.dataset.minDate=i?el(i):oQ;const o=ar(t.dataset.maxDate||r.getAttribute("max"));o&&(t.dataset.maxDate=el(o));const s=document.createElement("div");s.classList.add(jY);const a=r.cloneNode();a.classList.add(gL),a.type="text",s.appendChild(a),s.insertAdjacentHTML("beforeend",Sa.escapeHTML` + + +
`),r.setAttribute("aria-hidden","true"),r.setAttribute("tabindex","-1"),r.style.display="none",r.classList.add(pL),r.removeAttribute("id"),r.removeAttribute("name"),r.required=!1,t.appendChild(s),t.classList.add(FY),n&&B5(t,n),r.disabled&&(UL(t),r.disabled=!1),r.hasAttribute("aria-disabled")&&(VL(t),r.removeAttribute("aria-disabled"))},xr=(e,t)=>{const{datePickerEl:n,calendarEl:r,statusEl:i,selectedDate:o,maxDate:s,minDate:a,rangeDate:l}=Ve(e),u=I5();let c=t||u;const d=r.hidden,f=ns(c,0),h=c.getMonth(),p=c.getFullYear(),y=j5(c,1),_=Dc(c,1),m=el(c),g=O5(c),v=Fo(c,a),x=Fo(c,s),S=o||c,w=l&&fQ(S,l),E=l&&hQ(S,l),A=l&&ns(w,1),k=l&&D5(E,1),R=Oy[h],M=N=>{const B=[er],G=N.getDate(),re=N.getMonth(),Y=N.getFullYear(),pe=N.getDay(),ge=el(N);let ue="-1";const Re=!Dy(N,a,s),Ie=Li(N,o);Fo(N,y)&&B.push(VY),Fo(N,f)&&B.push(_L),Fo(N,_)&&B.push(zY),Ie&&B.push(UY),Li(N,u)&&B.push(HY),l&&(Li(N,l)&&B.push(BY),Li(N,w)&&B.push(qY),Li(N,E)&&B.push(WY),Dy(N,A,k)&&B.push(GY)),Li(N,f)&&(ue="0",B.push(vL));const we=Oy[re],ke=rQ[pe],De=document.createElement("button");return De.setAttribute("type","button"),De.setAttribute("tabindex",ue),De.setAttribute("class",B.join(" ")),De.setAttribute("data-day",G),De.setAttribute("data-month",re+1),De.setAttribute("data-year",Y),De.setAttribute("data-value",ge),De.setAttribute("aria-label",Sa.escapeHTML`${G} ${we} ${Y} ${ke}`),De.setAttribute("aria-selected",Ie?"true":"false"),Re===!0&&(De.disabled=!0),De.textContent=G,De};c=DL(g);const $=[];for(;$.length<28||c.getMonth()===h||$.length%7!==0;)$.push(M(c)),c=ns(c,1);const T=U5($,7),O=r.cloneNode();O.dataset.value=m,O.style.top=`${n.offsetHeight}px`,O.hidden=!1,O.innerHTML=Sa.escapeHTML` +
+
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+
+ `;const I=document.createElement("table");I.setAttribute("class",ch);const H=document.createElement("thead");I.insertAdjacentElement("beforeend",H);const K=document.createElement("tr");H.insertAdjacentElement("beforeend",K);const V={Sunday:"S",Monday:"M",Tuesday:"T",Wednesday:"W",Thursday:"Th",Friday:"Fr",Saturday:"S"};Object.keys(V).forEach(N=>{const B=document.createElement("th");B.setAttribute("class",ZY),B.setAttribute("scope","col"),B.setAttribute("aria-label",N),B.textContent=V[N],K.insertAdjacentElement("beforeend",B)});const q=V5(T);I.insertAdjacentElement("beforeend",q),O.querySelector(ml).insertAdjacentElement("beforeend",I),r.parentNode.replaceChild(O,r),n.classList.add(hL);const Q=[];return Li(o,f)&&Q.push("Selected date"),d?(Q.push("You can navigate by day using left and right arrows","Weeks by using up and down arrows","Months by using page up and page down keys","Years by using shift plus page up and shift plus page down","Home and end keys navigate to the beginning and end of a week"),i.textContent=""):Q.push(`${R} ${p}`),i.textContent=Q.join(". "),O},vQ=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e);let o=jL(n,1);o=Ln(o,r,i);const s=xr(t,o);let a=s.querySelector(A5);a.disabled&&(a=s.querySelector(ml)),a.focus()},_Q=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e);let o=j5(n,1);o=Ln(o,r,i);const s=xr(t,o);let a=s.querySelector(R5);a.disabled&&(a=s.querySelector(ml)),a.focus()},xQ=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e);let o=Dc(n,1);o=Ln(o,r,i);const s=xr(t,o);let a=s.querySelector(T5);a.disabled&&(a=s.querySelector(ml)),a.focus()},SQ=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e);let o=F5(n,1);o=Ln(o,r,i);const s=xr(t,o);let a=s.querySelector($5);a.disabled&&(a=s.querySelector(ml)),a.focus()},K0=e=>{const{datePickerEl:t,calendarEl:n,statusEl:r}=Ve(e);t.classList.remove(hL),n.hidden=!0,r.textContent=""},wQ=e=>{if(e.disabled)return;const{datePickerEl:t,externalInputEl:n}=Ve(e);B5(e,e.dataset.value),K0(t),n.focus()},bQ=e=>{if(e.disabled)return;const{calendarEl:t,inputDate:n,minDate:r,maxDate:i,defaultDate:o}=Ve(e);if(t.hidden){const s=Ln(n||o||I5(),r,i);xr(t,s).querySelector(gl).focus()}else K0(e)},zL=e=>{const{calendarEl:t,inputDate:n,minDate:r,maxDate:i}=Ve(e);if(!t.hidden&&n){const s=Ln(n,r,i);xr(t,s)}},H5=(e,t)=>{const{calendarEl:n,statusEl:r,calendarDate:i,minDate:o,maxDate:s}=Ve(e),a=i.getMonth(),l=t??a,u=Oy.map((y,_)=>{const m=Ja(i,_),g=pQ(m,o,s);let v="-1";const x=[H0],S=_===a;_===l&&(v="0",x.push(E5)),S&&x.push(KY);const w=document.createElement("button");return w.setAttribute("type","button"),w.setAttribute("tabindex",v),w.setAttribute("class",x.join(" ")),w.setAttribute("data-value",_),w.setAttribute("data-label",y),w.setAttribute("aria-selected",S?"true":"false"),g===!0&&(w.disabled=!0),w.textContent=y,w}),c=document.createElement("div");c.setAttribute("tabindex","-1"),c.setAttribute("class",TL);const d=document.createElement("table");d.setAttribute("class",ch),d.setAttribute("role","presentation");const f=U5(u,3),h=V5(f);d.insertAdjacentElement("beforeend",h),c.insertAdjacentElement("beforeend",d);const p=n.cloneNode();return p.insertAdjacentElement("beforeend",c),n.parentNode.replaceChild(p,n),r.textContent="Select a month.",p},EQ=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e),o=parseInt(e.dataset.value,10);let s=Ja(n,o);s=Ln(s,r,i),xr(t,s).querySelector(gl).focus()},jc=(e,t)=>{const{calendarEl:n,statusEl:r,calendarDate:i,minDate:o,maxDate:s}=Ve(e),a=i.getFullYear(),l=t??a;let u=l;u-=u%Tr,u=Math.max(0,u);const c=dg(ho(i,u-1),o,s),d=dg(ho(i,u+Tr),o,s),f=[];let h=u;for(;f.length{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e),o=t.querySelector(yl);let a=parseInt(o.textContent,10)-Tr;a=Math.max(0,a);const l=ho(n,a),u=Ln(l,r,i),c=jc(t,u.getFullYear());let d=c.querySelector(k5);d.disabled&&(d=c.querySelector(N5)),d.focus()},AQ=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e),o=t.querySelector(yl);let a=parseInt(o.textContent,10)+Tr;a=Math.max(0,a);const l=ho(n,a),u=Ln(l,r,i),c=jc(t,u.getFullYear());let d=c.querySelector(M5);d.disabled&&(d=c.querySelector(N5)),d.focus()},RQ=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e),o=parseInt(e.innerHTML,10);let s=ho(n,o);s=Ln(s,r,i),xr(t,s).querySelector(gl).focus()},$Q=e=>{const{datePickerEl:t,externalInputEl:n}=Ve(e.target);K0(t),n.focus(),e.preventDefault()},Br=e=>t=>{const{calendarEl:n,calendarDate:r,minDate:i,maxDate:o}=Ve(t.target),s=e(r),a=Ln(s,i,o);Li(r,a)||xr(n,a).querySelector(gl).focus(),t.preventDefault()},jw=Br(e=>cQ(e,1)),Fw=Br(e=>OL(e,1)),Uw=Br(e=>D5(e,1)),Vw=Br(e=>ns(e,1)),TQ=Br(e=>DL(e)),kQ=Br(e=>dQ(e)),MQ=Br(e=>Dc(e,1)),NQ=Br(e=>j5(e,1)),LQ=Br(e=>F5(e,1)),PQ=Br(e=>jL(e,1)),IQ=e=>{if(e.disabled)return;const t=e.closest(dh),n=t.dataset.value,r=e.dataset.value;if(r===n)return;const i=ar(r);xr(t,i).querySelector(gl).focus()},ko=e=>t=>{const n=t.target,r=parseInt(n.dataset.value,10),{calendarEl:i,calendarDate:o,minDate:s,maxDate:a}=Ve(n),l=Ja(o,r);let u=e(r);u=Math.max(0,Math.min(11,u));const c=Ja(o,u),d=Ln(c,s,a);Fo(l,d)||H5(i,d.getMonth()).querySelector(W0).focus(),t.preventDefault()},zw=ko(e=>e-3),Bw=ko(e=>e+3),Hw=ko(e=>e-1),qw=ko(e=>e+1),OQ=ko(e=>e-e%3),DQ=ko(e=>e+2-e%3),jQ=ko(()=>11),FQ=ko(()=>0),UQ=e=>{if(e.disabled||e.classList.contains(E5))return;const t=parseInt(e.dataset.value,10);H5(e,t).querySelector(W0).focus()},Mo=e=>t=>{const n=t.target,r=parseInt(n.dataset.value,10),{calendarEl:i,calendarDate:o,minDate:s,maxDate:a}=Ve(n),l=ho(o,r);let u=e(r);u=Math.max(0,u);const c=ho(o,u),d=Ln(c,s,a);FL(l,d)||jc(i,d.getFullYear()).querySelector(yl).focus(),t.preventDefault()},Ww=Mo(e=>e-3),Gw=Mo(e=>e+3),Kw=Mo(e=>e-1),Yw=Mo(e=>e+1),VQ=Mo(e=>e-e%3),zQ=Mo(e=>e+2-e%3),BQ=Mo(e=>e-Tr),HQ=Mo(e=>e+Tr),qQ=e=>{if(e.disabled||e.classList.contains(C5))return;const t=parseInt(e.dataset.value,10);jc(e,t).querySelector(yl).focus()},q5=e=>{const t=n=>{const{calendarEl:r}=Ve(n),i=NY(e,r),o=0,s=i.length-1,a=i[o],l=i[s],u=i.indexOf(OY());return{focusableElements:i,isNotFound:u===-1,firstTabStop:a,isFirstTab:u===o,lastTabStop:l,isLastTab:u===s}};return{tabAhead(n){const{firstTabStop:r,isLastTab:i,isNotFound:o}=t(n.target);(i||o)&&(n.preventDefault(),r.focus())},tabBack(n){const{lastTabStop:r,isFirstTab:i,isNotFound:o}=t(n.target);(i||o)&&(n.preventDefault(),r.focus())}}},fg=q5(aQ),Qw=q5(lQ),Xw=q5(uQ),BL={[IY]:{[ML](){bQ(this)},[Ow](){wQ(this)},[Iy](){EQ(this)},[fh](){RQ(this)},[R5](){_Q(this)},[T5](){xQ(this)},[A5](){vQ(this)},[$5](){SQ(this)},[k5](){CQ(this)},[M5](){AQ(this)},[LL](){H5(this).querySelector(W0).focus()},[NL](){jc(this).querySelector(yl).focus()}},keyup:{[dh](e){const t=this.dataset.keydownKeyCode;`${e.keyCode}`!==t&&e.preventDefault()}},keydown:{[ff](e){e.keyCode===iQ&&ph(this)},[Ow]:No({Up:jw,ArrowUp:jw,Down:Fw,ArrowDown:Fw,Left:Uw,ArrowLeft:Uw,Right:Vw,ArrowRight:Vw,Home:TQ,End:kQ,PageDown:MQ,PageUp:NQ,"Shift+PageDown":LQ,"Shift+PageUp":PQ,Tab:fg.tabAhead}),[ml]:No({Tab:fg.tabAhead,"Shift+Tab":fg.tabBack}),[Iy]:No({Up:zw,ArrowUp:zw,Down:Bw,ArrowDown:Bw,Left:Hw,ArrowLeft:Hw,Right:qw,ArrowRight:qw,Home:OQ,End:DQ,PageDown:jQ,PageUp:FQ}),[nQ]:No({Tab:Qw.tabAhead,"Shift+Tab":Qw.tabBack}),[fh]:No({Up:Ww,ArrowUp:Ww,Down:Gw,ArrowDown:Gw,Left:Kw,ArrowLeft:Kw,Right:Yw,ArrowRight:Yw,Home:VQ,End:zQ,PageDown:HQ,PageUp:BQ}),[N5]:No({Tab:Xw.tabAhead,"Shift+Tab":Xw.tabBack}),[dh](e){this.dataset.keydownKeyCode=e.keyCode},[Ss](e){No({Escape:$Q})(e)}},focusout:{[ff](){ph(this)},[Ss](e){this.contains(e.relatedTarget)||K0(this)}},input:{[ff](){mQ(this),zL(this)}}};DY()||(BL.mouseover={[tQ](){IQ(this)},[Iy](){UQ(this)},[fh](){qQ(this)}});const WQ=MY(BL,{init(e){LY(Ss,e).forEach(t=>{yQ(t)})},getDatePickerContext:Ve,disable:UL,ariaDisable:VL,enable:gQ,isDateInputInvalid:z5,setCalendarValue:B5,validateDateInput:ph,renderCalendar:xr,updateCalendarIfVisible:zL});var GQ=WQ;const KQ=Bt,YQ=Ci,QQ=Ai,{prefix:HL}=tn,{getDatePickerContext:qL,isDateInputInvalid:WL,updateCalendarIfVisible:GL}=GQ,XQ=`${HL}-date-picker`,W5=`${HL}-date-range-picker`,KL=`${W5}__range-start`,YL=`${W5}__range-end`,hg=`.${XQ}`,wa=`.${W5}`,QL=`.${KL}`,XL=`.${YL}`,ZQ="0000-01-01",ZL=e=>{const t=e.closest(wa);if(!t)throw new Error(`Element is missing outer ${wa}`);const n=t.querySelector(QL),r=t.querySelector(XL);return{dateRangePickerEl:t,rangeStartEl:n,rangeEndEl:r}},JL=e=>{const{dateRangePickerEl:t,rangeStartEl:n,rangeEndEl:r}=ZL(e),{internalInputEl:i}=qL(n),o=i.value;o&&!WL(i)?(r.dataset.minDate=o,r.dataset.rangeDate=o,r.dataset.defaultDate=o):(r.dataset.minDate=t.dataset.minDate||"",r.dataset.rangeDate="",r.dataset.defaultDate=""),GL(r)},eP=e=>{const{dateRangePickerEl:t,rangeStartEl:n,rangeEndEl:r}=ZL(e),{internalInputEl:i}=qL(r),o=i.value;o&&!WL(i)?(n.dataset.maxDate=o,n.dataset.rangeDate=o,n.dataset.defaultDate=o):(n.dataset.maxDate=t.dataset.maxDate||"",n.dataset.rangeDate="",n.dataset.defaultDate=""),GL(n)},JQ=e=>{const t=e.closest(wa),[n,r]=YQ(hg,t);if(!n)throw new Error(`${wa} is missing inner two '${hg}' elements`);if(!r)throw new Error(`${wa} is missing second '${hg}' element`);n.classList.add(KL),r.classList.add(YL),t.dataset.minDate||(t.dataset.minDate=ZQ);const{minDate:i}=t.dataset;n.dataset.minDate=i,r.dataset.minDate=i;const{maxDate:o}=t.dataset;o&&(n.dataset.maxDate=o,r.dataset.maxDate=o),JL(t),eP(t)};KQ({"input change":{[QL](){JL(this)},[XL](){eP(this)}}},{init(e){QQ(wa,e).forEach(t=>{JQ(t)})}});const Zw=Ai,eX=Bt,gh=Ic,{prefix:Sn}=tn,nc=`${Sn}-file-input`,rc=`.${nc}`,tP=`${Sn}-file-input__input`,G5=`${Sn}-file-input__target`,nP=`.${tP}`,tX=`${Sn}-file-input__box`,rP=`${Sn}-file-input__instructions`,iP=`${Sn}-file-input__preview`,oP=`${Sn}-file-input__preview-heading`,Y0=`${Sn}-file-input--disabled`,nX=`${Sn}-file-input__choose`,sP=`${Sn}-file-input__accepted-files-message`,Jw=`${Sn}-file-input__drag-text`,pg=`${Sn}-file-input--drag`,eb="is-loading",Fy="has-invalid-file",vl=`${Sn}-file-input__preview-image`,rX=`${vl}--generic`,iX=`${vl}--pdf`,oX=`${vl}--word`,sX=`${vl}--video`,aX=`${vl}--excel`,aP=`${Sn}-sr-only`,Bs="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";let Uy=!0,Vy="",zy="";const Fc=e=>{const t=e.closest(rc);if(!t)throw new Error(`Element is missing outer ${rc}`);const n=t.querySelector(nP);return{dropZoneEl:t,inputEl:n}},lX=e=>{const{dropZoneEl:t,inputEl:n}=Fc(e);n.disabled=!0,t.classList.add(Y0)},uX=e=>{const{dropZoneEl:t}=Fc(e);t.classList.add(Y0)},cX=e=>{const{dropZoneEl:t,inputEl:n}=Fc(e);n.disabled=!1,t.classList.remove(Y0),t.removeAttribute("aria-disabled")},dX=e=>{const t=e.charCodeAt(0);return t===32?"-":t>=65&&t<=90?`img_${e.toLowerCase()}`:`__${t.toString(16).slice(-4)}`},fX=e=>e.replace(/[^a-z0-9]/g,dX),hX=e=>`${e}-${Math.floor(Date.now().toString()/1e3)}`,lP=e=>e.hasAttribute("multiple")?"files":"file",pX=e=>{const t=document.createElement("div"),n=document.createElement("div"),r=document.createElement("div");return e.classList.remove(nc),e.classList.add(tP),t.classList.add(nc),r.classList.add(tX),n.classList.add(G5),n.prepend(r),e.parentNode.insertBefore(n,e),e.parentNode.insertBefore(t,n),n.appendChild(e),t.appendChild(n),n},gX=e=>{const t=e.closest(rc),n=lP(e),r=document.createElement("div"),i=`Drag ${n} here or`,o="choose from folder";return Vy=`${i} ${o}`,r.classList.add(rP),r.setAttribute("aria-hidden","true"),e.setAttribute("aria-label",Vy),r.innerHTML=gh.escapeHTML`${i} ${o}`,e.parentNode.insertBefore(r,e),(/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.querySelector(`.${Jw}`).outerHTML=""),r},mX=e=>{const t=document.createElement("div"),n=lP(e),r=e.closest(rc),i=e.closest(`.${G5}`);zy=`No ${n} selected.`,t.classList.add(aP),t.setAttribute("aria-live","polite"),t.textContent=zy,r.insertBefore(t,i)},yX=e=>{const t=e.hasAttribute("aria-disabled")||e.hasAttribute("disabled"),n=pX(e),r=gX(e),{dropZoneEl:i}=Fc(e);return t?i.classList.add(Y0):mX(e),{instructions:r,dropTarget:n}},uP=(e,t)=>{const n=e.querySelectorAll(`.${iP}`),r=e.querySelector(`.${oP}`),i=e.querySelector(`.${sP}`),o=s=>{s.parentNode.removeChild(s)};r&&(r.outerHTML=""),i&&(i.outerHTML="",e.classList.remove(Fy)),n!==null&&(t&&t.removeAttribute("hidden"),Array.prototype.forEach.call(n,o))},vX=(e,t,n)=>{const r=e;let i=zy;t.length===1?i=`You have selected the file: ${n}`:t.length>1&&(i=`You have selected ${t.length} files: ${n.join(", ")}`),setTimeout(()=>{r.textContent=i},1e3)},_X=(e,t)=>{const n=document.createElement("div"),r=e.closest(`.${G5}`),i=r.querySelector(`.${rP}`);let o="Change file",s="";t.length===1?s=gh.escapeHTML`Selected file ${o}`:t.length>1&&(o="Change files",s=gh.escapeHTML`${t.length} files selected ${o}`),i.setAttribute("hidden","true"),n.classList.add(oP),n.innerHTML=s,r.insertBefore(n,i),e.setAttribute("aria-label",o)},xX=(e,t,n,r)=>{const i=e.target.files,s=r.closest(`.${nc}`).querySelector(`.${aP}`),a=[];uP(r,n);for(let l=0;l