cherry-works 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ var sN=Object.create;var y0=Object.defineProperty;var lN=Object.getOwnPropertyDe
6
6
  `+l[r].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=r&&0<=n);break}}}finally{$0=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Oo(a):""}function VN(t,e){switch(t.tag){case 26:case 27:case 5:return Oo(t.type);case 16:return Oo("Lazy");case 13:return t.child!==e&&e!==null?Oo("Suspense Fallback"):Oo("Suspense");case 19:return Oo("SuspenseList");case 0:case 15:return B0(t.type,!1);case 11:return B0(t.type.render,!1);case 1:return B0(t.type,!0);case 31:return Oo("Activity");case 30:return Oo("ViewTransition");default:return""}}function Qk(t){try{var e="",a=null;do e+=VN(t,a),a=t,t=t.return;while(t);return e}catch(r){return`
7
7
  Error generating stack: `+r.message+`
8
8
  `+r.stack}}var Sx=Object.prototype.hasOwnProperty,ky=Xt.unstable_scheduleCallback,_0=Xt.unstable_cancelCallback,UN=Xt.unstable_shouldYield,jN=Xt.unstable_requestPaint,hr=Xt.unstable_now,FN=Xt.unstable_getCurrentPriorityLevel,bT=Xt.unstable_ImmediatePriority,vT=Xt.unstable_UserBlockingPriority,zp=Xt.unstable_NormalPriority,HN=Xt.unstable_LowPriority,ST=Xt.unstable_IdlePriority,GN=Xt.log,YN=Xt.unstable_setDisableYieldValue,od=null,pr=null;function So(t){if(typeof GN=="function"&&YN(t),pr&&typeof pr.setStrictMode=="function")try{pr.setStrictMode(od,t)}catch{}}var mr=Math.clz32?Math.clz32:JN,WN=Math.log,KN=Math.LN2;function JN(t){return t>>>=0,t===0?32:31-(WN(t)/KN|0)|0}var Wh=256,Kh=262144,Jh=4194304;function Bs(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function fm(t,e,a){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,o=t.pingedLanes;t=t.warmLanes;var s=r&134217727;return s!==0?(r=s&~i,r!==0?n=Bs(r):(o&=s,o!==0?n=Bs(o):a||(a=s&~t,a!==0&&(n=Bs(a))))):(s=r&~i,s!==0?n=Bs(s):o!==0?n=Bs(o):a||(a=r&~t,a!==0&&(n=Bs(a)))),n===0?0:e!==0&&e!==n&&(e&i)===0&&(i=n&-n,a=e&-e,i>=a||i===32&&(a&4194048)!==0)?e:n}function sd(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function wT(t,e){(e&8)!==0&&(e|=e&32);var a=t.entangledLanes;if(a!==0)for(t=t.entanglements,a&=e;0<a;){var r=31-mr(a),n=1<<r;e|=t[r],a&=~n}return e}function e3(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function CT(){var t=Jh;return Jh<<=1,(Jh&62914560)===0&&(Jh=4194304),t}function z0(t){for(var e=[],a=0;31>a;a++)e.push(t);return e}function ld(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function t3(t,e,a,r,n,i){var o=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var s=t.entanglements,l=t.expirationTimes,u=t.hiddenUpdates;for(a=o&~a;0<a;){var c=31-mr(a),f=1<<c;s[c]=0,l[c]=-1;var d=u[c];if(d!==null)for(u[c]=null,c=0;c<d.length;c++){var h=d[c];h!==null&&(h.lane&=-536870913)}a&=~f}r!==0&&kT(t,r,0),i!==0&&n===0&&t.tag!==0&&(t.suspendedLanes|=i&~(o&~e))}function kT(t,e,a){t.pendingLanes|=e,t.suspendedLanes&=~e;var r=31-mr(e);t.entangledLanes|=e,t.entanglements[r]=t.entanglements[r]|1073741824|a&261930}function LT(t,e){var a=t.entangledLanes|=e;for(t=t.entanglements;a;){var r=31-mr(a),n=1<<r;n&e|t[r]&e&&(t[r]|=e),a&=~n}}function TT(t,e){var a=e&-e;return a=(a&42)!==0?1:Ly(a),(a&(t.suspendedLanes|e))!==0?0:a}function Ly(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Ty(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function PT(){var t=Ne.p;return t!==0?t:(t=window.event,t===void 0?32:uI(t.type))}function Mk(t,e){var a=Ne.p;try{return Ne.p=t,e()}finally{Ne.p=a}}var Bi=Math.random().toString(36).slice(2),ra="__reactFiber$"+Bi,Wa="__reactProps$"+Bi,ac="__reactContainer$"+Bi,Ek="__reactEvents$"+Bi,a3="__reactListeners$"+Bi,r3="__reactHandles$"+Bi,Dk="__reactResources$"+Bi,ud="__reactMarker$"+Bi,Np="__reactLoad$"+Bi;function dm(t){delete t[ra],delete t[Wa],delete t[a3],delete t[r3]}function Ns(t){var e;if(e=t[ra])return e;for(var a=t.parentNode;a;){if(e=a[ac]||a[ra]){if(a=e.alternate,e.child!==null||a!==null&&a.child!==null)for(t=KL(t);t!==null;){if(a=t[ra])return a;t=KL(t)}return e}t=a,a=t.parentNode}return null}function rc(t){if(t=t[ra]||t[ac]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Tf(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(I(33))}function Mu(t){var e=t[Dk];return e||(e=t[Dk]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Ht(t){t[ud]=!0}function RT(t){t[Np]=void 0}var IT=new Set,AT={};function al(t,e){Vu(t,e),Vu(t+"Capture",e)}function Vu(t,e){for(AT[t]=e,t=0;t<e.length;t++)IT.add(e[t])}var n3=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),$k={},Bk={};function i3(t){return Sx.call(Bk,t)?!0:Sx.call($k,t)?!1:n3.test(t)?Bk[t]=!0:($k[t]=!0,!1)}var Be=!1;function _k(){var t=Be;return Be=!1,t}function Op(t,e,a){if(i3(e))if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var r=e.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,a)}}function ep(t,e,a){if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,a)}}function ki(t,e,a,r){if(r===null)t.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(e,a,r)}}function ur(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function QT(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function o3(t,e,a){var r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var n=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return n.call(this)},set:function(o){a=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function wx(t){if(!t._valueTracker){var e=QT(t)?"checked":"value";t._valueTracker=o3(t,e,""+t[e])}}function MT(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var a=e.getValue(),r="";return t&&(r=QT(t)?t.checked?"true":"false":t.value),t=r,t!==a?(e.setValue(t),!0):!1}var s3=/[\n"\\]/g;function Er(t){return t.replace(s3,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Cx(t,e,a,r,n,i,o,s){t.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.type=o:t.removeAttribute("type"),e!=null?o==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+ur(e)):t.value!==""+ur(e)&&(t.value=""+ur(e)):o!=="submit"&&o!=="reset"||t.removeAttribute("value"),e!=null?o==="number"&&t.value==e?N0(t,ur(t.value)):N0(t,ur(e)):a!=null?N0(t,ur(a)):r!=null&&t.removeAttribute("value"),n==null&&i!=null&&(t.defaultChecked=!!i),n!=null&&(t.checked=n&&typeof n!="function"&&typeof n!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?t.name=""+ur(s):t.removeAttribute("name")}function ET(t,e,a,r,n,i,o,s){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||e!=null)){wx(t);return}a=a!=null?""+ur(a):"",e=e!=null?""+ur(e):a,s||e===t.value||(t.value=e),t.defaultValue=e}r=r??n,r=typeof r!="function"&&typeof r!="symbol"&&!!r,t.checked=s?t.checked:!!r,t.defaultChecked=!!r,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(t.name=o),wx(t)}function N0(t,e){t.defaultValue!==""+e&&(t.defaultValue=""+e)}function Eu(t,e,a,r){if(t=t.options,e){e={};for(var n=0;n<a.length;n++)e["$"+a[n]]=!0;for(a=0;a<t.length;a++)n=e.hasOwnProperty("$"+t[a].value),t[a].selected!==n&&(t[a].selected=n),n&&r&&(t[a].defaultSelected=!0)}else{for(a=""+ur(a),e=null,n=0;n<t.length;n++){if(t[n].value===a){t[n].selected=!0,r&&(t[n].defaultSelected=!0);return}e!==null||t[n].disabled||(e=t[n])}e!==null&&(e.selected=!0)}}function DT(t,e,a){if(e!=null&&(e=""+ur(e),e!==t.value&&(t.value=e),a==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=a!=null?""+ur(a):""}function $T(t,e,a,r){if(e==null){if(r!=null){if(a!=null)throw Error(I(92));if(Lf(r)){if(1<r.length)throw Error(I(93));r=r[0]}a=r}a==null&&(a=""),e=a}a=ur(e),t.defaultValue=a,r=t.textContent,r===a&&r!==""&&r!==null&&(t.value=r),wx(t)}function Uu(t,e){if(e){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=e;return}}t.textContent=e}var l3=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function zk(t,e,a){var r=e.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":r?t.setProperty(e,a):typeof a!="number"||a===0||l3.has(e)?e==="float"?t.cssFloat=a:t[e]=(""+a).trim():t[e]=a+"px"}function BT(t,e,a){if(e!=null&&typeof e!="object")throw Error(I(62));if(t=t.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||e!=null&&e.hasOwnProperty(r)||(r.indexOf("--")===0?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="",Be=!0);for(var n in e)r=e[n],e.hasOwnProperty(n)&&a[n]!==r&&(zk(t,n,r),Be=!0)}else for(var i in e)e.hasOwnProperty(i)&&zk(t,i,e[i])}function Py(t){if(t.indexOf("-")===-1)return!1;switch(t){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 u3=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),c3=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function xp(t){return c3.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Gn(){}var kx=null;function Ry(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Cu=null,Du=null;function Nk(t){var e=rc(t);if(e&&(t=e.stateNode)){var a=t[Wa]||null;e:switch(t=e.stateNode,e.type){case"input":if(Cx(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),e=a.name,a.type==="radio"&&e!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Er(""+e)+'"][type="radio"]'),e=0;e<a.length;e++){var r=a[e];if(r!==t&&r.form===t.form){var n=r[Wa]||null;if(!n)throw Error(I(90));Cx(r,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(e=0;e<a.length;e++)r=a[e],r.form===t.form&&MT(r)}break e;case"textarea":DT(t,a.value,a.defaultValue);break e;case"select":e=a.value,e!=null&&Eu(t,!!a.multiple,e,!1)}}}var X0=!1;function _T(t,e,a){if(X0)return t(e,a);X0=!0;try{var r=t(e);return r}finally{if(X0=!1,(Cu!==null||Du!==null)&&(Lm(),Cu&&(e=Cu,t=Du,Du=Cu=null,Nk(e),t)))for(e=0;e<t.length;e++)Nk(t[e])}}function Vf(t,e){var a=t.stateNode;if(a===null)return null;var r=a[Wa]||null;if(r===null)return null;a=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(I(231,e,typeof a));return a}var Ai=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lx=!1;if(Ai)try{mu={},Object.defineProperty(mu,"passive",{get:function(){Lx=!0}}),window.addEventListener("test",mu,mu),window.removeEventListener("test",mu,mu)}catch{Lx=!1}var mu,wo=null,Iy=null,yp=null;function zT(){if(yp)return yp;var t,e=Iy,a=e.length,r,n="value"in wo?wo.value:wo.textContent,i=n.length;for(t=0;t<a&&e[t]===n[t];t++);var o=a-t;for(r=1;r<=o&&e[a-r]===n[i-r];r++);return yp=n.slice(t,1<r?1-r:void 0)}function bp(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function tp(){return!0}function Xk(){return!1}function Ra(t){function e(a,r,n,i,o){this._reactName=a,this._targetInst=n,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var s in t)t.hasOwnProperty(s)&&(a=t[s],this[s]=a?a(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?tp:Xk,this.isPropagationStopped=Xk,this}return tt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=tp)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=tp)},persist:function(){},isPersistent:tp}),e}var Zo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hm=Ra(Zo),cd=tt({},Zo,{view:0,detail:0}),f3=Ra(cd),q0,Z0,bf,pm=tt({},cd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ay,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==bf&&(bf&&t.type==="mousemove"?(q0=t.screenX-bf.screenX,Z0=t.screenY-bf.screenY):Z0=q0=0,bf=t),q0)},movementY:function(t){return"movementY"in t?t.movementY:Z0}}),qk=Ra(pm),d3=tt({},pm,{dataTransfer:0}),h3=Ra(d3),p3=tt({},cd,{relatedTarget:0}),V0=Ra(p3),m3=tt({},Zo,{animationName:0,elapsedTime:0,pseudoElement:0}),g3=Ra(m3),O3=tt({},Zo,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),x3=Ra(O3),y3=tt({},Zo,{data:0}),Zk=Ra(y3),b3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v3={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},S3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function w3(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=S3[t])?!!e[t]:!1}function Ay(){return w3}var C3=tt({},cd,{key:function(t){if(t.key){var e=b3[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=bp(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?v3[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ay,charCode:function(t){return t.type==="keypress"?bp(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?bp(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),k3=Ra(C3),L3=tt({},pm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vk=Ra(L3),T3=tt({},Zo,{submitter:0}),P3=Ra(T3),R3=tt({},cd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ay}),I3=Ra(R3),A3=tt({},Zo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Q3=Ra(A3),M3=tt({},pm,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),E3=Ra(M3),D3=tt({},Zo,{newState:0,oldState:0,source:0}),$3=Ra(D3),B3=[9,13,27,32],Qy=Ai&&"CompositionEvent"in window,If=null;Ai&&"documentMode"in document&&(If=document.documentMode);var _3=Ai&&"TextEvent"in window&&!If,NT=Ai&&(!Qy||If&&8<If&&11>=If),Uk=" ",jk=!1;function XT(t,e){switch(t){case"keyup":return B3.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qT(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ku=!1;function z3(t,e){switch(t){case"compositionend":return qT(e);case"keypress":return e.which!==32?null:(jk=!0,Uk);case"textInput":return t=e.data,t===Uk&&jk?null:t;default:return null}}function N3(t,e){if(ku)return t==="compositionend"||!Qy&&XT(t,e)?(t=zT(),yp=Iy=wo=null,ku=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return NT&&e.locale!=="ko"?null:e.data;default:return null}}var X3={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fk(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!X3[t.type]:e==="textarea"}function ZT(t,e,a,r){Cu?Du?Du.push(r):Du=[r]:Cu=r,e=lm(e,"onChange"),0<e.length&&(a=new hm("onChange","change",null,a,r),t.push({event:a,listeners:e}))}var Af=null,Uf=null;function q3(t){_R(t,0)}function mm(t){var e=Tf(t);if(MT(e))return t}function Hk(t,e){if(t==="change")return e}var VT=!1;Ai&&(Ai?(rp="oninput"in document,rp||(U0=document.createElement("div"),U0.setAttribute("oninput","return;"),rp=typeof U0.oninput=="function"),ap=rp):ap=!1,VT=ap&&(!document.documentMode||9<document.documentMode));var ap,rp,U0;function Gk(){Af&&(Af.detachEvent("onpropertychange",UT),Uf=Af=null)}function UT(t){if(t.propertyName==="value"&&mm(Uf)){var e=[];ZT(e,Uf,t,Ry(t)),_T(q3,e)}}function Z3(t,e,a){t==="focusin"?(Gk(),Af=e,Uf=a,Af.attachEvent("onpropertychange",UT)):t==="focusout"&&Gk()}function V3(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return mm(Uf)}function U3(t,e){if(t==="click")return mm(e)}function j3(t,e){if(t==="input"||t==="change")return mm(e)}function F3(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Or=typeof Object.is=="function"?Object.is:F3;function jf(t,e){if(Or(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var a=Object.keys(t),r=Object.keys(e);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var n=a[r];if(!Sx.call(e,n)||!Or(t[n],e[n]))return!1}return!0}function Tx(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Yk(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Wk(t,e){var a=Yk(t);t=0;for(var r;a;){if(a.nodeType===3){if(r=t+a.textContent.length,t<=e&&r>=e)return{node:a,offset:e-t};t=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Yk(a)}}function jT(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?jT(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function FT(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Tx(t.document);e instanceof t.HTMLIFrameElement;){try{var a=typeof e.contentWindow.location.href=="string"}catch{a=!1}if(a)t=e.contentWindow;else break;e=Tx(t.document)}return e}function My(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var H3=Ai&&"documentMode"in document&&11>=document.documentMode,Lu=null,Px=null,Qf=null,Rx=!1;function Kk(t,e,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Rx||Lu==null||Lu!==Tx(r)||(r=Lu,"selectionStart"in r&&My(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}),Qf&&jf(Qf,r)||(Qf=r,r=lm(Px,"onSelect"),0<r.length&&(e=new hm("onSelect","select",null,e,a),t.push({event:e,listeners:r}),e.target=Lu)))}function Ds(t,e){var a={};return a[t.toLowerCase()]=e.toLowerCase(),a["Webkit"+t]="webkit"+e,a["Moz"+t]="moz"+e,a}var Tu={animationend:Ds("Animation","AnimationEnd"),animationiteration:Ds("Animation","AnimationIteration"),animationstart:Ds("Animation","AnimationStart"),transitionrun:Ds("Transition","TransitionRun"),transitionstart:Ds("Transition","TransitionStart"),transitioncancel:Ds("Transition","TransitionCancel"),transitionend:Ds("Transition","TransitionEnd")},j0={},HT={};Ai&&(HT=document.createElement("div").style,"AnimationEvent"in window||(delete Tu.animationend.animation,delete Tu.animationiteration.animation,delete Tu.animationstart.animation),"TransitionEvent"in window||delete Tu.transitionend.transition);function rl(t){if(j0[t])return j0[t];if(!Tu[t])return t;var e=Tu[t],a;for(a in e)if(e.hasOwnProperty(a)&&a in HT)return j0[t]=e[a];return t}var GT=rl("animationend"),YT=rl("animationiteration"),WT=rl("animationstart"),G3=rl("transitionrun"),Y3=rl("transitionstart"),W3=rl("transitioncancel"),KT=rl("transitionend"),JT=new Map,Ix="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ix.push("scrollEnd");function fn(t,e){JT.set(t,e),al(e,[t])}var K3=0;function Qi(t,e){if(t.name!=null&&t.name!=="auto")return t.name;if(e.autoName!==null)return e.autoName;t=cn.identifierPrefix;var a=K3++;return t="_"+t+"t_"+a.toString(32)+"_",e.autoName=t}function Jk(t){if(t==null||typeof t=="string")return t;var e=null,a=qu;if(a!==null)for(var r=0;r<a.length;r++){var n=t[a[r]];if(n!=null){if(n==="none")return"none";e=e==null?n:e+(" "+n)}}return e??t.default}function _i(t,e){return t=Jk(t),e=Jk(e),e==null?t==="auto"?null:t:e==="auto"?null:e}var Xp=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Ar=[],Pu=0,Ey=0;function gm(){for(var t=Pu,e=Ey=Pu=0;e<t;){var a=Ar[e];Ar[e++]=null;var r=Ar[e];Ar[e++]=null;var n=Ar[e];Ar[e++]=null;var i=Ar[e];if(Ar[e++]=null,r!==null&&n!==null){var o=r.pending;o===null?n.next=n:(n.next=o.next,o.next=n),r.pending=n}i!==0&&eP(a,n,i)}}function Om(t,e,a,r){Ar[Pu++]=t,Ar[Pu++]=e,Ar[Pu++]=a,Ar[Pu++]=r,Ey|=r,t.lanes|=r,t=t.alternate,t!==null&&(t.lanes|=r)}function Dy(t,e,a,r){return Om(t,e,a,r),qp(t)}function nl(t,e){return Om(t,null,null,e),qp(t)}function eP(t,e,a){t.lanes|=a;var r=t.alternate;r!==null&&(r.lanes|=a);for(var n=!1,i=t.return;i!==null;)i.childLanes|=a,r=i.alternate,r!==null&&(r.childLanes|=a),i.tag===22&&(t=i.stateNode,t===null||t._visibility&1||(n=!0)),t=i,i=i.return;return t.tag===3?(i=t.stateNode,n&&e!==null&&(n=31-mr(a),t=i.hiddenUpdates,r=t[n],r===null?t[n]=[e]:r.push(e),e.lane=a|536870912),i):null}function qp(t){if(50<qf)throw qf=0,Ip=null,Error(I(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Ru={};function J3(t,e,a,r){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,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 Ha(t,e,a,r){return new J3(t,e,a,r)}function $y(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ri(t,e){var a=t.alternate;return a===null?(a=Ha(t.tag,e,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=e,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&1206910976,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,e=t.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function tP(t,e){t.flags&=1206910978;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,e=a.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function vp(t,e,a,r,n,i){var o=0;if(r=t,typeof r=="function")$y(r)&&(o=1);else if(typeof r=="string")o=kq(t,a,Kn.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(r){case Ox:return t=Ha(31,a,e,n),t.elementType=Ox,t.lanes=i,t;case Su:return Zs(a.children,n,i,e);case xT:o=8,n|=24;break;case px:return t=Ha(12,a,e,n|2),t.elementType=px,t.lanes=i,t;case mx:return t=Ha(13,a,e,n),t.elementType=mx,t.lanes=i,t;case gx:return t=Ha(19,a,e,n),t.elementType=gx,t.lanes=i,t;case NN:case xx:return t=n|32,t=Ha(30,a,e,t),t.elementType=xx,t.lanes=i,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case Hn:o=10;break e;case yT:o=9;break e;case wy:o=11;break e;case Cy:o=14;break e;case yo:o=16,r=null;break e}o=29,a=Error(I(130,t===null?"null":typeof t,"")),r=null}return e=Ha(o,a,e,n),e.elementType=t,e.type=r,e.lanes=i,e}function Zs(t,e,a,r){return t=Ha(7,t,r,e),t.lanes=a,t}function F0(t,e,a){return t=Ha(6,t,null,e),t.lanes=a,t}function aP(t){var e=Ha(18,null,null,0);return e.stateNode=t,e}function H0(t,e,a){return e=Ha(4,t.children!==null?t.children:[],t.key,e),e.lanes=a,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var eL=new WeakMap;function Dr(t,e){if(typeof t=="object"&&t!==null){var a=eL.get(t);return a!==void 0?a:(e={value:t,source:e,stack:Qk(e)},eL.set(t,e),e)}return{value:t,source:e,stack:Qk(e)}}var Iu=[],Au=0,Zp=null,Ff=0,Qr=[],Mr=0,_o=null,Yn=1,Wn="";function Ti(t,e){Iu[Au++]=Ff,Iu[Au++]=Zp,Zp=t,Ff=e}function rP(t,e,a){Qr[Mr++]=Yn,Qr[Mr++]=Wn,Qr[Mr++]=_o,_o=t;var r=Yn;t=Wn;var n=32-mr(r)-1;r&=~(1<<n),a+=1;var i=32-mr(e)+n;if(30<i){var o=n-n%5;i=(r&(1<<o)-1).toString(32),r>>=o,n-=o,Yn=1<<32-mr(e)+n|a<<n|r,Wn=i+t}else Yn=1<<i|a<<n|r,Wn=t}function xm(t){t.return!==null&&(Ti(t,1),rP(t,1,0))}function By(t){for(;t===Zp;)Zp=Iu[--Au],Iu[Au]=null,Ff=Iu[--Au],Iu[Au]=null;for(;t===_o;)_o=Qr[--Mr],Qr[Mr]=null,Wn=Qr[--Mr],Qr[Mr]=null,Yn=Qr[--Mr],Qr[Mr]=null}function nP(t,e){Qr[Mr++]=Yn,Qr[Mr++]=Wn,Qr[Mr++]=_o,Yn=e.id,Wn=e.overflow,_o=t}var Gt=null,lt=null,be=!1,Ro=null,$r=!1,Ax=Error(I(519));function zo(t){var e=Error(I(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hf(Dr(e,t)),Ax}function tL(t){var e=t.stateNode,a=t.type,r=t.memoizedProps;switch(e[ra]=t,e[Wa]=r,a){case"dialog":we("cancel",e),we("close",e);break;case"iframe":case"object":case"embed":we("load",e);break;case"video":case"audio":for(a=0;a<Kf.length;a++)we(Kf[a],e);break;case"source":we("error",e);break;case"img":case"image":case"link":we("error",e),we("load",e);break;case"details":we("toggle",e);break;case"input":we("invalid",e),ET(e,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":we("invalid",e);break;case"textarea":we("invalid",e),$T(e,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||e.textContent===""+a||r.suppressHydrationWarning===!0||NR(e.textContent,a)?(r.popover!=null&&(we("beforetoggle",e),we("toggle",e)),r.onScroll!=null&&we("scroll",e),r.onScrollEnd!=null&&we("scrollend",e),r.onClick!=null&&(e.onclick=Gn),e=!0):e=!1,e||zo(t,!0)}function Vp(t){for(Gt=t.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:$r=!1;return;case 27:case 3:$r=!0;return;default:Gt=Gt.return}}function gu(t){if(t!==Gt)return!1;if(!be)return Vp(t),be=!0,!1;var e=t.tag,a;if((a=e!==3&&e!==27)&&((a=e===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||my(t.type,t.memoizedProps)),a=!a),a&&lt&&zo(t),Vp(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(I(317));lt=WL(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(I(317));lt=WL(t)}else e===27?(e=lt,Vo(t.type)?(t=yy,yy=null,lt=t):lt=e):lt=Gt?Br(t.stateNode.nextSibling):null;return!0}function Fs(){lt=Gt=null,be=!1}function G0(){var t=Ro;return t!==null&&(ja===null?ja=t:ja.push.apply(ja,t),Ro=null),t}function Hf(t){Ro===null?Ro=[t]:Ro.push(t)}var Qx=ti(null),il=null,Pi=null;function Co(t,e,a){ut(Qx,e._currentValue),e._currentValue=a}function Ii(t){t._currentValue=Qx.current,ia(Qx)}function Sp(t,e,a){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===a)break;t=t.return}}function Mx(t,e,a,r){var n=t.child;for(n!==null&&(n.return=t);n!==null;){var i=n.dependencies;if(i!==null){var o=n.child;i=i.firstContext;e:for(;i!==null;){var s=i;i=n;for(var l=0;l<e.length;l++)if(s.context===e[l]){i.lanes|=a,s=i.alternate,s!==null&&(s.lanes|=a),Sp(i.return,a,t),r||(o=null);break e}i=s.next}}else if(n.tag===18){if(o=n.return,o===null)throw Error(I(341));o.lanes|=a,i=o.alternate,i!==null&&(i.lanes|=a),Sp(o,a,t),o=null}else n.tag===13&&n.memoizedState!==null&&n.memoizedState.dehydrated===null?(n.lanes|=a,o=n.alternate,o!==null&&(o.lanes|=a),Sp(n.return,a,t),o=n.child,o=o!==null?o.sibling:null):o=n.child;if(o!==null)o.return=n;else for(o=n;o!==null;){if(o===t){o=null;break}if(n=o.sibling,n!==null){n.return=o.return,o=n;break}o=o.return}n=o}}function Hs(t,e,a,r){t=null;for(var n=e,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var o=n.alternate;if(o===null)throw Error(I(387));if(o=o.memoizedProps,o!==null){var s=n.type;Or(n.pendingProps.value,o.value)||(t!==null?t.push(s):t=[s])}}else if(n===$p.current){if(o=n.alternate,o===null)throw Error(I(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(t!==null?t.push(Ju):t=[Ju])}n=n.return}return t!==null&&Mx(e,t,a,r),e.flags|=262144,t!==null}function Up(t){for(t=t.firstContext;t!==null;){if(!Or(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Gs(t){il=t,Pi=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function na(t){return iP(il,t)}function np(t,e){return il===null&&Gs(t),iP(t,e)}function iP(t,e){var a=e._currentValue;if(e={context:e,memoizedValue:a,next:null},Pi===null){if(t===null)throw Error(I(308));Pi=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Pi=Pi.next=e;return a}var eX=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(a,r){t.push(r)}};this.abort=function(){e.aborted=!0,t.forEach(function(a){return a()})}},tX=Xt.unstable_scheduleCallback,aX=Xt.unstable_NormalPriority,Qt={$$typeof:Hn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _y(){return{controller:new eX,data:new Map,refCount:0}}function fd(t){t.refCount--,t.refCount===0&&tX(aX,function(){t.controller.abort()})}function aL(t,e){if((t.pendingLanes&4194048)!==0){var a=t.transitionTypes;for(a===null&&(a=t.transitionTypes=[]),t=0;t<e.length;t++){var r=e[t];a.indexOf(r)===-1&&a.push(r)}}}var Pf=null;function rX(t){var e=t.transitionTypes;return t.transitionTypes=null,e}var Mf=null,Ex=0,Ys=0,$u=null;function nX(t,e){if(Mf===null){var a=Mf=[];Ex=0,Ys=db(),$u={status:"pending",value:void 0,then:function(r){a.push(r)}}}return Ex++,e.then(rL,rL),e}function rL(){if(--Ex===0&&(Pf=null,Mf!==null)){$u!==null&&($u.status="fulfilled");var t=Mf;Mf=null,Ys=0,$u=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function iX(t,e){var a=[],r={status:"pending",value:null,reason:null,then:function(n){a.push(n)}};return t.then(function(){r.status="fulfilled",r.value=e;for(var n=0;n<a.length;n++)(0,a[n])(e)},function(n){for(r.status="rejected",r.reason=n,n=0;n<a.length;n++)(0,a[n])(void 0)}),r}var nL=he.S;he.S=function(t,e){if(wR=hr(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&nX(t,e),Pf!==null)for(var a=Yu;a!==null;)aL(a,Pf),a=a.next;if(a=t.types,a!==null){for(var r=Yu;r!==null;)aL(r,a),r=r.next;if(Ys!==0){r=Pf,r===null&&(r=Pf=[]);for(var n=0;n<a.length;n++){var i=a[n];r.indexOf(i)===-1&&r.push(i)}}}nL!==null&&nL(t,e)};var Vs=ti(null);function zy(){var t=Vs.current;return t!==null?t:et.pooledCache}function wp(t,e){e===null?ut(Vs,Vs.current):ut(Vs,e.pool)}function oP(){var t=zy();return t===null?null:{parent:Qt._currentValue,pool:t}}var nc=Error(I(460)),Ny=Error(I(474)),ym=Error(I(542)),jp={then:function(){}};function iL(t){return t=t.status,t==="fulfilled"||t==="rejected"}function sP(t,e,a){switch(a=t[a],a===void 0?t.push(e):a!==e&&(e.then(Gn,Gn),e=a),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,sL(t),t===void 0&&!("reason"in e)?Error(I(600)):t;default:if(typeof e.status=="string")e.then(Gn,Gn);else{if(t=et,t!==null&&100<t.shellSuspendCounter)throw Error(I(482));t=e,t.status="pending",t.then(function(r){if(e.status==="pending"){var n=e;n.status="fulfilled",n.value=r}},function(r){if(e.status==="pending"){var n=e;n.status="rejected",n.reason=r}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,sL(t),t}throw Us=e,nc}}function _s(t){try{var e=t._init;return e(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Us=a,nc):a}}var Us=null;function oL(){if(Us===null)throw Error(I(459));var t=Us;return Us=null,t}function sL(t){if(t===nc||t===ym)throw Error(I(483))}var Bu=null,Gf=0;function ip(t){var e=Gf;return Gf+=1,Bu===null&&(Bu=[]),sP(Bu,t,e)}function go(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function op(t,e){throw e.$$typeof===zN?Error(I(525)):(t=Object.prototype.toString.call(e),Error(I(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function lP(t){function e(g,O){if(t){var y=g.deletions;y===null?(g.deletions=[O],g.flags|=16):y.push(O)}}function a(g,O){if(!t)return null;for(;O!==null;)e(g,O),O=O.sibling;return null}function r(g){for(var O=new Map;g!==null;)g.key===null?O.set(g.index,g):O.set(g.key,g),g=g.sibling;return O}function n(g,O){return g=Ri(g,O),g.index=0,g.sibling=null,g}function i(g,O,y){return g.index=y,t?(y=g.alternate,y!==null?(y=y.index,y<O?(g.flags|=2,O):y):(g.flags|=134217730,O)):(g.flags|=1048576,O)}function o(g){return t&&g.alternate===null&&(g.flags|=134217730),g}function s(g,O,y,b){return O===null||O.tag!==6?(O=F0(y,g.mode,b),O.return=g,O):(O=n(O,y),O.return=g,O)}function l(g,O,y,b){var v=y.type;return v===Su?(g=c(g,O,y.props.children,b,y.key),go(g,y),g):O!==null&&(O.elementType===v||typeof v=="object"&&v!==null&&v.$$typeof===yo&&_s(v)===O.type)?(O=n(O,y.props),go(O,y),O.return=g,O):(O=vp(y.type,y.key,y.props,null,g.mode,b),go(O,y),O.return=g,O)}function u(g,O,y,b){return O===null||O.tag!==4||O.stateNode.containerInfo!==y.containerInfo||O.stateNode.implementation!==y.implementation?(O=H0(y,g.mode,b),O.return=g,O):(O=n(O,y.children||[]),O.return=g,O)}function c(g,O,y,b,v){return O===null||O.tag!==7?(O=Zs(y,g.mode,b,v),O.return=g,O):(O=n(O,y),O.return=g,O)}function f(g,O,y){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=F0(""+O,g.mode,y),O.return=g,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case Yh:return y=vp(O.type,O.key,O.props,null,g.mode,y),go(y,O),y.return=g,y;case kf:return O=H0(O,g.mode,y),O.return=g,O;case yo:return O=_s(O),f(g,O,y)}if(Lf(O)||yf(O))return O=Zs(O,g.mode,y,null),O.return=g,O;if(typeof O.then=="function")return f(g,ip(O),y);if(O.$$typeof===Hn)return f(g,np(g,O),y);op(g,O)}return null}function d(g,O,y,b){var v=O!==null?O.key:null;if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return v!==null?null:s(g,O,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Yh:return y.key===v?l(g,O,y,b):null;case kf:return y.key===v?u(g,O,y,b):null;case yo:return y=_s(y),d(g,O,y,b)}if(Lf(y)||yf(y))return v!==null?null:c(g,O,y,b,null);if(typeof y.then=="function")return d(g,O,ip(y),b);if(y.$$typeof===Hn)return d(g,O,np(g,y),b);op(g,y)}return null}function h(g,O,y,b,v){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return g=g.get(y)||null,s(O,g,""+b,v);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Yh:return g=g.get(b.key===null?y:b.key)||null,l(O,g,b,v);case kf:return g=g.get(b.key===null?y:b.key)||null,u(O,g,b,v);case yo:return b=_s(b),h(g,O,y,b,v)}if(Lf(b)||yf(b))return g=g.get(y)||null,c(O,g,b,v,null);if(typeof b.then=="function")return h(g,O,y,ip(b),v);if(b.$$typeof===Hn)return h(g,O,y,np(O,b),v);op(O,b)}return null}function p(g,O,y,b){for(var v=null,S=null,w=O,k=O=0,T=null;w!==null&&k<y.length;k++){w.index>k?(T=w,w=null):T=w.sibling;var Q=d(g,w,y[k],b);if(Q===null){w===null&&(w=T);break}t&&w&&Q.alternate===null&&e(g,w),O=i(Q,O,k),S===null?v=Q:S.sibling=Q,S=Q,w=T}if(k===y.length)return a(g,w),be&&Ti(g,k),v;if(w===null){for(;k<y.length;k++)w=f(g,y[k],b),w!==null&&(O=i(w,O,k),S===null?v=w:S.sibling=w,S=w);return be&&Ti(g,k),v}for(w=r(w);k<y.length;k++)T=h(w,g,k,y[k],b),T!==null&&(t&&(Q=T.alternate,Q!==null&&w.delete(Q.key===null?k:Q.key)),O=i(T,O,k),S===null?v=T:S.sibling=T,S=T);return t&&w.forEach(function($){return e(g,$)}),be&&Ti(g,k),v}function m(g,O,y,b){if(y==null)throw Error(I(151));for(var v=null,S=null,w=O,k=O=0,T=null,Q=y.next();w!==null&&!Q.done;k++,Q=y.next()){w.index>k?(T=w,w=null):T=w.sibling;var $=d(g,w,Q.value,b);if($===null){w===null&&(w=T);break}t&&w&&$.alternate===null&&e(g,w),O=i($,O,k),S===null?v=$:S.sibling=$,S=$,w=T}if(Q.done)return a(g,w),be&&Ti(g,k),v;if(w===null){for(;!Q.done;k++,Q=y.next())Q=f(g,Q.value,b),Q!==null&&(O=i(Q,O,k),S===null?v=Q:S.sibling=Q,S=Q);return be&&Ti(g,k),v}for(w=r(w);!Q.done;k++,Q=y.next())Q=h(w,g,k,Q.value,b),Q!==null&&(t&&(T=Q.alternate,T!==null&&w.delete(T.key===null?k:T.key)),O=i(Q,O,k),S===null?v=Q:S.sibling=Q,S=Q);return t&&w.forEach(function(A){return e(g,A)}),be&&Ti(g,k),v}function x(g,O,y,b){if(typeof y=="object"&&y!==null&&y.type===Su&&y.key===null&&y.props.ref===void 0&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Yh:e:{for(var v=y.key;O!==null;){if(O.key===v){if(v=y.type,v===Su){if(O.tag===7){a(g,O.sibling),b=n(O,y.props.children),go(b,y),b.return=g,g=b;break e}}else if(O.elementType===v||typeof v=="object"&&v!==null&&v.$$typeof===yo&&_s(v)===O.type){a(g,O.sibling),b=n(O,y.props),go(b,y),b.return=g,g=b;break e}a(g,O);break}else e(g,O);O=O.sibling}y.type===Su?(b=Zs(y.props.children,g.mode,b,y.key),go(b,y),b.return=g,g=b):(b=vp(y.type,y.key,y.props,null,g.mode,b),go(b,y),b.return=g,g=b)}return o(g);case kf:e:{for(v=y.key;O!==null;){if(O.key===v)if(O.tag===4&&O.stateNode.containerInfo===y.containerInfo&&O.stateNode.implementation===y.implementation){a(g,O.sibling),b=n(O,y.children||[]),b.return=g,g=b;break e}else{a(g,O);break}else e(g,O);O=O.sibling}b=H0(y,g.mode,b),b.return=g,g=b}return o(g);case yo:return y=_s(y),x(g,O,y,b)}if(Lf(y))return p(g,O,y,b);if(yf(y)){if(v=yf(y),typeof v!="function")throw Error(I(150));return y=v.call(y),m(g,O,y,b)}if(typeof y.then=="function")return x(g,O,ip(y),b);if(y.$$typeof===Hn)return x(g,O,np(g,y),b);op(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,O!==null&&O.tag===6?(a(g,O.sibling),b=n(O,y),b.return=g,g=b):(a(g,O),b=F0(y,g.mode,b),b.return=g,g=b),o(g)):a(g,O)}return function(g,O,y,b){try{Gf=0;var v=x(g,O,y,b);return Bu=null,v}catch(w){if(w===nc||w===ym)throw w;var S=Ha(29,w,null,g.mode);return S.lanes=b,S.return=g,S}}}var Ws=lP(!0),uP=lP(!1),bo=!1;function Xy(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dx(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Io(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ao(t,e,a){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,(ze&2)!==0){var n=r.pending;return n===null?e.next=e:(e.next=n.next,n.next=e),r.pending=e,e=qp(t),eP(t,null,a),e}return Om(t,r,e,a),qp(t)}function Ef(t,e,a){if(e=e.updateQueue,e!==null&&(e=e.shared,(a&4194048)!==0)){var r=e.lanes;r&=t.pendingLanes,a|=r,e.lanes=a,LT(t,a)}}function Y0(t,e){var a=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var n=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var o={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?n=i=o:i=i.next=o,a=a.next}while(a!==null);i===null?n=i=e:i=i.next=e}else n=i=e;a={baseState:r.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=e:t.next=e,a.lastBaseUpdate=e}var $x=!1;function Df(){if($x){var t=$u;if(t!==null)throw t}}function $f(t,e,a,r){$x=!1;var n=t.updateQueue;bo=!1;var i=n.firstBaseUpdate,o=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=n.baseState;o=0,c=u=l=null,s=i;do{var d=s.lane&-536870913,h=d!==s.lane;if(h?(Te&d)===d:(r&d)===d){d!==0&&d===Ys&&($x=!0),c!==null&&(c=c.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var p=t,m=s;d=e;var x=a;switch(m.tag){case 1:if(p=m.payload,typeof p=="function"){f=p.call(x,f,d);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,d=typeof p=="function"?p.call(x,f,d):p,d==null)break e;f=tt({},f,d);break e;case 2:bo=!0}}d=s.callback,d!==null&&(t.flags|=64,h&&(t.flags|=8192),h=n.callbacks,h===null?n.callbacks=[d]:h.push(d))}else h={lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=h,l=f):c=c.next=h,o|=d;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;h=s,s=h.next,h.next=null,n.lastBaseUpdate=h,n.shared.pending=null}}while(!0);c===null&&(l=f),n.baseState=l,n.firstBaseUpdate=u,n.lastBaseUpdate=c,i===null&&(n.shared.lanes=0),qo|=o,t.lanes=o,t.memoizedState=f}}function cP(t,e){if(typeof t!="function")throw Error(I(191,t));t.call(e)}function fP(t,e){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)cP(a[t],e)}var No=ti(null),Fp=ti(0);function lL(t,e){t=$i,ut(Fp,t),ut(No,e),$i=t|e.baseLanes}function Bx(){ut(Fp,$i),ut(No,No.current)}function qy(){$i=Fp.current,ia(No),ia(Fp)}var la=ti(null),xa=null;function Qo(t){var e=t.alternate;ut(oa,oa.current&1),ut(la,t),xa===null&&(e===null||No.current!==null||e.memoizedState!==null)&&(xa=t)}function _x(t){ut(oa,oa.current),ut(la,t),xa===null&&(xa=t)}function dP(t){t.tag===22?(ut(oa,oa.current),ut(la,t),xa===null&&(xa=t)):Mo()}function Mo(){ut(oa,oa.current),ut(la,la.current)}function cr(t){ia(la),xa===t&&(xa=null),ia(oa)}var oa=ti(0);function Yf(t,e){ut(la,la.current),ut(oa,e)}function Zy(t){ia(oa),ia(la),xa===t&&(xa=null)}function Hp(t){for(var e=t;e!==null;){if(e.tag===13){var a=e.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||xy(a)||gb(a)))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!=="independent"){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Mi=0,Oe=null,Ye=null,At=null,Gp=!1,_u=!1,Ks=!1,Yp=0,Wf=0,zu=null,oX=0;function Ct(){throw Error(I(321))}function Vy(t,e){if(e===null)return!1;for(var a=0;a<e.length&&a<t.length;a++)if(!Or(t[a],e[a]))return!1;return!0}function Uy(t,e,a,r,n,i){return Mi=i,Oe=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,he.H=t===null||t.memoizedState===null?ZP:VP,Ks=!1,i=a(r,n),Ks=!1,_u&&(i=pP(e,a,r,n)),hP(t),i}function hP(t){he.H=Wp;var e=Ye!==null&&Ye.next!==null;if(Mi=0,At=Ye=Oe=null,Gp=!1,Wf=0,zu=null,e)throw Error(I(300));t===null||Mt||(t=t.dependencies,t!==null&&Up(t)&&(Mt=!0))}function pP(t,e,a,r){Oe=t;var n=0;do{if(_u&&(zu=null),Wf=0,_u=!1,25<=n)throw Error(I(301));if(n+=1,At=Ye=null,t.updateQueue!=null){var i=t.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}he.H=pX,i=e(a,r)}while(_u);return i}function sX(){var t=he.H,e=t.useState()[0];return e=typeof e.then=="function"?dd(e):e,t=t.useState()[0],(Ye!==null?Ye.memoizedState:null)!==t&&(Oe.flags|=1024),e}function jy(){var t=Yp!==0;return Yp=0,t}function Fy(t,e,a){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~a}function Hy(t){if(Gp){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Gp=!1}Mi=0,At=Ye=Oe=null,_u=!1,Wf=Yp=0,zu=null}function Pa(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?Oe.memoizedState=At=t:At=At.next=t,At}function Pt(){if(Ye===null){var t=Oe.alternate;t=t!==null?t.memoizedState:null}else t=Ye.next;var e=At===null?Oe.memoizedState:At.next;if(e!==null)At=e,Ye=t;else{if(t===null)throw Oe.alternate===null?Error(I(467)):Error(I(310));Ye=t,t={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},At===null?Oe.memoizedState=At=t:At=At.next=t}return At}function bm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function dd(t){var e=Wf;return Wf+=1,zu===null&&(zu=[]),t=sP(zu,t,e),e=Oe,(At===null?e.memoizedState:At.next)===null&&(e=e.alternate,he.H=e===null||e.memoizedState===null?ZP:VP),t}function vm(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return dd(t);if(t.$$typeof===qN)return;if(t.$$typeof===Hn)return na(t)}throw Error(I(438,String(t)))}function Gy(t){var e=null,a=Oe.updateQueue;if(a!==null&&(e=a.memoCache),e==null){var r=Oe.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(e={data:r.data.map(function(n){return n.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),a===null&&(a=bm(),Oe.updateQueue=a),a.memoCache=e,a=e.data[e.index],a===void 0)for(a=e.data[e.index]=Array(t),r=0;r<t;r++)a[r]=XN;return e.index++,a}function Ei(t,e){return typeof e=="function"?e(t):e}function Cp(t){var e=Pt();return Yy(e,Ye,t)}function Yy(t,e,a){var r=t.queue;if(r===null)throw Error(I(311));r.lastRenderedReducer=a;var n=t.baseQueue,i=r.pending;if(i!==null){if(n!==null){var o=n.next;n.next=i.next,i.next=o}e.baseQueue=n=i,r.pending=null}if(i=t.baseState,n===null)t.memoizedState=i;else{e=n.next;var s=o=null,l=null,u=e,c=!1;do{var f=u.lane&-536870913;if(f!==u.lane?(Te&f)===f:(Mi&f)===f){var d=u.revertLane;if(d===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ys&&(c=!0);else if((Mi&d)===d){u=u.next,d===Ys&&(c=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=f,o=i):l=l.next=f,Oe.lanes|=d,qo|=d;f=u.action,Ks&&a(i,f),i=u.hasEagerState?u.eagerState:a(i,f)}else d={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=d,o=i):l=l.next=d,Oe.lanes|=f,qo|=f;u=u.next}while(u!==null&&u!==e);if(l===null?o=i:l.next=s,!Or(i,t.memoizedState)&&(Mt=!0,c&&(a=$u,a!==null)))throw a;t.memoizedState=i,t.baseState=o,t.baseQueue=l,r.lastRenderedState=i}return n===null&&(r.lanes=0),[t.memoizedState,r.dispatch]}function W0(t){var e=Pt(),a=e.queue;if(a===null)throw Error(I(311));a.lastRenderedReducer=t;var r=a.dispatch,n=a.pending,i=e.memoizedState;if(n!==null){a.pending=null;var o=n=n.next;do i=t(i,o.action),o=o.next;while(o!==n);Or(i,e.memoizedState)||(Mt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),a.lastRenderedState=i}return[i,r]}function mP(t,e,a){var r=Oe,n=Pt(),i=be;if(i){if(a===void 0)throw Error(I(407));a=a()}else a=e();var o=!Or((Ye||n).memoizedState,a);if(o&&(n.memoizedState=a,Mt=!0),n=n.queue,Wy(xP.bind(null,r,n,t),[t]),t=n.getSnapshot!==e||o||At!==null&&(At.memoizedState.tag&1)!==0,ju(t?9:8,{destroy:void 0},OP.bind(null,r,n,a,e),null),t){if(r.flags|=2048,et===null)throw Error(I(349));i||(Mi&127)!==0||gP(r,e,a)}return a}function gP(t,e,a){t.flags|=16384,t={getSnapshot:e,value:a},e=Oe.updateQueue,e===null?(e=bm(),Oe.updateQueue=e,e.stores=[t]):(a=e.stores,a===null?e.stores=[t]:a.push(t))}function OP(t,e,a,r){e.value=a,e.getSnapshot=r,yP(e)&&bP(t)}function xP(t,e,a){return a(function(){yP(e)&&bP(t)})}function yP(t){var e=t.getSnapshot;t=t.value;try{var a=e();return!Or(t,a)}catch{return!0}}function bP(t){var e=nl(t,2);e!==null&&Ga(e,t,2)}function zx(t){var e=Pa();if(typeof t=="function"){var a=t;if(t=a(),Ks){So(!0);try{a()}finally{So(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:t},e}function vP(t,e,a,r){return t.baseState=a,Yy(t,Ye,typeof r=="function"?r:Ei)}function lX(t,e,a,r,n){if(wm(t))throw Error(I(485));if(t=e.action,t!==null){var i={payload:n,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};he.T!==null?a(!0):i.isTransition=!1,r(i),a=e.pending,a===null?(i.next=e.pending=i,SP(e,i)):(i.next=a.next,e.pending=a.next=i)}}function SP(t,e){var a=e.action,r=e.payload,n=t.state;if(e.isTransition){var i=he.T,o={};o.types=i!==null?i.types:null,he.T=o;try{var s=a(n,r),l=he.S;l!==null&&l(o,s),uL(t,e,s)}catch(u){Nx(t,e,u)}finally{i!==null&&o.types!==null&&(i.types=o.types),he.T=i}}else try{i=a(n,r),uL(t,e,i)}catch(u){Nx(t,e,u)}}function uL(t,e,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){cL(t,e,r)},function(r){return Nx(t,e,r)}):cL(t,e,a)}function cL(t,e,a){e.status="fulfilled",e.value=a,wP(e),t.state=a,e=t.pending,e!==null&&(a=e.next,a===e?t.pending=null:(a=a.next,e.next=a,SP(t,a)))}function Nx(t,e,a){var r=t.pending;if(t.pending=null,r!==null){r=r.next;do e.status="rejected",e.reason=a,wP(e),e=e.next;while(e!==r)}t.action=null}function wP(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function CP(t,e){return e}function fL(t,e){if(be){var a=et.formState;if(a!==null){e:{var r=Oe;if(be){if(lt){t:{for(var n=lt,i=$r;n.nodeType!==8;){if(!i){n=null;break t}if(n=Br(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){lt=Br(n.nextSibling),r=n.data==="F!";break e}}zo(r)}r=!1}r&&(e=a[0])}}return a=Pa(),a.memoizedState=a.baseState=e,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:CP,lastRenderedState:e},a.queue=r,a=NP.bind(null,Oe,r),r.dispatch=a,r=zx(!1),i=tb.bind(null,Oe,!1,r.queue),r=Pa(),n={state:e,dispatch:null,action:t,pending:null},r.queue=n,a=lX.bind(null,Oe,n,i,a),n.dispatch=a,r.memoizedState=t,[e,a,!1]}function dL(t){var e=Pt();return kP(e,Ye,t)}function kP(t,e,a){if(e=Yy(t,e,CP)[0],t=Cp(Ei)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var r=dd(e)}catch(o){throw o===nc?ym:o}else r=e;e=Pt();var n=e.queue,i=n.dispatch;return a!==e.memoizedState&&(Oe.flags|=2048,ju(9,{destroy:void 0},uX.bind(null,n,a),null)),[r,i,t]}function uX(t,e){t.action=e}function hL(t){var e=Pt(),a=Ye;if(a!==null)return kP(e,a,t);Pt(),e=e.memoizedState,a=Pt();var r=a.queue.dispatch;return a.memoizedState=t,[e,r,!1]}function ju(t,e,a,r){return t={tag:t,create:a,deps:r,inst:e,next:null},e=Oe.updateQueue,e===null&&(e=bm(),Oe.updateQueue=e),a=e.lastEffect,a===null?e.lastEffect=t.next=t:(r=a.next,a.next=t,t.next=r,e.lastEffect=t),t}function LP(){return Pt().memoizedState}function kp(t,e,a,r){var n=Pa();Oe.flags|=t,n.memoizedState=ju(1|e,{destroy:void 0},a,r===void 0?null:r)}function Sm(t,e,a,r){var n=Pt();r=r===void 0?null:r;var i=n.memoizedState.inst;Ye!==null&&r!==null&&Vy(r,Ye.memoizedState.deps)?n.memoizedState=ju(e,i,a,r):(Oe.flags|=t,n.memoizedState=ju(1|e,i,a,r))}function pL(t,e){kp(8390656,8,t,e)}function Wy(t,e){Sm(2048,8,t,e)}function cX(t){Oe.flags|=4;var e=Oe.updateQueue;if(e===null)e=bm(),Oe.updateQueue=e,e.events=[t];else{var a=e.events;a===null?e.events=[t]:a.push(t)}}function TP(t){var e=Pt().memoizedState;return cX({ref:e,nextImpl:t}),function(){if((ze&2)!==0)throw Error(I(440));return e.impl.apply(void 0,arguments)}}function PP(t,e){return Sm(4,2,t,e)}function RP(t,e){return Sm(4,4,t,e)}function IP(t,e){if(typeof e=="function"){t=t();var a=e(t);return function(){typeof a=="function"?a():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function AP(t,e,a){a=a!=null?a.concat([t]):null,Sm(4,4,IP.bind(null,e,t),a)}function Ky(){}function QP(t,e){var a=Pt();e=e===void 0?null:e;var r=a.memoizedState;return e!==null&&Vy(e,r[1])?r[0]:(a.memoizedState=[t,e],t)}function MP(t,e){var a=Pt();e=e===void 0?null:e;var r=a.memoizedState;if(e!==null&&Vy(e,r[1]))return r[0];if(r=t(),Ks){So(!0);try{t()}finally{So(!1)}}return a.memoizedState=[r,e],r}function Jy(t,e,a){return a===void 0||(Mi&1073741824)!==0&&(Te&261930)===0?t.memoizedState=e:(t.memoizedState=a,t=kR(),Oe.lanes|=t,qo|=t,a)}function EP(t,e,a,r){return Or(a,e)?a:No.current!==null?(t=Jy(t,a,r),Or(t,e)||(Mt=!0),t):(Mi&106)===0||(Mi&1073741824)!==0&&(Te&261930)===0?(Mt=!0,t.memoizedState=a):(t=kR(),Oe.lanes|=t,qo|=t,e)}function DP(t,e,a,r,n){var i=Ne.p;Ne.p=i!==0&&8>i?i:8;var o=he.T,s={};s.types=o!==null?o.types:null,he.T=s,tb(t,!1,e,a);try{var l=n(),u=he.S;if(u!==null&&u(s,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=iX(l,r);Bf(t,e,c,gr(t))}else Bf(t,e,r,gr(t))}catch(f){Bf(t,e,{then:function(){},status:"rejected",reason:f},gr())}finally{Ne.p=i,o!==null&&s.types!==null&&(o.types=s.types),he.T=o}}function fX(){}function Xx(t,e,a,r){if(t.tag!==5)throw Error(I(476));var n=$P(t).queue;DP(t,n,e,qs,a===null?fX:function(){return BP(t),a(r)})}function $P(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:qs,baseState:qs,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:qs},next:null};var a={};return e.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:a},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function BP(t){var e=$P(t);e.next===null&&(e=t.alternate.memoizedState),Bf(t,e.next.queue,{},gr())}function eb(){return na(Ju)}function _P(){return Pt().memoizedState}function zP(){return Pt().memoizedState}function dX(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var a=gr();t=Io(a);var r=Ao(e,t,a);r!==null&&(Ga(r,e,a),Ef(r,e,a)),e={cache:_y()},t.payload=e;return}e=e.return}}function hX(t,e,a){var r=gr();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},wm(t)?XP(e,a):(a=Dy(t,e,a,r),a!==null&&(Ga(a,t,r),qP(a,e,r)))}function NP(t,e,a){var r=gr();Bf(t,e,a,r)}function Bf(t,e,a,r){var n={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(wm(t))XP(e,n);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,s=i(o,a);if(n.hasEagerState=!0,n.eagerState=s,Or(s,o))return Om(t,e,n,0),et===null&&gm(),!1}catch{}if(a=Dy(t,e,n,r),a!==null)return Ga(a,t,r),qP(a,e,r),!0}return!1}function tb(t,e,a,r){if(r={lane:2,revertLane:db(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},wm(t)){if(e)throw Error(I(479))}else e=Dy(t,a,r,2),e!==null&&Ga(e,t,2)}function wm(t){var e=t.alternate;return t===Oe||e!==null&&e===Oe}function XP(t,e){_u=Gp=!0;var a=t.pending;a===null?e.next=e:(e.next=a.next,a.next=e),t.pending=e}function qP(t,e,a){if((a&4194048)!==0){var r=e.lanes;r&=t.pendingLanes,a|=r,e.lanes=a,LT(t,a)}}var Wp={readContext:na,use:vm,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct,useEffectEvent:Ct},ZP={readContext:na,use:vm,useCallback:function(t,e){return Pa().memoizedState=[t,e===void 0?null:e],t},useContext:na,useEffect:pL,useImperativeHandle:function(t,e,a){a=a!=null?a.concat([t]):null,kp(4194308,4,IP.bind(null,e,t),a)},useLayoutEffect:function(t,e){return kp(4194308,4,t,e)},useInsertionEffect:function(t,e){kp(4,2,t,e)},useMemo:function(t,e){var a=Pa();e=e===void 0?null:e;var r=t();if(Ks){So(!0);try{t()}finally{So(!1)}}return a.memoizedState=[r,e],r},useReducer:function(t,e,a){var r=Pa();if(a!==void 0){var n=a(e);if(Ks){So(!0);try{a(e)}finally{So(!1)}}}else n=e;return r.memoizedState=r.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},r.queue=t,t=t.dispatch=hX.bind(null,Oe,t),[r.memoizedState,t]},useRef:function(t){var e=Pa();return t={current:t},e.memoizedState=t},useState:function(t){t=zx(t);var e=t.queue,a=NP.bind(null,Oe,e);return e.dispatch=a,[t.memoizedState,a]},useDebugValue:Ky,useDeferredValue:function(t,e){var a=Pa();return Jy(a,t,e)},useTransition:function(){var t=zx(!1);return t=DP.bind(null,Oe,t.queue,!0,!1),Pa().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,a){var r=Oe,n=Pa();if(be){if(a===void 0)throw Error(I(407));a=a()}else{if(a=e(),et===null)throw Error(I(349));(Te&127)!==0||gP(r,e,a)}n.memoizedState=a;var i={value:a,getSnapshot:e};return n.queue=i,pL(xP.bind(null,r,i,t),[t]),r.flags|=2048,ju(9,{destroy:void 0},OP.bind(null,r,i,a,e),null),a},useId:function(){var t=Pa(),e=et.identifierPrefix;if(be){var a=Wn,r=Yn;a=(r&~(1<<32-mr(r)-1)).toString(32)+a,e="_"+e+"R_"+a,a=Yp++,0<a&&(e+="H"+a.toString(32)),e+="_"}else a=oX++,e="_"+e+"r_"+a.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:eb,useFormState:fL,useActionState:fL,useOptimistic:function(t){var e=Pa();e.memoizedState=e.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=a,e=tb.bind(null,Oe,!0,a),a.dispatch=e,[t,e]},useMemoCache:Gy,useCacheRefresh:function(){return Pa().memoizedState=dX.bind(null,Oe)},useEffectEvent:function(t){var e=Pa(),a={impl:t};return e.memoizedState=a,function(){if((ze&2)!==0)throw Error(I(440));return a.impl.apply(void 0,arguments)}}},VP={readContext:na,use:vm,useCallback:QP,useContext:na,useEffect:Wy,useImperativeHandle:AP,useInsertionEffect:PP,useLayoutEffect:RP,useMemo:MP,useReducer:Cp,useRef:LP,useState:function(){return Cp(Ei)},useDebugValue:Ky,useDeferredValue:function(t,e){var a=Pt();return EP(a,Ye.memoizedState,t,e)},useTransition:function(){var t=Cp(Ei)[0],e=Pt().memoizedState;return[typeof t=="boolean"?t:dd(t),e]},useSyncExternalStore:mP,useId:_P,useHostTransitionStatus:eb,useFormState:dL,useActionState:dL,useOptimistic:function(t,e){var a=Pt();return vP(a,Ye,t,e)},useMemoCache:Gy,useCacheRefresh:zP,useEffectEvent:TP},pX={readContext:na,use:vm,useCallback:QP,useContext:na,useEffect:Wy,useImperativeHandle:AP,useInsertionEffect:PP,useLayoutEffect:RP,useMemo:MP,useReducer:W0,useRef:LP,useState:function(){return W0(Ei)},useDebugValue:Ky,useDeferredValue:function(t,e){var a=Pt();return Ye===null?Jy(a,t,e):EP(a,Ye.memoizedState,t,e)},useTransition:function(){var t=W0(Ei)[0],e=Pt().memoizedState;return[typeof t=="boolean"?t:dd(t),e]},useSyncExternalStore:mP,useId:_P,useHostTransitionStatus:eb,useFormState:hL,useActionState:hL,useOptimistic:function(t,e){var a=Pt();return Ye!==null?vP(a,Ye,t,e):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Gy,useCacheRefresh:zP,useEffectEvent:TP};function K0(t,e,a,r){e=t.memoizedState,a=a(r,e),a=a==null?e:tt({},e,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var qx={enqueueSetState:function(t,e,a){t=t._reactInternals;var r=gr(),n=Io(r);n.payload=e,a!=null&&(n.callback=a),e=Ao(t,n,r),e!==null&&(Ga(e,t,r),Ef(e,t,r))},enqueueReplaceState:function(t,e,a){t=t._reactInternals;var r=gr(),n=Io(r);n.tag=1,n.payload=e,a!=null&&(n.callback=a),e=Ao(t,n,r),e!==null&&(Ga(e,t,r),Ef(e,t,r))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var a=gr(),r=Io(a);r.tag=2,e!=null&&(r.callback=e),e=Ao(t,r,a),e!==null&&(Ga(e,t,a),Ef(e,t,a))}};function mL(t,e,a,r,n,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,o):e.prototype&&e.prototype.isPureReactComponent?!jf(a,r)||!jf(n,i):!0}function gL(t,e,a,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(a,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(a,r),e.state!==t&&qx.enqueueReplaceState(e,e.state,null)}function Js(t,e){var a=e;if("ref"in e){a={};for(var r in e)r!=="ref"&&(a[r]=e[r])}if(t=t.defaultProps){a===e&&(a=tt({},a));for(var n in t)a[n]===void 0&&(a[n]=t[n])}return a}function UP(t){Xp(t)}function jP(t){console.error(t)}function FP(t){Xp(t)}function Kp(t,e){try{var a=t.onUncaughtError;a(e.value,{componentStack:e.stack})}catch(r){setTimeout(function(){throw r})}}function OL(t,e,a){try{var r=t.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Zx(t,e,a){return a=Io(a),a.tag=3,a.payload={element:null},a.callback=function(){Kp(t,e)},a}function HP(t){return t=Io(t),t.tag=3,t}function GP(t,e,a,r){var n=a.type.getDerivedStateFromError;if(typeof n=="function"){var i=r.value;t.payload=function(){return n(i)},t.callback=function(){OL(e,a,r)}}var o=a.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(t.callback=function(){OL(e,a,r),typeof n!="function"&&(Eo===null?Eo=new Set([this]):Eo.add(this));var s=r.stack;this.componentDidCatch(r.value,{componentStack:s!==null?s:""})})}function mX(t,e,a,r,n){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(e=a.alternate,e!==null&&Hs(e,a,n,!0),a=la.current,a!==null){switch(a.tag){case 31:case 13:case 19:return xa===null?om():a.alternate===null&&kt===0&&(kt=3),a.flags&=-257,a.flags|=65536,a.lanes=n,r===jp?a.flags|=16384:(e=a.updateQueue,e===null?a.updateQueue=new Set([r]):e.add(r),ix(t,r,n)),!1;case 22:return a.flags|=65536,r===jp?a.flags|=16384:(e=a.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=e):(a=e.retryQueue,a===null?e.retryQueue=new Set([r]):a.add(r)),ix(t,r,n)),!1}throw Error(I(435,a.tag))}return ix(t,r,n),om(),!1}if(be)return e=la.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=n,r!==Ax&&(t=Error(I(422),{cause:r}),Hf(Dr(t,a)))):(r!==Ax&&(e=Error(I(423),{cause:r}),Hf(Dr(e,a))),t=t.current.alternate,t.flags|=65536,n&=-n,t.lanes|=n,r=Dr(r,a),n=Zx(t.stateNode,r,n),Y0(t,n),kt!==4&&(kt=2)),!1;var i=Error(I(520),{cause:r});if(i=Dr(i,a),Xf===null?Xf=[i]:Xf.push(i),kt!==4&&(kt=2),e===null)return!0;r=Dr(r,a),a=e;do{switch(a.tag){case 3:return a.flags|=65536,t=n&-n,a.lanes|=t,t=Zx(a.stateNode,r,t),Y0(a,t),!1;case 1:if(e=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Eo===null||!Eo.has(i))))return a.flags|=65536,n&=-n,a.lanes|=n,n=HP(n),GP(n,t,a,r),Y0(a,n),!1;break;case 22:if(a.memoizedState!==null)return a.flags|=65536,!1}a=a.return}while(a!==null);return!1}var ab=Error(I(461)),Mt=!1;function zt(t,e,a,r){e.child=t===null?uP(e,null,a,r):Ws(e,t.child,a,r)}function xL(t,e,a,r,n){a=a.render;var i=e.ref;if("ref"in r){var o={};for(var s in r)s!=="ref"&&(o[s]=r[s])}else o=r;return Gs(e),r=Uy(t,e,a,o,i,n),s=jy(),t!==null&&!Mt?(Fy(t,e,n),Di(t,e,n)):(be&&s&&xm(e),e.flags|=1,zt(t,e,r,n),e.child)}function yL(t,e,a,r,n){if(t===null){var i=a.type;return typeof i=="function"&&!$y(i)&&i.defaultProps===void 0&&a.compare===null?(e.tag=15,e.type=i,YP(t,e,i,r,n)):(t=vp(a.type,null,r,e,e.mode,n),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!nb(t,n)){var o=i.memoizedProps;if(a=a.compare,a=a!==null?a:jf,a(o,r)&&t.ref===e.ref)return Di(t,e,n)}return e.flags|=1,t=Ri(i,r),t.ref=e.ref,t.return=e,e.child=t}function YP(t,e,a,r,n){if(t!==null){var i=t.memoizedProps;if(jf(i,r)&&t.ref===e.ref)if(Mt=!1,e.pendingProps=r=i,nb(t,n))(t.flags&131072)!==0&&(Mt=!0);else return e.lanes=t.lanes,Di(t,e,n)}return Vx(t,e,a,r,n)}function WP(t,e,a,r){var n=r.children,i=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((e.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,t!==null){for(r=e.child=t.child,n=0;r!==null;)n=n|r.lanes|r.childLanes,r=r.sibling;r=n&~i}else r=0,e.child=null;return bL(t,e,i,a,r)}if((a&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&wp(e,i!==null?i.cachePool:null),i!==null?lL(e,i):Bx(),dP(e);else return r=e.lanes=536870912,bL(t,e,i!==null?i.baseLanes|a:a,a,r)}else i!==null?(wp(e,i.cachePool),lL(e,i),Mo(),e.memoizedState=null):(t!==null&&wp(e,null),Bx(),Mo());return zt(t,e,n,a),e.child}function _f(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function bL(t,e,a,r,n){var i=zy();return i=i===null?null:{parent:Qt._currentValue,pool:i},e.memoizedState={baseLanes:a,cachePool:i},t!==null&&wp(e,null),Bx(),dP(e),t!==null&&Hs(t,e,r,!0),e.childLanes=n,null}function Lp(t,e){return e=Cm({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function vL(t,e,a){return Ws(e,t.child,null,a),t=Lp(e,e.pendingProps),t.flags|=2,cr(e),e.memoizedState=null,t}function gX(t,e,a){var r=e.pendingProps,n=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(be){if(r.mode==="hidden")return t=Lp(e,r),e.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},_f(null,t);if(_x(e),(t=lt)?(t=WR(t,$r),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:_o!==null?{id:Yn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},a=aP(t),a.return=e,e.child=a,Gt=e,lt=null)):t=null,t===null)throw zo(e);return e.lanes=536870912,null}return Lp(e,r)}var i=t.memoizedState;if(i!==null){var o=i.dehydrated;if(_x(e),n)if(e.flags&256)e.flags&=-257,e=vL(t,e,a);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(I(558));else if(Mt||Hs(t,e,a,!1),n=(a&t.childLanes)!==0,Mt||n){if(No.current===null){if(r=et,r!==null&&(o=TT(r,a),o!==0&&o!==i.retryLane))throw i.retryLane=o,nl(t,o),Ga(r,t,o),ab;om()}e=vL(t,e,a)}else t=i.treeContext,lt=Br(o.nextSibling),Gt=e,be=!0,Ro=null,$r=!1,t!==null&&nP(e,t),e=Lp(e,r),e.flags|=134221824;return e}return t=Ri(t.child,{mode:r.mode,children:r.children}),t.ref=e.ref,e.child=t,t.return=e,t}function xu(t,e){var a=e.ref;if(a===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(I(284));(t===null||t.ref!==a)&&(e.flags|=4194816)}}function Vx(t,e,a,r,n){return Gs(e),a=Uy(t,e,a,r,void 0,n),r=jy(),t!==null&&!Mt?(Fy(t,e,n),Di(t,e,n)):(be&&r&&xm(e),e.flags|=1,zt(t,e,a,n),e.child)}function SL(t,e,a,r,n,i){return Gs(e),e.updateQueue=null,a=pP(e,r,a,n),hP(t),r=jy(),t!==null&&!Mt?(Fy(t,e,i),Di(t,e,i)):(be&&r&&xm(e),e.flags|=1,zt(t,e,a,i),e.child)}function wL(t,e,a,r,n){if(Gs(e),e.stateNode===null){var i=Ru,o=a.contextType;typeof o=="object"&&o!==null&&(i=na(o)),i=new a(r,i),e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=qx,e.stateNode=i,i._reactInternals=e,i=e.stateNode,i.props=r,i.state=e.memoizedState,i.refs={},Xy(e),o=a.contextType,i.context=typeof o=="object"&&o!==null?na(o):Ru,i.state=e.memoizedState,o=a.getDerivedStateFromProps,typeof o=="function"&&(K0(e,a,o,r),i.state=e.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&qx.enqueueReplaceState(i,i.state,null),$f(e,r,i,n),Df(),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308),r=!0}else if(t===null){i=e.stateNode;var s=e.memoizedProps,l=Js(a,s);i.props=l;var u=i.context,c=a.contextType;o=Ru,typeof c=="object"&&c!==null&&(o=na(c));var f=a.getDerivedStateFromProps;c=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function",s=e.pendingProps!==s,c||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s||u!==o)&&gL(e,i,r,o),bo=!1;var d=e.memoizedState;i.state=d,$f(e,r,i,n),Df(),u=e.memoizedState,s||d!==u||bo?(typeof f=="function"&&(K0(e,a,f,r),u=e.memoizedState),(l=bo||mL(e,a,l,r,d,u,o))?(c||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=u),i.props=r,i.state=u,i.context=o,r=l):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{i=e.stateNode,Dx(t,e),o=e.memoizedProps,c=Js(a,o),i.props=c,f=e.pendingProps,d=i.context,u=a.contextType,l=Ru,typeof u=="object"&&u!==null&&(l=na(u)),s=a.getDerivedStateFromProps,(u=typeof s=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==f||d!==l)&&gL(e,i,r,l),bo=!1,d=e.memoizedState,i.state=d,$f(e,r,i,n),Df();var h=e.memoizedState;o!==f||d!==h||bo||t!==null&&t.dependencies!==null&&Up(t.dependencies)?(typeof s=="function"&&(K0(e,a,s,r),h=e.memoizedState),(c=bo||mL(e,a,c,r,d,h,l)||t!==null&&t.dependencies!==null&&Up(t.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,h,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,h,l)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=h),i.props=r,i.state=h,i.context=l,r=c):(typeof i.componentDidUpdate!="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return i=r,xu(t,e),r=(e.flags&128)!==0,i||r?(i=e.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:i.render(),e.flags|=1,t!==null&&r?(e.child=Ws(e,t.child,null,n),e.child=Ws(e,null,a,n)):zt(t,e,a,n),e.memoizedState=i.state,t=e.child):t=Di(t,e,n),t}function CL(t,e,a,r){return Fs(),e.flags|=256,zt(t,e,a,r),e.child}var Ux={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jx(t){return{baseLanes:t,cachePool:oP()}}function Fx(t,e,a){return t=t!==null?t.childLanes&~a:0,e&&(t|=dr),t}function KP(t,e,a){var r=e.pendingProps,n=!1,i=(e.flags&128)!==0,o;if((o=i)||(o=t!==null&&t.memoizedState===null?!1:(oa.current&2)!==0),o&&(n=!0,e.flags&=-129),o=(e.flags&32)!==0,e.flags&=-33,t===null){if(be){if(n?Qo(e):Mo(),(t=lt)?(t=WR(t,$r),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:_o!==null?{id:Yn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},a=aP(t),a.return=e,e.child=a,Gt=e,lt=null)):t=null,t===null)throw zo(e);return gb(t)?e.lanes=32:e.lanes=536870912,null}return i=r.children,r=r.fallback,n?(Mo(),n=e.mode,i=Cm({mode:"hidden",children:i},n),r=Zs(r,n,a,null),i.return=e,r.return=e,i.sibling=r,e.child=i,r=e.child,r.memoizedState=jx(a),r.childLanes=Fx(t,o,a),e.memoizedState=Ux,_f(null,r)):(Qo(e),rb(e,i))}var s=t.memoizedState;if(s!==null){var l=s.dehydrated;if(l!==null)return OX(t,e,i,o,r,l,s,a)}return n?(Mo(),n=r.fallback,i=e.mode,s=t.child,l=s.sibling,r=Ri(s,{mode:"hidden",children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,l!==null?n=Ri(l,n):(n=Zs(n,i,a,null),n.flags|=2),n.return=e,r.return=e,r.sibling=n,e.child=r,_f(null,r),r=e.child,n=t.child.memoizedState,n===null?n=jx(a):(i=n.cachePool,i!==null?(s=Qt._currentValue,i=i.parent!==s?{parent:s,pool:s}:i):i=oP(),n={baseLanes:n.baseLanes|a,cachePool:i}),r.memoizedState=n,r.childLanes=Fx(t,o,a),e.memoizedState=Ux,_f(t.child,r)):(Qo(e),a=t.child,t=a.sibling,a=Ri(a,{mode:"visible",children:r.children}),a.return=e,a.sibling=null,t!==null&&(o=e.deletions,o===null?(e.deletions=[t],e.flags|=16):o.push(t)),e.child=a,e.memoizedState=null,a)}function rb(t,e){return e=Cm({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Cm(t,e){return t=Ha(22,t,null,e),t.lanes=0,t}function sp(t,e,a){return Ws(e,t.child,null,a),t=rb(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function OX(t,e,a,r,n,i,o,s){if(a)return e.flags&256?(Qo(e),e.flags&=-257,sp(t,e,s)):e.memoizedState!==null?(Mo(),e.child=t.child,e.flags|=128,null):(Mo(),i=n.fallback,o=e.mode,n=Cm({mode:"visible",children:n.children},o),i=Zs(i,o,s,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,Ws(e,t.child,null,s),n=e.child,n.memoizedState=jx(s),n.childLanes=Fx(t,r,s),e.memoizedState=Ux,_f(null,n));if(Qo(e),gb(i)){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==""&&(n=Error(I(419)),n.stack="",n.digest=r,Hf({value:n,source:null,stack:null})),sp(t,e,s)}if(Mt||Hs(t,e,s,!1),r=(s&t.childLanes)!==0,Mt||r){if(No.current!==null)return sp(t,e,s);if(r=et,r!==null&&(n=TT(r,s),n!==0&&n!==o.retryLane))throw o.retryLane=n,nl(t,n),Ga(r,t,n),ab;return xy(i)||om(),sp(t,e,s)}return xy(i)?(e.flags|=192,e.child=t.child,null):(t=o.treeContext,lt=Br(i.nextSibling),Gt=e,be=!0,Ro=null,$r=!1,t!==null&&nP(e,t),e=rb(e,n.children),e.flags|=134221824,e)}function kL(t,e,a){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Sp(t.return,e,a)}function LL(t){for(var e=null;t!==null;){var a=t.alternate;a!==null&&Hp(a)===null&&(e=t),t=t.sibling}return e}function lp(t,e,a,r,n,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:n,treeForkCount:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=a,o.tailMode=n,o.treeForkCount=i)}function J0(t){var e=t.child;for(t.child=null;e!==null;){var a=e.sibling;e.sibling=t.child,t.child=e,e=a}}function Hx(t,e,a){var r=e.pendingProps,n=r.revealOrder,i=r.tail;r=r.children;var o=oa.current;if(e.flags&128)return Yf(e,o),null;var s=(o&2)!==0;if(s?(o=o&1|2,e.flags|=128):o&=1,Yf(e,o),n==="backwards"&&t!==null?(J0(t),zt(t,e,r,a),J0(t)):zt(t,e,r,a),r=be?Ff:0,!s&&t!==null&&(t.flags&128)!==0)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&kL(t,a,e);else if(t.tag===19)kL(t,a,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(n){case"backwards":a=LL(e.child),a===null?(n=e.child,e.child=null):(n=a.sibling,a.sibling=null,J0(e)),lp(e,!0,n,null,i,r);break;case"unstable_legacy-backwards":for(a=null,n=e.child,e.child=null;n!==null;){if(t=n.alternate,t!==null&&Hp(t)===null){e.child=n;break}t=n.sibling,n.sibling=a,a=n,n=t}lp(e,!0,a,null,i,r);break;case"together":lp(e,!1,null,null,void 0,r);break;case"independent":e.memoizedState=null;break;default:a=LL(e.child),a===null?(n=e.child,e.child=null):(n=a.sibling,a.sibling=null),lp(e,!1,n,a,i,r)}return e.child}function TL(t,e,a){var r=e.pendingProps;return Co(e,e.type,r.value),zt(t,e,r.children,a),e.child}function Di(t,e,a){if(t!==null&&(e.dependencies=t.dependencies),qo|=e.lanes,(a&e.childLanes)===0)if(t!==null){if(Hs(t,e,a,!1),(a&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(I(153));if(e.child!==null){for(t=e.child,a=Ri(t,t.pendingProps),e.child=a,a.return=e;t.sibling!==null;)t=t.sibling,a=a.sibling=Ri(t,t.pendingProps),a.return=e;a.sibling=null}return e.child}function nb(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Up(t)))}function xX(t,e,a){switch(e.tag){case 3:Bp(e,e.stateNode.containerInfo),Co(e,Qt,t.memoizedState.cache),Fs();break;case 27:case 5:vx(e);break;case 4:Bp(e,e.stateNode.containerInfo);break;case 10:Co(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,_x(e),null;break;case 13:var r=e.memoizedState;if(r!==null){if(r.dehydrated!==null)return Qo(e),e.flags|=128,null;r=Hs(t,e,a,!1);var n=e.child.childLanes;return r||(a&n)!==0?KP(t,e,a):(Qo(e),t=Di(t,e,a),t!==null?t.sibling:null)}Qo(e);break;case 19:if(e.flags&128)return Hx(t,e,a);if(n=(t.flags&128)!==0,r=(a&e.childLanes)!==0,r||(Hs(t,e,a,!1),r=(a&e.childLanes)!==0),n){if(r)return Hx(t,e,a);e.flags|=128}if(n=e.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Yf(e,oa.current),r)break;return null;case 22:return e.lanes=0,WP(t,e,a,e.pendingProps);case 24:Co(e,Qt,t.memoizedState.cache)}return Di(t,e,a)}function JP(t,e,a){if(t!==null)if(t.memoizedProps!==e.pendingProps)Mt=!0;else{if(!nb(t,a)&&(e.flags&128)===0)return Mt=!1,xX(t,e,a);Mt=(t.flags&131072)!==0}else Mt=!1,be&&(e.flags&1048576)!==0&&rP(e,Ff,e.index);switch(e.lanes=0,e.tag){case 16:e:{var r=e.pendingProps;if(t=_s(e.elementType),e.type=t,typeof t=="function")$y(t)?(r=Js(t,r),e.tag=1,e=wL(null,e,t,r,a)):(e.tag=0,e=Vx(null,e,t,r,a));else{if(t!=null){var n=t.$$typeof;if(n===wy){e.tag=11,e=xL(null,e,t,r,a);break e}else if(n===Cy){e.tag=14,e=yL(null,e,t,r,a);break e}else if(n===Hn){e.tag=10,e.type=t,e=TL(null,e,a);break e}}throw e=yx(t)||t,Error(I(306,e,""))}}return e;case 0:return Vx(t,e,e.type,e.pendingProps,a);case 1:return r=e.type,n=Js(r,e.pendingProps),wL(t,e,r,n,a);case 3:e:{if(Bp(e,e.stateNode.containerInfo),t===null)throw Error(I(387));r=e.pendingProps;var i=e.memoizedState;n=i.element,Dx(t,e),$f(e,r,null,a);var o=e.memoizedState;if(r=o.cache,Co(e,Qt,r),r!==i.cache&&Mx(e,[Qt],a,!0),Df(),r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){e=CL(t,e,r,a);break e}else if(r!==n){n=Dr(Error(I(424)),e),Hf(n),e=CL(t,e,r,a);break e}else for(t=e.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,lt=Br(t.firstChild),Gt=e,be=!0,Ro=null,$r=!0,a=uP(e,null,r,a),e.child=a;a;)a.flags=a.flags&-3|134221824,a=a.sibling;else{if(Fs(),r===n){e=Di(t,e,a);break e}zt(t,e,r,a)}e=e.child}return e;case 26:return xu(t,e),t===null?(a=eT(e.type,null,e.pendingProps,null))?e.memoizedState=a:be||(e.stateNode=qR(e.type,e.pendingProps,Po.current,e)):e.memoizedState=eT(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return vx(e),t===null&&be&&(r=e.stateNode=KR(e.type,e.pendingProps,Po.current),Gt=e,$r=!0,n=lt,Vo(e.type)?(yy=n,lt=Br(r.firstChild)):lt=n),zt(t,e,e.pendingProps.children,a),xu(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&be&&((n=r=lt)&&(r=cq(r,e.type,e.pendingProps,$r),r!==null?(e.stateNode=r,Gt=e,lt=Br(r.firstChild),$r=!1,n=!0):n=!1),n||zo(e)),vx(e),n=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,r=i.children,my(n,i)?r=null:o!==null&&my(n,o)&&(e.flags|=32),e.memoizedState!==null&&(n=Uy(t,e,sX,null,null,a),Ju._currentValue=n),xu(t,e),zt(t,e,r,a),e.child;case 6:return t===null&&be&&((t=a=lt)&&(a=fq(a,e.pendingProps,$r),a!==null?(e.stateNode=a,Gt=e,lt=null,t=!0):t=!1),t||zo(e)),null;case 13:return KP(t,e,a);case 4:return Bp(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Ws(e,null,r,a):zt(t,e,r,a),e.child;case 11:return xL(t,e,e.type,e.pendingProps,a);case 7:return r=e.pendingProps,xu(t,e),zt(t,e,r,a),e.child;case 8:return zt(t,e,e.pendingProps.children,a),e.child;case 12:return zt(t,e,e.pendingProps.children,a),e.child;case 10:return TL(t,e,a);case 9:return n=e.type._context,r=e.pendingProps.children,Gs(e),n=na(n),r=r(n),e.flags|=1,zt(t,e,r,a),e.child;case 14:return yL(t,e,e.type,e.pendingProps,a);case 15:return YP(t,e,e.type,e.pendingProps,a);case 19:return Hx(t,e,a);case 31:return gX(t,e,a);case 22:return WP(t,e,a,e.pendingProps);case 24:return Gs(e),r=na(Qt),t===null?(n=zy(),n===null&&(n=et,i=_y(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=a),n=i),e.memoizedState={parent:r,cache:n},Xy(e),Co(e,Qt,n)):((t.lanes&a)!==0&&(Dx(t,e),$f(e,null,null,a),Df()),n=t.memoizedState,i=e.memoizedState,n.parent!==r?(n={parent:r,cache:r},e.memoizedState=n,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=n),Co(e,Qt,r)):(r=i.cache,Co(e,Qt,r),r!==n.cache&&Mx(e,[Qt],a,!0))),zt(t,e,e.pendingProps.children,a),e.child;case 30:return e.stateNode===null&&(e.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=e.pendingProps,r.name!=null&&r.name!=="auto"?e.flags|=t===null?18882560:18874368:be&&xm(e),t!==null&&t.memoizedProps.name!==r.name?e.flags|=4194816:xu(t,e),zt(t,e,r.children,a),e.child;case 29:throw e.pendingProps}throw Error(I(156,e.tag))}function Li(t){t.flags|=4}function ex(t,e,a,r,n){var i;if((i=(t.mode&32)!==0)&&(i=a===null?rT(e,r):rT(e,r)&&(r.src!==a.src||r.srcSet!==a.srcSet)),i){if(t.flags|=16777216,(n&335544128)===n)if(t.stateNode.complete)t.flags|=8192;else if(PR())t.flags|=8192;else throw Us=jp,Ny}else t.flags&=-16777217}function PL(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!aI(e))if(PR())t.flags|=8192;else throw Us=jp,Ny}function up(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?CT():536870912,t.lanes|=e,Fu|=e)}function vf(t,e){if(!be)switch(t.tailMode){case"visible":break;case"collapsed":for(var a=t.tail,r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null;break;default:for(e=t.tail,a=null;e!==null;)e.alternate!==null&&(a=e),e=e.sibling;a===null?t.tail=null:a.sibling=null}}function st(t){var e=t.alternate!==null&&t.alternate.child===t.child,a=0,r=0;if(e)for(var n=t.child;n!==null;)a|=n.lanes|n.childLanes,r|=n.subtreeFlags&1206910976,r|=n.flags&1206910976,n.return=t,n=n.sibling;else for(n=t.child;n!==null;)a|=n.lanes|n.childLanes,r|=n.subtreeFlags,r|=n.flags,n.return=t,n=n.sibling;return t.subtreeFlags|=r,t.childLanes=a,e}function yX(t,e,a){var r=e.pendingProps;switch(By(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(e),null;case 1:return st(e),null;case 3:return a=e.stateNode,r=null,t!==null&&(r=t.memoizedState.cache),e.memoizedState.cache!==r&&(e.flags|=2048),Ii(Qt),Zu(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(gu(e)?Li(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,G0())),st(e),null;case 26:var n=e.type,i=e.memoizedState;return t===null?(Li(e),i!==null?(st(e),PL(e,i)):(st(e),ex(e,n,null,r,a))):i?i!==t.memoizedState?(Li(e),st(e),PL(e,i)):(st(e),e.flags&=-16777217):(t=t.memoizedProps,t!==r&&Li(e),st(e),ex(e,n,t,r,a)),null;case 27:if(_p(e),a=Po.current,n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==r&&Li(e);else{if(!r){if(e.stateNode===null)throw Error(I(166));return st(e),e.subtreeFlags&=-33554433,null}t=Kn.current,gu(e)?tL(e,t):(t=KR(n,r,a),e.stateNode=t,Li(e))}return st(e),e.subtreeFlags&=-33554433,null;case 5:if(_p(e),n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==r&&Li(e);else{if(!r){if(e.stateNode===null)throw Error(I(166));return st(e),e.subtreeFlags&=-33554433,null}if(i=Kn.current,gu(e))tL(e,i);else{var o=ed(Po.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?o.createElement("select",{is:r.is}):o.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?o.createElement(n,{is:r.is}):o.createElement(n)}}i[ra]=e,i[Wa]=r;e:for(o=e.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)break e;for(;o.sibling===null;){if(o.return===null||o.return===e)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}e.stateNode=i;e:switch(sa(i,n,r),n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Li(e)}}return st(e),e.subtreeFlags&=-33554433,ex(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,a),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==r&&Li(e);else{if(typeof r!="string"&&e.stateNode===null)throw Error(I(166));if(t=Po.current,gu(e)){if(t=e.stateNode,a=e.memoizedProps,r=null,n=Gt,n!==null)switch(n.tag){case 27:case 5:r=n.memoizedProps}t[ra]=e,t=!!(t.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||NR(t.nodeValue,a)),t||zo(e,!0)}else t=ed(t).createTextNode(r),t[ra]=e,e.stateNode=t}return st(e),null;case 31:if(a=e.memoizedState,t===null||t.memoizedState!==null){if(r=gu(e),a!==null){if(t===null){if(!r)throw Error(I(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(I(557));t[ra]=e}else Fs(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;st(e),t=!1}else a=G0(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return e.flags&256?(cr(e),e):(cr(e),null);if((e.flags&128)!==0)throw Error(I(558))}return st(e),null;case 13:if(r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=gu(e),r!==null&&r.dehydrated!==null){if(t===null){if(!n)throw Error(I(318));if(n=e.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(I(317));n[ra]=e}else Fs(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;st(e),n=!1}else n=G0(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),n=!0;if(!n)return e.flags&256?(cr(e),e):(cr(e),null)}return cr(e),(e.flags&128)!==0?(e.lanes=a,e):(a=r!==null,t=t!==null&&t.memoizedState!==null,a&&(r=e.child,n=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(n=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==n&&(r.flags|=2048)),a!==t&&a&&(e.child.flags|=8192),up(e,e.updateQueue),st(e),null);case 4:return Zu(),t===null&&hb(e.stateNode.containerInfo),e.flags|=67108864,st(e),null;case 10:return Ii(e.type),st(e),null;case 19:if(Zy(e),r=e.memoizedState,r===null)return st(e),null;if(n=(e.flags&128)!==0,i=r.rendering,i===null)if(n)vf(r,!1);else{if(kt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(i=Hp(t),i!==null){for(e.flags|=128,vf(r,!1),t=i.updateQueue,e.updateQueue=t,up(e,t),e.subtreeFlags=0,t=a,a=e.child;a!==null;)tP(a,t),a=a.sibling;return Yf(e,oa.current&1|2),be&&Ti(e,r.treeForkCount),e.child}t=t.sibling}r.tail!==null&&hr()>nm&&(e.flags|=128,n=!0,vf(r,!1),e.lanes=4194304)}else{if(!n)if(t=Hp(i),t!==null){if(e.flags|=128,n=!0,t=t.updateQueue,e.updateQueue=t,up(e,t),vf(r,!0),r.tail===null&&r.tailMode!=="collapsed"&&r.tailMode!=="visible"&&!i.alternate&&!be)return st(e),null}else 2*hr()-r.renderingStartTime>nm&&a!==536870912&&(e.flags|=128,n=!0,vf(r,!1),e.lanes=4194304);r.isBackwards?(i.sibling=e.child,e.child=i):(t=r.last,t!==null?t.sibling=i:e.child=i,r.last=i)}if(r.tail!==null){t=r.tail;e:{for(a=t;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return r.rendering=t,r.tail=t.sibling,r.renderingStartTime=hr(),t.sibling=null,i=oa.current,i=n?i&1|2:i&1,r.tailMode==="visible"||r.tailMode==="collapsed"||!a||be?Yf(e,i):(a=i,ut(la,e),ut(oa,a),xa===null&&(xa=e)),be&&Ti(e,r.treeForkCount),t}return st(e),null;case 22:case 23:return cr(e),qy(),r=e.memoizedState!==null,t!==null?t.memoizedState!==null!==r&&(e.flags|=8192):r&&(e.flags|=8192),r?(a&536870912)!==0&&(e.flags&128)===0&&(st(e),e.subtreeFlags&6&&(e.flags|=8192)):st(e),a=e.updateQueue,a!==null&&up(e,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),r=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),r!==a&&(e.flags|=2048),t!==null&&ia(Vs),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),Ii(Qt),st(e),null;case 25:return null;case 30:return e.flags|=33554432,st(e),null}throw Error(I(156,e.tag))}function bX(t,e){switch(By(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ii(Qt),Zu(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return _p(e),null;case 31:if(e.memoizedState!==null){if(cr(e),e.alternate===null)throw Error(I(340));Fs()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(cr(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(I(340));Fs()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Zy(e),t=e.flags,t&65536?(e.flags=t&-65537|128,t=e.memoizedState,t!==null&&(t.rendering=null,t.tail=null),e.flags|=4,e):null;case 4:return Zu(),null;case 10:return Ii(e.type),null;case 22:case 23:return cr(e),qy(),t!==null&&ia(Vs),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Ii(Qt),null;case 25:return null;default:return null}}function eR(t,e){switch(By(e),e.tag){case 3:Ii(Qt),Zu();break;case 26:case 27:case 5:_p(e);break;case 4:Zu();break;case 31:e.memoizedState!==null&&cr(e);break;case 13:cr(e);break;case 19:Zy(e);break;case 10:Ii(e.type);break;case 22:case 23:cr(e),qy(),t!==null&&ia(Vs);break;case 24:Ii(Qt)}}function hd(t,e){try{var a=e.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var n=r.next;a=n;do{if((a.tag&t)===t){r=void 0;var i=a.create,o=a.inst;r=i(),o.destroy=r}a=a.next}while(a!==n)}}catch(s){Fe(e,e.return,s)}}function Xo(t,e,a){try{var r=e.updateQueue,n=r!==null?r.lastEffect:null;if(n!==null){var i=n.next;r=i;do{if((r.tag&t)===t){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,n=e;var l=a,u=s;try{u()}catch(c){Fe(n,l,c)}}}r=r.next}while(r!==i)}}catch(c){Fe(e,e.return,c)}}function tR(t){var e=t.updateQueue;if(e!==null){var a=t.stateNode;try{fP(e,a)}catch(r){Fe(t,t.return,r)}}}function aR(t,e,a){a.props=Js(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(r){Fe(t,e,r)}}function jn(t,e){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var r=t.stateNode;break;case 30:var n=t.stateNode,i=Qi(t.memoizedProps,n);(n.ref===null||n.ref.name!==i)&&(n.ref=jR(i)),r=n.ref;break;case 7:if(t.stateNode===null){var o=new xr(t);Ya(t.child,!1,lq,o,void 0,void 0),t.stateNode=o}r=t.stateNode;break;default:r=t.stateNode}typeof a=="function"?t.refCleanup=a(r):a.current=r}}catch(s){Fe(t,e,s)}}function aa(t,e){var a=t.ref,r=t.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(n){Fe(t,e,n)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(n){Fe(t,e,n)}else a.current=null}function Jp(t,e){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&e!==null)for(var a=0;a<e.length;a++)YR(t.stateNode,e[a])}function RL(t){for(var e=t.return;e!==null&&(ob(e)&&YR(t.stateNode,e.stateNode),!ib(e));)e=e.return}function zf(t){for(var e=t.return;e!==null&&(ob(e)&&uq(t.stateNode,e.stateNode),!ib(e));)e=e.return}function ib(t){return t.tag===5||t.tag===3||t.tag===27}function ob(t){return t&&t.tag===7&&t.stateNode!==null}function Gx(t){var e=t.type,a=t.memoizedProps,r=t.stateNode;try{e:switch(e){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(n){Fe(t,t.return,n)}}function tx(t,e,a){try{var r=t.stateNode;VX(r,t.type,a,e),r[Wa]=e}catch(n){Fe(t,t.return,n)}}function rR(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Vo(t.type)||t.tag===4}function ax(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||rR(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Vo(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Yx(t,e,a,r){var n=t.tag;if(n===5||n===6)n=t.stateNode,e?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(n,e):(e=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,e.appendChild(n),a=a._reactRootContainer,a!=null||e.onclick!==null||(e.onclick=Gn)),Jp(t,r),Be=!0;else if(n!==4&&(n===27&&(Jp(t,r),r=null,Vo(t.type)&&(a=t.stateNode,e=null)),t=t.child,t!==null))for(Yx(t,e,a,r),t=t.sibling;t!==null;)Yx(t,e,a,r),t=t.sibling}function em(t,e,a,r){var n=t.tag;if(n===5||n===6)n=t.stateNode,e?a.insertBefore(n,e):a.appendChild(n),Jp(t,r),Be=!0;else if(n!==4&&(n===27&&(Jp(t,r),r=null,Vo(t.type)&&(a=t.stateNode)),t=t.child,t!==null))for(em(t,e,a,r),t=t.sibling;t!==null;)em(t,e,a,r),t=t.sibling}function nR(t){var e=t.stateNode,a=t.memoizedProps;try{for(var r=t.type,n=e.attributes;n.length;)e.removeAttributeNode(n[0]);sa(e,r,a),e[ra]=t,e[Wa]=a}catch(i){Fe(t,t.return,i)}}var tm=!1,fr=null;function IL(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(tm=!0)}var Fn=null;function AL(){var t=Fn;return Fn=null,t}var Fa=0;function ic(t,e,a,r,n){return Fa=0,iR(t.child,e,a,r,n)}function iR(t,e,a,r,n){for(var i=!1;t!==null;){if(t.tag===5){var o=t.stateNode;if(r!==null){var s=gy(o);r.push(s),s.view&&(i=!0)}else i||gy(o).view&&(i=!0);tm=!0,ZR(o,Fa===0?e:e+"_"+Fa,a),Fa++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&n||iR(t.child,e,a,r,n)&&(i=!0));t=t.sibling}return i}function ei(t,e){for(;t!==null;)t.tag===5?VR(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&e||ei(t.child,e)),t=t.sibling}function Tp(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Tp(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var e=t.memoizedProps;if(e.name==null||e.name==="auto")throw Error(I(544));var a=e.name;e=_i(e.default,e.share),e!=="none"&&(ic(t,a,e,null,!1)||ei(t.child,!1))}t=t.sibling}}function Wx(t,e){if(t.tag===30){var a=t.stateNode,r=t.memoizedProps,n=Qi(r,a),i=_i(r.default,a.paired?r.share:r.enter);i!=="none"?ic(t,n,i,null,!1)?(Tp(t),a.paired||e||Hu(t,r.onEnter)):ei(t.child,!1):Tp(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Wx(t,e),t=t.sibling;else Tp(t)}function Kx(t){if(fr!==null&&fr.size!==0){var e=fr;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var a=t.memoizedProps,r=a.name;if(r!=null&&r!=="auto"){var n=e.get(r);if(n!==void 0){var i=_i(a.default,a.share);if(i!=="none"&&(ic(t,r,i,null,!1)?(i=t.stateNode,n.paired=i,i.paired=n,Hu(t,a.onShare)):ei(t.child,!1)),e.delete(r),e.size===0)break}}}Kx(t)}t=t.sibling}}}function Jx(t){if(t.tag===30){var e=t.memoizedProps,a=Qi(e,t.stateNode),r=fr!==null?fr.get(a):void 0,n=_i(e.default,r!==void 0?e.share:e.exit);n!=="none"&&(ic(t,a,n,null,!1)?r!==void 0?(n=t.stateNode,r.paired=n,n.paired=r,fr.delete(a),Hu(t,e.onShare)):Hu(t,e.onExit):ei(t.child,!1)),fr!==null&&Kx(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Jx(t),t=t.sibling;else fr!==null&&Kx(t)}function oR(t){for(t=t.child;t!==null;){if(t.tag===30){var e=t.memoizedProps,a=Qi(e,t.stateNode);e=_i(e.default,e.update),t.flags&=-5,e!=="none"&&ic(t,a,e,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&oR(t);t=t.sibling}}function ey(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var e=t.stateNode;e.paired!==null&&(e.paired=null,ei(t.child,!1))}ey(t)}t=t.sibling}}function Pp(t){if(t.tag===30)t.stateNode.paired=null,ei(t.child,!1),ey(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Pp(t),t=t.sibling;else ey(t)}function sR(t){for(t=t.child;t!==null;)t.tag===30?ei(t.child,!1):(t.subtreeFlags&33554432)!==0&&sR(t),t=t.sibling}function sb(t,e,a,r,n,i,o){for(var s=!1;e!==null;){if(e.tag===5){var l=e.stateNode;if(i!==null&&Fa<i.length){var u=i[Fa],c=gy(l);(u.view||c.view)&&(s=!0);var f;if(f=(t.flags&4)===0)if(c.clip)f=!0;else{f=u.rect;var d=c.rect;f=f.y!==d.y||f.x!==d.x||f.height!==d.height||f.width!==d.width}f&&(t.flags|=4),c.abs?c=!u.abs:(u=u.rect,c=c.rect,c=u.height!==c.height||u.width!==c.width),c&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&ZR(l,Fa===0?a:a+"_"+Fa,n),s&&(t.flags&4)!==0||(Fn===null&&(Fn=[]),Fn.push(l,Fa===0?r:r+"_"+Fa,e.memoizedProps)),Fa++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&o?t.flags|=e.flags&32:sb(t,e.child,a,r,n,i,o)&&(s=!0));e=e.sibling}return s}function lR(t,e){for(t=t.child;t!==null;){if(t.tag===30){var a=t.memoizedProps,r=t.stateNode,n=Qi(a,r),i=_i(a.default,a.update);if(e){r=r.clones;var o=r===null?null:r.map(YX)}else o=t.memoizedState,t.memoizedState=null;r=t;var s=t.child;Fa=0,n=sb(r,s,n,n,i,o,!1),(t.flags&4)!==0&&n&&(e||Hu(t,a.onUpdate))}else(t.subtreeFlags&33554432)!==0&&lR(t,e);t=t.sibling}}var jt=!1,Ve=!1,Zn=!1,rx=!1,QL=typeof WeakSet=="function"?WeakSet:Set,Ft=null,Vn=!1,Rf=!1,am=!1,ty=!1;function vX(t,e,a){if(t=t.containerInfo,hy=ec,t=FT(t),My(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,l=-1,u=-1,c=0,f=0,d=t,h=null;t:for(;;){for(var p;d!==r||i!==0&&d.nodeType!==3||(l=s+i),d!==o||n!==0&&d.nodeType!==3||(u=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===t)break t;if(h===r&&++c===i&&(l=s),h===o&&++f===n&&(u=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(py={focusedElem:t,selectionRange:r},ec=!1,a=(a&335544064)===a,Ft=e,e=a?9270:1024;Ft!==null;){if(t=Ft,a&&(r=t.deletions,r!==null))for(i=0;i<r.length;i++)a&&Jx(r[i]);if(t.alternate===null&&(t.flags&2)!==0)a&&IL(t),cp(a);else{if(t.tag===22){if(r=t.alternate,t.memoizedState!==null){r!==null&&r.memoizedState===null&&a&&Jx(r),cp(a);continue}else if(r!==null&&r.memoizedState!==null){a&&IL(t),cp(a);continue}}r=t.child,(t.subtreeFlags&e)!==0&&r!==null?(r.return=t,Ft=r):(a&&oR(t),cp(a))}}fr=null}function cp(t){for(;Ft!==null;){var e=Ft,a=t,r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 15:break;case 1:if((n&1024)!==0&&r!==null){a=void 0,n=r.memoizedProps,r=r.memoizedState;var i=e.stateNode;try{var o=Js(e.type,n);a=i.getSnapshotBeforeUpdate(o,r),i.__reactInternalSnapshotBeforeUpdate=a}catch(s){Fe(e,e.return,s)}}break;case 3:if((n&1024)!==0){if(r=e.stateNode.containerInfo,a=r.nodeType,a===9)Oy(r);else if(a===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Oy(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:a&&r!==null&&(a=Qi(r.memoizedProps,r.stateNode),n=e.memoizedProps,n=_i(n.default,n.update),n!=="none"&&ic(r,a,n,r.memoizedState=[],!0));break;default:if((n&1024)!==0)throw Error(I(163))}if(r=e.sibling,r!==null){r.return=e.return,Ft=r;break}Ft=e.return}}function uR(t,e,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:Un(t,a),r&4&&hd(5,a);break;case 1:if(Un(t,a),r&4)if(t=a.stateNode,e===null)try{t.componentDidMount()}catch(o){Fe(a,a.return,o)}else{var n=Js(a.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(n,e,t.__reactInternalSnapshotBeforeUpdate)}catch(o){Fe(a,a.return,o)}}r&64&&tR(a),r&512&&jn(a,a.return);break;case 3:if(Un(t,a),r&64&&(t=a.updateQueue,t!==null)){if(e=null,a.child!==null)switch(a.child.tag){case 27:case 5:e=a.child.stateNode;break;case 1:e=a.child.stateNode}try{fP(t,e)}catch(o){Fe(a,a.return,o)}}break;case 27:e===null&&r&4&&nR(a);case 26:case 5:Un(t,a),e===null&&r&4&&Gx(a),r&512&&jn(a,a.return);break;case 12:Un(t,a);break;case 31:Un(t,a),r&4&&hR(t,a);break;case 13:Un(t,a),r&4&&pR(t,a),r&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=MX.bind(null,a),dq(t,a))));break;case 22:if(r=a.memoizedState!==null||jt,!r){var i=e!==null&&e.memoizedState!==null||Ve;e=jt,n=Ve,jt=r,(Ve=i)&&!n?(r=2,(a.subtreeFlags&8772)!==0&&(r|=1),sn(t,a,r)):Un(t,a),jt=e,Ve=n}break;case 30:Un(t,a),r&512&&jn(a,a.return);break;case 7:r&512&&jn(a,a.return);default:Un(t,a)}}function ay(t,e){for(t=t.child;t!==null;)cR(t,e),t=t.sibling}function cR(t,e){switch(t.tag){case 5:case 26:try{var a=t.stateNode;if(e){var r=a.style;typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none"}else{var n=t.stateNode,i=t.memoizedProps.style,o=i!=null&&i.hasOwnProperty("display")?i.display:null;n.style.display=o==null||typeof o=="boolean"?"":(""+o).trim()}}catch(l){Fe(t,t.return,l)}ry(t,e);break;case 6:try{t.stateNode.nodeValue=e?"":t.memoizedProps,Be=!0}catch(l){Fe(t,t.return,l)}break;case 18:try{var s=t.stateNode;e?HL(s,!0):HL(t.stateNode,!1)}catch(l){Fe(t,t.return,l)}break;case 22:case 23:t.memoizedState===null&&ay(t,e);break;default:ay(t,e)}}function ry(t,e){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var a=t,r=e;switch(a.tag){case 4:cR(a,r);break e;case 22:a.memoizedState===null&&ry(a,r);break e;default:ry(a,r)}}t=t.sibling}}function fR(t){var e=t.alternate;e!==null&&(t.alternate=null,fR(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&dm(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Ot=null,Ua=!1;function on(t,e,a){for(a=a.child;a!==null;)dR(t,e,a),a=a.sibling}function dR(t,e,a){if(pr&&typeof pr.onCommitFiberUnmount=="function")try{pr.onCommitFiberUnmount(od,a)}catch{}switch(a.tag){case 26:Ve||aa(a,e),on(t,e,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&!Ve&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ve||aa(a,e),zf(a);var r=Ot,n=Ua;Vo(a.type)&&(Ot=a.stateNode,Ua=!1),on(t,e,a),JR(a.stateNode,a.type,a.memoizedProps),Ot=r,Ua=n;break;case 5:Ve||aa(a,e),zf(a);case 6:if(a.tag===6&&zf(a),r=Ot,n=Ua,Ot=null,on(t,e,a),Ot=r,Ua=n,Ot!==null)if(Ua)try{(Ot.nodeType===9?Ot.body:Ot.nodeName==="HTML"?Ot.ownerDocument.body:Ot).removeChild(a.stateNode),Be=!0}catch(i){Fe(a,e,i)}else try{Ot.removeChild(a.stateNode),Be=!0}catch(i){Fe(a,e,i)}break;case 18:Ot!==null&&(Ua?(t=Ot,FL(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),tc(t)):FL(Ot,a.stateNode));break;case 4:r=Ot,n=Ua,Ot=a.stateNode.containerInfo,Ua=!0,on(t,e,a),Ot=r,Ua=n;break;case 0:case 11:case 14:case 15:Xo(2,a,e),Ve||Xo(4,a,e),on(t,e,a);break;case 1:Ve||(aa(a,e),r=a.stateNode,typeof r.componentWillUnmount=="function"&&aR(a,e,r)),on(t,e,a);break;case 21:on(t,e,a);break;case 22:Ve=(r=Ve)||a.memoizedState!==null,on(t,e,a),Ve=r;break;case 30:aa(a,e),on(t,e,a);break;case 7:Ve||aa(a,e),on(t,e,a);break;default:on(t,e,a)}}function hR(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{tc(t)}catch(a){Fe(e,e.return,a)}}}function pR(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{tc(t)}catch(a){Fe(e,e.return,a)}}function SX(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new QL),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new QL),e;default:throw Error(I(435,t.tag))}}function fp(t,e){var a=SX(t);e.forEach(function(r){if(!a.has(r)){a.add(r);var n=EX.bind(null,t,r);r.then(n,n)}})}function La(t,e,a){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n],o=t,s=e,l=s;e:for(;l!==null;){switch(l.tag){case 27:if(Vo(l.type)){Ot=l.stateNode,Ua=!1;break e}break;case 5:Ot=l.stateNode,Ua=!1;break e;case 3:case 4:Ot=l.stateNode.containerInfo,Ua=!0;break e}l=l.return}if(Ot===null)throw Error(I(160));dR(o,s,i),Ot=null,Ua=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)mR(e,t,a),e=e.sibling}var ln=null;function mR(t,e,a){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(n&4&&(r=t.updateQueue,r=r!==null?r.events:null,r!==null))for(var i=0;i<r.length;i++){var o=r[i];o.ref.impl=o.nextImpl}La(e,t,a),Ta(t),n&4&&(Xo(3,t,t.return),hd(3,t),Xo(5,t,t.return));break;case 1:La(e,t,a),Ta(t),n&512&&(Ve||r===null||aa(r,r.return)),n&64&&jt&&(t=t.updateQueue,t!==null&&(e=t.callbacks,e!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?e:a.concat(e))));break;case 26:if(i=ln,La(e,t,a),Ta(t),n&512&&(Ve||r===null||aa(r,r.return)),n&4)if(n=r!==null?r.memoizedState:null,a=t.memoizedState,r===null)if(a===null)if(t.stateNode===null)if(jt)t.stateNode=qR(t.type,t.memoizedProps,e.containerInfo,t);else{e:{e=t.type,a=t.memoizedProps,n=i.ownerDocument||i;t:switch(e){case"title":r=n.getElementsByTagName("title")[0],(!r||r[ud]||r[ra]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=n.createElement(e),n.head.insertBefore(r,n.querySelector("head > title"))),sa(r,e,a),r[ra]=t,Ht(r),e=r;break e;case"link":if(i=aT("link","href",n).get(e+(a.href||""))){for(o=0;o<i.length;o++)if(r=i[o],r.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&r.getAttribute("rel")===(a.rel==null?null:a.rel)&&r.getAttribute("title")===(a.title==null?null:a.title)&&r.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){i.splice(o,1);break t}}r=n.createElement(e),sa(r,e,a),n.head.appendChild(r);break;case"meta":if(i=aT("meta","content",n).get(e+(a.content||""))){for(o=0;o<i.length;o++)if(r=i[o],r.getAttribute("content")===(a.content==null?null:""+a.content)&&r.getAttribute("name")===(a.name==null?null:a.name)&&r.getAttribute("property")===(a.property==null?null:a.property)&&r.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&r.getAttribute("charset")===(a.charSet==null?null:a.charSet)){i.splice(o,1);break t}}r=n.createElement(e),sa(r,e,a),n.head.appendChild(r);break;default:throw Error(I(468,e))}r[ra]=t,Ht(r),e=r}t.stateNode=e}else jt||by(i,t.type,t.stateNode);else t.stateNode=tT(i,a,t.memoizedProps);else n!==a?(n===null?(e=r.stateNode,e===null||Ve||e.parentNode.removeChild(e)):n.count--,a===null?jt||by(i,t.type,t.stateNode):tT(i,a,t.memoizedProps)):a===null&&t.stateNode!==null&&tx(t,t.memoizedProps,r.memoizedProps);break;case 27:La(e,t,a),Ta(t),n&512&&(Ve||r===null||aa(r,r.return)),r!==null&&n&4&&tx(t,t.memoizedProps,r.memoizedProps);break;case 5:if(i=Zn,Zn=!1,La(e,t,a),Zn=i,Ta(t),n&512&&(Ve||r===null||aa(r,r.return)),t.flags&32){e=t.stateNode;try{Uu(e,""),Be=!0}catch(c){Fe(t,t.return,c)}}n&4&&t.stateNode!=null&&(e=t.memoizedProps,tx(t,e,r!==null?r.memoizedProps:e)),n&1024&&(rx=!0);break;case 6:if(La(e,t,a),Ta(t),n&4){if(t.stateNode===null)throw Error(I(162));e=t.memoizedProps,a=t.stateNode;try{a.nodeValue=e,Be=!0}catch(c){Fe(t,t.return,c)}}break;case 3:if(Be=!1,Qp=null,i=ln,ln=td(e.containerInfo),La(e,t,a),ln=i,Ta(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{tc(e.containerInfo)}catch(c){Fe(t,t.return,c)}rx&&(rx=!1,gR(t)),Be=!1;break;case 4:n=Zn,Zn=jt,r=_k(),i=ln,ln=td(t.stateNode.containerInfo),La(e,t,a),Ta(t),ln=i,Be&&Rf&&(am=!0),Be=r,Zn=n;break;case 12:La(e,t,a),Ta(t);break;case 31:La(e,t,a),Ta(t),n&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,fp(t,e)));break;case 13:La(e,t,a),Ta(t),t.child.flags&8192&&t.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(km=hr()),n&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,fp(t,e)));break;case 22:i=t.memoizedState!==null,o=r!==null&&r.memoizedState!==null;var s=jt,l=Ve,u=Zn;jt=s||i,Zn=u||i,Ve=l||o,La(e,t,a),Ve=l,Zn=u,jt=s,Ta(t),n&8192&&(e=t.stateNode,e._visibility=i?e._visibility&-2:e._visibility|1,!i||r===null||o||jt||Ve||(e=o||Ve,a=jt,r=Ve,jt=i||jt,Ve=e,xo(t,2),jt=a,Ve=r),!i&&Zn||ay(t,i)),n&4&&(e=t.updateQueue,e!==null&&(a=e.retryQueue,a!==null&&(e.retryQueue=null,fp(t,a))));break;case 19:La(e,t,a),Ta(t),n&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,fp(t,e)));break;case 30:n&512&&(Ve||r===null||aa(r,r.return)),n=_k(),i=Rf,o=(a&335544064)===a,s=t.memoizedProps,Rf=o&&_i(s.default,s.update)!=="none",La(e,t,a),Ta(t),o&&r!==null&&Be&&(t.flags|=4),Rf=i,Be=n;break;case 21:break;case 7:n&512&&(Ve||r===null||aa(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=t);default:La(e,t,a),Ta(t)}}function Ta(t){var e=t.flags;if(e&2){try{for(var a,r=t.return;r!==null;){if(rR(r)){a=r;break}r=r.return}r=null;for(var n=t.return;n!==null;){if(ob(n)){var i=n.stateNode;r===null?r=[i]:r.push(i)}if(ib(n))break;n=n.return}var o=r;if(a==null)throw Error(I(160));switch(a.tag){case 27:var s=a.stateNode,l=ax(t);em(t,l,s,o);break;case 5:var u=a.stateNode;a.flags&32&&(Uu(u,""),a.flags&=-33);var c=ax(t);em(t,c,u,o);break;case 3:case 4:var f=a.stateNode.containerInfo,d=ax(t);Yx(t,d,f,o);break;default:throw Error(I(161))}}catch(h){Fe(t,t.return,h)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function gR(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;gR(e),e.tag===5&&e.flags&1024&&(e=e.stateNode,ec=!0,e.reset(),ec=!1),t=t.sibling}}function Ou(t,e){if(e.subtreeFlags&9270)for(e=e.child;e!==null;)OR(e,t),e=e.sibling;else lR(e,!1)}function OR(t,e){var a=t.alternate;if(a===null)Wx(t,!1);else switch(t.tag){case 3:if(ty=Vn=!1,AL(),Ou(e,t),!Vn&&!am){if(t=Fn,t!==null)for(var r=0;r<t.length;r+=3){a=t[r];var n=t[r+1];VR(a,t[r+2]),a=a.ownerDocument.documentElement,a!==null&&a.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+n+")"})}t=e.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),ty=!0}Fn=null;break;case 5:Ou(e,t);break;case 4:r=Vn,Vn=!1,Ou(e,t),Vn&&(am=!0),Vn=r;break;case 22:t.memoizedState===null&&(a.memoizedState!==null?Wx(t,!1):Ou(e,t));break;case 30:r=Vn,n=AL(),Vn=!1,Ou(e,t),Vn&&(t.flags|=4);var i=t.memoizedProps,o=t.stateNode;e=Qi(i,o),o=Qi(a.memoizedProps,o);var s=_i(i.default,i.update);s==="none"?e=!1:(i=a.memoizedState,a.memoizedState=null,a=t.child,Fa=0,e=sb(t,a,e,o,s,i,!0),Fa!==(i===null?0:i.length)&&(t.flags|=32)),(t.flags&4)!==0&&e?(Hu(t,t.memoizedProps.onUpdate),Fn=n):n!==null&&(n.push.apply(n,Fn),Fn=n),Vn=(t.flags&32)!==0?!0:r;break;default:Ou(e,t)}}function Un(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)uR(t,e.alternate,e),e=e.sibling}function xo(t,e){for(t=t.child;t!==null;){var a=t,r=e;switch(a.tag){case 0:case 11:case 14:case 15:Xo(4,a,a.return),xo(a,r);break;case 1:aa(a,a.return);var n=a.stateNode;typeof n.componentWillUnmount=="function"&&aR(a,a.return,n),xo(a,r);break;case 27:(r&2)!==0&&JR(a.stateNode,a.type,a.memoizedProps);case 5:aa(a,a.return),a.tag!==5&&a.tag!==27||zf(a),xo(a,r);break;case 6:zf(a);break;case 26:aa(a,a.return),n=a.stateNode,a.memoizedState!==null||n===null||Ve||n.parentNode.removeChild(n),xo(a,r);break;case 22:a.memoizedState===null&&xo(a,r);break;case 30:aa(a,a.return),xo(a,r);break;case 7:aa(a,a.return);default:xo(a,r)}t=t.sibling}}function sn(t,e,a){for(a=(e.subtreeFlags&8772)!==0?a:a&-2,e=e.child;e!==null;){var r=e.alternate,n=t,i=e,o=i.flags,s=(a&1)!==0;switch(i.tag){case 0:case 11:case 15:sn(n,i,a),hd(4,i);break;case 1:if(sn(n,i,a),r=i,n=r.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(c){Fe(r,r.return,c)}if(r=i,n=r.updateQueue,n!==null){var l=r.stateNode;try{var u=n.shared.hiddenCallbacks;if(u!==null)for(n.shared.hiddenCallbacks=null,n=0;n<u.length;n++)cP(u[n],l)}catch(c){Fe(r,r.return,c)}}s&&o&64&&tR(i),jn(i,i.return);break;case 27:(a&2)!==0&&nR(i);case 5:i.tag!==5&&i.tag!==27||RL(i),sn(n,i,a),s&&r===null&&o&4&&Gx(i),jn(i,i.return);break;case 6:RL(i);break;case 26:l=i.stateNode,i.memoizedState!==null||l===null||jt||by(td(l.ownerDocument),i.type,l),sn(n,i,a),s&&r===null&&o&4&&Gx(i),jn(i,i.return);break;case 12:sn(n,i,a);break;case 31:sn(n,i,a),s&&o&4&&hR(n,i);break;case 13:sn(n,i,a),s&&o&4&&pR(n,i);break;case 22:i.memoizedState===null&&sn(n,i,a),jn(i,i.return);break;case 30:sn(n,i,a),jn(i,i.return);break;case 7:jn(i,i.return);default:sn(n,i,a)}e=e.sibling}}function lb(t,e){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&fd(a))}function ub(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&fd(t))}function Ir(t,e,a,r){var n=(a&335544064)===a;if(e.subtreeFlags&(n?10262:10256))for(e=e.child;e!==null;)xR(t,e,a,r),e=e.sibling;else n&&sR(e)}function xR(t,e,a,r){var n=(a&335544064)===a;n&&e.alternate===null&&e.return!==null&&e.return.alternate!==null&&Pp(e);var i=e.flags;switch(e.tag){case 0:case 11:case 15:Ir(t,e,a,r),i&2048&&hd(9,e);break;case 1:Ir(t,e,a,r);break;case 3:Ir(t,e,a,r),n&&ty&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),i&2048&&(i=null,e.alternate!==null&&(i=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==i&&(e.refCount++,i!=null&&fd(i)));break;case 12:if(i&2048){Ir(t,e,a,r),i=e.stateNode;try{var o=e.memoizedProps,s=o.id,l=o.onPostCommit;typeof l=="function"&&l(s,e.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(u){Fe(e,e.return,u)}}else Ir(t,e,a,r);break;case 31:Ir(t,e,a,r);break;case 13:Ir(t,e,a,r);break;case 23:break;case 22:o=e.stateNode,s=e.alternate,e.memoizedState!==null?(n&&s!==null&&s.memoizedState===null&&Pp(s),o._visibility&2?Ir(t,e,a,r):Nf(t,e)):(n&&s!==null&&s.memoizedState!==null&&Pp(e),o._visibility&2?Ir(t,e,a,r):(o._visibility|=2,yu(t,e,a,r,(e.subtreeFlags&10256)!==0||!1))),i&2048&&lb(s,e);break;case 24:Ir(t,e,a,r),i&2048&&ub(e.alternate,e);break;case 30:n&&(i=e.alternate,i!==null&&(ei(i.child,!0),ei(e.child,!0))),Ir(t,e,a,r);break;default:Ir(t,e,a,r)}}function yu(t,e,a,r,n){for(n=n&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var i=t,o=e,s=a,l=r,u=o.flags;switch(o.tag){case 0:case 11:case 15:yu(i,o,s,l,n),hd(8,o);break;case 23:break;case 22:var c=o.stateNode;o.memoizedState!==null?c._visibility&2?yu(i,o,s,l,n):Nf(i,o):(c._visibility|=2,yu(i,o,s,l,n)),n&&u&2048&&lb(o.alternate,o);break;case 24:yu(i,o,s,l,n),n&&u&2048&&ub(o.alternate,o);break;default:yu(i,o,s,l,n)}e=e.sibling}}function Nf(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var a=t,r=e,n=r.flags;switch(r.tag){case 22:Nf(a,r),n&2048&&lb(r.alternate,r);break;case 24:Nf(a,r),n&2048&&ub(r.alternate,r);break;default:Nf(a,r)}e=e.sibling}}var zs=8192;function $s(t,e,a){if(t.subtreeFlags&zs)for(t=t.child;t!==null;)yR(t,e,a),t=t.sibling}function yR(t,e,a){switch(t.tag){case 26:$s(t,e,a),t.flags&zs&&(t.memoizedState!==null?Lq(a,ln,t.memoizedState,t.memoizedProps):(t=t.stateNode,(e&335544128)===e&&nT(a,t)));break;case 5:$s(t,e,a),t.flags&zs&&(t=t.stateNode,(e&335544128)===e&&nT(a,t));break;case 3:case 4:var r=ln;ln=td(t.stateNode.containerInfo),$s(t,e,a),ln=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=zs,zs=16777216,$s(t,e,a),zs=r):$s(t,e,a));break;case 30:if((t.flags&zs)!==0&&(r=t.memoizedProps.name,r!=null&&r!=="auto")){var n=t.stateNode;n.paired=null,fr===null&&(fr=new Map),fr.set(r,n)}$s(t,e,a);break;default:$s(t,e,a)}}function bR(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Sf(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var a=0;a<e.length;a++){var r=e[a];Ft=r,SR(r,t)}bR(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)vR(t),t=t.sibling}function vR(t){switch(t.tag){case 0:case 11:case 15:Sf(t),t.flags&2048&&Xo(9,t,t.return);break;case 3:Sf(t);break;case 12:Sf(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Rp(t)):Sf(t);break;default:Sf(t)}}function Rp(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var a=0;a<e.length;a++){var r=e[a];Ft=r,SR(r,t)}bR(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Xo(8,e,e.return),Rp(e);break;case 22:a=e.stateNode,a._visibility&2&&(a._visibility&=-3,Rp(e));break;default:Rp(e)}t=t.sibling}}function SR(t,e){for(;Ft!==null;){var a=Ft;switch(a.tag){case 0:case 11:case 15:Xo(8,a,e);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:fd(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,Ft=r;else e:for(a=t;Ft!==null;){r=Ft;var n=r.sibling,i=r.return;if(fR(r),r===a){Ft=null;break e}if(n!==null){n.return=i,Ft=n;break e}Ft=i}}}var wX={getCacheForType:function(t){var e=na(Qt),a=e.data.get(t);return a===void 0&&(a=t(),e.data.set(t,a)),a},cacheSignal:function(){return na(Qt).controller.signal}},CX=typeof WeakMap=="function"?WeakMap:Map,ze=0,et=null,Ce=null,Te=0,Ue=0,lr=null,ko=!1,oc=!1,cb=!1,$i=0,kt=0,qo=0,js=0,rm=0,dr=0,Fu=0,Xf=null,ja=null,ny=!1,km=0,wR=0,nm=1/0,im=null,Eo=null,bt=0,cn=null,el=null,Jn=0,iy=0,oy=null,CR=null,Nu=null,Xu=null,qu=null,qf=0,Ip=null;function gr(){return(ze&2)!==0&&Te!==0?Te&-Te:he.T!==null?db():PT()}function kR(){if(dr===0)if((Te&536870912)===0||be){var t=Kh;Kh<<=1,(Kh&3932160)===0&&(Kh=262144),dr=t}else dr=536870912;return t=la.current,t!==null&&(t.flags|=32),dr}function Hu(t,e){if(e!=null){var a=t.stateNode,r=a.ref;r===null&&(r=a.ref=jR(Qi(t.memoizedProps,a))),Xu===null&&(Xu=[]),Xu.push(e.bind(null,r))}}function Ga(t,e,a){(t===et&&(Ue===2||Ue===9)||t.cancelPendingCommit!==null)&&(Gu(t,0),Lo(t,Te,dr,!1)),ld(t,a),((ze&2)===0||t!==et)&&(t===et&&((ze&2)===0&&(js|=a),kt===4&&Lo(t,Te,dr,!1)),ai(t))}function LR(t,e,a){if((ze&6)!==0)throw Error(I(327));var r=!a&&(e&127)===0&&(e&t.expiredLanes)===0||sd(t,e),n=r?TX(t,e):nx(t,e,!0),i=r;do{if(n===0){oc&&!r&&Lo(t,e,0,!1);break}else{if(a=t.current.alternate,i&&!kX(a)){n=nx(t,e,!1),i=!1;continue}if(n===2){if(i=e,t.errorRecoveryDisabledLanes&i)var o=0;else o=t.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){e=o;e:{var s=t;n=Xf;var l=s.current.memoizedState.isDehydrated;if(l&&(Gu(s,o).flags|=256),o=nx(s,o,!1),o!==2&&o!==6){if(cb&&!l){s.errorRecoveryDisabledLanes|=i,js|=i,n=4;break e}i=ja,ja=n,i!==null&&(ja===null?ja=i:ja.push.apply(ja,i))}n=o}if(i=!1,n!==2)continue}}if(n===1){Gu(t,0),Lo(t,e,0,!0);break}e:{switch(r=t,i=n,i){case 0:case 1:throw Error(I(345));case 4:if((e&4194048)!==e&&(e&62914560)!==e)break;case 6:Lo(r,e,dr,!ko);break e;case 2:ja=null;break;case 3:case 5:break;default:throw Error(I(329))}if((e&62914560)===e&&(n=km+300-hr(),10<n)){if(Lo(r,e,dr,!ko),fm(r,0,!0)!==0)break e;Jn=e,r.timeoutHandle=pb(ML.bind(null,r,a,ja,im,ny,e,dr,js,Fu,ko,i,"Throttled",-0,0),n);break e}ML(r,a,ja,im,ny,e,dr,js,Fu,ko,i,null,-0,0)}}break}while(!0);ai(t)}function ML(t,e,a,r,n,i,o,s,l,u,c,f,d,h){t.timeoutHandle=-1;var p=e.subtreeFlags,m=(i&335544064)===i;if(f=null,(m||p&8192||(p&16785408)===16785408)&&(f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gn},fr=null,yR(e,i,f),m&&(p=f,m=t.containerInfo,m=(m.nodeType===9?m:m.ownerDocument).__reactViewTransition,m!=null&&(p.count++,p.waitingForViewTransition=!0,p=ad.bind(p),m.finished.then(p,p))),p=(i&62914560)===i?km-hr():(i&4194048)===i?wR-hr():0,p=Tq(f,p),p!==null)){Jn=i,t.cancelPendingCommit=p(DL.bind(null,t,e,i,a,r,n,o,s,l,u,c,f,null,d,h)),Lo(t,i,o,!u);return}DL(t,e,i,a,r,n,o,s,l,u,c,f)}function kX(t){for(var e=t;;){var a=e.tag;if((a===0||a===11||a===15)&&e.flags&16384&&(a=e.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var n=a[r],i=n.getSnapshot;n=n.value;try{if(!Or(i(),n))return!1}catch{return!1}}if(a=e.child,e.subtreeFlags&16384&&a!==null)a.return=e,e=a;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Lo(t,e,a,r){e=wT(t,e),e&=~rm,e&=~js,t.suspendedLanes|=e,t.pingedLanes&=~e,r&&(t.warmLanes|=e),r=t.expirationTimes;for(var n=e;0<n;){var i=31-mr(n),o=1<<i;r[i]=-1,n&=~o}a!==0&&kT(t,a,e)}function Lm(){return(ze&6)===0?(pd(0,!1),!1):!0}function fb(){if(Ce!==null){if(Ue===0)var t=Ce.return;else t=Ce,Pi=il=null,Hy(t),Bu=null,Gf=0,t=Ce;for(;t!==null;)eR(t.alternate,t),t=t.return;Ce=null}}function Gu(t,e){var a=t.timeoutHandle;return a!==-1&&(t.timeoutHandle=-1,FX(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Jn=0,fb(),et=t,Ce=a=Ri(t.current,null),Te=e,Ue=0,lr=null,ko=!1,oc=sd(t,e),cb=!1,Fu=dr=rm=js=qo=kt=0,ja=Xf=null,ny=!1,$i=wT(t,e),gm(),a}function TR(t,e){Oe=null,he.H=Wp,e===nc||e===ym?(e=oL(),Ue=3):e===Ny?(e=oL(),Ue=4):Ue=e===ab?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,lr=e,Ce===null&&(kt=1,Kp(t,Dr(e,t.current)))}function PR(){var t=la.current;return t===null?!0:(Te&4194048)===Te?xa===null:(Te&62914560)===Te||(Te&536870912)!==0?t===xa:!1}function RR(){var t=he.H;return he.H=Wp,t===null?Wp:t}function IR(){var t=he.A;return he.A=wX,t}function om(){kt=4,ko||(Te&4194048)!==Te&&la.current!==null||(oc=!0),(qo&134217727)===0&&(js&134217727)===0||et===null||Lo(et,Te,dr,!1)}function nx(t,e,a){var r=ze;ze|=2;var n=RR(),i=IR();(et!==t||Te!==e)&&(im=null,Gu(t,e)),e=!1;var o=kt;e:do try{if(Ue!==0&&Ce!==null){var s=Ce,l=lr;switch(Ue){case 8:fb(),o=6;break e;case 3:case 2:case 9:case 6:la.current===null&&(e=!0);var u=Ue;if(Ue=0,lr=null,Qu(t,s,l,u),a&&oc){o=0;break e}break;default:u=Ue,Ue=0,lr=null,Qu(t,s,l,u)}}LX(),o=kt;break}catch(c){TR(t,c)}while(!0);return e&&t.shellSuspendCounter++,Pi=il=null,ze=r,he.H=n,he.A=i,Ce===null&&(et=null,Te=0,gm()),o}function LX(){for(;Ce!==null;)AR(Ce)}function TX(t,e){var a=ze;ze|=2;var r=RR(),n=IR();et!==t||Te!==e?(im=null,nm=hr()+500,Gu(t,e)):oc=sd(t,e);e:do try{if(Ue!==0&&Ce!==null){e=Ce;var i=lr;t:switch(Ue){case 1:Ue=0,lr=null,Qu(t,e,i,1);break;case 2:case 9:if(iL(i)){Ue=0,lr=null,EL(e);break}e=function(){Ue!==2&&Ue!==9||et!==t||(Ue=7),ai(t)},i.then(e,e);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:iL(i)?(Ue=0,lr=null,EL(e)):(Ue=0,lr=null,Qu(t,e,i,7));break;case 5:var o=null;switch(Ce.tag){case 26:o=Ce.memoizedState;case 5:case 27:var s=Ce;if(o?aI(o):s.stateNode.complete){Ue=0,lr=null;var l=s.sibling;if(l!==null)Ce=l;else{var u=s.return;u!==null?(Ce=u,Tm(u)):Ce=null}break t}}Ue=0,lr=null,Qu(t,e,i,5);break;case 6:Ue=0,lr=null,Qu(t,e,i,6);break;case 8:fb(),kt=6;break e;default:throw Error(I(462))}}PX();break}catch(c){TR(t,c)}while(!0);return Pi=il=null,he.H=r,he.A=n,ze=a,Ce!==null?0:(et=null,Te=0,gm(),kt)}function PX(){for(;Ce!==null&&!UN();)AR(Ce)}function AR(t){var e=JP(t.alternate,t,$i);t.memoizedProps=t.pendingProps,e===null?Tm(t):Ce=e}function EL(t){var e=t,a=e.alternate;switch(e.tag){case 15:case 0:e=SL(a,e,e.pendingProps,e.type,void 0,Te);break;case 11:e=SL(a,e,e.pendingProps,e.type.render,e.ref,Te);break;case 5:Hy(e);var r=e;r===Gt&&(be?(Vp(r),r.tag===5&&r.stateNode!=null&&(lt=r.stateNode)):(Vp(r),be=!0));default:eR(a,e),e=Ce=tP(e,$i),e=JP(a,e,$i)}t.memoizedProps=t.pendingProps,e===null?Tm(t):Ce=e}function Qu(t,e,a,r){Pi=il=null,Hy(e),Bu=null,Gf=0;var n=e.return;try{if(mX(t,n,e,a,Te)){kt=1,Kp(t,Dr(a,t.current)),Ce=null;return}}catch(i){if(n!==null)throw Ce=n,i;kt=1,Kp(t,Dr(a,t.current)),Ce=null;return}e.flags&32768?(be||r===1?t=!0:oc||(Te&536870912)!==0?t=!1:(ko=t=!0,(r===2||r===9||r===3||r===6)&&(r=la.current,r!==null&&r.tag===13&&(r.flags|=16384))),QR(e,t)):Tm(e)}function Tm(t){var e=t;do{if((e.flags&32768)!==0){QR(e,ko);return}t=e.return;var a=yX(e.alternate,e,$i);if(a!==null){Ce=a;return}if(e=e.sibling,e!==null){Ce=e;return}Ce=e=t}while(e!==null);kt===0&&(kt=5)}function QR(t,e){do{var a=bX(t.alternate,t);if(a!==null){a.flags&=32767,Ce=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!e&&(t=t.sibling,t!==null)){Ce=t;return}Ce=t=a}while(t!==null);kt=6,Ce=null}function DL(t,e,a,r,n,i,o,s,l,u,c,f){t.cancelPendingCommit=null;do Pm();while(bt!==0);if((ze&6)!==0)throw Error(I(327));if(e!==null){if(e===t.current)throw Error(I(177));t===et&&(Ce=et=null,Te=0),el=e,cn=t,Jn=a,oy=n,CR=r,RX(t,e,a,o,s,l,f)}}function RX(t,e,a,r,n,i,o){var s=e.lanes|e.childLanes;if(iy=s,s|=Ey,t3(t,a,s,r,n,i),Xu=null,(a&335544064)===a?(qu=rX(t),r=10262):(qu=null,r=10256),(e.subtreeFlags&r)!==0||(e.flags&r)!==0?(t.callbackNode=null,t.callbackPriority=0,DX(zp,function(){return cy(),null})):(t.callbackNode=null,t.callbackPriority=0),tm=!1,r=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||r){r=he.T,he.T=null,n=Ne.p,Ne.p=2,i=ze,ze|=4;try{vX(t,e,a)}finally{ze=i,Ne.p=n,he.T=r}}bt=1,tm?Nu=JX(o,t.containerInfo,qu,sy,ly,AX,uy,cy,IX,null,null):(sy(),ly(),uy())}function IX(t){if(bt!==0){var e=cn.onRecoverableError;e(t,{componentStack:null})}}function AX(){bt===3&&(bt=0,OR(el,cn),bt=4)}function sy(){if(bt===1){bt=0;var t=cn,e=el,a=Jn,r=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||r){r=he.T,he.T=null;var n=Ne.p;Ne.p=2;var i=ze;ze|=4;try{Rf=am=!1,mR(e,t,a),a=py;var o=FT(t.containerInfo),s=a.focusedElem,l=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&jT(s.ownerDocument.documentElement,s)){if(l!==null&&My(s)){var u=l.start,c=l.end;if(c===void 0&&(c=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(c,s.value.length);else{var f=s.ownerDocument||document,d=f&&f.defaultView||window;if(d.getSelection){var h=d.getSelection(),p=s.textContent.length,m=Math.min(l.start,p),x=l.end===void 0?m:Math.min(l.end,p);!h.extend&&m>x&&(o=x,x=m,m=o);var g=Wk(s,m),O=Wk(s,x);if(g&&O&&(h.rangeCount!==1||h.anchorNode!==g.node||h.anchorOffset!==g.offset||h.focusNode!==O.node||h.focusOffset!==O.offset)){var y=f.createRange();y.setStart(g.node,g.offset),h.removeAllRanges(),m>x?(h.addRange(y),h.extend(O.node,O.offset)):(y.setEnd(O.node,O.offset),h.addRange(y))}}}}for(f=[],h=s;h=h.parentNode;)h.nodeType===1&&f.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<f.length;s++){var b=f[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}ec=!!hy,py=hy=null}finally{ze=i,Ne.p=n,he.T=r}}t.current=e,bt=2}}function ly(){if(bt===2){bt=0;var t=cn,e=el,a=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||a){a=he.T,he.T=null;var r=Ne.p;Ne.p=2;var n=ze;ze|=4;try{uR(t,e.alternate,e)}finally{ze=n,Ne.p=r,he.T=a}}bt=3}}function uy(){if(bt===4||bt===3){bt=0;var t=Nu;Nu=null,jN();var e=cn,a=el,r=Jn,n=CR,i=(r&335544064)===r?10262:10256;if((a.subtreeFlags&i)!==0||(a.flags&i)!==0?bt=5:(bt=0,el=cn=null,MR(e,e.pendingLanes)),i=e.pendingLanes,i===0&&(Eo=null),Ty(r),a=a.stateNode,pr&&typeof pr.onCommitFiberRoot=="function")try{pr.onCommitFiberRoot(od,a,void 0,(a.current.flags&128)===128)}catch{}if(n!==null){a=he.T,i=Ne.p,Ne.p=2,he.T=null;try{for(var o=e.onRecoverableError,s=0;s<n.length;s++){var l=n[s];o(l.value,{componentStack:l.stack})}}finally{he.T=a,Ne.p=i}}if(n=Xu,o=qu,qu=null,n!==null&&(Xu=null,o===null&&(o=[]),t!==null))for(l=0;l<n.length;l++)a=(0,n[l])(o),a!==void 0&&t.finished.finally(a);(Jn&3)!==0&&Pm(),ai(e),i=e.pendingLanes,(r&261930)!==0&&(i&42)!==0?e===Ip?qf++:(qf=0,Ip=e):(qf=0,Ip=null),pd(0,!1)}}function MR(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,fd(e)))}function Pm(){return Nu!==null&&(Nu.skipTransition(),Nu=null),sy(),ly(),uy(),cy()}function cy(){if(bt!==5)return!1;var t=cn,e=iy;iy=0;var a=Ty(Jn),r=he.T,n=Ne.p;try{Ne.p=32>a?32:a,he.T=null,a=oy,oy=null;var i=cn,o=Jn;if(bt=0,el=cn=null,Jn=0,(ze&6)!==0)throw Error(I(331));var s=ze;if(ze|=4,vR(i.current),xR(i,i.current,o,a),ze=s,pd(0,!1),pr&&typeof pr.onPostCommitFiberRoot=="function")try{pr.onPostCommitFiberRoot(od,i)}catch{}return!0}finally{Ne.p=n,he.T=r,MR(t,e)}}function $L(t,e,a){e=Dr(a,e),e=Zx(t.stateNode,e,2),t=Ao(t,e,2),t!==null&&(ld(t,2),ai(t))}function Fe(t,e,a){if(t.tag===3)$L(t,t,a);else for(;e!==null;){if(e.tag===3){$L(e,t,a);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Eo===null||!Eo.has(r))){t=Dr(a,t),a=HP(2),r=Ao(e,a,2),r!==null&&(GP(a,r,e,t),ld(r,2),ai(r));break}}e=e.return}}function ix(t,e,a){var r=t.pingCache;if(r===null){r=t.pingCache=new CX;var n=new Set;r.set(e,n)}else n=r.get(e),n===void 0&&(n=new Set,r.set(e,n));n.has(a)||(cb=!0,n.add(a),t=QX.bind(null,t,e,a),e.then(t,t))}function QX(t,e,a){var r=t.pingCache;r!==null&&r.delete(e),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,et===t&&(Te&a)===a&&((kt===4||kt===3&&(Te&62914560)===Te&&300>hr()-km)&&(ze&2)===0?Gu(t,0):rm|=a,Fu===Te&&(Fu=0)),ai(t)}function ER(t,e){e===0&&(e=CT()),t=nl(t,e),t!==null&&(ld(t,e),ai(t))}function MX(t){var e=t.memoizedState,a=0;e!==null&&(a=e.retryLane),ER(t,a)}function EX(t,e){var a=0;switch(t.tag){case 31:case 13:var r=t.stateNode,n=t.memoizedState;n!==null&&(a=n.retryLane);break;case 19:r=t.stateNode;break;case 22:r=t.stateNode._retryCache;break;default:throw Error(I(314))}r!==null&&r.delete(e),ER(t,a)}function DX(t,e){return ky(t,e)}var Yu=null,bu=null,fy=!1,sm=!1,ox=!1,To=0;function ai(t){t!==bu&&t.next===null&&(bu===null?Yu=bu=t:bu=bu.next=t),sm=!0,fy||(fy=!0,BX())}function pd(t,e){if(!ox&&sm){ox=!0;do for(var a=!1,r=Yu;r!==null;){if(!e)if(t!==0){var n=r.pendingLanes;if(n===0)var i=0;else{var o=r.suspendedLanes,s=r.pingedLanes;i=(1<<31-mr(42|t)+1)-1,i&=n&~(o&~s),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,BL(r,i))}else i=Te,i=fm(r,r===et?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(i&3)===0||sd(r,i)||(a=!0,BL(r,i));r=r.next}while(a);ox=!1}}function $X(){DR()}function DR(){sm=fy=!1;var t=0;To!==0&&jX()&&(t=To);for(var e=hr(),a=null,r=Yu;r!==null;){var n=r.next,i=$R(r,e);i===0?(r.next=null,a===null?Yu=n:a.next=n,n===null&&(bu=a)):(a=r,(t!==0||(i&3)!==0)&&(sm=!0)),r=n}bt!==0&&bt!==5||pd(t,!1),To!==0&&(To=0)}function $R(t,e){for(var a=t.suspendedLanes,r=t.pingedLanes,n=t.expirationTimes,i=t.pendingLanes&-62914561;0<i;){var o=31-mr(i),s=1<<o,l=n[o];l===-1?((s&a)===0||(s&r)!==0)&&(n[o]=e3(s,e)):l<=e&&(t.expiredLanes|=s),i&=~s}if(e=et,a=Te,a=fm(t,t===e?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r=t.callbackNode,a===0||t===e&&(Ue===2||Ue===9)||t.cancelPendingCommit!==null)return r!==null&&r!==null&&_0(r),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||sd(t,a)){if(e=a&-a,e===t.callbackPriority)return e;switch(r!==null&&_0(r),Ty(a)){case 2:case 8:a=vT;break;case 32:a=zp;break;case 268435456:a=ST;break;default:a=zp}return r=BR.bind(null,t),a=ky(a,r),t.callbackPriority=e,t.callbackNode=a,e}return r!==null&&r!==null&&_0(r),t.callbackPriority=2,t.callbackNode=null,2}function BR(t,e){if(bt!==0&&bt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Pm()&&t.callbackNode!==a)return null;var r=Te;return r=fm(t,t===et?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r===0?null:(LR(t,r,e),$R(t,hr()),t.callbackNode!=null&&t.callbackNode===a?BR.bind(null,t):null)}function BL(t,e){if(Pm())return null;LR(t,e,!0)}function BX(){HX(function(){(ze&6)!==0?ky(bT,$X):DR()})}function db(){if(To===0){var t=Ys;t===0&&(t=Wh,Wh<<=1,(Wh&261888)===0&&(Wh=256)),To=t}return To}function _L(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:xp(t)}function _X(t,e,a,r,n){if(e==="submit"&&a&&a.stateNode===n){var i=_L((n[Wa]||null).action),o=r.submitter;o&&(e=(e=o[Wa]||null)?_L(e.formAction):o.getAttribute("formAction"),e!==null&&(i=e,o=null));var s=new hm("action","action",null,r,n);t.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(To!==0){var l=new FormData(n,o);Xx(a,{pending:!0,data:l,method:n.method,action:i},null,l)}}else typeof i=="function"&&(s.preventDefault(),l=new FormData(n,o),Xx(a,{pending:!0,data:l,method:n.method,action:i},i,l))},currentTarget:n}]})}}for(dp=0;dp<Ix.length;dp++)hp=Ix[dp],zL=hp.toLowerCase(),NL=hp[0].toUpperCase()+hp.slice(1),fn(zL,"on"+NL);var hp,zL,NL,dp;fn(GT,"onAnimationEnd");fn(YT,"onAnimationIteration");fn(WT,"onAnimationStart");fn("dblclick","onDoubleClick");fn("focusin","onFocus");fn("focusout","onBlur");fn(G3,"onTransitionRun");fn(Y3,"onTransitionStart");fn(W3,"onTransitionCancel");fn(KT,"onTransitionEnd");Vu("onMouseEnter",["mouseout","mouseover"]);Vu("onMouseLeave",["mouseout","mouseover"]);Vu("onPointerEnter",["pointerout","pointerover"]);Vu("onPointerLeave",["pointerout","pointerover"]);al("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));al("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));al("onBeforeInput",["compositionend","keypress","textInput","paste"]);al("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));al("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));al("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),zX=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Kf));function _R(t,e){e=(e&4)!==0;for(var a=0;a<t.length;a++){var r=t[a],n=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var o=r.length-1;0<=o;o--){var s=r[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==i&&n.isPropagationStopped())break e;i=s,n.currentTarget=u;try{i(n)}catch(c){Xp(c)}n.currentTarget=null,i=l}else for(o=0;o<r.length;o++){if(s=r[o],l=s.instance,u=s.currentTarget,s=s.listener,l!==i&&n.isPropagationStopped())break e;i=s,n.currentTarget=u;try{i(n)}catch(c){Xp(c)}n.currentTarget=null,i=l}}}}function we(t,e){var a=e[Ek];a===void 0&&(a=e[Ek]=new Set);var r=t+"__bubble";a.has(r)||(zR(e,t,2,!1),a.add(r))}function sx(t,e,a){var r=0;e&&(r|=4),zR(a,t,r,e)}var pp="_reactListening"+Math.random().toString(36).slice(2);function hb(t){if(!t[pp]){t[pp]=!0,IT.forEach(function(a){a!=="selectionchange"&&(zX.has(a)||sx(a,!1,t),sx(a,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[pp]||(e[pp]=!0,sx("selectionchange",!1,e))}}function zR(t,e,a,r){switch(uI(e)){case 2:var n=Aq;break;case 8:n=Qq;break;default:n=bb}a=n.bind(null,e,a,t),n=void 0,!Lx||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(n=!0),r?n!==void 0?t.addEventListener(e,a,{capture:!0,passive:n}):t.addEventListener(e,a,!0):n!==void 0?t.addEventListener(e,a,{passive:n}):t.addEventListener(e,a,!1)}function lx(t,e,a,r,n){var i=r;if((e&1)===0&&(e&2)===0&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===n)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===n)return;o=o.return}for(;s!==null;){if(o=Ns(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=i=o;continue e}s=s.parentNode}}r=r.return}_T(function(){var u=i,c=Ry(a),f=[];e:{var d=JT.get(t);if(d!==void 0){var h=hm,p=t;switch(t){case"keypress":if(bp(a)===0)break e;case"keydown":case"keyup":h=k3;break;case"focusin":p="focus",h=V0;break;case"focusout":p="blur",h=V0;break;case"beforeblur":case"afterblur":h=V0;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=qk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=h3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=I3;break;case GT:case YT:case WT:h=g3;break;case KT:h=Q3;break;case"scroll":case"scrollend":h=f3;break;case"wheel":h=E3;break;case"copy":case"cut":case"paste":h=x3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Vk;break;case"submit":h=P3;break;case"toggle":case"beforetoggle":h=$3}var m=(e&4)!==0,x=!m&&(t==="scroll"||t==="scrollend"),g=m?d!==null?d+"Capture":null:d;m=[];for(var O=u,y;O!==null;){var b=O;if(y=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||y===null||g===null||(b=Vf(O,g),b!=null&&m.push(Jf(O,b,y))),x)break;O=O.return}0<m.length&&(d=new h(d,p,null,a,c),f.push({event:d,listeners:m}))}}if((e&7)===0){e:{if(h=t==="mouseover"||t==="pointerover",d=t==="mouseout"||t==="pointerout",h&&a!==kx&&(p=a.relatedTarget||a.fromElement)&&(Ns(p)||p[ac]))break e;(d||h)&&(p=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,d?(h=a.relatedTarget||a.toElement,d=u,h=h?Ns(h):null,h!==null&&(x=id(h),m=h.tag,h!==x||m!==5&&m!==27&&m!==6)&&(h=null)):(d=null,h=u),d!==h&&(m=qk,b="onMouseLeave",g="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(m=Vk,b="onPointerLeave",g="onPointerEnter",O="pointer"),x=d==null?p:Tf(d),y=h==null?p:Tf(h),p=new m(b,O+"leave",d,a,c),p.target=x,p.relatedTarget=y,b=null,Ns(c)===u&&(m=new m(g,O+"enter",h,a,c),m.target=y,m.relatedTarget=x,b=m),x=b,m=d&&h?hx(d,h,NX):null,d!==null&&XL(f,p,d,m,!1),h!==null&&x!==null&&XL(f,x,h,m,!0)))}e:{if(d=u?Tf(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var v=Hk;else if(Fk(d))if(VT)v=j3;else{v=V3;var S=Z3}else h=d.nodeName,!h||h.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?u&&Py(u.elementType)&&(v=Hk):v=U3;if(v&&(v=v(t,u))){ZT(f,v,a,c);break e}S&&S(t,d,u)}switch(S=u?Tf(u):window,t){case"focusin":(Fk(S)||S.contentEditable==="true")&&(Lu=S,Px=u,Qf=null);break;case"focusout":Qf=Px=Lu=null;break;case"mousedown":Rx=!0;break;case"contextmenu":case"mouseup":case"dragend":Rx=!1,Kk(f,a,c);break;case"selectionchange":if(H3)break;case"keydown":case"keyup":Kk(f,a,c)}var w;if(Qy)e:{switch(t){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else ku?XT(t,a)&&(k="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(k="onCompositionStart");k&&(NT&&a.locale!=="ko"&&(ku||k!=="onCompositionStart"?k==="onCompositionEnd"&&ku&&(w=zT()):(wo=c,Iy="value"in wo?wo.value:wo.textContent,ku=!0)),S=lm(u,k),0<S.length&&(k=new Zk(k,t,null,a,c),f.push({event:k,listeners:S}),w?k.data=w:(w=qT(a),w!==null&&(k.data=w)))),(w=_3?z3(t,a):N3(t,a))&&(k=lm(u,"onBeforeInput"),0<k.length&&(S=new Zk("onBeforeInput","beforeinput",null,a,c),f.push({event:S,listeners:k}),S.data=w)),_X(f,t,u,a,c)}_R(f,e)})}function Jf(t,e,a){return{instance:t,listener:e,currentTarget:a}}function lm(t,e){for(var a=e+"Capture",r=[];t!==null;){var n=t,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=Vf(t,a),n!=null&&r.unshift(Jf(t,n,i)),n=Vf(t,e),n!=null&&r.push(Jf(t,n,i))),t.tag===3)return r;t=t.return}return[]}function NX(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function XL(t,e,a,r,n){for(var i=e._reactName,o=[];a!==null&&a!==r;){var s=a,l=s.alternate,u=s.stateNode;if(s=s.tag,l!==null&&l===r)break;s!==5&&s!==26&&s!==27||u===null||(l=u,n?(u=Vf(a,i),u!=null&&o.unshift(Jf(a,u,l))):n||(u=Vf(a,i),u!=null&&o.push(Jf(a,u,l)))),a=a.return}o.length!==0&&t.push({event:e,listeners:o})}var XX=/\r\n?/g,qX=/\u0000|\uFFFD/g;function qL(t){return(typeof t=="string"?t:""+t).replace(XX,`
9
- `).replace(qX,"")}function NR(t,e){return e=qL(e),qL(t)===e}function je(t,e,a,r,n,i){switch(a){case"children":if(typeof r=="string")e==="body"||e==="textarea"&&r===""||Uu(t,r);else if(typeof r=="number"||typeof r=="bigint")e!=="body"&&Uu(t,""+r);else return;break;case"className":ep(t,"class",r);break;case"tabIndex":ep(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ep(t,a,r);break;case"style":BT(t,r,i);return;case"data":if(e!=="object"){ep(t,"data",r);break}case"src":case"href":if(r===""&&(e!=="a"||a!=="href")){t.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=xp(r),t.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(e!=="input"&&je(t,e,"name",n.name,n,null),je(t,e,"formEncType",n.formEncType,n,null),je(t,e,"formMethod",n.formMethod,n,null),je(t,e,"formTarget",n.formTarget,n,null)):(je(t,e,"encType",n.encType,n,null),je(t,e,"method",n.method,n,null),je(t,e,"target",n.target,n,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=xp(r),t.setAttribute(a,r);break;case"onClick":r!=null&&(t.onclick=Gn);return;case"onScroll":r!=null&&we("scroll",t);return;case"onScrollEnd":r!=null&&we("scrollend",t);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(I(61));if(a=r.__html,a!=null){if(n.children!=null)throw Error(I(60));i?.__html!==a&&(t.innerHTML=a)}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}a=xp(r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,r):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":r===!0?t.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,r):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(a,r):t.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(a):t.setAttribute(a,r);break;case"popover":we("beforetoggle",t),we("toggle",t),Op(t,"popover",r);break;case"xlinkActuate":ki(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ki(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ki(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ki(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ki(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ki(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ki(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ki(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ki(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Op(t,"is",r);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=u3.get(a)||a,Op(t,a,r);else return}Be=!0}function dy(t,e,a,r,n,i){switch(a){case"style":BT(t,r,i);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(I(61));if(a=r.__html,a!=null){if(n.children!=null)throw Error(I(60));i?.__html!==a&&(t.innerHTML=a)}}break;case"children":if(typeof r=="string")Uu(t,r);else if(typeof r=="number"||typeof r=="bigint")Uu(t,""+r);else return;break;case"onScroll":r!=null&&we("scroll",t);return;case"onScrollEnd":r!=null&&we("scrollend",t);return;case"onClick":r!=null&&(t.onclick=Gn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!AT.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(n=a.endsWith("Capture"),i=a.slice(2,n?a.length-7:void 0),e=t[Wa]||null,e=e!=null?e[a]:null,typeof e=="function"&&t.removeEventListener(i,e,n),typeof r=="function")){typeof e!="function"&&e!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(i,r,n);break e}Be=!0,a in t?t[a]=r:r===!0?t.setAttribute(a,""):Op(t,a,r)}return}Be=!0}function sa(t,e,a){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":we("error",t),we("load",t);var r=!1,n=!1,i;for(i in a)if(a.hasOwnProperty(i)){var o=a[i];if(o!=null)switch(i){case"src":r=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(I(137,e));default:je(t,e,i,o,a,null)}}n&&je(t,e,"srcSet",a.srcSet,a,null),r&&je(t,e,"src",a.src,a,null);return;case"input":we("invalid",t);var s=i=o=n=null,l=null,u=null;for(r in a)if(a.hasOwnProperty(r)){var c=a[r];if(c!=null)switch(r){case"name":n=c;break;case"type":o=c;break;case"checked":l=c;break;case"defaultChecked":u=c;break;case"value":i=c;break;case"defaultValue":s=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(I(137,e));break;default:je(t,e,r,c,a,null)}}ET(t,i,s,l,u,o,n,!1);return;case"select":we("invalid",t),r=o=i=null;for(n in a)if(a.hasOwnProperty(n)&&(s=a[n],s!=null))switch(n){case"value":i=s;break;case"defaultValue":o=s;break;case"multiple":r=s;default:je(t,e,n,s,a,null)}e=i,a=o,t.multiple=!!r,e!=null?Eu(t,!!r,e,!1):a!=null&&Eu(t,!!r,a,!0);return;case"textarea":we("invalid",t),i=n=r=null;for(o in a)if(a.hasOwnProperty(o)&&(s=a[o],s!=null))switch(o){case"value":r=s;break;case"defaultValue":n=s;break;case"children":i=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(I(91));break;default:je(t,e,o,s,a,null)}$T(t,r,n,i);return;case"option":for(l in a)a.hasOwnProperty(l)&&(r=a[l],r!=null)&&(l==="selected"?t.selected=r&&typeof r!="function"&&typeof r!="symbol":je(t,e,l,r,a,null));return;case"dialog":we("beforetoggle",t),we("toggle",t),we("cancel",t),we("close",t);break;case"iframe":case"object":we("load",t);break;case"video":case"audio":for(r=0;r<Kf.length;r++)we(Kf[r],t);break;case"image":we("error",t),we("load",t);break;case"details":we("toggle",t);break;case"embed":case"source":case"link":we("error",t),we("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in a)if(a.hasOwnProperty(u)&&(r=a[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(I(137,e));default:je(t,e,u,r,a,null)}return;default:if(Py(e)){for(c in a)a.hasOwnProperty(c)&&(r=a[c],r!==void 0&&dy(t,e,c,r,a,void 0));return}}for(s in a)a.hasOwnProperty(s)&&(r=a[s],r!=null&&je(t,e,s,r,a,null))}var ZX={};function VX(t,e,a,r){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,o=null,s=null,l=null,u=null,c=null;for(h in a){var f=a[h];if(a.hasOwnProperty(h)&&f!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":l=f;default:r.hasOwnProperty(h)||je(t,e,h,null,r,f)}}for(var d in r){var h=r[d];if(f=a[d],r.hasOwnProperty(d)&&(h!=null||f!=null))switch(d){case"type":h!==f&&(Be=!0),i=h;break;case"name":h!==f&&(Be=!0),n=h;break;case"checked":h!==f&&(Be=!0),u=h;break;case"defaultChecked":h!==f&&(Be=!0),c=h;break;case"value":h!==f&&(Be=!0),o=h;break;case"defaultValue":h!==f&&(Be=!0),s=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(I(137,e));break;default:h!==f&&je(t,e,d,h,r,f)}}Cx(t,o,s,l,u,c,i,n);return;case"select":h=o=s=d=null;for(i in a)if(l=a[i],a.hasOwnProperty(i)&&l!=null)switch(i){case"value":break;case"multiple":h=l;default:r.hasOwnProperty(i)||je(t,e,i,null,r,l)}for(n in r)if(i=r[n],l=a[n],r.hasOwnProperty(n)&&(i!=null||l!=null))switch(n){case"value":i!==l&&(Be=!0),d=i;break;case"defaultValue":i!==l&&(Be=!0),s=i;break;case"multiple":i!==l&&(Be=!0),o=i;default:i!==l&&je(t,e,n,i,r,l)}e=s,a=o,r=h,d!=null?Eu(t,!!a,d,!1):!!r!=!!a&&(e!=null?Eu(t,!!a,e,!0):Eu(t,!!a,a?[]:"",!1));return;case"textarea":h=d=null;for(s in a)if(n=a[s],a.hasOwnProperty(s)&&n!=null&&!r.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:je(t,e,s,null,r,n)}for(o in r)if(n=r[o],i=a[o],r.hasOwnProperty(o)&&(n!=null||i!=null))switch(o){case"value":n!==i&&(Be=!0),d=n;break;case"defaultValue":n!==i&&(Be=!0),h=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(I(91));break;default:n!==i&&je(t,e,o,n,r,i)}DT(t,d,h);return;case"option":for(var p in a)d=a[p],a.hasOwnProperty(p)&&d!=null&&!r.hasOwnProperty(p)&&(p==="selected"?t.selected=!1:je(t,e,p,null,r,d));for(l in r)d=r[l],h=a[l],r.hasOwnProperty(l)&&d!==h&&(d!=null||h!=null)&&(l==="selected"?(d!==h&&(Be=!0),t.selected=d&&typeof d!="function"&&typeof d!="symbol"):je(t,e,l,d,r,h));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var m in a)d=a[m],a.hasOwnProperty(m)&&d!=null&&!r.hasOwnProperty(m)&&je(t,e,m,null,r,d);for(u in r)if(d=r[u],h=a[u],r.hasOwnProperty(u)&&d!==h&&(d!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(I(137,e));break;default:je(t,e,u,d,r,h)}return;default:if(Py(e)){for(var x in a)d=a[x],a.hasOwnProperty(x)&&d!==void 0&&!r.hasOwnProperty(x)&&dy(t,e,x,void 0,r,d);for(c in r)d=r[c],h=a[c],!r.hasOwnProperty(c)||d===h||d===void 0&&h===void 0||dy(t,e,c,d,r,h);return}}for(var g in a)d=a[g],a.hasOwnProperty(g)&&d!=null&&!r.hasOwnProperty(g)&&je(t,e,g,null,r,d);for(f in r)d=r[f],h=a[f],!r.hasOwnProperty(f)||d===h||d==null&&h==null||je(t,e,f,d,r,h)}function ZL(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function UX(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var n=a[r],i=n.transferSize,o=n.initiatorType,s=n.duration;if(i&&s&&ZL(o)){for(o=0,s=n.responseEnd,r+=1;r<a.length;r++){var l=a[r],u=l.startTime;if(u>s)break;var c=l.transferSize,f=l.initiatorType;c&&ZL(f)&&(l=l.responseEnd,o+=c*(l<s?1:(s-u)/(l-u)))}if(--r,e+=8*(i+o)/(n.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var hy=null,py=null;function ed(t){return t.nodeType===9?t:t.ownerDocument}function VL(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function XR(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function qR(t,e,a,r){return a=ed(a).createElement(t),a[ra]=r,a[Wa]=e,sa(a,t,e),Ht(a),a}function my(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var ux=null;function jX(){var t=window.event;return t&&t.type==="popstate"?t===ux?!1:(ux=t,!0):(ux=null,!1)}var pb=typeof setTimeout=="function"?setTimeout:void 0,FX=typeof clearTimeout=="function"?clearTimeout:void 0,UL=typeof Promise=="function"?Promise:void 0,jL=typeof requestAnimationFrame=="function"?requestAnimationFrame:pb,HX=typeof queueMicrotask=="function"?queueMicrotask:typeof UL<"u"?function(t){return UL.resolve(null).then(t).catch(GX)}:pb;function GX(t){setTimeout(function(){throw t})}function Vo(t){return t==="head"}function FL(t,e){var a=e,r=0;do{var n=a.nextSibling;if(t.removeChild(a),n&&n.nodeType===8)if(a=n.data,a==="/$"||a==="/&"){if(r===0){t.removeChild(n),tc(e);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")fx(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,fx(a);for(var i=a.firstChild;i;){var o=i.nextSibling,s=i.nodeName;i[ud]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=o}}else a==="body"&&fx(t.ownerDocument.body);a=n}while(a);tc(e)}function HL(t,e){var a=t;t=0;do{var r=a.nextSibling;if(a.nodeType===1?e?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(e?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=r}while(a)}function ZR(t,e,a){if(e=CSS.escape(e)!==e?"r-"+btoa(e).replace(/=/g,""):e,t.style.viewTransitionName=e,a!=null&&(t.style.viewTransitionClass=a),a=getComputedStyle(t),a.display==="inline"){if(e=t.getClientRects(),e.length===1)var r=1;else for(var n=r=0;n<e.length;n++){var i=e[n];0<i.width&&0<i.height&&r++}r===1&&(t=t.style,t.display=e.length===1?"inline-block":"block",t.marginTop="-"+a.paddingTop,t.marginBottom="-"+a.paddingBottom)}}function VR(t,e){t=t.style,e=e.style;var a=e!=null?e.hasOwnProperty("viewTransitionName")?e.viewTransitionName:e.hasOwnProperty("view-transition-name")?e["view-transition-name"]:null:null;t.viewTransitionName=a==null||typeof a=="boolean"?"":(""+a).trim(),a=e!=null?e.hasOwnProperty("viewTransitionClass")?e.viewTransitionClass:e.hasOwnProperty("view-transition-class")?e["view-transition-class"]:null:null,t.viewTransitionClass=a==null||typeof a=="boolean"?"":(""+a).trim(),t.display==="inline-block"&&(e==null?t.display=t.margin="":(a=e.display,t.display=a==null||typeof a=="boolean"?"":a,a=e.margin,a!=null?t.margin=a:(a=e.hasOwnProperty("marginTop")?e.marginTop:e["margin-top"],t.marginTop=a==null||typeof a=="boolean"?"":a,e=e.hasOwnProperty("marginBottom")?e.marginBottom:e["margin-bottom"],t.marginBottom=e==null||typeof e=="boolean"?"":e)))}function UR(t,e,a){return a=a.ownerDocument.defaultView,{rect:t,abs:e.position==="absolute"||e.position==="fixed",clip:e.clipPath!=="none"||e.overflow!=="visible"||e.filter!=="none"||e.mask!=="none"||e.mask!=="none"||e.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=a.innerHeight&&t.left<=a.innerWidth}}function gy(t){var e=t.getBoundingClientRect(),a=getComputedStyle(t);return UR(e,a,t)}function YX(t){var e=t.getBoundingClientRect();e=new DOMRect(e.x+2e4,e.y+2e4,e.width,e.height);var a=getComputedStyle(t);return UR(e,a,t)}function WX(t){return t.documentElement.clientHeight}function KX(t){this.addEventListener("load",t),this.addEventListener("error",t)}function JX(t,e,a,r,n,i,o,s,l){var u=e.nodeType===9?e:e.ownerDocument;try{var c=u.startViewTransition({update:function(){var d=u.defaultView,h=d.navigation&&d.navigation.transition,p=u.fonts.status;r();var m=[];if(p==="loaded"&&(WX(u),u.fonts.status==="loading"&&m.push(u.fonts.ready)),p=m.length,t!==null)for(var x=t.suspenseyImages,g=0,O=0;O<x.length;O++){var y=x[O];if(!y.complete){var b=y.getBoundingClientRect();if(0<b.bottom&&0<b.right&&b.top<d.innerHeight&&b.left<d.innerWidth){if(g+=rI(y),g>Mp){m.length=p;break}y=new Promise(KX.bind(y)),m.push(y)}}}if(0<m.length)return d=Promise.race([Promise.all(m),new Promise(function(v){return setTimeout(v,500)})]).then(n,n),(h?Promise.allSettled([h.finished,d]):d).then(i,i);if(n(),h)return h.finished.then(i,i);i()},types:a});u.__reactViewTransition=c;var f=[];return c.ready.then(function(){for(var d=u.documentElement.getAnimations({subtree:!0}),h=0;h<d.length;h++){var p=d[h],m=p.effect,x=m.pseudoElement;if(x!=null&&x.startsWith("::view-transition")){f.push(p),p=m.getKeyframes();for(var g=x=void 0,O=!0,y=0;y<p.length;y++){var b=p[y],v=b.width;if(x===void 0)x=v;else if(x!==v){O=!1;break}if(v=b.height,g===void 0)g=v;else if(g!==v){O=!1;break}delete b.width,delete b.height,b.transform==="none"&&delete b.transform}O&&x!==void 0&&g!==void 0&&(m.setKeyframes(p),O=getComputedStyle(m.target,m.pseudoElement),O.width!==x||O.height!==g)&&(O=p[0],O.width=x,O.height=g,O=p[p.length-1],O.width=x,O.height=g,m.setKeyframes(p))}}o()},function(d){u.__reactViewTransition===c&&(u.__reactViewTransition=null);try{typeof d=="object"&&d!==null&&d.name==="InvalidStateError"&&(d.message==="View transition was skipped because document visibility state is hidden."||d.message==="Skipping view transition because document visibility state has become hidden."||d.message==="Skipping view transition because viewport size changed."||d.message==="Transition was aborted because of invalid state")&&(d=null),d!==null&&l(d)}finally{r(),n(),o()}}),c.finished.finally(function(){for(var d=0;d<f.length;d++)f[d].cancel();u.__reactViewTransition===c&&(u.__reactViewTransition=null),s()}),c}catch{return r(),n(),o(),null}}function Xs(t,e){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+e+")"}Xs.prototype.animate=function(t,e){return e=typeof e=="number"?{duration:e}:tt({},e),e.pseudoElement=this._selector,this._scope.animate(t,e)};Xs.prototype.getAnimations=function(){for(var t=this._scope,e=this._selector,a=t.getAnimations({subtree:!0}),r=[],n=0;n<a.length;n++){var i=a[n].effect;i!==null&&i.target===t&&i.pseudoElement===e&&r.push(a[n])}return r};Xs.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function jR(t){return{name:t,group:new Xs("group",t),imagePair:new Xs("image-pair",t),old:new Xs("old",t),new:new Xs("new",t)}}function xr(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}xr.prototype.addEventListener=function(t,e,a){var r=null,n=null;if(!(a!=null&&typeof a!="boolean"&&(r=a.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(FR(i,t,e,a)===-1){var o=this,s=e;a!=null&&typeof a!="boolean"&&a.once===!0&&(s=function(l){o.removeEventListener(t,e,a),typeof e=="function"?e.call(this,l):e.handleEvent(l)}),r!==null&&(n=o.removeEventListener.bind(o,t,e,a),r.addEventListener("abort",n,{once:!0}),n=r.removeEventListener.bind(r,"abort",n)),r=Wu(a),i.push({type:t,listener:e,optionsOrUseCapture:a,attachedListener:s,cleanup:n}),Ya(this._fragmentFiber.child,!1,eq,t,s,r)}this._eventListeners=i}};function eq(t,e,a,r){return Nt(t).addEventListener(e,a,r),!1}xr.prototype.removeEventListener=function(t,e,a){var r=this._eventListeners;if(r!==null&&(e=FR(r,t,e,a),e!==-1)){var n=r[e];a=n.attachedListener;var i=n.cleanup;n=Wu(n.optionsOrUseCapture),Ya(this._fragmentFiber.child,!1,tq,t,a,n),r.splice(e,1),i!==null&&i()}};function tq(t,e,a,r){return Nt(t).removeEventListener(e,a,r),!1}function Wu(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function GL(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function FR(t,e,a,r){if(t.length===0)return-1;r=GL(r);for(var n=0;n<t.length;n++){var i=t[n];if(i.type===e&&i.listener===a&&GL(i.optionsOrUseCapture)===r)return n}return-1}xr.prototype.dispatchEvent=function(t){var e=tl(this._fragmentFiber);if(e===null)return!0;e=Nt(e);var a=this._eventListeners;if(a!==null&&0<a.length||!t.bubbles){var r=e.nodeType===9?e.createComment(""):document.createTextNode("");if(a)for(var n=0;n<a.length;n++){var i=a[n];r.addEventListener(i.type,i.attachedListener,Wu(i.optionsOrUseCapture))}if(e.appendChild(r),t=r.dispatchEvent(t),a)for(n=0;n<a.length;n++)i=a[n],r.removeEventListener(i.type,i.attachedListener,Wu(i.optionsOrUseCapture));return e.removeChild(r),t}return e.dispatchEvent(t)};xr.prototype.focus=function(t){Ya(this._fragmentFiber.child,!0,HR,t,void 0,void 0)};function HR(t,e){return t.tag===6?!1:(t=Nt(t),hq(t,e))}xr.prototype.focusLast=function(t){var e=[];Ya(this._fragmentFiber.child,!0,mb,e,void 0,void 0);for(var a=e.length-1;0<=a&&!HR(e[a],t);a--);};function mb(t,e){return e.push(t),!1}xr.prototype.blur=function(){var t=tl(this._fragmentFiber);t!==null&&(t=Nt(t),t=ed(t).activeElement,t!==null&&Ya(this._fragmentFiber.child,!1,aq,t,void 0,void 0))};function aq(t,e){return t.tag===6?!1:(t=Nt(t),t===e||t.contains(e)?(e.blur(),!0):!1)}xr.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),Ya(this._fragmentFiber.child,!1,rq,t,void 0,void 0)};function rq(t,e){return t.tag===6||(t=Nt(t),e.observe(t)),!1}xr.prototype.unobserveUsing=function(t){var e=this._observers;if(e!==null&&e.has(t)){e.delete(t),Ya(this._fragmentFiber.child,!1,nq,t,void 0,void 0);for(var a=e=0;a<un.length;a++){var r=un[a];r.fragmentInstance===this&&r.observer===t?t.unobserve(r.instance):un[e++]=r}un.length=e}};function nq(t,e){return t.tag===6||(t=Nt(t),e.unobserve(t)),!1}var un=[],cx=!1;function iq(t,e,a){un.push({fragmentInstance:t,observer:e,instance:a}),cx||(cx=!0,pq(function(){cx=!1;var r=un;un=[];for(var n=0;n<r.length;n++){var i=r[n];i.observer.unobserve(i.instance)}}))}xr.prototype.getClientRects=function(){var t=[];return Ya(this._fragmentFiber.child,!1,oq,t,void 0,void 0),t};function oq(t,e){if(t.tag===6){t=t.stateNode;var a=t.ownerDocument.createRange();a.selectNodeContents(t),e.push.apply(e,a.getClientRects())}else t=Nt(t),e.push.apply(e,t.getClientRects());return!1}xr.prototype.getRootNode=function(t){var e=tl(this._fragmentFiber);return e===null?this:Nt(e).getRootNode(t)};xr.prototype.compareDocumentPosition=function(t){var e=tl(this._fragmentFiber);if(e===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];Ya(this._fragmentFiber.child,!1,mb,a,void 0,void 0);var r=Nt(e);if(a.length===0){if(a=r,Pk(this._fragmentFiber)){e:{for(e=this._fragmentFiber.return;e!==null;){if(e.tag===4){e=e.stateNode.containerInfo;break e}if(e.tag===3||e.tag===5||e.tag===27)break;e=e.return}e=null}e!=null&&(a=e)}e=this._fragmentFiber;var n=r=a.compareDocumentPosition(t);return a===t?n=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=gT(e)[1],a===null?n=Node.DOCUMENT_POSITION_PRECEDING:(t=Nt(a).compareDocumentPosition(t),n=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),n|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}e=Nt(a[0]),n=Nt(a[a.length-1]);var i=Pk(this._fragmentFiber)?e.parentElement:r;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=e.compareDocumentPosition(t),s=n.compareDocumentPosition(t),l=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&i&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,e=r&&e===t||i&&n===t||l||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&e===t||!i&&n===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,e&Node.DOCUMENT_POSITION_DISCONNECTED||e&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||sq(e,this._fragmentFiber,a[0],a[a.length-1],t)?e:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function sq(t,e,a,r,n){var i=Ns(n);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!i)e:{for(;i!==null;){if(i.tag===7&&(i===e||i.alternate===e)){a=!0;break e}i=i.return}a=!1}return a}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=n.ownerDocument,n===i||n===i.documentElement||n===i.body;e:{for(i=e,e=tl(e);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==e&&i.alternate!==e)){i=!0;break e}i=i.return}i=!1}return i}return t&Node.DOCUMENT_POSITION_PRECEDING?((e=!!i)&&!(e=i===a)&&(e=hx(a,i,Rk),e===null?e=!1:(Ya(e,!0,BN,i,a),i=vu,vu=null,e=i!==null)),e):t&Node.DOCUMENT_POSITION_FOLLOWING?((e=!!i)&&!(e=i===r)&&(e=hx(r,i,Rk),e===null?e=!1:(Ya(e,!0,_N,i,r),i=vu,dx=vu=null,e=i!==null)),e):!1}function YL(t,e){var a=t.ownerDocument.createRange();a.selectNodeContents(t),t=a.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,e?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}xr.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(I(566));var e=[];Ya(this._fragmentFiber.child,!1,mb,e,void 0,void 0);var a=t!==!1;if(e.length===0){var r=gT(this._fragmentFiber);if(r=a?r[1]||r[0]||tl(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){t=Nt(r),YL(t,a);return}if(r=Nt(r),r.nodeType!==9){if(r.nodeType===11){a="host"in r?r.host:null,a!==null&&a.scrollIntoView(t);return}r.scrollIntoView(t)}}for(r=a?e.length-1:0;r!==(a?-1:e.length);){var n=e[r];n.tag===6?(n=Nt(n),YL(n,a)):Nt(n).scrollIntoView(t),r+=a?-1:1}};function lq(t,e){return t=Nt(t),GR(t,e),!1}function GR(t,e){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(e)}function YR(t,e){var a=e._eventListeners;if(a!==null)for(var r=0;r<a.length;r++){var n=a[r];t.addEventListener(n.type,n.attachedListener,Wu(n.optionsOrUseCapture))}t.nodeType!==3&&(a=e._observers,a!==null&&a.forEach(function(i){for(var o=0,s=0;s<un.length;s++){var l=un[s];(l.fragmentInstance!==e||l.observer!==i||l.instance!==t)&&(un[o++]=l)}un.length=o,i.observe(t)}),GR(t,e))}function uq(t,e){var a=e._eventListeners;if(a!==null)for(var r=0;r<a.length;r++){var n=a[r];t.removeEventListener(n.type,n.attachedListener,Wu(n.optionsOrUseCapture))}t.nodeType!==3&&(a=e._observers,a!==null&&a.forEach(function(i){typeof i.rootMargin=="string"?iq(e,i,t):i.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(e))}function Oy(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var a=e;switch(e=e.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Oy(a),dm(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function cq(t,e,a,r){for(;t.nodeType===1;){var n=a;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[ud])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(i=t.getAttribute("rel"),i==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(i!==n.rel||t.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||t.getAttribute("title")!==(n.title==null?null:n.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(i=t.getAttribute("src"),(i!==(n.src==null?null:n.src)||t.getAttribute("type")!==(n.type==null?null:n.type)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&t.getAttribute("name")===i)return t}else return t;if(t=Br(t.nextSibling),t===null)break}return null}function fq(t,e,a){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Br(t.nextSibling),t===null))return null;return t}function WR(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Br(t.nextSibling),t===null))return null;return t}function xy(t){return t.data==="$?"||t.data==="$~"}function gb(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function dq(t,e){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||a.readyState!=="loading")e();else{var r=function(){e(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function Br(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var yy=null;function WL(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(e===0)return Br(t.nextSibling);e--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||e++}t=t.nextSibling}return null}function KL(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(e===0)return t;e--}else a!=="/$"&&a!=="/&"||e++}t=t.previousSibling}return null}function hq(t,e){function a(){r=!0}if(t.ownerDocument.activeElement===t)return!0;var r=!1;try{t.ownerDocument.addEventListener("focus",a,!0),(t.focus||HTMLElement.prototype.focus).call(t,e)}finally{t.ownerDocument.removeEventListener("focus",a,!0)}return r}function pq(t){jL(function(){jL(function(e){return t(e)})})}function KR(t,e,a){switch(e=ed(a),t){case"html":if(t=e.documentElement,!t)throw Error(I(452));return t;case"head":if(t=e.head,!t)throw Error(I(453));return t;case"body":if(t=e.body,!t)throw Error(I(454));return t;default:throw Error(I(451))}}function JR(t,e,a){for(var r in a){var n=a[r];a.hasOwnProperty(r)&&n!=null&&je(t,e,r,null,ZX,n)}a.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Gn&&(t.onclick=null),dm(t)}function fx(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);dm(t)}var _r=new Map,JL=new Set;function td(t){if(typeof t.getRootNode=="function"){var e=t.getRootNode();if(e.nodeType===9||e.nodeType===11)return e}return t.nodeType===9?t:t.ownerDocument}var zi=Ne.d;Ne.d={f:mq,r:gq,D:Oq,C:xq,L:yq,m:bq,X:Sq,S:vq,M:wq};function mq(){var t=zi.f(),e=Lm();return t||e}function gq(t){var e=rc(t);e!==null&&e.tag===5&&e.type==="form"?BP(e):zi.r(t)}var sc=typeof document>"u"?null:document;function eI(t,e,a){var r=sc;if(r&&typeof e=="string"&&e){var n=Er(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),JL.has(n)||(JL.add(n),t={rel:t,crossOrigin:a,href:e},r.querySelector(n)===null&&(e=r.createElement("link"),sa(e,"link",t),Ht(e),r.head.appendChild(e)))}}function Oq(t){zi.D(t),eI("dns-prefetch",t,null)}function xq(t,e){zi.C(t,e),eI("preconnect",t,e)}function yq(t,e,a){zi.L(t,e,a);var r=sc;if(r&&t&&e){var n='link[rel="preload"][as="'+Er(e)+'"]';e==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+Er(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+Er(a.imageSizes)+'"]')):n+='[href="'+Er(t)+'"]';var i=n;switch(e){case"style":i=Ku(t);break;case"script":i=lc(t)}if(!(_r.has(i)||(t=tt({rel:"preload",href:e==="image"&&a&&a.imageSrcSet?void 0:t,as:e},a),_r.set(i,t),r.querySelector(n)!==null||e==="style"&&r.querySelector(md(i))||e==="script"&&r.querySelector(gd(i))))){var o=r.createElement("link");sa(o,"link",t),e==="style"&&(o[Np]=!0,o.onload=o.onerror=function(){RT(o)}),Ht(o),r.head.appendChild(o)}}}function bq(t,e){zi.m(t,e);var a=sc;if(a&&t){var r=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+Er(r)+'"][href="'+Er(t)+'"]',i=n;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=lc(t)}if(!_r.has(i)&&(t=tt({rel:"modulepreload",href:t},e),_r.set(i,t),a.querySelector(n)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(gd(i)))return}r=a.createElement("link"),sa(r,"link",t),Ht(r),a.head.appendChild(r)}}}function vq(t,e,a){zi.S(t,e,a);var r=sc;if(r&&t){var n=Mu(r).hoistableStyles,i=Ku(t);e=e||"default";var o=n.get(i);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(md(i)))s.loading=5;else{t=tt({rel:"stylesheet",href:t,"data-precedence":e},a),(a=_r.get(i))&&Ob(t,a);var l=o=r.createElement("link");Ht(l),sa(l,"link",t),l._p=new Promise(function(u,c){l.onload=u,l.onerror=c}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Ap(o,e,r)}o={type:"stylesheet",instance:o,count:1,state:s},n.set(i,o)}}}function Sq(t,e){zi.X(t,e);var a=sc;if(a&&t){var r=Mu(a).hoistableScripts,n=lc(t),i=r.get(n);i||(i=a.querySelector(gd(n)),i||(t=tt({src:t,async:!0},e),(e=_r.get(n))&&xb(t,e),i=a.createElement("script"),Ht(i),sa(i,"link",t),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(n,i))}}function wq(t,e){zi.M(t,e);var a=sc;if(a&&t){var r=Mu(a).hoistableScripts,n=lc(t),i=r.get(n);i||(i=a.querySelector(gd(n)),i||(t=tt({src:t,async:!0,type:"module"},e),(e=_r.get(n))&&xb(t,e),i=a.createElement("script"),Ht(i),sa(i,"link",t),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(n,i))}}function eT(t,e,a,r){var n=(n=Po.current)?td(n):null;if(!n)throw Error(I(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=Ku(a.href),e=Mu(n).hoistableStyles,r=e.get(a),r||(r={type:"style",instance:null,count:0,state:null},e.set(a,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Ku(a.href);var i=Mu(n).hoistableStyles,o=i.get(t);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,o),(i=n.querySelector(md(t)))?i._p||(o.instance=i,o.state.loading=5):(i=_r.get(t),i||(i={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},_r.set(t,i)),Cq(n,t,i,o.state))),e&&r===null)throw Error(I(528,""));return o}if(e&&r!==null)throw Error(I(529,""));return null;case"script":return e=a.async,a=a.src,typeof a=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(a=lc(a),e=Mu(n).hoistableScripts,r=e.get(a),r||(r={type:"script",instance:null,count:0,state:null},e.set(a,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(I(444,t))}}function Ku(t){return'href="'+Er(t)+'"'}function md(t){return'link[rel="stylesheet"]['+t+"]"}function tI(t){return tt({},t,{"data-precedence":t.precedence,precedence:null})}function Cq(t,e,a,r){if(e=t.querySelector('link[rel="preload"][as="style"]['+e+"]")){if(e[Np]!==!0){r.loading=1;return}}else e=t.createElement("link"),e[Np]=!0,e.onload=e.onerror=RT.bind(null,e),sa(e,"link",a),Ht(e),t.head.appendChild(e);r.preload=e,e.addEventListener("load",function(){return r.loading|=1}),e.addEventListener("error",function(){return r.loading|=2})}function lc(t){return'[src="'+Er(t)+'"]'}function gd(t){return"script[async]"+t}function tT(t,e,a){if(e.count++,e.instance===null)switch(e.type){case"style":var r=t.querySelector('style[data-href~="'+Er(a.href)+'"]');if(r)return e.instance=r,Ht(r),r;var n=tt({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),Ht(r),sa(r,"style",n),Ap(r,a.precedence,t),e.instance=r;case"stylesheet":n=Ku(a.href);var i=t.querySelector(md(n));if(i)return e.state.loading|=4,e.instance=i,Ht(i),i;r=tI(a),(n=_r.get(n))&&Ob(r,n),i=(t.ownerDocument||t).createElement("link"),Ht(i);var o=i;return o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),sa(i,"link",r),e.state.loading|=4,Ap(i,a.precedence,t),e.instance=i;case"script":return i=lc(a.src),(n=t.querySelector(gd(i)))?(e.instance=n,Ht(n),n):(r=a,(n=_r.get(i))&&(r=tt({},a),xb(r,n)),t=t.ownerDocument||t,n=t.createElement("script"),Ht(n),sa(n,"link",r),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(I(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(r=e.instance,e.state.loading|=4,Ap(r,a.precedence,t));return e.instance}function Ap(t,e,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=r.length?r[r.length-1]:null,i=n,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===e)i=s;else if(i!==n)break}i?i.parentNode.insertBefore(t,i.nextSibling):(e=a.nodeType===9?a.head:a,e.insertBefore(t,e.firstChild))}function Ob(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function xb(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Qp=null;function aT(t,e,a){if(Qp===null){var r=new Map,n=Qp=new Map;n.set(a,r)}else n=Qp,r=n.get(a),r||(r=new Map,n.set(a,r));if(r.has(t))return r;for(r.set(t,null),a=a.getElementsByTagName(t),n=0;n<a.length;n++){var i=a[n];if(!(i[ud]||i[ra]||t==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(e)||"";o=t+o;var s=r.get(o);s?s.push(i):r.set(o,[i])}}return r}function by(t,e,a){t=t.ownerDocument||t,t.head.insertBefore(a,e==="title"?t.querySelector("head > title"):null)}function kq(t,e,a){if(a===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function rT(t,e){return t==="img"&&e.src!=null&&e.src!==""&&e.onLoad==null&&e.loading!=="lazy"}function aI(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function rI(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function nT(t,e){typeof e.decode=="function"&&(t.imgCount++,e.complete||(t.imgBytes+=rI(e),t.suspenseyImages.push(e)),t=Pq.bind(t),e.decode().then(t,t))}function Lq(t,e,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=Ku(r.href),i=e.querySelector(md(n));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=ad.bind(t),e.then(t,t)),a.state.loading|=4,a.instance=i,Ht(i);return}i=e.ownerDocument||e,r=tI(r),(n=_r.get(n))&&Ob(r,n),i=i.createElement("link"),Ht(i);var o=i;o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),sa(i,"link",r),a.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,e),(e=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=ad.bind(t),e.addEventListener("load",a),e.addEventListener("error",a))}}var Mp=0;function Tq(t,e){return t.stylesheets&&t.count===0&&Ep(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var r=setTimeout(function(){if(t.stylesheets&&Ep(t,t.stylesheets),t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}},6e4+e);0<t.imgBytes&&Mp===0&&(Mp=62500*UX());var n=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Ep(t,t.stylesheets),t.unsuspend)){var i=t.unsuspend;t.unsuspend=null,i()}},(t.imgBytes>Mp?50:800)+e);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(n)}}:null}function nI(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Ep(t,t.stylesheets);else if(t.unsuspend){var e=t.unsuspend;t.unsuspend=null,e()}}}function ad(){this.count--,nI(this)}function Pq(){this.imgCount--,nI(this)}var um=null;function Ep(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,um=new Map,e.forEach(Rq,t),um=null,ad.call(t))}function Rq(t,e){if(!(e.state.loading&4)){var a=um.get(t);if(a)var r=a.get(null);else{a=new Map,um.set(t,a);for(var n=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var o=n[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(a.set(o.dataset.precedence,o),r=o)}r&&a.set(null,r)}n=e.instance,o=n.getAttribute("data-precedence"),i=a.get(o)||r,i===r&&a.set(null,n),a.set(o,n),this.count++,r=ad.bind(this),n.addEventListener("load",r),n.addEventListener("error",r),i?i.parentNode.insertBefore(n,i.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(n,t.firstChild)),e.state.loading|=4}}var Ju={$$typeof:Hn,Provider:null,Consumer:null,_currentValue:qs,_currentValue2:qs,_threadCount:0};function Iq(t,e,a,r,n,i,o,s,l){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=z0(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=z0(0),this.hiddenUpdates=z0(null),this.identifierPrefix=r,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.transitionTypes=null,this.incompleteTransitions=new Map}function iI(t,e,a,r,n,i,o,s,l,u,c,f){return t=new Iq(t,e,a,o,l,u,c,f,s),e=1,i===!0&&(e|=24),i=Ha(3,null,null,e),t.current=i,i.stateNode=t,e=_y(),e.refCount++,t.pooledCache=e,e.refCount++,i.memoizedState={element:r,isDehydrated:a,cache:e},Xy(i),t}function oI(t){return t?(t=Ru,t):Ru}function sI(t,e,a,r,n,i){n=oI(n),r.context===null?r.context=n:r.pendingContext=n,r=Io(e),r.payload={element:a},i=i===void 0?null:i,i!==null&&(r.callback=i),a=Ao(t,r,e),a!==null&&(Ga(a,t,e),Ef(a,t,e))}function iT(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<e?a:e}}function yb(t,e){iT(t,e),(t=t.alternate)&&iT(t,e)}function lI(t){if(t.tag===13||t.tag===31){var e=nl(t,67108864);e!==null&&Ga(e,t,67108864),yb(t,67108864)}}function oT(t){if(t.tag===13||t.tag===31){var e=gr();e=Ly(e);var a=nl(t,e);a!==null&&Ga(a,t,e),yb(t,e)}}var ec=!0;function Aq(t,e,a,r){var n=he.T;he.T=null;var i=Ne.p;try{Ne.p=2,bb(t,e,a,r)}finally{Ne.p=i,he.T=n}}function Qq(t,e,a,r){var n=he.T;he.T=null;var i=Ne.p;try{Ne.p=8,bb(t,e,a,r)}finally{Ne.p=i,he.T=n}}function bb(t,e,a,r){if(ec){var n=vy(r);if(n===null)lx(t,e,r,cm,a),sT(t,r);else if(Eq(n,t,e,a,r))r.stopPropagation();else if(sT(t,r),e&4&&-1<Mq.indexOf(t)){for(;n!==null;){var i=rc(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Bs(i.pendingLanes);if(o!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var l=1<<31-mr(o);s.entanglements[1]|=l,o&=~l}ai(i),(ze&6)===0&&(nm=hr()+500,pd(0,!1))}}break;case 31:case 13:s=nl(i,2),s!==null&&Ga(s,i,2),Lm(),yb(i,2)}if(i=vy(r),i===null&&lx(t,e,r,cm,a),i===n)break;n=i}n!==null&&r.stopPropagation()}else lx(t,e,r,null,a)}}function vy(t){return t=Ry(t),vb(t)}var cm=null;function vb(t){if(cm=null,t=Ns(t),t!==null){var e=id(t);if(e===null)t=null;else{var a=e.tag;if(a===13){if(t=hT(e),t!==null)return t;t=null}else if(a===31){if(t=pT(e),t!==null)return t;t=null}else if(a===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return cm=t,null}function uI(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(FN()){case bT:return 2;case vT:return 8;case zp:case HN:return 32;case ST:return 268435456;default:return 32}default:return 32}}var Sy=!1,Do=null,$o=null,Bo=null,rd=new Map,nd=new Map,vo=[],Mq="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function sT(t,e){switch(t){case"focusin":case"focusout":Do=null;break;case"dragenter":case"dragleave":$o=null;break;case"mouseover":case"mouseout":Bo=null;break;case"pointerover":case"pointerout":rd.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":nd.delete(e.pointerId)}}function wf(t,e,a,r,n,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:a,eventSystemFlags:r,nativeEvent:i,targetContainers:[n]},e!==null&&(e=rc(e),e!==null&&lI(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,n!==null&&e.indexOf(n)===-1&&e.push(n),t)}function Eq(t,e,a,r,n){switch(e){case"focusin":return Do=wf(Do,t,e,a,r,n),!0;case"dragenter":return $o=wf($o,t,e,a,r,n),!0;case"mouseover":return Bo=wf(Bo,t,e,a,r,n),!0;case"pointerover":var i=n.pointerId;return rd.set(i,wf(rd.get(i)||null,t,e,a,r,n)),!0;case"gotpointercapture":return i=n.pointerId,nd.set(i,wf(nd.get(i)||null,t,e,a,r,n)),!0}return!1}function cI(t){var e=Ns(t.target);if(e!==null){var a=id(e);if(a!==null){if(e=a.tag,e===13){if(e=hT(a),e!==null){t.blockedOn=e,Mk(t.priority,function(){oT(a)});return}}else if(e===31){if(e=pT(a),e!==null){t.blockedOn=e,Mk(t.priority,function(){oT(a)});return}}else if(e===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Dp(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var a=vy(t.nativeEvent);if(a===null){a=t.nativeEvent;var r=new a.constructor(a.type,a);kx=r,a.target.dispatchEvent(r),kx=null}else return e=rc(a),e!==null&&lI(e),t.blockedOn=a,!1;e.shift()}return!0}function lT(t,e,a){Dp(t)&&a.delete(e)}function Dq(){Sy=!1,Do!==null&&Dp(Do)&&(Do=null),$o!==null&&Dp($o)&&($o=null),Bo!==null&&Dp(Bo)&&(Bo=null),rd.forEach(lT),nd.forEach(lT)}function mp(t,e){t.blockedOn===e&&(t.blockedOn=null,Sy||(Sy=!0,Xt.unstable_scheduleCallback(Xt.unstable_NormalPriority,Dq)))}var gp=null;function uT(t){gp!==t&&(gp=t,Xt.unstable_scheduleCallback(Xt.unstable_NormalPriority,function(){gp===t&&(gp=null);for(var e=0;e<t.length;e+=3){var a=t[e],r=t[e+1],n=t[e+2];if(typeof r!="function"){if(vb(r||a)===null)continue;break}var i=rc(a);i!==null&&(t.splice(e,3),e-=3,Xx(i,{pending:!0,data:n,method:a.method,action:r},r,n))}}))}function tc(t){function e(l){return mp(l,t)}Do!==null&&mp(Do,t),$o!==null&&mp($o,t),Bo!==null&&mp(Bo,t),rd.forEach(e),nd.forEach(e);for(var a=0;a<vo.length;a++){var r=vo[a];r.blockedOn===t&&(r.blockedOn=null)}for(;0<vo.length&&(a=vo[0],a.blockedOn===null);)cI(a),a.blockedOn===null&&vo.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var n=a[r],i=a[r+1],o=n[Wa]||null;if(typeof i=="function")o||uT(a);else if(o){var s=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[Wa]||null)s=o.formAction;else if(vb(n)!==null)continue}else s=o.action;typeof s=="function"?a[r+1]=s:(a.splice(r,3),r-=3),uT(a)}}}function fI(){function t(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return n=o})},focusReset:"manual",scroll:"manual"})}function e(){n!==null&&(n(),n=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,n=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),n!==null&&(n(),n=null)}}}function Sb(t){this._internalRoot=t}Rm.prototype.render=Sb.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(I(409));var a=e.current,r=gr();sI(a,r,t,e,null,null)};Rm.prototype.unmount=Sb.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;sI(t.current,2,null,t,null,null),Lm(),e[ac]=null}};function Rm(t){this._internalRoot=t}Rm.prototype.unstable_scheduleHydration=function(t){if(t){var e=PT();t={blockedOn:null,target:t,priority:e};for(var a=0;a<vo.length&&e!==0&&e<vo[a].priority;a++);vo.splice(a,0,t),a===0&&cI(t)}};var cT=fT.version;if(cT!=="19.3.0")throw Error(I(527,cT,"19.3.0"));Ne.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(I(188)):(t=Object.keys(t).join(","),Error(I(268,t)));return t=$N(e),t=t!==null?mT(t):null,t=t===null?null:t.stateNode,t};var $q={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:he,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Cf=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Cf.isDisabled&&Cf.supportsFiber))try{od=Cf.inject($q),pr=Cf}catch{}var Cf;Im.createRoot=function(t,e){if(!dT(t))throw Error(I(299));var a=!1,r="",n=UP,i=jP,o=FP;return e!=null&&(e.unstable_strictMode===!0&&(a=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onUncaughtError!==void 0&&(n=e.onUncaughtError),e.onCaughtError!==void 0&&(i=e.onCaughtError),e.onRecoverableError!==void 0&&(o=e.onRecoverableError)),e=iI(t,1,!1,null,null,a,r,null,n,i,o,fI),t[ac]=e.current,hb(t),new Sb(e)};Im.hydrateRoot=function(t,e,a){if(!dT(t))throw Error(I(299));var r=!1,n="",i=UP,o=jP,s=FP,l=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(o=a.onCaughtError),a.onRecoverableError!==void 0&&(s=a.onRecoverableError),a.formState!==void 0&&(l=a.formState)),e=iI(t,1,!0,e,a??null,r,n,l,i,o,s,fI),e.context=oI(null),a=e.current,r=gr(),r=Ly(r),n=Io(r),n.callback=null,Ao(a,n,r),a=r,e.current.lanes=a,ld(e,a),ai(e),t[ac]=e.current,hb(t),new Rm(e)};Im.version="19.3.0"});var mI=Xn((FW,pI)=>{"use strict";function hI(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hI)}catch(t){console.error(t)}}hI(),pI.exports=dI()});var OI=Xn(Am=>{"use strict";var Bq=Symbol.for("react.transitional.element"),_q=Symbol.for("react.fragment");function gI(t,e,a){var r=null;if(a!==void 0&&(r=""+a),e.key!==void 0&&(r=""+e.key),"key"in e){a={};for(var n in e)n!=="key"&&(a[n]=e[n])}else a=e;return e=a.ref,{$$typeof:Bq,type:t,key:r,ref:e!==void 0?e:null,props:a}}Am.Fragment=_q;Am.jsx=gI;Am.jsxs=gI});var G=Xn((GW,xI)=>{"use strict";xI.exports=OI()});var Zh=L(F(),1),Wz=L(mI(),1);var uc=L(F(),1),yI=L(G(),1),wb=uc.createContext(void 0),ol=t=>{let e=uc.useContext(wb);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Cb=({client:t,children:e})=>(uc.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,yI.jsx)(wb.Provider,{value:t,children:e}));var zq={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Nq=class{#e=zq;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},ri=new Nq;function bI(t){setTimeout(t,0)}var Lb=typeof window>"u"||"Deno"in globalThis;function vt(){}function wI(t,e){return typeof t=="function"?t(e):t}function Qm(t){return typeof t=="number"&&t>=0&&t!==1/0}function Mm(t,e){return Math.max(t+(e||0)-Date.now(),0)}function at(t,e){return typeof t=="function"?t(e):t}function Em(t,e){let{type:a="all",exact:r,fetchStatus:n,predicate:i,queryKey:o,stale:s}=t;if(o){if(r){if(e.queryHash!==Od(o,e.options))return!1}else if(!Uo(e.queryKey,o))return!1}if(a!=="all"){let l=e.isActive();if(a==="active"&&!l||a==="inactive"&&l)return!1}return!(typeof s=="boolean"&&e.isStale()!==s||n&&n!==e.state.fetchStatus||i&&!i(e))}function Dm(t,e){let{exact:a,status:r,predicate:n,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(a){if(ni(e.options.mutationKey)!==ni(i))return!1}else if(!Uo(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||n&&!n(e))}function Od(t,e){return(e?.queryKeyHashFn||ni)(t)}function ni(t){return JSON.stringify(t,(e,a)=>kb(a)?Object.keys(a).sort().reduce((r,n)=>(r[n]=a[n],r),{}):a)}function Uo(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){if(e.length>t.length)return!1;for(let r=0;r<e.length;r++)if(!Uo(t[r],e[r]))return!1;return!0}let a=Object.keys(e);for(let r of a)if(!Uo(t[r],e[r]))return!1;return!0}return!1}var Xq=Object.prototype.hasOwnProperty;function Tb(t,e,a=0){if(t===e)return t;if(a>500)return e;let r=vI(t)&&vI(e);if(!r&&!(kb(t)&&kb(e)))return e;let n=(r?t:Object.keys(t)).length,i=r?e:Object.keys(e),o=i.length,s=r?new Array(o):{},l=0;for(let u=0;u<o;u++){let c=r?u:i[u],f=t[c],d=e[c];if(f===d){s[c]=f,(r?u<n:Xq.call(t,c))&&l++;continue}if(f===null||d===null||typeof f!="object"||typeof d!="object"){s[c]=d;continue}let h=Tb(f,d,a+1);s[c]=h,h===f&&l++}return n===o&&l===n?t:s}function cc(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let a in t)if(t[a]!==e[a])return!1;return!0}function vI(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function kb(t){if(!SI(t))return!1;let e=Object.getPrototypeOf(t),a=e?.constructor;if(a===void 0)return!0;if(typeof a!="function")return!1;let r=a.prototype;return!(!SI(r)||!r.hasOwnProperty("isPrototypeOf")||e!==Object.prototype)}function SI(t){return Object.prototype.toString.call(t)==="[object Object]"}function CI(t){return new Promise(e=>{ri.setTimeout(e,t)})}function xd(t,e,a){return typeof a.structuralSharing=="function"?a.structuralSharing(t,e):a.structuralSharing!==!1?Tb(t,e):e}function kI(t,e,a=0){let r=[...t,e];return a&&r.length>a?r.slice(1):r}function LI(t,e,a=0){let r=[e,...t];return a&&r.length>a?r.slice(0,-1):r}var fc=Symbol();function $m(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===fc?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function dc(t,e){return typeof t=="function"?t(...e):!!t}function TI(t,e,a){let r=!1,n;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(n??=e(),r||(r=!0,n.aborted?a():n.addEventListener("abort",a,{once:!0})),n)}),t}var qq=()=>Lb,hc=()=>qq();var zr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var Zq=class extends zr{#e;#t;#a;constructor(){super(),this.#a=t=>{if(typeof window<"u"&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#a=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},pc=new Zq;var PI=bI;function Vq(){let t=[],e=0,a=s=>{s()},r=s=>{s()},n=PI,i=s=>{e?t.push(s):n(()=>{a(s)})},o=()=>{let s=t;t=[],s.length&&n(()=>{r(()=>{s.forEach(l=>{a(l)})})})};return{batch:s=>{let l;e++;try{l=s()}finally{e--,e||o()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{a=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{n=s}}}var He=Vq();var Uq=class extends zr{#e=!0;#t;#a;constructor(){super(),this.#a=t=>{if(typeof window<"u"&&window.addEventListener){let e=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#a=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#e}},mc=new Uq;function jq(t){return Math.min(1e3*2**t,3e4)}function Pb(t){return(t??"online")==="online"?mc.isOnline():!0}var Bm=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function _m(t){let e=!1,a=0,r,n="pending",i,o,s=new Promise((O,y)=>{i=O,o=y});s.catch(vt);let l=()=>n!=="pending",u=O=>{if(!l()){let y=new Bm(O);m(y),t.onCancel?.(y)}},c=()=>{e=!0},f=()=>{e=!1},d=()=>pc.isFocused()&&(t.networkMode==="always"||mc.isOnline())&&t.canRun(),h=()=>Pb(t.networkMode)&&t.canRun(),p=O=>{l()||(r?.(),n="resolved",i(O))},m=O=>{l()||(r?.(),n="rejected",o(O))},x=()=>new Promise(O=>{r=y=>{(l()||d())&&O(y)},t.onPause?.()}).then(()=>{r=void 0,l()||t.onContinue?.()}),g=()=>{if(l())return;let O,y=a===0?t.initialPromise:void 0;try{O=y??t.fn()}catch(b){O=Promise.reject(b)}Promise.resolve(O).then(p).catch(b=>{if(l())return;let v=t.retry??(hc()?0:3),S=t.retryDelay??jq,w=typeof S=="function"?S(a,b):S,k=v===!0||typeof v=="number"&&a<v||typeof v=="function"&&v(a,b);if(e||!k){m(b);return}a++,t.onFail?.(a,b),CI(w).then(()=>d()?void 0:x()).then(()=>{e?m(b):g()})})};return{promise:s,status:()=>n,cancel:u,continue:()=>(r?.(),s),cancelRetry:c,continueRetry:f,canStart:h,start:()=>(h()?g():x().then(g),s)}}var zm=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qm(this.gcTime)&&(this.#e=ri.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(hc()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(ri.clearTimeout(this.#e),this.#e=void 0)}};function II(t){return{onFetch:(e,a)=>{let r=e.options,n=e.fetchOptions?.meta?.fetchMore?.direction,i=e.state.data?.pages||[],o=e.state.data?.pageParams||[],s={pages:[],pageParams:[]},l=0,u=async()=>{let c=!1,f=p=>{TI(p,()=>e.signal,()=>c=!0)},d=$m(e.options,e.fetchOptions),h=async(p,m,x)=>{if(c)return Promise.reject(e.signal.reason);if(m==null&&p.pages.length)return Promise.resolve(p);let O=(()=>{let S={client:e.client,queryKey:e.queryKey,pageParam:m,direction:x?"backward":"forward",meta:e.options.meta};return f(S),S})(),y=await d(O),{maxPages:b}=e.options,v=x?LI:kI;return{pages:v(p.pages,y,b),pageParams:v(p.pageParams,m,b)}};if(n&&i.length){let p=n==="backward",m=p?Fq:RI,x={pages:i,pageParams:o};s=await h(x,m(r,x),p)}else{let p=t??i.length;do{let m=l===0?o[0]??r.initialPageParam:RI(r,s);if(l>0&&m==null)break;s=await h(s,m),l++}while(l<p)}return s};e.options.persister?e.fetchFn=()=>e.options.persister?.(u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},a):e.fetchFn=u}}}function RI(t,{pages:e,pageParams:a}){let r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,a[r],a):void 0}function Fq(t,{pages:e,pageParams:a}){return e.length>0?t.getPreviousPageParam?.(e[0],e,a[0],a):void 0}var MI=class extends zm{#e;#t;#a;#r;#i;#n;#o;#l;constructor(t){super(),this.#l=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#r=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=QI(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#n?.promise}setOptions(t){if(this.options={...this.#o,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=QI(this.options);e.data!==void 0&&(this.setState(AI(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){let a=xd(this.state.data,t,this.options);return this.#s({data:a,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),a}setState(t){this.#s({type:"setState",state:t})}cancel(t){let e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(vt).catch(vt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>at(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>at(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Mm(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){let e=this.observers.indexOf(t);e!==-1&&(this.observers.splice(e,1),this.observers.length||(this.#n&&(this.#l||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(t&&this.setOptions(t),!this.options.queryFn){let l=this.observers.find(u=>u.options.queryFn);l&&this.setOptions(l.options)}let a=new AbortController,r=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#l=!0,a.signal)})},n=()=>{let l=$m(this.options,e),c=(()=>{let f={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(f),f})();return this.#l=!1,this.options.persister?this.options.persister(l,c,this):l(c)},o=(()=>{let l={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:n};return r(l),l})();(this.#e==="infinite"?II(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#a=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#s({type:"fetch",meta:o.fetchOptions?.meta});let s=this.#n=_m({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:l=>{l instanceof Bm&&l.revert&&this.setState({...this.#a,fetchStatus:"idle"}),a.abort()},onFail:(l,u)=>{this.#s({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let l=await s.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#r.config.onSuccess?.(l,this),this.#r.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof Bm){if(l.silent)return this.#n.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#s({type:"error",error:l}),this.#r.config.onError?.(l,this),this.#r.config.onSettled?.(this.state.data,l,this),l}finally{this.#n===s&&(this.#n=void 0),this.scheduleGc()}}#s(t){let e=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...Rb(a.data,this.options),fetchMeta:t.meta??null};case"success":let r={...a,...AI(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#a=t.manual?r:void 0,r;case"error":let n=t.error;return{...a,error:n,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=e(this.state),He.batch(()=>{this.observers.slice().forEach(a=>{a.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function Rb(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pb(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function AI(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function QI(t){let e=typeof t.initialData=="function"?t.initialData():t.initialData,a=e!==void 0,r=a?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:a?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var Ab=class extends zr{#e;#t=void 0;#a=void 0;#r=void 0;#i;#n;#o;#l;#s;#h;#c;#f;#u;#p=new Set;constructor(t,e){super(),this.options=e,this.#e=t,this.#o=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),EI(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ib(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ib(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#v(),this.#t.removeObserver(this)}setOptions(t){let e=this.options,a=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof at(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),e._defaulted&&!cc(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});let r=this.hasListeners();r&&DI(this.#t,a,this.options,e)&&this.#d(),this.updateResult(),r&&(this.#t!==a||at(this.options.enabled,this.#t)!==at(e.enabled,this.#t)||at(this.options.staleTime,this.#t)!==at(e.staleTime,this.#t))&&this.#g();let n=this.#O();r&&(this.#t!==a||at(this.options.enabled,this.#t)!==at(e.enabled,this.#t)||n!==this.#u)&&this.#x(n)}getOptimisticResult(t){let e=this.#e.getQueryCache().build(this.#e,t),a=this.createResult(e,t);return cc(this.getCurrentResult(),a)||(this.#r=a,this.#n=this.options,this.#i=this.#t.state),a}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(a,r)=>(this.trackProp(r),e?.(r),Reflect.get(a,r))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let e=this.#e.defaultQueryOptions(t),a=this.#e.getQueryCache().build(this.#e,e),r=()=>{},n,i=new Promise(o=>{n=o,r=this.#e.getQueryCache().subscribe(s=>{s.type==="updated"&&s.query.queryHash===a.queryHash&&a.state.data!==void 0&&(r(),o(this.createResult(a,e)))})});return Promise.race([a.fetch().then(()=>{let o=this.createResult(a,e);return n?.(o),o}).finally(()=>{r()}),i])}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(t){this.#S();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(vt)),e}#m(t){return!hc()&&at(this.options.enabled,this.#t)!==!1&&Qm(t)}#g(){this.#b();let t=at(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#m(t))return;let e=Mm(this.#r.dataUpdatedAt,t)+1;this.#c=ri.setTimeout(()=>{this.#r.isStale||this.updateResult()},e)}#O(){return at(this.options.refetchInterval,this.#t)??!1}#x(t){this.#v(),this.#u=t,!(this.#u===0||!this.#m(this.#u))&&(this.#f=ri.setInterval(()=>{(this.options.refetchIntervalInBackground||pc.isFocused())&&this.#d()},this.#u))}#y(){this.#g(),this.#x(this.#O())}#b(){this.#c!==void 0&&(ri.clearTimeout(this.#c),this.#c=void 0)}#v(){this.#f!==void 0&&(ri.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){let a=this.#t,r=this.options,n=this.#r,i=this.#i,o=this.#n,s=t!==a?t.state:this.#a,{state:l}=t,u={...l},c=!1,f;if(e._optimisticResults){let v=this.hasListeners(),S=!v&&EI(t,e),w=v&&DI(t,a,e,r);(S||w)&&(u={...u,...Rb(l.data,t.options)}),e._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:d,errorUpdatedAt:h,status:p}=u;f=u.data;let m=!1;if(e.placeholderData!==void 0&&f===void 0&&p==="pending"){let v;n?.isPlaceholderData&&e.placeholderData===o?.placeholderData?(v=n.data,m=!0):v=typeof e.placeholderData=="function"?e.placeholderData(this.#h?.state.data,this.#h):e.placeholderData,v!==void 0&&(p="success",f=xd(n?.data,v,e),c=!0)}if(e.select&&f!==void 0&&!m)if(n&&f===i?.data&&e.select===this.#l)f=this.#s;else try{this.#l=e.select,f=e.select(f),f=xd(n?.data,f,e),this.#s=f,this.#o=null}catch(v){this.#o=v}else f===void 0&&(this.#o=null);this.#o&&(d=this.#o,f=this.#s,h=Date.now(),p="error",c=!1);let x=u.fetchStatus==="fetching",g=p==="pending",O=p==="error",y=g&&x,b=f!==void 0;return{status:p,fetchStatus:u.fetchStatus,isPending:g,isSuccess:p==="success",isError:O,isInitialLoading:y,isLoading:y,data:f,dataUpdatedAt:u.dataUpdatedAt,error:d,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:u.dataUpdateCount>s.dataUpdateCount||u.errorUpdateCount>s.errorUpdateCount,isFetching:x,isRefetching:x&&!g,isLoadingError:O&&!b,isPaused:u.fetchStatus==="paused",isPlaceholderData:c,isRefetchError:O&&b,isStale:Qb(t,e),refetch:this.refetch,isEnabled:at(e.enabled,t)!==!1}}updateResult(){let t=this.#r,e=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#n=this.options,this.#i.data!==void 0&&(this.#h=this.#t),cc(e,t))return;this.#r=e;let r=(()=>{if(!t)return!0;let{notifyOnChangeProps:n}=this.options,i=typeof n=="function"?n():n;if(i==="all"||!i&&!this.#p.size)return!0;let o=new Set(i??this.#p);return this.options.throwOnError&&o.add("error"),Object.keys(this.#r).some(s=>{let l=s;return this.#r[l]!==t[l]&&o.has(l)})})();He.batch(()=>{r&&this.listeners.forEach(n=>{n(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#S(){let t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;let e=this.#t;this.#t=t,this.#a=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Hq(t,e){return at(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&at(e.retryOnMount,t)===!1)}function EI(t,e){return Hq(t,e)||t.state.data!==void 0&&Ib(t,e,e.refetchOnMount)}function Ib(t,e,a){if(at(e.enabled,t)!==!1&&at(e.staleTime,t)!=="static"){let r=at(a,t);return r==="always"||r!==!1&&Qb(t,e)}return!1}function DI(t,e,a,r){return(t!==e||at(r.enabled,t)===!1)&&(!a.suspense||t.state.status!=="error")&&Qb(t,a)}function Qb(t,e){return at(e.enabled,t)!==!1&&t.isStaleByTime(at(e.staleTime,t))}var $I=class extends zm{#e;#t;#a;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#a=t.mutationCache,this.#t=[],this.state=t.state||Mb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#r?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){let e=()=>{this.#i({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=_m({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(o,s)=>{this.#i({type:"failed",failureCount:o,error:s})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)}),n=this.state.status==="pending",i=!r.canStart();try{if(n)e();else{this.#i({type:"pending",variables:t,isPaused:i}),this.#a.config.onMutate&&await this.#a.config.onMutate(t,this,a);let s=await this.options.onMutate?.(t,a);s!==this.state.context&&this.#i({type:"pending",context:s,variables:t,isPaused:i})}let o=await r.start();return await this.#a.config.onSuccess?.(o,t,this.state.context,this,a),await this.options.onSuccess?.(o,t,this.state.context,a),await this.#a.config.onSettled?.(o,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(o,null,t,this.state.context,a),this.#i({type:"success",data:o}),o}catch(o){try{await this.#a.config.onError?.(o,t,this.state.context,this,a)}catch(s){Promise.reject(s)}try{await this.options.onError?.(o,t,this.state.context,a)}catch(s){Promise.reject(s)}try{await this.#a.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,a)}catch(s){Promise.reject(s)}try{await this.options.onSettled?.(void 0,o,t,this.state.context,a)}catch(s){Promise.reject(s)}throw this.#i({type:"error",error:o}),o}finally{this.#r===r&&(this.#r=void 0),this.#a.runNext(this)}}#i(t){let e=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,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{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),He.batch(()=>{this.#t.forEach(a=>{a.onMutationUpdate(t)}),this.#a.notify({mutation:this,type:"updated",action:t})})}};function Mb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var BI=class extends zr{#e;#t;#a;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#a=0}build(t,e,a){let r=new $I({client:t,mutationCache:this,mutationId:++this.#a,options:t.defaultMutationOptions(e),state:a});return this.add(r),r}add(t){this.#e.add(t);let e=Nm(t);if(typeof e=="string"){let a=this.#t.get(e);a?a.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){let e=Nm(t);if(typeof e=="string"){let a=this.#t.get(e);if(a)if(a.length>1){let r=a.indexOf(t);r!==-1&&a.splice(r,1)}else a[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){let e=Nm(t);if(typeof e=="string"){let a=this.#t.get(e)?.find(r=>r.state.status==="pending");return!a||a===t}else return!0}runNext(t){let e=Nm(t);return typeof e=="string"?this.#t.get(e)?.find(a=>a!==t&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){He.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){let e={exact:!0,...t};return this.getAll().find(a=>Dm(e,a))}findAll(t={}){return this.getAll().filter(e=>Dm(t,e))}notify(t){He.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(e=>e.state.isPaused);return He.batch(()=>Promise.all(t.map(e=>e.continue().catch(vt))))}};function Nm(t){return t.options.scope?.id}var Eb=class extends zr{#e;#t=void 0;#a;#r;constructor(t,e){super(),this.#e=t,this.setOptions(e),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#e.defaultMutationOptions(t),cc(this.options,e)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),e?.mutationKey&&this.options.mutationKey&&ni(e.mutationKey)!==ni(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#a&&(this.#a.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#n(t)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#i(),this.#n()}mutate(t,e){return this.#r=e,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(t)}#i(){let t=this.#a?.state??Mb();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#n(t){He.batch(()=>{if(this.#r&&this.hasListeners()){let e=this.#t.variables,a=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,a,r)}catch(n){Promise.reject(n)}try{this.#r.onSettled?.(t.data,null,e,a,r)}catch(n){Promise.reject(n)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,a,r)}catch(n){Promise.reject(n)}try{this.#r.onSettled?.(void 0,t.error,e,a,r)}catch(n){Promise.reject(n)}}}this.listeners.forEach(e=>{e(this.#t)})})}};var _I=class extends zr{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,e,a){let r=e.queryKey,n=e.queryHash??Od(r,e),i=this.get(n);return i||(i=new MI({client:t,queryKey:r,queryHash:n,options:t.defaultQueryOptions(e),state:a,defaultOptions:t.getQueryDefaults(r)}),this.add(i)),i}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){this.#e.get(t.queryHash)===t&&(t.destroy(),this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(a=>Em(e,a))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(a=>Em(t,a)):e}notify(t){He.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}};var Db=class{#e;#t;#a;#r;#i;#n;#o;#l;constructor(t={}){this.#e=t.queryCache||new _I,this.#t=t.mutationCache||new BI,this.#a=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#n=0}mount(){this.#n++,this.#n===1&&(this.#o=pc.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=mc.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#n--,this.#n===0&&(this.#o?.(),this.#o=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),a=this.#e.build(this,e),r=a.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&a.isStaleByTime(at(e.staleTime,a))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:a})=>[e,a.data])}setQueryData(t,e,a){let r=this.defaultQueryOptions({queryKey:t}),n=this.#e.get(r.queryHash)?.state.data,i=wI(e,n);if(i!==void 0)return this.#e.build(this,r).setData(i,{...a,manual:!0})}setQueriesData(t,e,a){return He.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,a)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){let e=this.#e;He.batch(()=>{e.findAll(t).forEach(a=>{e.remove(a)})})}resetQueries(t,e){let a=this.#e;return He.batch(()=>{let r=a.findAll(t),n=new Set(r);return r.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>n.has(i)},e)})}cancelQueries(t,e={}){let a={revert:!0,...e},r=He.batch(()=>this.#e.findAll(t).map(n=>n.cancel(a)));return Promise.all(r).then(vt).catch(vt)}invalidateQueries(t,e={}){return He.batch(()=>(this.#e.findAll(t).forEach(a=>{a.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){let a={...e,cancelRefetch:e.cancelRefetch??!0},r=He.batch(()=>this.#e.findAll(t).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let i=n.fetch(void 0,a);return a.throwOnError||(i=i.catch(vt)),n.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(vt)}async query(t){let e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);let a=this.#e.build(this,e),r=a.isStaleByTime(at(e.staleTime,a))?await a.fetch(e):a.state.data,n=e.select;return n?n(r):r}fetchQuery(t){let e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);let a=this.#e.build(this,e);return a.isStaleByTime(at(e.staleTime,a))?a.fetch(e):Promise.resolve(a.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(vt).catch(vt)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(vt).catch(vt)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return mc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#a}setDefaultOptions(t){this.#a=t}setQueryDefaults(t,e){this.#r.set(ni(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#r.values()],a={};return e.forEach(r=>{Uo(t,r.queryKey)&&Object.assign(a,r.defaultOptions)}),a}setMutationDefaults(t,e){this.#i.set(ni(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#i.values()],a={};return e.forEach(r=>{Uo(t,r.mutationKey)&&Object.assign(a,r.defaultOptions)}),a}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#a.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Od(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===fc&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#a.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};var Xm=L(F(),1),zI=Xm.createContext(!1),NI=()=>Xm.useContext(zI),LJ=zI.Provider;var yd=L(F(),1),Gq=L(G(),1);function Yq(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Wq=yd.createContext(Yq()),XI=()=>yd.useContext(Wq);var qI=L(F(),1);var ZI=(t,e,a)=>{let r=a?.state.error&&typeof t.throwOnError=="function"?dc(t.throwOnError,[a.state.error,a]):t.throwOnError;(t.suspense||r)&&(e.isReset()||(t.retryOnMount=!1))},VI=t=>{qI.useEffect(()=>{t.clearReset()},[t])},UI=({result:t,errorResetBoundary:e,throwOnError:a,query:r,suspense:n})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(n&&t.data===void 0||dc(a,[t.error,r]));var jI=t=>{if(t.suspense){let a=n=>n==="static"?n:Math.max(n??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...n)=>a(r(...n)):a(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},FI=(t,e)=>t?.suspense&&e.isPending,HI=(t,e,a)=>e.fetchOptimistic(t).catch(()=>{a.clearReset()});var jo=L(F(),1);function GI(t,e,a){let r=NI(),n=XI(),i=ol(a),o=i.defaultQueryOptions(t),s=i.getQueryCache().get(o.queryHash),l=t.subscribed!==!1;o._optimisticResults=r?"isRestoring":l?"optimistic":void 0,jI(o),ZI(o,n,s),VI(n);let[u]=jo.useState(()=>new e(i,o)),c=u.getOptimisticResult(o),f=!r&&l;if(jo.useSyncExternalStore(jo.useCallback(d=>{let h=f?u.subscribe(He.batchCalls(d)):vt;return u.updateResult(),h},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),jo.useEffect(()=>{u.setOptions(o)},[o,u]),FI(o,c))throw HI(o,u,n);if(UI({result:c,errorResetBoundary:n,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw c.error;return o.notifyOnChangeProps?c:u.trackResult(c)}function Nr(t,e){return GI(t,Ab,e)}var Ni=L(F(),1);function dn(t,e){let a=ol(e),[r]=Ni.useState(()=>new Eb(a,t));Ni.useEffect(()=>{r.setOptions(t)},[r,t]);let n=Ni.useSyncExternalStore(Ni.useCallback(o=>r.subscribe(He.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=Ni.useCallback((...o)=>{r.mutate(o[0],o[1]).catch(vt)},[r]);if(n.error&&dc(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:i,mutateAsync:n.mutate}}var qm=L(F(),1);var YI=t=>t?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function WI(t,e,a=[]){if(e==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:YI(t),size:24,node:e,...a.length>0?{aliases:a}:{}}}var KI=t=>{let e="",a=!1;for(let r of t){if(r==="-"||r==="_"||r<=" "){a=e.length>0;continue}e.length===0?e+=r.toLowerCase():e+=a?r.toUpperCase():r,a=!1}return e};var JI=t=>{let e=KI(t);return e.charAt(0).toUpperCase()+e.slice(1)};var vd=L(F(),1);var bd=(...t)=>t.filter((e,a,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===a).join(" ").trim();var Fo={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function $b(t){return t!=null}function eA(t,e={}){let a=e.attributeNames??{},r=d=>a[d]??d,n=t.size??t.width??Fo.width,i=t.size??t.height??Fo.height,o=t.aliases?.filter(d=>typeof d=="string"&&d.trim()!=="").map(d=>`lucide-${d}`)??[],s=[...t.name?[`lucide-${t.name}`]:[],...o],l=e.className?.split(" ").filter(Boolean)??[],u=e.includeDefaultClasses===!1?bd(...l):bd("lucide",...s,...l),c=e.absoluteStrokeWidth?Number(e.strokeWidth??Fo["stroke-width"])*Number(t.size??t.width??Fo.width)/Number(e.size??e.width??Fo.width):e.strokeWidth??Fo["stroke-width"];return["svg",{...Object.entries(Fo).reduce((d,[h,p])=>(d[r(h)]=p,d),{}),..."color"in e&&e.color&&{[r("stroke")]:e.color},..."size"in e&&$b(e.size)&&{[r("width")]:e.size,[r("height")]:e.size},..."width"in e&&$b(e.width)&&{[r("width")]:e.width},..."height"in e&&$b(e.height)&&{[r("height")]:e.height},[r("stroke-width")]:c,...u&&{[r("class")]:u},[r("viewBox")]:`0 0 ${n} ${i}`,...e.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in e&&e.attributes},t.node.map(d=>{let[h,p,m]=d,x=e.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...p}:p;return m?[h,x,m]:[h,x]})]}function tA(t,e={}){return eA(t,{...e,attributeNames:{...e.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}var aA=t=>{for(let e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};var gc=L(F(),1);var Kq=(0,gc.createContext)({});var rA=()=>(0,gc.useContext)(Kq);var nA=(0,vd.forwardRef)(({color:t,size:e,width:a,height:r,strokeWidth:n,absoluteStrokeWidth:i,nonScalingStroke:o,className:s="",children:l,iconNode:u=[],icon:c={node:u,aliases:[],size:24},...f},d)=>{let{size:h=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,nonScalingStroke:x=!1,color:g="currentColor",className:O=""}=rA()??{},y=!!l||aA(f),[b,v,S=[]]=tA(c,{color:t??g,width:a??e??h,height:r??e??h,strokeWidth:n??p,absoluteStrokeWidth:i??m,nonScalingStroke:o??x,className:bd(O,s),hasA11yProp:y,attributes:f});return(0,vd.createElement)(b,{ref:d,...v},[...S.map(([w,k])=>(0,vd.createElement)(w,k)),...Array.isArray(l)?l:[l]])});function Lt(t,e=[],a=[]){let r=typeof t=="string"?WI(t,e,a):t,n=(0,qm.forwardRef)(({className:i,...o},s)=>(0,qm.createElement)(nA,{ref:s,icon:r,className:i,...o}));return r.name&&(n.displayName=JI(r.name)),n}var iA={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};iA.node;var Sd=Lt(iA);var oA={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};oA.node;var Oc=Lt(oA);var sA={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};sA.node;var wd=Lt(sA);var lA={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};lA.node;var Ho=Lt(lA);var uA={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};uA.node;var hn=Lt(uA);var cA={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};cA.node;var Cd=Lt(cA);var fA={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};fA.node;var Go=Lt(fA);var dA={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};dA.node;var Yo=Lt(dA);var hA={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};hA.node;var kd=Lt(hA);var pA={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};pA.node;var Wo=Lt(pA);var mA={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};mA.node;var sl=Lt(mA);var Jq=/^[\w!#$%&'*.^`|~+-]+$/;var eZ=(t,e,a={})=>{if(!Jq.test(t))throw new Error("Invalid cookie name");let r=`${t}=${e}`;if(t.startsWith("__Secure-")&&!a.secure)throw new Error("__Secure- Cookie must have Secure attributes");if(t.startsWith("__Host-")){if(!a.secure)throw new Error("__Host- Cookie must have Secure attributes");if(a.path!=="/")throw new Error('__Host- Cookie must have Path attributes with "/"');if(a.domain)throw new Error("__Host- Cookie must not have Domain attributes")}for(let n of["domain","path","sameSite","priority"])if(a[n]&&/[;\r\n]/.test(a[n]))throw new Error(`${n} must not contain ";", "\\r", or "\\n"`);if(a&&typeof a.maxAge=="number"&&a.maxAge>=0){if(a.maxAge>3456e4)throw new Error("Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.");r+=`; Max-Age=${a.maxAge|0}`}if(a.domain&&a.prefix!=="host"&&(r+=`; Domain=${a.domain}`),a.path&&(r+=`; Path=${a.path}`),a.expires){if(a.expires.getTime()-Date.now()>3456e7)throw new Error("Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.");r+=`; Expires=${a.expires.toUTCString()}`}if(a.httpOnly&&(r+="; HttpOnly"),a.secure&&(r+="; Secure"),a.sameSite&&(r+=`; SameSite=${a.sameSite.charAt(0).toUpperCase()+a.sameSite.slice(1)}`),a.priority&&(r+=`; Priority=${a.priority.charAt(0).toUpperCase()+a.priority.slice(1)}`),a.partitioned){if(!a.secure)throw new Error("Partitioned Cookie must have Secure attributes");r+="; Partitioned"}return r},gA=(t,e,a)=>(e=encodeURIComponent(e),eZ(t,e,a));var OA=(t,e)=>(t=t.replace(/\/+$/,""),t=t+"/",e=e.replace(/^\/+/,""),t+e),Vm=(t,e)=>{for(let[a,r]of Object.entries(e)){let n=new RegExp("/:"+a+"(?:{[^/]+})?\\??(?=/|$)");t=t.replace(n,()=>r?`/${r}`:"")}return t},xA=t=>{let e=new URLSearchParams;for(let[a,r]of Object.entries(t))if(r!==void 0)if(Array.isArray(r))for(let n of r)n!==void 0&&e.append(a,n);else e.set(a,r);return e},yA=(t,e)=>{switch(e){case"ws":return t.replace(/^http/,"ws");case"http":return t.replace(/^ws/,"http")}},Um=t=>/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(t)?t.replace(/\/index(?=\?|$)/,"/"):t.replace(/\/index(?=\?|$)/,"");function Zm(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Bb(t,e){if(!Zm(t)&&!Zm(e))return e;let a={...t};for(let r in e){let n=e[r];Zm(a[r])&&Zm(n)?a[r]=Bb(a[r],n):a[r]=n}return a}var bA=(t,e)=>new Proxy(()=>{},{get(r,n){if(!(typeof n!="string"||n==="then"))return bA(t,[...e,n])},apply(r,n,i){return t({path:e,args:i})}}),vA=(t,e)=>{let a=e.toString();return a?`${t}?${a}`:t},aZ=class{url;method;buildSearchParams;queryParams=void 0;pathParams={};rBody;cType=void 0;constructor(t,e,a){this.url=t,this.method=e,this.buildSearchParams=a.buildSearchParams}fetch=async(t,e)=>{if(t){if(t.query&&(this.queryParams=this.buildSearchParams(t.query)),t.form){let s=new FormData;for(let[l,u]of Object.entries(t.form))if(u!==void 0)if(Array.isArray(u))for(let c of u)c!==void 0&&s.append(l,c);else s.append(l,u);this.rBody=s}t.json!==void 0&&(this.rBody=JSON.stringify(t.json),this.cType="application/json"),t.param&&(this.pathParams=t.param)}let a=this.method.toUpperCase(),r={...t?.header,...typeof e?.headers=="function"?await e.headers():e?.headers};if(t?.cookie){let s=[];for(let[l,u]of Object.entries(t.cookie))u!==void 0&&s.push(gA(l,u));s.length>0&&(r.Cookie=s.join("; "))}this.cType&&(r["Content-Type"]=this.cType);let n=new Headers;for(let[s,l]of Object.entries(r))l!==void 0&&n.set(s,l);let i=this.url;i=Um(i),i=Vm(i,this.pathParams),this.queryParams&&(i=vA(i,this.queryParams)),a=this.method.toUpperCase();let o=!(a==="GET"||a==="HEAD");return(e?.fetch||fetch)(i,{body:o?this.rBody:void 0,method:a,headers:n,...e?.init})}},_b=(t,e)=>bA(function a(r){let n=e?.buildSearchParams??xA,i=[...r.path],o=i.slice(-3).reverse();if(o[0]==="toString")return o[1]==="name"?o[2]||"":a.toString();if(o[0]==="valueOf")return o[1]==="name"?o[2]||"":a;let s="";if(/^\$/.test(o[0])){let f=i.pop();f&&(s=f.replace(/^\$/,""))}let l=i.join("/"),u=OA(t,l);if(s==="url"||s==="path"){let f=Um(u);return r.args[0]&&(r.args[0].param&&(f=Vm(f,r.args[0].param)),r.args[0].query&&(f=vA(f,n(r.args[0].query)))),s==="url"?new URL(f):f.slice(t.replace(/\/+$/,"").length).replace(/^\/?/,"/")}if(s==="ws"){let f=Um(u),d=yA(r.args[0]?.param?Vm(f,r.args[0].param):f,"ws"),h=new URL(d),p=r.args[0]?.query;return p&&n(p).forEach((g,O)=>{h.searchParams.append(O,g)}),((...x)=>e?.webSocket!==void 0&&typeof e.webSocket=="function"?e.webSocket(...x):new WebSocket(...x))(h.toString())}let c=new aZ(u,s,{buildSearchParams:n});if(s){e??={};let f={...r.args[1]},d=e.headers,h=f.headers;d&&h&&(f.headers=async()=>({...typeof d=="function"?await d():d,...typeof h=="function"?await h():h}));let p=Bb(e,f);return c.fetch(r.args[0],p)}return c},[]);var Et=_b("/api",{headers:{Authorization:`Bearer ${new URLSearchParams(location.search).get("t")??""}`}});function xc(){return Nr({queryKey:["kinds"],queryFn:async()=>(await Et.definitions.kinds.$get()).json()})}function ii(t){return Nr({queryKey:["primitives",t??""],queryFn:async()=>(await Et.charter.root.primitives.$get({query:t===void 0?{}:{matching:t}})).json()})}function SA(t){return Nr({queryKey:["explanation",t],queryFn:async()=>(await Et.charter.root.primitives[":identity"].explanation.$get({param:{identity:encodeURIComponent(t)}})).json()})}function wA(t){return Nr({queryKey:["primitive",t],enabled:t!==void 0,gcTime:0,refetchOnWindowFocus:!1,queryFn:async()=>{let e=await Et.charter.root.primitives[":identity"].$get({param:{identity:encodeURIComponent(t??"")}});return{answer:await e.json(),entityTag:e.headers.get("ETag")??""}}})}function CA(t){return Nr({queryKey:["requirements",t],enabled:t!=="",queryFn:async()=>(await Et.definitions.kinds[":kind"].requirements.$get({param:{kind:t}})).json()})}function Xi(){let t=ol();return async()=>{await t.resetQueries({queryKey:["testOutcome"]}),await t.invalidateQueries({predicate:({queryKey:e})=>e[0]!=="kinds"&&e[0]!=="requirements"&&e[0]!=="testOutcome"})}}function kA(){let t=Xi();return dn({mutationFn:async e=>(await Et.charter.root.primitives.$post({json:e})).json(),onSuccess:t})}function LA(){let t=Xi();return dn({mutationFn:async e=>(await Et.charter.root.primitives[":identity"].$put({...e,param:{identity:encodeURIComponent(e.param.identity)}})).json(),onSuccess:t})}function TA(){let t=Xi();return dn({mutationFn:async e=>{let a=await Et.charter.root.primitives[":identity"].$delete({param:{identity:encodeURIComponent(e)}},{headers:{"Content-Type":"application/json"}});return a.status===422?a.json():null},onSuccess:t})}function PA(){return Nr({queryKey:["build"],gcTime:0,queryFn:async()=>(await Et.charter.root.build.$get()).json()})}function RA(){return Nr({queryKey:["health"],gcTime:0,queryFn:async()=>(await Et.charter.root.health.$get()).json()})}function jm(){let t=Xi();return dn({mutationFn:async()=>(await Et.charter.root.build.$post({},{headers:{"Content-Type":"application/json"}})).json(),onSuccess:t})}function IA(){return Nr({queryKey:["vendors"],queryFn:async()=>(await Et.vendors.$get()).json()})}function AA(){let t=Xi();return dn({mutationFn:async e=>{let a=await Et.vendors.$post({json:e});return a.status===422?a.json():null},onSuccess:t})}function QA(){let t=Xi();return dn({mutationFn:async e=>{let a=await Et.vendors[":name"].$delete({param:{name:e}},{headers:{"Content-Type":"application/json"}});return a.status===422?a.json():null},onSuccess:t})}function Fm(){return Nr({queryKey:["testSuites"],queryFn:async()=>(await Et["test-suites"].$get()).json()})}function MA(){return Nr({queryKey:["testOutcome"],enabled:!1,queryFn:async()=>(await Et["test-suites"].outcome.$get()).json()})}function EA(){let t=Xi();return dn({mutationFn:async()=>(await Et["test-suites"].$post({},{headers:{"Content-Type":"application/json"}})).json(),onSuccess:t})}function DA(){let t=Xi();return dn({mutationFn:async({name:e,text:a})=>(await Et["test-suites"][":name"].$put({param:{name:e},json:{text:a}})).json(),onSuccess:async e=>{typeof e=="string"&&await t()}})}function $A(){let t=Xi();return dn({mutationFn:async e=>{let a=await Et["test-suites"][":name"].$delete({param:{name:e}},{headers:{"Content-Type":"application/json"}});return a.status===422?a.json():null},onSuccess:t})}var tu=L(F(),1);var X=L(F(),1),NA=L(Es(),1);function rZ(t){if(!t||typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",e.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}var nZ=t=>{switch(t){case"success":return sZ;case"info":return uZ;case"warning":return lZ;case"error":return cZ;default:return null}},iZ=Array(12).fill(0),oZ=({visible:t,className:e})=>X.default.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},X.default.createElement("div",{className:"sonner-spinner"},iZ.map((a,r)=>X.default.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sZ=X.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},X.default.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),lZ=X.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},X.default.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),uZ=X.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},X.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),cZ=X.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},X.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fZ=X.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},X.default.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),X.default.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dZ=()=>{let[t,e]=X.default.useState(document.hidden);return X.default.useEffect(()=>{let a=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",a),()=>document.removeEventListener("visibilitychange",a)},[]),t},hZ=1,pZ=100,BA=t=>{var e;return typeof t?.id=="number"||(t==null||(e=t.id)==null?void 0:e.length)>0?t.id:hZ++},zb=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(a=>e(a)),()=>{let a=this.subscribers.indexOf(e);this.subscribers.splice(a,1)}),this.publish=e=>{this.subscribers.forEach(a=>a(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-pZ;e<=0||(this.toasts=this.toasts.filter(a=>e>0&&this.dismissedToasts.has(a.id)?(this.dismissedToasts.delete(a.id),e--,!1):!0))},this.create=e=>{let{message:a,...r}=e,n=BA(e),i=this.pendingDismissals.get(n);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(n),this.dismissedToasts.delete(n));let o=this.dismissedToasts.has(n),s=e.dismissible===void 0?!0:e.dismissible;return o&&(this.dismissedToasts.delete(n),this.toasts=this.toasts.filter(u=>u.id!==n)),(o?void 0:this.toasts.find(u=>u.id===n))?this.toasts=this.toasts.map(u=>u.id===n?(this.publish({...u,...e,id:n,title:a}),{...u,...e,id:n,dismissible:s,title:a}):u):this.addToast({title:a,...r,dismissible:s,id:n}),n},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let a=this.pendingDismissals.get(e);return a!==void 0&&cancelAnimationFrame(a),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(r=>r({id:e,dismiss:!0}))})),e},this.message=(e,a)=>this.create({...a,message:e,type:void 0}),this.error=(e,a)=>this.create({...a,message:e,type:"error"}),this.success=(e,a)=>this.create({...a,type:"success",message:e}),this.info=(e,a)=>this.create({...a,type:"info",message:e}),this.warning=(e,a)=>this.create({...a,type:"warning",message:e}),this.loading=(e,a)=>this.create({...a,type:"loading",message:e}),this.promise=(e,a)=>{if(!a)return;let r;a.loading!==void 0&&(r=this.create({...a,promise:e,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));let n=Promise.resolve(e instanceof Function?e():e),i=r!==void 0,o,s=n.then(async u=>{if(o=["resolve",u],X.default.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(gZ(u)&&!u.ok){i=!1;let f=typeof a.error=="function"?await a.error(`HTTP error! status: ${u.status}`):a.error,d=typeof a.description=="function"?await a.description(`HTTP error! status: ${u.status}`):a.description,p=typeof f=="object"&&!X.default.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...p})}else if(u instanceof Error){i=!1;let f=typeof a.error=="function"?await a.error(u):a.error,d=typeof a.description=="function"?await a.description(u):a.description,p=typeof f=="object"&&!X.default.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...p})}else if(a.success!==void 0){i=!1;let f=typeof a.success=="function"?await a.success(u):a.success,d=typeof a.description=="function"?await a.description(u):a.description,p=typeof f=="object"&&!X.default.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:d,...p})}}).catch(async u=>{if(o=["reject",u],a.error!==void 0){i=!1;let c=typeof a.error=="function"?await a.error(u):a.error,f=typeof a.description=="function"?await a.description(u):a.description,h=typeof c=="object"&&!X.default.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:f,...h})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),a.finally==null||a.finally.call(a)}),l=()=>new Promise((u,c)=>s.then(()=>o[0]==="reject"?c(o[1]):u(o[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,a)=>{let r=BA(a);return this.create({...a,jsx:e(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},Ka=new zb,mZ=(t,e)=>Ka.message(t,e),gZ=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",OZ=mZ,xZ=()=>Ka.toasts,yZ=()=>Ka.getActiveToasts(),ll=Object.assign(OZ,{success:Ka.success,info:Ka.info,warning:Ka.warning,error:Ka.error,custom:Ka.custom,message:Ka.message,promise:Ka.promise,dismiss:Ka.dismiss,loading:Ka.loading},{getHistory:xZ,getToasts:yZ});rZ("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Hm(t){return t.label!==void 0}var bZ=3,vZ="24px",SZ="16px",_A=4e3,wZ=356,CZ=14,kZ=45,LZ=200;function oi(...t){return t.filter(Boolean).join(" ")}function TZ(t){let[e,a]=t.split("-"),r=[];return e&&r.push(e),a&&r.push(a),r}var PZ=t=>{var e,a,r,n,i,o,s,l,u;let{invert:c,toast:f,unstyled:d,interacting:h,setHeights:p,visibleToasts:m,heights:x,index:g,toasts:O,expanded:y,removeToast:b,defaultRichColors:v,closeButton:S,style:w,cancelButtonStyle:k,actionButtonStyle:T,className:Q="",descriptionClassName:$="",duration:A,position:R,gap:D,expandByDefault:Y,classNames:B,icons:q,closeButtonAriaLabel:re="Close toast"}=t,[ie,z]=X.default.useState(null),[Pe,P]=X.default.useState(null),[H,N]=X.default.useState(!1),[M,j]=X.default.useState(!1),[de,ee]=X.default.useState(!1),[Z,qe]=X.default.useState(!1),[Re,Ie]=X.default.useState(!1),[Ze,Vt]=X.default.useState(0),[Za,iu]=X.default.useState(0),Si=X.default.useRef(f.duration||A||_A),ou=X.default.useRef(null),wi=X.default.useRef(null),Kz=g===0,Jz=g+1<=m,Ca=f.type,qC=Ca??"default",su=f.dismissible!==!1,eN=f.className||"",tN=f.descriptionClassName||"",Vh=X.default.useMemo(()=>x.findIndex(ge=>ge.toastId===f.id)||0,[x,f.id]),aN=X.default.useMemo(()=>{var ge;return(ge=f.closeButton)!=null?ge:S},[f.closeButton,S]),ZC=X.default.useMemo(()=>f.duration||A||_A,[f.duration,A]),m0=X.default.useRef(0),lu=X.default.useRef(0),VC=X.default.useRef(0),uu=X.default.useRef(null),[rN,nN]=R.split("-"),UC=X.default.useMemo(()=>x.reduce((ge,Ut,ma)=>ma>=Vh?ge:ge+Ut.height,0),[x,Vh]),jC=dZ(),_n=X.default.useMemo(()=>{var ge;return(ge=t.swipeDirections)!=null?ge:TZ(R)},[t.swipeDirections,R]),iN=f.invert||c,g0=Ca==="loading";lu.current=X.default.useMemo(()=>Vh*D+UC,[Vh,UC]),X.default.useEffect(()=>{Si.current=ZC},[ZC]),X.default.useEffect(()=>{N(!0)},[]),X.default.useEffect(()=>{let ge=wi.current;if(ge){let Ut=ge.getBoundingClientRect().height;return iu(Ut),p(ma=>[{toastId:f.id,height:Ut,position:f.position},...ma]),()=>p(ma=>ma.filter(Va=>Va.toastId!==f.id))}},[p,f.id]),X.default.useLayoutEffect(()=>{if(!H)return;let ge=wi.current,Ut=ge.style.height;ge.style.height="auto";let ma=ge.getBoundingClientRect().height;ge.style.height=Ut,iu(ma),p(Va=>Va.find(ta=>ta.toastId===f.id)?Va.map(ta=>ta.toastId===f.id?{...ta,height:ma}:ta):[{toastId:f.id,height:ma,position:f.position},...Va])},[H,f.title,f.description,p,f.id,f.jsx,f.action,f.cancel]);let ho=X.default.useCallback(()=>{j(!0),Vt(lu.current),p(ge=>ge.filter(Ut=>Ut.toastId!==f.id)),setTimeout(()=>{b(f)},LZ)},[f,b,p,lu]);X.default.useEffect(()=>{if(f.promise&&Ca==="loading"||f.duration===1/0||f.type==="loading")return;let ge;return y||h||jC?(()=>{if(VC.current<m0.current){let Va=new Date().getTime()-m0.current;Si.current=Si.current-Va}VC.current=new Date().getTime()})():Si.current!==1/0&&(m0.current=new Date().getTime(),ge=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),ho()},Si.current)),()=>clearTimeout(ge)},[y,h,f,Ca,jC,ho]),X.default.useEffect(()=>{f.delete&&(ho(),f.onDismiss==null||f.onDismiss.call(f,f))},[ho,f.delete]);function FC(){var ge;if(q?.loading){var Ut;return X.default.createElement("div",{className:oi(B?.loader,f==null||(Ut=f.classNames)==null?void 0:Ut.loader,"sonner-loader"),"data-visible":Ca==="loading"},q.loading)}return X.default.createElement(oZ,{className:oi(B?.loader,f==null||(ge=f.classNames)==null?void 0:ge.loader),visible:Ca==="loading"})}let oN=f.icon||q?.[Ca]||nZ(Ca);var HC,GC;return X.default.createElement("li",{tabIndex:0,ref:wi,className:oi(Q,eN,B?.toast,f==null||(e=f.classNames)==null?void 0:e.toast,B?.[qC],f==null||(a=f.classNames)==null?void 0:a[qC]),"data-sonner-toast":"","data-rich-colors":(HC=f.richColors)!=null?HC:v,"data-styled":!(f.jsx||f.unstyled||d),"data-mounted":H,"data-promise":!!f.promise,"data-swiped":Re,"data-removed":M,"data-visible":Jz,"data-y-position":rN,"data-x-position":nN,"data-index":g,"data-front":Kz,"data-swiping":de,"data-dismissible":su,"data-type":Ca,"data-invert":iN,"data-swipe-out":Z,"data-swipe-direction":Pe,"data-expanded":!!(y||Y&&H),"data-testid":f.testId,style:{"--index":g,"--toasts-before":g,"--z-index":O.length-g,"--offset":`${M?Ze:lu.current}px`,"--initial-height":Y?"auto":`${Za}px`,...w,...f.style},onDragEnd:()=>{ee(!1),z(null),uu.current=null},onPointerDown:ge=>{ge.button!==2&&(g0||!su||(ou.current=new Date,Vt(lu.current),ge.target.setPointerCapture(ge.pointerId),ge.target.tagName!=="BUTTON"&&(ee(!0),uu.current={x:ge.clientX,y:ge.clientY})))},onPointerUp:()=>{var ge,Ut,ma;if(Z||!su)return;uu.current=null;let Va=Number(((ge=wi.current)==null?void 0:ge.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),pf=Number(((Ut=wi.current)==null?void 0:Ut.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ta=new Date().getTime()-((ma=ou.current)==null?void 0:ma.getTime()),Pr=ie==="x"?Va:pf,zn=Math.abs(Pr)/ta;if((ie==="x"?_n.includes(Va>0?"right":"left"):_n.includes(pf>0?"bottom":"top"))&&(Math.abs(Pr)>=kZ||zn>.11)){Vt(lu.current),f.onDismiss==null||f.onDismiss.call(f,f),P(ie==="x"?Va>0?"right":"left":pf>0?"down":"up"),ho(),qe(!0);return}else{var Nn,x0;(Nn=wi.current)==null||Nn.style.setProperty("--swipe-amount-x","0px"),(x0=wi.current)==null||x0.style.setProperty("--swipe-amount-y","0px")}Ie(!1),ee(!1),z(null)},onPointerMove:ge=>{var Ut,ma,Va;if(!uu.current||!su||((Ut=window.getSelection())==null?void 0:Ut.toString().length)>0)return;let ta=ge.clientY-uu.current.y,Pr=ge.clientX-uu.current.x;!ie&&(Math.abs(Pr)>1||Math.abs(ta)>1)&&z(Math.abs(Pr)>Math.abs(ta)?"x":"y");let zn={x:0,y:0},O0=Nn=>1/(1.5+Math.abs(Nn)/20);if(ie==="y"){if(_n.includes("top")||_n.includes("bottom"))if(_n.includes("top")&&ta<0||_n.includes("bottom")&&ta>0)zn.y=ta;else{let Nn=ta*O0(ta);zn.y=Math.abs(Nn)<Math.abs(ta)?Nn:ta}}else if(ie==="x"&&(_n.includes("left")||_n.includes("right")))if(_n.includes("left")&&Pr<0||_n.includes("right")&&Pr>0)zn.x=Pr;else{let Nn=Pr*O0(Pr);zn.x=Math.abs(Nn)<Math.abs(Pr)?Nn:Pr}(Math.abs(zn.x)>0||Math.abs(zn.y)>0)&&Ie(!0),(ma=wi.current)==null||ma.style.setProperty("--swipe-amount-x",`${zn.x}px`),(Va=wi.current)==null||Va.style.setProperty("--swipe-amount-y",`${zn.y}px`)}},aN&&!f.jsx&&Ca!=="loading"?X.default.createElement("button",{"aria-label":re,"data-disabled":g0,"data-close-button":!0,onClick:g0||!su?()=>{}:()=>{ho(),f.onDismiss==null||f.onDismiss.call(f,f)},className:oi(B?.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(GC=q?.close)!=null?GC:fZ):null,(Ca||f.icon||f.promise)&&f.icon!==null&&(q?.[Ca]!==null||f.icon)?X.default.createElement("div",{"data-icon":"",className:oi(B?.icon,f==null||(n=f.classNames)==null?void 0:n.icon)},Ca==="loading"?f.icon||FC():f.promise?FC():null,Ca!=="loading"?oN:null):null,X.default.createElement("div",{"data-content":"",className:oi(B?.content,f==null||(i=f.classNames)==null?void 0:i.content)},X.default.createElement("div",{"data-title":"",className:oi(B?.title,f==null||(o=f.classNames)==null?void 0:o.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?X.default.createElement("div",{"data-description":"",className:oi($,tN,B?.description,f==null||(s=f.classNames)==null?void 0:s.description)},typeof f.description=="function"?f.description():f.description):null),X.default.isValidElement(f.cancel)?f.cancel:f.cancel&&Hm(f.cancel)?X.default.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||k,onClick:ge=>{Hm(f.cancel)&&su&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,ge),ho())},className:oi(B?.cancelButton,f==null||(l=f.classNames)==null?void 0:l.cancelButton)},f.cancel.label):null,X.default.isValidElement(f.action)?f.action:f.action&&Hm(f.action)?X.default.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||T,onClick:ge=>{Hm(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,ge),!ge.defaultPrevented&&ho())},className:oi(B?.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function zA(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function RZ(t,e){let a={};return[t,e].forEach((r,n)=>{let i=n===1,o=i?"--mobile-offset":"--offset",s=i?SZ:vZ;function l(u){["top","right","bottom","left"].forEach(c=>{a[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?a[`${o}-${u}`]=s:a[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(s)}),a}var XA=X.default.forwardRef(function(e,a){let{id:r,invert:n,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:l,className:u,offset:c,mobileOffset:f,theme:d="light",richColors:h,duration:p,style:m,visibleToasts:x=bZ,toastOptions:g,dir:O=zA(),gap:y=CZ,icons:b,customAriaLabel:v,containerAriaLabel:S="Notifications"}=e,[w,k]=X.default.useState([]),T=X.default.useMemo(()=>r?w.filter(N=>N.toasterId===r):w.filter(N=>!N.toasterId),[w,r]),Q=X.default.useMemo(()=>Array.from(new Set([i].concat(T.filter(N=>N.position).map(N=>N.position)))),[T,i]),[$,A]=X.default.useState([]),[R,D]=X.default.useState(!1),[Y,B]=X.default.useState(!1),[q,re]=X.default.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ie=X.default.useRef(null),z=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),Pe=X.default.useRef(null),P=X.default.useRef(!1),H=X.default.useCallback(N=>{k(M=>{var j;return(j=M.find(de=>de.id===N.id))!=null&&j.delete||Ka.dismiss(N.id),M.filter(({id:de})=>de!==N.id)})},[]);return X.default.useEffect(()=>Ka.subscribe(N=>{if(N.dismiss){requestAnimationFrame(()=>{k(M=>M.map(j=>j.id===N.id?{...j,delete:!0}:j))});return}setTimeout(()=>{NA.default.flushSync(()=>{k(M=>{let j=M.findIndex(de=>de.id===N.id);return j!==-1?[...M.slice(0,j),{...M[j],...N},...M.slice(j+1)]:[N,...M]})})})}),[]),X.default.useEffect(()=>{if(d!=="system"){re(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?re("dark"):re("light")),typeof window>"u")return;let N=window.matchMedia("(prefers-color-scheme: dark)");try{N.addEventListener("change",({matches:M})=>{re(M?"dark":"light")})}catch{N.addListener(({matches:j})=>{try{re(j?"dark":"light")}catch(de){console.error(de)}})}},[d]),X.default.useEffect(()=>{w.length<=1&&D(!1)},[w]),X.default.useEffect(()=>{let N=M=>{var j;if(o.length>0&&o.every(Z=>M[Z]||M.code===Z)){var ee;D(!0),(ee=ie.current)==null||ee.focus()}M.code==="Escape"&&(document.activeElement===ie.current||(j=ie.current)!=null&&j.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[o]),X.default.useEffect(()=>{if(ie.current)return()=>{Pe.current&&(Pe.current.focus({preventScroll:!0}),Pe.current=null,P.current=!1)}},[ie.current]),X.default.createElement("section",{ref:a,"aria-label":v??`${S} ${z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},Q.map((N,M)=>{var j;let[de,ee]=N.split("-");return T.length?X.default.createElement("ol",{key:N,dir:O==="auto"?zA():O,tabIndex:-1,ref:ie,className:u,"data-sonner-toaster":!0,"data-sonner-theme":q,"data-y-position":de,"data-x-position":ee,style:{"--front-toast-height":`${((j=$[0])==null?void 0:j.height)||0}px`,"--width":`${wZ}px`,"--gap":`${y}px`,...m,...RZ(c,f)},onBlur:Z=>{P.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(P.current=!1,Pe.current&&(Pe.current.focus({preventScroll:!0}),Pe.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||P.current||(P.current=!0,Pe.current=Z.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{Y||D(!1)},onDragEnd:()=>D(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},T.filter(Z=>!Z.position&&M===0||Z.position===N).map((Z,qe)=>{var Re,Ie;return X.default.createElement(PZ,{key:Z.id,icons:b,index:qe,toast:Z,defaultRichColors:h,duration:(Re=g?.duration)!=null?Re:p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:n,visibleToasts:x,closeButton:(Ie=g?.closeButton)!=null?Ie:l,interacting:Y,position:N,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:H,toasts:T.filter(Ze=>Ze.position==Z.position),heights:$.filter(Ze=>Ze.position==Z.position),setHeights:A,expandByDefault:s,gap:y,expanded:R,swipeDirections:e.swipeDirections})})):null}))});var Oie=L(F(),1);function qA(t){var e,a,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(a=qA(t[e]))&&(r&&(r+=" "),r+=a)}else for(a in t)t[a]&&(r&&(r+=" "),r+=a);return r}function Gm(){for(var t,e,a=0,r="",n=arguments.length;a<n;a++)(t=arguments[a])&&(e=qA(t))&&(r&&(r+=" "),r+=e);return r}var ZA=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,VA=Gm,si=(t,e)=>a=>{var r;if(e?.variants==null)return VA(t,a?.class,a?.className);let{variants:n,defaultVariants:i}=e,o=Object.keys(n).map(u=>{let c=a?.[u],f=i?.[u];if(c===null)return null;let d=ZA(c)||ZA(f);return n[u][d]}),s=a&&Object.entries(a).reduce((u,c)=>{let[f,d]=c;return d===void 0||(u[f]=d),u},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:d,...h}=c;return Object.entries(h).every(p=>{let[m,x]=p;return Array.isArray(x)?x.includes({...i,...s}[m]):{...i,...s}[m]===x})?[...u,f,d]:u},[]);return VA(t,o,l,a?.class,a?.className)};var IZ=(t,e)=>{let a=new Array(t.length+e.length);for(let r=0;r<t.length;r++)a[r]=t[r];for(let r=0;r<e.length;r++)a[t.length+r]=e[r];return a},AZ=(t,e)=>({classGroupId:t,validator:e}),YA=(t=new Map,e=null,a)=>({nextPart:t,validators:e,classGroupId:a});var UA=[],QZ="arbitrary..",MZ=t=>{let e=DZ(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return EZ(o);let s=o.split("-"),l=s[0]===""&&s.length>1?1:0;return WA(s,l,e)},getConflictingClassGroupIds:(o,s)=>{if(s){let l=r[o],u=a[o];return l?u?IZ(u,l):l:u||UA}return a[o]||UA}}},WA=(t,e,a)=>{if(t.length-e===0)return a.classGroupId;let n=t[e],i=a.nextPart.get(n);if(i){let u=WA(t,e+1,i);if(u)return u}let o=a.validators;if(o===null)return;let s=e===0?t.join("-"):t.slice(e).join("-"),l=o.length;for(let u=0;u<l;u++){let c=o[u];if(c.validator(s))return c.classGroupId}},EZ=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let e=t.slice(1,-1),a=e.indexOf(":"),r=e.slice(0,a);return r?QZ+r:void 0})(),DZ=t=>{let{theme:e,classGroups:a}=t;return $Z(a,e)},$Z=(t,e)=>{let a=YA();for(let r in t){let n=t[r];Xb(n,a,r,e)}return a},Xb=(t,e,a,r)=>{let n=t.length;for(let i=0;i<n;i++){let o=t[i];BZ(o,e,a,r)}},BZ=(t,e,a,r)=>{if(typeof t=="string"){_Z(t,e,a);return}if(typeof t=="function"){zZ(t,e,a,r);return}NZ(t,e,a,r)},_Z=(t,e,a)=>{let r=t===""?e:KA(e,t);r.classGroupId=a},zZ=(t,e,a,r)=>{if(XZ(t)){Xb(t(r),e,a,r);return}e.validators===null&&(e.validators=[]),e.validators.push(AZ(a,t))},NZ=(t,e,a,r)=>{let n=Object.entries(t),i=n.length;for(let o=0;o<i;o++){let[s,l]=n[o];Xb(l,KA(e,s),a,r)}},KA=(t,e)=>{let a=t,r=e.split("-"),n=r.length;for(let i=0;i<n;i++){let o=r[i],s=a.nextPart.get(o);s||(s=YA(),a.nextPart.set(o,s)),a=s}return a},XZ=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,qZ=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,a=Object.create(null),r=Object.create(null),n=(i,o)=>{a[i]=o,e++,e>t&&(e=0,r=a,a=Object.create(null))};return{get(i){let o=a[i];if(o!==void 0)return o;if((o=r[i])!==void 0)return n(i,o),o},set(i,o){i in a?a[i]=o:n(i,o)}}};var ZZ=[],jA=(t,e,a,r,n)=>({modifiers:t,hasImportantModifier:e,baseClassName:a,maybePostfixModifierPosition:r,isExternal:n}),VZ=t=>{let{prefix:e,experimentalParseClassName:a}=t,r=n=>{let i=[],o=0,s=0,l=0,u,c=n.length;for(let m=0;m<c;m++){let x=n[m];if(o===0&&s===0){if(x===":"){i.push(n.slice(l,m)),l=m+1;continue}if(x==="/"){u=m;continue}}x==="["?o++:x==="]"?o--:x==="("?s++:x===")"&&s--}let f=i.length===0?n:n.slice(l),d=f,h=!1;f.endsWith("!")?(d=f.slice(0,-1),h=!0):f.startsWith("!")&&(d=f.slice(1),h=!0);let p=u&&u>l?u-l:void 0;return jA(i,h,d,p)};if(e){let n=e+":",i=r;r=o=>o.startsWith(n)?i(o.slice(n.length)):jA(ZZ,!1,o,void 0,!0)}if(a){let n=r;r=i=>a({className:i,parseClassName:n})}return r},UZ=t=>{let e=new Map;return t.orderSensitiveModifiers.forEach((a,r)=>{e.set(a,1e6+r)}),a=>{let r=[],n=[];for(let i=0;i<a.length;i++){let o=a[i],s=o[0]==="[",l=e.has(o);s||l?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(o)):n.push(o)}return n.length>0&&(n.sort(),r.push(...n)),r}},jZ=t=>({cache:qZ(t.cacheSize),parseClassName:VZ(t),sortModifiers:UZ(t),postfixLookupClassGroupIds:FZ(t),...MZ(t)}),FZ=t=>{let e=Object.create(null),a=t.postfixLookupClassGroups;if(a)for(let r=0;r<a.length;r++)e[a[r]]=!0;return e},HZ=/\s+/,GZ=(t,e)=>{let{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:i,postfixLookupClassGroupIds:o}=e,s=[],l=t.trim().split(HZ),u="";for(let c=l.length-1;c>=0;c-=1){let f=l[c],{isExternal:d,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:x}=a(f);if(d){u=f+(u.length>0?" "+u:u);continue}let g=!!x,O;if(g){let w=m.substring(0,x);O=r(w);let k=O&&o[O]?r(m):void 0;k&&k!==O&&(O=k,g=!1)}else O=r(m);if(!O){if(!g){u=f+(u.length>0?" "+u:u);continue}if(O=r(m),!O){u=f+(u.length>0?" "+u:u);continue}g=!1}let y=h.length===0?"":h.length===1?h[0]:i(h).join(":"),b=p?y+"!":y,v=b+O;if(s.indexOf(v)>-1)continue;s.push(v);let S=n(O,g);for(let w=0;w<S.length;++w){let k=S[w];s.push(b+k)}u=f+(u.length>0?" "+u:u)}return u},YZ=(...t)=>{let e=0,a,r,n="";for(;e<t.length;)(a=t[e++])&&(r=JA(a))&&(n&&(n+=" "),n+=r);return n},JA=t=>{if(typeof t=="string")return t;let e,a="";for(let r=0;r<t.length;r++)t[r]&&(e=JA(t[r]))&&(a&&(a+=" "),a+=e);return a},WZ=(t,...e)=>{let a,r,n,i,o=l=>{let u=e.reduce((c,f)=>f(c),t());return a=jZ(u),r=a.cache.get,n=a.cache.set,i=s,s(l)},s=l=>{let u=r(l);if(u)return u;let c=GZ(l,a);return n(l,c),c};return i=o,(...l)=>i(YZ(...l))},KZ=[],qt=t=>{let e=a=>a[t]||KZ;return e.isThemeGetter=!0,e.themeKey=t,e},eQ=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,tQ=/^\((?:(\w[\w-]*):)?(.+)\)$/i,JZ=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,e4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t4=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,a4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,r4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,n4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ko=t=>JZ.test(t),ve=t=>!!t&&!Number.isNaN(Number(t)),li=t=>!!t&&Number.isInteger(Number(t)),Nb=t=>t.endsWith("%")&&ve(t.slice(0,-1)),qi=t=>e4.test(t),aQ=()=>!0,i4=t=>t4.test(t)&&!a4.test(t),qb=()=>!1,o4=t=>r4.test(t),s4=t=>n4.test(t),l4=t=>!te(t)&&!ae(t),u4=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),c4=t=>Jo(t,iQ,qb),te=t=>eQ.test(t),ul=t=>Jo(t,oQ,i4),FA=t=>Jo(t,x4,ve),f4=t=>Jo(t,lQ,aQ),d4=t=>Jo(t,sQ,qb),HA=t=>Jo(t,rQ,qb),h4=t=>Jo(t,nQ,s4),Ym=t=>Jo(t,uQ,o4),ae=t=>tQ.test(t),Ld=t=>cl(t,oQ),p4=t=>cl(t,sQ),GA=t=>cl(t,rQ),m4=t=>cl(t,iQ),g4=t=>cl(t,nQ),Wm=t=>cl(t,uQ,!0),O4=t=>cl(t,lQ,!0),Jo=(t,e,a)=>{let r=eQ.exec(t);return r?r[1]?e(r[1]):a(r[2]):!1},cl=(t,e,a=!1)=>{let r=tQ.exec(t);return r?r[1]?e(r[1]):a:!1},rQ=t=>t==="position"||t==="percentage",nQ=t=>t==="image"||t==="url",iQ=t=>t==="length"||t==="size"||t==="bg-size",oQ=t=>t==="length",x4=t=>t==="number",sQ=t=>t==="family-name",lQ=t=>t==="number"||t==="weight",uQ=t=>t==="shadow";var y4=()=>{let t=qt("color"),e=qt("font"),a=qt("text"),r=qt("font-weight"),n=qt("tracking"),i=qt("leading"),o=qt("breakpoint"),s=qt("container"),l=qt("spacing"),u=qt("radius"),c=qt("shadow"),f=qt("inset-shadow"),d=qt("text-shadow"),h=qt("drop-shadow"),p=qt("blur"),m=qt("perspective"),x=qt("aspect"),g=qt("ease"),O=qt("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...b(),ae,te],S=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],k=()=>[ae,te,l],T=()=>[Ko,"full","auto",...k()],Q=()=>[li,"none","subgrid",ae,te],$=()=>["auto",{span:["full",li,ae,te]},li,ae,te],A=()=>[li,"auto",ae,te],R=()=>["auto","min","max","fr",ae,te],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...k()],q=()=>[Ko,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],re=()=>[s,Ko,"screen","full","dvw","lvw","svw","min","max","fit",...k()],ie=()=>[Ko,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],z=()=>[t,ae,te],Pe=()=>[...b(),GA,HA,{position:[ae,te]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",m4,c4,{size:[ae,te]}],N=()=>[Nb,Ld,ul],M=()=>["","none","full",u,ae,te],j=()=>["",ve,Ld,ul],de=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[ve,Nb,GA,HA],qe=()=>["","none",p,ae,te],Re=()=>["none",ve,ae,te],Ie=()=>["none",ve,ae,te],Ze=()=>[ve,ae,te],Vt=()=>[Ko,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qi],breakpoint:[qi],color:[aQ],container:[qi],"drop-shadow":[qi],ease:["in","out","in-out"],font:[l4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qi],shadow:[qi],spacing:["px",ve],text:[qi],"text-shadow":[qi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ko,te,ae,x]}],container:["container"],"container-type":[{"@container":["","normal","size",ae,te]}],"container-named":[u4],columns:[{columns:[ve,"auto",te,ae,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[li,"auto",ae,te]}],basis:[{basis:[Ko,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ve,Ko,"auto","initial","none",te]}],grow:[{grow:["",ve,ae,te]}],shrink:[{shrink:["",ve,ae,te]}],order:[{order:[li,"first","last","none",ae,te]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...re()]}],"min-inline-size":[{"min-inline":["auto",...re()]}],"max-inline-size":[{"max-inline":["none",...re()]}],"block-size":[{block:["auto",...ie()]}],"min-block-size":[{"min-block":["auto",...ie()]}],"max-block-size":[{"max-block":["none",...ie()]}],w:[{w:[s,"screen",...q()]}],"min-w":[{"min-w":[s,"screen","none",...q()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh","none",...q()]}],"font-size":[{text:["base",a,Ld,ul]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,O4,f4]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nb,te]}],"font-family":[{font:[p4,d4,e]}],"font-features":[{"font-features":[te]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,ae,te]}],"line-clamp":[{"line-clamp":[ve,"none",ae,FA]}],leading:[{leading:["none",i,...k()]}],"list-image":[{"list-image":["none",ae,te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[ve,"from-font","auto",ae,ul]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[ve,"auto",ae,te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"tab-size":[{tab:[li,ae,te]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Pe()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},li,ae,te],radial:["",ae,te],conic:["",li,ae,te]},g4,h4]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:j()}],"border-w-x":[{"border-x":j()}],"border-w-y":[{"border-y":j()}],"border-w-s":[{"border-s":j()}],"border-w-e":[{"border-e":j()}],"border-w-bs":[{"border-bs":j()}],"border-w-be":[{"border-be":j()}],"border-w-t":[{"border-t":j()}],"border-w-r":[{"border-r":j()}],"border-w-b":[{"border-b":j()}],"border-w-l":[{"border-l":j()}],"divide-x":[{"divide-x":j()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":j()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ve,ae,te]}],"outline-w":[{outline:["",ve,Ld,ul]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","inner","none",c,Wm,Ym]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",f,Wm,Ym]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[ve,ul]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":j()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",d,Wm,Ym]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[ve,ae,te]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ae,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Pe()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,te]}],filter:[{filter:["","none",ae,te]}],blur:[{blur:qe()}],brightness:[{brightness:[ve,ae,te]}],contrast:[{contrast:[ve,ae,te]}],"drop-shadow":[{"drop-shadow":["","none",h,Wm,Ym]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",ve,ae,te]}],"hue-rotate":[{"hue-rotate":[ve,ae,te]}],invert:[{invert:["",ve,ae,te]}],saturate:[{saturate:[ve,ae,te]}],sepia:[{sepia:["",ve,ae,te]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,te]}],"backdrop-blur":[{"backdrop-blur":qe()}],"backdrop-brightness":[{"backdrop-brightness":[ve,ae,te]}],"backdrop-contrast":[{"backdrop-contrast":[ve,ae,te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ve,ae,te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ve,ae,te]}],"backdrop-invert":[{"backdrop-invert":["",ve,ae,te]}],"backdrop-opacity":[{"backdrop-opacity":[ve,ae,te]}],"backdrop-saturate":[{"backdrop-saturate":[ve,ae,te]}],"backdrop-sepia":[{"backdrop-sepia":["",ve,ae,te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ve,"initial",ae,te]}],ease:[{ease:["linear","initial",g,ae,te]}],delay:[{delay:[ve,ae,te]}],animate:[{animate:["none",O,ae,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ae,te]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:Ie()}],"scale-x":[{"scale-x":Ie()}],"scale-y":[{"scale-y":Ie()}],"scale-z":[{"scale-z":Ie()}],"scale-3d":["scale-3d"],skew:[{skew:Ze()}],"skew-x":[{"skew-x":Ze()}],"skew-y":[{"skew-y":Ze()}],transform:[{transform:[ae,te,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Vt()}],"translate-x":[{"translate-x":Vt()}],"translate-y":[{"translate-y":Vt()}],"translate-z":[{"translate-z":Vt()}],"translate-none":["translate-none"],zoom:[{zoom:[li,ae,te]}],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":z()}],"scrollbar-track-color":[{"scrollbar-track":z()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,te]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[ve,Ld,ul,FA]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var cQ=WZ(y4);function pe(...t){return cQ(Gm(t))}var ui="sticky -bottom-[18px] -mx-5 -mb-[18px] mt-[18px] flex items-center gap-2 border-t border-[#f0f0f0] bg-background px-[18px] py-[13px]";var A4=L(F(),1);var OQ=L(F(),1),xQ=L(Es(),1);var yc={};cu(yc,{Root:()=>S4,Slot:()=>S4,Slottable:()=>w4,createSlot:()=>Ia,createSlottable:()=>jb});var ua=L(F(),1);var fQ=L(F(),1),b4=Object.defineProperty,Vb=(t,e)=>b4(t,"name",{value:e,configurable:!0});function Zb(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Vb(Zb,"setRef");function es(...t){return e=>{let a=!1,r=t.map(n=>{let i=Zb(n,e);return!a&&typeof i=="function"&&(a=!0),i});if(a)return()=>{for(let n=0;n<r.length;n++){let i=r[n];typeof i=="function"?i():Zb(t[n],null)}}}}Vb(es,"composeRefs");function Qe(...t){return fQ.useCallback(es(...t),t)}Vb(Qe,"useComposedRefs");var v4=Object.defineProperty,pn=(t,e)=>v4(t,"name",{value:e,configurable:!0});function Ia(t){let e=ua.forwardRef((a,r)=>{let{children:n,...i}=a,o=null,s=!1,l=[];Ub(n)&&typeof Km=="function"&&(n=Km(n._payload)),ua.Children.forEach(n,d=>{if(mQ(d)){s=!0;let h=d,p="child"in h.props?h.props.child:h.props.children;Ub(p)&&typeof Km=="function"&&(p=Km(p._payload)),o=C4(h,p),l.push(o?.props?.children)}else l.push(d)}),o?o=ua.cloneElement(o,void 0,l):!s&&ua.Children.count(n)===1&&ua.isValidElement(n)&&(o=n);let u=o?pQ(o):void 0,c=Qe(r,u);if(!o){if(n||n===0)throw new Error(s?T4(t):L4(t));return n}let f=hQ(i,o.props??{});return o.type!==ua.Fragment&&(f.ref=r?c:u),ua.cloneElement(o,f)});return e.displayName=`${t}.Slot`,e}pn(Ia,"createSlot");var S4=Ia("Slot"),dQ=Symbol.for("radix.slottable");function jb(t){let e=pn(a=>"child"in a?a.children(a.child):a.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=dQ,e}pn(jb,"createSlottable");var w4=jb("Slottable"),C4=pn((t,e)=>{if("child"in t.props){let a=t.props.child;return ua.isValidElement(a)?ua.cloneElement(a,void 0,t.props.children(a.props.children)):null}return ua.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function hQ(t,e){let a={...e};for(let r in e){let n=t[r],i=e[r];/^on[A-Z]/.test(r)?n&&i?a[r]=(...s)=>{let l=i(...s);return n(...s),l}:n&&(a[r]=n):r==="style"?a[r]={...n,...i}:r==="className"&&(a[r]=[n,i].filter(Boolean).join(" "))}return{...t,...a}}pn(hQ,"mergeProps");function pQ(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=e&&"isReactWarning"in e&&e.isReactWarning;return a?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=e&&"isReactWarning"in e&&e.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}pn(pQ,"getElementRef");function mQ(t){return ua.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===dQ}pn(mQ,"isSlottable");var k4=Symbol.for("react.lazy");function Ub(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===k4&&"_payload"in t&&gQ(t._payload)}pn(Ub,"isLazyComponent");function gQ(t){return typeof t=="object"&&t!==null&&"then"in t}pn(gQ,"isPromiseLike");var L4=pn(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),T4=pn(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Km=ua[" use ".trim().toString()];var yQ=L(G(),1),P4=Object.defineProperty,R4=(t,e)=>P4(t,"name",{value:e,configurable:!0}),I4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=I4.reduce((t,e)=>{let a=Ia(`Primitive.${e}`),r=OQ.forwardRef((n,i)=>{let{asChild:o,...s}=n,l=o?a:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,yQ.jsx)(l,{...s,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Fb(t,e){t&&xQ.flushSync(()=>t.dispatchEvent(e))}R4(Fb,"dispatchDiscreteCustomEvent");var Q4=L(G(),1);var bQ=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});var qr=L(F(),1),Hb=L(G(),1),M4=Object.defineProperty,Xr=(t,e)=>M4(t,"name",{value:e,configurable:!0});function E4(t,e){let a=qr.createContext(e);a.displayName=t+"Context";let r=Xr(i=>{let{children:o,...s}=i,l=qr.useMemo(()=>s,Object.values(s));return(0,Hb.jsx)(a.Provider,{value:l,children:o})},"Provider");r.displayName=t+"Provider";function n(i,o={}){let{optional:s=!1}=o,l=qr.useContext(a);if(l)return l;if(e!==void 0)return e;if(!s)throw new Error(`\`${i}\` must be used within \`${t}\``)}return Xr(n,"useContext"),[r,n]}Xr(E4,"createContext");function ca(t,e=[]){let a=[];function r(i,o){let s=qr.createContext(o);s.displayName=i+"Context";let l=a.length;a=[...a,o];let u=Xr(f=>{let{scope:d,children:h,...p}=f,m=d?.[t]?.[l]||s,x=qr.useMemo(()=>p,Object.values(p));return(0,Hb.jsx)(m.Provider,{value:x,children:h})},"Provider");u.displayName=i+"Provider";function c(f,d,h={}){let{optional:p=!1}=h,m=d?.[t]?.[l]||s,x=qr.useContext(m);if(x)return x;if(o!==void 0)return o;if(!p)throw new Error(`\`${f}\` must be used within \`${i}\``)}return Xr(c,"useContext"),[u,c]}Xr(r,"createContext");let n=Xr(()=>{let i=a.map(o=>qr.createContext(o));return Xr(function(s){let l=s?.[t]||i;return qr.useMemo(()=>({[`__scope${t}`]:{...s,[t]:l}}),[s,l])},"useScope")},"createScope");return n.scopeName=t,[r,vQ(n,...e)]}Xr(ca,"createContextScope");function vQ(...t){let e=t[0];if(t.length===1)return e;let a=Xr(()=>{let r=t.map(n=>({useScope:n(),scopeName:n.scopeName}));return Xr(function(i){let o=r.reduce((s,{useScope:l,scopeName:u})=>{let f=l(i)[`__scope${u}`];return{...s,...f}},{});return qr.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])},"useComposedScopes")},"createScope");return a.scopeName=e.scopeName,a}Xr(vQ,"composeContextScopes");var mn=L(F(),1);var Jm=L(G(),1),Ja=L(F(),1);var fl=L(G(),1),D4=Object.defineProperty,Yt=(t,e)=>D4(t,"name",{value:e,configurable:!0});function Td(t){let e=t+"CollectionProvider",[a,r]=ca(e),[n,i]=a(e,{collectionRef:{current:null},itemMap:new Map}),o=Yt(m=>{let{scope:x,children:g}=m,O=mn.useRef(null),y=mn.useRef(new Map).current;return(0,Jm.jsx)(n,{scope:x,itemMap:y,collectionRef:O,children:g})},"CollectionProvider");o.displayName=e;let s=t+"CollectionSlot",l=Ia(s),u=mn.forwardRef((m,x)=>{let{scope:g,children:O}=m,y=i(s,g),b=Qe(x,y.collectionRef);return(0,Jm.jsx)(l,{ref:b,children:O})});u.displayName=s;let c=t+"CollectionItemSlot",f="data-radix-collection-item",d=Ia(c),h=mn.forwardRef((m,x)=>{let{scope:g,children:O,...y}=m,b=mn.useRef(null),v=Qe(x,b),S=i(c,g);return mn.useEffect(()=>(S.itemMap.set(b,{ref:b,...y}),()=>{S.itemMap.delete(b)})),(0,Jm.jsx)(d,{[f]:"",ref:v,children:O})});h.displayName=c;function p(m){let x=i(t+"CollectionConsumer",m);return mn.useCallback(()=>{let O=x.collectionRef.current;if(!O)return[];let y=Array.from(O.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((S,w)=>y.indexOf(S.ref.current)-y.indexOf(w.ref.current))},[x.collectionRef,x.itemMap])}return Yt(p,"useCollection"),[{Provider:o,Slot:u,ItemSlot:h},p,r]}Yt(Td,"createCollection");var SQ=new WeakMap,Gb=class ts extends Map{static{Yt(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],SQ.set(this,!0)}set(e,a){return SQ.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,a),this}insert(e,a,r){let n=this.has(a),i=this.#e.length,o=Wb(e),s=o>=0?o:i+o,l=s<0||s>=i?-1:s;if(l===this.size||n&&l===this.size-1||l===-1)return this.set(a,r),this;let u=this.size+(n?0:1);o<0&&s++;let c=[...this.#e],f,d=!1;for(let h=s;h<u;h++)if(s===h){let p=c[h];c[h]===a&&(p=c[h+1]),n&&this.delete(a),f=this.get(p),this.set(a,r)}else{!d&&c[h-1]===a&&(d=!0);let p=c[d?h:h-1],m=f;f=this.get(p),this.delete(p),this.set(p,m)}return this}with(e,a,r){let n=new ts(this);return n.insert(e,a,r),n}before(e){let a=this.#e.indexOf(e)-1;if(!(a<0))return this.entryAt(a)}setBefore(e,a,r){let n=this.#e.indexOf(e);return n===-1?this:this.insert(n,a,r)}after(e){let a=this.#e.indexOf(e);if(a=a===-1||a===this.size-1?-1:a+1,a!==-1)return this.entryAt(a)}setAfter(e,a,r){let n=this.#e.indexOf(e);return n===-1?this:this.insert(n+1,a,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let a=super.delete(e);return a&&this.#e.splice(this.#e.indexOf(e),1),a}deleteAt(e){let a=this.keyAt(e);return a!==void 0?this.delete(a):!1}at(e){let a=eg(this.#e,e);if(a!==void 0)return this.get(a)}entryAt(e){let a=eg(this.#e,e);if(a!==void 0)return[a,this.get(a)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return eg(this.#e,e)}from(e,a){let r=this.indexOf(e);if(r===-1)return;let n=r+a;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,a){let r=this.indexOf(e);if(r===-1)return;let n=r+a;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,a){let r=0;for(let n of this){if(Reflect.apply(e,a,[n,r,this]))return n;r++}}findIndex(e,a){let r=0;for(let n of this){if(Reflect.apply(e,a,[n,r,this]))return r;r++}return-1}filter(e,a){let r=[],n=0;for(let i of this)Reflect.apply(e,a,[i,n,this])&&r.push(i),n++;return new ts(r)}map(e,a){let r=[],n=0;for(let i of this)r.push([i[0],Reflect.apply(e,a,[i,n,this])]),n++;return new ts(r)}reduce(...e){let[a,r]=e,n=0,i=r??this.at(0);for(let o of this)n===0&&e.length===1?i=o:i=Reflect.apply(a,this,[i,o,n,this]),n++;return i}reduceRight(...e){let[a,r]=e,n=r??this.at(-1);for(let i=this.size-1;i>=0;i--){let o=this.at(i);i===this.size-1&&e.length===1?n=o:n=Reflect.apply(a,this,[n,o,i,this])}return n}toSorted(e){let a=[...this.entries()].sort(e);return new ts(a)}toReversed(){let e=new ts;for(let a=this.size-1;a>=0;a--){let r=this.keyAt(a),n=this.get(r);e.set(r,n)}return e}toSpliced(...e){let a=[...this.entries()];return a.splice(...e),new ts(a)}slice(e,a){let r=new ts,n=this.size-1;if(e===void 0)return r;e<0&&(e=e+this.size),a!==void 0&&a>0&&(n=a-1);for(let i=e;i<=n;i++){let o=this.keyAt(i),s=this.get(o);r.set(o,s)}return r}every(e,a){let r=0;for(let n of this){if(!Reflect.apply(e,a,[n,r,this]))return!1;r++}return!0}some(e,a){let r=0;for(let n of this){if(Reflect.apply(e,a,[n,r,this]))return!0;r++}return!1}};function eg(t,e){if("at"in Array.prototype)return Array.prototype.at.call(t,e);let a=wQ(t,e);return a===-1?void 0:t[a]}Yt(eg,"at");function wQ(t,e){let a=t.length,r=Wb(e),n=r>=0?r:a+r;return n<0||n>=a?-1:n}Yt(wQ,"toSafeIndex");function Wb(t){return t!==t||t===0?0:Math.trunc(t)}Yt(Wb,"toSafeInteger");function $4(t){let e=t+"CollectionProvider",[a,r]=ca(e),[n,i]=a(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Gb,setItemMap:Yt(()=>{},"setItemMap")}),o=Yt(({state:y,...b})=>y?(0,fl.jsx)(l,{...b,state:y}):(0,fl.jsx)(s,{...b}),"CollectionProvider");o.displayName=e;let s=Yt(y=>{let b=x();return(0,fl.jsx)(l,{...y,state:b})},"CollectionInit");s.displayName=e+"Init";let l=Yt(y=>{let{scope:b,children:v,state:S}=y,w=Ja.useRef(null),[k,T]=Ja.useState(null),Q=Qe(w,T),[$,A]=S;return Ja.useEffect(()=>{if(!k)return;let R=LQ(()=>{});return R.observe(k,{childList:!0,subtree:!0}),()=>{R.disconnect()}},[k]),(0,fl.jsx)(n,{scope:b,itemMap:$,setItemMap:A,collectionRef:Q,collectionRefObject:w,collectionElement:k,children:v})},"CollectionProviderImpl");l.displayName=e+"Impl";let u=t+"CollectionSlot",c=Ia(u),f=Ja.forwardRef((y,b)=>{let{scope:v,children:S}=y,w=i(u,v),k=Qe(b,w.collectionRef);return(0,fl.jsx)(c,{ref:k,children:S})});f.displayName=u;let d=t+"CollectionItemSlot",h="data-radix-collection-item",p=Ia(d),m=Ja.forwardRef((y,b)=>{let{scope:v,children:S,...w}=y,k=Ja.useRef(null),[T,Q]=Ja.useState(null),$=Qe(b,k,Q),A=i(d,v),{setItemMap:R}=A,D=Ja.useRef(w);CQ(D.current,w)||(D.current=w);let Y=D.current;return Ja.useEffect(()=>{let B=Y;return R(q=>T?q.has(T)?q.set(T,{...B,element:T}).toSorted(Yb):(q.set(T,{...B,element:T}),q.toSorted(Yb)):q),()=>{R(q=>!T||!q.has(T)?q:(q.delete(T),new Gb(q)))}},[T,Y,R]),(0,fl.jsx)(p,{[h]:"",ref:$,children:S})});m.displayName=d;function x(){return Ja.useState(new Gb)}Yt(x,"useInitCollection");function g(y){let{itemMap:b}=i(t+"CollectionConsumer",y);return b}return Yt(g,"useCollection"),[{Provider:o,Slot:f,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:x}]}Yt($4,"createCollection");function CQ(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;let a=Object.keys(t),r=Object.keys(e);if(a.length!==r.length)return!1;for(let n of a)if(!Object.prototype.hasOwnProperty.call(e,n)||t[n]!==e[n])return!1;return!0}Yt(CQ,"shallowEqual");function kQ(t,e){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}Yt(kQ,"isElementPreceding");function Yb(t,e){return!t[1].element||!e[1].element?0:kQ(t[1].element,e[1].element)?-1:1}Yt(Yb,"sortByDocumentPosition");function LQ(t){return new MutationObserver(a=>{for(let r of a)if(r.type==="childList"){t();return}})}Yt(LQ,"getChildListObserver");var B4=Object.defineProperty,bc=(t,e)=>B4(t,"name",{value:e,configurable:!0}),TQ=!!(typeof window<"u"&&window.document&&window.document.createElement);function xe(t,e,{checkForDefaultPrevented:a=!0}={}){return bc(function(n){if(t?.(n),a===!1||!n||!n.defaultPrevented)return e?.(n)},"handleEvent")}bc(xe,"composeEventHandlers");function _4(t){if(!TQ)throw new Error("Cannot access window outside of the DOM");return t?.ownerDocument?.defaultView??window}bc(_4,"getOwnerWindow");function Kb(t){if(!TQ)throw new Error("Cannot access document outside of the DOM");return t?.ownerDocument??document}bc(Kb,"getOwnerDocument");function PQ(t,e=!1){let{activeElement:a}=Kb(t);if(!a?.nodeName)return null;if(RQ(a)&&a.contentDocument)return PQ(a.contentDocument.body,e);if(e){let r=a.getAttribute("aria-activedescendant");if(r){let n=Kb(a).getElementById(r);if(n)return n}}return a}bc(PQ,"getActiveElement");function RQ(t){return t.tagName==="IFRAME"}bc(RQ,"isFrame");var Zr=L(F(),1);var tg=!1;var IQ=L(F(),1),Xe=globalThis?.document?IQ.useLayoutEffect:()=>{};var gn=L(F(),1);var vc=L(F(),1),z4=Object.defineProperty,N4=(t,e)=>z4(t,"name",{value:e,configurable:!0}),AQ=vc[" useEffectEvent ".trim().toString()],QQ=vc[" useInsertionEffect ".trim().toString()];function Jb(t){if(typeof AQ=="function")return AQ(t);let e=vc.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof QQ=="function"?QQ(()=>{e.current=t}):Xe(()=>{e.current=t}),vc.useMemo(()=>((...a)=>e.current?.(...a)),[])}N4(Jb,"useEffectEvent");var X4=Object.defineProperty,Pd=(t,e)=>X4(t,"name",{value:e,configurable:!0}),q4=Zr[" useInsertionEffect ".trim().toString()]||Xe;function Aa({prop:t,defaultProp:e,onChange:a=Pd(()=>{},"onChange"),caller:r}){let[n,i,o]=EQ({defaultProp:e,onChange:a}),s=t!==void 0,l=s?t:n;if(tg){let c=Zr.useRef(t!==void 0);Zr.useEffect(()=>{let f=c.current;f!==s&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,r])}let u=Zr.useCallback(c=>{if(s){let f=DQ(c)?c(t):c;f!==t&&o.current?.(f)}else i(c)},[s,t,i,o]);return[l,u]}Pd(Aa,"useControllableState");function EQ({defaultProp:t,onChange:e}){let[a,r]=Zr.useState(t),n=Zr.useRef(a),i=Zr.useRef(e);return q4(()=>{i.current=e},[e]),Zr.useEffect(()=>{n.current!==a&&(i.current?.(a),n.current=a)},[a,n]),[a,r,i]}Pd(EQ,"useUncontrolledState");function DQ(t){return typeof t=="function"}Pd(DQ,"isFunction");var MQ=Symbol("RADIX:SYNC_STATE");function Z4(t,e,a,r){let{prop:n,defaultProp:i,onChange:o,caller:s}=e,l=n!==void 0,u=Jb(o);if(tg){let x=gn.useRef(n!==void 0);gn.useEffect(()=>{let g=x.current;g!==l&&console.warn(`${s} is changing from ${g?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=l},[l,s])}let c=[{...a,state:i}];r&&c.push(r);let[f,d]=gn.useReducer((x,g)=>{if(g.type===MQ)return{...x,state:g.state};let O=t(x,g);return l&&!Object.is(O.state,x.state)&&u(O.state),O},...c),h=f.state,p=gn.useRef(h);gn.useEffect(()=>{p.current!==h&&(p.current=h,l||u(h))},[h,p,l]);let m=gn.useMemo(()=>n!==void 0?{...f,state:n}:f,[f,n]);return gn.useEffect(()=>{l&&!Object.is(n,f.state)&&d({type:MQ,state:n})},[n,f.state,l]),[m,d]}Pd(Z4,"useControllableStateReducer");var fa=L(F(),1);var $Q=L(F(),1),V4=Object.defineProperty,Zi=(t,e)=>V4(t,"name",{value:e,configurable:!0});function BQ(t,e){return $Q.useReducer((a,r)=>e[a][r]??a,t)}Zi(BQ,"useStateMachine");var as=Zi(t=>{let{present:e,children:a}=t,r=_Q(e),n=typeof a=="function"?a({present:r.isPresent}):fa.Children.only(a),i=zQ(r.ref,NQ(n));return typeof a=="function"||r.isPresent?fa.cloneElement(n,{ref:i}):null},"Presence");function _Q(t){let[e,a]=fa.useState(),r=fa.useRef(null),n=fa.useRef(t),i=fa.useRef("none"),o=fa.useRef(void 0),s=t?"mounted":"unmounted",[l,u]=BQ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return fa.useEffect(()=>{l==="mounted"?(i.current=o.current??Sc(r.current),o.current=void 0):i.current="none"},[l]),Xe(()=>{let c=r.current,f=n.current;if(f!==t){let h=i.current,p=Sc(c);t?(o.current=p,u("MOUNT")):p==="none"||c?.display==="none"?u("UNMOUNT"):u(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=t}},[t,u]),Xe(()=>{if(e){let c,f=e.ownerDocument.defaultView??window,d=Zi(p=>{let x=Sc(r.current).includes(CSS.escape(p.animationName));if(p.target===e&&x&&(u("ANIMATION_END"),!n.current)){let g=e.style.animationFillMode;e.style.animationFillMode="forwards",c=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=g)})}},"handleAnimationEnd"),h=Zi(p=>{p.target===e&&(i.current=Sc(r.current))},"handleAnimationStart");return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{f.clearTimeout(c),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:fa.useCallback(c=>{if(c){let f=getComputedStyle(c);r.current=f,o.current=Sc(f)}else r.current=null;a(c)},[])}}Zi(_Q,"usePresence");function ev(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Zi(ev,"setRef");function zQ(...t){let e=fa.useRef(t);return e.current=t,fa.useCallback(a=>{let r=e.current,n=!1,i=r.map(o=>{let s=ev(o,a);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<i.length;o++){let s=i[o];typeof s=="function"?s():ev(r[o],null)}}},[])}Zi(zQ,"useStableComposedRefs");function Sc(t){return t?.animationName||"none"}Zi(Sc,"getAnimationName");function NQ(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=e&&"isReactWarning"in e&&e.isReactWarning;return a?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=e&&"isReactWarning"in e&&e.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}Zi(NQ,"getElementRef");var tv=L(F(),1);var U4=Object.defineProperty,j4=(t,e)=>U4(t,"name",{value:e,configurable:!0}),F4=tv[" useId ".trim().toString()]||(()=>{}),H4=0;function Dt(t){let[e,a]=tv.useState(F4());return Xe(()=>{t||a(r=>r??String(H4++))},[t]),t||(e?`radix-${e}`:"")}j4(Dt,"useId");var ag=L(F(),1),W4=L(G(),1),G4=Object.defineProperty,Y4=(t,e)=>G4(t,"name",{value:e,configurable:!0}),K4=ag.createContext(void 0);function Vi(t){let e=ag.useContext(K4);return t||e||"ltr"}Y4(Vi,"useDirection");var xn={};cu(xn,{Close:()=>GV,Content:()=>Qv,Description:()=>FV,Dialog:()=>Rv,DialogClose:()=>GV,DialogContent:()=>Qv,DialogDescription:()=>FV,DialogOverlay:()=>Av,DialogPortal:()=>Iv,DialogTitle:()=>UV,DialogTrigger:()=>_V,Overlay:()=>Av,Portal:()=>Iv,Root:()=>Rv,Title:()=>UV,Trigger:()=>_V,WarningProvider:()=>YV,createDialogScope:()=>DV});var ct=L(F(),1);var We=L(F(),1);var wc=L(F(),1),J4=Object.defineProperty,eV=(t,e)=>J4(t,"name",{value:e,configurable:!0});function ya(t){let e=wc.useRef(t);return wc.useEffect(()=>{e.current=t}),wc.useMemo(()=>((...a)=>e.current?.(...a)),[])}eV(ya,"useCallbackRef");var qQ=L(G(),1),tV=Object.defineProperty,Wt=(t,e)=>tV(t,"name",{value:e,configurable:!0}),av="dismissableLayer.update",aV="dismissableLayer.pointerDownOutside",rV="dismissableLayer.focusOutside",XQ,ZQ=We.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),rg=We.forwardRef(Wt(function(e,a){let{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=e,f=We.useContext(ZQ),[d,h]=We.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=We.useState({}),x=Qe(a,h),g=Array.from(f.layers),[O]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),y=O?g.indexOf(O):-1,b=d?g.indexOf(d):-1,v=f.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,w=We.useRef(!1),k=VQ(A=>{o?.(A),l?.(A),A.defaultPrevented||u?.()},{ownerDocument:p,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:We.useCallback(A=>{if(!(A instanceof Node))return!1;let R=[...f.branches].some(D=>D.contains(A));return S&&!R},[f.branches,S])}),T=UQ(A=>{if(n&&w.current)return;let R=A.target;[...f.branches].some(Y=>Y.contains(R))||(s?.(A),l?.(A),A.defaultPrevented||u?.())},p),Q=d?b===g.length-1:!1,$=ya(A=>{A.key==="Escape"&&(i?.(A),!A.defaultPrevented&&u&&(A.preventDefault(),u()))});return We.useEffect(()=>{if(Q)return p.addEventListener("keydown",$,{capture:!0}),()=>p.removeEventListener("keydown",$,{capture:!0})},[p,Q,$]),We.useEffect(()=>{if(d)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(XQ=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),rv(),()=>{r&&(f.layersWithOutsidePointerEventsDisabled.delete(d),f.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=XQ))}},[d,p,r,f]),We.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),rv())},[d,f]),We.useEffect(()=>{let A=Wt(()=>m({}),"handleUpdate");return document.addEventListener(av,A),()=>document.removeEventListener(av,A)},[]),(0,qQ.jsx)(ue.div,{...c,ref:x,style:{pointerEvents:v?S?"auto":"none":void 0,...e.style},onFocusCapture:xe(e.onFocusCapture,T.onFocusCapture),onBlurCapture:xe(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:xe(e.onPointerDownCapture,k.onPointerDownCapture)})},"DismissableLayer"));function nv(){let t=We.useContext(ZQ),[e,a]=We.useState(null);return We.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),a}Wt(nv,"useDismissableLayerSurface");var nV=Wt(()=>!0,"IS_TRUE");function VQ(t,e){let{ownerDocument:a=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:n,dismissableSurfaces:i,shouldHandlePointerDownOutside:o=nV}=e,s=ya(t),l=We.useRef(!1),u=We.useRef(!1),c=We.useRef(new Map),f=We.useRef(()=>{});return We.useEffect(()=>{function d(){u.current=!1,n.current=!1,c.current.clear()}Wt(d,"resetOutsideInteraction");function h(){return Array.from(c.current.values()).some(Boolean)}Wt(h,"isOutsideInteractionIntercepted");function p(y){if(!u.current)return;let b=y.target;b instanceof Node&&[...i].some(S=>S.contains(b))||c.current.set(y.type,!0),y.type==="click"&&window.setTimeout(()=>{u.current&&f.current()},0)}Wt(p,"handleInteractionCapture");function m(y){u.current&&c.current.set(y.type,!1)}Wt(m,"handleInteractionBubble");let x=Wt(y=>{if(y.target&&!l.current){let v=function(){a.removeEventListener("click",f.current);let w=h();d(),w||iv(aV,s,S,{discrete:!0})};var b=v;if(Wt(v,"handleAndDispatchPointerDownOutsideEvent"),!o(y.target)){a.removeEventListener("click",f.current),d(),l.current=!1;return}let S={originalEvent:y};u.current=!0,n.current=r&&y.button===0,c.current.clear(),!r||y.button!==0?v():(a.removeEventListener("click",f.current),f.current=v,a.addEventListener("click",f.current,{once:!0}))}else a.removeEventListener("click",f.current),d();l.current=!1},"handlePointerDown"),g=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let y of g)a.addEventListener(y,p,!0),a.addEventListener(y,m);let O=window.setTimeout(()=>{a.addEventListener("pointerdown",x)},0);return()=>{window.clearTimeout(O),a.removeEventListener("pointerdown",x),a.removeEventListener("click",f.current);for(let y of g)a.removeEventListener(y,p,!0),a.removeEventListener(y,m)}},[a,s,r,n,i,o]),{onPointerDownCapture:Wt(()=>l.current=!0,"onPointerDownCapture")}}Wt(VQ,"usePointerDownOutside");function UQ(t,e=globalThis?.document){let a=ya(t),r=We.useRef(!1);return We.useEffect(()=>{let n=Wt(i=>{i.target&&!r.current&&iv(rV,a,{originalEvent:i},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",n),()=>e.removeEventListener("focusin",n)},[e,a]),{onFocusCapture:Wt(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Wt(()=>r.current=!1,"onBlurCapture")}}Wt(UQ,"useFocusOutside");function rv(){let t=new CustomEvent(av);document.dispatchEvent(t)}Wt(rv,"dispatchUpdate");function iv(t,e,a,{discrete:r}){let n=a.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:a});e&&n.addEventListener(t,e,{once:!0}),r?Fb(n,i):n.dispatchEvent(i)}Wt(iv,"handleAndDispatchCustomEvent");var Vr=L(F(),1);var HQ=L(G(),1),iV=Object.defineProperty,Qa=(t,e)=>iV(t,"name",{value:e,configurable:!0}),ov="focusScope.autoFocusOnMount",sv="focusScope.autoFocusOnUnmount",jQ={bubbles:!1,cancelable:!0},ng=Vr.forwardRef(Qa(function(e,a){let{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[l,u]=Vr.useState(null),c=ya(i),f=ya(o),d=Vr.useRef(null),h=Qe(a,u),p=Vr.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Vr.useEffect(()=>{if(n){let y=function(w){if(p.paused||!l)return;let k=w.target;l.contains(k)?d.current=k:Ui(d.current,{select:!0})},b=function(w){if(p.paused||!l)return;let k=w.relatedTarget;k!==null&&(l.contains(k)||Ui(d.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(let T of w)T.removedNodes.length>0&&Ui(l)};var x=y,g=b,O=v;Qa(y,"handleFocusIn"),Qa(b,"handleFocusOut"),Qa(v,"handleMutations"),document.addEventListener("focusin",y),document.addEventListener("focusout",b);let S=new MutationObserver(v);return l&&S.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),S.disconnect()}}},[n,l,p.paused]),Vr.useEffect(()=>{if(l){FQ.add(p);let x=document.activeElement;if(!l.contains(x)){let O=new CustomEvent(ov,jQ);l.addEventListener(ov,c),l.dispatchEvent(O),O.defaultPrevented||(GQ(e2(cv(l)),{select:!0}),document.activeElement===x&&Ui(l))}return()=>{l.removeEventListener(ov,c),setTimeout(()=>{let O=new CustomEvent(sv,jQ);l.addEventListener(sv,f),l.dispatchEvent(O),O.defaultPrevented||Ui(x??document.body,{select:!0}),l.removeEventListener(sv,f),FQ.remove(p)},0)}}},[l,c,f,p]);let m=Vr.useCallback(x=>{if(!r&&!n||p.paused)return;let g=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,O=document.activeElement;if(g&&O){let y=x.currentTarget,[b,v]=YQ(y);b&&v?!x.shiftKey&&O===v?(x.preventDefault(),r&&Ui(b,{select:!0})):x.shiftKey&&O===b&&(x.preventDefault(),r&&Ui(v,{select:!0})):O===y&&x.preventDefault()}},[r,n,p.paused]);return(0,HQ.jsx)(ue.div,{tabIndex:-1,...s,ref:h,onKeyDown:m})},"FocusScope"));function GQ(t,{select:e=!1}={}){let a=document.activeElement;for(let r of t)if(Ui(r,{select:e}),document.activeElement!==a)return}Qa(GQ,"focusFirst");function YQ(t){let e=cv(t),a=lv(e,t),r=lv(e.reverse(),t);return[a,r]}Qa(YQ,"getTabbableEdges");function cv(t){let e=[],a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Qa(r=>{let n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;a.nextNode();)e.push(a.currentNode);return e}Qa(cv,"getTabbableCandidates");function lv(t,e){let a=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(let r of t)if(!(a?!r.checkVisibility({checkVisibilityCSS:!0}):WQ(r,{upTo:e})))return r}Qa(lv,"findVisible");function WQ(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}Qa(WQ,"isHidden");function KQ(t){return t instanceof HTMLInputElement&&"select"in t}Qa(KQ,"isSelectableInput");function Ui(t,{select:e=!1}={}){if(t&&t.focus){let a=document.activeElement;t.focus({preventScroll:!0}),t!==a&&KQ(t)&&e&&t.select()}}Qa(Ui,"focus");var FQ=JQ();function JQ(){let t=[];return{add(e){let a=t[0];e!==a&&a?.pause(),t=uv(t,e),t.unshift(e)},remove(e){t=uv(t,e),t[0]?.resume()}}}Qa(JQ,"createFocusScopesStack");function uv(t,e){let a=[...t],r=a.indexOf(e);return r!==-1&&a.splice(r,1),a}Qa(uv,"arrayRemove");function e2(t){return t.filter(e=>e.tagName!=="A")}Qa(e2,"removeLinks");var ig=L(F(),1),t2=L(Es(),1);var a2=L(G(),1),oV=Object.defineProperty,sV=(t,e)=>oV(t,"name",{value:e,configurable:!0}),og=ig.forwardRef(sV(function(e,a){let{container:r,...n}=e,[i,o]=ig.useState(!1);Xe(()=>o(!0),[]);let s=r||i&&globalThis?.document?.body;return s?t2.createPortal((0,a2.jsx)(ue.div,{...n,ref:a}),s):null},"Portal"));var r2=L(F(),1),lV=Object.defineProperty,dv=(t,e)=>lV(t,"name",{value:e,configurable:!0}),sg=0,Cc=null;function uV(t){return kc(),t.children}dv(uV,"FocusGuards");function kc(){r2.useEffect(()=>{Cc||(Cc={start:fv(),end:fv()});let{start:t,end:e}=Cc;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),sg++,()=>{sg===1&&(Cc?.start.remove(),Cc?.end.remove(),Cc=null),sg=Math.max(0,sg-1)}},[])}dv(kc,"useFocusGuards");function fv(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}dv(fv,"createFocusGuard");var er=function(){return er=Object.assign||function(e){for(var a,r=1,n=arguments.length;r<n;r++){a=arguments[r];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e},er.apply(this,arguments)};function lg(t,e){var a={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(a[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(a[r[n]]=t[r[n]]);return a}function n2(t,e,a){if(a||arguments.length===2)for(var r=0,n=e.length,i;r<n;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var hg=L(F());var ba=L(F());var dl="right-scroll-bar-position",hl="width-before-scroll-bar",hv="with-scroll-bars-hidden",pv="--removed-body-scroll-bar-size";function ug(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}var i2=L(F());function o2(t,e){var a=(0,i2.useState)(function(){return{value:t,callback:e,facade:{get current(){return a.value},set current(r){var n=a.value;n!==r&&(a.value=r,a.callback(r,n))}}}})[0];return a.callback=e,a.facade}var cg=L(F());var cV=typeof window<"u"?cg.useLayoutEffect:cg.useEffect,s2=new WeakMap;function mv(t,e){var a=o2(e||null,function(r){return t.forEach(function(n){return ug(n,r)})});return cV(function(){var r=s2.get(a);if(r){var n=new Set(r),i=new Set(t),o=a.current;n.forEach(function(s){i.has(s)||ug(s,null)}),i.forEach(function(s){n.has(s)||ug(s,o)})}s2.set(a,t)},[t]),a}function fV(t){return t}function dV(t,e){e===void 0&&(e=fV);var a=[],r=!1,n={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:t},useMedium:function(i){var o=e(i,r);return a.push(o),function(){a=a.filter(function(s){return s!==o})}},assignSyncMedium:function(i){for(r=!0;a.length;){var o=a;a=[],o.forEach(i)}a={push:function(s){return i(s)},filter:function(){return a}}},assignMedium:function(i){r=!0;var o=[];if(a.length){var s=a;a=[],s.forEach(i),o=a}var l=function(){var c=o;o=[],c.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),a={push:function(c){o.push(c),u()},filter:function(c){return o=o.filter(c),a}}}};return n}function gv(t){t===void 0&&(t={});var e=dV(null);return e.options=er({async:!0,ssr:!1},t),e}var l2=L(F()),u2=function(t){var e=t.sideCar,a=lg(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return l2.createElement(r,er({},a))};u2.isSideCarExport=!0;function Ov(t,e){return t.useMedium(e),u2}var fg=gv();var xv=function(){},Rd=ba.forwardRef(function(t,e){var a=ba.useRef(null),r=ba.useState({onScrollCapture:xv,onWheelCapture:xv,onTouchMoveCapture:xv}),n=r[0],i=r[1],o=t.forwardProps,s=t.children,l=t.className,u=t.removeScrollBar,c=t.enabled,f=t.shards,d=t.sideCar,h=t.noRelative,p=t.noIsolation,m=t.inert,x=t.allowPinchZoom,g=t.as,O=g===void 0?"div":g,y=t.gapMode,b=lg(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),v=d,S=mv([a,e]),w=er(er({},b),n);return ba.createElement(ba.Fragment,null,c&&ba.createElement(v,{sideCar:fg,removeScrollBar:u,shards:f,noRelative:h,noIsolation:p,inert:m,setCallbacks:i,allowPinchZoom:!!x,lockRef:a,gapMode:y}),o?ba.cloneElement(ba.Children.only(s),er(er({},w),{ref:S})):ba.createElement(O,er({},w,{className:l,ref:S}),s))});Rd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rd.classNames={fullWidth:hl,zeroRight:dl};var dt=L(F());var Tc=L(F());var d2=L(F());var c2;var f2=function(){if(c2)return c2;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hV(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=f2();return e&&t.setAttribute("nonce",e),t}function pV(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function mV(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var yv=function(){var t=0,e=null;return{add:function(a){t==0&&(e=hV())&&(pV(e,a),mV(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var bv=function(){var t=yv();return function(e,a){d2.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&a])}};var Id=function(){var t=bv(),e=function(a){var r=a.styles,n=a.dynamic;return t(r,n),null};return e};var gV={left:0,top:0,right:0,gap:0},vv=function(t){return parseInt(t||"",10)||0},OV=function(t){var e=window.getComputedStyle(document.body),a=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],n=e[t==="padding"?"paddingRight":"marginRight"];return[vv(a),vv(r),vv(n)]},Sv=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return gV;var e=OV(t),a=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-a+e[2]-e[0])}};var xV=Id(),Lc="data-scroll-locked",yV=function(t,e,a,r){var n=t.left,i=t.top,o=t.right,s=t.gap;return a===void 0&&(a="margin"),`
9
+ `).replace(qX,"")}function NR(t,e){return e=qL(e),qL(t)===e}function je(t,e,a,r,n,i){switch(a){case"children":if(typeof r=="string")e==="body"||e==="textarea"&&r===""||Uu(t,r);else if(typeof r=="number"||typeof r=="bigint")e!=="body"&&Uu(t,""+r);else return;break;case"className":ep(t,"class",r);break;case"tabIndex":ep(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ep(t,a,r);break;case"style":BT(t,r,i);return;case"data":if(e!=="object"){ep(t,"data",r);break}case"src":case"href":if(r===""&&(e!=="a"||a!=="href")){t.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=xp(r),t.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(e!=="input"&&je(t,e,"name",n.name,n,null),je(t,e,"formEncType",n.formEncType,n,null),je(t,e,"formMethod",n.formMethod,n,null),je(t,e,"formTarget",n.formTarget,n,null)):(je(t,e,"encType",n.encType,n,null),je(t,e,"method",n.method,n,null),je(t,e,"target",n.target,n,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=xp(r),t.setAttribute(a,r);break;case"onClick":r!=null&&(t.onclick=Gn);return;case"onScroll":r!=null&&we("scroll",t);return;case"onScrollEnd":r!=null&&we("scrollend",t);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(I(61));if(a=r.__html,a!=null){if(n.children!=null)throw Error(I(60));i?.__html!==a&&(t.innerHTML=a)}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}a=xp(r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,r):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":r===!0?t.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,r):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(a,r):t.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(a):t.setAttribute(a,r);break;case"popover":we("beforetoggle",t),we("toggle",t),Op(t,"popover",r);break;case"xlinkActuate":ki(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ki(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ki(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ki(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ki(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ki(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ki(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ki(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ki(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Op(t,"is",r);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=u3.get(a)||a,Op(t,a,r);else return}Be=!0}function dy(t,e,a,r,n,i){switch(a){case"style":BT(t,r,i);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(I(61));if(a=r.__html,a!=null){if(n.children!=null)throw Error(I(60));i?.__html!==a&&(t.innerHTML=a)}}break;case"children":if(typeof r=="string")Uu(t,r);else if(typeof r=="number"||typeof r=="bigint")Uu(t,""+r);else return;break;case"onScroll":r!=null&&we("scroll",t);return;case"onScrollEnd":r!=null&&we("scrollend",t);return;case"onClick":r!=null&&(t.onclick=Gn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!AT.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(n=a.endsWith("Capture"),i=a.slice(2,n?a.length-7:void 0),e=t[Wa]||null,e=e!=null?e[a]:null,typeof e=="function"&&t.removeEventListener(i,e,n),typeof r=="function")){typeof e!="function"&&e!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(i,r,n);break e}Be=!0,a in t?t[a]=r:r===!0?t.setAttribute(a,""):Op(t,a,r)}return}Be=!0}function sa(t,e,a){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":we("error",t),we("load",t);var r=!1,n=!1,i;for(i in a)if(a.hasOwnProperty(i)){var o=a[i];if(o!=null)switch(i){case"src":r=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(I(137,e));default:je(t,e,i,o,a,null)}}n&&je(t,e,"srcSet",a.srcSet,a,null),r&&je(t,e,"src",a.src,a,null);return;case"input":we("invalid",t);var s=i=o=n=null,l=null,u=null;for(r in a)if(a.hasOwnProperty(r)){var c=a[r];if(c!=null)switch(r){case"name":n=c;break;case"type":o=c;break;case"checked":l=c;break;case"defaultChecked":u=c;break;case"value":i=c;break;case"defaultValue":s=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(I(137,e));break;default:je(t,e,r,c,a,null)}}ET(t,i,s,l,u,o,n,!1);return;case"select":we("invalid",t),r=o=i=null;for(n in a)if(a.hasOwnProperty(n)&&(s=a[n],s!=null))switch(n){case"value":i=s;break;case"defaultValue":o=s;break;case"multiple":r=s;default:je(t,e,n,s,a,null)}e=i,a=o,t.multiple=!!r,e!=null?Eu(t,!!r,e,!1):a!=null&&Eu(t,!!r,a,!0);return;case"textarea":we("invalid",t),i=n=r=null;for(o in a)if(a.hasOwnProperty(o)&&(s=a[o],s!=null))switch(o){case"value":r=s;break;case"defaultValue":n=s;break;case"children":i=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(I(91));break;default:je(t,e,o,s,a,null)}$T(t,r,n,i);return;case"option":for(l in a)a.hasOwnProperty(l)&&(r=a[l],r!=null)&&(l==="selected"?t.selected=r&&typeof r!="function"&&typeof r!="symbol":je(t,e,l,r,a,null));return;case"dialog":we("beforetoggle",t),we("toggle",t),we("cancel",t),we("close",t);break;case"iframe":case"object":we("load",t);break;case"video":case"audio":for(r=0;r<Kf.length;r++)we(Kf[r],t);break;case"image":we("error",t),we("load",t);break;case"details":we("toggle",t);break;case"embed":case"source":case"link":we("error",t),we("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in a)if(a.hasOwnProperty(u)&&(r=a[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(I(137,e));default:je(t,e,u,r,a,null)}return;default:if(Py(e)){for(c in a)a.hasOwnProperty(c)&&(r=a[c],r!==void 0&&dy(t,e,c,r,a,void 0));return}}for(s in a)a.hasOwnProperty(s)&&(r=a[s],r!=null&&je(t,e,s,r,a,null))}var ZX={};function VX(t,e,a,r){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,o=null,s=null,l=null,u=null,c=null;for(h in a){var f=a[h];if(a.hasOwnProperty(h)&&f!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":l=f;default:r.hasOwnProperty(h)||je(t,e,h,null,r,f)}}for(var d in r){var h=r[d];if(f=a[d],r.hasOwnProperty(d)&&(h!=null||f!=null))switch(d){case"type":h!==f&&(Be=!0),i=h;break;case"name":h!==f&&(Be=!0),n=h;break;case"checked":h!==f&&(Be=!0),u=h;break;case"defaultChecked":h!==f&&(Be=!0),c=h;break;case"value":h!==f&&(Be=!0),o=h;break;case"defaultValue":h!==f&&(Be=!0),s=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(I(137,e));break;default:h!==f&&je(t,e,d,h,r,f)}}Cx(t,o,s,l,u,c,i,n);return;case"select":h=o=s=d=null;for(i in a)if(l=a[i],a.hasOwnProperty(i)&&l!=null)switch(i){case"value":break;case"multiple":h=l;default:r.hasOwnProperty(i)||je(t,e,i,null,r,l)}for(n in r)if(i=r[n],l=a[n],r.hasOwnProperty(n)&&(i!=null||l!=null))switch(n){case"value":i!==l&&(Be=!0),d=i;break;case"defaultValue":i!==l&&(Be=!0),s=i;break;case"multiple":i!==l&&(Be=!0),o=i;default:i!==l&&je(t,e,n,i,r,l)}e=s,a=o,r=h,d!=null?Eu(t,!!a,d,!1):!!r!=!!a&&(e!=null?Eu(t,!!a,e,!0):Eu(t,!!a,a?[]:"",!1));return;case"textarea":h=d=null;for(s in a)if(n=a[s],a.hasOwnProperty(s)&&n!=null&&!r.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:je(t,e,s,null,r,n)}for(o in r)if(n=r[o],i=a[o],r.hasOwnProperty(o)&&(n!=null||i!=null))switch(o){case"value":n!==i&&(Be=!0),d=n;break;case"defaultValue":n!==i&&(Be=!0),h=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(I(91));break;default:n!==i&&je(t,e,o,n,r,i)}DT(t,d,h);return;case"option":for(var p in a)d=a[p],a.hasOwnProperty(p)&&d!=null&&!r.hasOwnProperty(p)&&(p==="selected"?t.selected=!1:je(t,e,p,null,r,d));for(l in r)d=r[l],h=a[l],r.hasOwnProperty(l)&&d!==h&&(d!=null||h!=null)&&(l==="selected"?(d!==h&&(Be=!0),t.selected=d&&typeof d!="function"&&typeof d!="symbol"):je(t,e,l,d,r,h));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var m in a)d=a[m],a.hasOwnProperty(m)&&d!=null&&!r.hasOwnProperty(m)&&je(t,e,m,null,r,d);for(u in r)if(d=r[u],h=a[u],r.hasOwnProperty(u)&&d!==h&&(d!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(I(137,e));break;default:je(t,e,u,d,r,h)}return;default:if(Py(e)){for(var x in a)d=a[x],a.hasOwnProperty(x)&&d!==void 0&&!r.hasOwnProperty(x)&&dy(t,e,x,void 0,r,d);for(c in r)d=r[c],h=a[c],!r.hasOwnProperty(c)||d===h||d===void 0&&h===void 0||dy(t,e,c,d,r,h);return}}for(var g in a)d=a[g],a.hasOwnProperty(g)&&d!=null&&!r.hasOwnProperty(g)&&je(t,e,g,null,r,d);for(f in r)d=r[f],h=a[f],!r.hasOwnProperty(f)||d===h||d==null&&h==null||je(t,e,f,d,r,h)}function ZL(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function UX(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var n=a[r],i=n.transferSize,o=n.initiatorType,s=n.duration;if(i&&s&&ZL(o)){for(o=0,s=n.responseEnd,r+=1;r<a.length;r++){var l=a[r],u=l.startTime;if(u>s)break;var c=l.transferSize,f=l.initiatorType;c&&ZL(f)&&(l=l.responseEnd,o+=c*(l<s?1:(s-u)/(l-u)))}if(--r,e+=8*(i+o)/(n.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var hy=null,py=null;function ed(t){return t.nodeType===9?t:t.ownerDocument}function VL(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function XR(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function qR(t,e,a,r){return a=ed(a).createElement(t),a[ra]=r,a[Wa]=e,sa(a,t,e),Ht(a),a}function my(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var ux=null;function jX(){var t=window.event;return t&&t.type==="popstate"?t===ux?!1:(ux=t,!0):(ux=null,!1)}var pb=typeof setTimeout=="function"?setTimeout:void 0,FX=typeof clearTimeout=="function"?clearTimeout:void 0,UL=typeof Promise=="function"?Promise:void 0,jL=typeof requestAnimationFrame=="function"?requestAnimationFrame:pb,HX=typeof queueMicrotask=="function"?queueMicrotask:typeof UL<"u"?function(t){return UL.resolve(null).then(t).catch(GX)}:pb;function GX(t){setTimeout(function(){throw t})}function Vo(t){return t==="head"}function FL(t,e){var a=e,r=0;do{var n=a.nextSibling;if(t.removeChild(a),n&&n.nodeType===8)if(a=n.data,a==="/$"||a==="/&"){if(r===0){t.removeChild(n),tc(e);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")fx(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,fx(a);for(var i=a.firstChild;i;){var o=i.nextSibling,s=i.nodeName;i[ud]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=o}}else a==="body"&&fx(t.ownerDocument.body);a=n}while(a);tc(e)}function HL(t,e){var a=t;t=0;do{var r=a.nextSibling;if(a.nodeType===1?e?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(e?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=r}while(a)}function ZR(t,e,a){if(e=CSS.escape(e)!==e?"r-"+btoa(e).replace(/=/g,""):e,t.style.viewTransitionName=e,a!=null&&(t.style.viewTransitionClass=a),a=getComputedStyle(t),a.display==="inline"){if(e=t.getClientRects(),e.length===1)var r=1;else for(var n=r=0;n<e.length;n++){var i=e[n];0<i.width&&0<i.height&&r++}r===1&&(t=t.style,t.display=e.length===1?"inline-block":"block",t.marginTop="-"+a.paddingTop,t.marginBottom="-"+a.paddingBottom)}}function VR(t,e){t=t.style,e=e.style;var a=e!=null?e.hasOwnProperty("viewTransitionName")?e.viewTransitionName:e.hasOwnProperty("view-transition-name")?e["view-transition-name"]:null:null;t.viewTransitionName=a==null||typeof a=="boolean"?"":(""+a).trim(),a=e!=null?e.hasOwnProperty("viewTransitionClass")?e.viewTransitionClass:e.hasOwnProperty("view-transition-class")?e["view-transition-class"]:null:null,t.viewTransitionClass=a==null||typeof a=="boolean"?"":(""+a).trim(),t.display==="inline-block"&&(e==null?t.display=t.margin="":(a=e.display,t.display=a==null||typeof a=="boolean"?"":a,a=e.margin,a!=null?t.margin=a:(a=e.hasOwnProperty("marginTop")?e.marginTop:e["margin-top"],t.marginTop=a==null||typeof a=="boolean"?"":a,e=e.hasOwnProperty("marginBottom")?e.marginBottom:e["margin-bottom"],t.marginBottom=e==null||typeof e=="boolean"?"":e)))}function UR(t,e,a){return a=a.ownerDocument.defaultView,{rect:t,abs:e.position==="absolute"||e.position==="fixed",clip:e.clipPath!=="none"||e.overflow!=="visible"||e.filter!=="none"||e.mask!=="none"||e.mask!=="none"||e.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=a.innerHeight&&t.left<=a.innerWidth}}function gy(t){var e=t.getBoundingClientRect(),a=getComputedStyle(t);return UR(e,a,t)}function YX(t){var e=t.getBoundingClientRect();e=new DOMRect(e.x+2e4,e.y+2e4,e.width,e.height);var a=getComputedStyle(t);return UR(e,a,t)}function WX(t){return t.documentElement.clientHeight}function KX(t){this.addEventListener("load",t),this.addEventListener("error",t)}function JX(t,e,a,r,n,i,o,s,l){var u=e.nodeType===9?e:e.ownerDocument;try{var c=u.startViewTransition({update:function(){var d=u.defaultView,h=d.navigation&&d.navigation.transition,p=u.fonts.status;r();var m=[];if(p==="loaded"&&(WX(u),u.fonts.status==="loading"&&m.push(u.fonts.ready)),p=m.length,t!==null)for(var x=t.suspenseyImages,g=0,O=0;O<x.length;O++){var y=x[O];if(!y.complete){var b=y.getBoundingClientRect();if(0<b.bottom&&0<b.right&&b.top<d.innerHeight&&b.left<d.innerWidth){if(g+=rI(y),g>Mp){m.length=p;break}y=new Promise(KX.bind(y)),m.push(y)}}}if(0<m.length)return d=Promise.race([Promise.all(m),new Promise(function(v){return setTimeout(v,500)})]).then(n,n),(h?Promise.allSettled([h.finished,d]):d).then(i,i);if(n(),h)return h.finished.then(i,i);i()},types:a});u.__reactViewTransition=c;var f=[];return c.ready.then(function(){for(var d=u.documentElement.getAnimations({subtree:!0}),h=0;h<d.length;h++){var p=d[h],m=p.effect,x=m.pseudoElement;if(x!=null&&x.startsWith("::view-transition")){f.push(p),p=m.getKeyframes();for(var g=x=void 0,O=!0,y=0;y<p.length;y++){var b=p[y],v=b.width;if(x===void 0)x=v;else if(x!==v){O=!1;break}if(v=b.height,g===void 0)g=v;else if(g!==v){O=!1;break}delete b.width,delete b.height,b.transform==="none"&&delete b.transform}O&&x!==void 0&&g!==void 0&&(m.setKeyframes(p),O=getComputedStyle(m.target,m.pseudoElement),O.width!==x||O.height!==g)&&(O=p[0],O.width=x,O.height=g,O=p[p.length-1],O.width=x,O.height=g,m.setKeyframes(p))}}o()},function(d){u.__reactViewTransition===c&&(u.__reactViewTransition=null);try{typeof d=="object"&&d!==null&&d.name==="InvalidStateError"&&(d.message==="View transition was skipped because document visibility state is hidden."||d.message==="Skipping view transition because document visibility state has become hidden."||d.message==="Skipping view transition because viewport size changed."||d.message==="Transition was aborted because of invalid state")&&(d=null),d!==null&&l(d)}finally{r(),n(),o()}}),c.finished.finally(function(){for(var d=0;d<f.length;d++)f[d].cancel();u.__reactViewTransition===c&&(u.__reactViewTransition=null),s()}),c}catch{return r(),n(),o(),null}}function Xs(t,e){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+e+")"}Xs.prototype.animate=function(t,e){return e=typeof e=="number"?{duration:e}:tt({},e),e.pseudoElement=this._selector,this._scope.animate(t,e)};Xs.prototype.getAnimations=function(){for(var t=this._scope,e=this._selector,a=t.getAnimations({subtree:!0}),r=[],n=0;n<a.length;n++){var i=a[n].effect;i!==null&&i.target===t&&i.pseudoElement===e&&r.push(a[n])}return r};Xs.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function jR(t){return{name:t,group:new Xs("group",t),imagePair:new Xs("image-pair",t),old:new Xs("old",t),new:new Xs("new",t)}}function xr(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}xr.prototype.addEventListener=function(t,e,a){var r=null,n=null;if(!(a!=null&&typeof a!="boolean"&&(r=a.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(FR(i,t,e,a)===-1){var o=this,s=e;a!=null&&typeof a!="boolean"&&a.once===!0&&(s=function(l){o.removeEventListener(t,e,a),typeof e=="function"?e.call(this,l):e.handleEvent(l)}),r!==null&&(n=o.removeEventListener.bind(o,t,e,a),r.addEventListener("abort",n,{once:!0}),n=r.removeEventListener.bind(r,"abort",n)),r=Wu(a),i.push({type:t,listener:e,optionsOrUseCapture:a,attachedListener:s,cleanup:n}),Ya(this._fragmentFiber.child,!1,eq,t,s,r)}this._eventListeners=i}};function eq(t,e,a,r){return Nt(t).addEventListener(e,a,r),!1}xr.prototype.removeEventListener=function(t,e,a){var r=this._eventListeners;if(r!==null&&(e=FR(r,t,e,a),e!==-1)){var n=r[e];a=n.attachedListener;var i=n.cleanup;n=Wu(n.optionsOrUseCapture),Ya(this._fragmentFiber.child,!1,tq,t,a,n),r.splice(e,1),i!==null&&i()}};function tq(t,e,a,r){return Nt(t).removeEventListener(e,a,r),!1}function Wu(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function GL(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function FR(t,e,a,r){if(t.length===0)return-1;r=GL(r);for(var n=0;n<t.length;n++){var i=t[n];if(i.type===e&&i.listener===a&&GL(i.optionsOrUseCapture)===r)return n}return-1}xr.prototype.dispatchEvent=function(t){var e=tl(this._fragmentFiber);if(e===null)return!0;e=Nt(e);var a=this._eventListeners;if(a!==null&&0<a.length||!t.bubbles){var r=e.nodeType===9?e.createComment(""):document.createTextNode("");if(a)for(var n=0;n<a.length;n++){var i=a[n];r.addEventListener(i.type,i.attachedListener,Wu(i.optionsOrUseCapture))}if(e.appendChild(r),t=r.dispatchEvent(t),a)for(n=0;n<a.length;n++)i=a[n],r.removeEventListener(i.type,i.attachedListener,Wu(i.optionsOrUseCapture));return e.removeChild(r),t}return e.dispatchEvent(t)};xr.prototype.focus=function(t){Ya(this._fragmentFiber.child,!0,HR,t,void 0,void 0)};function HR(t,e){return t.tag===6?!1:(t=Nt(t),hq(t,e))}xr.prototype.focusLast=function(t){var e=[];Ya(this._fragmentFiber.child,!0,mb,e,void 0,void 0);for(var a=e.length-1;0<=a&&!HR(e[a],t);a--);};function mb(t,e){return e.push(t),!1}xr.prototype.blur=function(){var t=tl(this._fragmentFiber);t!==null&&(t=Nt(t),t=ed(t).activeElement,t!==null&&Ya(this._fragmentFiber.child,!1,aq,t,void 0,void 0))};function aq(t,e){return t.tag===6?!1:(t=Nt(t),t===e||t.contains(e)?(e.blur(),!0):!1)}xr.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),Ya(this._fragmentFiber.child,!1,rq,t,void 0,void 0)};function rq(t,e){return t.tag===6||(t=Nt(t),e.observe(t)),!1}xr.prototype.unobserveUsing=function(t){var e=this._observers;if(e!==null&&e.has(t)){e.delete(t),Ya(this._fragmentFiber.child,!1,nq,t,void 0,void 0);for(var a=e=0;a<un.length;a++){var r=un[a];r.fragmentInstance===this&&r.observer===t?t.unobserve(r.instance):un[e++]=r}un.length=e}};function nq(t,e){return t.tag===6||(t=Nt(t),e.unobserve(t)),!1}var un=[],cx=!1;function iq(t,e,a){un.push({fragmentInstance:t,observer:e,instance:a}),cx||(cx=!0,pq(function(){cx=!1;var r=un;un=[];for(var n=0;n<r.length;n++){var i=r[n];i.observer.unobserve(i.instance)}}))}xr.prototype.getClientRects=function(){var t=[];return Ya(this._fragmentFiber.child,!1,oq,t,void 0,void 0),t};function oq(t,e){if(t.tag===6){t=t.stateNode;var a=t.ownerDocument.createRange();a.selectNodeContents(t),e.push.apply(e,a.getClientRects())}else t=Nt(t),e.push.apply(e,t.getClientRects());return!1}xr.prototype.getRootNode=function(t){var e=tl(this._fragmentFiber);return e===null?this:Nt(e).getRootNode(t)};xr.prototype.compareDocumentPosition=function(t){var e=tl(this._fragmentFiber);if(e===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];Ya(this._fragmentFiber.child,!1,mb,a,void 0,void 0);var r=Nt(e);if(a.length===0){if(a=r,Pk(this._fragmentFiber)){e:{for(e=this._fragmentFiber.return;e!==null;){if(e.tag===4){e=e.stateNode.containerInfo;break e}if(e.tag===3||e.tag===5||e.tag===27)break;e=e.return}e=null}e!=null&&(a=e)}e=this._fragmentFiber;var n=r=a.compareDocumentPosition(t);return a===t?n=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=gT(e)[1],a===null?n=Node.DOCUMENT_POSITION_PRECEDING:(t=Nt(a).compareDocumentPosition(t),n=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),n|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}e=Nt(a[0]),n=Nt(a[a.length-1]);var i=Pk(this._fragmentFiber)?e.parentElement:r;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=e.compareDocumentPosition(t),s=n.compareDocumentPosition(t),l=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&i&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,e=r&&e===t||i&&n===t||l||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&e===t||!i&&n===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,e&Node.DOCUMENT_POSITION_DISCONNECTED||e&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||sq(e,this._fragmentFiber,a[0],a[a.length-1],t)?e:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function sq(t,e,a,r,n){var i=Ns(n);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!i)e:{for(;i!==null;){if(i.tag===7&&(i===e||i.alternate===e)){a=!0;break e}i=i.return}a=!1}return a}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=n.ownerDocument,n===i||n===i.documentElement||n===i.body;e:{for(i=e,e=tl(e);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==e&&i.alternate!==e)){i=!0;break e}i=i.return}i=!1}return i}return t&Node.DOCUMENT_POSITION_PRECEDING?((e=!!i)&&!(e=i===a)&&(e=hx(a,i,Rk),e===null?e=!1:(Ya(e,!0,BN,i,a),i=vu,vu=null,e=i!==null)),e):t&Node.DOCUMENT_POSITION_FOLLOWING?((e=!!i)&&!(e=i===r)&&(e=hx(r,i,Rk),e===null?e=!1:(Ya(e,!0,_N,i,r),i=vu,dx=vu=null,e=i!==null)),e):!1}function YL(t,e){var a=t.ownerDocument.createRange();a.selectNodeContents(t),t=a.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,e?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}xr.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(I(566));var e=[];Ya(this._fragmentFiber.child,!1,mb,e,void 0,void 0);var a=t!==!1;if(e.length===0){var r=gT(this._fragmentFiber);if(r=a?r[1]||r[0]||tl(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){t=Nt(r),YL(t,a);return}if(r=Nt(r),r.nodeType!==9){if(r.nodeType===11){a="host"in r?r.host:null,a!==null&&a.scrollIntoView(t);return}r.scrollIntoView(t)}}for(r=a?e.length-1:0;r!==(a?-1:e.length);){var n=e[r];n.tag===6?(n=Nt(n),YL(n,a)):Nt(n).scrollIntoView(t),r+=a?-1:1}};function lq(t,e){return t=Nt(t),GR(t,e),!1}function GR(t,e){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(e)}function YR(t,e){var a=e._eventListeners;if(a!==null)for(var r=0;r<a.length;r++){var n=a[r];t.addEventListener(n.type,n.attachedListener,Wu(n.optionsOrUseCapture))}t.nodeType!==3&&(a=e._observers,a!==null&&a.forEach(function(i){for(var o=0,s=0;s<un.length;s++){var l=un[s];(l.fragmentInstance!==e||l.observer!==i||l.instance!==t)&&(un[o++]=l)}un.length=o,i.observe(t)}),GR(t,e))}function uq(t,e){var a=e._eventListeners;if(a!==null)for(var r=0;r<a.length;r++){var n=a[r];t.removeEventListener(n.type,n.attachedListener,Wu(n.optionsOrUseCapture))}t.nodeType!==3&&(a=e._observers,a!==null&&a.forEach(function(i){typeof i.rootMargin=="string"?iq(e,i,t):i.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(e))}function Oy(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var a=e;switch(e=e.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Oy(a),dm(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function cq(t,e,a,r){for(;t.nodeType===1;){var n=a;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[ud])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(i=t.getAttribute("rel"),i==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(i!==n.rel||t.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||t.getAttribute("title")!==(n.title==null?null:n.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(i=t.getAttribute("src"),(i!==(n.src==null?null:n.src)||t.getAttribute("type")!==(n.type==null?null:n.type)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&t.getAttribute("name")===i)return t}else return t;if(t=Br(t.nextSibling),t===null)break}return null}function fq(t,e,a){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Br(t.nextSibling),t===null))return null;return t}function WR(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Br(t.nextSibling),t===null))return null;return t}function xy(t){return t.data==="$?"||t.data==="$~"}function gb(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function dq(t,e){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||a.readyState!=="loading")e();else{var r=function(){e(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function Br(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var yy=null;function WL(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(e===0)return Br(t.nextSibling);e--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||e++}t=t.nextSibling}return null}function KL(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(e===0)return t;e--}else a!=="/$"&&a!=="/&"||e++}t=t.previousSibling}return null}function hq(t,e){function a(){r=!0}if(t.ownerDocument.activeElement===t)return!0;var r=!1;try{t.ownerDocument.addEventListener("focus",a,!0),(t.focus||HTMLElement.prototype.focus).call(t,e)}finally{t.ownerDocument.removeEventListener("focus",a,!0)}return r}function pq(t){jL(function(){jL(function(e){return t(e)})})}function KR(t,e,a){switch(e=ed(a),t){case"html":if(t=e.documentElement,!t)throw Error(I(452));return t;case"head":if(t=e.head,!t)throw Error(I(453));return t;case"body":if(t=e.body,!t)throw Error(I(454));return t;default:throw Error(I(451))}}function JR(t,e,a){for(var r in a){var n=a[r];a.hasOwnProperty(r)&&n!=null&&je(t,e,r,null,ZX,n)}a.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Gn&&(t.onclick=null),dm(t)}function fx(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);dm(t)}var _r=new Map,JL=new Set;function td(t){if(typeof t.getRootNode=="function"){var e=t.getRootNode();if(e.nodeType===9||e.nodeType===11)return e}return t.nodeType===9?t:t.ownerDocument}var zi=Ne.d;Ne.d={f:mq,r:gq,D:Oq,C:xq,L:yq,m:bq,X:Sq,S:vq,M:wq};function mq(){var t=zi.f(),e=Lm();return t||e}function gq(t){var e=rc(t);e!==null&&e.tag===5&&e.type==="form"?BP(e):zi.r(t)}var sc=typeof document>"u"?null:document;function eI(t,e,a){var r=sc;if(r&&typeof e=="string"&&e){var n=Er(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),JL.has(n)||(JL.add(n),t={rel:t,crossOrigin:a,href:e},r.querySelector(n)===null&&(e=r.createElement("link"),sa(e,"link",t),Ht(e),r.head.appendChild(e)))}}function Oq(t){zi.D(t),eI("dns-prefetch",t,null)}function xq(t,e){zi.C(t,e),eI("preconnect",t,e)}function yq(t,e,a){zi.L(t,e,a);var r=sc;if(r&&t&&e){var n='link[rel="preload"][as="'+Er(e)+'"]';e==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+Er(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+Er(a.imageSizes)+'"]')):n+='[href="'+Er(t)+'"]';var i=n;switch(e){case"style":i=Ku(t);break;case"script":i=lc(t)}if(!(_r.has(i)||(t=tt({rel:"preload",href:e==="image"&&a&&a.imageSrcSet?void 0:t,as:e},a),_r.set(i,t),r.querySelector(n)!==null||e==="style"&&r.querySelector(md(i))||e==="script"&&r.querySelector(gd(i))))){var o=r.createElement("link");sa(o,"link",t),e==="style"&&(o[Np]=!0,o.onload=o.onerror=function(){RT(o)}),Ht(o),r.head.appendChild(o)}}}function bq(t,e){zi.m(t,e);var a=sc;if(a&&t){var r=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+Er(r)+'"][href="'+Er(t)+'"]',i=n;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=lc(t)}if(!_r.has(i)&&(t=tt({rel:"modulepreload",href:t},e),_r.set(i,t),a.querySelector(n)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(gd(i)))return}r=a.createElement("link"),sa(r,"link",t),Ht(r),a.head.appendChild(r)}}}function vq(t,e,a){zi.S(t,e,a);var r=sc;if(r&&t){var n=Mu(r).hoistableStyles,i=Ku(t);e=e||"default";var o=n.get(i);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(md(i)))s.loading=5;else{t=tt({rel:"stylesheet",href:t,"data-precedence":e},a),(a=_r.get(i))&&Ob(t,a);var l=o=r.createElement("link");Ht(l),sa(l,"link",t),l._p=new Promise(function(u,c){l.onload=u,l.onerror=c}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Ap(o,e,r)}o={type:"stylesheet",instance:o,count:1,state:s},n.set(i,o)}}}function Sq(t,e){zi.X(t,e);var a=sc;if(a&&t){var r=Mu(a).hoistableScripts,n=lc(t),i=r.get(n);i||(i=a.querySelector(gd(n)),i||(t=tt({src:t,async:!0},e),(e=_r.get(n))&&xb(t,e),i=a.createElement("script"),Ht(i),sa(i,"link",t),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(n,i))}}function wq(t,e){zi.M(t,e);var a=sc;if(a&&t){var r=Mu(a).hoistableScripts,n=lc(t),i=r.get(n);i||(i=a.querySelector(gd(n)),i||(t=tt({src:t,async:!0,type:"module"},e),(e=_r.get(n))&&xb(t,e),i=a.createElement("script"),Ht(i),sa(i,"link",t),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(n,i))}}function eT(t,e,a,r){var n=(n=Po.current)?td(n):null;if(!n)throw Error(I(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=Ku(a.href),e=Mu(n).hoistableStyles,r=e.get(a),r||(r={type:"style",instance:null,count:0,state:null},e.set(a,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Ku(a.href);var i=Mu(n).hoistableStyles,o=i.get(t);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,o),(i=n.querySelector(md(t)))?i._p||(o.instance=i,o.state.loading=5):(i=_r.get(t),i||(i={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},_r.set(t,i)),Cq(n,t,i,o.state))),e&&r===null)throw Error(I(528,""));return o}if(e&&r!==null)throw Error(I(529,""));return null;case"script":return e=a.async,a=a.src,typeof a=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(a=lc(a),e=Mu(n).hoistableScripts,r=e.get(a),r||(r={type:"script",instance:null,count:0,state:null},e.set(a,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(I(444,t))}}function Ku(t){return'href="'+Er(t)+'"'}function md(t){return'link[rel="stylesheet"]['+t+"]"}function tI(t){return tt({},t,{"data-precedence":t.precedence,precedence:null})}function Cq(t,e,a,r){if(e=t.querySelector('link[rel="preload"][as="style"]['+e+"]")){if(e[Np]!==!0){r.loading=1;return}}else e=t.createElement("link"),e[Np]=!0,e.onload=e.onerror=RT.bind(null,e),sa(e,"link",a),Ht(e),t.head.appendChild(e);r.preload=e,e.addEventListener("load",function(){return r.loading|=1}),e.addEventListener("error",function(){return r.loading|=2})}function lc(t){return'[src="'+Er(t)+'"]'}function gd(t){return"script[async]"+t}function tT(t,e,a){if(e.count++,e.instance===null)switch(e.type){case"style":var r=t.querySelector('style[data-href~="'+Er(a.href)+'"]');if(r)return e.instance=r,Ht(r),r;var n=tt({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),Ht(r),sa(r,"style",n),Ap(r,a.precedence,t),e.instance=r;case"stylesheet":n=Ku(a.href);var i=t.querySelector(md(n));if(i)return e.state.loading|=4,e.instance=i,Ht(i),i;r=tI(a),(n=_r.get(n))&&Ob(r,n),i=(t.ownerDocument||t).createElement("link"),Ht(i);var o=i;return o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),sa(i,"link",r),e.state.loading|=4,Ap(i,a.precedence,t),e.instance=i;case"script":return i=lc(a.src),(n=t.querySelector(gd(i)))?(e.instance=n,Ht(n),n):(r=a,(n=_r.get(i))&&(r=tt({},a),xb(r,n)),t=t.ownerDocument||t,n=t.createElement("script"),Ht(n),sa(n,"link",r),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(I(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(r=e.instance,e.state.loading|=4,Ap(r,a.precedence,t));return e.instance}function Ap(t,e,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=r.length?r[r.length-1]:null,i=n,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===e)i=s;else if(i!==n)break}i?i.parentNode.insertBefore(t,i.nextSibling):(e=a.nodeType===9?a.head:a,e.insertBefore(t,e.firstChild))}function Ob(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function xb(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Qp=null;function aT(t,e,a){if(Qp===null){var r=new Map,n=Qp=new Map;n.set(a,r)}else n=Qp,r=n.get(a),r||(r=new Map,n.set(a,r));if(r.has(t))return r;for(r.set(t,null),a=a.getElementsByTagName(t),n=0;n<a.length;n++){var i=a[n];if(!(i[ud]||i[ra]||t==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(e)||"";o=t+o;var s=r.get(o);s?s.push(i):r.set(o,[i])}}return r}function by(t,e,a){t=t.ownerDocument||t,t.head.insertBefore(a,e==="title"?t.querySelector("head > title"):null)}function kq(t,e,a){if(a===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function rT(t,e){return t==="img"&&e.src!=null&&e.src!==""&&e.onLoad==null&&e.loading!=="lazy"}function aI(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function rI(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function nT(t,e){typeof e.decode=="function"&&(t.imgCount++,e.complete||(t.imgBytes+=rI(e),t.suspenseyImages.push(e)),t=Pq.bind(t),e.decode().then(t,t))}function Lq(t,e,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=Ku(r.href),i=e.querySelector(md(n));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=ad.bind(t),e.then(t,t)),a.state.loading|=4,a.instance=i,Ht(i);return}i=e.ownerDocument||e,r=tI(r),(n=_r.get(n))&&Ob(r,n),i=i.createElement("link"),Ht(i);var o=i;o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),sa(i,"link",r),a.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,e),(e=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=ad.bind(t),e.addEventListener("load",a),e.addEventListener("error",a))}}var Mp=0;function Tq(t,e){return t.stylesheets&&t.count===0&&Ep(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var r=setTimeout(function(){if(t.stylesheets&&Ep(t,t.stylesheets),t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}},6e4+e);0<t.imgBytes&&Mp===0&&(Mp=62500*UX());var n=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Ep(t,t.stylesheets),t.unsuspend)){var i=t.unsuspend;t.unsuspend=null,i()}},(t.imgBytes>Mp?50:800)+e);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(n)}}:null}function nI(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Ep(t,t.stylesheets);else if(t.unsuspend){var e=t.unsuspend;t.unsuspend=null,e()}}}function ad(){this.count--,nI(this)}function Pq(){this.imgCount--,nI(this)}var um=null;function Ep(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,um=new Map,e.forEach(Rq,t),um=null,ad.call(t))}function Rq(t,e){if(!(e.state.loading&4)){var a=um.get(t);if(a)var r=a.get(null);else{a=new Map,um.set(t,a);for(var n=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var o=n[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(a.set(o.dataset.precedence,o),r=o)}r&&a.set(null,r)}n=e.instance,o=n.getAttribute("data-precedence"),i=a.get(o)||r,i===r&&a.set(null,n),a.set(o,n),this.count++,r=ad.bind(this),n.addEventListener("load",r),n.addEventListener("error",r),i?i.parentNode.insertBefore(n,i.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(n,t.firstChild)),e.state.loading|=4}}var Ju={$$typeof:Hn,Provider:null,Consumer:null,_currentValue:qs,_currentValue2:qs,_threadCount:0};function Iq(t,e,a,r,n,i,o,s,l){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=z0(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=z0(0),this.hiddenUpdates=z0(null),this.identifierPrefix=r,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.transitionTypes=null,this.incompleteTransitions=new Map}function iI(t,e,a,r,n,i,o,s,l,u,c,f){return t=new Iq(t,e,a,o,l,u,c,f,s),e=1,i===!0&&(e|=24),i=Ha(3,null,null,e),t.current=i,i.stateNode=t,e=_y(),e.refCount++,t.pooledCache=e,e.refCount++,i.memoizedState={element:r,isDehydrated:a,cache:e},Xy(i),t}function oI(t){return t?(t=Ru,t):Ru}function sI(t,e,a,r,n,i){n=oI(n),r.context===null?r.context=n:r.pendingContext=n,r=Io(e),r.payload={element:a},i=i===void 0?null:i,i!==null&&(r.callback=i),a=Ao(t,r,e),a!==null&&(Ga(a,t,e),Ef(a,t,e))}function iT(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<e?a:e}}function yb(t,e){iT(t,e),(t=t.alternate)&&iT(t,e)}function lI(t){if(t.tag===13||t.tag===31){var e=nl(t,67108864);e!==null&&Ga(e,t,67108864),yb(t,67108864)}}function oT(t){if(t.tag===13||t.tag===31){var e=gr();e=Ly(e);var a=nl(t,e);a!==null&&Ga(a,t,e),yb(t,e)}}var ec=!0;function Aq(t,e,a,r){var n=he.T;he.T=null;var i=Ne.p;try{Ne.p=2,bb(t,e,a,r)}finally{Ne.p=i,he.T=n}}function Qq(t,e,a,r){var n=he.T;he.T=null;var i=Ne.p;try{Ne.p=8,bb(t,e,a,r)}finally{Ne.p=i,he.T=n}}function bb(t,e,a,r){if(ec){var n=vy(r);if(n===null)lx(t,e,r,cm,a),sT(t,r);else if(Eq(n,t,e,a,r))r.stopPropagation();else if(sT(t,r),e&4&&-1<Mq.indexOf(t)){for(;n!==null;){var i=rc(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Bs(i.pendingLanes);if(o!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var l=1<<31-mr(o);s.entanglements[1]|=l,o&=~l}ai(i),(ze&6)===0&&(nm=hr()+500,pd(0,!1))}}break;case 31:case 13:s=nl(i,2),s!==null&&Ga(s,i,2),Lm(),yb(i,2)}if(i=vy(r),i===null&&lx(t,e,r,cm,a),i===n)break;n=i}n!==null&&r.stopPropagation()}else lx(t,e,r,null,a)}}function vy(t){return t=Ry(t),vb(t)}var cm=null;function vb(t){if(cm=null,t=Ns(t),t!==null){var e=id(t);if(e===null)t=null;else{var a=e.tag;if(a===13){if(t=hT(e),t!==null)return t;t=null}else if(a===31){if(t=pT(e),t!==null)return t;t=null}else if(a===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return cm=t,null}function uI(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(FN()){case bT:return 2;case vT:return 8;case zp:case HN:return 32;case ST:return 268435456;default:return 32}default:return 32}}var Sy=!1,Do=null,$o=null,Bo=null,rd=new Map,nd=new Map,vo=[],Mq="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function sT(t,e){switch(t){case"focusin":case"focusout":Do=null;break;case"dragenter":case"dragleave":$o=null;break;case"mouseover":case"mouseout":Bo=null;break;case"pointerover":case"pointerout":rd.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":nd.delete(e.pointerId)}}function wf(t,e,a,r,n,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:a,eventSystemFlags:r,nativeEvent:i,targetContainers:[n]},e!==null&&(e=rc(e),e!==null&&lI(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,n!==null&&e.indexOf(n)===-1&&e.push(n),t)}function Eq(t,e,a,r,n){switch(e){case"focusin":return Do=wf(Do,t,e,a,r,n),!0;case"dragenter":return $o=wf($o,t,e,a,r,n),!0;case"mouseover":return Bo=wf(Bo,t,e,a,r,n),!0;case"pointerover":var i=n.pointerId;return rd.set(i,wf(rd.get(i)||null,t,e,a,r,n)),!0;case"gotpointercapture":return i=n.pointerId,nd.set(i,wf(nd.get(i)||null,t,e,a,r,n)),!0}return!1}function cI(t){var e=Ns(t.target);if(e!==null){var a=id(e);if(a!==null){if(e=a.tag,e===13){if(e=hT(a),e!==null){t.blockedOn=e,Mk(t.priority,function(){oT(a)});return}}else if(e===31){if(e=pT(a),e!==null){t.blockedOn=e,Mk(t.priority,function(){oT(a)});return}}else if(e===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Dp(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var a=vy(t.nativeEvent);if(a===null){a=t.nativeEvent;var r=new a.constructor(a.type,a);kx=r,a.target.dispatchEvent(r),kx=null}else return e=rc(a),e!==null&&lI(e),t.blockedOn=a,!1;e.shift()}return!0}function lT(t,e,a){Dp(t)&&a.delete(e)}function Dq(){Sy=!1,Do!==null&&Dp(Do)&&(Do=null),$o!==null&&Dp($o)&&($o=null),Bo!==null&&Dp(Bo)&&(Bo=null),rd.forEach(lT),nd.forEach(lT)}function mp(t,e){t.blockedOn===e&&(t.blockedOn=null,Sy||(Sy=!0,Xt.unstable_scheduleCallback(Xt.unstable_NormalPriority,Dq)))}var gp=null;function uT(t){gp!==t&&(gp=t,Xt.unstable_scheduleCallback(Xt.unstable_NormalPriority,function(){gp===t&&(gp=null);for(var e=0;e<t.length;e+=3){var a=t[e],r=t[e+1],n=t[e+2];if(typeof r!="function"){if(vb(r||a)===null)continue;break}var i=rc(a);i!==null&&(t.splice(e,3),e-=3,Xx(i,{pending:!0,data:n,method:a.method,action:r},r,n))}}))}function tc(t){function e(l){return mp(l,t)}Do!==null&&mp(Do,t),$o!==null&&mp($o,t),Bo!==null&&mp(Bo,t),rd.forEach(e),nd.forEach(e);for(var a=0;a<vo.length;a++){var r=vo[a];r.blockedOn===t&&(r.blockedOn=null)}for(;0<vo.length&&(a=vo[0],a.blockedOn===null);)cI(a),a.blockedOn===null&&vo.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var n=a[r],i=a[r+1],o=n[Wa]||null;if(typeof i=="function")o||uT(a);else if(o){var s=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[Wa]||null)s=o.formAction;else if(vb(n)!==null)continue}else s=o.action;typeof s=="function"?a[r+1]=s:(a.splice(r,3),r-=3),uT(a)}}}function fI(){function t(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return n=o})},focusReset:"manual",scroll:"manual"})}function e(){n!==null&&(n(),n=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,n=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),n!==null&&(n(),n=null)}}}function Sb(t){this._internalRoot=t}Rm.prototype.render=Sb.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(I(409));var a=e.current,r=gr();sI(a,r,t,e,null,null)};Rm.prototype.unmount=Sb.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;sI(t.current,2,null,t,null,null),Lm(),e[ac]=null}};function Rm(t){this._internalRoot=t}Rm.prototype.unstable_scheduleHydration=function(t){if(t){var e=PT();t={blockedOn:null,target:t,priority:e};for(var a=0;a<vo.length&&e!==0&&e<vo[a].priority;a++);vo.splice(a,0,t),a===0&&cI(t)}};var cT=fT.version;if(cT!=="19.3.0")throw Error(I(527,cT,"19.3.0"));Ne.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(I(188)):(t=Object.keys(t).join(","),Error(I(268,t)));return t=$N(e),t=t!==null?mT(t):null,t=t===null?null:t.stateNode,t};var $q={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:he,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Cf=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Cf.isDisabled&&Cf.supportsFiber))try{od=Cf.inject($q),pr=Cf}catch{}var Cf;Im.createRoot=function(t,e){if(!dT(t))throw Error(I(299));var a=!1,r="",n=UP,i=jP,o=FP;return e!=null&&(e.unstable_strictMode===!0&&(a=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onUncaughtError!==void 0&&(n=e.onUncaughtError),e.onCaughtError!==void 0&&(i=e.onCaughtError),e.onRecoverableError!==void 0&&(o=e.onRecoverableError)),e=iI(t,1,!1,null,null,a,r,null,n,i,o,fI),t[ac]=e.current,hb(t),new Sb(e)};Im.hydrateRoot=function(t,e,a){if(!dT(t))throw Error(I(299));var r=!1,n="",i=UP,o=jP,s=FP,l=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(o=a.onCaughtError),a.onRecoverableError!==void 0&&(s=a.onRecoverableError),a.formState!==void 0&&(l=a.formState)),e=iI(t,1,!0,e,a??null,r,n,l,i,o,s,fI),e.context=oI(null),a=e.current,r=gr(),r=Ly(r),n=Io(r),n.callback=null,Ao(a,n,r),a=r,e.current.lanes=a,ld(e,a),ai(e),t[ac]=e.current,hb(t),new Rm(e)};Im.version="19.3.0"});var mI=Xn((FW,pI)=>{"use strict";function hI(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hI)}catch(t){console.error(t)}}hI(),pI.exports=dI()});var OI=Xn(Am=>{"use strict";var Bq=Symbol.for("react.transitional.element"),_q=Symbol.for("react.fragment");function gI(t,e,a){var r=null;if(a!==void 0&&(r=""+a),e.key!==void 0&&(r=""+e.key),"key"in e){a={};for(var n in e)n!=="key"&&(a[n]=e[n])}else a=e;return e=a.ref,{$$typeof:Bq,type:t,key:r,ref:e!==void 0?e:null,props:a}}Am.Fragment=_q;Am.jsx=gI;Am.jsxs=gI});var G=Xn((GW,xI)=>{"use strict";xI.exports=OI()});var Zh=L(F(),1),Wz=L(mI(),1);var uc=L(F(),1),yI=L(G(),1),wb=uc.createContext(void 0),ol=t=>{let e=uc.useContext(wb);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Cb=({client:t,children:e})=>(uc.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,yI.jsx)(wb.Provider,{value:t,children:e}));var zq={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Nq=class{#e=zq;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},ri=new Nq;function bI(t){setTimeout(t,0)}var Lb=typeof window>"u"||"Deno"in globalThis;function vt(){}function wI(t,e){return typeof t=="function"?t(e):t}function Qm(t){return typeof t=="number"&&t>=0&&t!==1/0}function Mm(t,e){return Math.max(t+(e||0)-Date.now(),0)}function at(t,e){return typeof t=="function"?t(e):t}function Em(t,e){let{type:a="all",exact:r,fetchStatus:n,predicate:i,queryKey:o,stale:s}=t;if(o){if(r){if(e.queryHash!==Od(o,e.options))return!1}else if(!Uo(e.queryKey,o))return!1}if(a!=="all"){let l=e.isActive();if(a==="active"&&!l||a==="inactive"&&l)return!1}return!(typeof s=="boolean"&&e.isStale()!==s||n&&n!==e.state.fetchStatus||i&&!i(e))}function Dm(t,e){let{exact:a,status:r,predicate:n,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(a){if(ni(e.options.mutationKey)!==ni(i))return!1}else if(!Uo(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||n&&!n(e))}function Od(t,e){return(e?.queryKeyHashFn||ni)(t)}function ni(t){return JSON.stringify(t,(e,a)=>kb(a)?Object.keys(a).sort().reduce((r,n)=>(r[n]=a[n],r),{}):a)}function Uo(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){if(e.length>t.length)return!1;for(let r=0;r<e.length;r++)if(!Uo(t[r],e[r]))return!1;return!0}let a=Object.keys(e);for(let r of a)if(!Uo(t[r],e[r]))return!1;return!0}return!1}var Xq=Object.prototype.hasOwnProperty;function Tb(t,e,a=0){if(t===e)return t;if(a>500)return e;let r=vI(t)&&vI(e);if(!r&&!(kb(t)&&kb(e)))return e;let n=(r?t:Object.keys(t)).length,i=r?e:Object.keys(e),o=i.length,s=r?new Array(o):{},l=0;for(let u=0;u<o;u++){let c=r?u:i[u],f=t[c],d=e[c];if(f===d){s[c]=f,(r?u<n:Xq.call(t,c))&&l++;continue}if(f===null||d===null||typeof f!="object"||typeof d!="object"){s[c]=d;continue}let h=Tb(f,d,a+1);s[c]=h,h===f&&l++}return n===o&&l===n?t:s}function cc(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let a in t)if(t[a]!==e[a])return!1;return!0}function vI(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function kb(t){if(!SI(t))return!1;let e=Object.getPrototypeOf(t),a=e?.constructor;if(a===void 0)return!0;if(typeof a!="function")return!1;let r=a.prototype;return!(!SI(r)||!r.hasOwnProperty("isPrototypeOf")||e!==Object.prototype)}function SI(t){return Object.prototype.toString.call(t)==="[object Object]"}function CI(t){return new Promise(e=>{ri.setTimeout(e,t)})}function xd(t,e,a){return typeof a.structuralSharing=="function"?a.structuralSharing(t,e):a.structuralSharing!==!1?Tb(t,e):e}function kI(t,e,a=0){let r=[...t,e];return a&&r.length>a?r.slice(1):r}function LI(t,e,a=0){let r=[e,...t];return a&&r.length>a?r.slice(0,-1):r}var fc=Symbol();function $m(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===fc?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function dc(t,e){return typeof t=="function"?t(...e):!!t}function TI(t,e,a){let r=!1,n;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(n??=e(),r||(r=!0,n.aborted?a():n.addEventListener("abort",a,{once:!0})),n)}),t}var qq=()=>Lb,hc=()=>qq();var zr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var Zq=class extends zr{#e;#t;#a;constructor(){super(),this.#a=t=>{if(typeof window<"u"&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#a=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},pc=new Zq;var PI=bI;function Vq(){let t=[],e=0,a=s=>{s()},r=s=>{s()},n=PI,i=s=>{e?t.push(s):n(()=>{a(s)})},o=()=>{let s=t;t=[],s.length&&n(()=>{r(()=>{s.forEach(l=>{a(l)})})})};return{batch:s=>{let l;e++;try{l=s()}finally{e--,e||o()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{a=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{n=s}}}var He=Vq();var Uq=class extends zr{#e=!0;#t;#a;constructor(){super(),this.#a=t=>{if(typeof window<"u"&&window.addEventListener){let e=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#a=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#e}},mc=new Uq;function jq(t){return Math.min(1e3*2**t,3e4)}function Pb(t){return(t??"online")==="online"?mc.isOnline():!0}var Bm=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function _m(t){let e=!1,a=0,r,n="pending",i,o,s=new Promise((O,y)=>{i=O,o=y});s.catch(vt);let l=()=>n!=="pending",u=O=>{if(!l()){let y=new Bm(O);m(y),t.onCancel?.(y)}},c=()=>{e=!0},f=()=>{e=!1},d=()=>pc.isFocused()&&(t.networkMode==="always"||mc.isOnline())&&t.canRun(),h=()=>Pb(t.networkMode)&&t.canRun(),p=O=>{l()||(r?.(),n="resolved",i(O))},m=O=>{l()||(r?.(),n="rejected",o(O))},x=()=>new Promise(O=>{r=y=>{(l()||d())&&O(y)},t.onPause?.()}).then(()=>{r=void 0,l()||t.onContinue?.()}),g=()=>{if(l())return;let O,y=a===0?t.initialPromise:void 0;try{O=y??t.fn()}catch(b){O=Promise.reject(b)}Promise.resolve(O).then(p).catch(b=>{if(l())return;let v=t.retry??(hc()?0:3),S=t.retryDelay??jq,w=typeof S=="function"?S(a,b):S,k=v===!0||typeof v=="number"&&a<v||typeof v=="function"&&v(a,b);if(e||!k){m(b);return}a++,t.onFail?.(a,b),CI(w).then(()=>d()?void 0:x()).then(()=>{e?m(b):g()})})};return{promise:s,status:()=>n,cancel:u,continue:()=>(r?.(),s),cancelRetry:c,continueRetry:f,canStart:h,start:()=>(h()?g():x().then(g),s)}}var zm=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qm(this.gcTime)&&(this.#e=ri.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(hc()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(ri.clearTimeout(this.#e),this.#e=void 0)}};function II(t){return{onFetch:(e,a)=>{let r=e.options,n=e.fetchOptions?.meta?.fetchMore?.direction,i=e.state.data?.pages||[],o=e.state.data?.pageParams||[],s={pages:[],pageParams:[]},l=0,u=async()=>{let c=!1,f=p=>{TI(p,()=>e.signal,()=>c=!0)},d=$m(e.options,e.fetchOptions),h=async(p,m,x)=>{if(c)return Promise.reject(e.signal.reason);if(m==null&&p.pages.length)return Promise.resolve(p);let O=(()=>{let S={client:e.client,queryKey:e.queryKey,pageParam:m,direction:x?"backward":"forward",meta:e.options.meta};return f(S),S})(),y=await d(O),{maxPages:b}=e.options,v=x?LI:kI;return{pages:v(p.pages,y,b),pageParams:v(p.pageParams,m,b)}};if(n&&i.length){let p=n==="backward",m=p?Fq:RI,x={pages:i,pageParams:o};s=await h(x,m(r,x),p)}else{let p=t??i.length;do{let m=l===0?o[0]??r.initialPageParam:RI(r,s);if(l>0&&m==null)break;s=await h(s,m),l++}while(l<p)}return s};e.options.persister?e.fetchFn=()=>e.options.persister?.(u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},a):e.fetchFn=u}}}function RI(t,{pages:e,pageParams:a}){let r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,a[r],a):void 0}function Fq(t,{pages:e,pageParams:a}){return e.length>0?t.getPreviousPageParam?.(e[0],e,a[0],a):void 0}var MI=class extends zm{#e;#t;#a;#r;#i;#n;#o;#l;constructor(t){super(),this.#l=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#r=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=QI(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#n?.promise}setOptions(t){if(this.options={...this.#o,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=QI(this.options);e.data!==void 0&&(this.setState(AI(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){let a=xd(this.state.data,t,this.options);return this.#s({data:a,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),a}setState(t){this.#s({type:"setState",state:t})}cancel(t){let e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(vt).catch(vt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>at(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>at(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Mm(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){let e=this.observers.indexOf(t);e!==-1&&(this.observers.splice(e,1),this.observers.length||(this.#n&&(this.#l||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(t&&this.setOptions(t),!this.options.queryFn){let l=this.observers.find(u=>u.options.queryFn);l&&this.setOptions(l.options)}let a=new AbortController,r=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#l=!0,a.signal)})},n=()=>{let l=$m(this.options,e),c=(()=>{let f={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(f),f})();return this.#l=!1,this.options.persister?this.options.persister(l,c,this):l(c)},o=(()=>{let l={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:n};return r(l),l})();(this.#e==="infinite"?II(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#a=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#s({type:"fetch",meta:o.fetchOptions?.meta});let s=this.#n=_m({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:l=>{l instanceof Bm&&l.revert&&this.setState({...this.#a,fetchStatus:"idle"}),a.abort()},onFail:(l,u)=>{this.#s({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let l=await s.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#r.config.onSuccess?.(l,this),this.#r.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof Bm){if(l.silent)return this.#n.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#s({type:"error",error:l}),this.#r.config.onError?.(l,this),this.#r.config.onSettled?.(this.state.data,l,this),l}finally{this.#n===s&&(this.#n=void 0),this.scheduleGc()}}#s(t){let e=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...Rb(a.data,this.options),fetchMeta:t.meta??null};case"success":let r={...a,...AI(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#a=t.manual?r:void 0,r;case"error":let n=t.error;return{...a,error:n,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=e(this.state),He.batch(()=>{this.observers.slice().forEach(a=>{a.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function Rb(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pb(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function AI(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function QI(t){let e=typeof t.initialData=="function"?t.initialData():t.initialData,a=e!==void 0,r=a?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:a?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var Ab=class extends zr{#e;#t=void 0;#a=void 0;#r=void 0;#i;#n;#o;#l;#s;#h;#c;#f;#u;#p=new Set;constructor(t,e){super(),this.options=e,this.#e=t,this.#o=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),EI(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ib(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ib(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#v(),this.#t.removeObserver(this)}setOptions(t){let e=this.options,a=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof at(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),e._defaulted&&!cc(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});let r=this.hasListeners();r&&DI(this.#t,a,this.options,e)&&this.#d(),this.updateResult(),r&&(this.#t!==a||at(this.options.enabled,this.#t)!==at(e.enabled,this.#t)||at(this.options.staleTime,this.#t)!==at(e.staleTime,this.#t))&&this.#g();let n=this.#O();r&&(this.#t!==a||at(this.options.enabled,this.#t)!==at(e.enabled,this.#t)||n!==this.#u)&&this.#x(n)}getOptimisticResult(t){let e=this.#e.getQueryCache().build(this.#e,t),a=this.createResult(e,t);return cc(this.getCurrentResult(),a)||(this.#r=a,this.#n=this.options,this.#i=this.#t.state),a}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(a,r)=>(this.trackProp(r),e?.(r),Reflect.get(a,r))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let e=this.#e.defaultQueryOptions(t),a=this.#e.getQueryCache().build(this.#e,e),r=()=>{},n,i=new Promise(o=>{n=o,r=this.#e.getQueryCache().subscribe(s=>{s.type==="updated"&&s.query.queryHash===a.queryHash&&a.state.data!==void 0&&(r(),o(this.createResult(a,e)))})});return Promise.race([a.fetch().then(()=>{let o=this.createResult(a,e);return n?.(o),o}).finally(()=>{r()}),i])}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(t){this.#S();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(vt)),e}#m(t){return!hc()&&at(this.options.enabled,this.#t)!==!1&&Qm(t)}#g(){this.#b();let t=at(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#m(t))return;let e=Mm(this.#r.dataUpdatedAt,t)+1;this.#c=ri.setTimeout(()=>{this.#r.isStale||this.updateResult()},e)}#O(){return at(this.options.refetchInterval,this.#t)??!1}#x(t){this.#v(),this.#u=t,!(this.#u===0||!this.#m(this.#u))&&(this.#f=ri.setInterval(()=>{(this.options.refetchIntervalInBackground||pc.isFocused())&&this.#d()},this.#u))}#y(){this.#g(),this.#x(this.#O())}#b(){this.#c!==void 0&&(ri.clearTimeout(this.#c),this.#c=void 0)}#v(){this.#f!==void 0&&(ri.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){let a=this.#t,r=this.options,n=this.#r,i=this.#i,o=this.#n,s=t!==a?t.state:this.#a,{state:l}=t,u={...l},c=!1,f;if(e._optimisticResults){let v=this.hasListeners(),S=!v&&EI(t,e),w=v&&DI(t,a,e,r);(S||w)&&(u={...u,...Rb(l.data,t.options)}),e._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:d,errorUpdatedAt:h,status:p}=u;f=u.data;let m=!1;if(e.placeholderData!==void 0&&f===void 0&&p==="pending"){let v;n?.isPlaceholderData&&e.placeholderData===o?.placeholderData?(v=n.data,m=!0):v=typeof e.placeholderData=="function"?e.placeholderData(this.#h?.state.data,this.#h):e.placeholderData,v!==void 0&&(p="success",f=xd(n?.data,v,e),c=!0)}if(e.select&&f!==void 0&&!m)if(n&&f===i?.data&&e.select===this.#l)f=this.#s;else try{this.#l=e.select,f=e.select(f),f=xd(n?.data,f,e),this.#s=f,this.#o=null}catch(v){this.#o=v}else f===void 0&&(this.#o=null);this.#o&&(d=this.#o,f=this.#s,h=Date.now(),p="error",c=!1);let x=u.fetchStatus==="fetching",g=p==="pending",O=p==="error",y=g&&x,b=f!==void 0;return{status:p,fetchStatus:u.fetchStatus,isPending:g,isSuccess:p==="success",isError:O,isInitialLoading:y,isLoading:y,data:f,dataUpdatedAt:u.dataUpdatedAt,error:d,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:u.dataUpdateCount>s.dataUpdateCount||u.errorUpdateCount>s.errorUpdateCount,isFetching:x,isRefetching:x&&!g,isLoadingError:O&&!b,isPaused:u.fetchStatus==="paused",isPlaceholderData:c,isRefetchError:O&&b,isStale:Qb(t,e),refetch:this.refetch,isEnabled:at(e.enabled,t)!==!1}}updateResult(){let t=this.#r,e=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#n=this.options,this.#i.data!==void 0&&(this.#h=this.#t),cc(e,t))return;this.#r=e;let r=(()=>{if(!t)return!0;let{notifyOnChangeProps:n}=this.options,i=typeof n=="function"?n():n;if(i==="all"||!i&&!this.#p.size)return!0;let o=new Set(i??this.#p);return this.options.throwOnError&&o.add("error"),Object.keys(this.#r).some(s=>{let l=s;return this.#r[l]!==t[l]&&o.has(l)})})();He.batch(()=>{r&&this.listeners.forEach(n=>{n(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#S(){let t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;let e=this.#t;this.#t=t,this.#a=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Hq(t,e){return at(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&at(e.retryOnMount,t)===!1)}function EI(t,e){return Hq(t,e)||t.state.data!==void 0&&Ib(t,e,e.refetchOnMount)}function Ib(t,e,a){if(at(e.enabled,t)!==!1&&at(e.staleTime,t)!=="static"){let r=at(a,t);return r==="always"||r!==!1&&Qb(t,e)}return!1}function DI(t,e,a,r){return(t!==e||at(r.enabled,t)===!1)&&(!a.suspense||t.state.status!=="error")&&Qb(t,a)}function Qb(t,e){return at(e.enabled,t)!==!1&&t.isStaleByTime(at(e.staleTime,t))}var $I=class extends zm{#e;#t;#a;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#a=t.mutationCache,this.#t=[],this.state=t.state||Mb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#r?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){let e=()=>{this.#i({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=_m({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(o,s)=>{this.#i({type:"failed",failureCount:o,error:s})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)}),n=this.state.status==="pending",i=!r.canStart();try{if(n)e();else{this.#i({type:"pending",variables:t,isPaused:i}),this.#a.config.onMutate&&await this.#a.config.onMutate(t,this,a);let s=await this.options.onMutate?.(t,a);s!==this.state.context&&this.#i({type:"pending",context:s,variables:t,isPaused:i})}let o=await r.start();return await this.#a.config.onSuccess?.(o,t,this.state.context,this,a),await this.options.onSuccess?.(o,t,this.state.context,a),await this.#a.config.onSettled?.(o,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(o,null,t,this.state.context,a),this.#i({type:"success",data:o}),o}catch(o){try{await this.#a.config.onError?.(o,t,this.state.context,this,a)}catch(s){Promise.reject(s)}try{await this.options.onError?.(o,t,this.state.context,a)}catch(s){Promise.reject(s)}try{await this.#a.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,a)}catch(s){Promise.reject(s)}try{await this.options.onSettled?.(void 0,o,t,this.state.context,a)}catch(s){Promise.reject(s)}throw this.#i({type:"error",error:o}),o}finally{this.#r===r&&(this.#r=void 0),this.#a.runNext(this)}}#i(t){let e=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,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{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),He.batch(()=>{this.#t.forEach(a=>{a.onMutationUpdate(t)}),this.#a.notify({mutation:this,type:"updated",action:t})})}};function Mb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var BI=class extends zr{#e;#t;#a;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#a=0}build(t,e,a){let r=new $I({client:t,mutationCache:this,mutationId:++this.#a,options:t.defaultMutationOptions(e),state:a});return this.add(r),r}add(t){this.#e.add(t);let e=Nm(t);if(typeof e=="string"){let a=this.#t.get(e);a?a.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){let e=Nm(t);if(typeof e=="string"){let a=this.#t.get(e);if(a)if(a.length>1){let r=a.indexOf(t);r!==-1&&a.splice(r,1)}else a[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){let e=Nm(t);if(typeof e=="string"){let a=this.#t.get(e)?.find(r=>r.state.status==="pending");return!a||a===t}else return!0}runNext(t){let e=Nm(t);return typeof e=="string"?this.#t.get(e)?.find(a=>a!==t&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){He.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){let e={exact:!0,...t};return this.getAll().find(a=>Dm(e,a))}findAll(t={}){return this.getAll().filter(e=>Dm(t,e))}notify(t){He.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(e=>e.state.isPaused);return He.batch(()=>Promise.all(t.map(e=>e.continue().catch(vt))))}};function Nm(t){return t.options.scope?.id}var Eb=class extends zr{#e;#t=void 0;#a;#r;constructor(t,e){super(),this.#e=t,this.setOptions(e),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#e.defaultMutationOptions(t),cc(this.options,e)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),e?.mutationKey&&this.options.mutationKey&&ni(e.mutationKey)!==ni(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#a&&(this.#a.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#n(t)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#i(),this.#n()}mutate(t,e){return this.#r=e,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(t)}#i(){let t=this.#a?.state??Mb();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#n(t){He.batch(()=>{if(this.#r&&this.hasListeners()){let e=this.#t.variables,a=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,a,r)}catch(n){Promise.reject(n)}try{this.#r.onSettled?.(t.data,null,e,a,r)}catch(n){Promise.reject(n)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,a,r)}catch(n){Promise.reject(n)}try{this.#r.onSettled?.(void 0,t.error,e,a,r)}catch(n){Promise.reject(n)}}}this.listeners.forEach(e=>{e(this.#t)})})}};var _I=class extends zr{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,e,a){let r=e.queryKey,n=e.queryHash??Od(r,e),i=this.get(n);return i||(i=new MI({client:t,queryKey:r,queryHash:n,options:t.defaultQueryOptions(e),state:a,defaultOptions:t.getQueryDefaults(r)}),this.add(i)),i}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){this.#e.get(t.queryHash)===t&&(t.destroy(),this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(a=>Em(e,a))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(a=>Em(t,a)):e}notify(t){He.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}};var Db=class{#e;#t;#a;#r;#i;#n;#o;#l;constructor(t={}){this.#e=t.queryCache||new _I,this.#t=t.mutationCache||new BI,this.#a=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#n=0}mount(){this.#n++,this.#n===1&&(this.#o=pc.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=mc.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#n--,this.#n===0&&(this.#o?.(),this.#o=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),a=this.#e.build(this,e),r=a.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&a.isStaleByTime(at(e.staleTime,a))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:a})=>[e,a.data])}setQueryData(t,e,a){let r=this.defaultQueryOptions({queryKey:t}),n=this.#e.get(r.queryHash)?.state.data,i=wI(e,n);if(i!==void 0)return this.#e.build(this,r).setData(i,{...a,manual:!0})}setQueriesData(t,e,a){return He.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,a)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){let e=this.#e;He.batch(()=>{e.findAll(t).forEach(a=>{e.remove(a)})})}resetQueries(t,e){let a=this.#e;return He.batch(()=>{let r=a.findAll(t),n=new Set(r);return r.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>n.has(i)},e)})}cancelQueries(t,e={}){let a={revert:!0,...e},r=He.batch(()=>this.#e.findAll(t).map(n=>n.cancel(a)));return Promise.all(r).then(vt).catch(vt)}invalidateQueries(t,e={}){return He.batch(()=>(this.#e.findAll(t).forEach(a=>{a.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){let a={...e,cancelRefetch:e.cancelRefetch??!0},r=He.batch(()=>this.#e.findAll(t).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let i=n.fetch(void 0,a);return a.throwOnError||(i=i.catch(vt)),n.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(vt)}async query(t){let e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);let a=this.#e.build(this,e),r=a.isStaleByTime(at(e.staleTime,a))?await a.fetch(e):a.state.data,n=e.select;return n?n(r):r}fetchQuery(t){let e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);let a=this.#e.build(this,e);return a.isStaleByTime(at(e.staleTime,a))?a.fetch(e):Promise.resolve(a.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(vt).catch(vt)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(vt).catch(vt)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return mc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#a}setDefaultOptions(t){this.#a=t}setQueryDefaults(t,e){this.#r.set(ni(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#r.values()],a={};return e.forEach(r=>{Uo(t,r.queryKey)&&Object.assign(a,r.defaultOptions)}),a}setMutationDefaults(t,e){this.#i.set(ni(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#i.values()],a={};return e.forEach(r=>{Uo(t,r.mutationKey)&&Object.assign(a,r.defaultOptions)}),a}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#a.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Od(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===fc&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#a.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};var Xm=L(F(),1),zI=Xm.createContext(!1),NI=()=>Xm.useContext(zI),LJ=zI.Provider;var yd=L(F(),1),Gq=L(G(),1);function Yq(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Wq=yd.createContext(Yq()),XI=()=>yd.useContext(Wq);var qI=L(F(),1);var ZI=(t,e,a)=>{let r=a?.state.error&&typeof t.throwOnError=="function"?dc(t.throwOnError,[a.state.error,a]):t.throwOnError;(t.suspense||r)&&(e.isReset()||(t.retryOnMount=!1))},VI=t=>{qI.useEffect(()=>{t.clearReset()},[t])},UI=({result:t,errorResetBoundary:e,throwOnError:a,query:r,suspense:n})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(n&&t.data===void 0||dc(a,[t.error,r]));var jI=t=>{if(t.suspense){let a=n=>n==="static"?n:Math.max(n??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...n)=>a(r(...n)):a(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},FI=(t,e)=>t?.suspense&&e.isPending,HI=(t,e,a)=>e.fetchOptimistic(t).catch(()=>{a.clearReset()});var jo=L(F(),1);function GI(t,e,a){let r=NI(),n=XI(),i=ol(a),o=i.defaultQueryOptions(t),s=i.getQueryCache().get(o.queryHash),l=t.subscribed!==!1;o._optimisticResults=r?"isRestoring":l?"optimistic":void 0,jI(o),ZI(o,n,s),VI(n);let[u]=jo.useState(()=>new e(i,o)),c=u.getOptimisticResult(o),f=!r&&l;if(jo.useSyncExternalStore(jo.useCallback(d=>{let h=f?u.subscribe(He.batchCalls(d)):vt;return u.updateResult(),h},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),jo.useEffect(()=>{u.setOptions(o)},[o,u]),FI(o,c))throw HI(o,u,n);if(UI({result:c,errorResetBoundary:n,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw c.error;return o.notifyOnChangeProps?c:u.trackResult(c)}function Nr(t,e){return GI(t,Ab,e)}var Ni=L(F(),1);function dn(t,e){let a=ol(e),[r]=Ni.useState(()=>new Eb(a,t));Ni.useEffect(()=>{r.setOptions(t)},[r,t]);let n=Ni.useSyncExternalStore(Ni.useCallback(o=>r.subscribe(He.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=Ni.useCallback((...o)=>{r.mutate(o[0],o[1]).catch(vt)},[r]);if(n.error&&dc(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:i,mutateAsync:n.mutate}}var qm=L(F(),1);var YI=t=>t?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function WI(t,e,a=[]){if(e==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:YI(t),size:24,node:e,...a.length>0?{aliases:a}:{}}}var KI=t=>{let e="",a=!1;for(let r of t){if(r==="-"||r==="_"||r<=" "){a=e.length>0;continue}e.length===0?e+=r.toLowerCase():e+=a?r.toUpperCase():r,a=!1}return e};var JI=t=>{let e=KI(t);return e.charAt(0).toUpperCase()+e.slice(1)};var vd=L(F(),1);var bd=(...t)=>t.filter((e,a,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===a).join(" ").trim();var Fo={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function $b(t){return t!=null}function eA(t,e={}){let a=e.attributeNames??{},r=d=>a[d]??d,n=t.size??t.width??Fo.width,i=t.size??t.height??Fo.height,o=t.aliases?.filter(d=>typeof d=="string"&&d.trim()!=="").map(d=>`lucide-${d}`)??[],s=[...t.name?[`lucide-${t.name}`]:[],...o],l=e.className?.split(" ").filter(Boolean)??[],u=e.includeDefaultClasses===!1?bd(...l):bd("lucide",...s,...l),c=e.absoluteStrokeWidth?Number(e.strokeWidth??Fo["stroke-width"])*Number(t.size??t.width??Fo.width)/Number(e.size??e.width??Fo.width):e.strokeWidth??Fo["stroke-width"];return["svg",{...Object.entries(Fo).reduce((d,[h,p])=>(d[r(h)]=p,d),{}),..."color"in e&&e.color&&{[r("stroke")]:e.color},..."size"in e&&$b(e.size)&&{[r("width")]:e.size,[r("height")]:e.size},..."width"in e&&$b(e.width)&&{[r("width")]:e.width},..."height"in e&&$b(e.height)&&{[r("height")]:e.height},[r("stroke-width")]:c,...u&&{[r("class")]:u},[r("viewBox")]:`0 0 ${n} ${i}`,...e.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in e&&e.attributes},t.node.map(d=>{let[h,p,m]=d,x=e.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...p}:p;return m?[h,x,m]:[h,x]})]}function tA(t,e={}){return eA(t,{...e,attributeNames:{...e.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}var aA=t=>{for(let e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};var gc=L(F(),1);var Kq=(0,gc.createContext)({});var rA=()=>(0,gc.useContext)(Kq);var nA=(0,vd.forwardRef)(({color:t,size:e,width:a,height:r,strokeWidth:n,absoluteStrokeWidth:i,nonScalingStroke:o,className:s="",children:l,iconNode:u=[],icon:c={node:u,aliases:[],size:24},...f},d)=>{let{size:h=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,nonScalingStroke:x=!1,color:g="currentColor",className:O=""}=rA()??{},y=!!l||aA(f),[b,v,S=[]]=tA(c,{color:t??g,width:a??e??h,height:r??e??h,strokeWidth:n??p,absoluteStrokeWidth:i??m,nonScalingStroke:o??x,className:bd(O,s),hasA11yProp:y,attributes:f});return(0,vd.createElement)(b,{ref:d,...v},[...S.map(([w,k])=>(0,vd.createElement)(w,k)),...Array.isArray(l)?l:[l]])});function Lt(t,e=[],a=[]){let r=typeof t=="string"?WI(t,e,a):t,n=(0,qm.forwardRef)(({className:i,...o},s)=>(0,qm.createElement)(nA,{ref:s,icon:r,className:i,...o}));return r.name&&(n.displayName=JI(r.name)),n}var iA={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};iA.node;var Sd=Lt(iA);var oA={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};oA.node;var Oc=Lt(oA);var sA={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};sA.node;var wd=Lt(sA);var lA={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};lA.node;var Ho=Lt(lA);var uA={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};uA.node;var hn=Lt(uA);var cA={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};cA.node;var Cd=Lt(cA);var fA={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};fA.node;var Go=Lt(fA);var dA={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};dA.node;var Yo=Lt(dA);var hA={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};hA.node;var kd=Lt(hA);var pA={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};pA.node;var Wo=Lt(pA);var mA={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};mA.node;var sl=Lt(mA);var Jq=/^[\w!#$%&'*.^`|~+-]+$/;var eZ=(t,e,a={})=>{if(!Jq.test(t))throw new Error("Invalid cookie name");let r=`${t}=${e}`;if(t.startsWith("__Secure-")&&!a.secure)throw new Error("__Secure- Cookie must have Secure attributes");if(t.startsWith("__Host-")){if(!a.secure)throw new Error("__Host- Cookie must have Secure attributes");if(a.path!=="/")throw new Error('__Host- Cookie must have Path attributes with "/"');if(a.domain)throw new Error("__Host- Cookie must not have Domain attributes")}for(let n of["domain","path","sameSite","priority"])if(a[n]&&/[;\r\n]/.test(a[n]))throw new Error(`${n} must not contain ";", "\\r", or "\\n"`);if(a&&typeof a.maxAge=="number"&&a.maxAge>=0){if(a.maxAge>3456e4)throw new Error("Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.");r+=`; Max-Age=${a.maxAge|0}`}if(a.domain&&a.prefix!=="host"&&(r+=`; Domain=${a.domain}`),a.path&&(r+=`; Path=${a.path}`),a.expires){if(a.expires.getTime()-Date.now()>3456e7)throw new Error("Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.");r+=`; Expires=${a.expires.toUTCString()}`}if(a.httpOnly&&(r+="; HttpOnly"),a.secure&&(r+="; Secure"),a.sameSite&&(r+=`; SameSite=${a.sameSite.charAt(0).toUpperCase()+a.sameSite.slice(1)}`),a.priority&&(r+=`; Priority=${a.priority.charAt(0).toUpperCase()+a.priority.slice(1)}`),a.partitioned){if(!a.secure)throw new Error("Partitioned Cookie must have Secure attributes");r+="; Partitioned"}return r},gA=(t,e,a)=>(e=encodeURIComponent(e),eZ(t,e,a));var OA=(t,e)=>(t=t.replace(/\/+$/,""),t=t+"/",e=e.replace(/^\/+/,""),t+e),Vm=(t,e)=>{for(let[a,r]of Object.entries(e)){let n=new RegExp("/:"+a+"(?:{[^/]+})?\\??(?=/|$)");t=t.replace(n,()=>r?`/${r}`:"")}return t},xA=t=>{let e=new URLSearchParams;for(let[a,r]of Object.entries(t))if(r!==void 0)if(Array.isArray(r))for(let n of r)n!==void 0&&e.append(a,n);else e.set(a,r);return e},yA=(t,e)=>{switch(e){case"ws":return t.replace(/^http/,"ws");case"http":return t.replace(/^ws/,"http")}},Um=t=>/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(t)?t.replace(/\/index(?=\?|$)/,"/"):t.replace(/\/index(?=\?|$)/,"");function Zm(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Bb(t,e){if(!Zm(t)&&!Zm(e))return e;let a={...t};for(let r in e){let n=e[r];Zm(a[r])&&Zm(n)?a[r]=Bb(a[r],n):a[r]=n}return a}var bA=(t,e)=>new Proxy(()=>{},{get(r,n){if(!(typeof n!="string"||n==="then"))return bA(t,[...e,n])},apply(r,n,i){return t({path:e,args:i})}}),vA=(t,e)=>{let a=e.toString();return a?`${t}?${a}`:t},aZ=class{url;method;buildSearchParams;queryParams=void 0;pathParams={};rBody;cType=void 0;constructor(t,e,a){this.url=t,this.method=e,this.buildSearchParams=a.buildSearchParams}fetch=async(t,e)=>{if(t){if(t.query&&(this.queryParams=this.buildSearchParams(t.query)),t.form){let s=new FormData;for(let[l,u]of Object.entries(t.form))if(u!==void 0)if(Array.isArray(u))for(let c of u)c!==void 0&&s.append(l,c);else s.append(l,u);this.rBody=s}t.json!==void 0&&(this.rBody=JSON.stringify(t.json),this.cType="application/json"),t.param&&(this.pathParams=t.param)}let a=this.method.toUpperCase(),r={...t?.header,...typeof e?.headers=="function"?await e.headers():e?.headers};if(t?.cookie){let s=[];for(let[l,u]of Object.entries(t.cookie))u!==void 0&&s.push(gA(l,u));s.length>0&&(r.Cookie=s.join("; "))}this.cType&&(r["Content-Type"]=this.cType);let n=new Headers;for(let[s,l]of Object.entries(r))l!==void 0&&n.set(s,l);let i=this.url;i=Um(i),i=Vm(i,this.pathParams),this.queryParams&&(i=vA(i,this.queryParams)),a=this.method.toUpperCase();let o=!(a==="GET"||a==="HEAD");return(e?.fetch||fetch)(i,{body:o?this.rBody:void 0,method:a,headers:n,...e?.init})}},_b=(t,e)=>bA(function a(r){let n=e?.buildSearchParams??xA,i=[...r.path],o=i.slice(-3).reverse();if(o[0]==="toString")return o[1]==="name"?o[2]||"":a.toString();if(o[0]==="valueOf")return o[1]==="name"?o[2]||"":a;let s="";if(/^\$/.test(o[0])){let f=i.pop();f&&(s=f.replace(/^\$/,""))}let l=i.join("/"),u=OA(t,l);if(s==="url"||s==="path"){let f=Um(u);return r.args[0]&&(r.args[0].param&&(f=Vm(f,r.args[0].param)),r.args[0].query&&(f=vA(f,n(r.args[0].query)))),s==="url"?new URL(f):f.slice(t.replace(/\/+$/,"").length).replace(/^\/?/,"/")}if(s==="ws"){let f=Um(u),d=yA(r.args[0]?.param?Vm(f,r.args[0].param):f,"ws"),h=new URL(d),p=r.args[0]?.query;return p&&n(p).forEach((g,O)=>{h.searchParams.append(O,g)}),((...x)=>e?.webSocket!==void 0&&typeof e.webSocket=="function"?e.webSocket(...x):new WebSocket(...x))(h.toString())}let c=new aZ(u,s,{buildSearchParams:n});if(s){e??={};let f={...r.args[1]},d=e.headers,h=f.headers;d&&h&&(f.headers=async()=>({...typeof d=="function"?await d():d,...typeof h=="function"?await h():h}));let p=Bb(e,f);return c.fetch(r.args[0],p)}return c},[]);var Et=_b("/api",{headers:{Authorization:`Bearer ${new URLSearchParams(location.search).get("t")??""}`}});function xc(){return Nr({queryKey:["kinds"],queryFn:async()=>(await Et.definitions.kinds.$get()).json()})}function ii(t){return Nr({queryKey:["primitives",t??""],queryFn:async()=>(await Et.charter.root.primitives.$get({query:t===void 0?{}:{matching:t}})).json()})}function SA(t){return Nr({queryKey:["explanation",t],queryFn:async()=>(await Et.charter.root.primitives[":id"].explanation.$get({param:{id:encodeURIComponent(t)}})).json()})}function wA(t){return Nr({queryKey:["primitive",t],enabled:t!==void 0,gcTime:0,refetchOnWindowFocus:!1,queryFn:async()=>{let e=await Et.charter.root.primitives[":id"].$get({param:{id:encodeURIComponent(t??"")}});return{answer:await e.json(),entityTag:e.headers.get("ETag")??""}}})}function CA(t){return Nr({queryKey:["requirements",t],enabled:t!=="",queryFn:async()=>(await Et.definitions.kinds[":kind"].requirements.$get({param:{kind:t}})).json()})}function Xi(){let t=ol();return async()=>{await t.resetQueries({queryKey:["testOutcome"]}),await t.invalidateQueries({predicate:({queryKey:e})=>e[0]!=="kinds"&&e[0]!=="requirements"&&e[0]!=="testOutcome"})}}function kA(){let t=Xi();return dn({mutationFn:async e=>(await Et.charter.root.primitives.$post({json:e})).json(),onSuccess:t})}function LA(){let t=Xi();return dn({mutationFn:async e=>(await Et.charter.root.primitives[":id"].$put({...e,param:{id:encodeURIComponent(e.param.id)}})).json(),onSuccess:t})}function TA(){let t=Xi();return dn({mutationFn:async e=>{let a=await Et.charter.root.primitives[":id"].$delete({param:{id:encodeURIComponent(e)}},{headers:{"Content-Type":"application/json"}});return a.status===422?a.json():null},onSuccess:t})}function PA(){return Nr({queryKey:["build"],gcTime:0,queryFn:async()=>(await Et.charter.root.build.$get()).json()})}function RA(){return Nr({queryKey:["health"],gcTime:0,queryFn:async()=>(await Et.charter.root.health.$get()).json()})}function jm(){let t=Xi();return dn({mutationFn:async()=>(await Et.charter.root.build.$post({},{headers:{"Content-Type":"application/json"}})).json(),onSuccess:t})}function IA(){return Nr({queryKey:["vendors"],queryFn:async()=>(await Et.vendors.$get()).json()})}function AA(){let t=Xi();return dn({mutationFn:async e=>{let a=await Et.vendors.$post({json:e});return a.status===422?a.json():null},onSuccess:t})}function QA(){let t=Xi();return dn({mutationFn:async e=>{let a=await Et.vendors[":name"].$delete({param:{name:e}},{headers:{"Content-Type":"application/json"}});return a.status===422?a.json():null},onSuccess:t})}function Fm(){return Nr({queryKey:["testSuites"],queryFn:async()=>(await Et["test-suites"].$get()).json()})}function MA(){return Nr({queryKey:["testOutcome"],enabled:!1,queryFn:async()=>(await Et["test-suites"].outcome.$get()).json()})}function EA(){let t=Xi();return dn({mutationFn:async()=>(await Et["test-suites"].$post({},{headers:{"Content-Type":"application/json"}})).json(),onSuccess:t})}function DA(){let t=Xi();return dn({mutationFn:async({name:e,text:a})=>(await Et["test-suites"][":name"].$put({param:{name:e},json:{text:a}})).json(),onSuccess:async e=>{typeof e=="string"&&await t()}})}function $A(){let t=Xi();return dn({mutationFn:async e=>{let a=await Et["test-suites"][":name"].$delete({param:{name:e}},{headers:{"Content-Type":"application/json"}});return a.status===422?a.json():null},onSuccess:t})}var tu=L(F(),1);var X=L(F(),1),NA=L(Es(),1);function rZ(t){if(!t||typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",e.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}var nZ=t=>{switch(t){case"success":return sZ;case"info":return uZ;case"warning":return lZ;case"error":return cZ;default:return null}},iZ=Array(12).fill(0),oZ=({visible:t,className:e})=>X.default.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},X.default.createElement("div",{className:"sonner-spinner"},iZ.map((a,r)=>X.default.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sZ=X.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},X.default.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),lZ=X.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},X.default.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),uZ=X.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},X.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),cZ=X.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},X.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fZ=X.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},X.default.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),X.default.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dZ=()=>{let[t,e]=X.default.useState(document.hidden);return X.default.useEffect(()=>{let a=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",a),()=>document.removeEventListener("visibilitychange",a)},[]),t},hZ=1,pZ=100,BA=t=>{var e;return typeof t?.id=="number"||(t==null||(e=t.id)==null?void 0:e.length)>0?t.id:hZ++},zb=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(a=>e(a)),()=>{let a=this.subscribers.indexOf(e);this.subscribers.splice(a,1)}),this.publish=e=>{this.subscribers.forEach(a=>a(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-pZ;e<=0||(this.toasts=this.toasts.filter(a=>e>0&&this.dismissedToasts.has(a.id)?(this.dismissedToasts.delete(a.id),e--,!1):!0))},this.create=e=>{let{message:a,...r}=e,n=BA(e),i=this.pendingDismissals.get(n);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(n),this.dismissedToasts.delete(n));let o=this.dismissedToasts.has(n),s=e.dismissible===void 0?!0:e.dismissible;return o&&(this.dismissedToasts.delete(n),this.toasts=this.toasts.filter(u=>u.id!==n)),(o?void 0:this.toasts.find(u=>u.id===n))?this.toasts=this.toasts.map(u=>u.id===n?(this.publish({...u,...e,id:n,title:a}),{...u,...e,id:n,dismissible:s,title:a}):u):this.addToast({title:a,...r,dismissible:s,id:n}),n},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let a=this.pendingDismissals.get(e);return a!==void 0&&cancelAnimationFrame(a),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(r=>r({id:e,dismiss:!0}))})),e},this.message=(e,a)=>this.create({...a,message:e,type:void 0}),this.error=(e,a)=>this.create({...a,message:e,type:"error"}),this.success=(e,a)=>this.create({...a,type:"success",message:e}),this.info=(e,a)=>this.create({...a,type:"info",message:e}),this.warning=(e,a)=>this.create({...a,type:"warning",message:e}),this.loading=(e,a)=>this.create({...a,type:"loading",message:e}),this.promise=(e,a)=>{if(!a)return;let r;a.loading!==void 0&&(r=this.create({...a,promise:e,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));let n=Promise.resolve(e instanceof Function?e():e),i=r!==void 0,o,s=n.then(async u=>{if(o=["resolve",u],X.default.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(gZ(u)&&!u.ok){i=!1;let f=typeof a.error=="function"?await a.error(`HTTP error! status: ${u.status}`):a.error,d=typeof a.description=="function"?await a.description(`HTTP error! status: ${u.status}`):a.description,p=typeof f=="object"&&!X.default.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...p})}else if(u instanceof Error){i=!1;let f=typeof a.error=="function"?await a.error(u):a.error,d=typeof a.description=="function"?await a.description(u):a.description,p=typeof f=="object"&&!X.default.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...p})}else if(a.success!==void 0){i=!1;let f=typeof a.success=="function"?await a.success(u):a.success,d=typeof a.description=="function"?await a.description(u):a.description,p=typeof f=="object"&&!X.default.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:d,...p})}}).catch(async u=>{if(o=["reject",u],a.error!==void 0){i=!1;let c=typeof a.error=="function"?await a.error(u):a.error,f=typeof a.description=="function"?await a.description(u):a.description,h=typeof c=="object"&&!X.default.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:f,...h})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),a.finally==null||a.finally.call(a)}),l=()=>new Promise((u,c)=>s.then(()=>o[0]==="reject"?c(o[1]):u(o[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,a)=>{let r=BA(a);return this.create({...a,jsx:e(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},Ka=new zb,mZ=(t,e)=>Ka.message(t,e),gZ=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",OZ=mZ,xZ=()=>Ka.toasts,yZ=()=>Ka.getActiveToasts(),ll=Object.assign(OZ,{success:Ka.success,info:Ka.info,warning:Ka.warning,error:Ka.error,custom:Ka.custom,message:Ka.message,promise:Ka.promise,dismiss:Ka.dismiss,loading:Ka.loading},{getHistory:xZ,getToasts:yZ});rZ("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Hm(t){return t.label!==void 0}var bZ=3,vZ="24px",SZ="16px",_A=4e3,wZ=356,CZ=14,kZ=45,LZ=200;function oi(...t){return t.filter(Boolean).join(" ")}function TZ(t){let[e,a]=t.split("-"),r=[];return e&&r.push(e),a&&r.push(a),r}var PZ=t=>{var e,a,r,n,i,o,s,l,u;let{invert:c,toast:f,unstyled:d,interacting:h,setHeights:p,visibleToasts:m,heights:x,index:g,toasts:O,expanded:y,removeToast:b,defaultRichColors:v,closeButton:S,style:w,cancelButtonStyle:k,actionButtonStyle:T,className:Q="",descriptionClassName:$="",duration:A,position:R,gap:D,expandByDefault:Y,classNames:B,icons:q,closeButtonAriaLabel:re="Close toast"}=t,[ie,z]=X.default.useState(null),[Pe,P]=X.default.useState(null),[H,N]=X.default.useState(!1),[M,j]=X.default.useState(!1),[de,ee]=X.default.useState(!1),[Z,qe]=X.default.useState(!1),[Re,Ie]=X.default.useState(!1),[Ze,Vt]=X.default.useState(0),[Za,iu]=X.default.useState(0),Si=X.default.useRef(f.duration||A||_A),ou=X.default.useRef(null),wi=X.default.useRef(null),Kz=g===0,Jz=g+1<=m,Ca=f.type,qC=Ca??"default",su=f.dismissible!==!1,eN=f.className||"",tN=f.descriptionClassName||"",Vh=X.default.useMemo(()=>x.findIndex(ge=>ge.toastId===f.id)||0,[x,f.id]),aN=X.default.useMemo(()=>{var ge;return(ge=f.closeButton)!=null?ge:S},[f.closeButton,S]),ZC=X.default.useMemo(()=>f.duration||A||_A,[f.duration,A]),m0=X.default.useRef(0),lu=X.default.useRef(0),VC=X.default.useRef(0),uu=X.default.useRef(null),[rN,nN]=R.split("-"),UC=X.default.useMemo(()=>x.reduce((ge,Ut,ma)=>ma>=Vh?ge:ge+Ut.height,0),[x,Vh]),jC=dZ(),_n=X.default.useMemo(()=>{var ge;return(ge=t.swipeDirections)!=null?ge:TZ(R)},[t.swipeDirections,R]),iN=f.invert||c,g0=Ca==="loading";lu.current=X.default.useMemo(()=>Vh*D+UC,[Vh,UC]),X.default.useEffect(()=>{Si.current=ZC},[ZC]),X.default.useEffect(()=>{N(!0)},[]),X.default.useEffect(()=>{let ge=wi.current;if(ge){let Ut=ge.getBoundingClientRect().height;return iu(Ut),p(ma=>[{toastId:f.id,height:Ut,position:f.position},...ma]),()=>p(ma=>ma.filter(Va=>Va.toastId!==f.id))}},[p,f.id]),X.default.useLayoutEffect(()=>{if(!H)return;let ge=wi.current,Ut=ge.style.height;ge.style.height="auto";let ma=ge.getBoundingClientRect().height;ge.style.height=Ut,iu(ma),p(Va=>Va.find(ta=>ta.toastId===f.id)?Va.map(ta=>ta.toastId===f.id?{...ta,height:ma}:ta):[{toastId:f.id,height:ma,position:f.position},...Va])},[H,f.title,f.description,p,f.id,f.jsx,f.action,f.cancel]);let ho=X.default.useCallback(()=>{j(!0),Vt(lu.current),p(ge=>ge.filter(Ut=>Ut.toastId!==f.id)),setTimeout(()=>{b(f)},LZ)},[f,b,p,lu]);X.default.useEffect(()=>{if(f.promise&&Ca==="loading"||f.duration===1/0||f.type==="loading")return;let ge;return y||h||jC?(()=>{if(VC.current<m0.current){let Va=new Date().getTime()-m0.current;Si.current=Si.current-Va}VC.current=new Date().getTime()})():Si.current!==1/0&&(m0.current=new Date().getTime(),ge=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),ho()},Si.current)),()=>clearTimeout(ge)},[y,h,f,Ca,jC,ho]),X.default.useEffect(()=>{f.delete&&(ho(),f.onDismiss==null||f.onDismiss.call(f,f))},[ho,f.delete]);function FC(){var ge;if(q?.loading){var Ut;return X.default.createElement("div",{className:oi(B?.loader,f==null||(Ut=f.classNames)==null?void 0:Ut.loader,"sonner-loader"),"data-visible":Ca==="loading"},q.loading)}return X.default.createElement(oZ,{className:oi(B?.loader,f==null||(ge=f.classNames)==null?void 0:ge.loader),visible:Ca==="loading"})}let oN=f.icon||q?.[Ca]||nZ(Ca);var HC,GC;return X.default.createElement("li",{tabIndex:0,ref:wi,className:oi(Q,eN,B?.toast,f==null||(e=f.classNames)==null?void 0:e.toast,B?.[qC],f==null||(a=f.classNames)==null?void 0:a[qC]),"data-sonner-toast":"","data-rich-colors":(HC=f.richColors)!=null?HC:v,"data-styled":!(f.jsx||f.unstyled||d),"data-mounted":H,"data-promise":!!f.promise,"data-swiped":Re,"data-removed":M,"data-visible":Jz,"data-y-position":rN,"data-x-position":nN,"data-index":g,"data-front":Kz,"data-swiping":de,"data-dismissible":su,"data-type":Ca,"data-invert":iN,"data-swipe-out":Z,"data-swipe-direction":Pe,"data-expanded":!!(y||Y&&H),"data-testid":f.testId,style:{"--index":g,"--toasts-before":g,"--z-index":O.length-g,"--offset":`${M?Ze:lu.current}px`,"--initial-height":Y?"auto":`${Za}px`,...w,...f.style},onDragEnd:()=>{ee(!1),z(null),uu.current=null},onPointerDown:ge=>{ge.button!==2&&(g0||!su||(ou.current=new Date,Vt(lu.current),ge.target.setPointerCapture(ge.pointerId),ge.target.tagName!=="BUTTON"&&(ee(!0),uu.current={x:ge.clientX,y:ge.clientY})))},onPointerUp:()=>{var ge,Ut,ma;if(Z||!su)return;uu.current=null;let Va=Number(((ge=wi.current)==null?void 0:ge.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),pf=Number(((Ut=wi.current)==null?void 0:Ut.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ta=new Date().getTime()-((ma=ou.current)==null?void 0:ma.getTime()),Pr=ie==="x"?Va:pf,zn=Math.abs(Pr)/ta;if((ie==="x"?_n.includes(Va>0?"right":"left"):_n.includes(pf>0?"bottom":"top"))&&(Math.abs(Pr)>=kZ||zn>.11)){Vt(lu.current),f.onDismiss==null||f.onDismiss.call(f,f),P(ie==="x"?Va>0?"right":"left":pf>0?"down":"up"),ho(),qe(!0);return}else{var Nn,x0;(Nn=wi.current)==null||Nn.style.setProperty("--swipe-amount-x","0px"),(x0=wi.current)==null||x0.style.setProperty("--swipe-amount-y","0px")}Ie(!1),ee(!1),z(null)},onPointerMove:ge=>{var Ut,ma,Va;if(!uu.current||!su||((Ut=window.getSelection())==null?void 0:Ut.toString().length)>0)return;let ta=ge.clientY-uu.current.y,Pr=ge.clientX-uu.current.x;!ie&&(Math.abs(Pr)>1||Math.abs(ta)>1)&&z(Math.abs(Pr)>Math.abs(ta)?"x":"y");let zn={x:0,y:0},O0=Nn=>1/(1.5+Math.abs(Nn)/20);if(ie==="y"){if(_n.includes("top")||_n.includes("bottom"))if(_n.includes("top")&&ta<0||_n.includes("bottom")&&ta>0)zn.y=ta;else{let Nn=ta*O0(ta);zn.y=Math.abs(Nn)<Math.abs(ta)?Nn:ta}}else if(ie==="x"&&(_n.includes("left")||_n.includes("right")))if(_n.includes("left")&&Pr<0||_n.includes("right")&&Pr>0)zn.x=Pr;else{let Nn=Pr*O0(Pr);zn.x=Math.abs(Nn)<Math.abs(Pr)?Nn:Pr}(Math.abs(zn.x)>0||Math.abs(zn.y)>0)&&Ie(!0),(ma=wi.current)==null||ma.style.setProperty("--swipe-amount-x",`${zn.x}px`),(Va=wi.current)==null||Va.style.setProperty("--swipe-amount-y",`${zn.y}px`)}},aN&&!f.jsx&&Ca!=="loading"?X.default.createElement("button",{"aria-label":re,"data-disabled":g0,"data-close-button":!0,onClick:g0||!su?()=>{}:()=>{ho(),f.onDismiss==null||f.onDismiss.call(f,f)},className:oi(B?.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(GC=q?.close)!=null?GC:fZ):null,(Ca||f.icon||f.promise)&&f.icon!==null&&(q?.[Ca]!==null||f.icon)?X.default.createElement("div",{"data-icon":"",className:oi(B?.icon,f==null||(n=f.classNames)==null?void 0:n.icon)},Ca==="loading"?f.icon||FC():f.promise?FC():null,Ca!=="loading"?oN:null):null,X.default.createElement("div",{"data-content":"",className:oi(B?.content,f==null||(i=f.classNames)==null?void 0:i.content)},X.default.createElement("div",{"data-title":"",className:oi(B?.title,f==null||(o=f.classNames)==null?void 0:o.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?X.default.createElement("div",{"data-description":"",className:oi($,tN,B?.description,f==null||(s=f.classNames)==null?void 0:s.description)},typeof f.description=="function"?f.description():f.description):null),X.default.isValidElement(f.cancel)?f.cancel:f.cancel&&Hm(f.cancel)?X.default.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||k,onClick:ge=>{Hm(f.cancel)&&su&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,ge),ho())},className:oi(B?.cancelButton,f==null||(l=f.classNames)==null?void 0:l.cancelButton)},f.cancel.label):null,X.default.isValidElement(f.action)?f.action:f.action&&Hm(f.action)?X.default.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||T,onClick:ge=>{Hm(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,ge),!ge.defaultPrevented&&ho())},className:oi(B?.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function zA(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function RZ(t,e){let a={};return[t,e].forEach((r,n)=>{let i=n===1,o=i?"--mobile-offset":"--offset",s=i?SZ:vZ;function l(u){["top","right","bottom","left"].forEach(c=>{a[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?a[`${o}-${u}`]=s:a[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(s)}),a}var XA=X.default.forwardRef(function(e,a){let{id:r,invert:n,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:l,className:u,offset:c,mobileOffset:f,theme:d="light",richColors:h,duration:p,style:m,visibleToasts:x=bZ,toastOptions:g,dir:O=zA(),gap:y=CZ,icons:b,customAriaLabel:v,containerAriaLabel:S="Notifications"}=e,[w,k]=X.default.useState([]),T=X.default.useMemo(()=>r?w.filter(N=>N.toasterId===r):w.filter(N=>!N.toasterId),[w,r]),Q=X.default.useMemo(()=>Array.from(new Set([i].concat(T.filter(N=>N.position).map(N=>N.position)))),[T,i]),[$,A]=X.default.useState([]),[R,D]=X.default.useState(!1),[Y,B]=X.default.useState(!1),[q,re]=X.default.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ie=X.default.useRef(null),z=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),Pe=X.default.useRef(null),P=X.default.useRef(!1),H=X.default.useCallback(N=>{k(M=>{var j;return(j=M.find(de=>de.id===N.id))!=null&&j.delete||Ka.dismiss(N.id),M.filter(({id:de})=>de!==N.id)})},[]);return X.default.useEffect(()=>Ka.subscribe(N=>{if(N.dismiss){requestAnimationFrame(()=>{k(M=>M.map(j=>j.id===N.id?{...j,delete:!0}:j))});return}setTimeout(()=>{NA.default.flushSync(()=>{k(M=>{let j=M.findIndex(de=>de.id===N.id);return j!==-1?[...M.slice(0,j),{...M[j],...N},...M.slice(j+1)]:[N,...M]})})})}),[]),X.default.useEffect(()=>{if(d!=="system"){re(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?re("dark"):re("light")),typeof window>"u")return;let N=window.matchMedia("(prefers-color-scheme: dark)");try{N.addEventListener("change",({matches:M})=>{re(M?"dark":"light")})}catch{N.addListener(({matches:j})=>{try{re(j?"dark":"light")}catch(de){console.error(de)}})}},[d]),X.default.useEffect(()=>{w.length<=1&&D(!1)},[w]),X.default.useEffect(()=>{let N=M=>{var j;if(o.length>0&&o.every(Z=>M[Z]||M.code===Z)){var ee;D(!0),(ee=ie.current)==null||ee.focus()}M.code==="Escape"&&(document.activeElement===ie.current||(j=ie.current)!=null&&j.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[o]),X.default.useEffect(()=>{if(ie.current)return()=>{Pe.current&&(Pe.current.focus({preventScroll:!0}),Pe.current=null,P.current=!1)}},[ie.current]),X.default.createElement("section",{ref:a,"aria-label":v??`${S} ${z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},Q.map((N,M)=>{var j;let[de,ee]=N.split("-");return T.length?X.default.createElement("ol",{key:N,dir:O==="auto"?zA():O,tabIndex:-1,ref:ie,className:u,"data-sonner-toaster":!0,"data-sonner-theme":q,"data-y-position":de,"data-x-position":ee,style:{"--front-toast-height":`${((j=$[0])==null?void 0:j.height)||0}px`,"--width":`${wZ}px`,"--gap":`${y}px`,...m,...RZ(c,f)},onBlur:Z=>{P.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(P.current=!1,Pe.current&&(Pe.current.focus({preventScroll:!0}),Pe.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||P.current||(P.current=!0,Pe.current=Z.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{Y||D(!1)},onDragEnd:()=>D(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},T.filter(Z=>!Z.position&&M===0||Z.position===N).map((Z,qe)=>{var Re,Ie;return X.default.createElement(PZ,{key:Z.id,icons:b,index:qe,toast:Z,defaultRichColors:h,duration:(Re=g?.duration)!=null?Re:p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:n,visibleToasts:x,closeButton:(Ie=g?.closeButton)!=null?Ie:l,interacting:Y,position:N,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:H,toasts:T.filter(Ze=>Ze.position==Z.position),heights:$.filter(Ze=>Ze.position==Z.position),setHeights:A,expandByDefault:s,gap:y,expanded:R,swipeDirections:e.swipeDirections})})):null}))});var Oie=L(F(),1);function qA(t){var e,a,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(a=qA(t[e]))&&(r&&(r+=" "),r+=a)}else for(a in t)t[a]&&(r&&(r+=" "),r+=a);return r}function Gm(){for(var t,e,a=0,r="",n=arguments.length;a<n;a++)(t=arguments[a])&&(e=qA(t))&&(r&&(r+=" "),r+=e);return r}var ZA=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,VA=Gm,si=(t,e)=>a=>{var r;if(e?.variants==null)return VA(t,a?.class,a?.className);let{variants:n,defaultVariants:i}=e,o=Object.keys(n).map(u=>{let c=a?.[u],f=i?.[u];if(c===null)return null;let d=ZA(c)||ZA(f);return n[u][d]}),s=a&&Object.entries(a).reduce((u,c)=>{let[f,d]=c;return d===void 0||(u[f]=d),u},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:d,...h}=c;return Object.entries(h).every(p=>{let[m,x]=p;return Array.isArray(x)?x.includes({...i,...s}[m]):{...i,...s}[m]===x})?[...u,f,d]:u},[]);return VA(t,o,l,a?.class,a?.className)};var IZ=(t,e)=>{let a=new Array(t.length+e.length);for(let r=0;r<t.length;r++)a[r]=t[r];for(let r=0;r<e.length;r++)a[t.length+r]=e[r];return a},AZ=(t,e)=>({classGroupId:t,validator:e}),YA=(t=new Map,e=null,a)=>({nextPart:t,validators:e,classGroupId:a});var UA=[],QZ="arbitrary..",MZ=t=>{let e=DZ(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return EZ(o);let s=o.split("-"),l=s[0]===""&&s.length>1?1:0;return WA(s,l,e)},getConflictingClassGroupIds:(o,s)=>{if(s){let l=r[o],u=a[o];return l?u?IZ(u,l):l:u||UA}return a[o]||UA}}},WA=(t,e,a)=>{if(t.length-e===0)return a.classGroupId;let n=t[e],i=a.nextPart.get(n);if(i){let u=WA(t,e+1,i);if(u)return u}let o=a.validators;if(o===null)return;let s=e===0?t.join("-"):t.slice(e).join("-"),l=o.length;for(let u=0;u<l;u++){let c=o[u];if(c.validator(s))return c.classGroupId}},EZ=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let e=t.slice(1,-1),a=e.indexOf(":"),r=e.slice(0,a);return r?QZ+r:void 0})(),DZ=t=>{let{theme:e,classGroups:a}=t;return $Z(a,e)},$Z=(t,e)=>{let a=YA();for(let r in t){let n=t[r];Xb(n,a,r,e)}return a},Xb=(t,e,a,r)=>{let n=t.length;for(let i=0;i<n;i++){let o=t[i];BZ(o,e,a,r)}},BZ=(t,e,a,r)=>{if(typeof t=="string"){_Z(t,e,a);return}if(typeof t=="function"){zZ(t,e,a,r);return}NZ(t,e,a,r)},_Z=(t,e,a)=>{let r=t===""?e:KA(e,t);r.classGroupId=a},zZ=(t,e,a,r)=>{if(XZ(t)){Xb(t(r),e,a,r);return}e.validators===null&&(e.validators=[]),e.validators.push(AZ(a,t))},NZ=(t,e,a,r)=>{let n=Object.entries(t),i=n.length;for(let o=0;o<i;o++){let[s,l]=n[o];Xb(l,KA(e,s),a,r)}},KA=(t,e)=>{let a=t,r=e.split("-"),n=r.length;for(let i=0;i<n;i++){let o=r[i],s=a.nextPart.get(o);s||(s=YA(),a.nextPart.set(o,s)),a=s}return a},XZ=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,qZ=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,a=Object.create(null),r=Object.create(null),n=(i,o)=>{a[i]=o,e++,e>t&&(e=0,r=a,a=Object.create(null))};return{get(i){let o=a[i];if(o!==void 0)return o;if((o=r[i])!==void 0)return n(i,o),o},set(i,o){i in a?a[i]=o:n(i,o)}}};var ZZ=[],jA=(t,e,a,r,n)=>({modifiers:t,hasImportantModifier:e,baseClassName:a,maybePostfixModifierPosition:r,isExternal:n}),VZ=t=>{let{prefix:e,experimentalParseClassName:a}=t,r=n=>{let i=[],o=0,s=0,l=0,u,c=n.length;for(let m=0;m<c;m++){let x=n[m];if(o===0&&s===0){if(x===":"){i.push(n.slice(l,m)),l=m+1;continue}if(x==="/"){u=m;continue}}x==="["?o++:x==="]"?o--:x==="("?s++:x===")"&&s--}let f=i.length===0?n:n.slice(l),d=f,h=!1;f.endsWith("!")?(d=f.slice(0,-1),h=!0):f.startsWith("!")&&(d=f.slice(1),h=!0);let p=u&&u>l?u-l:void 0;return jA(i,h,d,p)};if(e){let n=e+":",i=r;r=o=>o.startsWith(n)?i(o.slice(n.length)):jA(ZZ,!1,o,void 0,!0)}if(a){let n=r;r=i=>a({className:i,parseClassName:n})}return r},UZ=t=>{let e=new Map;return t.orderSensitiveModifiers.forEach((a,r)=>{e.set(a,1e6+r)}),a=>{let r=[],n=[];for(let i=0;i<a.length;i++){let o=a[i],s=o[0]==="[",l=e.has(o);s||l?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(o)):n.push(o)}return n.length>0&&(n.sort(),r.push(...n)),r}},jZ=t=>({cache:qZ(t.cacheSize),parseClassName:VZ(t),sortModifiers:UZ(t),postfixLookupClassGroupIds:FZ(t),...MZ(t)}),FZ=t=>{let e=Object.create(null),a=t.postfixLookupClassGroups;if(a)for(let r=0;r<a.length;r++)e[a[r]]=!0;return e},HZ=/\s+/,GZ=(t,e)=>{let{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:i,postfixLookupClassGroupIds:o}=e,s=[],l=t.trim().split(HZ),u="";for(let c=l.length-1;c>=0;c-=1){let f=l[c],{isExternal:d,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:x}=a(f);if(d){u=f+(u.length>0?" "+u:u);continue}let g=!!x,O;if(g){let w=m.substring(0,x);O=r(w);let k=O&&o[O]?r(m):void 0;k&&k!==O&&(O=k,g=!1)}else O=r(m);if(!O){if(!g){u=f+(u.length>0?" "+u:u);continue}if(O=r(m),!O){u=f+(u.length>0?" "+u:u);continue}g=!1}let y=h.length===0?"":h.length===1?h[0]:i(h).join(":"),b=p?y+"!":y,v=b+O;if(s.indexOf(v)>-1)continue;s.push(v);let S=n(O,g);for(let w=0;w<S.length;++w){let k=S[w];s.push(b+k)}u=f+(u.length>0?" "+u:u)}return u},YZ=(...t)=>{let e=0,a,r,n="";for(;e<t.length;)(a=t[e++])&&(r=JA(a))&&(n&&(n+=" "),n+=r);return n},JA=t=>{if(typeof t=="string")return t;let e,a="";for(let r=0;r<t.length;r++)t[r]&&(e=JA(t[r]))&&(a&&(a+=" "),a+=e);return a},WZ=(t,...e)=>{let a,r,n,i,o=l=>{let u=e.reduce((c,f)=>f(c),t());return a=jZ(u),r=a.cache.get,n=a.cache.set,i=s,s(l)},s=l=>{let u=r(l);if(u)return u;let c=GZ(l,a);return n(l,c),c};return i=o,(...l)=>i(YZ(...l))},KZ=[],qt=t=>{let e=a=>a[t]||KZ;return e.isThemeGetter=!0,e.themeKey=t,e},eQ=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,tQ=/^\((?:(\w[\w-]*):)?(.+)\)$/i,JZ=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,e4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t4=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,a4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,r4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,n4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ko=t=>JZ.test(t),ve=t=>!!t&&!Number.isNaN(Number(t)),li=t=>!!t&&Number.isInteger(Number(t)),Nb=t=>t.endsWith("%")&&ve(t.slice(0,-1)),qi=t=>e4.test(t),aQ=()=>!0,i4=t=>t4.test(t)&&!a4.test(t),qb=()=>!1,o4=t=>r4.test(t),s4=t=>n4.test(t),l4=t=>!te(t)&&!ae(t),u4=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),c4=t=>Jo(t,iQ,qb),te=t=>eQ.test(t),ul=t=>Jo(t,oQ,i4),FA=t=>Jo(t,x4,ve),f4=t=>Jo(t,lQ,aQ),d4=t=>Jo(t,sQ,qb),HA=t=>Jo(t,rQ,qb),h4=t=>Jo(t,nQ,s4),Ym=t=>Jo(t,uQ,o4),ae=t=>tQ.test(t),Ld=t=>cl(t,oQ),p4=t=>cl(t,sQ),GA=t=>cl(t,rQ),m4=t=>cl(t,iQ),g4=t=>cl(t,nQ),Wm=t=>cl(t,uQ,!0),O4=t=>cl(t,lQ,!0),Jo=(t,e,a)=>{let r=eQ.exec(t);return r?r[1]?e(r[1]):a(r[2]):!1},cl=(t,e,a=!1)=>{let r=tQ.exec(t);return r?r[1]?e(r[1]):a:!1},rQ=t=>t==="position"||t==="percentage",nQ=t=>t==="image"||t==="url",iQ=t=>t==="length"||t==="size"||t==="bg-size",oQ=t=>t==="length",x4=t=>t==="number",sQ=t=>t==="family-name",lQ=t=>t==="number"||t==="weight",uQ=t=>t==="shadow";var y4=()=>{let t=qt("color"),e=qt("font"),a=qt("text"),r=qt("font-weight"),n=qt("tracking"),i=qt("leading"),o=qt("breakpoint"),s=qt("container"),l=qt("spacing"),u=qt("radius"),c=qt("shadow"),f=qt("inset-shadow"),d=qt("text-shadow"),h=qt("drop-shadow"),p=qt("blur"),m=qt("perspective"),x=qt("aspect"),g=qt("ease"),O=qt("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...b(),ae,te],S=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],k=()=>[ae,te,l],T=()=>[Ko,"full","auto",...k()],Q=()=>[li,"none","subgrid",ae,te],$=()=>["auto",{span:["full",li,ae,te]},li,ae,te],A=()=>[li,"auto",ae,te],R=()=>["auto","min","max","fr",ae,te],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...k()],q=()=>[Ko,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],re=()=>[s,Ko,"screen","full","dvw","lvw","svw","min","max","fit",...k()],ie=()=>[Ko,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],z=()=>[t,ae,te],Pe=()=>[...b(),GA,HA,{position:[ae,te]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",m4,c4,{size:[ae,te]}],N=()=>[Nb,Ld,ul],M=()=>["","none","full",u,ae,te],j=()=>["",ve,Ld,ul],de=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[ve,Nb,GA,HA],qe=()=>["","none",p,ae,te],Re=()=>["none",ve,ae,te],Ie=()=>["none",ve,ae,te],Ze=()=>[ve,ae,te],Vt=()=>[Ko,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qi],breakpoint:[qi],color:[aQ],container:[qi],"drop-shadow":[qi],ease:["in","out","in-out"],font:[l4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qi],shadow:[qi],spacing:["px",ve],text:[qi],"text-shadow":[qi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ko,te,ae,x]}],container:["container"],"container-type":[{"@container":["","normal","size",ae,te]}],"container-named":[u4],columns:[{columns:[ve,"auto",te,ae,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[li,"auto",ae,te]}],basis:[{basis:[Ko,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ve,Ko,"auto","initial","none",te]}],grow:[{grow:["",ve,ae,te]}],shrink:[{shrink:["",ve,ae,te]}],order:[{order:[li,"first","last","none",ae,te]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...re()]}],"min-inline-size":[{"min-inline":["auto",...re()]}],"max-inline-size":[{"max-inline":["none",...re()]}],"block-size":[{block:["auto",...ie()]}],"min-block-size":[{"min-block":["auto",...ie()]}],"max-block-size":[{"max-block":["none",...ie()]}],w:[{w:[s,"screen",...q()]}],"min-w":[{"min-w":[s,"screen","none",...q()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh","none",...q()]}],"font-size":[{text:["base",a,Ld,ul]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,O4,f4]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nb,te]}],"font-family":[{font:[p4,d4,e]}],"font-features":[{"font-features":[te]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,ae,te]}],"line-clamp":[{"line-clamp":[ve,"none",ae,FA]}],leading:[{leading:["none",i,...k()]}],"list-image":[{"list-image":["none",ae,te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[ve,"from-font","auto",ae,ul]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[ve,"auto",ae,te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"tab-size":[{tab:[li,ae,te]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Pe()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},li,ae,te],radial:["",ae,te],conic:["",li,ae,te]},g4,h4]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:j()}],"border-w-x":[{"border-x":j()}],"border-w-y":[{"border-y":j()}],"border-w-s":[{"border-s":j()}],"border-w-e":[{"border-e":j()}],"border-w-bs":[{"border-bs":j()}],"border-w-be":[{"border-be":j()}],"border-w-t":[{"border-t":j()}],"border-w-r":[{"border-r":j()}],"border-w-b":[{"border-b":j()}],"border-w-l":[{"border-l":j()}],"divide-x":[{"divide-x":j()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":j()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ve,ae,te]}],"outline-w":[{outline:["",ve,Ld,ul]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","inner","none",c,Wm,Ym]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",f,Wm,Ym]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[ve,ul]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":j()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",d,Wm,Ym]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[ve,ae,te]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ae,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Pe()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,te]}],filter:[{filter:["","none",ae,te]}],blur:[{blur:qe()}],brightness:[{brightness:[ve,ae,te]}],contrast:[{contrast:[ve,ae,te]}],"drop-shadow":[{"drop-shadow":["","none",h,Wm,Ym]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",ve,ae,te]}],"hue-rotate":[{"hue-rotate":[ve,ae,te]}],invert:[{invert:["",ve,ae,te]}],saturate:[{saturate:[ve,ae,te]}],sepia:[{sepia:["",ve,ae,te]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,te]}],"backdrop-blur":[{"backdrop-blur":qe()}],"backdrop-brightness":[{"backdrop-brightness":[ve,ae,te]}],"backdrop-contrast":[{"backdrop-contrast":[ve,ae,te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ve,ae,te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ve,ae,te]}],"backdrop-invert":[{"backdrop-invert":["",ve,ae,te]}],"backdrop-opacity":[{"backdrop-opacity":[ve,ae,te]}],"backdrop-saturate":[{"backdrop-saturate":[ve,ae,te]}],"backdrop-sepia":[{"backdrop-sepia":["",ve,ae,te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ve,"initial",ae,te]}],ease:[{ease:["linear","initial",g,ae,te]}],delay:[{delay:[ve,ae,te]}],animate:[{animate:["none",O,ae,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ae,te]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:Ie()}],"scale-x":[{"scale-x":Ie()}],"scale-y":[{"scale-y":Ie()}],"scale-z":[{"scale-z":Ie()}],"scale-3d":["scale-3d"],skew:[{skew:Ze()}],"skew-x":[{"skew-x":Ze()}],"skew-y":[{"skew-y":Ze()}],transform:[{transform:[ae,te,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Vt()}],"translate-x":[{"translate-x":Vt()}],"translate-y":[{"translate-y":Vt()}],"translate-z":[{"translate-z":Vt()}],"translate-none":["translate-none"],zoom:[{zoom:[li,ae,te]}],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":z()}],"scrollbar-track-color":[{"scrollbar-track":z()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,te]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[ve,Ld,ul,FA]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var cQ=WZ(y4);function pe(...t){return cQ(Gm(t))}var ui="sticky -bottom-[18px] -mx-5 -mb-[18px] mt-[18px] flex items-center gap-2 border-t border-[#f0f0f0] bg-background px-[18px] py-[13px]";var A4=L(F(),1);var OQ=L(F(),1),xQ=L(Es(),1);var yc={};cu(yc,{Root:()=>S4,Slot:()=>S4,Slottable:()=>w4,createSlot:()=>Ia,createSlottable:()=>jb});var ua=L(F(),1);var fQ=L(F(),1),b4=Object.defineProperty,Vb=(t,e)=>b4(t,"name",{value:e,configurable:!0});function Zb(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Vb(Zb,"setRef");function es(...t){return e=>{let a=!1,r=t.map(n=>{let i=Zb(n,e);return!a&&typeof i=="function"&&(a=!0),i});if(a)return()=>{for(let n=0;n<r.length;n++){let i=r[n];typeof i=="function"?i():Zb(t[n],null)}}}}Vb(es,"composeRefs");function Qe(...t){return fQ.useCallback(es(...t),t)}Vb(Qe,"useComposedRefs");var v4=Object.defineProperty,pn=(t,e)=>v4(t,"name",{value:e,configurable:!0});function Ia(t){let e=ua.forwardRef((a,r)=>{let{children:n,...i}=a,o=null,s=!1,l=[];Ub(n)&&typeof Km=="function"&&(n=Km(n._payload)),ua.Children.forEach(n,d=>{if(mQ(d)){s=!0;let h=d,p="child"in h.props?h.props.child:h.props.children;Ub(p)&&typeof Km=="function"&&(p=Km(p._payload)),o=C4(h,p),l.push(o?.props?.children)}else l.push(d)}),o?o=ua.cloneElement(o,void 0,l):!s&&ua.Children.count(n)===1&&ua.isValidElement(n)&&(o=n);let u=o?pQ(o):void 0,c=Qe(r,u);if(!o){if(n||n===0)throw new Error(s?T4(t):L4(t));return n}let f=hQ(i,o.props??{});return o.type!==ua.Fragment&&(f.ref=r?c:u),ua.cloneElement(o,f)});return e.displayName=`${t}.Slot`,e}pn(Ia,"createSlot");var S4=Ia("Slot"),dQ=Symbol.for("radix.slottable");function jb(t){let e=pn(a=>"child"in a?a.children(a.child):a.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=dQ,e}pn(jb,"createSlottable");var w4=jb("Slottable"),C4=pn((t,e)=>{if("child"in t.props){let a=t.props.child;return ua.isValidElement(a)?ua.cloneElement(a,void 0,t.props.children(a.props.children)):null}return ua.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function hQ(t,e){let a={...e};for(let r in e){let n=t[r],i=e[r];/^on[A-Z]/.test(r)?n&&i?a[r]=(...s)=>{let l=i(...s);return n(...s),l}:n&&(a[r]=n):r==="style"?a[r]={...n,...i}:r==="className"&&(a[r]=[n,i].filter(Boolean).join(" "))}return{...t,...a}}pn(hQ,"mergeProps");function pQ(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=e&&"isReactWarning"in e&&e.isReactWarning;return a?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=e&&"isReactWarning"in e&&e.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}pn(pQ,"getElementRef");function mQ(t){return ua.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===dQ}pn(mQ,"isSlottable");var k4=Symbol.for("react.lazy");function Ub(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===k4&&"_payload"in t&&gQ(t._payload)}pn(Ub,"isLazyComponent");function gQ(t){return typeof t=="object"&&t!==null&&"then"in t}pn(gQ,"isPromiseLike");var L4=pn(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),T4=pn(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Km=ua[" use ".trim().toString()];var yQ=L(G(),1),P4=Object.defineProperty,R4=(t,e)=>P4(t,"name",{value:e,configurable:!0}),I4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=I4.reduce((t,e)=>{let a=Ia(`Primitive.${e}`),r=OQ.forwardRef((n,i)=>{let{asChild:o,...s}=n,l=o?a:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,yQ.jsx)(l,{...s,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Fb(t,e){t&&xQ.flushSync(()=>t.dispatchEvent(e))}R4(Fb,"dispatchDiscreteCustomEvent");var Q4=L(G(),1);var bQ=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});var qr=L(F(),1),Hb=L(G(),1),M4=Object.defineProperty,Xr=(t,e)=>M4(t,"name",{value:e,configurable:!0});function E4(t,e){let a=qr.createContext(e);a.displayName=t+"Context";let r=Xr(i=>{let{children:o,...s}=i,l=qr.useMemo(()=>s,Object.values(s));return(0,Hb.jsx)(a.Provider,{value:l,children:o})},"Provider");r.displayName=t+"Provider";function n(i,o={}){let{optional:s=!1}=o,l=qr.useContext(a);if(l)return l;if(e!==void 0)return e;if(!s)throw new Error(`\`${i}\` must be used within \`${t}\``)}return Xr(n,"useContext"),[r,n]}Xr(E4,"createContext");function ca(t,e=[]){let a=[];function r(i,o){let s=qr.createContext(o);s.displayName=i+"Context";let l=a.length;a=[...a,o];let u=Xr(f=>{let{scope:d,children:h,...p}=f,m=d?.[t]?.[l]||s,x=qr.useMemo(()=>p,Object.values(p));return(0,Hb.jsx)(m.Provider,{value:x,children:h})},"Provider");u.displayName=i+"Provider";function c(f,d,h={}){let{optional:p=!1}=h,m=d?.[t]?.[l]||s,x=qr.useContext(m);if(x)return x;if(o!==void 0)return o;if(!p)throw new Error(`\`${f}\` must be used within \`${i}\``)}return Xr(c,"useContext"),[u,c]}Xr(r,"createContext");let n=Xr(()=>{let i=a.map(o=>qr.createContext(o));return Xr(function(s){let l=s?.[t]||i;return qr.useMemo(()=>({[`__scope${t}`]:{...s,[t]:l}}),[s,l])},"useScope")},"createScope");return n.scopeName=t,[r,vQ(n,...e)]}Xr(ca,"createContextScope");function vQ(...t){let e=t[0];if(t.length===1)return e;let a=Xr(()=>{let r=t.map(n=>({useScope:n(),scopeName:n.scopeName}));return Xr(function(i){let o=r.reduce((s,{useScope:l,scopeName:u})=>{let f=l(i)[`__scope${u}`];return{...s,...f}},{});return qr.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])},"useComposedScopes")},"createScope");return a.scopeName=e.scopeName,a}Xr(vQ,"composeContextScopes");var mn=L(F(),1);var Jm=L(G(),1),Ja=L(F(),1);var fl=L(G(),1),D4=Object.defineProperty,Yt=(t,e)=>D4(t,"name",{value:e,configurable:!0});function Td(t){let e=t+"CollectionProvider",[a,r]=ca(e),[n,i]=a(e,{collectionRef:{current:null},itemMap:new Map}),o=Yt(m=>{let{scope:x,children:g}=m,O=mn.useRef(null),y=mn.useRef(new Map).current;return(0,Jm.jsx)(n,{scope:x,itemMap:y,collectionRef:O,children:g})},"CollectionProvider");o.displayName=e;let s=t+"CollectionSlot",l=Ia(s),u=mn.forwardRef((m,x)=>{let{scope:g,children:O}=m,y=i(s,g),b=Qe(x,y.collectionRef);return(0,Jm.jsx)(l,{ref:b,children:O})});u.displayName=s;let c=t+"CollectionItemSlot",f="data-radix-collection-item",d=Ia(c),h=mn.forwardRef((m,x)=>{let{scope:g,children:O,...y}=m,b=mn.useRef(null),v=Qe(x,b),S=i(c,g);return mn.useEffect(()=>(S.itemMap.set(b,{ref:b,...y}),()=>{S.itemMap.delete(b)})),(0,Jm.jsx)(d,{[f]:"",ref:v,children:O})});h.displayName=c;function p(m){let x=i(t+"CollectionConsumer",m);return mn.useCallback(()=>{let O=x.collectionRef.current;if(!O)return[];let y=Array.from(O.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((S,w)=>y.indexOf(S.ref.current)-y.indexOf(w.ref.current))},[x.collectionRef,x.itemMap])}return Yt(p,"useCollection"),[{Provider:o,Slot:u,ItemSlot:h},p,r]}Yt(Td,"createCollection");var SQ=new WeakMap,Gb=class ts extends Map{static{Yt(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],SQ.set(this,!0)}set(e,a){return SQ.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,a),this}insert(e,a,r){let n=this.has(a),i=this.#e.length,o=Wb(e),s=o>=0?o:i+o,l=s<0||s>=i?-1:s;if(l===this.size||n&&l===this.size-1||l===-1)return this.set(a,r),this;let u=this.size+(n?0:1);o<0&&s++;let c=[...this.#e],f,d=!1;for(let h=s;h<u;h++)if(s===h){let p=c[h];c[h]===a&&(p=c[h+1]),n&&this.delete(a),f=this.get(p),this.set(a,r)}else{!d&&c[h-1]===a&&(d=!0);let p=c[d?h:h-1],m=f;f=this.get(p),this.delete(p),this.set(p,m)}return this}with(e,a,r){let n=new ts(this);return n.insert(e,a,r),n}before(e){let a=this.#e.indexOf(e)-1;if(!(a<0))return this.entryAt(a)}setBefore(e,a,r){let n=this.#e.indexOf(e);return n===-1?this:this.insert(n,a,r)}after(e){let a=this.#e.indexOf(e);if(a=a===-1||a===this.size-1?-1:a+1,a!==-1)return this.entryAt(a)}setAfter(e,a,r){let n=this.#e.indexOf(e);return n===-1?this:this.insert(n+1,a,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let a=super.delete(e);return a&&this.#e.splice(this.#e.indexOf(e),1),a}deleteAt(e){let a=this.keyAt(e);return a!==void 0?this.delete(a):!1}at(e){let a=eg(this.#e,e);if(a!==void 0)return this.get(a)}entryAt(e){let a=eg(this.#e,e);if(a!==void 0)return[a,this.get(a)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return eg(this.#e,e)}from(e,a){let r=this.indexOf(e);if(r===-1)return;let n=r+a;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,a){let r=this.indexOf(e);if(r===-1)return;let n=r+a;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,a){let r=0;for(let n of this){if(Reflect.apply(e,a,[n,r,this]))return n;r++}}findIndex(e,a){let r=0;for(let n of this){if(Reflect.apply(e,a,[n,r,this]))return r;r++}return-1}filter(e,a){let r=[],n=0;for(let i of this)Reflect.apply(e,a,[i,n,this])&&r.push(i),n++;return new ts(r)}map(e,a){let r=[],n=0;for(let i of this)r.push([i[0],Reflect.apply(e,a,[i,n,this])]),n++;return new ts(r)}reduce(...e){let[a,r]=e,n=0,i=r??this.at(0);for(let o of this)n===0&&e.length===1?i=o:i=Reflect.apply(a,this,[i,o,n,this]),n++;return i}reduceRight(...e){let[a,r]=e,n=r??this.at(-1);for(let i=this.size-1;i>=0;i--){let o=this.at(i);i===this.size-1&&e.length===1?n=o:n=Reflect.apply(a,this,[n,o,i,this])}return n}toSorted(e){let a=[...this.entries()].sort(e);return new ts(a)}toReversed(){let e=new ts;for(let a=this.size-1;a>=0;a--){let r=this.keyAt(a),n=this.get(r);e.set(r,n)}return e}toSpliced(...e){let a=[...this.entries()];return a.splice(...e),new ts(a)}slice(e,a){let r=new ts,n=this.size-1;if(e===void 0)return r;e<0&&(e=e+this.size),a!==void 0&&a>0&&(n=a-1);for(let i=e;i<=n;i++){let o=this.keyAt(i),s=this.get(o);r.set(o,s)}return r}every(e,a){let r=0;for(let n of this){if(!Reflect.apply(e,a,[n,r,this]))return!1;r++}return!0}some(e,a){let r=0;for(let n of this){if(Reflect.apply(e,a,[n,r,this]))return!0;r++}return!1}};function eg(t,e){if("at"in Array.prototype)return Array.prototype.at.call(t,e);let a=wQ(t,e);return a===-1?void 0:t[a]}Yt(eg,"at");function wQ(t,e){let a=t.length,r=Wb(e),n=r>=0?r:a+r;return n<0||n>=a?-1:n}Yt(wQ,"toSafeIndex");function Wb(t){return t!==t||t===0?0:Math.trunc(t)}Yt(Wb,"toSafeInteger");function $4(t){let e=t+"CollectionProvider",[a,r]=ca(e),[n,i]=a(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Gb,setItemMap:Yt(()=>{},"setItemMap")}),o=Yt(({state:y,...b})=>y?(0,fl.jsx)(l,{...b,state:y}):(0,fl.jsx)(s,{...b}),"CollectionProvider");o.displayName=e;let s=Yt(y=>{let b=x();return(0,fl.jsx)(l,{...y,state:b})},"CollectionInit");s.displayName=e+"Init";let l=Yt(y=>{let{scope:b,children:v,state:S}=y,w=Ja.useRef(null),[k,T]=Ja.useState(null),Q=Qe(w,T),[$,A]=S;return Ja.useEffect(()=>{if(!k)return;let R=LQ(()=>{});return R.observe(k,{childList:!0,subtree:!0}),()=>{R.disconnect()}},[k]),(0,fl.jsx)(n,{scope:b,itemMap:$,setItemMap:A,collectionRef:Q,collectionRefObject:w,collectionElement:k,children:v})},"CollectionProviderImpl");l.displayName=e+"Impl";let u=t+"CollectionSlot",c=Ia(u),f=Ja.forwardRef((y,b)=>{let{scope:v,children:S}=y,w=i(u,v),k=Qe(b,w.collectionRef);return(0,fl.jsx)(c,{ref:k,children:S})});f.displayName=u;let d=t+"CollectionItemSlot",h="data-radix-collection-item",p=Ia(d),m=Ja.forwardRef((y,b)=>{let{scope:v,children:S,...w}=y,k=Ja.useRef(null),[T,Q]=Ja.useState(null),$=Qe(b,k,Q),A=i(d,v),{setItemMap:R}=A,D=Ja.useRef(w);CQ(D.current,w)||(D.current=w);let Y=D.current;return Ja.useEffect(()=>{let B=Y;return R(q=>T?q.has(T)?q.set(T,{...B,element:T}).toSorted(Yb):(q.set(T,{...B,element:T}),q.toSorted(Yb)):q),()=>{R(q=>!T||!q.has(T)?q:(q.delete(T),new Gb(q)))}},[T,Y,R]),(0,fl.jsx)(p,{[h]:"",ref:$,children:S})});m.displayName=d;function x(){return Ja.useState(new Gb)}Yt(x,"useInitCollection");function g(y){let{itemMap:b}=i(t+"CollectionConsumer",y);return b}return Yt(g,"useCollection"),[{Provider:o,Slot:f,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:x}]}Yt($4,"createCollection");function CQ(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;let a=Object.keys(t),r=Object.keys(e);if(a.length!==r.length)return!1;for(let n of a)if(!Object.prototype.hasOwnProperty.call(e,n)||t[n]!==e[n])return!1;return!0}Yt(CQ,"shallowEqual");function kQ(t,e){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}Yt(kQ,"isElementPreceding");function Yb(t,e){return!t[1].element||!e[1].element?0:kQ(t[1].element,e[1].element)?-1:1}Yt(Yb,"sortByDocumentPosition");function LQ(t){return new MutationObserver(a=>{for(let r of a)if(r.type==="childList"){t();return}})}Yt(LQ,"getChildListObserver");var B4=Object.defineProperty,bc=(t,e)=>B4(t,"name",{value:e,configurable:!0}),TQ=!!(typeof window<"u"&&window.document&&window.document.createElement);function xe(t,e,{checkForDefaultPrevented:a=!0}={}){return bc(function(n){if(t?.(n),a===!1||!n||!n.defaultPrevented)return e?.(n)},"handleEvent")}bc(xe,"composeEventHandlers");function _4(t){if(!TQ)throw new Error("Cannot access window outside of the DOM");return t?.ownerDocument?.defaultView??window}bc(_4,"getOwnerWindow");function Kb(t){if(!TQ)throw new Error("Cannot access document outside of the DOM");return t?.ownerDocument??document}bc(Kb,"getOwnerDocument");function PQ(t,e=!1){let{activeElement:a}=Kb(t);if(!a?.nodeName)return null;if(RQ(a)&&a.contentDocument)return PQ(a.contentDocument.body,e);if(e){let r=a.getAttribute("aria-activedescendant");if(r){let n=Kb(a).getElementById(r);if(n)return n}}return a}bc(PQ,"getActiveElement");function RQ(t){return t.tagName==="IFRAME"}bc(RQ,"isFrame");var Zr=L(F(),1);var tg=!1;var IQ=L(F(),1),Xe=globalThis?.document?IQ.useLayoutEffect:()=>{};var gn=L(F(),1);var vc=L(F(),1),z4=Object.defineProperty,N4=(t,e)=>z4(t,"name",{value:e,configurable:!0}),AQ=vc[" useEffectEvent ".trim().toString()],QQ=vc[" useInsertionEffect ".trim().toString()];function Jb(t){if(typeof AQ=="function")return AQ(t);let e=vc.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof QQ=="function"?QQ(()=>{e.current=t}):Xe(()=>{e.current=t}),vc.useMemo(()=>((...a)=>e.current?.(...a)),[])}N4(Jb,"useEffectEvent");var X4=Object.defineProperty,Pd=(t,e)=>X4(t,"name",{value:e,configurable:!0}),q4=Zr[" useInsertionEffect ".trim().toString()]||Xe;function Aa({prop:t,defaultProp:e,onChange:a=Pd(()=>{},"onChange"),caller:r}){let[n,i,o]=EQ({defaultProp:e,onChange:a}),s=t!==void 0,l=s?t:n;if(tg){let c=Zr.useRef(t!==void 0);Zr.useEffect(()=>{let f=c.current;f!==s&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,r])}let u=Zr.useCallback(c=>{if(s){let f=DQ(c)?c(t):c;f!==t&&o.current?.(f)}else i(c)},[s,t,i,o]);return[l,u]}Pd(Aa,"useControllableState");function EQ({defaultProp:t,onChange:e}){let[a,r]=Zr.useState(t),n=Zr.useRef(a),i=Zr.useRef(e);return q4(()=>{i.current=e},[e]),Zr.useEffect(()=>{n.current!==a&&(i.current?.(a),n.current=a)},[a,n]),[a,r,i]}Pd(EQ,"useUncontrolledState");function DQ(t){return typeof t=="function"}Pd(DQ,"isFunction");var MQ=Symbol("RADIX:SYNC_STATE");function Z4(t,e,a,r){let{prop:n,defaultProp:i,onChange:o,caller:s}=e,l=n!==void 0,u=Jb(o);if(tg){let x=gn.useRef(n!==void 0);gn.useEffect(()=>{let g=x.current;g!==l&&console.warn(`${s} is changing from ${g?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=l},[l,s])}let c=[{...a,state:i}];r&&c.push(r);let[f,d]=gn.useReducer((x,g)=>{if(g.type===MQ)return{...x,state:g.state};let O=t(x,g);return l&&!Object.is(O.state,x.state)&&u(O.state),O},...c),h=f.state,p=gn.useRef(h);gn.useEffect(()=>{p.current!==h&&(p.current=h,l||u(h))},[h,p,l]);let m=gn.useMemo(()=>n!==void 0?{...f,state:n}:f,[f,n]);return gn.useEffect(()=>{l&&!Object.is(n,f.state)&&d({type:MQ,state:n})},[n,f.state,l]),[m,d]}Pd(Z4,"useControllableStateReducer");var fa=L(F(),1);var $Q=L(F(),1),V4=Object.defineProperty,Zi=(t,e)=>V4(t,"name",{value:e,configurable:!0});function BQ(t,e){return $Q.useReducer((a,r)=>e[a][r]??a,t)}Zi(BQ,"useStateMachine");var as=Zi(t=>{let{present:e,children:a}=t,r=_Q(e),n=typeof a=="function"?a({present:r.isPresent}):fa.Children.only(a),i=zQ(r.ref,NQ(n));return typeof a=="function"||r.isPresent?fa.cloneElement(n,{ref:i}):null},"Presence");function _Q(t){let[e,a]=fa.useState(),r=fa.useRef(null),n=fa.useRef(t),i=fa.useRef("none"),o=fa.useRef(void 0),s=t?"mounted":"unmounted",[l,u]=BQ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return fa.useEffect(()=>{l==="mounted"?(i.current=o.current??Sc(r.current),o.current=void 0):i.current="none"},[l]),Xe(()=>{let c=r.current,f=n.current;if(f!==t){let h=i.current,p=Sc(c);t?(o.current=p,u("MOUNT")):p==="none"||c?.display==="none"?u("UNMOUNT"):u(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=t}},[t,u]),Xe(()=>{if(e){let c,f=e.ownerDocument.defaultView??window,d=Zi(p=>{let x=Sc(r.current).includes(CSS.escape(p.animationName));if(p.target===e&&x&&(u("ANIMATION_END"),!n.current)){let g=e.style.animationFillMode;e.style.animationFillMode="forwards",c=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=g)})}},"handleAnimationEnd"),h=Zi(p=>{p.target===e&&(i.current=Sc(r.current))},"handleAnimationStart");return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{f.clearTimeout(c),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:fa.useCallback(c=>{if(c){let f=getComputedStyle(c);r.current=f,o.current=Sc(f)}else r.current=null;a(c)},[])}}Zi(_Q,"usePresence");function ev(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Zi(ev,"setRef");function zQ(...t){let e=fa.useRef(t);return e.current=t,fa.useCallback(a=>{let r=e.current,n=!1,i=r.map(o=>{let s=ev(o,a);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<i.length;o++){let s=i[o];typeof s=="function"?s():ev(r[o],null)}}},[])}Zi(zQ,"useStableComposedRefs");function Sc(t){return t?.animationName||"none"}Zi(Sc,"getAnimationName");function NQ(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=e&&"isReactWarning"in e&&e.isReactWarning;return a?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=e&&"isReactWarning"in e&&e.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}Zi(NQ,"getElementRef");var tv=L(F(),1);var U4=Object.defineProperty,j4=(t,e)=>U4(t,"name",{value:e,configurable:!0}),F4=tv[" useId ".trim().toString()]||(()=>{}),H4=0;function Dt(t){let[e,a]=tv.useState(F4());return Xe(()=>{t||a(r=>r??String(H4++))},[t]),t||(e?`radix-${e}`:"")}j4(Dt,"useId");var ag=L(F(),1),W4=L(G(),1),G4=Object.defineProperty,Y4=(t,e)=>G4(t,"name",{value:e,configurable:!0}),K4=ag.createContext(void 0);function Vi(t){let e=ag.useContext(K4);return t||e||"ltr"}Y4(Vi,"useDirection");var xn={};cu(xn,{Close:()=>GV,Content:()=>Qv,Description:()=>FV,Dialog:()=>Rv,DialogClose:()=>GV,DialogContent:()=>Qv,DialogDescription:()=>FV,DialogOverlay:()=>Av,DialogPortal:()=>Iv,DialogTitle:()=>UV,DialogTrigger:()=>_V,Overlay:()=>Av,Portal:()=>Iv,Root:()=>Rv,Title:()=>UV,Trigger:()=>_V,WarningProvider:()=>YV,createDialogScope:()=>DV});var ct=L(F(),1);var We=L(F(),1);var wc=L(F(),1),J4=Object.defineProperty,eV=(t,e)=>J4(t,"name",{value:e,configurable:!0});function ya(t){let e=wc.useRef(t);return wc.useEffect(()=>{e.current=t}),wc.useMemo(()=>((...a)=>e.current?.(...a)),[])}eV(ya,"useCallbackRef");var qQ=L(G(),1),tV=Object.defineProperty,Wt=(t,e)=>tV(t,"name",{value:e,configurable:!0}),av="dismissableLayer.update",aV="dismissableLayer.pointerDownOutside",rV="dismissableLayer.focusOutside",XQ,ZQ=We.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),rg=We.forwardRef(Wt(function(e,a){let{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=e,f=We.useContext(ZQ),[d,h]=We.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=We.useState({}),x=Qe(a,h),g=Array.from(f.layers),[O]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),y=O?g.indexOf(O):-1,b=d?g.indexOf(d):-1,v=f.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,w=We.useRef(!1),k=VQ(A=>{o?.(A),l?.(A),A.defaultPrevented||u?.()},{ownerDocument:p,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:We.useCallback(A=>{if(!(A instanceof Node))return!1;let R=[...f.branches].some(D=>D.contains(A));return S&&!R},[f.branches,S])}),T=UQ(A=>{if(n&&w.current)return;let R=A.target;[...f.branches].some(Y=>Y.contains(R))||(s?.(A),l?.(A),A.defaultPrevented||u?.())},p),Q=d?b===g.length-1:!1,$=ya(A=>{A.key==="Escape"&&(i?.(A),!A.defaultPrevented&&u&&(A.preventDefault(),u()))});return We.useEffect(()=>{if(Q)return p.addEventListener("keydown",$,{capture:!0}),()=>p.removeEventListener("keydown",$,{capture:!0})},[p,Q,$]),We.useEffect(()=>{if(d)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(XQ=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),rv(),()=>{r&&(f.layersWithOutsidePointerEventsDisabled.delete(d),f.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=XQ))}},[d,p,r,f]),We.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),rv())},[d,f]),We.useEffect(()=>{let A=Wt(()=>m({}),"handleUpdate");return document.addEventListener(av,A),()=>document.removeEventListener(av,A)},[]),(0,qQ.jsx)(ue.div,{...c,ref:x,style:{pointerEvents:v?S?"auto":"none":void 0,...e.style},onFocusCapture:xe(e.onFocusCapture,T.onFocusCapture),onBlurCapture:xe(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:xe(e.onPointerDownCapture,k.onPointerDownCapture)})},"DismissableLayer"));function nv(){let t=We.useContext(ZQ),[e,a]=We.useState(null);return We.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),a}Wt(nv,"useDismissableLayerSurface");var nV=Wt(()=>!0,"IS_TRUE");function VQ(t,e){let{ownerDocument:a=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:n,dismissableSurfaces:i,shouldHandlePointerDownOutside:o=nV}=e,s=ya(t),l=We.useRef(!1),u=We.useRef(!1),c=We.useRef(new Map),f=We.useRef(()=>{});return We.useEffect(()=>{function d(){u.current=!1,n.current=!1,c.current.clear()}Wt(d,"resetOutsideInteraction");function h(){return Array.from(c.current.values()).some(Boolean)}Wt(h,"isOutsideInteractionIntercepted");function p(y){if(!u.current)return;let b=y.target;b instanceof Node&&[...i].some(S=>S.contains(b))||c.current.set(y.type,!0),y.type==="click"&&window.setTimeout(()=>{u.current&&f.current()},0)}Wt(p,"handleInteractionCapture");function m(y){u.current&&c.current.set(y.type,!1)}Wt(m,"handleInteractionBubble");let x=Wt(y=>{if(y.target&&!l.current){let v=function(){a.removeEventListener("click",f.current);let w=h();d(),w||iv(aV,s,S,{discrete:!0})};var b=v;if(Wt(v,"handleAndDispatchPointerDownOutsideEvent"),!o(y.target)){a.removeEventListener("click",f.current),d(),l.current=!1;return}let S={originalEvent:y};u.current=!0,n.current=r&&y.button===0,c.current.clear(),!r||y.button!==0?v():(a.removeEventListener("click",f.current),f.current=v,a.addEventListener("click",f.current,{once:!0}))}else a.removeEventListener("click",f.current),d();l.current=!1},"handlePointerDown"),g=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let y of g)a.addEventListener(y,p,!0),a.addEventListener(y,m);let O=window.setTimeout(()=>{a.addEventListener("pointerdown",x)},0);return()=>{window.clearTimeout(O),a.removeEventListener("pointerdown",x),a.removeEventListener("click",f.current);for(let y of g)a.removeEventListener(y,p,!0),a.removeEventListener(y,m)}},[a,s,r,n,i,o]),{onPointerDownCapture:Wt(()=>l.current=!0,"onPointerDownCapture")}}Wt(VQ,"usePointerDownOutside");function UQ(t,e=globalThis?.document){let a=ya(t),r=We.useRef(!1);return We.useEffect(()=>{let n=Wt(i=>{i.target&&!r.current&&iv(rV,a,{originalEvent:i},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",n),()=>e.removeEventListener("focusin",n)},[e,a]),{onFocusCapture:Wt(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Wt(()=>r.current=!1,"onBlurCapture")}}Wt(UQ,"useFocusOutside");function rv(){let t=new CustomEvent(av);document.dispatchEvent(t)}Wt(rv,"dispatchUpdate");function iv(t,e,a,{discrete:r}){let n=a.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:a});e&&n.addEventListener(t,e,{once:!0}),r?Fb(n,i):n.dispatchEvent(i)}Wt(iv,"handleAndDispatchCustomEvent");var Vr=L(F(),1);var HQ=L(G(),1),iV=Object.defineProperty,Qa=(t,e)=>iV(t,"name",{value:e,configurable:!0}),ov="focusScope.autoFocusOnMount",sv="focusScope.autoFocusOnUnmount",jQ={bubbles:!1,cancelable:!0},ng=Vr.forwardRef(Qa(function(e,a){let{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[l,u]=Vr.useState(null),c=ya(i),f=ya(o),d=Vr.useRef(null),h=Qe(a,u),p=Vr.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Vr.useEffect(()=>{if(n){let y=function(w){if(p.paused||!l)return;let k=w.target;l.contains(k)?d.current=k:Ui(d.current,{select:!0})},b=function(w){if(p.paused||!l)return;let k=w.relatedTarget;k!==null&&(l.contains(k)||Ui(d.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(let T of w)T.removedNodes.length>0&&Ui(l)};var x=y,g=b,O=v;Qa(y,"handleFocusIn"),Qa(b,"handleFocusOut"),Qa(v,"handleMutations"),document.addEventListener("focusin",y),document.addEventListener("focusout",b);let S=new MutationObserver(v);return l&&S.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),S.disconnect()}}},[n,l,p.paused]),Vr.useEffect(()=>{if(l){FQ.add(p);let x=document.activeElement;if(!l.contains(x)){let O=new CustomEvent(ov,jQ);l.addEventListener(ov,c),l.dispatchEvent(O),O.defaultPrevented||(GQ(e2(cv(l)),{select:!0}),document.activeElement===x&&Ui(l))}return()=>{l.removeEventListener(ov,c),setTimeout(()=>{let O=new CustomEvent(sv,jQ);l.addEventListener(sv,f),l.dispatchEvent(O),O.defaultPrevented||Ui(x??document.body,{select:!0}),l.removeEventListener(sv,f),FQ.remove(p)},0)}}},[l,c,f,p]);let m=Vr.useCallback(x=>{if(!r&&!n||p.paused)return;let g=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,O=document.activeElement;if(g&&O){let y=x.currentTarget,[b,v]=YQ(y);b&&v?!x.shiftKey&&O===v?(x.preventDefault(),r&&Ui(b,{select:!0})):x.shiftKey&&O===b&&(x.preventDefault(),r&&Ui(v,{select:!0})):O===y&&x.preventDefault()}},[r,n,p.paused]);return(0,HQ.jsx)(ue.div,{tabIndex:-1,...s,ref:h,onKeyDown:m})},"FocusScope"));function GQ(t,{select:e=!1}={}){let a=document.activeElement;for(let r of t)if(Ui(r,{select:e}),document.activeElement!==a)return}Qa(GQ,"focusFirst");function YQ(t){let e=cv(t),a=lv(e,t),r=lv(e.reverse(),t);return[a,r]}Qa(YQ,"getTabbableEdges");function cv(t){let e=[],a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Qa(r=>{let n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;a.nextNode();)e.push(a.currentNode);return e}Qa(cv,"getTabbableCandidates");function lv(t,e){let a=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(let r of t)if(!(a?!r.checkVisibility({checkVisibilityCSS:!0}):WQ(r,{upTo:e})))return r}Qa(lv,"findVisible");function WQ(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}Qa(WQ,"isHidden");function KQ(t){return t instanceof HTMLInputElement&&"select"in t}Qa(KQ,"isSelectableInput");function Ui(t,{select:e=!1}={}){if(t&&t.focus){let a=document.activeElement;t.focus({preventScroll:!0}),t!==a&&KQ(t)&&e&&t.select()}}Qa(Ui,"focus");var FQ=JQ();function JQ(){let t=[];return{add(e){let a=t[0];e!==a&&a?.pause(),t=uv(t,e),t.unshift(e)},remove(e){t=uv(t,e),t[0]?.resume()}}}Qa(JQ,"createFocusScopesStack");function uv(t,e){let a=[...t],r=a.indexOf(e);return r!==-1&&a.splice(r,1),a}Qa(uv,"arrayRemove");function e2(t){return t.filter(e=>e.tagName!=="A")}Qa(e2,"removeLinks");var ig=L(F(),1),t2=L(Es(),1);var a2=L(G(),1),oV=Object.defineProperty,sV=(t,e)=>oV(t,"name",{value:e,configurable:!0}),og=ig.forwardRef(sV(function(e,a){let{container:r,...n}=e,[i,o]=ig.useState(!1);Xe(()=>o(!0),[]);let s=r||i&&globalThis?.document?.body;return s?t2.createPortal((0,a2.jsx)(ue.div,{...n,ref:a}),s):null},"Portal"));var r2=L(F(),1),lV=Object.defineProperty,dv=(t,e)=>lV(t,"name",{value:e,configurable:!0}),sg=0,Cc=null;function uV(t){return kc(),t.children}dv(uV,"FocusGuards");function kc(){r2.useEffect(()=>{Cc||(Cc={start:fv(),end:fv()});let{start:t,end:e}=Cc;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),sg++,()=>{sg===1&&(Cc?.start.remove(),Cc?.end.remove(),Cc=null),sg=Math.max(0,sg-1)}},[])}dv(kc,"useFocusGuards");function fv(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}dv(fv,"createFocusGuard");var er=function(){return er=Object.assign||function(e){for(var a,r=1,n=arguments.length;r<n;r++){a=arguments[r];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e},er.apply(this,arguments)};function lg(t,e){var a={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(a[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(a[r[n]]=t[r[n]]);return a}function n2(t,e,a){if(a||arguments.length===2)for(var r=0,n=e.length,i;r<n;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var hg=L(F());var ba=L(F());var dl="right-scroll-bar-position",hl="width-before-scroll-bar",hv="with-scroll-bars-hidden",pv="--removed-body-scroll-bar-size";function ug(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}var i2=L(F());function o2(t,e){var a=(0,i2.useState)(function(){return{value:t,callback:e,facade:{get current(){return a.value},set current(r){var n=a.value;n!==r&&(a.value=r,a.callback(r,n))}}}})[0];return a.callback=e,a.facade}var cg=L(F());var cV=typeof window<"u"?cg.useLayoutEffect:cg.useEffect,s2=new WeakMap;function mv(t,e){var a=o2(e||null,function(r){return t.forEach(function(n){return ug(n,r)})});return cV(function(){var r=s2.get(a);if(r){var n=new Set(r),i=new Set(t),o=a.current;n.forEach(function(s){i.has(s)||ug(s,null)}),i.forEach(function(s){n.has(s)||ug(s,o)})}s2.set(a,t)},[t]),a}function fV(t){return t}function dV(t,e){e===void 0&&(e=fV);var a=[],r=!1,n={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:t},useMedium:function(i){var o=e(i,r);return a.push(o),function(){a=a.filter(function(s){return s!==o})}},assignSyncMedium:function(i){for(r=!0;a.length;){var o=a;a=[],o.forEach(i)}a={push:function(s){return i(s)},filter:function(){return a}}},assignMedium:function(i){r=!0;var o=[];if(a.length){var s=a;a=[],s.forEach(i),o=a}var l=function(){var c=o;o=[],c.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),a={push:function(c){o.push(c),u()},filter:function(c){return o=o.filter(c),a}}}};return n}function gv(t){t===void 0&&(t={});var e=dV(null);return e.options=er({async:!0,ssr:!1},t),e}var l2=L(F()),u2=function(t){var e=t.sideCar,a=lg(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return l2.createElement(r,er({},a))};u2.isSideCarExport=!0;function Ov(t,e){return t.useMedium(e),u2}var fg=gv();var xv=function(){},Rd=ba.forwardRef(function(t,e){var a=ba.useRef(null),r=ba.useState({onScrollCapture:xv,onWheelCapture:xv,onTouchMoveCapture:xv}),n=r[0],i=r[1],o=t.forwardProps,s=t.children,l=t.className,u=t.removeScrollBar,c=t.enabled,f=t.shards,d=t.sideCar,h=t.noRelative,p=t.noIsolation,m=t.inert,x=t.allowPinchZoom,g=t.as,O=g===void 0?"div":g,y=t.gapMode,b=lg(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),v=d,S=mv([a,e]),w=er(er({},b),n);return ba.createElement(ba.Fragment,null,c&&ba.createElement(v,{sideCar:fg,removeScrollBar:u,shards:f,noRelative:h,noIsolation:p,inert:m,setCallbacks:i,allowPinchZoom:!!x,lockRef:a,gapMode:y}),o?ba.cloneElement(ba.Children.only(s),er(er({},w),{ref:S})):ba.createElement(O,er({},w,{className:l,ref:S}),s))});Rd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rd.classNames={fullWidth:hl,zeroRight:dl};var dt=L(F());var Tc=L(F());var d2=L(F());var c2;var f2=function(){if(c2)return c2;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hV(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=f2();return e&&t.setAttribute("nonce",e),t}function pV(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function mV(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var yv=function(){var t=0,e=null;return{add:function(a){t==0&&(e=hV())&&(pV(e,a),mV(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var bv=function(){var t=yv();return function(e,a){d2.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&a])}};var Id=function(){var t=bv(),e=function(a){var r=a.styles,n=a.dynamic;return t(r,n),null};return e};var gV={left:0,top:0,right:0,gap:0},vv=function(t){return parseInt(t||"",10)||0},OV=function(t){var e=window.getComputedStyle(document.body),a=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],n=e[t==="padding"?"paddingRight":"marginRight"];return[vv(a),vv(r),vv(n)]},Sv=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return gV;var e=OV(t),a=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-a+e[2]-e[0])}};var xV=Id(),Lc="data-scroll-locked",yV=function(t,e,a,r){var n=t.left,i=t.top,o=t.right,s=t.gap;return a===void 0&&(a="margin"),`
10
10
  .`.concat(hv,` {
11
11
  overflow: hidden `).concat(r,`;
12
12
  padding-right: `).concat(s,"px ").concat(r,`;
@@ -46,7 +46,7 @@ Error generating stack: `+r.message+`
46
46
  `)},h2=function(){var t=parseInt(document.body.getAttribute(Lc)||"0",10);return isFinite(t)?t:0},bV=function(){Tc.useEffect(function(){return document.body.setAttribute(Lc,(h2()+1).toString()),function(){var t=h2()-1;t<=0?document.body.removeAttribute(Lc):document.body.setAttribute(Lc,t.toString())}},[])},wv=function(t){var e=t.noRelative,a=t.noImportant,r=t.gapMode,n=r===void 0?"margin":r;bV();var i=Tc.useMemo(function(){return Sv(n)},[n]);return Tc.createElement(xV,{styles:yV(i,!e,n,a?"":"!important")})};var Cv=!1;if(typeof window<"u")try{Ad=Object.defineProperty({},"passive",{get:function(){return Cv=!0,!0}}),window.addEventListener("test",Ad,Ad),window.removeEventListener("test",Ad,Ad)}catch{Cv=!1}var Ad,pl=Cv?{passive:!1}:!1;var vV=function(t){return t.tagName==="TEXTAREA"},p2=function(t,e){if(!(t instanceof Element))return!1;var a=window.getComputedStyle(t);return a[e]!=="hidden"&&!(a.overflowY===a.overflowX&&!vV(t)&&a[e]==="visible")},SV=function(t){return p2(t,"overflowY")},wV=function(t){return p2(t,"overflowX")},kv=function(t,e){var a=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=m2(t,r);if(n){var i=g2(t,r),o=i[1],s=i[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==a.body);return!1},CV=function(t){var e=t.scrollTop,a=t.scrollHeight,r=t.clientHeight;return[e,a,r]},kV=function(t){var e=t.scrollLeft,a=t.scrollWidth,r=t.clientWidth;return[e,a,r]},m2=function(t,e){return t==="v"?SV(e):wV(e)},g2=function(t,e){return t==="v"?CV(e):kV(e)},LV=function(t,e){return t==="h"&&e==="rtl"?-1:1},O2=function(t,e,a,r,n){var i=LV(t,window.getComputedStyle(e).direction),o=i*r,s=a.target,l=e.contains(s),u=!1,c=o>0,f=0,d=0;do{if(!s)break;var h=g2(t,s),p=h[0],m=h[1],x=h[2],g=m-x-i*p;(p||g)&&m2(t,s)&&(f+=g,d+=p);var O=s.parentNode;s=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!l&&s!==document.body||l&&(e.contains(s)||e===s));return(c&&(n&&Math.abs(f)<1||!n&&o>f)||!c&&(n&&Math.abs(d)<1||!n&&-o>d))&&(u=!0),u};var dg=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},x2=function(t){return[t.deltaX,t.deltaY]},y2=function(t){return t&&"current"in t?t.current:t},TV=function(t,e){return t[0]===e[0]&&t[1]===e[1]},PV=function(t){return`
47
47
  .block-interactivity-`.concat(t,` {pointer-events: none;}
48
48
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
49
- `)},RV=0,Pc=[];function b2(t){var e=dt.useRef([]),a=dt.useRef([0,0]),r=dt.useRef(),n=dt.useState(RV++)[0],i=dt.useState(Id)[0],o=dt.useRef(t);dt.useEffect(function(){o.current=t},[t]),dt.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(n));var m=n2([t.lockRef.current],(t.shards||[]).map(y2),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(n))})}}},[t.inert,t.lockRef.current,t.shards]);var s=dt.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var g=dg(m),O=a.current,y="deltaX"in m?m.deltaX:O[0]-g[0],b="deltaY"in m?m.deltaY:O[1]-g[1],v,S=m.target,w=Math.abs(y)>Math.abs(b)?"h":"v";if("touches"in m&&w==="h"&&S.type==="range")return!1;var k=window.getSelection(),T=k&&k.anchorNode,Q=T?T===S||T.contains(S):!1;if(Q)return!1;var $=kv(w,S);if(!$)return!0;if($?v=w:(v=w==="v"?"h":"v",$=kv(w,S)),!$)return!1;if(!r.current&&"changedTouches"in m&&(y||b)&&(r.current=v),!v)return!0;var A=r.current||v;return O2(A,x,m,A==="h"?y:b,!0)},[]),l=dt.useCallback(function(m){var x=m;if(!(!Pc.length||Pc[Pc.length-1]!==i)){var g="deltaY"in x?x2(x):dg(x),O=e.current.filter(function(v){return v.name===x.type&&(v.target===x.target||x.target===v.shadowParent)&&TV(v.delta,g)})[0];if(O&&O.should){x.cancelable&&x.preventDefault();return}if(!O){var y=(o.current.shards||[]).map(y2).filter(Boolean).filter(function(v){return v.contains(x.target)}),b=y.length>0?s(x,y[0]):!o.current.noIsolation;b&&x.cancelable&&x.preventDefault()}}},[]),u=dt.useCallback(function(m,x,g,O){var y={name:m,delta:x,target:g,should:O,shadowParent:IV(g)};e.current.push(y),setTimeout(function(){e.current=e.current.filter(function(b){return b!==y})},1)},[]),c=dt.useCallback(function(m){a.current=dg(m),r.current=void 0},[]),f=dt.useCallback(function(m){u(m.type,x2(m),m.target,s(m,t.lockRef.current))},[]),d=dt.useCallback(function(m){u(m.type,dg(m),m.target,s(m,t.lockRef.current))},[]);dt.useEffect(function(){return Pc.push(i),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,pl),document.addEventListener("touchmove",l,pl),document.addEventListener("touchstart",c,pl),function(){Pc=Pc.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,pl),document.removeEventListener("touchmove",l,pl),document.removeEventListener("touchstart",c,pl)}},[]);var h=t.removeScrollBar,p=t.inert;return dt.createElement(dt.Fragment,null,p?dt.createElement(i,{styles:PV(n)}):null,h?dt.createElement(wv,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function IV(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}var v2=Ov(fg,b2);var S2=hg.forwardRef(function(t,e){return hg.createElement(Rd,er({},t,{ref:e,sideCar:v2}))});S2.classNames=Rd.classNames;var Qd=S2;var AV=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Rc=new WeakMap,pg=new WeakMap,mg={},Lv=0,w2=function(t){return t&&(t.host||w2(t.parentNode))},QV=function(t,e){return e.map(function(a){if(t.contains(a))return a;var r=w2(a);return r&&t.contains(r)?r:(console.error("aria-hidden",a,"in not contained inside",t,". Doing nothing"),null)}).filter(function(a){return!!a})},MV=function(t,e,a,r){var n=QV(e,Array.isArray(t)?t:[t]);mg[a]||(mg[a]=new WeakMap);var i=mg[a],o=[],s=new Set,l=new Set(n),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};n.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))c(d);else try{var h=d.getAttribute(r),p=h!==null&&h!=="false",m=(Rc.get(d)||0)+1,x=(i.get(d)||0)+1;Rc.set(d,m),i.set(d,x),o.push(d),m===1&&p&&pg.set(d,!0),x===1&&d.setAttribute(a,"true"),p||d.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return c(e),s.clear(),Lv++,function(){o.forEach(function(f){var d=Rc.get(f)-1,h=i.get(f)-1;Rc.set(f,d),i.set(f,h),d||(pg.has(f)||f.removeAttribute(r),pg.delete(f)),h||f.removeAttribute(a)}),Lv--,Lv||(Rc=new WeakMap,Rc=new WeakMap,pg=new WeakMap,mg={})}},gg=function(t,e,a){a===void 0&&(a="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),n=e||AV(t);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live], script"))),MV(r,n,a,"aria-hidden")):function(){return null}};var St=L(G(),1),EV=Object.defineProperty,tr=(t,e)=>EV(t,"name",{value:e,configurable:!0}),Pv="Dialog",[C2,DV]=ca(Pv),[$V,On]=C2(Pv),Rv=tr(t=>{let{__scopeDialog:e,children:a,open:r,defaultOpen:n,onOpenChange:i,modal:o=!0}=t,s=ct.useRef(null),l=ct.useRef(null),[u,c]=Aa({prop:r,defaultProp:n??!1,onChange:i,caller:Pv}),[f,d]=ct.useState(0),[h,p]=ct.useState(0);return(0,St.jsx)($V,{scope:e,triggerRef:s,contentRef:l,contentId:Dt(),titleId:Dt(),descriptionId:Dt(),titlePresent:f>0,descriptionPresent:h>0,setTitleCount:d,setDescriptionCount:p,open:u,onOpenChange:c,onOpenToggle:ct.useCallback(()=>c(m=>!m),[c]),modal:o,children:a})},"Dialog"),BV="DialogTrigger",_V=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,...n}=e,i=On(BV,r),o=Qe(a,i.triggerRef);return(0,St.jsx)(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Og(i.open),...n,ref:o,onClick:xe(e.onClick,i.onOpenToggle)})},"DialogTrigger")),k2="DialogPortal",[zV,L2]=C2(k2,{forceMount:void 0}),Iv=tr(t=>{let{__scopeDialog:e,forceMount:a,children:r,container:n}=t,i=On(k2,e);return(0,St.jsx)(zV,{scope:e,forceMount:a,children:ct.Children.map(r,o=>(0,St.jsx)(as,{present:a||i.open,children:(0,St.jsx)(og,{asChild:!0,container:n,children:o})}))})},"DialogPortal"),Tv="DialogOverlay",Av=ct.forwardRef(tr(function(e,a){let r=L2(Tv,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=On(Tv,e.__scopeDialog);return o.modal?(0,St.jsx)(as,{present:n||o.open,children:(0,St.jsx)(XV,{...i,ref:a})}):null},"DialogOverlay")),NV=Ia("DialogOverlay.RemoveScroll"),XV=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,...n}=e,i=On(Tv,r),o=nv(),s=Qe(a,o);return(0,St.jsx)(Qd,{as:NV,allowPinchZoom:!0,shards:[i.contentRef],children:(0,St.jsx)(ue.div,{"data-state":Og(i.open),...n,ref:s,style:{pointerEvents:"auto",...n.style}})})},"DialogOverlayImpl")),Md="DialogContent",Qv=ct.forwardRef(tr(function(e,a){let r=L2(Md,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=On(Md,e.__scopeDialog);return(0,St.jsx)(as,{present:n||o.open,children:o.modal?(0,St.jsx)(qV,{...i,ref:a}):(0,St.jsx)(ZV,{...i,ref:a})})},"DialogContent")),qV=ct.forwardRef(tr(function(e,a){let r=On(Md,e.__scopeDialog),n=ct.useRef(null),i=Qe(a,r.contentRef,n);return ct.useEffect(()=>{let o=n.current;if(o)return gg(o)},[]),(0,St.jsx)(T2,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:xe(e.onCloseAutoFocus,o=>{o.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:xe(e.onPointerDownOutside,o=>{let s=o.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&o.preventDefault()}),onFocusOutside:xe(e.onFocusOutside,o=>o.preventDefault())})},"DialogContentModal")),ZV=ct.forwardRef(tr(function(e,a){let r=On(Md,e.__scopeDialog),n=ct.useRef(!1),i=ct.useRef(!1);return(0,St.jsx)(T2,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(n.current||r.triggerRef.current?.focus(),o.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));let s=o.target;r.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})},"DialogContentNonModal")),T2=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,l=On(Md,r);return kc(),(0,St.jsx)(St.Fragment,{children:(0,St.jsx)(ng,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:(0,St.jsx)(rg,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":Og(l.open),...s,ref:a,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),VV="DialogTitle",UV=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,...n}=e,i=On(VV,r),{setTitleCount:o}=i;return Xe(()=>(o(s=>s+1),()=>o(s=>s-1)),[o]),(0,St.jsx)(ue.h2,{id:i.titleId,...n,ref:a})},"DialogTitle")),jV="DialogDescription",FV=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,...n}=e,i=On(jV,r),{setDescriptionCount:o}=i;return Xe(()=>(o(s=>s+1),()=>o(s=>s-1)),[o]),(0,St.jsx)(ue.p,{id:i.descriptionId,...n,ref:a})},"DialogDescription")),HV="DialogClose",GV=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,...n}=e,i=On(HV,r);return(0,St.jsx)(ue.button,{type:"button",...n,ref:a,onClick:xe(e.onClick,()=>i.onOpenChange(!1))})},"DialogClose")),YV=tr(t=>t.children,"WarningProvider");function Og(t){return t?"open":"closed"}tr(Og,"getState");var P2=L(F(),1);var WV=Object.defineProperty,KV=(t,e)=>WV(t,"name",{value:e,configurable:!0});function Mv(t){let[e,a]=P2.useState(void 0);return Xe(()=>{if(t){a({width:t.offsetWidth,height:t.offsetHeight});let r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let i=n[0],o,s;if("borderBoxSize"in i){let l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,s=u.blockSize}else o=t.offsetWidth,s=t.offsetHeight;a({width:o,height:s})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else a(void 0)},[t]),e}KV(Mv,"useSize");var da=L(F(),1);var A2=["top","right","bottom","left"];var ci=Math.min,yn=Math.max,Dd=Math.round,$d=Math.floor,fi=t=>({x:t,y:t}),JV={left:"right",right:"left",bottom:"top",top:"bottom"};function Ev(t,e,a){return yn(t,ci(e,a))}function di(t,e){return typeof t=="function"?t(e):t}function ji(t){return t.split("-")[0]}function ml(t){return t.split("-")[1]}function yg(t){return t==="x"?"y":"x"}function bg(t){return t==="y"?"height":"width"}function bn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function vg(t){return yg(bn(t))}function Q2(t,e,a){a===void 0&&(a=!1);let r=ml(t),n=vg(t),i=bg(n),o=n==="x"?r===(a?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Ed(o)),[o,Ed(o)]}function M2(t){let e=Ed(t);return[xg(t),e,xg(e)]}function xg(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var R2=["left","right"],I2=["right","left"],eU=["top","bottom"],tU=["bottom","top"];function aU(t,e,a){switch(t){case"top":case"bottom":return a?e?I2:R2:e?R2:I2;case"left":case"right":return e?eU:tU;default:return[]}}function E2(t,e,a,r){let n=ml(t),i=aU(ji(t),a==="start",r);return n&&(i=i.map(o=>o+"-"+n),e&&(i=i.concat(i.map(xg)))),i}function Ed(t){let e=ji(t);return JV[e]+t.slice(e.length)}function rU(t){var e,a,r,n;return{top:(e=t.top)!=null?e:0,right:(a=t.right)!=null?a:0,bottom:(r=t.bottom)!=null?r:0,left:(n=t.left)!=null?n:0}}function Dv(t){return typeof t!="number"?rU(t):{top:t,right:t,bottom:t,left:t}}function gl(t){let{x:e,y:a,width:r,height:n}=t;return{width:r,height:n,top:a,left:e,right:e+r,bottom:a+n,x:e,y:a}}function D2(t,e,a){let{reference:r,floating:n}=t,i=bn(e),o=vg(e),s=bg(o),l=ji(e),u=i==="y",c=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,d=r[s]/2-n[s]/2,h;switch(l){case"top":h={x:c,y:r.y-n.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-n.width,y:f};break;default:h={x:r.x,y:r.y}}let p=ml(e);return p&&(h[o]+=d*(p==="end"?1:-1)*(a&&u?-1:1)),h}async function _2(t,e){var a;e===void 0&&(e={});let{x:r,y:n,platform:i,rects:o,elements:s,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=di(e,t),p=Dv(h),x=s[d?f==="floating"?"reference":"floating":f],g=gl(await i.getClippingRect({element:(a=await(i.isElement==null?void 0:i.isElement(x)))==null||a?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),O=f==="floating"?{x:r,y:n,width:o.floating.width,height:o.floating.height}:o.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement(y))&&await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1},v=gl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:O,offsetParent:y,strategy:l}):O);return{top:(g.top-v.top+p.top)/b.y,bottom:(v.bottom-g.bottom+p.bottom)/b.y,left:(g.left-v.left+p.left)/b.x,right:(v.right-g.right+p.right)/b.x}}var nU=50,z2=async(t,e,a)=>{let{placement:r="bottom",strategy:n="absolute",middleware:i=[],platform:o}=a,s=o.detectOverflow?o:{...o,detectOverflow:_2},l=await(o.isRTL==null?void 0:o.isRTL(e)),u=await o.getElementRects({reference:t,floating:e,strategy:n}),{x:c,y:f}=D2(u,r,l),d=r,h=0,p={};for(let m=0;m<i.length;m++){let x=i[m];if(!x)continue;let{name:g,fn:O}=x,{x:y,y:b,data:v,reset:S}=await O({x:c,y:f,initialPlacement:r,placement:d,strategy:n,middlewareData:p,rects:u,platform:s,elements:{reference:t,floating:e}});c=y??c,f=b??f,p[g]={...p[g],...v},S&&h<nU&&(h++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:n}):S.rects),{x:c,y:f}=D2(u,d,l)),m=-1)}return{x:c,y:f,placement:d,strategy:n,middlewareData:p}},N2=t=>({name:"arrow",options:t,async fn(e){let{x:a,y:r,placement:n,rects:i,platform:o,elements:s,middlewareData:l}=e,{element:u,padding:c=0}=di(t,e)||{};if(u==null)return{};let f=Dv(c),d={x:a,y:r},h=vg(n),p=bg(h),m=await o.getDimensions(u),x=h==="y",g=x?"top":"left",O=x?"bottom":"right",y=x?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[h]-d[h]-i.floating[p],v=d[h]-i.reference[h],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u)),w=S?S[y]:0;(!w||!await(o.isElement==null?void 0:o.isElement(S)))&&(w=s.floating[y]||i.floating[p]);let k=b/2-v/2,T=w/2-m[p]/2-1,Q=ci(f[g],T),$=ci(f[O],T),A=w-m[p]-$,R=w/2-m[p]/2+k,D=Ev(Q,R,A),Y=!l.arrow&&ml(n)!=null&&R!==D&&i.reference[p]/2-(R<Q?Q:$)-m[p]/2<0,B=Y?R<Q?R-Q:R-A:0;return{[h]:d[h]+B,data:{[h]:D,centerOffset:R-D-B,...Y&&{alignmentOffset:B}},reset:Y}}});var X2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var a,r;let{placement:n,middlewareData:i,rects:o,initialPlacement:s,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...x}=di(t,e);if((a=i.arrow)!=null&&a.alignmentOffset)return{};let g=ji(n),O=bn(s),y=ji(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),v=d||(y||!m?[Ed(s)]:M2(s)),S=p!=="none";!d&&S&&v.push(...E2(s,m,p,b));let w=[s,...v],k=await l.detectOverflow(e,x),T=[],Q=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&T.push(k[g]),f){let D=Q2(n,o,b);T.push(k[D[0]],k[D[1]])}if(Q=[...Q,{placement:n,overflows:T}],!T.every(D=>D<=0)){var $,A;let D=((($=i.flip)==null?void 0:$.index)||0)+1,Y=w[D];if(Y&&(!(f==="alignment"?O!==bn(Y):!1)||Q.every(re=>bn(re.placement)===O?re.overflows[0]>0:!0)))return{data:{index:D,overflows:Q},reset:{placement:Y}};let B=(A=Q.filter(q=>q.overflows[0]<=0).sort((q,re)=>q.overflows[1]-re.overflows[1])[0])==null?void 0:A.placement;if(!B)switch(h){case"bestFit":{var R;let q=(R=Q.filter(re=>{if(S){let ie=bn(re.placement);return ie===O||ie==="y"}return!0}).map(re=>[re.placement,re.overflows.filter(ie=>ie>0).reduce((ie,z)=>ie+z,0)]).sort((re,ie)=>re[1]-ie[1])[0])==null?void 0:R[0];q&&(B=q);break}case"initialPlacement":B=s;break}if(n!==B)return{reset:{placement:B}}}return{}}}};function $2(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function B2(t){return A2.some(e=>t[e]>=0)}var q2=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:a,platform:r}=e,{strategy:n="referenceHidden",...i}=di(t,e);switch(n){case"referenceHidden":{let o=await r.detectOverflow(e,{...i,elementContext:"reference"}),s=$2(o,a.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:B2(s)}}}case"escaped":{let o=await r.detectOverflow(e,{...i,altBoundary:!0}),s=$2(o,a.floating);return{data:{escapedOffsets:s,escaped:B2(s)}}}default:return{}}}}};var Z2=new Set(["left","top"]);async function iU(t,e){let{placement:a,platform:r,elements:n}=t,i=await(r.isRTL==null?void 0:r.isRTL(n.floating)),o=ji(a),s=ml(a),l=bn(a)==="y",u=Z2.has(o)?-1:1,c=i&&l?-1:1,f=di(e,t),{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof p=="number"&&(h=s==="end"?p*-1:p),l?{x:h*c,y:d*u}:{x:d*u,y:h*c}}var V2=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var a,r;let{x:n,y:i,placement:o,middlewareData:s}=e,l=await iU(e,t);return o===((a=s.offset)==null?void 0:a.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:i+l.y,data:{...l,placement:o}}}}},U2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:a,y:r,placement:n,platform:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:O=>{let{x:y,y:b}=O;return{x:y,y:b}}},...u}=di(t,e),c={x:a,y:r},f=await i.detectOverflow(e,u),d=bn(n),h=yg(d),p=c[h],m=c[d],x=(O,y)=>Ev(y+f[O==="y"?"top":"left"],y,y-f[O==="y"?"bottom":"right"]);o&&(p=x(h,p)),s&&(m=x(d,m));let g=l.fn({...e,[h]:p,[d]:m});return{...g,data:{x:g.x-a,y:g.y-r,enabled:{[h]:o,[d]:s}}}}}},j2=function(t){return t===void 0&&(t={}),{options:t,fn(e){var a,r;let{x:n,y:i,placement:o,rects:s,middlewareData:l}=e,{offset:u=0,mainAxis:c=!0,crossAxis:f=!0}=di(t,e),d={x:n,y:i},h=bn(o),p=yg(h),m=d[p],x=d[h],g=di(u,e),O=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:(a=g.mainAxis)!=null?a:0,crossAxis:(r=g.crossAxis)!=null?r:0};if(c){let v=p==="y"?"height":"width",S=s.reference[p]-s.floating[v]+O.mainAxis,w=s.reference[p]+s.reference[v]-O.mainAxis;m<S?m=S:m>w&&(m=w)}if(f){var y,b;let v=p==="y"?"width":"height",S=Z2.has(ji(o)),w=s.reference[h]-s.floating[v]+(S&&((y=l.offset)==null?void 0:y[h])||0)+(S?0:O.crossAxis),k=s.reference[h]+s.reference[v]+(S?0:((b=l.offset)==null?void 0:b[h])||0)-(S?O.crossAxis:0);x<w?x=w:x>k&&(x=k)}return{[p]:m,[h]:x}}}},F2=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){let{placement:a,rects:r,platform:n,elements:i}=e,{apply:o=()=>{},...s}=di(t,e),l=await n.detectOverflow(e,s),u=ji(a),c=ml(a),f=bn(a)==="y",{width:d,height:h}=r.floating,p,m;u==="top"||u==="bottom"?(p=u,m=c===(await(n.isRTL==null?void 0:n.isRTL(i.floating))?"start":"end")?"left":"right"):(m=u,p=c==="end"?"top":"bottom");let x=h-l.top-l.bottom,g=d-l.left-l.right,O=ci(h-l[p],x),y=ci(d-l[m],g),b=e.middlewareData.shift,v=!b,S=O,w=y;b!=null&&b.enabled.x&&(w=g),b!=null&&b.enabled.y&&(S=x),v&&!c&&(f?w=d-2*yn(l.left,l.right):S=h-2*yn(l.top,l.bottom)),await o({...e,availableWidth:w,availableHeight:S});let k=await n.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Sg(){return typeof window<"u"}function yl(t){return G2(t)?(t.nodeName||"").toLowerCase():"#document"}function Ma(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function hi(t){var e;return(e=(G2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function G2(t){return Sg()?t instanceof Node||t instanceof Ma(t).Node:!1}function vn(t){return Sg()?t instanceof Element||t instanceof Ma(t).Element:!1}function Fi(t){return Sg()?t instanceof HTMLElement||t instanceof Ma(t).HTMLElement:!1}function H2(t){return!Sg()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ma(t).ShadowRoot}function Bd(t){let{overflow:e,overflowX:a,overflowY:r,display:n}=Sn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+a)&&n!=="inline"&&n!=="contents"}function Y2(t){return/^(table|td|th)$/.test(yl(t))}function _d(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var oU=/transform|translate|scale|rotate|perspective|filter/,sU=/paint|layout|strict|content/,Ol=t=>!!t&&t!=="none",$v;function wg(t){let e=vn(t)?Sn(t):t;return Ol(e.transform)||Ol(e.translate)||Ol(e.scale)||Ol(e.rotate)||Ol(e.perspective)||!Cg()&&(Ol(e.backdropFilter)||Ol(e.filter))||oU.test(e.willChange||"")||sU.test(e.contain||"")}function W2(t){let e=rs(t);for(;Fi(e)&&!Ic(e);){if(wg(e))return e;if(_d(e))return null;e=rs(e)}return null}function Cg(){return $v==null&&($v=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$v}function Ic(t){return/^(html|body|#document)$/.test(yl(t))}function Sn(t){return Ma(t).getComputedStyle(t)}function zd(t){return vn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function rs(t){if(yl(t)==="html")return t;let e=t.assignedSlot||t.parentNode||H2(t)&&t.host||hi(t);return H2(e)?e.host:e}function K2(t){let e=rs(t);return Ic(e)?(t.ownerDocument||t).body:Fi(e)&&Bd(e)?e:K2(e)}function xl(t,e,a){var r;e===void 0&&(e=[]),a===void 0&&(a=!0);let n=K2(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),o=Ma(n);if(i){let s=kg(o);return e.concat(o,o.visualViewport||[],Bd(n)?n:[],s&&a?xl(s):[])}else return e.concat(n,xl(n,[],a))}function kg(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function tM(t){let e=Sn(t),a=parseFloat(e.width)||0,r=parseFloat(e.height)||0,n=Fi(t),i=n?t.offsetWidth:a,o=n?t.offsetHeight:r,s=Dd(a)!==i||Dd(r)!==o;return s&&(a=i,r=o),{width:a,height:r,$:s}}function _v(t){return vn(t)?t:t.contextElement}function Ac(t){let e=_v(t);if(!Fi(e))return fi(1);let a=e.getBoundingClientRect(),{width:r,height:n,$:i}=tM(e),o=(i?Dd(a.width):a.width)/r,s=(i?Dd(a.height):a.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var lU=fi(0);function aM(t){let e=Ma(t);return!Cg()||!e.visualViewport?lU:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function uU(t,e,a){return e===void 0&&(e=!1),!!a&&e&&a===Ma(t)}function bl(t,e,a,r){e===void 0&&(e=!1),a===void 0&&(a=!1);let n=t.getBoundingClientRect(),i=_v(t),o=fi(1);e&&(r?vn(r)&&(o=Ac(r)):o=Ac(t));let s=uU(i,a,r)?aM(i):fi(0),l=(n.left+s.x)/o.x,u=(n.top+s.y)/o.y,c=n.width/o.x,f=n.height/o.y;if(i&&r){let d=Ma(i),h=vn(r)?Ma(r):r,p=d,m=kg(p);for(;m&&h!==p;){let x=Ac(m),g=m.getBoundingClientRect(),O=Sn(m),y=g.left+(m.clientLeft+parseFloat(O.paddingLeft))*x.x,b=g.top+(m.clientTop+parseFloat(O.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=y,u+=b,p=Ma(m),m=kg(p)}}return gl({width:c,height:f,x:l,y:u})}function Lg(t,e){let a=zd(t).scrollLeft;return e?e.left+a:bl(hi(t)).left+a}function rM(t,e){let a=t.getBoundingClientRect(),r=a.left+e.scrollLeft-Lg(t,a),n=a.top+e.scrollTop;return{x:r,y:n}}function cU(t){let{elements:e,rect:a,offsetParent:r,strategy:n}=t,i=n==="fixed",o=hi(r),s=e?_d(e.floating):!1;if(r===o||s&&i)return a;let l={scrollLeft:0,scrollTop:0},u=fi(1),c=fi(0),f=Fi(r);if((f||!i)&&((yl(r)!=="body"||Bd(o))&&(l=zd(r)),f)){let h=bl(r);u=Ac(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}let d=o&&!f&&!i?rM(o,l):fi(0);return{width:a.width*u.x,height:a.height*u.y,x:a.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:a.y*u.y-l.scrollTop*u.y+c.y+d.y}}function fU(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function dU(t){let e=zd(t),a=t.ownerDocument.body,r=yn(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),n=yn(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),i=-e.scrollLeft+Lg(t),o=-e.scrollTop;return Sn(a).direction==="rtl"&&(i+=yn(t.clientWidth,a.clientWidth)-r),{width:r,height:n,x:i,y:o}}var hU=25;function pU(t,e,a){a===void 0&&(a="viewport");let r=a==="layoutViewport",n=Ma(t),i=hi(t),o=n.visualViewport,s=i.clientWidth,l=i.clientHeight,u=0,c=0;if(o){let d=!Cg()||e==="fixed";r?d||(u=-o.offsetLeft,c=-o.offsetTop):(s=o.width,l=o.height,d&&(u=o.offsetLeft,c=o.offsetTop))}if(Lg(i)<=0){let d=i.ownerDocument,h=d.body,p=getComputedStyle(h),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,x=Math.abs(i.clientWidth-h.clientWidth-m),g=getComputedStyle(i).scrollbarGutter==="stable both-edges"?x/2:x;g<=hU&&(s-=g)}return{width:s,height:l,x:u,y:c}}function mU(t,e){let a=bl(t,!0,e==="fixed"),r=a.top+t.clientTop,n=a.left+t.clientLeft,i=Ac(t),o=t.clientWidth*i.x,s=t.clientHeight*i.y,l=n*i.x,u=r*i.y;return{width:o,height:s,x:l,y:u}}function J2(t,e,a){let r;if(e==="viewport"||e==="layoutViewport")r=pU(t,a,e);else if(e==="document")r=dU(hi(t));else if(vn(e))r=mU(e,a);else{let n=aM(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return gl(r)}function gU(t,e){let a=e.get(t);if(a)return a;let r=xl(t,[],!1).filter(s=>vn(s)&&yl(s)!=="body"),n=null,i=Sn(t).position==="fixed",o=i?rs(t):t;for(;vn(o)&&!Ic(o);){let s=Sn(o),l=wg(o),u=n?n.position:i?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&s.position==="static")?r=r.filter(f=>f!==o):n=s,o=rs(o)}return e.set(t,r),r}function OU(t){let{element:e,boundary:a,rootBoundary:r,strategy:n}=t,o=[...a==="clippingAncestors"?_d(e)?[]:gU(e,this._c):[].concat(a),r],s=J2(e,o[0],n),l=s.top,u=s.right,c=s.bottom,f=s.left;for(let d=1;d<o.length;d++){let h=J2(e,o[d],n);l=yn(h.top,l),u=ci(h.right,u),c=ci(h.bottom,c),f=yn(h.left,f)}return{width:u-f,height:c-l,x:f,y:l}}function xU(t){let{width:e,height:a}=tM(t);return{width:e,height:a}}function yU(t,e,a){let r=Fi(e),n=hi(e),i=a==="fixed",o=bl(t,!0,i,e),s={scrollLeft:0,scrollTop:0},l=fi(0);if((r||!i)&&((yl(e)!=="body"||Bd(n))&&(s=zd(e)),r)){let d=bl(e,!0,i,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}!r&&n&&(l.x=Lg(n));let u=n&&!r&&!i?rM(n,s):fi(0),c=o.left+s.scrollLeft-l.x-u.x,f=o.top+s.scrollTop-l.y-u.y;return{x:c,y:f,width:o.width,height:o.height}}function Bv(t){return Sn(t).position==="static"}function eM(t,e){if(!Fi(t)||Sn(t).position==="fixed")return null;if(e)return e(t);let a=t.offsetParent;return hi(t)===a&&(a=a.ownerDocument.body),a}function nM(t,e){let a=Ma(t);if(_d(t))return a;if(!Fi(t)){let n=rs(t);for(;n&&!Ic(n);){if(vn(n)&&!Bv(n))return n;n=rs(n)}return a}let r=eM(t,e);for(;r&&Y2(r)&&Bv(r);)r=eM(r,e);return r&&Ic(r)&&Bv(r)&&!wg(r)?a:r||W2(t)||a}var bU=async function(t){let e=this.getOffsetParent||nM,a=this.getDimensions,r=await a(t.floating);return{reference:yU(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vU(t){return Sn(t).direction==="rtl"}var iM={convertOffsetParentRelativeRectToViewportRelativeRect:cU,getDocumentElement:hi,getClippingRect:OU,getOffsetParent:nM,getElementRects:bU,getClientRects:fU,getDimensions:xU,getScale:Ac,isElement:vn,isRTL:vU};function oM(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function SU(t,e,a){let r=null,n,i=hi(t);function o(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();let d=t.getBoundingClientRect(),{left:h,top:p,width:m,height:x}=d;if(c||e(),!m||!x)return;let g=$d(p),O=$d(i.clientWidth-(h+m)),y=$d(i.clientHeight-(p+x)),b=$d(h),S={rootMargin:-g+"px "+-O+"px "+-y+"px "+-b+"px",threshold:yn(0,ci(1,f))||1},w=!0;function k(T){let Q=T[0].intersectionRatio;if(!oM(d,t.getBoundingClientRect()))return s();if(Q!==f){if(!w)return s();Q?s(!1,Q):n=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(k,{...S,root:i.ownerDocument})}catch{r=new IntersectionObserver(k,S)}r.observe(t)}let l=Ma(t),u=()=>s(a);return l.addEventListener("resize",u),s(!0),()=>{l.removeEventListener("resize",u),o()}}function zv(t,e,a,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=_v(t),c=n||i?[...u?xl(u):[],...e?xl(e):[]]:[];c.forEach(g=>{n&&g.addEventListener("scroll",a),i&&g.addEventListener("resize",a)});let f=u&&s?SU(u,a,i):null,d=-1,h=null;o&&(h=new ResizeObserver(g=>{let[O]=g;O&&O.target===u&&h&&e&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(e)})),a()}),u&&!l&&h.observe(u),e&&h.observe(e));let p,m=l?bl(t):null;l&&x();function x(){let g=bl(t);m&&!oM(m,g)&&a(),m=g,p=requestAnimationFrame(x)}return a(),()=>{var g;c.forEach(O=>{n&&O.removeEventListener("scroll",a),i&&O.removeEventListener("resize",a)}),f?.(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(p)}}var sM=V2;var lM=U2,uM=X2,cM=F2,fM=q2,Nv=N2;var dM=j2,Xv=(t,e,a)=>{let r=new Map,n=a??{},i={...iM,...n.platform,_c:r};return z2(t,e,{...n,platform:i})};var $t=L(F(),1),pM=L(F(),1),mM=L(Es(),1),wU=typeof document<"u",CU=function(){},Tg=wU?pM.useLayoutEffect:CU;function Pg(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let a,r,n;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(a=t.length,a!==e.length)return!1;for(r=a;r--!==0;)if(!Pg(t[r],e[r]))return!1;return!0}if(n=Object.keys(t),a=n.length,a!==Object.keys(e).length)return!1;for(r=a;r--!==0;)if(!{}.hasOwnProperty.call(e,n[r]))return!1;for(r=a;r--!==0;){let i=n[r];if(!(i==="_owner"&&t.$$typeof)&&!Pg(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function gM(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function hM(t,e){let a=gM(t);return Math.round(e*a)/a}function qv(t){let e=$t.useRef(t);return Tg(()=>{e.current=t}),e}function OM(t){t===void 0&&(t={});let{placement:e="bottom",strategy:a="absolute",middleware:r=[],platform:n,elements:{reference:i,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=t,[c,f]=$t.useState({x:0,y:0,strategy:a,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=$t.useState(r);Pg(d,r)||h(r);let[p,m]=$t.useState(null),[x,g]=$t.useState(null),O=$t.useCallback(re=>{re!==S.current&&(S.current=re,m(re))},[]),y=$t.useCallback(re=>{re!==w.current&&(w.current=re,g(re))},[]),b=i||p,v=o||x,S=$t.useRef(null),w=$t.useRef(null),k=$t.useRef(c),T=l!=null,Q=qv(l),$=qv(n),A=qv(u),R=$t.useCallback(()=>{if(!S.current||!w.current)return;let re={placement:e,strategy:a,middleware:d};$.current&&(re.platform=$.current),Xv(S.current,w.current,re).then(ie=>{let z={...ie,isPositioned:A.current!==!1};D.current&&!Pg(k.current,z)&&(k.current=z,mM.flushSync(()=>{f(z)}))})},[d,e,a,$,A]);Tg(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(re=>({...re,isPositioned:!1})))},[u]);let D=$t.useRef(!1);Tg(()=>(D.current=!0,()=>{D.current=!1}),[]),Tg(()=>{if(b&&(S.current=b),v&&(w.current=v),b&&v){if(Q.current)return Q.current(b,v,R);R()}},[b,v,R,Q,T]);let Y=$t.useMemo(()=>({reference:S,floating:w,setReference:O,setFloating:y}),[O,y]),B=$t.useMemo(()=>({reference:b,floating:v}),[b,v]),q=$t.useMemo(()=>{let re={position:a,left:0,top:0};if(!B.floating)return re;let ie=hM(B.floating,c.x),z=hM(B.floating,c.y);return s?{...re,transform:"translate("+ie+"px, "+z+"px)",...gM(B.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:ie,top:z}},[a,s,B.floating,c.x,c.y]);return $t.useMemo(()=>({...c,update:R,refs:Y,elements:B,floatingStyles:q}),[c,R,Y,B,q])}var kU=t=>{function e(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:t,fn(a){let{element:r,padding:n}=typeof t=="function"?t(a):t;return r&&e(r)?r.current!=null?Nv({element:r.current,padding:n}).fn(a):{}:r?Nv({element:r,padding:n}).fn(a):{}}}},xM=(t,e)=>{let a=sM(t);return{name:a.name,fn:a.fn,options:[t,e]}},yM=(t,e)=>{let a=lM(t);return{name:a.name,fn:a.fn,options:[t,e]}},bM=(t,e)=>({fn:dM(t).fn,options:[t,e]}),vM=(t,e)=>{let a=uM(t);return{name:a.name,fn:a.fn,options:[t,e]}},SM=(t,e)=>{let a=cM(t);return{name:a.name,fn:a.fn,options:[t,e]}};var wM=(t,e)=>{let a=fM(t);return{name:a.name,fn:a.fn,options:[t,e]}};var CM=(t,e)=>{let a=kU(t);return{name:a.name,fn:a.fn,options:[t,e]}};var kM=L(F(),1);var Zv=L(G(),1),LU=Object.defineProperty,TU=(t,e)=>LU(t,"name",{value:e,configurable:!0}),PU=kM.forwardRef(TU(function(e,a){let{children:r,width:n=10,height:i=5,...o}=e;return(0,Zv.jsx)(ue.svg,{...o,ref:a,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,Zv.jsx)("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),LM=PU;var ns=L(G(),1),IU=Object.defineProperty,Hi=(t,e)=>IU(t,"name",{value:e,configurable:!0});var TM="Popper",[PM,Vv]=ca(TM),[AU,RM]=PM(TM),QU=Hi(t=>{let{__scopePopper:e,children:a}=t,[r,n]=da.useState(null),[i,o]=da.useState(void 0);return(0,ns.jsx)(AU,{scope:e,anchor:r,onAnchorChange:n,placementState:i,setPlacementState:o,children:a})},"Popper"),MU="PopperAnchor",EU=da.forwardRef(Hi(function(e,a){let{__scopePopper:r,virtualRef:n,...i}=e,o=RM(MU,r),s=da.useRef(null),l=o.onAnchorChange,u=da.useCallback(m=>{s.current=m,m&&l(m)},[l]),c=Qe(a,u),f=da.useRef(null);da.useEffect(()=>{if(!n)return;let m=f.current;f.current=n.current,m!==f.current&&l(f.current)});let d=o.placementState&&Rg(o.placementState),h=d?.[0],p=d?.[1];return n?null:(0,ns.jsx)(ue.div,{"data-radix-popper-side":h,"data-radix-popper-align":p,...i,ref:c})},"PopperAnchor")),IM="PopperContent",[DU,$U]=PM(IM),BU=da.forwardRef(Hi(function(e,a){let{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...x}=e,g=RM(IM,r),[O,y]=da.useState(null),b=Qe(a,y),[v,S]=da.useState(null),w=Mv(v),k=w?.width??0,T=w?.height??0,Q=n+(o!=="center"?"-"+o:""),$=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},A=Array.isArray(c)?c:[c],R=A.length>0,D={padding:$,boundary:A.filter(AM),altBoundary:R},{refs:Y,floatingStyles:B,placement:q,isPositioned:re,middlewareData:ie}=OM({strategy:"fixed",placement:Q,whileElementsMounted:Hi((...Z)=>zv(...Z,{animationFrame:p==="always"}),"whileElementsMounted"),elements:{reference:g.anchor},middleware:[xM({mainAxis:i+T,alignmentAxis:s}),u&&yM({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?bM():void 0,...D}),u&&vM({...D}),SM({...D,apply:Hi(({elements:Z,rects:qe,availableWidth:Re,availableHeight:Ie})=>{let{width:Ze,height:Vt}=qe.reference,Za=Z.floating.style;Za.setProperty("--radix-popper-available-width",`${Re}px`),Za.setProperty("--radix-popper-available-height",`${Ie}px`),Za.setProperty("--radix-popper-anchor-width",`${Ze}px`),Za.setProperty("--radix-popper-anchor-height",`${Vt}px`)},"apply")}),v&&CM({element:v,padding:l}),XU({arrowWidth:k,arrowHeight:T}),h&&wM({strategy:"referenceHidden",...D,boundary:R?D.boundary:void 0})]}),z=g.setPlacementState;Xe(()=>(z(q),()=>{z(void 0)}),[q,z]);let[Pe,P]=Rg(q),H=ya(m);Xe(()=>{re&&H?.()},[re,H]);let N=ie.arrow?.x,M=ie.arrow?.y,j=ie.arrow?.centerOffset!==0,[de,ee]=da.useState();return Xe(()=>{O&&ee(window.getComputedStyle(O).zIndex)},[O]),(0,ns.jsx)("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:re?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(" "),...ie.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,ns.jsx)(DU,{scope:r,placedSide:Pe,placedAlign:P,onArrowChange:S,arrowX:N,arrowY:M,shouldHideArrow:j,children:(0,ns.jsx)(ue.div,{"data-side":Pe,"data-align":P,...x,ref:b,style:{...x.style,animation:re?x.style?.animation:"none"}})})})},"PopperContent")),_U="PopperArrow",zU={top:"bottom",right:"left",bottom:"top",left:"right"},NU=da.forwardRef(Hi(function(e,a){let{__scopePopper:r,...n}=e,i=$U(_U,r),o=zU[i.placedSide];return(0,ns.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,ns.jsx)(LM,{...n,ref:a,style:{...n.style,display:"block"}})})},"PopperArrow"));function AM(t){return t!==null}Hi(AM,"isNotNull");var XU=Hi(t=>({name:"transformOrigin",options:t,fn(e){let{placement:a,rects:r,middlewareData:n}=e,o=n.arrow?.centerOffset!==0,s=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=Rg(a),f={start:"0%",center:"50%",end:"100%"}[c],d=(n.arrow?.x??0)+s/2,h=(n.arrow?.y??0)+l/2,p="",m="";return u==="bottom"?(p=o?f:`${d}px`,m=`${-l}px`):u==="top"?(p=o?f:`${d}px`,m=`${r.floating.height+l}px`):u==="right"?(p=`${-l}px`,m=o?f:`${h}px`):u==="left"&&(p=`${r.floating.width+l}px`,m=o?f:`${h}px`),{data:{x:p,y:m}}}}),"transformOrigin");function Rg(t){let[e,a="center"]=t.split("-");return[e,a]}Hi(Rg,"getSideAndAlignFromPlacement");var QM=QU,MM=EU,EM=BU,DM=NU;var Kt=L(F(),1);var VU=L(F(),1),Ig=L(F(),1),ZU=Object.defineProperty,jv=(t,e)=>ZU(t,"name",{value:e,configurable:!0}),Uv=!1;function $M(){let[t,e]=Ig.useState(Uv);return Ig.useEffect(()=>{Uv||(Uv=!0,e(!0))},[]),t}jv($M,"useIsHydrated");var BM=VU[" useSyncExternalStore ".trim().toString()];function _M(){return()=>{}}jv(_M,"subscribe");function zM(){return BM(_M,()=>!0,()=>!1)}jv(zM,"useIsHydratedModern");var NM=typeof BM=="function"?zM:$M;var is=L(G(),1),UU=Object.defineProperty,vl=(t,e)=>UU(t,"name",{value:e,configurable:!0}),Fv="rovingFocusGroup.onEntryFocus",jU={bubbles:!1,cancelable:!0},Ag="RovingFocusGroup",[Hv,XM,FU]=Td(Ag),[HU,Qc]=ca(Ag,[FU]),[GU,YU]=HU(Ag),WU=Kt.forwardRef(vl(function(e,a){return(0,is.jsx)(Hv.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,is.jsx)(Hv.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,is.jsx)(KU,{...e,ref:a})})})},"RovingFocusGroup")),KU=Kt.forwardRef(vl(function(e,a){let{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...d}=e,h=Kt.useRef(null),p=Qe(a,h),m=Vi(o),[x,g]=Aa({prop:s,defaultProp:l??null,onChange:u,caller:Ag}),[O,y]=Kt.useState(!1),b=ya(c),v=XM(r),S=Kt.useRef(!1),[w,k]=Kt.useState(0);return Kt.useEffect(()=>{let T=h.current;if(T)return T.addEventListener(Fv,b),()=>T.removeEventListener(Fv,b)},[b]),(0,is.jsx)(GU,{scope:r,orientation:n,dir:m,loop:i,currentTabStopId:x,onItemFocus:Kt.useCallback(T=>g(T),[g]),onItemShiftTab:Kt.useCallback(()=>y(!0),[]),onFocusableItemAdd:Kt.useCallback(()=>k(T=>T+1),[]),onFocusableItemRemove:Kt.useCallback(()=>k(T=>T-1),[]),children:(0,is.jsx)(ue.div,{tabIndex:O||w===0?-1:0,"data-orientation":n,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:xe(e.onMouseDown,()=>{S.current=!0}),onFocus:xe(e.onFocus,T=>{let Q=!S.current;if(T.target===T.currentTarget&&Q&&!O){let $=new CustomEvent(Fv,jU);if(T.currentTarget.dispatchEvent($),!$.defaultPrevented){let A=v().filter(q=>q.focusable),R=A.find(q=>q.active),D=A.find(q=>q.id===x),B=[R,D,...A].filter(Boolean).map(q=>q.ref.current);Gv(B,f)}}S.current=!1}),onBlur:xe(e.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),JU="RovingFocusGroupItem",ej=Kt.forwardRef(vl(function(e,a){let{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:o,children:s,...l}=e,u=Dt(),c=o||u,f=YU(JU,r),d=f.currentTabStopId===c,h=XM(r),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:x}=f,g=NM();return Xe(()=>{if(!(!g||!n))return p(),()=>m()},[g,n,p,m]),Kt.useEffect(()=>{if(!(g||!n))return p(),()=>m()},[g,n,p,m]),(0,is.jsx)(Hv.ItemSlot,{scope:r,id:c,focusable:n,active:i,children:(0,is.jsx)(ue.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...l,ref:a,onMouseDown:xe(e.onMouseDown,O=>{n?f.onItemFocus(c):O.preventDefault()}),onFocus:xe(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:xe(e.onKeyDown,O=>{if(O.key==="Tab"&&O.shiftKey){f.onItemShiftTab();return}if(O.target!==O.currentTarget)return;let y=ZM(O,f.orientation,f.dir);if(y!==void 0){if(O.metaKey||O.ctrlKey||O.altKey||O.shiftKey)return;O.preventDefault();let v=h().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")v.reverse();else if(y==="prev"||y==="next"){y==="prev"&&v.reverse();let S=v.indexOf(O.currentTarget);v=f.loop?VM(v,S+1):v.slice(S+1)}setTimeout(()=>Gv(v))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:x!=null}):s})})},"RovingFocusGroupItem")),tj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qM(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}vl(qM,"getDirectionAwareKey");function ZM(t,e,a){let r=qM(t.key,a);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return tj[r]}vl(ZM,"getFocusIntent");function Gv(t,e=!1){let a=document.activeElement;for(let r of t)if(r===a||(r.focus({preventScroll:e}),document.activeElement!==a))return}vl(Gv,"focusFirst");function VM(t,e){return t.map((a,r)=>t[(e+r)%t.length])}vl(VM,"wrapArray");var Qg=WU,Mg=ej;var Eg={};cu(Eg,{Label:()=>HM,Root:()=>nj});var jM=L(F(),1);var FM=L(G(),1),aj=Object.defineProperty,rj=(t,e)=>aj(t,"name",{value:e,configurable:!0}),HM=jM.forwardRef(rj(function(e,a){return(0,FM.jsx)(ue.label,{...e,ref:a,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),nj=HM;var Dg=L(F(),1),ij=Object.defineProperty,oj=(t,e)=>ij(t,"name",{value:e,configurable:!0});function Yv(t){let e=Dg.useRef({value:t,previous:t});return Dg.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}oj(Yv,"usePrevious");var sj=Object.defineProperty,lj=(t,e)=>sj(t,"name",{value:e,configurable:!0});function $g(t,[e,a]){return Math.min(a,Math.max(e,t))}lj($g,"clamp");var Ea={};cu(Ea,{Arrow:()=>Gj,Content:()=>Tj,Group:()=>Bj,Icon:()=>Sj,Item:()=>Xj,ItemIndicator:()=>Vj,ItemText:()=>qj,Label:()=>zj,Portal:()=>Lj,Root:()=>Oj,ScrollDownButton:()=>jj,ScrollUpButton:()=>Uj,Select:()=>Oj,SelectArrow:()=>Gj,SelectContent:()=>Tj,SelectGroup:()=>Bj,SelectIcon:()=>Sj,SelectItem:()=>Xj,SelectItemIndicator:()=>Vj,SelectItemText:()=>qj,SelectLabel:()=>zj,SelectPortal:()=>Lj,SelectScrollDownButton:()=>jj,SelectScrollUpButton:()=>Uj,SelectSeparator:()=>Fj,SelectTrigger:()=>yj,SelectValue:()=>vj,SelectViewport:()=>Mj,Separator:()=>Fj,Trigger:()=>yj,Value:()=>vj,Viewport:()=>Mj,createSelectScope:()=>hj,unstable_BubbleInput:()=>aE,unstable_Provider:()=>Jv,unstable_SelectBubbleInput:()=>aE,unstable_SelectProvider:()=>Jv});var V=L(F(),1),Kv=L(Es(),1);var le=L(G(),1),uj=Object.defineProperty,ke=(t,e)=>uj(t,"name",{value:e,configurable:!0}),cj=[" ","Enter","ArrowUp","ArrowDown"],fj=[" ","Enter"],Mc="Select",[_g,zg,dj]=Td(Mc),[wl,hj]=ca(Mc,[dj,Vv]),Ng=Vv(),[pj,os]=wl(Mc),[mj,gj]=wl(Mc);function Jv(t){let{__scopeSelect:e,children:a,open:r,defaultOpen:n,onOpenChange:i,value:o,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:f,disabled:d,required:h,form:p,internal_do_not_use_render:m}=t,x=Ng(e),[g,O]=V.useState(null),[y,b]=V.useState(null),[v,S]=V.useState(!1),w=Vi(u),[k,T]=Aa({prop:r,defaultProp:n??!1,onChange:i,caller:Mc}),[Q,$]=Aa({prop:o,defaultProp:s,onChange:l,caller:Mc}),A=V.useRef(null),R=V.useRef(Q);V.useEffect(()=>{let P=p?g?.ownerDocument.getElementById(p):g?.form;if(P instanceof HTMLFormElement){let H=ke(()=>$(R.current),"reset");return P.addEventListener("reset",H),()=>P.removeEventListener("reset",H)}},[p,g,$]);let D=g?!!p||!!g.closest("form"):!0,[Y,B]=V.useState(new Set),q=Dt(),re=Array.from(Y).map(P=>P.props.value).join(";"),ie=V.useCallback(P=>{B(H=>new Set(H).add(P))},[]),z=V.useCallback(P=>{B(H=>{let N=new Set(H);return N.delete(P),N})},[]),Pe={required:h,trigger:g,onTriggerChange:O,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:v,onValueNodeHasChildrenChange:S,contentId:q,value:Q,onValueChange:$,open:k,onOpenChange:T,dir:w,triggerPointerDownPosRef:A,disabled:d,name:c,autoComplete:f,form:p,nativeOptions:Y,nativeSelectKey:re,isFormControl:D};return(0,le.jsx)(QM,{...x,children:(0,le.jsx)(pj,{scope:e,...Pe,children:(0,le.jsx)(_g.Provider,{scope:e,children:(0,le.jsx)(mj,{scope:e,onNativeOptionAdd:ie,onNativeOptionRemove:z,children:rE(m)?m(Pe):a})})})})}ke(Jv,"SelectProvider");var Oj=ke(t=>{let{__scopeSelect:e,children:a,...r}=t;return(0,le.jsx)(Jv,{__scopeSelect:e,...r,internal_do_not_use_render:({isFormControl:n})=>(0,le.jsxs)(le.Fragment,{children:[a,n?(0,le.jsx)(aE,{__scopeSelect:e}):null]})})},"Select"),xj="SelectTrigger",yj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,disabled:n=!1,...i}=e,o=Ng(r),s=os(xj,r),l=s.disabled||n,u=Qe(a,s.onTriggerChange),c=zg(r),f=V.useRef("touch"),[d,h,p]=tS(x=>{let g=c().filter(b=>!b.disabled),O=g.find(b=>b.value===s.value),y=aS(g,x,O);y!==void 0&&s.onValueChange(y.value)}),m=ke(x=>{l||(s.onOpenChange(!0),p()),x&&(s.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})},"handleOpen");return(0,le.jsx)(MM,{asChild:!0,...o,children:(0,le.jsx)(ue.button,{type:"button",role:"combobox","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Nd(s.value)?"":void 0,...i,ref:u,onClick:xe(i.onClick,x=>{x.currentTarget.focus(),f.current!=="mouse"&&m(x)}),onPointerDown:xe(i.onPointerDown,x=>{f.current=x.pointerType;let g=x.target;g.hasPointerCapture(x.pointerId)&&g.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(m(x),x.preventDefault())}),onKeyDown:xe(i.onKeyDown,x=>{let g=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&h(x.key),!(g&&x.key===" ")&&cj.includes(x.key)&&(m(),x.preventDefault())})})})},"SelectTrigger")),bj="SelectValue",vj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,className:n,style:i,children:o,placeholder:s="",...l}=e,u=os(bj,r),{onValueNodeHasChildrenChange:c}=u,f=o!==void 0,d=Qe(a,u.onValueNodeChange);Xe(()=>{c(f)},[c,f]);let h=Nd(u.value);return(0,le.jsx)(ue.span,{...l,asChild:h?!1:l.asChild,ref:d,style:{pointerEvents:"none"},children:(0,le.jsx)(V.Fragment,{children:h?s:o},h?"placeholder":"value")})},"SelectValue")),Sj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,children:n,...i}=e;return(0,le.jsx)(ue.span,{"aria-hidden":!0,...i,ref:a,children:n||"\u25BC"})},"SelectIcon")),wj="SelectPortal",[Cj,kj]=wl(wj,{forceMount:void 0}),Lj=ke(t=>{let{__scopeSelect:e,forceMount:a,...r}=t;return(0,le.jsx)(Cj,{scope:t.__scopeSelect,forceMount:a,children:(0,le.jsx)(og,{asChild:!0,...r})})},"SelectPortal"),Sl="SelectContent",Tj=V.forwardRef(ke(function(e,a){let r=kj(Sl,e.__scopeSelect),{forceMount:n=r.forceMount,...i}=e,o=os(Sl,e.__scopeSelect),[s,l]=V.useState();return Xe(()=>{l(new DocumentFragment)},[]),(0,le.jsx)(as,{present:n||o.open,children:({present:u})=>u?(0,le.jsx)(Ij,{...i,ref:a}):(0,le.jsx)(Pj,{...i,fragment:s})})},"SelectContent")),Pj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,children:n,fragment:i}=e;return i?Kv.createPortal((0,le.jsx)(JM,{scope:r,children:(0,le.jsx)(_g.Slot,{scope:r,children:(0,le.jsx)("div",{ref:a,children:n})})}),i):null},"SelectContentFragment")),wn=10,[JM,ss]=wl(Sl),Rj=Ia("SelectContent.RemoveScroll"),Ij=V.forwardRef(ke(function(e,a){let{__scopeSelect:r}=e,{position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:l,sideOffset:u,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:x,avoidCollisions:g,...O}=e,y=os(Sl,r),[b,v]=V.useState(null),[S,w]=V.useState(null),k=Qe(a,v),[T,Q]=V.useState(null),[$,A]=V.useState(null),R=zg(r),[D,Y]=V.useState(!1),B=V.useRef(!1);V.useEffect(()=>{if(b)return gg(b)},[b]),kc();let q=V.useCallback(ee=>{let[Z,...qe]=R().map(Ze=>Ze.ref.current),[Re]=qe.slice(-1),Ie=document.activeElement;for(let Ze of ee)if(Ze===Ie||(Ze?.scrollIntoView({block:"nearest"}),Ze===Z&&S&&(S.scrollTop=0),Ze===Re&&S&&(S.scrollTop=S.scrollHeight),Ze?.focus(),document.activeElement!==Ie))return},[R,S]),re=V.useCallback(()=>q([T,b]),[q,T,b]);V.useEffect(()=>{D&&re()},[D,re]);let{onOpenChange:ie,triggerPointerDownPosRef:z}=y;V.useEffect(()=>{if(b){let ee={x:0,y:0},Z=ke(Re=>{ee={x:Math.abs(Math.round(Re.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(Re.pageY)-(z.current?.y??0))}},"handlePointerMove"),qe=ke(Re=>{ee.x<=10&&ee.y<=10?Re.preventDefault():Re.composedPath().includes(b)||ie(!1),document.removeEventListener("pointermove",Z),z.current=null},"handlePointerUp");return z.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",qe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",qe,{capture:!0})}}},[b,ie,z]),V.useEffect(()=>{let ee=ke(()=>ie(!1),"close");return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[ie]);let[Pe,P]=tS(ee=>{let Z=R().filter(Ie=>!Ie.disabled),qe=Z.find(Ie=>Ie.ref.current===document.activeElement),Re=aS(Z,ee,qe);Re&&setTimeout(()=>Re.ref.current?.focus())}),H=V.useCallback((ee,Z,qe)=>{let Re=!B.current&&!qe;(y.value!==void 0&&y.value===Z||Re)&&(Q(ee),Re&&(B.current=!0))},[y.value]),N=V.useCallback(()=>b?.focus(),[b]),M=V.useCallback((ee,Z,qe)=>{let Re=!B.current&&!qe;(y.value!==void 0&&y.value===Z||Re)&&A(ee)},[y.value]),j=n==="popper"?GM:Aj,de=j===GM?{side:l,sideOffset:u,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:x,avoidCollisions:g}:{};return(0,le.jsx)(JM,{scope:r,content:b,viewport:S,onViewportChange:w,itemRefCallback:H,selectedItem:T,onItemLeave:N,itemTextRefCallback:M,focusSelectedItem:re,selectedItemText:$,position:n,isPositioned:D,searchRef:Pe,children:(0,le.jsx)(Qd,{as:Rj,allowPinchZoom:!0,children:(0,le.jsx)(ng,{asChild:!0,trapped:y.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:xe(i,ee=>{y.trigger?.focus({preventScroll:!0}),ee.preventDefault()}),children:(0,le.jsx)(rg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,le.jsx)(j,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:ee=>ee.preventDefault(),...O,...de,onPlaced:()=>Y(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...O.style},onKeyDown:xe(O.onKeyDown,ee=>{let Z=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!Z&&ee.key.length===1&&P(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let Re=R().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(Re=Re.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){let Ie=ee.target,Ze=Re.indexOf(Ie);Re=Re.slice(Ze+1)}setTimeout(()=>q(Re)),ee.preventDefault()}})})})})})})},"SelectContentImpl")),Aj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,onPlaced:n,...i}=e,o=os(Sl,r),s=ss(Sl,r),[l,u]=V.useState(null),[c,f]=V.useState(null),d=Qe(a,f),h=zg(r),p=V.useRef(!1),m=V.useRef(!0),{viewport:x,selectedItem:g,selectedItemText:O,focusSelectedItem:y}=s,b=V.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&c&&x&&g&&O){let k=o.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),Q=o.valueNode.getBoundingClientRect(),$=O.getBoundingClientRect();if(o.dir!=="rtl"){let Ie=$.left-T.left,Ze=Q.left-Ie,Vt=k.left-Ze,Za=k.width+Vt,iu=Math.max(Za,T.width),Si=window.innerWidth-wn,ou=$g(Ze,[wn,Math.max(wn,Si-iu)]);l.style.minWidth=Za+"px",l.style.left=ou+"px"}else{let Ie=T.right-$.right,Ze=window.innerWidth-Q.right-Ie,Vt=window.innerWidth-k.right-Ze,Za=k.width+Vt,iu=Math.max(Za,T.width),Si=window.innerWidth-wn,ou=$g(Ze,[wn,Math.max(wn,Si-iu)]);l.style.minWidth=Za+"px",l.style.right=ou+"px"}let A=h(),R=window.innerHeight-wn*2,D=x.scrollHeight,Y=window.getComputedStyle(c),B=parseInt(Y.borderTopWidth,10),q=parseInt(Y.paddingTop,10),re=parseInt(Y.borderBottomWidth,10),ie=parseInt(Y.paddingBottom,10),z=B+q+D+ie+re,Pe=Math.min(g.offsetHeight*5,z),P=window.getComputedStyle(x),H=parseInt(P.paddingTop,10),N=parseInt(P.paddingBottom,10),M=k.top+k.height/2-wn,j=R-M,de=g.offsetHeight/2,ee=g.offsetTop+de,Z=B+q+ee,qe=z-Z;if(Z<=M){let Ie=A.length>0&&g===A[A.length-1].ref.current;l.style.bottom="0px";let Ze=c.clientHeight-x.offsetTop-x.offsetHeight,Vt=Math.max(j,de+(Ie?N:0)+Ze+re),Za=Z+Vt;l.style.height=Za+"px"}else{let Ie=A.length>0&&g===A[0].ref.current;l.style.top="0px";let Vt=Math.max(M,B+x.offsetTop+(Ie?H:0)+de)+qe;l.style.height=Vt+"px",x.scrollTop=Z-M+x.offsetTop}l.style.margin=`${wn}px 0`,l.style.minHeight=Pe+"px",l.style.maxHeight=R+"px",n?.(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,l,c,x,g,O,o.dir,n]);Xe(()=>b(),[b]);let[v,S]=V.useState();Xe(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);let w=V.useCallback(k=>{k&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]);return(0,le.jsx)(Qj,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:w,children:(0,le.jsx)("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:v},children:(0,le.jsx)(ue.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})},"SelectItemAlignedPosition")),GM=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,align:n="start",collisionPadding:i=wn,...o}=e,s=Ng(r);return(0,le.jsx)(EM,{...s,...o,ref:a,align:n,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Qj,eS]=wl(Sl,{}),YM="SelectViewport",Mj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,nonce:n,...i}=e,o=ss(YM,r),s=eS(YM,r),l=Qe(a,o.onViewportChange),u=V.useRef(0);return(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,le.jsx)(_g.Slot,{scope:r,children:(0,le.jsx)(ue.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:xe(i.onScroll,c=>{let f=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=s;if(h?.current&&d){let p=Math.abs(u.current-f.scrollTop);if(p>0){let m=window.innerHeight-wn*2,x=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),O=Math.max(x,g);if(O<m){let y=O+p,b=Math.min(m,y),v=y-b;d.style.height=b+"px",d.style.bottom==="0px"&&(f.scrollTop=v>0?v:0,d.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})},"SelectViewport")),Ej="SelectGroup",[Dj,$j]=wl(Ej),Bj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,...n}=e,i=Dt();return(0,le.jsx)(Dj,{scope:r,id:i,children:(0,le.jsx)(ue.div,{role:"group","aria-labelledby":i,...n,ref:a})})},"SelectGroup")),_j="SelectLabel",zj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,...n}=e,i=$j(_j,r);return(0,le.jsx)(ue.div,{id:i.id,...n,ref:a})},"SelectLabel")),Wv="SelectItem",[Nj,eE]=wl(Wv),Xj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,value:n,disabled:i=!1,textValue:o,...s}=e,l=os(Wv,r),u=ss(Wv,r),c=l.value===n,[f,d]=V.useState(o??""),[h,p]=V.useState(!1),m=ya(b=>u.itemRefCallback?.(b,n,i)),x=Qe(a,m),g=Dt(),O=V.useRef("touch"),y=ke(()=>{i||(l.onValueChange(n),l.onOpenChange(!1))},"handleSelect");return(0,le.jsx)(Nj,{scope:r,value:n,disabled:i,textId:g,isSelected:c,onItemTextChange:V.useCallback(b=>{d(v=>v||(b?.textContent??"").trim())},[]),children:(0,le.jsx)(_g.ItemSlot,{scope:r,value:n,disabled:i,textValue:f,children:(0,le.jsx)(ue.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:x,onFocus:xe(s.onFocus,()=>p(!0)),onBlur:xe(s.onBlur,()=>p(!1)),onClick:xe(s.onClick,()=>{O.current!=="mouse"&&y()}),onPointerUp:xe(s.onPointerUp,()=>{O.current==="mouse"&&y()}),onPointerDown:xe(s.onPointerDown,b=>{O.current=b.pointerType}),onPointerMove:xe(s.onPointerMove,b=>{O.current=b.pointerType,i?u.onItemLeave?.():O.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:xe(s.onPointerLeave,b=>{b.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:xe(s.onKeyDown,b=>{i||b.target!==b.currentTarget||u.searchRef?.current!==""&&b.key===" "||(fj.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})},"SelectItem")),Bg="SelectItemText",qj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,className:n,style:i,...o}=e,s=os(Bg,r),l=ss(Bg,r),u=eE(Bg,r),c=gj(Bg,r),[f,d]=V.useState(null),h=ya(y=>l.itemTextRefCallback?.(y,u.value,u.disabled)),p=Qe(a,d,u.onItemTextChange,h),m=f?.textContent,x=V.useMemo(()=>(0,le.jsx)("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:O}=c;return Xe(()=>(g(x),()=>O(x)),[g,O,x]),(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)(ue.span,{id:u.textId,...o,ref:p}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!Nd(s.value)?Kv.createPortal(o.children,s.valueNode):null]})},"SelectItemText")),Zj="SelectItemIndicator",Vj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,...n}=e;return eE(Zj,r).isSelected?(0,le.jsx)(ue.span,{"aria-hidden":!0,...n,ref:a}):null},"SelectItemIndicator")),WM="SelectScrollUpButton",Uj=V.forwardRef(ke(function(e,a){let r=ss(WM,e.__scopeSelect),n=eS(WM,e.__scopeSelect),[i,o]=V.useState(!1),s=Qe(a,n.onScrollButtonChange);return Xe(()=>{if(r.viewport&&r.isPositioned){let u=function(){let f=c.scrollTop>0;o(f)};var l=u;ke(u,"handleScroll");let c=r.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?(0,le.jsx)(tE,{...e,ref:s,onAutoScroll:()=>{let{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null},"SelectScrollUpButton")),KM="SelectScrollDownButton",jj=V.forwardRef(ke(function(e,a){let r=ss(KM,e.__scopeSelect),n=eS(KM,e.__scopeSelect),[i,o]=V.useState(!1),s=Qe(a,n.onScrollButtonChange);return Xe(()=>{if(r.viewport&&r.isPositioned){let u=function(){let f=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<f;o(d)};var l=u;ke(u,"handleScroll");let c=r.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?(0,le.jsx)(tE,{...e,ref:s,onAutoScroll:()=>{let{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null},"SelectScrollDownButton")),tE=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,onAutoScroll:n,...i}=e,o=ss("SelectScrollButton",r),s=V.useRef(null),l=zg(r),u=V.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return V.useEffect(()=>()=>u(),[u]),Xe(()=>{l().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),(0,le.jsx)(ue.div,{"aria-hidden":!0,...i,ref:a,style:{flexShrink:0,...i.style},onPointerDown:xe(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:xe(i.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:xe(i.onPointerLeave,()=>{u()})})},"SelectScrollButtonImpl")),Fj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,...n}=e;return(0,le.jsx)(ue.div,{"aria-hidden":!0,...n,ref:a})},"SelectSeparator")),Hj="SelectArrow",Gj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,...n}=e,i=Ng(r);return ss(Hj,r).position==="popper"?(0,le.jsx)(DM,{...i,...n,ref:a}):null},"SelectArrow")),Yj="SelectBubbleInput",aE=V.forwardRef(ke(function({__scopeSelect:e,...a},r){let n=os(Yj,e),{value:i,onValueChange:o,required:s,disabled:l,name:u,autoComplete:c,form:f}=n,{nativeOptions:d,nativeSelectKey:h}=n,p=V.useRef(null),m=Qe(r,p),x=i??"",g=Yv(x),O=Array.from(d).some(y=>(y.props.value??"")==="");return V.useEffect(()=>{let y=p.current;if(!y)return;let b=window.HTMLSelectElement.prototype,S=Object.getOwnPropertyDescriptor(b,"value").set;if(g!==x&&S){let w=new Event("change",{bubbles:!0});S.call(y,x),y.dispatchEvent(w)}},[g,x]),(0,le.jsxs)(ue.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:u,autoComplete:c,disabled:l,form:f,onChange:y=>o(y.target.value),...a,style:{...bQ,...a.style},ref:m,defaultValue:x,children:[Nd(i)&&!O?(0,le.jsx)("option",{value:""}):null,Array.from(d)]},h)},"SelectBubbleInput"));function rE(t){return typeof t=="function"}ke(rE,"isFunction");function Nd(t){return t===""||t===void 0}ke(Nd,"shouldShowPlaceholder");function tS(t){let e=ya(t),a=V.useRef(""),r=V.useRef(0),n=V.useCallback(o=>{let s=a.current+o;e(s),ke((function l(u){a.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}),"updateSearch")(s)},[e]),i=V.useCallback(()=>{a.current="",window.clearTimeout(r.current)},[]);return V.useEffect(()=>()=>window.clearTimeout(r.current),[]),[a,n,i]}ke(tS,"useTypeaheadSearch");function aS(t,e,a){let n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=a?t.indexOf(a):-1,o=nE(t,Math.max(i,0));n.length===1&&(o=o.filter(u=>u!==a));let l=o.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==a?l:void 0}ke(aS,"findNextItem");function nE(t,e){return t.map((a,r)=>t[(e+r)%t.length])}ke(nE,"wrapArray");var Cl={};cu(Cl,{Content:()=>sF,List:()=>iF,Root:()=>nF,Tabs:()=>oE,TabsContent:()=>uE,TabsList:()=>sE,TabsTrigger:()=>lE,Trigger:()=>oF,createTabsScope:()=>Jj});var Yi=L(F(),1);var Gi=L(G(),1),Wj=Object.defineProperty,Ec=(t,e)=>Wj(t,"name",{value:e,configurable:!0}),rS="Tabs",[Kj,Jj]=ca(rS,[Qc]),iE=Qc(),[eF,nS]=Kj(rS),oE=Yi.forwardRef(Ec(function(e,a){let{__scopeTabs:r,value:n,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:l,activationMode:u="automatic",...c}=e,f=Vi(l),[d,h]=Aa({prop:n,onChange:i,defaultProp:o??"",caller:rS});return(0,Gi.jsx)(eF,{scope:r,baseId:Dt(),value:d,onValueChange:h,orientation:s,dir:f,activationMode:u,children:(0,Gi.jsx)(ue.div,{dir:f,"data-orientation":s,...c,ref:a})})},"Tabs")),tF="TabsList",sE=Yi.forwardRef(Ec(function(e,a){let{__scopeTabs:r,loop:n=!0,...i}=e,o=nS(tF,r),s=iE(r);return(0,Gi.jsx)(Qg,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:n,children:(0,Gi.jsx)(ue.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:a})})},"TabsList")),aF="TabsTrigger",lE=Yi.forwardRef(Ec(function(e,a){let{__scopeTabs:r,value:n,disabled:i=!1,...o}=e,s=nS(aF,r),l=iE(r),u=iS(s.baseId,n),c=oS(s.baseId,n),f=n===s.value;return(0,Gi.jsx)(Mg,{asChild:!0,...l,focusable:!i,active:f,children:(0,Gi.jsx)(ue.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:a,onMouseDown:xe(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?s.onValueChange(n):d.preventDefault()}),onKeyDown:xe(e.onKeyDown,d=>{i||d.target!==d.currentTarget||[" ","Enter"].includes(d.key)&&s.onValueChange(n)}),onFocus:xe(e.onFocus,()=>{let d=s.activationMode!=="manual";!f&&!i&&d&&s.onValueChange(n)})})})},"TabsTrigger")),rF="TabsContent",uE=Yi.forwardRef(Ec(function(e,a){let{__scopeTabs:r,value:n,forceMount:i,children:o,...s}=e,l=nS(rF,r),u=iS(l.baseId,n),c=oS(l.baseId,n),f=n===l.value,d=Yi.useRef(f);return Yi.useEffect(()=>{let h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),(0,Gi.jsx)(as,{present:i||f,children:({present:h})=>(0,Gi.jsx)(ue.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:c,tabIndex:0,...s,ref:a,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&o})})},"TabsContent"));function iS(t,e){return`${t}-trigger-${e}`}Ec(iS,"makeTriggerId");function oS(t,e){return`${t}-content-${e}`}Ec(oS,"makeContentId");var nF=oE,iF=sE,oF=lE,sF=uE;var cE=L(F(),1);var fE=L(G(),1),lF=Object.defineProperty,uF=(t,e)=>lF(t,"name",{value:e,configurable:!0}),cF="Toggle",dE=cE.forwardRef(uF(function(e,a){let{pressed:r,defaultPressed:n,onPressedChange:i,...o}=e,[s,l]=Aa({prop:r,onChange:i,defaultProp:n??!1,caller:cF});return(0,fE.jsx)(ue.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:a,onClick:xe(e.onClick,()=>{e.disabled||l(!s)})})},"Toggle"));var Xd={};cu(Xd,{Item:()=>xF,Root:()=>hF,ToggleGroup:()=>hF,ToggleGroupItem:()=>xF,createToggleGroupScope:()=>dF});var $a=L(F(),1);var Da=L(G(),1),fF=Object.defineProperty,ls=(t,e)=>fF(t,"name",{value:e,configurable:!0}),Dc="ToggleGroup",[pE,dF]=ca(Dc,[Qc]),mE=Qc(),hF=$a.forwardRef(ls(function(e,a){let{type:r,...n}=e;if(r==="single")return(0,Da.jsx)(pF,{role:"radiogroup",...n,ref:a});if(r==="multiple")return(0,Da.jsx)(mF,{role:"toolbar",...n,ref:a});throw new Error(`Missing prop \`type\` expected on \`${Dc}\``)},"ToggleGroup")),[gE,OE]=pE(Dc),pF=$a.forwardRef(ls(function(e,a){let{value:r,defaultValue:n,onValueChange:i=ls(()=>{},"onValueChange"),...o}=e,[s,l]=Aa({prop:r,defaultProp:n??"",onChange:i,caller:Dc});return(0,Da.jsx)(gE,{scope:e.__scopeToggleGroup,type:"single",value:$a.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:$a.useCallback(()=>l(""),[l]),children:(0,Da.jsx)(xE,{...o,ref:a})})},"ToggleGroupImplSingle")),mF=$a.forwardRef(ls(function(e,a){let{value:r,defaultValue:n,onValueChange:i=ls(()=>{},"onValueChange"),...o}=e,[s,l]=Aa({prop:r,defaultProp:n??[],onChange:i,caller:Dc}),u=$a.useCallback(f=>l((d=[])=>[...d,f]),[l]),c=$a.useCallback(f=>l((d=[])=>d.filter(h=>h!==f)),[l]);return(0,Da.jsx)(gE,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:c,children:(0,Da.jsx)(xE,{...o,ref:a})})},"ToggleGroupImplMultiple")),[gF,OF]=pE(Dc),xE=$a.forwardRef(ls(function(e,a){let{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:i=!0,orientation:o,dir:s,loop:l=!0,...u}=e,c=mE(r),f=Vi(s),d={dir:f,...u};return(0,Da.jsx)(gF,{scope:r,rovingFocus:i,disabled:n,children:i?(0,Da.jsx)(Qg,{asChild:!0,...c,orientation:o,dir:f,loop:l,children:(0,Da.jsx)(ue.div,{...d,ref:a})}):(0,Da.jsx)(ue.div,{...d,ref:a})})},"ToggleGroupImpl")),sS="ToggleGroupItem",xF=$a.forwardRef(ls(function(e,a){let r=OE(sS,e.__scopeToggleGroup),n=OF(sS,e.__scopeToggleGroup),i=mE(e.__scopeToggleGroup),o=r.value.includes(e.value),s=n.disabled||e.disabled,l={...e,pressed:o,disabled:s},u=$a.useRef(null);return n.rovingFocus?(0,Da.jsx)(Mg,{asChild:!0,...i,focusable:!s,active:o,ref:u,children:(0,Da.jsx)(hE,{...l,ref:a})}):(0,Da.jsx)(hE,{...l,ref:a})},"ToggleGroupItem")),hE=$a.forwardRef(ls(function(e,a){let{__scopeToggleGroup:r,value:n,...i}=e,o=OE(sS,r),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=o.type==="single"?s:void 0;return(0,Da.jsx)(dE,{...l,...i,ref:a,onPressedChange:u=>{u?o.onItemActivate(n):o.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var yE=L(G(),1),yF=si("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function pi({className:t,variant:e="default",asChild:a=!1,...r}){let n=a?yc.Root:"span";return(0,yE.jsx)(n,{"data-slot":"badge","data-variant":e,className:pe(yF({variant:e}),t),...r})}var Sie=L(F(),1);var us=L(G(),1);function kl({className:t,...e}){return(0,us.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,us.jsx)("table",{"data-slot":"table",className:pe("w-full caption-bottom text-sm",t),...e})})}function bE({className:t,...e}){return(0,us.jsx)("thead",{"data-slot":"table-header",className:pe("[&_tr]:border-b",t),...e})}function Ll({className:t,...e}){return(0,us.jsx)("tbody",{"data-slot":"table-body",className:pe("[&_tr:last-child]:border-0",t),...e})}function Tl({className:t,...e}){return(0,us.jsx)("tr",{"data-slot":"table-row",className:pe("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",t),...e})}function Pl({className:t,...e}){return(0,us.jsx)("th",{"data-slot":"table-head",className:pe("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}function Cn({className:t,...e}){return(0,us.jsx)("td",{"data-slot":"table-cell",className:pe("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}var kn=L(G(),1);function cs({faultsByFile:t,label:e}){let a=n=>n.some(({data:i})=>i.severity==="error"),r=Object.entries(t.data.files).sort(([,n],[,i])=>Number(a(i))-Number(a(n)));return(0,kn.jsx)("div",{className:"overflow-hidden rounded-[14px] border bg-background",children:(0,kn.jsx)(kl,{"aria-label":e,children:(0,kn.jsx)(Ll,{children:r.map(([n,i])=>(0,kn.jsxs)(Tl,{className:"border-zinc-100 align-top hover:bg-transparent",children:[(0,kn.jsx)(Cn,{className:`w-[210px] py-[11px] pl-4 font-mono text-[11.5px] font-bold whitespace-normal break-all ${a(i)?"text-destructive":""}`,children:n}),(0,kn.jsx)(Cn,{className:"space-y-1.5 py-[11px] pr-4 whitespace-normal",children:[...i].sort((o,s)=>+(s.data.severity==="error")-+(o.data.severity==="error")).map(({data:{severity:o,message:s,fix:l}})=>(0,kn.jsxs)("p",{className:"text-xs leading-[1.55] text-zinc-700",children:[(0,kn.jsx)(pi,{className:`mr-2 rounded-[5px] px-[7px] py-0 align-[1px] text-[11.5px] font-bold tracking-[0.04em] [font-variant-caps:all-small-caps] ${o==="error"?"bg-[#fdeef0] text-[#b91c1c]":"bg-[#fffbeb] text-[#b45309]"}`,children:o}),s," ",(0,kn.jsx)("span",{className:"text-zinc-400",children:l})]},s))})]},n))})})})}var Pie=L(F(),1);var Xg=L(G(),1),bF=si("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function Ur({className:t,variant:e,...a}){return(0,Xg.jsx)("div",{"data-slot":"alert",role:"alert",className:pe(bF({variant:e}),t),...a})}function jr({className:t,...e}){return(0,Xg.jsx)("div",{"data-slot":"alert-title",className:pe("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...e})}function Fr({className:t,...e}){return(0,Xg.jsx)("div",{"data-slot":"alert-description",className:pe("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",t),...e})}var Qie=L(F(),1);var vE=L(G(),1),vF=si("inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-[10px] text-xs font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-45 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"border border-primary bg-primary font-semibold text-primary-foreground hover:bg-black",destructive:"border bg-background text-destructive hover:border-destructive focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"border bg-background text-zinc-600 hover:border-foreground hover:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 px-3.5 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1.5 rounded-[9px] px-2.5 text-[11.5px] has-[>svg]:px-2",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ae({className:t,variant:e="default",size:a="default",asChild:r=!1,...n}){let i=r?yc.Root:"button";return(0,vE.jsx)(i,{"data-slot":"button","data-variant":e,"data-size":a,className:pe(vF({variant:e,size:a,className:t})),...n})}var _e=L(G(),1);function SE({onBuilt:t}){let e=PA(),a=jm();if(e.data===void 0)return null;let r=e.data;if(r.type==="FaultsByFile")return(0,_e.jsx)(kE,{faultsByFile:r});let{added:n,edited:i,deleted:o,unchanged:s}=r.data,l=[...n.map(u=>["create",u]),...i.map(u=>["update",u]),...o.map(u=>["delete",u]),...s.map(u=>["unchanged",u])];return(0,_e.jsxs)("div",{className:"-mt-[18px]",children:[(0,_e.jsxs)("div",{className:"-mx-5 flex items-center gap-2.5 border-b border-[#f0f0f0] bg-[#f5f8ff] px-4 py-3.5",children:[(0,_e.jsx)("i",{className:"size-2 shrink-0 rounded-full bg-[#1d4ed8]"}),(0,_e.jsx)("span",{className:"text-[12.5px] font-bold",children:"Nothing was written"}),(0,_e.jsxs)("p",{className:"min-w-0 text-[11.5px] leading-normal text-zinc-500","aria-label":"Plan counts",children:[l.length," file",l.length===1?"":"s",": ",n.length," create, ",i.length," update, ",o.length," delete,"," ",s.length," unchanged."]})]}),(0,_e.jsx)("div",{className:"-mx-5",children:(0,_e.jsx)(kl,{"aria-label":"Build plan",children:(0,_e.jsx)(Ll,{children:l.map(([u,c])=>(0,_e.jsx)(CE,{pathChange:u,path:c},c))})})}),(0,_e.jsx)("div",{className:ui,children:(0,_e.jsx)(Ae,{disabled:a.isPending,onClick:()=>a.mutate(void 0,{onSuccess:t}),children:"Build"})})]})}function wE({buildAnswer:t}){if(t.type==="FaultsByFile")return(0,_e.jsx)(kE,{faultsByFile:t});let{added:e,edited:a,deleted:r}=t.data,n=[...e,...a];return(0,_e.jsxs)("div",{className:"-mt-[18px] -mb-[18px]",children:[(0,_e.jsxs)("div",{className:"-mx-5 flex items-center gap-2.5 border-b border-[#f0f0f0] bg-[#f5fbf7] px-4 py-3.5",children:[(0,_e.jsx)("i",{className:"size-2 shrink-0 rounded-full bg-[#16a34a]"}),(0,_e.jsxs)("p",{className:"text-[12.5px] font-bold","aria-label":"Build counts",children:["Built ",n.length," file",n.length===1?"":"s",": ",e.length," added, ",a.length," changed, ",r.length," deleted."]})]}),(0,_e.jsx)("div",{className:"-mx-5",children:(0,_e.jsx)(kl,{"aria-label":"Build written",children:(0,_e.jsx)(Ll,{children:[...n.map(i=>["wrote",i]),...r.map(i=>["deleted",i])].map(([i,o])=>(0,_e.jsx)(CE,{pathChange:i,path:o},o))})})})]})}var SF={create:"bg-[#f0fdf4] text-[#15803d]",wrote:"bg-[#f0fdf4] text-[#15803d]",update:"bg-[#eff6ff] text-[#1d4ed8]",delete:"bg-[#fdeef0] text-[#b91c1c]",deleted:"bg-[#fdeef0] text-[#b91c1c]",unchanged:"bg-zinc-50 text-zinc-400"};function CE({pathChange:t,path:e}){return(0,_e.jsxs)(Tl,{className:"border-zinc-100 hover:bg-transparent",children:[(0,_e.jsx)(Cn,{className:"w-28 py-[11px] pl-4",children:(0,_e.jsx)("span",{className:`rounded-[5px] px-[7px] py-0.5 text-[9.5px] font-bold tracking-[0.04em] uppercase ${SF[t]}`,children:t})}),(0,_e.jsx)(Cn,{className:"py-[11px] pr-4 font-mono text-[11.5px] font-bold",children:e})]})}function kE({faultsByFile:t}){return(0,_e.jsxs)("div",{className:"space-y-3.5",children:[(0,_e.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,_e.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:"Nothing was written"}),(0,_e.jsx)(Fr,{children:"The charter has errors, so there is no build until they are fixed."})]}),(0,_e.jsx)(cs,{faultsByFile:t,label:"Refused files"})]})}var yr=L(G(),1);function LE({onBuilt:t}){let e=RA(),a=jm();if(e.data===void 0)return null;let{agents:r,errorCount:n,warnCount:i,pendingCount:o,faultsByFile:s,driftedVendors:l,problemCount:u}=e.data.data,c=[["Agents",r.length===0?"none chosen, so only the neutral surface is compiled.":`${r.join(", ")}.`],["Charter",n>0?`${n} error${n===1?"":"s"}.`:i===0?"holds.":`holds, with ${i} warning${i===1?"":"s"}.`],["Vendors",l.length===0?"none edited here.":`edited here: ${l.join(", ")}. Run "git checkout" under .cw/vendor/ to undo, or commit what you meant.`],["Built",o===null?"not known, since the charter does not hold.":o===0?"up to date.":`${o} file${o===1?"":"s"} out of date.`]],[f,d]=n>0?["bg-[#fef6f6]","bg-[#b91c1c]"]:i>0?["bg-[#fffbeb]","bg-[#b45309]"]:["bg-[#f5fbf7]","bg-[#16a34a]"];return(0,yr.jsxs)("div",{className:"-mt-[18px] space-y-4",children:[(0,yr.jsxs)("div",{className:`-mx-5 flex items-center gap-2.5 border-b border-[#f0f0f0] px-4 py-3.5 ${f}`,children:[(0,yr.jsx)("i",{className:`size-2 shrink-0 rounded-full ${d}`}),(0,yr.jsx)("span",{className:"text-[12.5px] font-bold",children:u===0?"Nothing to fix.":`${u} thing${u===1?"":"s"} to fix.`})]}),(0,yr.jsx)("dl",{className:"overflow-hidden rounded-[11px] border border-[#f0f0f0]","aria-label":"Health",children:c.map(([h,p])=>(0,yr.jsxs)("div",{className:"flex items-baseline gap-3 border-b border-zinc-100 px-[13px] py-2.5 last:border-b-0",children:[(0,yr.jsx)("dt",{className:"w-[118px] shrink-0 text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:h}),(0,yr.jsx)("dd",{className:"text-xs",children:p})]},h))}),Object.keys(s.data.files).length>0&&(0,yr.jsx)(cs,{faultsByFile:s,label:"Faults"}),o!==null&&o>0&&(0,yr.jsx)("div",{className:ui,children:(0,yr.jsx)(Ae,{disabled:a.isPending,onClick:()=>a.mutate(void 0,{onSuccess:t}),children:"Build"})})]})}var Se=L(G(),1);function TE({identity:t,onExplain:e}){let{data:a}=SA(t);if(a===void 0)return null;if(a.type==="Fault")return(0,Se.jsxs)(Ln,{title:"Not in this charter",children:[a.data.message," ",(0,Se.jsx)("span",{className:"text-muted-foreground",children:a.data.fix})]});if(a.type==="FaultsByFile")return(0,Se.jsx)(Ln,{title:"Not read",children:"The engine will not read this charter, so there is nothing to explain."});let{primitive:r,activatesWhen:n,useMixins:i,rationale:o,hosts:s,citers:l,mentioners:u,testCasesByFile:c}=a.data,{kind:f,description:d,file:h,layerName:p,headers:m}=r.data,x=({data:b})=>(0,Se.jsx)(Ae,{variant:"link",className:"h-auto rounded-none p-0 font-mono text-[11.5px] font-normal text-[#1d4ed8] underline underline-offset-2",onClick:()=>e(b.identity),children:b.identity},b.identity),g=o===void 0&&typeof m.rationale=="string"?m.rationale:void 0,O=Object.entries(c.data),y=Object.entries(m).filter(([b])=>b!=="id"&&b!=="description");return(0,Se.jsxs)("div",{className:"-mx-5 -my-[18px]",children:[(0,Se.jsxs)(Ln,{title:"What it is",children:[(0,Se.jsx)("b",{className:"font-semibold text-foreground capitalize",children:f})," \u2014 ",d]}),(0,Se.jsx)(Ln,{title:"When it comes up",children:n}),y.length>0&&(0,Se.jsx)(Ln,{title:"What it declares",children:(0,Se.jsx)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 font-mono text-[11.5px]",children:y.map(([b,v])=>(0,Se.jsxs)("div",{className:"contents",children:[(0,Se.jsx)("dt",{className:"text-zinc-400",children:b}),(0,Se.jsx)("dd",{children:typeof v=="string"?v:v.join(", ")})]},b))})}),(i.length>0||o!==void 0||g!==void 0)&&(0,Se.jsxs)(Ln,{title:"What it pulls in",children:[i.map(b=>(0,Se.jsxs)("div",{children:[x(b)," ",(0,Se.jsx)("span",{className:"text-zinc-500",children:"lends its body"})]},b.data.identity)),o!==void 0&&(0,Se.jsxs)("div",{children:[x(o)," ",(0,Se.jsx)("span",{className:"text-zinc-500",children:"the reasoning it cites"})]}),g!==void 0&&(0,Se.jsxs)("div",{className:"text-destructive",children:[(0,Se.jsx)("span",{className:"font-mono",children:g})," (does not resolve)"]})]}),s.length>0&&(0,Se.jsx)(Ln,{title:"Lent to",children:s.map(b=>(0,Se.jsx)("div",{children:x(b)},b.data.identity))}),l.length>0&&(0,Se.jsx)(Ln,{title:"Cited by",children:l.map(b=>(0,Se.jsx)("div",{children:x(b)},b.data.identity))}),u.length>0&&(0,Se.jsx)(Ln,{title:"Mentioned in",children:u.map(b=>(0,Se.jsx)("div",{children:x(b)},b.data.identity))}),(0,Se.jsx)(Ln,{title:"Tested by",children:O.length===0?(0,Se.jsx)("span",{className:"text-zinc-400",children:"No test case names it."}):O.map(([b,v])=>(0,Se.jsxs)("div",{children:[(0,Se.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:b}),v.map(S=>(0,Se.jsx)("div",{className:"py-0.5 pl-3 font-mono text-[11px]",children:S},S))]},b))}),(0,Se.jsxs)(Ln,{title:"File",children:[(0,Se.jsx)("span",{className:"font-mono text-[11.5px] text-foreground",children:h})," ",(0,Se.jsxs)("span",{className:"text-zinc-500",children:["in the ",p," layer"]})]})]})}function Ln({title:t,children:e}){return(0,Se.jsxs)("section",{"aria-label":t,className:"border-b border-zinc-100 px-4 py-3.5 last:border-b-0",children:[(0,Se.jsx)("h3",{className:"mb-[7px] text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:t}),(0,Se.jsx)("div",{className:"text-[12.5px] leading-[1.65] text-zinc-700",children:e})]})}var ff=L(F(),1);var lz=L(F(),1);var uS=[],AE=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,a=0;e<t.length;e++)(e%2?AE:uS).push(a=a+t[e])})();function wF(t){if(t<768)return!1;for(let e=0,a=uS.length;;){let r=e+a>>1;if(t<uS[r])a=r;else if(t>=AE[r])e=r+1;else return!0;if(e==a)return!1}}function PE(t){return t>=127462&&t<=127487}var RE=8205;function QE(t,e,a=!0,r=!0){return(a?ME:CF)(t,e,r)}function ME(t,e,a){if(e==t.length)return e;e&&EE(t.charCodeAt(e))&&DE(t.charCodeAt(e-1))&&e--;let r=lS(t,e);for(e+=IE(r);e<t.length;){let n=lS(t,e);if(r==RE||n==RE||a&&wF(n))e+=IE(n),r=n;else if(PE(n)){let i=0,o=e-2;for(;o>=0&&PE(lS(t,o));)i++,o-=2;if(i%2==0)break;e+=2}else break}return e}function CF(t,e,a){for(;e>1;){let r=ME(t,e-2,a);if(r<e)return r;e--}return 0}function lS(t,e){let a=t.charCodeAt(e);if(!DE(a)||e+1==t.length)return a;let r=t.charCodeAt(e+1);return EE(r)?(a-55296<<10)+(r-56320)+65536:a}function EE(t){return t>=56320&&t<57344}function DE(t){return t>=55296&&t<56320}function IE(t){return t<65536?1:2}var Le=class t{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,a,r){[e,a]=Nc(this,e,a);let n=[];return this.decompose(0,e,n,2),r.length&&r.decompose(0,r.length,n,3),this.decompose(a,this.length,n,1),Bc.from(n,this.length-(a-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,a=this.length){[e,a]=Nc(this,e,a);let r=[];return this.decompose(e,a,r,0),Bc.from(r,a-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let a=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),n=new Ql(this),i=new Ql(e);for(let o=a,s=a;;){if(n.next(o),i.next(o),o=0,n.lineBreak!=i.lineBreak||n.done!=i.done||n.value!=i.value)return!1;if(s+=n.value.length,n.done||s>=r)return!0}}iter(e=1){return new Ql(this,e)}iterRange(e,a=this.length){return new jg(this,e,a)}iterLines(e,a){let r;if(e==null)r=this.iter();else{a==null&&(a=this.lines+1);let n=this.line(e).from;r=this.iterRange(n,Math.max(n,a==this.lines+1?this.length:a<=1?0:this.line(a-1).to))}return new Fg(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?t.empty:e.length<=32?new br(e):Bc.from(br.split(e,[]))}},br=class t extends Le{constructor(e,a=kF(e)){super(),this.text=e,this.length=a}get lines(){return this.text.length}get children(){return null}lineInner(e,a,r,n){for(let i=0;;i++){let o=this.text[i],s=n+o.length;if((a?r:s)>=e)return new fS(n,s,r,o);n=s+1,r++}}decompose(e,a,r,n){let i=e<=0&&a>=this.length?this:new t($E(this.text,e,a),Math.min(a,this.length)-Math.max(0,e));if(n&1){let o=r.pop(),s=Ug(i.text,o.text.slice(),0,i.length);if(s.length<=32)r.push(new t(s,o.length+i.length));else{let l=s.length>>1;r.push(new t(s.slice(0,l)),new t(s.slice(l)))}}else r.push(i)}replace(e,a,r){if(!(r instanceof t))return super.replace(e,a,r);[e,a]=Nc(this,e,a);let n=Ug(this.text,Ug(r.text,$E(this.text,0,e)),a),i=this.length+r.length-(a-e);return n.length<=32?new t(n,i):Bc.from(t.split(n,[]),i)}sliceString(e,a=this.length,r=`
49
+ `)},RV=0,Pc=[];function b2(t){var e=dt.useRef([]),a=dt.useRef([0,0]),r=dt.useRef(),n=dt.useState(RV++)[0],i=dt.useState(Id)[0],o=dt.useRef(t);dt.useEffect(function(){o.current=t},[t]),dt.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(n));var m=n2([t.lockRef.current],(t.shards||[]).map(y2),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(n))})}}},[t.inert,t.lockRef.current,t.shards]);var s=dt.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var g=dg(m),O=a.current,y="deltaX"in m?m.deltaX:O[0]-g[0],b="deltaY"in m?m.deltaY:O[1]-g[1],v,S=m.target,w=Math.abs(y)>Math.abs(b)?"h":"v";if("touches"in m&&w==="h"&&S.type==="range")return!1;var k=window.getSelection(),T=k&&k.anchorNode,Q=T?T===S||T.contains(S):!1;if(Q)return!1;var $=kv(w,S);if(!$)return!0;if($?v=w:(v=w==="v"?"h":"v",$=kv(w,S)),!$)return!1;if(!r.current&&"changedTouches"in m&&(y||b)&&(r.current=v),!v)return!0;var A=r.current||v;return O2(A,x,m,A==="h"?y:b,!0)},[]),l=dt.useCallback(function(m){var x=m;if(!(!Pc.length||Pc[Pc.length-1]!==i)){var g="deltaY"in x?x2(x):dg(x),O=e.current.filter(function(v){return v.name===x.type&&(v.target===x.target||x.target===v.shadowParent)&&TV(v.delta,g)})[0];if(O&&O.should){x.cancelable&&x.preventDefault();return}if(!O){var y=(o.current.shards||[]).map(y2).filter(Boolean).filter(function(v){return v.contains(x.target)}),b=y.length>0?s(x,y[0]):!o.current.noIsolation;b&&x.cancelable&&x.preventDefault()}}},[]),u=dt.useCallback(function(m,x,g,O){var y={name:m,delta:x,target:g,should:O,shadowParent:IV(g)};e.current.push(y),setTimeout(function(){e.current=e.current.filter(function(b){return b!==y})},1)},[]),c=dt.useCallback(function(m){a.current=dg(m),r.current=void 0},[]),f=dt.useCallback(function(m){u(m.type,x2(m),m.target,s(m,t.lockRef.current))},[]),d=dt.useCallback(function(m){u(m.type,dg(m),m.target,s(m,t.lockRef.current))},[]);dt.useEffect(function(){return Pc.push(i),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,pl),document.addEventListener("touchmove",l,pl),document.addEventListener("touchstart",c,pl),function(){Pc=Pc.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,pl),document.removeEventListener("touchmove",l,pl),document.removeEventListener("touchstart",c,pl)}},[]);var h=t.removeScrollBar,p=t.inert;return dt.createElement(dt.Fragment,null,p?dt.createElement(i,{styles:PV(n)}):null,h?dt.createElement(wv,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function IV(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}var v2=Ov(fg,b2);var S2=hg.forwardRef(function(t,e){return hg.createElement(Rd,er({},t,{ref:e,sideCar:v2}))});S2.classNames=Rd.classNames;var Qd=S2;var AV=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Rc=new WeakMap,pg=new WeakMap,mg={},Lv=0,w2=function(t){return t&&(t.host||w2(t.parentNode))},QV=function(t,e){return e.map(function(a){if(t.contains(a))return a;var r=w2(a);return r&&t.contains(r)?r:(console.error("aria-hidden",a,"in not contained inside",t,". Doing nothing"),null)}).filter(function(a){return!!a})},MV=function(t,e,a,r){var n=QV(e,Array.isArray(t)?t:[t]);mg[a]||(mg[a]=new WeakMap);var i=mg[a],o=[],s=new Set,l=new Set(n),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};n.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))c(d);else try{var h=d.getAttribute(r),p=h!==null&&h!=="false",m=(Rc.get(d)||0)+1,x=(i.get(d)||0)+1;Rc.set(d,m),i.set(d,x),o.push(d),m===1&&p&&pg.set(d,!0),x===1&&d.setAttribute(a,"true"),p||d.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return c(e),s.clear(),Lv++,function(){o.forEach(function(f){var d=Rc.get(f)-1,h=i.get(f)-1;Rc.set(f,d),i.set(f,h),d||(pg.has(f)||f.removeAttribute(r),pg.delete(f)),h||f.removeAttribute(a)}),Lv--,Lv||(Rc=new WeakMap,Rc=new WeakMap,pg=new WeakMap,mg={})}},gg=function(t,e,a){a===void 0&&(a="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),n=e||AV(t);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live], script"))),MV(r,n,a,"aria-hidden")):function(){return null}};var St=L(G(),1),EV=Object.defineProperty,tr=(t,e)=>EV(t,"name",{value:e,configurable:!0}),Pv="Dialog",[C2,DV]=ca(Pv),[$V,On]=C2(Pv),Rv=tr(t=>{let{__scopeDialog:e,children:a,open:r,defaultOpen:n,onOpenChange:i,modal:o=!0}=t,s=ct.useRef(null),l=ct.useRef(null),[u,c]=Aa({prop:r,defaultProp:n??!1,onChange:i,caller:Pv}),[f,d]=ct.useState(0),[h,p]=ct.useState(0);return(0,St.jsx)($V,{scope:e,triggerRef:s,contentRef:l,contentId:Dt(),titleId:Dt(),descriptionId:Dt(),titlePresent:f>0,descriptionPresent:h>0,setTitleCount:d,setDescriptionCount:p,open:u,onOpenChange:c,onOpenToggle:ct.useCallback(()=>c(m=>!m),[c]),modal:o,children:a})},"Dialog"),BV="DialogTrigger",_V=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,...n}=e,i=On(BV,r),o=Qe(a,i.triggerRef);return(0,St.jsx)(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Og(i.open),...n,ref:o,onClick:xe(e.onClick,i.onOpenToggle)})},"DialogTrigger")),k2="DialogPortal",[zV,L2]=C2(k2,{forceMount:void 0}),Iv=tr(t=>{let{__scopeDialog:e,forceMount:a,children:r,container:n}=t,i=On(k2,e);return(0,St.jsx)(zV,{scope:e,forceMount:a,children:ct.Children.map(r,o=>(0,St.jsx)(as,{present:a||i.open,children:(0,St.jsx)(og,{asChild:!0,container:n,children:o})}))})},"DialogPortal"),Tv="DialogOverlay",Av=ct.forwardRef(tr(function(e,a){let r=L2(Tv,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=On(Tv,e.__scopeDialog);return o.modal?(0,St.jsx)(as,{present:n||o.open,children:(0,St.jsx)(XV,{...i,ref:a})}):null},"DialogOverlay")),NV=Ia("DialogOverlay.RemoveScroll"),XV=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,...n}=e,i=On(Tv,r),o=nv(),s=Qe(a,o);return(0,St.jsx)(Qd,{as:NV,allowPinchZoom:!0,shards:[i.contentRef],children:(0,St.jsx)(ue.div,{"data-state":Og(i.open),...n,ref:s,style:{pointerEvents:"auto",...n.style}})})},"DialogOverlayImpl")),Md="DialogContent",Qv=ct.forwardRef(tr(function(e,a){let r=L2(Md,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=On(Md,e.__scopeDialog);return(0,St.jsx)(as,{present:n||o.open,children:o.modal?(0,St.jsx)(qV,{...i,ref:a}):(0,St.jsx)(ZV,{...i,ref:a})})},"DialogContent")),qV=ct.forwardRef(tr(function(e,a){let r=On(Md,e.__scopeDialog),n=ct.useRef(null),i=Qe(a,r.contentRef,n);return ct.useEffect(()=>{let o=n.current;if(o)return gg(o)},[]),(0,St.jsx)(T2,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:xe(e.onCloseAutoFocus,o=>{o.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:xe(e.onPointerDownOutside,o=>{let s=o.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&o.preventDefault()}),onFocusOutside:xe(e.onFocusOutside,o=>o.preventDefault())})},"DialogContentModal")),ZV=ct.forwardRef(tr(function(e,a){let r=On(Md,e.__scopeDialog),n=ct.useRef(!1),i=ct.useRef(!1);return(0,St.jsx)(T2,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(n.current||r.triggerRef.current?.focus(),o.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));let s=o.target;r.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})},"DialogContentNonModal")),T2=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,l=On(Md,r);return kc(),(0,St.jsx)(St.Fragment,{children:(0,St.jsx)(ng,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:(0,St.jsx)(rg,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":Og(l.open),...s,ref:a,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),VV="DialogTitle",UV=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,...n}=e,i=On(VV,r),{setTitleCount:o}=i;return Xe(()=>(o(s=>s+1),()=>o(s=>s-1)),[o]),(0,St.jsx)(ue.h2,{id:i.titleId,...n,ref:a})},"DialogTitle")),jV="DialogDescription",FV=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,...n}=e,i=On(jV,r),{setDescriptionCount:o}=i;return Xe(()=>(o(s=>s+1),()=>o(s=>s-1)),[o]),(0,St.jsx)(ue.p,{id:i.descriptionId,...n,ref:a})},"DialogDescription")),HV="DialogClose",GV=ct.forwardRef(tr(function(e,a){let{__scopeDialog:r,...n}=e,i=On(HV,r);return(0,St.jsx)(ue.button,{type:"button",...n,ref:a,onClick:xe(e.onClick,()=>i.onOpenChange(!1))})},"DialogClose")),YV=tr(t=>t.children,"WarningProvider");function Og(t){return t?"open":"closed"}tr(Og,"getState");var P2=L(F(),1);var WV=Object.defineProperty,KV=(t,e)=>WV(t,"name",{value:e,configurable:!0});function Mv(t){let[e,a]=P2.useState(void 0);return Xe(()=>{if(t){a({width:t.offsetWidth,height:t.offsetHeight});let r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let i=n[0],o,s;if("borderBoxSize"in i){let l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,s=u.blockSize}else o=t.offsetWidth,s=t.offsetHeight;a({width:o,height:s})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else a(void 0)},[t]),e}KV(Mv,"useSize");var da=L(F(),1);var A2=["top","right","bottom","left"];var ci=Math.min,yn=Math.max,Dd=Math.round,$d=Math.floor,fi=t=>({x:t,y:t}),JV={left:"right",right:"left",bottom:"top",top:"bottom"};function Ev(t,e,a){return yn(t,ci(e,a))}function di(t,e){return typeof t=="function"?t(e):t}function ji(t){return t.split("-")[0]}function ml(t){return t.split("-")[1]}function yg(t){return t==="x"?"y":"x"}function bg(t){return t==="y"?"height":"width"}function bn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function vg(t){return yg(bn(t))}function Q2(t,e,a){a===void 0&&(a=!1);let r=ml(t),n=vg(t),i=bg(n),o=n==="x"?r===(a?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Ed(o)),[o,Ed(o)]}function M2(t){let e=Ed(t);return[xg(t),e,xg(e)]}function xg(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var R2=["left","right"],I2=["right","left"],eU=["top","bottom"],tU=["bottom","top"];function aU(t,e,a){switch(t){case"top":case"bottom":return a?e?I2:R2:e?R2:I2;case"left":case"right":return e?eU:tU;default:return[]}}function E2(t,e,a,r){let n=ml(t),i=aU(ji(t),a==="start",r);return n&&(i=i.map(o=>o+"-"+n),e&&(i=i.concat(i.map(xg)))),i}function Ed(t){let e=ji(t);return JV[e]+t.slice(e.length)}function rU(t){var e,a,r,n;return{top:(e=t.top)!=null?e:0,right:(a=t.right)!=null?a:0,bottom:(r=t.bottom)!=null?r:0,left:(n=t.left)!=null?n:0}}function Dv(t){return typeof t!="number"?rU(t):{top:t,right:t,bottom:t,left:t}}function gl(t){let{x:e,y:a,width:r,height:n}=t;return{width:r,height:n,top:a,left:e,right:e+r,bottom:a+n,x:e,y:a}}function D2(t,e,a){let{reference:r,floating:n}=t,i=bn(e),o=vg(e),s=bg(o),l=ji(e),u=i==="y",c=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,d=r[s]/2-n[s]/2,h;switch(l){case"top":h={x:c,y:r.y-n.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-n.width,y:f};break;default:h={x:r.x,y:r.y}}let p=ml(e);return p&&(h[o]+=d*(p==="end"?1:-1)*(a&&u?-1:1)),h}async function _2(t,e){var a;e===void 0&&(e={});let{x:r,y:n,platform:i,rects:o,elements:s,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=di(e,t),p=Dv(h),x=s[d?f==="floating"?"reference":"floating":f],g=gl(await i.getClippingRect({element:(a=await(i.isElement==null?void 0:i.isElement(x)))==null||a?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),O=f==="floating"?{x:r,y:n,width:o.floating.width,height:o.floating.height}:o.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement(y))&&await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1},v=gl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:O,offsetParent:y,strategy:l}):O);return{top:(g.top-v.top+p.top)/b.y,bottom:(v.bottom-g.bottom+p.bottom)/b.y,left:(g.left-v.left+p.left)/b.x,right:(v.right-g.right+p.right)/b.x}}var nU=50,z2=async(t,e,a)=>{let{placement:r="bottom",strategy:n="absolute",middleware:i=[],platform:o}=a,s=o.detectOverflow?o:{...o,detectOverflow:_2},l=await(o.isRTL==null?void 0:o.isRTL(e)),u=await o.getElementRects({reference:t,floating:e,strategy:n}),{x:c,y:f}=D2(u,r,l),d=r,h=0,p={};for(let m=0;m<i.length;m++){let x=i[m];if(!x)continue;let{name:g,fn:O}=x,{x:y,y:b,data:v,reset:S}=await O({x:c,y:f,initialPlacement:r,placement:d,strategy:n,middlewareData:p,rects:u,platform:s,elements:{reference:t,floating:e}});c=y??c,f=b??f,p[g]={...p[g],...v},S&&h<nU&&(h++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:n}):S.rects),{x:c,y:f}=D2(u,d,l)),m=-1)}return{x:c,y:f,placement:d,strategy:n,middlewareData:p}},N2=t=>({name:"arrow",options:t,async fn(e){let{x:a,y:r,placement:n,rects:i,platform:o,elements:s,middlewareData:l}=e,{element:u,padding:c=0}=di(t,e)||{};if(u==null)return{};let f=Dv(c),d={x:a,y:r},h=vg(n),p=bg(h),m=await o.getDimensions(u),x=h==="y",g=x?"top":"left",O=x?"bottom":"right",y=x?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[h]-d[h]-i.floating[p],v=d[h]-i.reference[h],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u)),w=S?S[y]:0;(!w||!await(o.isElement==null?void 0:o.isElement(S)))&&(w=s.floating[y]||i.floating[p]);let k=b/2-v/2,T=w/2-m[p]/2-1,Q=ci(f[g],T),$=ci(f[O],T),A=w-m[p]-$,R=w/2-m[p]/2+k,D=Ev(Q,R,A),Y=!l.arrow&&ml(n)!=null&&R!==D&&i.reference[p]/2-(R<Q?Q:$)-m[p]/2<0,B=Y?R<Q?R-Q:R-A:0;return{[h]:d[h]+B,data:{[h]:D,centerOffset:R-D-B,...Y&&{alignmentOffset:B}},reset:Y}}});var X2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var a,r;let{placement:n,middlewareData:i,rects:o,initialPlacement:s,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...x}=di(t,e);if((a=i.arrow)!=null&&a.alignmentOffset)return{};let g=ji(n),O=bn(s),y=ji(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),v=d||(y||!m?[Ed(s)]:M2(s)),S=p!=="none";!d&&S&&v.push(...E2(s,m,p,b));let w=[s,...v],k=await l.detectOverflow(e,x),T=[],Q=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&T.push(k[g]),f){let D=Q2(n,o,b);T.push(k[D[0]],k[D[1]])}if(Q=[...Q,{placement:n,overflows:T}],!T.every(D=>D<=0)){var $,A;let D=((($=i.flip)==null?void 0:$.index)||0)+1,Y=w[D];if(Y&&(!(f==="alignment"?O!==bn(Y):!1)||Q.every(re=>bn(re.placement)===O?re.overflows[0]>0:!0)))return{data:{index:D,overflows:Q},reset:{placement:Y}};let B=(A=Q.filter(q=>q.overflows[0]<=0).sort((q,re)=>q.overflows[1]-re.overflows[1])[0])==null?void 0:A.placement;if(!B)switch(h){case"bestFit":{var R;let q=(R=Q.filter(re=>{if(S){let ie=bn(re.placement);return ie===O||ie==="y"}return!0}).map(re=>[re.placement,re.overflows.filter(ie=>ie>0).reduce((ie,z)=>ie+z,0)]).sort((re,ie)=>re[1]-ie[1])[0])==null?void 0:R[0];q&&(B=q);break}case"initialPlacement":B=s;break}if(n!==B)return{reset:{placement:B}}}return{}}}};function $2(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function B2(t){return A2.some(e=>t[e]>=0)}var q2=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:a,platform:r}=e,{strategy:n="referenceHidden",...i}=di(t,e);switch(n){case"referenceHidden":{let o=await r.detectOverflow(e,{...i,elementContext:"reference"}),s=$2(o,a.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:B2(s)}}}case"escaped":{let o=await r.detectOverflow(e,{...i,altBoundary:!0}),s=$2(o,a.floating);return{data:{escapedOffsets:s,escaped:B2(s)}}}default:return{}}}}};var Z2=new Set(["left","top"]);async function iU(t,e){let{placement:a,platform:r,elements:n}=t,i=await(r.isRTL==null?void 0:r.isRTL(n.floating)),o=ji(a),s=ml(a),l=bn(a)==="y",u=Z2.has(o)?-1:1,c=i&&l?-1:1,f=di(e,t),{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof p=="number"&&(h=s==="end"?p*-1:p),l?{x:h*c,y:d*u}:{x:d*u,y:h*c}}var V2=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var a,r;let{x:n,y:i,placement:o,middlewareData:s}=e,l=await iU(e,t);return o===((a=s.offset)==null?void 0:a.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:i+l.y,data:{...l,placement:o}}}}},U2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:a,y:r,placement:n,platform:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:O=>{let{x:y,y:b}=O;return{x:y,y:b}}},...u}=di(t,e),c={x:a,y:r},f=await i.detectOverflow(e,u),d=bn(n),h=yg(d),p=c[h],m=c[d],x=(O,y)=>Ev(y+f[O==="y"?"top":"left"],y,y-f[O==="y"?"bottom":"right"]);o&&(p=x(h,p)),s&&(m=x(d,m));let g=l.fn({...e,[h]:p,[d]:m});return{...g,data:{x:g.x-a,y:g.y-r,enabled:{[h]:o,[d]:s}}}}}},j2=function(t){return t===void 0&&(t={}),{options:t,fn(e){var a,r;let{x:n,y:i,placement:o,rects:s,middlewareData:l}=e,{offset:u=0,mainAxis:c=!0,crossAxis:f=!0}=di(t,e),d={x:n,y:i},h=bn(o),p=yg(h),m=d[p],x=d[h],g=di(u,e),O=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:(a=g.mainAxis)!=null?a:0,crossAxis:(r=g.crossAxis)!=null?r:0};if(c){let v=p==="y"?"height":"width",S=s.reference[p]-s.floating[v]+O.mainAxis,w=s.reference[p]+s.reference[v]-O.mainAxis;m<S?m=S:m>w&&(m=w)}if(f){var y,b;let v=p==="y"?"width":"height",S=Z2.has(ji(o)),w=s.reference[h]-s.floating[v]+(S&&((y=l.offset)==null?void 0:y[h])||0)+(S?0:O.crossAxis),k=s.reference[h]+s.reference[v]+(S?0:((b=l.offset)==null?void 0:b[h])||0)-(S?O.crossAxis:0);x<w?x=w:x>k&&(x=k)}return{[p]:m,[h]:x}}}},F2=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){let{placement:a,rects:r,platform:n,elements:i}=e,{apply:o=()=>{},...s}=di(t,e),l=await n.detectOverflow(e,s),u=ji(a),c=ml(a),f=bn(a)==="y",{width:d,height:h}=r.floating,p,m;u==="top"||u==="bottom"?(p=u,m=c===(await(n.isRTL==null?void 0:n.isRTL(i.floating))?"start":"end")?"left":"right"):(m=u,p=c==="end"?"top":"bottom");let x=h-l.top-l.bottom,g=d-l.left-l.right,O=ci(h-l[p],x),y=ci(d-l[m],g),b=e.middlewareData.shift,v=!b,S=O,w=y;b!=null&&b.enabled.x&&(w=g),b!=null&&b.enabled.y&&(S=x),v&&!c&&(f?w=d-2*yn(l.left,l.right):S=h-2*yn(l.top,l.bottom)),await o({...e,availableWidth:w,availableHeight:S});let k=await n.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Sg(){return typeof window<"u"}function yl(t){return G2(t)?(t.nodeName||"").toLowerCase():"#document"}function Ma(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function hi(t){var e;return(e=(G2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function G2(t){return Sg()?t instanceof Node||t instanceof Ma(t).Node:!1}function vn(t){return Sg()?t instanceof Element||t instanceof Ma(t).Element:!1}function Fi(t){return Sg()?t instanceof HTMLElement||t instanceof Ma(t).HTMLElement:!1}function H2(t){return!Sg()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ma(t).ShadowRoot}function Bd(t){let{overflow:e,overflowX:a,overflowY:r,display:n}=Sn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+a)&&n!=="inline"&&n!=="contents"}function Y2(t){return/^(table|td|th)$/.test(yl(t))}function _d(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var oU=/transform|translate|scale|rotate|perspective|filter/,sU=/paint|layout|strict|content/,Ol=t=>!!t&&t!=="none",$v;function wg(t){let e=vn(t)?Sn(t):t;return Ol(e.transform)||Ol(e.translate)||Ol(e.scale)||Ol(e.rotate)||Ol(e.perspective)||!Cg()&&(Ol(e.backdropFilter)||Ol(e.filter))||oU.test(e.willChange||"")||sU.test(e.contain||"")}function W2(t){let e=rs(t);for(;Fi(e)&&!Ic(e);){if(wg(e))return e;if(_d(e))return null;e=rs(e)}return null}function Cg(){return $v==null&&($v=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$v}function Ic(t){return/^(html|body|#document)$/.test(yl(t))}function Sn(t){return Ma(t).getComputedStyle(t)}function zd(t){return vn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function rs(t){if(yl(t)==="html")return t;let e=t.assignedSlot||t.parentNode||H2(t)&&t.host||hi(t);return H2(e)?e.host:e}function K2(t){let e=rs(t);return Ic(e)?(t.ownerDocument||t).body:Fi(e)&&Bd(e)?e:K2(e)}function xl(t,e,a){var r;e===void 0&&(e=[]),a===void 0&&(a=!0);let n=K2(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),o=Ma(n);if(i){let s=kg(o);return e.concat(o,o.visualViewport||[],Bd(n)?n:[],s&&a?xl(s):[])}else return e.concat(n,xl(n,[],a))}function kg(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function tM(t){let e=Sn(t),a=parseFloat(e.width)||0,r=parseFloat(e.height)||0,n=Fi(t),i=n?t.offsetWidth:a,o=n?t.offsetHeight:r,s=Dd(a)!==i||Dd(r)!==o;return s&&(a=i,r=o),{width:a,height:r,$:s}}function _v(t){return vn(t)?t:t.contextElement}function Ac(t){let e=_v(t);if(!Fi(e))return fi(1);let a=e.getBoundingClientRect(),{width:r,height:n,$:i}=tM(e),o=(i?Dd(a.width):a.width)/r,s=(i?Dd(a.height):a.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var lU=fi(0);function aM(t){let e=Ma(t);return!Cg()||!e.visualViewport?lU:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function uU(t,e,a){return e===void 0&&(e=!1),!!a&&e&&a===Ma(t)}function bl(t,e,a,r){e===void 0&&(e=!1),a===void 0&&(a=!1);let n=t.getBoundingClientRect(),i=_v(t),o=fi(1);e&&(r?vn(r)&&(o=Ac(r)):o=Ac(t));let s=uU(i,a,r)?aM(i):fi(0),l=(n.left+s.x)/o.x,u=(n.top+s.y)/o.y,c=n.width/o.x,f=n.height/o.y;if(i&&r){let d=Ma(i),h=vn(r)?Ma(r):r,p=d,m=kg(p);for(;m&&h!==p;){let x=Ac(m),g=m.getBoundingClientRect(),O=Sn(m),y=g.left+(m.clientLeft+parseFloat(O.paddingLeft))*x.x,b=g.top+(m.clientTop+parseFloat(O.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=y,u+=b,p=Ma(m),m=kg(p)}}return gl({width:c,height:f,x:l,y:u})}function Lg(t,e){let a=zd(t).scrollLeft;return e?e.left+a:bl(hi(t)).left+a}function rM(t,e){let a=t.getBoundingClientRect(),r=a.left+e.scrollLeft-Lg(t,a),n=a.top+e.scrollTop;return{x:r,y:n}}function cU(t){let{elements:e,rect:a,offsetParent:r,strategy:n}=t,i=n==="fixed",o=hi(r),s=e?_d(e.floating):!1;if(r===o||s&&i)return a;let l={scrollLeft:0,scrollTop:0},u=fi(1),c=fi(0),f=Fi(r);if((f||!i)&&((yl(r)!=="body"||Bd(o))&&(l=zd(r)),f)){let h=bl(r);u=Ac(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}let d=o&&!f&&!i?rM(o,l):fi(0);return{width:a.width*u.x,height:a.height*u.y,x:a.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:a.y*u.y-l.scrollTop*u.y+c.y+d.y}}function fU(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function dU(t){let e=zd(t),a=t.ownerDocument.body,r=yn(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),n=yn(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),i=-e.scrollLeft+Lg(t),o=-e.scrollTop;return Sn(a).direction==="rtl"&&(i+=yn(t.clientWidth,a.clientWidth)-r),{width:r,height:n,x:i,y:o}}var hU=25;function pU(t,e,a){a===void 0&&(a="viewport");let r=a==="layoutViewport",n=Ma(t),i=hi(t),o=n.visualViewport,s=i.clientWidth,l=i.clientHeight,u=0,c=0;if(o){let d=!Cg()||e==="fixed";r?d||(u=-o.offsetLeft,c=-o.offsetTop):(s=o.width,l=o.height,d&&(u=o.offsetLeft,c=o.offsetTop))}if(Lg(i)<=0){let d=i.ownerDocument,h=d.body,p=getComputedStyle(h),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,x=Math.abs(i.clientWidth-h.clientWidth-m),g=getComputedStyle(i).scrollbarGutter==="stable both-edges"?x/2:x;g<=hU&&(s-=g)}return{width:s,height:l,x:u,y:c}}function mU(t,e){let a=bl(t,!0,e==="fixed"),r=a.top+t.clientTop,n=a.left+t.clientLeft,i=Ac(t),o=t.clientWidth*i.x,s=t.clientHeight*i.y,l=n*i.x,u=r*i.y;return{width:o,height:s,x:l,y:u}}function J2(t,e,a){let r;if(e==="viewport"||e==="layoutViewport")r=pU(t,a,e);else if(e==="document")r=dU(hi(t));else if(vn(e))r=mU(e,a);else{let n=aM(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return gl(r)}function gU(t,e){let a=e.get(t);if(a)return a;let r=xl(t,[],!1).filter(s=>vn(s)&&yl(s)!=="body"),n=null,i=Sn(t).position==="fixed",o=i?rs(t):t;for(;vn(o)&&!Ic(o);){let s=Sn(o),l=wg(o),u=n?n.position:i?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&s.position==="static")?r=r.filter(f=>f!==o):n=s,o=rs(o)}return e.set(t,r),r}function OU(t){let{element:e,boundary:a,rootBoundary:r,strategy:n}=t,o=[...a==="clippingAncestors"?_d(e)?[]:gU(e,this._c):[].concat(a),r],s=J2(e,o[0],n),l=s.top,u=s.right,c=s.bottom,f=s.left;for(let d=1;d<o.length;d++){let h=J2(e,o[d],n);l=yn(h.top,l),u=ci(h.right,u),c=ci(h.bottom,c),f=yn(h.left,f)}return{width:u-f,height:c-l,x:f,y:l}}function xU(t){let{width:e,height:a}=tM(t);return{width:e,height:a}}function yU(t,e,a){let r=Fi(e),n=hi(e),i=a==="fixed",o=bl(t,!0,i,e),s={scrollLeft:0,scrollTop:0},l=fi(0);if((r||!i)&&((yl(e)!=="body"||Bd(n))&&(s=zd(e)),r)){let d=bl(e,!0,i,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}!r&&n&&(l.x=Lg(n));let u=n&&!r&&!i?rM(n,s):fi(0),c=o.left+s.scrollLeft-l.x-u.x,f=o.top+s.scrollTop-l.y-u.y;return{x:c,y:f,width:o.width,height:o.height}}function Bv(t){return Sn(t).position==="static"}function eM(t,e){if(!Fi(t)||Sn(t).position==="fixed")return null;if(e)return e(t);let a=t.offsetParent;return hi(t)===a&&(a=a.ownerDocument.body),a}function nM(t,e){let a=Ma(t);if(_d(t))return a;if(!Fi(t)){let n=rs(t);for(;n&&!Ic(n);){if(vn(n)&&!Bv(n))return n;n=rs(n)}return a}let r=eM(t,e);for(;r&&Y2(r)&&Bv(r);)r=eM(r,e);return r&&Ic(r)&&Bv(r)&&!wg(r)?a:r||W2(t)||a}var bU=async function(t){let e=this.getOffsetParent||nM,a=this.getDimensions,r=await a(t.floating);return{reference:yU(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vU(t){return Sn(t).direction==="rtl"}var iM={convertOffsetParentRelativeRectToViewportRelativeRect:cU,getDocumentElement:hi,getClippingRect:OU,getOffsetParent:nM,getElementRects:bU,getClientRects:fU,getDimensions:xU,getScale:Ac,isElement:vn,isRTL:vU};function oM(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function SU(t,e,a){let r=null,n,i=hi(t);function o(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();let d=t.getBoundingClientRect(),{left:h,top:p,width:m,height:x}=d;if(c||e(),!m||!x)return;let g=$d(p),O=$d(i.clientWidth-(h+m)),y=$d(i.clientHeight-(p+x)),b=$d(h),S={rootMargin:-g+"px "+-O+"px "+-y+"px "+-b+"px",threshold:yn(0,ci(1,f))||1},w=!0;function k(T){let Q=T[0].intersectionRatio;if(!oM(d,t.getBoundingClientRect()))return s();if(Q!==f){if(!w)return s();Q?s(!1,Q):n=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(k,{...S,root:i.ownerDocument})}catch{r=new IntersectionObserver(k,S)}r.observe(t)}let l=Ma(t),u=()=>s(a);return l.addEventListener("resize",u),s(!0),()=>{l.removeEventListener("resize",u),o()}}function zv(t,e,a,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=_v(t),c=n||i?[...u?xl(u):[],...e?xl(e):[]]:[];c.forEach(g=>{n&&g.addEventListener("scroll",a),i&&g.addEventListener("resize",a)});let f=u&&s?SU(u,a,i):null,d=-1,h=null;o&&(h=new ResizeObserver(g=>{let[O]=g;O&&O.target===u&&h&&e&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(e)})),a()}),u&&!l&&h.observe(u),e&&h.observe(e));let p,m=l?bl(t):null;l&&x();function x(){let g=bl(t);m&&!oM(m,g)&&a(),m=g,p=requestAnimationFrame(x)}return a(),()=>{var g;c.forEach(O=>{n&&O.removeEventListener("scroll",a),i&&O.removeEventListener("resize",a)}),f?.(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(p)}}var sM=V2;var lM=U2,uM=X2,cM=F2,fM=q2,Nv=N2;var dM=j2,Xv=(t,e,a)=>{let r=new Map,n=a??{},i={...iM,...n.platform,_c:r};return z2(t,e,{...n,platform:i})};var $t=L(F(),1),pM=L(F(),1),mM=L(Es(),1),wU=typeof document<"u",CU=function(){},Tg=wU?pM.useLayoutEffect:CU;function Pg(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let a,r,n;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(a=t.length,a!==e.length)return!1;for(r=a;r--!==0;)if(!Pg(t[r],e[r]))return!1;return!0}if(n=Object.keys(t),a=n.length,a!==Object.keys(e).length)return!1;for(r=a;r--!==0;)if(!{}.hasOwnProperty.call(e,n[r]))return!1;for(r=a;r--!==0;){let i=n[r];if(!(i==="_owner"&&t.$$typeof)&&!Pg(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function gM(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function hM(t,e){let a=gM(t);return Math.round(e*a)/a}function qv(t){let e=$t.useRef(t);return Tg(()=>{e.current=t}),e}function OM(t){t===void 0&&(t={});let{placement:e="bottom",strategy:a="absolute",middleware:r=[],platform:n,elements:{reference:i,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=t,[c,f]=$t.useState({x:0,y:0,strategy:a,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=$t.useState(r);Pg(d,r)||h(r);let[p,m]=$t.useState(null),[x,g]=$t.useState(null),O=$t.useCallback(re=>{re!==S.current&&(S.current=re,m(re))},[]),y=$t.useCallback(re=>{re!==w.current&&(w.current=re,g(re))},[]),b=i||p,v=o||x,S=$t.useRef(null),w=$t.useRef(null),k=$t.useRef(c),T=l!=null,Q=qv(l),$=qv(n),A=qv(u),R=$t.useCallback(()=>{if(!S.current||!w.current)return;let re={placement:e,strategy:a,middleware:d};$.current&&(re.platform=$.current),Xv(S.current,w.current,re).then(ie=>{let z={...ie,isPositioned:A.current!==!1};D.current&&!Pg(k.current,z)&&(k.current=z,mM.flushSync(()=>{f(z)}))})},[d,e,a,$,A]);Tg(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(re=>({...re,isPositioned:!1})))},[u]);let D=$t.useRef(!1);Tg(()=>(D.current=!0,()=>{D.current=!1}),[]),Tg(()=>{if(b&&(S.current=b),v&&(w.current=v),b&&v){if(Q.current)return Q.current(b,v,R);R()}},[b,v,R,Q,T]);let Y=$t.useMemo(()=>({reference:S,floating:w,setReference:O,setFloating:y}),[O,y]),B=$t.useMemo(()=>({reference:b,floating:v}),[b,v]),q=$t.useMemo(()=>{let re={position:a,left:0,top:0};if(!B.floating)return re;let ie=hM(B.floating,c.x),z=hM(B.floating,c.y);return s?{...re,transform:"translate("+ie+"px, "+z+"px)",...gM(B.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:ie,top:z}},[a,s,B.floating,c.x,c.y]);return $t.useMemo(()=>({...c,update:R,refs:Y,elements:B,floatingStyles:q}),[c,R,Y,B,q])}var kU=t=>{function e(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:t,fn(a){let{element:r,padding:n}=typeof t=="function"?t(a):t;return r&&e(r)?r.current!=null?Nv({element:r.current,padding:n}).fn(a):{}:r?Nv({element:r,padding:n}).fn(a):{}}}},xM=(t,e)=>{let a=sM(t);return{name:a.name,fn:a.fn,options:[t,e]}},yM=(t,e)=>{let a=lM(t);return{name:a.name,fn:a.fn,options:[t,e]}},bM=(t,e)=>({fn:dM(t).fn,options:[t,e]}),vM=(t,e)=>{let a=uM(t);return{name:a.name,fn:a.fn,options:[t,e]}},SM=(t,e)=>{let a=cM(t);return{name:a.name,fn:a.fn,options:[t,e]}};var wM=(t,e)=>{let a=fM(t);return{name:a.name,fn:a.fn,options:[t,e]}};var CM=(t,e)=>{let a=kU(t);return{name:a.name,fn:a.fn,options:[t,e]}};var kM=L(F(),1);var Zv=L(G(),1),LU=Object.defineProperty,TU=(t,e)=>LU(t,"name",{value:e,configurable:!0}),PU=kM.forwardRef(TU(function(e,a){let{children:r,width:n=10,height:i=5,...o}=e;return(0,Zv.jsx)(ue.svg,{...o,ref:a,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,Zv.jsx)("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),LM=PU;var ns=L(G(),1),IU=Object.defineProperty,Hi=(t,e)=>IU(t,"name",{value:e,configurable:!0});var TM="Popper",[PM,Vv]=ca(TM),[AU,RM]=PM(TM),QU=Hi(t=>{let{__scopePopper:e,children:a}=t,[r,n]=da.useState(null),[i,o]=da.useState(void 0);return(0,ns.jsx)(AU,{scope:e,anchor:r,onAnchorChange:n,placementState:i,setPlacementState:o,children:a})},"Popper"),MU="PopperAnchor",EU=da.forwardRef(Hi(function(e,a){let{__scopePopper:r,virtualRef:n,...i}=e,o=RM(MU,r),s=da.useRef(null),l=o.onAnchorChange,u=da.useCallback(m=>{s.current=m,m&&l(m)},[l]),c=Qe(a,u),f=da.useRef(null);da.useEffect(()=>{if(!n)return;let m=f.current;f.current=n.current,m!==f.current&&l(f.current)});let d=o.placementState&&Rg(o.placementState),h=d?.[0],p=d?.[1];return n?null:(0,ns.jsx)(ue.div,{"data-radix-popper-side":h,"data-radix-popper-align":p,...i,ref:c})},"PopperAnchor")),IM="PopperContent",[DU,$U]=PM(IM),BU=da.forwardRef(Hi(function(e,a){let{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...x}=e,g=RM(IM,r),[O,y]=da.useState(null),b=Qe(a,y),[v,S]=da.useState(null),w=Mv(v),k=w?.width??0,T=w?.height??0,Q=n+(o!=="center"?"-"+o:""),$=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},A=Array.isArray(c)?c:[c],R=A.length>0,D={padding:$,boundary:A.filter(AM),altBoundary:R},{refs:Y,floatingStyles:B,placement:q,isPositioned:re,middlewareData:ie}=OM({strategy:"fixed",placement:Q,whileElementsMounted:Hi((...Z)=>zv(...Z,{animationFrame:p==="always"}),"whileElementsMounted"),elements:{reference:g.anchor},middleware:[xM({mainAxis:i+T,alignmentAxis:s}),u&&yM({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?bM():void 0,...D}),u&&vM({...D}),SM({...D,apply:Hi(({elements:Z,rects:qe,availableWidth:Re,availableHeight:Ie})=>{let{width:Ze,height:Vt}=qe.reference,Za=Z.floating.style;Za.setProperty("--radix-popper-available-width",`${Re}px`),Za.setProperty("--radix-popper-available-height",`${Ie}px`),Za.setProperty("--radix-popper-anchor-width",`${Ze}px`),Za.setProperty("--radix-popper-anchor-height",`${Vt}px`)},"apply")}),v&&CM({element:v,padding:l}),XU({arrowWidth:k,arrowHeight:T}),h&&wM({strategy:"referenceHidden",...D,boundary:R?D.boundary:void 0})]}),z=g.setPlacementState;Xe(()=>(z(q),()=>{z(void 0)}),[q,z]);let[Pe,P]=Rg(q),H=ya(m);Xe(()=>{re&&H?.()},[re,H]);let N=ie.arrow?.x,M=ie.arrow?.y,j=ie.arrow?.centerOffset!==0,[de,ee]=da.useState();return Xe(()=>{O&&ee(window.getComputedStyle(O).zIndex)},[O]),(0,ns.jsx)("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:re?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(" "),...ie.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,ns.jsx)(DU,{scope:r,placedSide:Pe,placedAlign:P,onArrowChange:S,arrowX:N,arrowY:M,shouldHideArrow:j,children:(0,ns.jsx)(ue.div,{"data-side":Pe,"data-align":P,...x,ref:b,style:{...x.style,animation:re?x.style?.animation:"none"}})})})},"PopperContent")),_U="PopperArrow",zU={top:"bottom",right:"left",bottom:"top",left:"right"},NU=da.forwardRef(Hi(function(e,a){let{__scopePopper:r,...n}=e,i=$U(_U,r),o=zU[i.placedSide];return(0,ns.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,ns.jsx)(LM,{...n,ref:a,style:{...n.style,display:"block"}})})},"PopperArrow"));function AM(t){return t!==null}Hi(AM,"isNotNull");var XU=Hi(t=>({name:"transformOrigin",options:t,fn(e){let{placement:a,rects:r,middlewareData:n}=e,o=n.arrow?.centerOffset!==0,s=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=Rg(a),f={start:"0%",center:"50%",end:"100%"}[c],d=(n.arrow?.x??0)+s/2,h=(n.arrow?.y??0)+l/2,p="",m="";return u==="bottom"?(p=o?f:`${d}px`,m=`${-l}px`):u==="top"?(p=o?f:`${d}px`,m=`${r.floating.height+l}px`):u==="right"?(p=`${-l}px`,m=o?f:`${h}px`):u==="left"&&(p=`${r.floating.width+l}px`,m=o?f:`${h}px`),{data:{x:p,y:m}}}}),"transformOrigin");function Rg(t){let[e,a="center"]=t.split("-");return[e,a]}Hi(Rg,"getSideAndAlignFromPlacement");var QM=QU,MM=EU,EM=BU,DM=NU;var Kt=L(F(),1);var VU=L(F(),1),Ig=L(F(),1),ZU=Object.defineProperty,jv=(t,e)=>ZU(t,"name",{value:e,configurable:!0}),Uv=!1;function $M(){let[t,e]=Ig.useState(Uv);return Ig.useEffect(()=>{Uv||(Uv=!0,e(!0))},[]),t}jv($M,"useIsHydrated");var BM=VU[" useSyncExternalStore ".trim().toString()];function _M(){return()=>{}}jv(_M,"subscribe");function zM(){return BM(_M,()=>!0,()=>!1)}jv(zM,"useIsHydratedModern");var NM=typeof BM=="function"?zM:$M;var is=L(G(),1),UU=Object.defineProperty,vl=(t,e)=>UU(t,"name",{value:e,configurable:!0}),Fv="rovingFocusGroup.onEntryFocus",jU={bubbles:!1,cancelable:!0},Ag="RovingFocusGroup",[Hv,XM,FU]=Td(Ag),[HU,Qc]=ca(Ag,[FU]),[GU,YU]=HU(Ag),WU=Kt.forwardRef(vl(function(e,a){return(0,is.jsx)(Hv.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,is.jsx)(Hv.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,is.jsx)(KU,{...e,ref:a})})})},"RovingFocusGroup")),KU=Kt.forwardRef(vl(function(e,a){let{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...d}=e,h=Kt.useRef(null),p=Qe(a,h),m=Vi(o),[x,g]=Aa({prop:s,defaultProp:l??null,onChange:u,caller:Ag}),[O,y]=Kt.useState(!1),b=ya(c),v=XM(r),S=Kt.useRef(!1),[w,k]=Kt.useState(0);return Kt.useEffect(()=>{let T=h.current;if(T)return T.addEventListener(Fv,b),()=>T.removeEventListener(Fv,b)},[b]),(0,is.jsx)(GU,{scope:r,orientation:n,dir:m,loop:i,currentTabStopId:x,onItemFocus:Kt.useCallback(T=>g(T),[g]),onItemShiftTab:Kt.useCallback(()=>y(!0),[]),onFocusableItemAdd:Kt.useCallback(()=>k(T=>T+1),[]),onFocusableItemRemove:Kt.useCallback(()=>k(T=>T-1),[]),children:(0,is.jsx)(ue.div,{tabIndex:O||w===0?-1:0,"data-orientation":n,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:xe(e.onMouseDown,()=>{S.current=!0}),onFocus:xe(e.onFocus,T=>{let Q=!S.current;if(T.target===T.currentTarget&&Q&&!O){let $=new CustomEvent(Fv,jU);if(T.currentTarget.dispatchEvent($),!$.defaultPrevented){let A=v().filter(q=>q.focusable),R=A.find(q=>q.active),D=A.find(q=>q.id===x),B=[R,D,...A].filter(Boolean).map(q=>q.ref.current);Gv(B,f)}}S.current=!1}),onBlur:xe(e.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),JU="RovingFocusGroupItem",ej=Kt.forwardRef(vl(function(e,a){let{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:o,children:s,...l}=e,u=Dt(),c=o||u,f=YU(JU,r),d=f.currentTabStopId===c,h=XM(r),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:x}=f,g=NM();return Xe(()=>{if(!(!g||!n))return p(),()=>m()},[g,n,p,m]),Kt.useEffect(()=>{if(!(g||!n))return p(),()=>m()},[g,n,p,m]),(0,is.jsx)(Hv.ItemSlot,{scope:r,id:c,focusable:n,active:i,children:(0,is.jsx)(ue.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...l,ref:a,onMouseDown:xe(e.onMouseDown,O=>{n?f.onItemFocus(c):O.preventDefault()}),onFocus:xe(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:xe(e.onKeyDown,O=>{if(O.key==="Tab"&&O.shiftKey){f.onItemShiftTab();return}if(O.target!==O.currentTarget)return;let y=ZM(O,f.orientation,f.dir);if(y!==void 0){if(O.metaKey||O.ctrlKey||O.altKey||O.shiftKey)return;O.preventDefault();let v=h().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")v.reverse();else if(y==="prev"||y==="next"){y==="prev"&&v.reverse();let S=v.indexOf(O.currentTarget);v=f.loop?VM(v,S+1):v.slice(S+1)}setTimeout(()=>Gv(v))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:x!=null}):s})})},"RovingFocusGroupItem")),tj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qM(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}vl(qM,"getDirectionAwareKey");function ZM(t,e,a){let r=qM(t.key,a);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return tj[r]}vl(ZM,"getFocusIntent");function Gv(t,e=!1){let a=document.activeElement;for(let r of t)if(r===a||(r.focus({preventScroll:e}),document.activeElement!==a))return}vl(Gv,"focusFirst");function VM(t,e){return t.map((a,r)=>t[(e+r)%t.length])}vl(VM,"wrapArray");var Qg=WU,Mg=ej;var Eg={};cu(Eg,{Label:()=>HM,Root:()=>nj});var jM=L(F(),1);var FM=L(G(),1),aj=Object.defineProperty,rj=(t,e)=>aj(t,"name",{value:e,configurable:!0}),HM=jM.forwardRef(rj(function(e,a){return(0,FM.jsx)(ue.label,{...e,ref:a,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),nj=HM;var Dg=L(F(),1),ij=Object.defineProperty,oj=(t,e)=>ij(t,"name",{value:e,configurable:!0});function Yv(t){let e=Dg.useRef({value:t,previous:t});return Dg.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}oj(Yv,"usePrevious");var sj=Object.defineProperty,lj=(t,e)=>sj(t,"name",{value:e,configurable:!0});function $g(t,[e,a]){return Math.min(a,Math.max(e,t))}lj($g,"clamp");var Ea={};cu(Ea,{Arrow:()=>Gj,Content:()=>Tj,Group:()=>Bj,Icon:()=>Sj,Item:()=>Xj,ItemIndicator:()=>Vj,ItemText:()=>qj,Label:()=>zj,Portal:()=>Lj,Root:()=>Oj,ScrollDownButton:()=>jj,ScrollUpButton:()=>Uj,Select:()=>Oj,SelectArrow:()=>Gj,SelectContent:()=>Tj,SelectGroup:()=>Bj,SelectIcon:()=>Sj,SelectItem:()=>Xj,SelectItemIndicator:()=>Vj,SelectItemText:()=>qj,SelectLabel:()=>zj,SelectPortal:()=>Lj,SelectScrollDownButton:()=>jj,SelectScrollUpButton:()=>Uj,SelectSeparator:()=>Fj,SelectTrigger:()=>yj,SelectValue:()=>vj,SelectViewport:()=>Mj,Separator:()=>Fj,Trigger:()=>yj,Value:()=>vj,Viewport:()=>Mj,createSelectScope:()=>hj,unstable_BubbleInput:()=>aE,unstable_Provider:()=>Jv,unstable_SelectBubbleInput:()=>aE,unstable_SelectProvider:()=>Jv});var V=L(F(),1),Kv=L(Es(),1);var le=L(G(),1),uj=Object.defineProperty,ke=(t,e)=>uj(t,"name",{value:e,configurable:!0}),cj=[" ","Enter","ArrowUp","ArrowDown"],fj=[" ","Enter"],Mc="Select",[_g,zg,dj]=Td(Mc),[wl,hj]=ca(Mc,[dj,Vv]),Ng=Vv(),[pj,os]=wl(Mc),[mj,gj]=wl(Mc);function Jv(t){let{__scopeSelect:e,children:a,open:r,defaultOpen:n,onOpenChange:i,value:o,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:f,disabled:d,required:h,form:p,internal_do_not_use_render:m}=t,x=Ng(e),[g,O]=V.useState(null),[y,b]=V.useState(null),[v,S]=V.useState(!1),w=Vi(u),[k,T]=Aa({prop:r,defaultProp:n??!1,onChange:i,caller:Mc}),[Q,$]=Aa({prop:o,defaultProp:s,onChange:l,caller:Mc}),A=V.useRef(null),R=V.useRef(Q);V.useEffect(()=>{let P=p?g?.ownerDocument.getElementById(p):g?.form;if(P instanceof HTMLFormElement){let H=ke(()=>$(R.current),"reset");return P.addEventListener("reset",H),()=>P.removeEventListener("reset",H)}},[p,g,$]);let D=g?!!p||!!g.closest("form"):!0,[Y,B]=V.useState(new Set),q=Dt(),re=Array.from(Y).map(P=>P.props.value).join(";"),ie=V.useCallback(P=>{B(H=>new Set(H).add(P))},[]),z=V.useCallback(P=>{B(H=>{let N=new Set(H);return N.delete(P),N})},[]),Pe={required:h,trigger:g,onTriggerChange:O,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:v,onValueNodeHasChildrenChange:S,contentId:q,value:Q,onValueChange:$,open:k,onOpenChange:T,dir:w,triggerPointerDownPosRef:A,disabled:d,name:c,autoComplete:f,form:p,nativeOptions:Y,nativeSelectKey:re,isFormControl:D};return(0,le.jsx)(QM,{...x,children:(0,le.jsx)(pj,{scope:e,...Pe,children:(0,le.jsx)(_g.Provider,{scope:e,children:(0,le.jsx)(mj,{scope:e,onNativeOptionAdd:ie,onNativeOptionRemove:z,children:rE(m)?m(Pe):a})})})})}ke(Jv,"SelectProvider");var Oj=ke(t=>{let{__scopeSelect:e,children:a,...r}=t;return(0,le.jsx)(Jv,{__scopeSelect:e,...r,internal_do_not_use_render:({isFormControl:n})=>(0,le.jsxs)(le.Fragment,{children:[a,n?(0,le.jsx)(aE,{__scopeSelect:e}):null]})})},"Select"),xj="SelectTrigger",yj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,disabled:n=!1,...i}=e,o=Ng(r),s=os(xj,r),l=s.disabled||n,u=Qe(a,s.onTriggerChange),c=zg(r),f=V.useRef("touch"),[d,h,p]=tS(x=>{let g=c().filter(b=>!b.disabled),O=g.find(b=>b.value===s.value),y=aS(g,x,O);y!==void 0&&s.onValueChange(y.value)}),m=ke(x=>{l||(s.onOpenChange(!0),p()),x&&(s.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})},"handleOpen");return(0,le.jsx)(MM,{asChild:!0,...o,children:(0,le.jsx)(ue.button,{type:"button",role:"combobox","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Nd(s.value)?"":void 0,...i,ref:u,onClick:xe(i.onClick,x=>{x.currentTarget.focus(),f.current!=="mouse"&&m(x)}),onPointerDown:xe(i.onPointerDown,x=>{f.current=x.pointerType;let g=x.target;g.hasPointerCapture(x.pointerId)&&g.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(m(x),x.preventDefault())}),onKeyDown:xe(i.onKeyDown,x=>{let g=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&h(x.key),!(g&&x.key===" ")&&cj.includes(x.key)&&(m(),x.preventDefault())})})})},"SelectTrigger")),bj="SelectValue",vj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,className:n,style:i,children:o,placeholder:s="",...l}=e,u=os(bj,r),{onValueNodeHasChildrenChange:c}=u,f=o!==void 0,d=Qe(a,u.onValueNodeChange);Xe(()=>{c(f)},[c,f]);let h=Nd(u.value);return(0,le.jsx)(ue.span,{...l,asChild:h?!1:l.asChild,ref:d,style:{pointerEvents:"none"},children:(0,le.jsx)(V.Fragment,{children:h?s:o},h?"placeholder":"value")})},"SelectValue")),Sj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,children:n,...i}=e;return(0,le.jsx)(ue.span,{"aria-hidden":!0,...i,ref:a,children:n||"\u25BC"})},"SelectIcon")),wj="SelectPortal",[Cj,kj]=wl(wj,{forceMount:void 0}),Lj=ke(t=>{let{__scopeSelect:e,forceMount:a,...r}=t;return(0,le.jsx)(Cj,{scope:t.__scopeSelect,forceMount:a,children:(0,le.jsx)(og,{asChild:!0,...r})})},"SelectPortal"),Sl="SelectContent",Tj=V.forwardRef(ke(function(e,a){let r=kj(Sl,e.__scopeSelect),{forceMount:n=r.forceMount,...i}=e,o=os(Sl,e.__scopeSelect),[s,l]=V.useState();return Xe(()=>{l(new DocumentFragment)},[]),(0,le.jsx)(as,{present:n||o.open,children:({present:u})=>u?(0,le.jsx)(Ij,{...i,ref:a}):(0,le.jsx)(Pj,{...i,fragment:s})})},"SelectContent")),Pj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,children:n,fragment:i}=e;return i?Kv.createPortal((0,le.jsx)(JM,{scope:r,children:(0,le.jsx)(_g.Slot,{scope:r,children:(0,le.jsx)("div",{ref:a,children:n})})}),i):null},"SelectContentFragment")),wn=10,[JM,ss]=wl(Sl),Rj=Ia("SelectContent.RemoveScroll"),Ij=V.forwardRef(ke(function(e,a){let{__scopeSelect:r}=e,{position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:l,sideOffset:u,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:x,avoidCollisions:g,...O}=e,y=os(Sl,r),[b,v]=V.useState(null),[S,w]=V.useState(null),k=Qe(a,v),[T,Q]=V.useState(null),[$,A]=V.useState(null),R=zg(r),[D,Y]=V.useState(!1),B=V.useRef(!1);V.useEffect(()=>{if(b)return gg(b)},[b]),kc();let q=V.useCallback(ee=>{let[Z,...qe]=R().map(Ze=>Ze.ref.current),[Re]=qe.slice(-1),Ie=document.activeElement;for(let Ze of ee)if(Ze===Ie||(Ze?.scrollIntoView({block:"nearest"}),Ze===Z&&S&&(S.scrollTop=0),Ze===Re&&S&&(S.scrollTop=S.scrollHeight),Ze?.focus(),document.activeElement!==Ie))return},[R,S]),re=V.useCallback(()=>q([T,b]),[q,T,b]);V.useEffect(()=>{D&&re()},[D,re]);let{onOpenChange:ie,triggerPointerDownPosRef:z}=y;V.useEffect(()=>{if(b){let ee={x:0,y:0},Z=ke(Re=>{ee={x:Math.abs(Math.round(Re.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(Re.pageY)-(z.current?.y??0))}},"handlePointerMove"),qe=ke(Re=>{ee.x<=10&&ee.y<=10?Re.preventDefault():Re.composedPath().includes(b)||ie(!1),document.removeEventListener("pointermove",Z),z.current=null},"handlePointerUp");return z.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",qe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",qe,{capture:!0})}}},[b,ie,z]),V.useEffect(()=>{let ee=ke(()=>ie(!1),"close");return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[ie]);let[Pe,P]=tS(ee=>{let Z=R().filter(Ie=>!Ie.disabled),qe=Z.find(Ie=>Ie.ref.current===document.activeElement),Re=aS(Z,ee,qe);Re&&setTimeout(()=>Re.ref.current?.focus())}),H=V.useCallback((ee,Z,qe)=>{let Re=!B.current&&!qe;(y.value!==void 0&&y.value===Z||Re)&&(Q(ee),Re&&(B.current=!0))},[y.value]),N=V.useCallback(()=>b?.focus(),[b]),M=V.useCallback((ee,Z,qe)=>{let Re=!B.current&&!qe;(y.value!==void 0&&y.value===Z||Re)&&A(ee)},[y.value]),j=n==="popper"?GM:Aj,de=j===GM?{side:l,sideOffset:u,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:x,avoidCollisions:g}:{};return(0,le.jsx)(JM,{scope:r,content:b,viewport:S,onViewportChange:w,itemRefCallback:H,selectedItem:T,onItemLeave:N,itemTextRefCallback:M,focusSelectedItem:re,selectedItemText:$,position:n,isPositioned:D,searchRef:Pe,children:(0,le.jsx)(Qd,{as:Rj,allowPinchZoom:!0,children:(0,le.jsx)(ng,{asChild:!0,trapped:y.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:xe(i,ee=>{y.trigger?.focus({preventScroll:!0}),ee.preventDefault()}),children:(0,le.jsx)(rg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,le.jsx)(j,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:ee=>ee.preventDefault(),...O,...de,onPlaced:()=>Y(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...O.style},onKeyDown:xe(O.onKeyDown,ee=>{let Z=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!Z&&ee.key.length===1&&P(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let Re=R().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(Re=Re.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){let Ie=ee.target,Ze=Re.indexOf(Ie);Re=Re.slice(Ze+1)}setTimeout(()=>q(Re)),ee.preventDefault()}})})})})})})},"SelectContentImpl")),Aj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,onPlaced:n,...i}=e,o=os(Sl,r),s=ss(Sl,r),[l,u]=V.useState(null),[c,f]=V.useState(null),d=Qe(a,f),h=zg(r),p=V.useRef(!1),m=V.useRef(!0),{viewport:x,selectedItem:g,selectedItemText:O,focusSelectedItem:y}=s,b=V.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&c&&x&&g&&O){let k=o.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),Q=o.valueNode.getBoundingClientRect(),$=O.getBoundingClientRect();if(o.dir!=="rtl"){let Ie=$.left-T.left,Ze=Q.left-Ie,Vt=k.left-Ze,Za=k.width+Vt,iu=Math.max(Za,T.width),Si=window.innerWidth-wn,ou=$g(Ze,[wn,Math.max(wn,Si-iu)]);l.style.minWidth=Za+"px",l.style.left=ou+"px"}else{let Ie=T.right-$.right,Ze=window.innerWidth-Q.right-Ie,Vt=window.innerWidth-k.right-Ze,Za=k.width+Vt,iu=Math.max(Za,T.width),Si=window.innerWidth-wn,ou=$g(Ze,[wn,Math.max(wn,Si-iu)]);l.style.minWidth=Za+"px",l.style.right=ou+"px"}let A=h(),R=window.innerHeight-wn*2,D=x.scrollHeight,Y=window.getComputedStyle(c),B=parseInt(Y.borderTopWidth,10),q=parseInt(Y.paddingTop,10),re=parseInt(Y.borderBottomWidth,10),ie=parseInt(Y.paddingBottom,10),z=B+q+D+ie+re,Pe=Math.min(g.offsetHeight*5,z),P=window.getComputedStyle(x),H=parseInt(P.paddingTop,10),N=parseInt(P.paddingBottom,10),M=k.top+k.height/2-wn,j=R-M,de=g.offsetHeight/2,ee=g.offsetTop+de,Z=B+q+ee,qe=z-Z;if(Z<=M){let Ie=A.length>0&&g===A[A.length-1].ref.current;l.style.bottom="0px";let Ze=c.clientHeight-x.offsetTop-x.offsetHeight,Vt=Math.max(j,de+(Ie?N:0)+Ze+re),Za=Z+Vt;l.style.height=Za+"px"}else{let Ie=A.length>0&&g===A[0].ref.current;l.style.top="0px";let Vt=Math.max(M,B+x.offsetTop+(Ie?H:0)+de)+qe;l.style.height=Vt+"px",x.scrollTop=Z-M+x.offsetTop}l.style.margin=`${wn}px 0`,l.style.minHeight=Pe+"px",l.style.maxHeight=R+"px",n?.(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,l,c,x,g,O,o.dir,n]);Xe(()=>b(),[b]);let[v,S]=V.useState();Xe(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);let w=V.useCallback(k=>{k&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]);return(0,le.jsx)(Qj,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:w,children:(0,le.jsx)("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:v},children:(0,le.jsx)(ue.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})},"SelectItemAlignedPosition")),GM=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,align:n="start",collisionPadding:i=wn,...o}=e,s=Ng(r);return(0,le.jsx)(EM,{...s,...o,ref:a,align:n,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Qj,eS]=wl(Sl,{}),YM="SelectViewport",Mj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,nonce:n,...i}=e,o=ss(YM,r),s=eS(YM,r),l=Qe(a,o.onViewportChange),u=V.useRef(0);return(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,le.jsx)(_g.Slot,{scope:r,children:(0,le.jsx)(ue.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:xe(i.onScroll,c=>{let f=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=s;if(h?.current&&d){let p=Math.abs(u.current-f.scrollTop);if(p>0){let m=window.innerHeight-wn*2,x=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),O=Math.max(x,g);if(O<m){let y=O+p,b=Math.min(m,y),v=y-b;d.style.height=b+"px",d.style.bottom==="0px"&&(f.scrollTop=v>0?v:0,d.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})},"SelectViewport")),Ej="SelectGroup",[Dj,$j]=wl(Ej),Bj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,...n}=e,i=Dt();return(0,le.jsx)(Dj,{scope:r,id:i,children:(0,le.jsx)(ue.div,{role:"group","aria-labelledby":i,...n,ref:a})})},"SelectGroup")),_j="SelectLabel",zj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,...n}=e,i=$j(_j,r);return(0,le.jsx)(ue.div,{id:i.id,...n,ref:a})},"SelectLabel")),Wv="SelectItem",[Nj,eE]=wl(Wv),Xj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,value:n,disabled:i=!1,textValue:o,...s}=e,l=os(Wv,r),u=ss(Wv,r),c=l.value===n,[f,d]=V.useState(o??""),[h,p]=V.useState(!1),m=ya(b=>u.itemRefCallback?.(b,n,i)),x=Qe(a,m),g=Dt(),O=V.useRef("touch"),y=ke(()=>{i||(l.onValueChange(n),l.onOpenChange(!1))},"handleSelect");return(0,le.jsx)(Nj,{scope:r,value:n,disabled:i,textId:g,isSelected:c,onItemTextChange:V.useCallback(b=>{d(v=>v||(b?.textContent??"").trim())},[]),children:(0,le.jsx)(_g.ItemSlot,{scope:r,value:n,disabled:i,textValue:f,children:(0,le.jsx)(ue.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:x,onFocus:xe(s.onFocus,()=>p(!0)),onBlur:xe(s.onBlur,()=>p(!1)),onClick:xe(s.onClick,()=>{O.current!=="mouse"&&y()}),onPointerUp:xe(s.onPointerUp,()=>{O.current==="mouse"&&y()}),onPointerDown:xe(s.onPointerDown,b=>{O.current=b.pointerType}),onPointerMove:xe(s.onPointerMove,b=>{O.current=b.pointerType,i?u.onItemLeave?.():O.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:xe(s.onPointerLeave,b=>{b.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:xe(s.onKeyDown,b=>{i||b.target!==b.currentTarget||u.searchRef?.current!==""&&b.key===" "||(fj.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})},"SelectItem")),Bg="SelectItemText",qj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,className:n,style:i,...o}=e,s=os(Bg,r),l=ss(Bg,r),u=eE(Bg,r),c=gj(Bg,r),[f,d]=V.useState(null),h=ya(y=>l.itemTextRefCallback?.(y,u.value,u.disabled)),p=Qe(a,d,u.onItemTextChange,h),m=f?.textContent,x=V.useMemo(()=>(0,le.jsx)("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:O}=c;return Xe(()=>(g(x),()=>O(x)),[g,O,x]),(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)(ue.span,{id:u.textId,...o,ref:p}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!Nd(s.value)?Kv.createPortal(o.children,s.valueNode):null]})},"SelectItemText")),Zj="SelectItemIndicator",Vj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,...n}=e;return eE(Zj,r).isSelected?(0,le.jsx)(ue.span,{"aria-hidden":!0,...n,ref:a}):null},"SelectItemIndicator")),WM="SelectScrollUpButton",Uj=V.forwardRef(ke(function(e,a){let r=ss(WM,e.__scopeSelect),n=eS(WM,e.__scopeSelect),[i,o]=V.useState(!1),s=Qe(a,n.onScrollButtonChange);return Xe(()=>{if(r.viewport&&r.isPositioned){let u=function(){let f=c.scrollTop>0;o(f)};var l=u;ke(u,"handleScroll");let c=r.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?(0,le.jsx)(tE,{...e,ref:s,onAutoScroll:()=>{let{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null},"SelectScrollUpButton")),KM="SelectScrollDownButton",jj=V.forwardRef(ke(function(e,a){let r=ss(KM,e.__scopeSelect),n=eS(KM,e.__scopeSelect),[i,o]=V.useState(!1),s=Qe(a,n.onScrollButtonChange);return Xe(()=>{if(r.viewport&&r.isPositioned){let u=function(){let f=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<f;o(d)};var l=u;ke(u,"handleScroll");let c=r.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?(0,le.jsx)(tE,{...e,ref:s,onAutoScroll:()=>{let{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null},"SelectScrollDownButton")),tE=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,onAutoScroll:n,...i}=e,o=ss("SelectScrollButton",r),s=V.useRef(null),l=zg(r),u=V.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return V.useEffect(()=>()=>u(),[u]),Xe(()=>{l().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),(0,le.jsx)(ue.div,{"aria-hidden":!0,...i,ref:a,style:{flexShrink:0,...i.style},onPointerDown:xe(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:xe(i.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:xe(i.onPointerLeave,()=>{u()})})},"SelectScrollButtonImpl")),Fj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,...n}=e;return(0,le.jsx)(ue.div,{"aria-hidden":!0,...n,ref:a})},"SelectSeparator")),Hj="SelectArrow",Gj=V.forwardRef(ke(function(e,a){let{__scopeSelect:r,...n}=e,i=Ng(r);return ss(Hj,r).position==="popper"?(0,le.jsx)(DM,{...i,...n,ref:a}):null},"SelectArrow")),Yj="SelectBubbleInput",aE=V.forwardRef(ke(function({__scopeSelect:e,...a},r){let n=os(Yj,e),{value:i,onValueChange:o,required:s,disabled:l,name:u,autoComplete:c,form:f}=n,{nativeOptions:d,nativeSelectKey:h}=n,p=V.useRef(null),m=Qe(r,p),x=i??"",g=Yv(x),O=Array.from(d).some(y=>(y.props.value??"")==="");return V.useEffect(()=>{let y=p.current;if(!y)return;let b=window.HTMLSelectElement.prototype,S=Object.getOwnPropertyDescriptor(b,"value").set;if(g!==x&&S){let w=new Event("change",{bubbles:!0});S.call(y,x),y.dispatchEvent(w)}},[g,x]),(0,le.jsxs)(ue.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:u,autoComplete:c,disabled:l,form:f,onChange:y=>o(y.target.value),...a,style:{...bQ,...a.style},ref:m,defaultValue:x,children:[Nd(i)&&!O?(0,le.jsx)("option",{value:""}):null,Array.from(d)]},h)},"SelectBubbleInput"));function rE(t){return typeof t=="function"}ke(rE,"isFunction");function Nd(t){return t===""||t===void 0}ke(Nd,"shouldShowPlaceholder");function tS(t){let e=ya(t),a=V.useRef(""),r=V.useRef(0),n=V.useCallback(o=>{let s=a.current+o;e(s),ke((function l(u){a.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}),"updateSearch")(s)},[e]),i=V.useCallback(()=>{a.current="",window.clearTimeout(r.current)},[]);return V.useEffect(()=>()=>window.clearTimeout(r.current),[]),[a,n,i]}ke(tS,"useTypeaheadSearch");function aS(t,e,a){let n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=a?t.indexOf(a):-1,o=nE(t,Math.max(i,0));n.length===1&&(o=o.filter(u=>u!==a));let l=o.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==a?l:void 0}ke(aS,"findNextItem");function nE(t,e){return t.map((a,r)=>t[(e+r)%t.length])}ke(nE,"wrapArray");var Cl={};cu(Cl,{Content:()=>sF,List:()=>iF,Root:()=>nF,Tabs:()=>oE,TabsContent:()=>uE,TabsList:()=>sE,TabsTrigger:()=>lE,Trigger:()=>oF,createTabsScope:()=>Jj});var Yi=L(F(),1);var Gi=L(G(),1),Wj=Object.defineProperty,Ec=(t,e)=>Wj(t,"name",{value:e,configurable:!0}),rS="Tabs",[Kj,Jj]=ca(rS,[Qc]),iE=Qc(),[eF,nS]=Kj(rS),oE=Yi.forwardRef(Ec(function(e,a){let{__scopeTabs:r,value:n,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:l,activationMode:u="automatic",...c}=e,f=Vi(l),[d,h]=Aa({prop:n,onChange:i,defaultProp:o??"",caller:rS});return(0,Gi.jsx)(eF,{scope:r,baseId:Dt(),value:d,onValueChange:h,orientation:s,dir:f,activationMode:u,children:(0,Gi.jsx)(ue.div,{dir:f,"data-orientation":s,...c,ref:a})})},"Tabs")),tF="TabsList",sE=Yi.forwardRef(Ec(function(e,a){let{__scopeTabs:r,loop:n=!0,...i}=e,o=nS(tF,r),s=iE(r);return(0,Gi.jsx)(Qg,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:n,children:(0,Gi.jsx)(ue.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:a})})},"TabsList")),aF="TabsTrigger",lE=Yi.forwardRef(Ec(function(e,a){let{__scopeTabs:r,value:n,disabled:i=!1,...o}=e,s=nS(aF,r),l=iE(r),u=iS(s.baseId,n),c=oS(s.baseId,n),f=n===s.value;return(0,Gi.jsx)(Mg,{asChild:!0,...l,focusable:!i,active:f,children:(0,Gi.jsx)(ue.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:a,onMouseDown:xe(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?s.onValueChange(n):d.preventDefault()}),onKeyDown:xe(e.onKeyDown,d=>{i||d.target!==d.currentTarget||[" ","Enter"].includes(d.key)&&s.onValueChange(n)}),onFocus:xe(e.onFocus,()=>{let d=s.activationMode!=="manual";!f&&!i&&d&&s.onValueChange(n)})})})},"TabsTrigger")),rF="TabsContent",uE=Yi.forwardRef(Ec(function(e,a){let{__scopeTabs:r,value:n,forceMount:i,children:o,...s}=e,l=nS(rF,r),u=iS(l.baseId,n),c=oS(l.baseId,n),f=n===l.value,d=Yi.useRef(f);return Yi.useEffect(()=>{let h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),(0,Gi.jsx)(as,{present:i||f,children:({present:h})=>(0,Gi.jsx)(ue.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:c,tabIndex:0,...s,ref:a,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&o})})},"TabsContent"));function iS(t,e){return`${t}-trigger-${e}`}Ec(iS,"makeTriggerId");function oS(t,e){return`${t}-content-${e}`}Ec(oS,"makeContentId");var nF=oE,iF=sE,oF=lE,sF=uE;var cE=L(F(),1);var fE=L(G(),1),lF=Object.defineProperty,uF=(t,e)=>lF(t,"name",{value:e,configurable:!0}),cF="Toggle",dE=cE.forwardRef(uF(function(e,a){let{pressed:r,defaultPressed:n,onPressedChange:i,...o}=e,[s,l]=Aa({prop:r,onChange:i,defaultProp:n??!1,caller:cF});return(0,fE.jsx)(ue.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:a,onClick:xe(e.onClick,()=>{e.disabled||l(!s)})})},"Toggle"));var Xd={};cu(Xd,{Item:()=>xF,Root:()=>hF,ToggleGroup:()=>hF,ToggleGroupItem:()=>xF,createToggleGroupScope:()=>dF});var $a=L(F(),1);var Da=L(G(),1),fF=Object.defineProperty,ls=(t,e)=>fF(t,"name",{value:e,configurable:!0}),Dc="ToggleGroup",[pE,dF]=ca(Dc,[Qc]),mE=Qc(),hF=$a.forwardRef(ls(function(e,a){let{type:r,...n}=e;if(r==="single")return(0,Da.jsx)(pF,{role:"radiogroup",...n,ref:a});if(r==="multiple")return(0,Da.jsx)(mF,{role:"toolbar",...n,ref:a});throw new Error(`Missing prop \`type\` expected on \`${Dc}\``)},"ToggleGroup")),[gE,OE]=pE(Dc),pF=$a.forwardRef(ls(function(e,a){let{value:r,defaultValue:n,onValueChange:i=ls(()=>{},"onValueChange"),...o}=e,[s,l]=Aa({prop:r,defaultProp:n??"",onChange:i,caller:Dc});return(0,Da.jsx)(gE,{scope:e.__scopeToggleGroup,type:"single",value:$a.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:$a.useCallback(()=>l(""),[l]),children:(0,Da.jsx)(xE,{...o,ref:a})})},"ToggleGroupImplSingle")),mF=$a.forwardRef(ls(function(e,a){let{value:r,defaultValue:n,onValueChange:i=ls(()=>{},"onValueChange"),...o}=e,[s,l]=Aa({prop:r,defaultProp:n??[],onChange:i,caller:Dc}),u=$a.useCallback(f=>l((d=[])=>[...d,f]),[l]),c=$a.useCallback(f=>l((d=[])=>d.filter(h=>h!==f)),[l]);return(0,Da.jsx)(gE,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:c,children:(0,Da.jsx)(xE,{...o,ref:a})})},"ToggleGroupImplMultiple")),[gF,OF]=pE(Dc),xE=$a.forwardRef(ls(function(e,a){let{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:i=!0,orientation:o,dir:s,loop:l=!0,...u}=e,c=mE(r),f=Vi(s),d={dir:f,...u};return(0,Da.jsx)(gF,{scope:r,rovingFocus:i,disabled:n,children:i?(0,Da.jsx)(Qg,{asChild:!0,...c,orientation:o,dir:f,loop:l,children:(0,Da.jsx)(ue.div,{...d,ref:a})}):(0,Da.jsx)(ue.div,{...d,ref:a})})},"ToggleGroupImpl")),sS="ToggleGroupItem",xF=$a.forwardRef(ls(function(e,a){let r=OE(sS,e.__scopeToggleGroup),n=OF(sS,e.__scopeToggleGroup),i=mE(e.__scopeToggleGroup),o=r.value.includes(e.value),s=n.disabled||e.disabled,l={...e,pressed:o,disabled:s},u=$a.useRef(null);return n.rovingFocus?(0,Da.jsx)(Mg,{asChild:!0,...i,focusable:!s,active:o,ref:u,children:(0,Da.jsx)(hE,{...l,ref:a})}):(0,Da.jsx)(hE,{...l,ref:a})},"ToggleGroupItem")),hE=$a.forwardRef(ls(function(e,a){let{__scopeToggleGroup:r,value:n,...i}=e,o=OE(sS,r),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=o.type==="single"?s:void 0;return(0,Da.jsx)(dE,{...l,...i,ref:a,onPressedChange:u=>{u?o.onItemActivate(n):o.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var yE=L(G(),1),yF=si("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function pi({className:t,variant:e="default",asChild:a=!1,...r}){let n=a?yc.Root:"span";return(0,yE.jsx)(n,{"data-slot":"badge","data-variant":e,className:pe(yF({variant:e}),t),...r})}var Sie=L(F(),1);var us=L(G(),1);function kl({className:t,...e}){return(0,us.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,us.jsx)("table",{"data-slot":"table",className:pe("w-full caption-bottom text-sm",t),...e})})}function bE({className:t,...e}){return(0,us.jsx)("thead",{"data-slot":"table-header",className:pe("[&_tr]:border-b",t),...e})}function Ll({className:t,...e}){return(0,us.jsx)("tbody",{"data-slot":"table-body",className:pe("[&_tr:last-child]:border-0",t),...e})}function Tl({className:t,...e}){return(0,us.jsx)("tr",{"data-slot":"table-row",className:pe("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",t),...e})}function Pl({className:t,...e}){return(0,us.jsx)("th",{"data-slot":"table-head",className:pe("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}function Cn({className:t,...e}){return(0,us.jsx)("td",{"data-slot":"table-cell",className:pe("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}var kn=L(G(),1);function cs({faultsByFile:t,label:e}){let a=n=>n.some(({data:i})=>i.severity==="error"),r=Object.entries(t.data.files).sort(([,n],[,i])=>Number(a(i))-Number(a(n)));return(0,kn.jsx)("div",{className:"overflow-hidden rounded-[14px] border bg-background",children:(0,kn.jsx)(kl,{"aria-label":e,children:(0,kn.jsx)(Ll,{children:r.map(([n,i])=>(0,kn.jsxs)(Tl,{className:"border-zinc-100 align-top hover:bg-transparent",children:[(0,kn.jsx)(Cn,{className:`w-[210px] py-[11px] pl-4 font-mono text-[11.5px] font-bold whitespace-normal break-all ${a(i)?"text-destructive":""}`,children:n}),(0,kn.jsx)(Cn,{className:"space-y-1.5 py-[11px] pr-4 whitespace-normal",children:[...i].sort((o,s)=>+(s.data.severity==="error")-+(o.data.severity==="error")).map(({data:{severity:o,message:s,fix:l}})=>(0,kn.jsxs)("p",{className:"text-xs leading-[1.55] text-zinc-700",children:[(0,kn.jsx)(pi,{className:`mr-2 rounded-[5px] px-[7px] py-0 align-[1px] text-[11.5px] font-bold tracking-[0.04em] [font-variant-caps:all-small-caps] ${o==="error"?"bg-[#fdeef0] text-[#b91c1c]":"bg-[#fffbeb] text-[#b45309]"}`,children:o}),s," ",(0,kn.jsx)("span",{className:"text-zinc-400",children:l})]},s))})]},n))})})})}var Pie=L(F(),1);var Xg=L(G(),1),bF=si("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function Ur({className:t,variant:e,...a}){return(0,Xg.jsx)("div",{"data-slot":"alert",role:"alert",className:pe(bF({variant:e}),t),...a})}function jr({className:t,...e}){return(0,Xg.jsx)("div",{"data-slot":"alert-title",className:pe("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...e})}function Fr({className:t,...e}){return(0,Xg.jsx)("div",{"data-slot":"alert-description",className:pe("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",t),...e})}var Qie=L(F(),1);var vE=L(G(),1),vF=si("inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-[10px] text-xs font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-45 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"border border-primary bg-primary font-semibold text-primary-foreground hover:bg-black",destructive:"border bg-background text-destructive hover:border-destructive focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"border bg-background text-zinc-600 hover:border-foreground hover:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 px-3.5 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1.5 rounded-[9px] px-2.5 text-[11.5px] has-[>svg]:px-2",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ae({className:t,variant:e="default",size:a="default",asChild:r=!1,...n}){let i=r?yc.Root:"button";return(0,vE.jsx)(i,{"data-slot":"button","data-variant":e,"data-size":a,className:pe(vF({variant:e,size:a,className:t})),...n})}var _e=L(G(),1);function SE({onBuilt:t}){let e=PA(),a=jm();if(e.data===void 0)return null;let r=e.data;if(r.type==="FaultsByFile")return(0,_e.jsx)(kE,{faultsByFile:r});let{added:n,edited:i,deleted:o,unchanged:s}=r.data,l=[...n.map(u=>["create",u]),...i.map(u=>["update",u]),...o.map(u=>["delete",u]),...s.map(u=>["unchanged",u])];return(0,_e.jsxs)("div",{className:"-mt-[18px]",children:[(0,_e.jsxs)("div",{className:"-mx-5 flex items-center gap-2.5 border-b border-[#f0f0f0] bg-[#f5f8ff] px-4 py-3.5",children:[(0,_e.jsx)("i",{className:"size-2 shrink-0 rounded-full bg-[#1d4ed8]"}),(0,_e.jsx)("span",{className:"text-[12.5px] font-bold",children:"Nothing was written"}),(0,_e.jsxs)("p",{className:"min-w-0 text-[11.5px] leading-normal text-zinc-500","aria-label":"Plan counts",children:[l.length," file",l.length===1?"":"s",": ",n.length," create, ",i.length," update, ",o.length," delete,"," ",s.length," unchanged."]})]}),(0,_e.jsx)("div",{className:"-mx-5",children:(0,_e.jsx)(kl,{"aria-label":"Build plan",children:(0,_e.jsx)(Ll,{children:l.map(([u,c])=>(0,_e.jsx)(CE,{pathChange:u,path:c},c))})})}),(0,_e.jsx)("div",{className:ui,children:(0,_e.jsx)(Ae,{disabled:a.isPending,onClick:()=>a.mutate(void 0,{onSuccess:t}),children:"Build"})})]})}function wE({buildAnswer:t}){if(t.type==="FaultsByFile")return(0,_e.jsx)(kE,{faultsByFile:t});let{added:e,edited:a,deleted:r}=t.data,n=[...e,...a];return(0,_e.jsxs)("div",{className:"-mt-[18px] -mb-[18px]",children:[(0,_e.jsxs)("div",{className:"-mx-5 flex items-center gap-2.5 border-b border-[#f0f0f0] bg-[#f5fbf7] px-4 py-3.5",children:[(0,_e.jsx)("i",{className:"size-2 shrink-0 rounded-full bg-[#16a34a]"}),(0,_e.jsxs)("p",{className:"text-[12.5px] font-bold","aria-label":"Build counts",children:["Built ",n.length," file",n.length===1?"":"s",": ",e.length," added, ",a.length," changed, ",r.length," deleted."]})]}),(0,_e.jsx)("div",{className:"-mx-5",children:(0,_e.jsx)(kl,{"aria-label":"Build written",children:(0,_e.jsx)(Ll,{children:[...n.map(i=>["wrote",i]),...r.map(i=>["deleted",i])].map(([i,o])=>(0,_e.jsx)(CE,{pathChange:i,path:o},o))})})})]})}var SF={create:"bg-[#f0fdf4] text-[#15803d]",wrote:"bg-[#f0fdf4] text-[#15803d]",update:"bg-[#eff6ff] text-[#1d4ed8]",delete:"bg-[#fdeef0] text-[#b91c1c]",deleted:"bg-[#fdeef0] text-[#b91c1c]",unchanged:"bg-zinc-50 text-zinc-400"};function CE({pathChange:t,path:e}){return(0,_e.jsxs)(Tl,{className:"border-zinc-100 hover:bg-transparent",children:[(0,_e.jsx)(Cn,{className:"w-28 py-[11px] pl-4",children:(0,_e.jsx)("span",{className:`rounded-[5px] px-[7px] py-0.5 text-[9.5px] font-bold tracking-[0.04em] uppercase ${SF[t]}`,children:t})}),(0,_e.jsx)(Cn,{className:"py-[11px] pr-4 font-mono text-[11.5px] font-bold",children:e})]})}function kE({faultsByFile:t}){return(0,_e.jsxs)("div",{className:"space-y-3.5",children:[(0,_e.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,_e.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:"Nothing was written"}),(0,_e.jsx)(Fr,{children:"The charter has errors, so there is no build until they are fixed."})]}),(0,_e.jsx)(cs,{faultsByFile:t,label:"Refused files"})]})}var yr=L(G(),1);function LE({onBuilt:t}){let e=RA(),a=jm();if(e.data===void 0)return null;let{agents:r,errorCount:n,warnCount:i,pendingCount:o,faultsByFile:s,driftedVendors:l,problemCount:u}=e.data.data,c=[["Agents",r.length===0?"none chosen, so only the neutral surface is compiled.":`${r.join(", ")}.`],["Charter",n>0?`${n} error${n===1?"":"s"}.`:i===0?"holds.":`holds, with ${i} warning${i===1?"":"s"}.`],["Vendors",l.length===0?"none edited here.":`edited here: ${l.join(", ")}. Run "git checkout" under .cw/vendor/ to undo, or commit what you meant.`],["Built",o===null?"not known, since the charter does not hold.":o===0?"up to date.":`${o} file${o===1?"":"s"} out of date.`]],[f,d]=n>0?["bg-[#fef6f6]","bg-[#b91c1c]"]:i>0?["bg-[#fffbeb]","bg-[#b45309]"]:["bg-[#f5fbf7]","bg-[#16a34a]"];return(0,yr.jsxs)("div",{className:"-mt-[18px] space-y-4",children:[(0,yr.jsxs)("div",{className:`-mx-5 flex items-center gap-2.5 border-b border-[#f0f0f0] px-4 py-3.5 ${f}`,children:[(0,yr.jsx)("i",{className:`size-2 shrink-0 rounded-full ${d}`}),(0,yr.jsx)("span",{className:"text-[12.5px] font-bold",children:u===0?"Nothing to fix.":`${u} thing${u===1?"":"s"} to fix.`})]}),(0,yr.jsx)("dl",{className:"overflow-hidden rounded-[11px] border border-[#f0f0f0]","aria-label":"Health",children:c.map(([h,p])=>(0,yr.jsxs)("div",{className:"flex items-baseline gap-3 border-b border-zinc-100 px-[13px] py-2.5 last:border-b-0",children:[(0,yr.jsx)("dt",{className:"w-[118px] shrink-0 text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:h}),(0,yr.jsx)("dd",{className:"text-xs",children:p})]},h))}),Object.keys(s.data.files).length>0&&(0,yr.jsx)(cs,{faultsByFile:s,label:"Faults"}),o!==null&&o>0&&(0,yr.jsx)("div",{className:ui,children:(0,yr.jsx)(Ae,{disabled:a.isPending,onClick:()=>a.mutate(void 0,{onSuccess:t}),children:"Build"})})]})}var Se=L(G(),1);function TE({id:t,onExplain:e}){let{data:a}=SA(t);if(a===void 0)return null;if(a.type==="Fault")return(0,Se.jsxs)(Ln,{title:"Not in this charter",children:[a.data.message," ",(0,Se.jsx)("span",{className:"text-muted-foreground",children:a.data.fix})]});if(a.type==="FaultsByFile")return(0,Se.jsx)(Ln,{title:"Not read",children:"The engine will not read this charter, so there is nothing to explain."});let{primitive:r,activatesWhen:n,useMixins:i,rationale:o,hosts:s,citers:l,mentioners:u,testCasesByFile:c}=a.data,{kind:f,description:d,file:h,layerName:p,headers:m}=r.data,x=({data:b})=>(0,Se.jsx)(Ae,{variant:"link",className:"h-auto rounded-none p-0 font-mono text-[11.5px] font-normal text-[#1d4ed8] underline underline-offset-2",onClick:()=>e(b.id),children:b.id},b.id),g=o===void 0&&typeof m.rationale=="string"?m.rationale:void 0,O=Object.entries(c.data),y=Object.entries(m).filter(([b])=>b!=="id"&&b!=="description");return(0,Se.jsxs)("div",{className:"-mx-5 -my-[18px]",children:[(0,Se.jsxs)(Ln,{title:"What it is",children:[(0,Se.jsx)("b",{className:"font-semibold text-foreground capitalize",children:f})," \u2014 ",d]}),(0,Se.jsx)(Ln,{title:"When it comes up",children:n}),y.length>0&&(0,Se.jsx)(Ln,{title:"What it declares",children:(0,Se.jsx)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 font-mono text-[11.5px]",children:y.map(([b,v])=>(0,Se.jsxs)("div",{className:"contents",children:[(0,Se.jsx)("dt",{className:"text-zinc-400",children:b}),(0,Se.jsx)("dd",{children:typeof v=="string"?v:v.join(", ")})]},b))})}),(i.length>0||o!==void 0||g!==void 0)&&(0,Se.jsxs)(Ln,{title:"What it pulls in",children:[i.map(b=>(0,Se.jsxs)("div",{children:[x(b)," ",(0,Se.jsx)("span",{className:"text-zinc-500",children:"lends its body"})]},b.data.id)),o!==void 0&&(0,Se.jsxs)("div",{children:[x(o)," ",(0,Se.jsx)("span",{className:"text-zinc-500",children:"the reasoning it cites"})]}),g!==void 0&&(0,Se.jsxs)("div",{className:"text-destructive",children:[(0,Se.jsx)("span",{className:"font-mono",children:g})," (does not resolve)"]})]}),s.length>0&&(0,Se.jsx)(Ln,{title:"Lent to",children:s.map(b=>(0,Se.jsx)("div",{children:x(b)},b.data.id))}),l.length>0&&(0,Se.jsx)(Ln,{title:"Cited by",children:l.map(b=>(0,Se.jsx)("div",{children:x(b)},b.data.id))}),u.length>0&&(0,Se.jsx)(Ln,{title:"Mentioned in",children:u.map(b=>(0,Se.jsx)("div",{children:x(b)},b.data.id))}),(0,Se.jsx)(Ln,{title:"Tested by",children:O.length===0?(0,Se.jsx)("span",{className:"text-zinc-400",children:"No test case names it."}):O.map(([b,v])=>(0,Se.jsxs)("div",{children:[(0,Se.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:b}),v.map(S=>(0,Se.jsx)("div",{className:"py-0.5 pl-3 font-mono text-[11px]",children:S},S))]},b))}),(0,Se.jsxs)(Ln,{title:"File",children:[(0,Se.jsx)("span",{className:"font-mono text-[11.5px] text-foreground",children:h})," ",(0,Se.jsxs)("span",{className:"text-zinc-500",children:["in the ",p," layer"]})]})]})}function Ln({title:t,children:e}){return(0,Se.jsxs)("section",{"aria-label":t,className:"border-b border-zinc-100 px-4 py-3.5 last:border-b-0",children:[(0,Se.jsx)("h3",{className:"mb-[7px] text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:t}),(0,Se.jsx)("div",{className:"text-[12.5px] leading-[1.65] text-zinc-700",children:e})]})}var ff=L(F(),1);var lz=L(F(),1);var uS=[],AE=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,a=0;e<t.length;e++)(e%2?AE:uS).push(a=a+t[e])})();function wF(t){if(t<768)return!1;for(let e=0,a=uS.length;;){let r=e+a>>1;if(t<uS[r])a=r;else if(t>=AE[r])e=r+1;else return!0;if(e==a)return!1}}function PE(t){return t>=127462&&t<=127487}var RE=8205;function QE(t,e,a=!0,r=!0){return(a?ME:CF)(t,e,r)}function ME(t,e,a){if(e==t.length)return e;e&&EE(t.charCodeAt(e))&&DE(t.charCodeAt(e-1))&&e--;let r=lS(t,e);for(e+=IE(r);e<t.length;){let n=lS(t,e);if(r==RE||n==RE||a&&wF(n))e+=IE(n),r=n;else if(PE(n)){let i=0,o=e-2;for(;o>=0&&PE(lS(t,o));)i++,o-=2;if(i%2==0)break;e+=2}else break}return e}function CF(t,e,a){for(;e>1;){let r=ME(t,e-2,a);if(r<e)return r;e--}return 0}function lS(t,e){let a=t.charCodeAt(e);if(!DE(a)||e+1==t.length)return a;let r=t.charCodeAt(e+1);return EE(r)?(a-55296<<10)+(r-56320)+65536:a}function EE(t){return t>=56320&&t<57344}function DE(t){return t>=55296&&t<56320}function IE(t){return t<65536?1:2}var Le=class t{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,a,r){[e,a]=Nc(this,e,a);let n=[];return this.decompose(0,e,n,2),r.length&&r.decompose(0,r.length,n,3),this.decompose(a,this.length,n,1),Bc.from(n,this.length-(a-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,a=this.length){[e,a]=Nc(this,e,a);let r=[];return this.decompose(e,a,r,0),Bc.from(r,a-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let a=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),n=new Ql(this),i=new Ql(e);for(let o=a,s=a;;){if(n.next(o),i.next(o),o=0,n.lineBreak!=i.lineBreak||n.done!=i.done||n.value!=i.value)return!1;if(s+=n.value.length,n.done||s>=r)return!0}}iter(e=1){return new Ql(this,e)}iterRange(e,a=this.length){return new jg(this,e,a)}iterLines(e,a){let r;if(e==null)r=this.iter();else{a==null&&(a=this.lines+1);let n=this.line(e).from;r=this.iterRange(n,Math.max(n,a==this.lines+1?this.length:a<=1?0:this.line(a-1).to))}return new Fg(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?t.empty:e.length<=32?new br(e):Bc.from(br.split(e,[]))}},br=class t extends Le{constructor(e,a=kF(e)){super(),this.text=e,this.length=a}get lines(){return this.text.length}get children(){return null}lineInner(e,a,r,n){for(let i=0;;i++){let o=this.text[i],s=n+o.length;if((a?r:s)>=e)return new fS(n,s,r,o);n=s+1,r++}}decompose(e,a,r,n){let i=e<=0&&a>=this.length?this:new t($E(this.text,e,a),Math.min(a,this.length)-Math.max(0,e));if(n&1){let o=r.pop(),s=Ug(i.text,o.text.slice(),0,i.length);if(s.length<=32)r.push(new t(s,o.length+i.length));else{let l=s.length>>1;r.push(new t(s.slice(0,l)),new t(s.slice(l)))}}else r.push(i)}replace(e,a,r){if(!(r instanceof t))return super.replace(e,a,r);[e,a]=Nc(this,e,a);let n=Ug(this.text,Ug(r.text,$E(this.text,0,e)),a),i=this.length+r.length-(a-e);return n.length<=32?new t(n,i):Bc.from(t.split(n,[]),i)}sliceString(e,a=this.length,r=`
50
50
  `){[e,a]=Nc(this,e,a);let n="";for(let i=0,o=0;i<=a&&o<this.text.length;o++){let s=this.text[o],l=i+s.length;i>e&&o&&(n+=r),e<l&&a>i&&(n+=s.slice(Math.max(0,e-i),a-i)),i=l+1}return n}flatten(e){for(let a of this.text)e.push(a)}scanIdentical(){return 0}static split(e,a){let r=[],n=-1;for(let i of e)r.push(i),n+=i.length+1,r.length==32&&(a.push(new t(r,n)),r=[],n=-1);return n>-1&&a.push(new t(r,n)),a}},Bc=class t extends Le{constructor(e,a){super(),this.children=e,this.length=a,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,a,r,n){for(let i=0;;i++){let o=this.children[i],s=n+o.length,l=r+o.lines-1;if((a?l:s)>=e)return o.lineInner(e,a,r,n);n=s+1,r=l+1}}decompose(e,a,r,n){for(let i=0,o=0;o<=a&&i<this.children.length;i++){let s=this.children[i],l=o+s.length;if(e<=l&&a>=o){let u=n&((o<=e?1:0)|(l>=a?2:0));o>=e&&l<=a&&!u?r.push(s):s.decompose(e-o,a-o,r,u)}o=l+1}}replace(e,a,r){if([e,a]=Nc(this,e,a),r.lines<this.lines)for(let n=0,i=0;n<this.children.length;n++){let o=this.children[n],s=i+o.length;if(e>=i&&a<=s){let l=o.replace(e-i,a-i,r),u=this.lines-o.lines+l.lines;if(l.lines<u>>4&&l.lines>u>>6){let c=this.children.slice();return c[n]=l,new t(c,this.length-(a-e)+r.length)}return super.replace(i,s,l)}i=s+1}return super.replace(e,a,r)}sliceString(e,a=this.length,r=`
51
51
  `){[e,a]=Nc(this,e,a);let n="";for(let i=0,o=0;i<this.children.length&&o<=a;i++){let s=this.children[i],l=o+s.length;o>e&&i&&(n+=r),e<l&&a>o&&(n+=s.sliceString(e-o,a-o,r)),o=l+1}return n}flatten(e){for(let a of this.children)a.flatten(e)}scanIdentical(e,a){if(!(e instanceof t))return 0;let r=0,[n,i,o,s]=a>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=a,i+=a){if(n==o||i==s)return r;let l=this.children[n],u=e.children[i];if(l!=u)return r+l.scanIdentical(u,a);r+=l.length+1}}static from(e,a=e.reduce((r,n)=>r+n.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let p of e)p.flatten(h);return new br(h,a)}let n=Math.max(32,r>>5),i=n<<1,o=n>>1,s=[],l=0,u=-1,c=[];function f(h){let p;if(h.lines>i&&h instanceof t)for(let m of h.children)f(m);else h.lines>o&&(l>o||!l)?(d(),s.push(h)):h instanceof br&&l&&(p=c[c.length-1])instanceof br&&h.lines+p.lines<=32?(l+=h.lines,u+=h.length+1,c[c.length-1]=new br(p.text.concat(h.text),p.length+1+h.length)):(l+h.lines>n&&d(),l+=h.lines,u+=h.length+1,c.push(h))}function d(){l!=0&&(s.push(c.length==1?c[0]:t.from(c,u)),u=-1,l=c.length=0)}for(let h of e)f(h);return d(),s.length==1?s[0]:new t(s,a)}};Le.empty=new br([""],0);function kF(t){let e=-1;for(let a of t)e+=a.length+1;return e}function Ug(t,e,a=0,r=1e9){for(let n=0,i=0,o=!0;i<t.length&&n<=r;i++){let s=t[i],l=n+s.length;l>=a&&(l>r&&(s=s.slice(0,r-n)),n<a&&(s=s.slice(a-n)),o?(e[e.length-1]+=s,o=!1):e.push(s)),n=l+1}return e}function $E(t,e,a){return Ug(t,[""],e,a)}var Ql=class{constructor(e,a=1){this.dir=a,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[a>0?1:(e instanceof br?e.text.length:e.children.length)<<1]}nextInner(e,a){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,n=this.nodes[r],i=this.offsets[r],o=i>>1,s=n instanceof br?n.text.length:n.children.length;if(o==(a>0?s:0)){if(r==0)return this.done=!0,this.value="",this;a>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(a>0?0:1)){if(this.offsets[r]+=a,e==0)return this.lineBreak=!0,this.value=`
52
52
  `,this;e--}else if(n instanceof br){let l=n.text[o+(a<0?-1:0)];if(this.offsets[r]+=a,l.length>Math.max(0,e))return this.value=e==0?l:a>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=n.children[o+(a<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=a):(a<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(a>0?1:(l instanceof br?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},jg=class{constructor(e,a,r){this.value="",this.done=!1,this.cursor=new Ql(e,a>r?-1:1),this.pos=a>r?e.length:0,this.from=Math.min(a,r),this.to=Math.max(a,r)}nextInner(e,a){if(a<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,a<0?this.pos-this.to:this.from-this.pos);let r=a<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*a,this.value=n.length<=r?n:a<0?n.slice(n.length-r):n.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},Fg=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:a,lineBreak:r,value:n}=this.inner.next(e);return a&&this.afterBreak?(this.value="",this.afterBreak=!1):a?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(Le.prototype[Symbol.iterator]=function(){return this.iter()},Ql.prototype[Symbol.iterator]=jg.prototype[Symbol.iterator]=Fg.prototype[Symbol.iterator]=function(){return this});var fS=class{constructor(e,a,r,n){this.from=e,this.to=a,this.number=r,this.text=n}get length(){return this.to-this.from}};function Nc(t,e,a){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,a))]}function Jt(t,e,a=!0,r=!0){return QE(t,e,a,r)}function LF(t){return t>=56320&&t<57344}function TF(t){return t>=55296&&t<56320}function CS(t,e){let a=t.charCodeAt(e);if(!TF(a)||e+1==t.length)return a;let r=t.charCodeAt(e+1);return LF(r)?(a-55296<<10)+(r-56320)+65536:a}function kS(t){return t<65536?1:2}var dS=/\r\n?|\n/,ha=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(ha||(ha={})),Wi=class t{constructor(e){this.sections=e}get length(){let e=0;for(let a=0;a<this.sections.length;a+=2)e+=this.sections[a];return e}get newLength(){let e=0;for(let a=0;a<this.sections.length;a+=2){let r=this.sections[a+1];e+=r<0?this.sections[a]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let a=0,r=0,n=0;a<this.sections.length;){let i=this.sections[a++],o=this.sections[a++];o<0?(e(r,n,i),n+=i):n+=o,r+=i}}iterChangedRanges(e,a=!1){hS(this,e,a)}get invertedDesc(){let e=[];for(let a=0;a<this.sections.length;){let r=this.sections[a++],n=this.sections[a++];n<0?e.push(r,n):e.push(n,r)}return new t(e)}composeDesc(e){return this.empty?e:e.empty?this:XE(this,e)}mapDesc(e,a=!1){return e.empty?this:pS(this,e,a)}mapPos(e,a=-1,r=ha.Simple){let n=0,i=0;for(let o=0;o<this.sections.length;){let s=this.sections[o++],l=this.sections[o++],u=n+s;if(l<0){if(u>e)return i+(e-n);i+=s}else{if(r!=ha.Simple&&u>=e&&(r==ha.TrackDel&&n<e&&u>e||r==ha.TrackBefore&&n<e||r==ha.TrackAfter&&u>e))return null;if(u>e||u==e&&a<0&&!s)return e==n||a<0?i:i+l;i+=l}n=u}if(e>n)throw new RangeError(`Position ${e} is out of range for changeset of length ${n}`);return i}touchesRange(e,a=e){for(let r=0,n=0;r<this.sections.length&&n<=a;){let i=this.sections[r++],o=this.sections[r++],s=n+i;if(o>=0&&n<=a&&s>=e)return n<e&&s>a?"cover":!0;n=s}return!1}toString(){let e="";for(let a=0;a<this.sections.length;){let r=this.sections[a++],n=this.sections[a++];e+=(e?" ":"")+r+(n>=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(a=>typeof a!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(e)}static create(e){return new t(e)}},Ba=class t extends Wi{constructor(e,a){super(e),this.inserted=a}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return hS(this,(a,r,n,i,o)=>e=e.replace(n,n+(r-a),o),!1),e}mapDesc(e,a=!1){return pS(this,e,a,!0)}invert(e){let a=this.sections.slice(),r=[];for(let n=0,i=0;n<a.length;n+=2){let o=a[n],s=a[n+1];if(s>=0){a[n]=s,a[n+1]=o;let l=n>>1;for(;r.length<l;)r.push(Le.empty);r.push(o?e.slice(i,i+o):Le.empty)}i+=o}return new t(a,r)}compose(e){return this.empty?e:e.empty?this:XE(this,e,!0)}map(e,a=!1){return e.empty?this:pS(this,e,a,!0)}iterChanges(e,a=!1){hS(this,e,a)}get desc(){return Wi.create(this.sections)}filter(e){let a=[],r=[],n=[],i=new Ml(this);e:for(let o=0,s=0;;){let l=o==e.length?1e9:e[o++];for(;s<l||s==l&&i.len==0;){if(i.done)break e;let c=Math.min(i.len,l-s);va(n,c,-1);let f=i.ins==-1?-1:i.off==0?i.ins:0;va(a,c,f),f>0&&fs(r,a,i.text),i.forward(c),s+=c}let u=e[o++];for(;s<u;){if(i.done)break e;let c=Math.min(i.len,u-s);va(a,c,-1),va(n,c,i.ins==-1?-1:i.off==0?i.ins:0),i.forward(c),s+=c}}return{changes:new t(a,r),filtered:Wi.create(n)}}toJSON(){let e=[];for(let a=0;a<this.sections.length;a+=2){let r=this.sections[a],n=this.sections[a+1];n<0?e.push(r):n==0?e.push([r]):e.push([r].concat(this.inserted[a>>1].toJSON()))}return e}static of(e,a,r){let n=[],i=[],o=0,s=null;function l(c=!1){if(!c&&!n.length)return;o<a&&va(n,a-o,-1);let f=new t(n,i);s=s?s.compose(f.map(s)):f,n=[],i=[],o=0}function u(c){if(Array.isArray(c))for(let f of c)u(f);else if(c instanceof t){if(c.length!=a)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${a})`);l(),s=s?s.compose(c.map(s)):c}else{let{from:f,to:d=f,insert:h}=c;if(f>d||f<0||d>a)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${a})`);let p=h?typeof h=="string"?Le.of(h.split(r||dS)):h:Le.empty,m=p.length;if(f==d&&m==0)return;f<o&&l(),f>o&&va(n,f-o,-1),va(n,d-f,m),fs(i,n,p),o=d}}return u(e),l(!s),s}static empty(e){return new t(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let a=[],r=[];for(let n=0;n<e.length;n++){let i=e[n];if(typeof i=="number")a.push(i,-1);else{if(!Array.isArray(i)||typeof i[0]!="number"||i.some((o,s)=>s&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(i.length==1)a.push(i[0],0);else{for(;r.length<n;)r.push(Le.empty);r[n]=Le.of(i.slice(1)),a.push(i[0],r[n].length)}}}return new t(a,r)}static createSet(e,a){return new t(e,a)}};function va(t,e,a,r=!1){if(e==0&&a<=0)return;let n=t.length-2;n>=0&&a<=0&&a==t[n+1]?t[n]+=e:n>=0&&e==0&&t[n]==0?t[n+1]+=a:r?(t[n]+=e,t[n+1]+=a):t.push(e,a)}function fs(t,e,a){if(a.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(a);else{for(;t.length<r;)t.push(Le.empty);t.push(a)}}function hS(t,e,a){let r=t.inserted;for(let n=0,i=0,o=0;o<t.sections.length;){let s=t.sections[o++],l=t.sections[o++];if(l<0)n+=s,i+=s;else{let u=n,c=i,f=Le.empty;for(;u+=s,c+=l,l&&r&&(f=f.append(r[o-2>>1])),!(a||o==t.sections.length||t.sections[o+1]<0);)s=t.sections[o++],l=t.sections[o++];e(n,u,i,c,f),n=u,i=c}}}function pS(t,e,a,r=!1){let n=[],i=r?[]:null,o=new Ml(t),s=new Ml(e);for(let l=-1;;){if(o.done&&s.len||s.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&s.ins==-1){let u=Math.min(o.len,s.len);va(n,u,-1),o.forward(u),s.forward(u)}else if(s.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!a))){let u=s.len;for(va(n,s.ins,-1);u;){let c=Math.min(o.len,u);o.ins>=0&&l<o.i&&o.len<=c&&(va(n,0,o.ins),i&&fs(i,n,o.text),l=o.i),o.forward(c),u-=c}s.next()}else if(o.ins>=0){let u=0,c=o.len;for(;c;)if(s.ins==-1){let f=Math.min(c,s.len);u+=f,c-=f,s.forward(f)}else if(s.ins==0&&s.len<c)c-=s.len,s.next();else break;va(n,u,l<o.i?o.ins:0),i&&l<o.i&&fs(i,n,o.text),l=o.i,o.forward(o.len-c)}else{if(o.done&&s.done)return i?Ba.createSet(n,i):Wi.create(n);throw new Error("Mismatched change set lengths")}}}function XE(t,e,a=!1){let r=[],n=a?[]:null,i=new Ml(t),o=new Ml(e);for(let s=!1;;){if(i.done&&o.done)return n?Ba.createSet(r,n):Wi.create(r);if(i.ins==0)va(r,i.len,0,s),i.next();else if(o.len==0&&!o.done)va(r,0,o.ins,s),n&&fs(n,r,o.text),o.next();else{if(i.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(i.len2,o.len),u=r.length;if(i.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;va(r,l,c,s),n&&c&&fs(n,r,o.text)}else o.ins==-1?(va(r,i.off?0:i.len,l,s),n&&fs(n,r,i.textBit(l))):(va(r,i.off?0:i.len,o.off?0:o.ins,s),n&&!o.off&&fs(n,r,o.text));s=(i.ins>l||o.ins>=0&&o.len>l)&&(s||r.length>u),i.forward2(l),o.forward(l)}}}}var Ml=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,a=this.i-2>>1;return a>=e.length?Le.empty:e[a]}textBit(e){let{inserted:a}=this.set,r=this.i-2>>1;return r>=a.length&&!e?Le.empty:a[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},Rl=class t{constructor(e,a,r,n){this.from=e,this.to=a,this.flags=r,this.goalColumn=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(e,a=-1){let r,n;return this.empty?r=n=e.mapPos(this.from,a):(r=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),r==this.from&&n==this.to?this:new t(r,n,this.flags,this.goalColumn)}extend(e,a=e,r=0){if(e<=this.anchor&&a>=this.anchor)return E.range(e,a,void 0,void 0,r);let n=Math.abs(e-this.anchor)>Math.abs(a-this.anchor)?e:a;return E.range(this.anchor,n,void 0,void 0,r)}eq(e,a=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!a||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return E.range(e.anchor,e.head)}static create(e,a,r,n){return new t(e,a,r,n)}},E=class t{constructor(e,a){this.ranges=e,this.mainIndex=a}map(e,a=-1){return e.empty?this:t.create(this.ranges.map(r=>r.map(e,a)),this.mainIndex)}eq(e,a=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],a))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new t([this.main],0)}addRange(e,a=!0){return t.create([e].concat(this.ranges),a?0:this.mainIndex+1)}replaceRange(e,a=this.mainIndex){let r=this.ranges.slice();return r[a]=e,t.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(e.ranges.map(a=>Rl.fromJSON(a)),e.main)}static single(e,a=e){return new t([t.range(e,a)],0)}static create(e,a=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,n=0;n<e.length;n++){let i=e[n];if(i.empty?i.from<=r:i.from<r)return t.normalized(e.slice(),a);r=i.to}return new t(e,a)}static cursor(e,a=0,r,n){return Rl.create(e,e,(a==0?0:a<0?8:16)|(r==null?7:Math.min(6,r)),n)}static range(e,a,r,n,i){let o=n==null?7:Math.min(6,n);return!i&&e!=a&&(i=a<e?1:-1),i&&(o|=i<0?8:16),a<e?Rl.create(a,e,o|32,r):Rl.create(e,a,o,r)}static undirectionalRange(e,a){return Rl.create(e,a,64,void 0)}static normalized(e,a=0){let r=e[a];e.sort((n,i)=>n.from-i.from),a=e.indexOf(r);for(let n=1;n<e.length;n++){let i=e[n],o=e[n-1];if(i.empty?i.from<=o.to:i.from<o.to){let s=o.from,l=Math.max(i.to,o.to);n<=a&&a--,e.splice(--n,2,i.anchor>i.head?t.range(l,s):t.range(s,l))}}return new t(e,a)}};function qE(t,e){for(let a of t.ranges)if(a.to>e)throw new RangeError("Selection points outside of document")}var LS=0,ce=class t{constructor(e,a,r,n,i){this.combine=e,this.compareInput=a,this.compare=r,this.isStatic=n,this.id=LS++,this.default=e([]),this.extensions=typeof i=="function"?i(this):i}get reader(){return this}static define(e={}){return new t(e.combine||(a=>a),e.compareInput||((a,r)=>a===r),e.compare||(e.combine?(a,r)=>a===r:TS),!!e.static,e.enables)}of(e){return new _c([],this,0,e)}compute(e,a){if(this.isStatic)throw new Error("Can't compute a static facet");return new _c(e,this,1,a)}computeN(e,a){if(this.isStatic)throw new Error("Can't compute a static facet");return new _c(e,this,2,a)}from(e,a){return a||(a=r=>r),this.compute([e],r=>a(r.field(e)))}};function TS(t,e){return t==e||t.length==e.length&&t.every((a,r)=>a===e[r])}var _c=class{constructor(e,a,r,n){this.dependencies=e,this.facet=a,this.type=r,this.value=n,this.id=LS++}dynamicSlot(e){var a;let r=this.value,n=this.facet.compareInput,i=this.id,o=e[i]>>1,s=this.type==2,l=!1,u=!1,c=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?u=!0:(((a=e[f.id])!==null&&a!==void 0?a:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=r(f),1},update(f,d){if(l&&d.docChanged||u&&(d.docChanged||d.selection)||mS(f,c)){let h=r(f);if(s?!BE(h,f.values[o],n):!n(h,f.values[o]))return f.values[o]=h,1}return 0},reconfigure:(f,d)=>{let h,p=d.config.address[i];if(p!=null){let m=Wg(d,p);if(this.dependencies.every(x=>x instanceof ce?d.facet(x)===f.facet(x):x instanceof vr?d.field(x,!1)==f.field(x,!1):!0)||(s?BE(h=r(f),m,n):n(h=r(f),m)))return f.values[o]=m,0}else h=r(f);return f.values[o]=h,1}}}get extension(){return this}};function BE(t,e,a){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!a(t[r],e[r]))return!1;return!0}function mS(t,e){let a=!1;for(let r of e)Zd(t,r)&1&&(a=!0);return a}function PF(t,e,a){let r=a.map(l=>t[l.id]),n=a.map(l=>l.type),i=r.filter(l=>!(l&1)),o=t[e.id]>>1;function s(l){let u=[];for(let c=0;c<r.length;c++){let f=Wg(l,r[c]);if(n[c]==2)for(let d of f)u.push(d);else u.push(f)}return e.combine(u)}return{create(l){for(let u of r)Zd(l,u);return l.values[o]=s(l),1},update(l,u){if(!mS(l,i))return 0;let c=s(l);return e.compare(c,l.values[o])?0:(l.values[o]=c,1)},reconfigure(l,u){let c=mS(l,r),f=u.config.facets[e.id],d=u.facet(e);if(f&&!c&&TS(a,f))return l.values[o]=d,0;let h=s(l);return e.compare(h,d)?(l.values[o]=d,0):(l.values[o]=h,1)}}}var qg=ce.define({static:!0}),vr=class t{constructor(e,a,r,n,i){this.id=e,this.createF=a,this.updateF=r,this.compareF=n,this.spec=i,this.provides=void 0}static define(e){let a=new t(LS++,e.create,e.update,e.compare||((r,n)=>r===n),e);return e.provide&&(a.provides=e.provide(a)),a}create(e){let a=e.facet(qg).find(r=>r.field==this);return(a?.create||this.createF)(e)}slot(e){let a=e[this.id]>>1;return{create:r=>(r.values[a]=this.create(r),1),update:(r,n)=>{let i=r.values[a],o=this.updateF(i,n);return this.compareF(i,o)?0:(r.values[a]=o,1)},reconfigure:(r,n)=>{let i=r.facet(qg),o=n.facet(qg),s;return(s=i.find(l=>l.field==this))&&s!=o.find(l=>l.field==this)?(r.values[a]=s.create(r),1):n.config.address[this.id]!=null?(r.values[a]=n.field(this),0):(r.values[a]=this.create(r),1)}}}init(e){return[this,qg.of({field:this,create:e})]}get extension(){return this}},Il={lowest:4,low:3,default:2,high:1,highest:0};function qd(t){return e=>new Hg(e,t)}var mi={highest:qd(Il.highest),high:qd(Il.high),default:qd(Il.default),low:qd(Il.low),lowest:qd(Il.lowest)},Hg=class{constructor(e,a){this.inner=e,this.prec=a}get extension(){return this}},Gg=class t{of(e){return new Vd(this,e)}reconfigure(e){return t.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}},Vd=class{constructor(e,a){this.compartment=e,this.inner=a}get extension(){return this}},Yg=class t{constructor(e,a,r,n,i,o){for(this.base=e,this.compartments=a,this.dynamicSlots=r,this.address=n,this.staticValues=i,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let a=this.address[e.id];return a==null?e.default:this.staticValues[a>>1]}static resolve(e,a,r){let n=[],i=Object.create(null),o=new Map;for(let d of RF(e,a,o))d instanceof vr?n.push(d):(i[d.facet.id]||(i[d.facet.id]=[])).push(d);let s=Object.create(null),l=[],u=[];for(let d of n)s[d.id]=u.length<<1,u.push(h=>d.slot(h));let c=r?.config.facets;for(let d in i){let h=i[d],p=h[0].facet,m=c&&c[d]||[];if(h.every(x=>x.type==0))if(s[p.id]=l.length<<1|1,TS(m,h))l.push(r.facet(p));else{let x=p.combine(h.map(g=>g.value));l.push(r&&p.compare(x,r.facet(p))?r.facet(p):x)}else{for(let x of h)x.type==0?(s[x.id]=l.length<<1|1,l.push(x.value)):(s[x.id]=u.length<<1,u.push(g=>x.dynamicSlot(g)));s[p.id]=u.length<<1,u.push(x=>PF(x,p,h))}}let f=u.map(d=>d(s));return new t(e,o,f,s,l,i)}};function RF(t,e,a){let r=[[],[],[],[],[]],n=new Map;function i(o,s){let l=n.get(o);if(l!=null){if(l<=s)return;let u=r[l].indexOf(o);u>-1&&r[l].splice(u,1),o instanceof Vd&&a.delete(o.compartment)}if(n.set(o,s),Array.isArray(o))for(let u of o)i(u,s);else if(o instanceof Vd){if(a.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;a.set(o.compartment,u),i(u,s)}else if(o instanceof Hg)i(o.inner,o.prec);else if(o instanceof vr)r[s].push(o),o.provides&&i(o.provides,s);else if(o instanceof _c)r[s].push(o),o.facet.extensions&&i(o.facet.extensions,Il.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}).`);if(u==o)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);i(u,s)}}return i(t,Il.default),r.reduce((o,s)=>o.concat(s))}function Zd(t,e){if(e&1)return 2;let a=e>>1,r=t.status[a];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[a]=4;let n=t.computeSlot(t,t.config.dynamicSlots[a]);return t.status[a]=2|n}function Wg(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}var ZE=ce.define(),gS=ce.define({combine:t=>t.some(e=>e),static:!0}),VE=ce.define({combine:t=>t.length?t[0]:void 0,static:!0}),UE=ce.define(),jE=ce.define(),FE=ce.define(),HE=ce.define({combine:t=>t.length?t[0]:!1}),ar=class{constructor(e,a){this.type=e,this.value=a}static define(){return new OS}},OS=class{of(e){return new ar(this,e)}},xS=class{constructor(e){this.map=e}of(e){return new Ke(this,e)}},Ke=class t{constructor(e,a){this.type=e,this.value=a}map(e){let a=this.type.map(this.value,e);return a===void 0?void 0:a==this.value?this:new t(this.type,a)}is(e){return this.type==e}static define(e={}){return new xS(e.map||(a=>a))}static mapEffects(e,a){if(!e.length)return e;let r=[];for(let n of e){let i=n.map(a);i&&r.push(i)}return r}};Ke.reconfigure=Ke.define();Ke.appendConfig=Ke.define();var Bt=class t{constructor(e,a,r,n,i,o){this.startState=e,this.changes=a,this.selection=r,this.effects=n,this.annotations=i,this.scrollIntoView=o,this._doc=null,this._state=null,r&&qE(r,a.newLength),i.some(s=>s.type==t.time)||(this.annotations=i.concat(t.time.of(Date.now())))}static create(e,a,r,n,i,o){return new t(e,a,r,n,i,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let a of this.annotations)if(a.type==e)return a.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let a=this.annotation(t.userEvent);return!!(a&&(a==e||a.length>e.length&&a.slice(0,e.length)==e&&a[e.length]=="."))}};Bt.time=ar.define();Bt.userEvent=ar.define();Bt.addToHistory=ar.define();Bt.remote=ar.define();function IF(t,e){let a=[];for(let r=0,n=0;;){let i,o;if(r<t.length&&(n==e.length||e[n]>=t[r]))i=t[r++],o=t[r++];else if(n<e.length)i=e[n++],o=e[n++];else return a;!a.length||a[a.length-1]<i?a.push(i,o):a[a.length-1]<o&&(a[a.length-1]=o)}}function GE(t,e,a){var r;let n,i,o;return a?(n=e.changes,i=Ba.empty(e.changes.length),o=t.changes.compose(e.changes)):(n=e.changes.map(t.changes),i=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(n)),{changes:o,selection:e.selection?e.selection.map(i):(r=t.selection)===null||r===void 0?void 0:r.map(n),effects:Ke.mapEffects(t.effects,n).concat(Ke.mapEffects(e.effects,i)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function yS(t,e,a){let r=e.selection,n=zc(e.annotations);return e.userEvent&&(n=n.concat(Bt.userEvent.of(e.userEvent))),{changes:e.changes instanceof Ba?e.changes:Ba.of(e.changes||[],a,t.facet(VE)),selection:r&&(r instanceof E?r:E.single(r.anchor,r.head)),effects:zc(e.effects),annotations:n,scrollIntoView:!!e.scrollIntoView}}function YE(t,e,a){let r=yS(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(a=!1);for(let i=1;i<e.length;i++){e[i].filter===!1&&(a=!1);let o=!!e[i].sequential;r=GE(r,yS(t,e[i],o?r.changes.newLength:t.doc.length),o)}let n=Bt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return QF(a?AF(n):n)}function AF(t){let e=t.startState,a=!0;for(let n of e.facet(UE)){let i=n(t);if(i===!1){a=!1;break}Array.isArray(i)&&(a=a===!0?i:IF(a,i))}if(a!==!0){let n,i;if(a===!1)i=t.changes.invertedDesc,n=Ba.empty(e.doc.length);else{let o=t.changes.filter(a);n=o.changes,i=o.filtered.mapDesc(o.changes).invertedDesc}t=Bt.create(e,n,t.selection&&t.selection.map(i),Ke.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let r=e.facet(jE);for(let n=r.length-1;n>=0;n--){let i=r[n](t);i instanceof Bt?t=i:Array.isArray(i)&&i.length==1&&i[0]instanceof Bt?t=i[0]:t=YE(e,zc(i),!1)}return t}function QF(t){let e=t.startState,a=e.facet(FE),r=t;for(let n=a.length-1;n>=0;n--){let i=a[n](t);i&&Object.keys(i).length&&(r=GE(r,yS(e,i,t.changes.newLength),!0))}return r==t?t:Bt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}var MF=[];function zc(t){return t==null?MF:Array.isArray(t)?t:[t]}var Hr=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(Hr||(Hr={})),EF=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,bS;try{bS=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function DF(t){if(bS)return bS.test(t);for(let e=0;e<t.length;e++){let a=t[e];if(/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||EF.test(a)))return!0}return!1}function $F(t){return e=>{if(!/\S/.test(e))return Hr.Space;if(DF(e))return Hr.Word;for(let a=0;a<t.length;a++)if(e.indexOf(t[a])>-1)return Hr.Word;return Hr.Other}}var xt=class t{constructor(e,a,r,n,i,o){this.config=e,this.doc=a,this.selection=r,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=i,o&&(o._state=this);for(let s=0;s<this.config.dynamicSlots.length;s++)Zd(this,s<<1);this.computeSlot=null}field(e,a=!0){let r=this.config.address[e.id];if(r==null){if(a)throw new RangeError("Field is not present in this state");return}return Zd(this,r),Wg(this,r)}update(...e){return YE(this,e,!0)}applyTransaction(e){let a=this.config,{base:r,compartments:n}=a;for(let s of e.effects)s.is(Gg.reconfigure)?(a&&(n=new Map,a.compartments.forEach((l,u)=>n.set(u,l)),a=null),n.set(s.value.compartment,s.value.extension)):s.is(Ke.reconfigure)?(a=null,r=s.value):s.is(Ke.appendConfig)&&(a=null,r=zc(r).concat(s.value));let i;a?i=e.startState.values.slice():(a=Yg.resolve(r,n,this),i=new t(a,this.doc,this.selection,a.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let o=e.startState.facet(gS)?e.newSelection:e.newSelection.asSingle();new t(a,e.newDoc,o,i,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(a=>({changes:{from:a.from,to:a.to,insert:e},range:E.cursor(a.from+e.length)}))}changeByRange(e){let a=this.selection,r=e(a.ranges[0]),n=this.changes(r.changes),i=[r.range],o=zc(r.effects);for(let s=1;s<a.ranges.length;s++){let l=e(a.ranges[s]),u=this.changes(l.changes),c=u.map(n);for(let d=0;d<s;d++)i[d]=i[d].map(c);let f=n.mapDesc(u,!0);i.push(l.range.map(f)),n=n.compose(c),o=Ke.mapEffects(o,c).concat(Ke.mapEffects(zc(l.effects),f))}return{changes:n,selection:E.create(i,a.mainIndex),effects:o}}changes(e=[]){return e instanceof Ba?e:Ba.of(e,this.doc.length,this.facet(t.lineSeparator))}toText(e){return Le.of(e.split(this.facet(t.lineSeparator)||dS))}sliceDoc(e=0,a=this.doc.length){return this.doc.sliceString(e,a,this.lineBreak)}facet(e){let a=this.config.address[e.id];return a==null?e.default:(Zd(this,a),Wg(this,a))}toJSON(e){let a={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let n=e[r];n instanceof vr&&this.config.address[n.id]!=null&&(a[r]=n.spec.toJSON(this.field(e[r]),this))}return a}static fromJSON(e,a={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let n=[];if(r){for(let i in r)if(Object.prototype.hasOwnProperty.call(e,i)){let o=r[i],s=e[i];n.push(o.init(l=>o.spec.fromJSON(s,l)))}}return t.create({doc:e.doc,selection:E.fromJSON(e.selection),extensions:a.extensions?n.concat([a.extensions]):n})}static create(e={}){let a=Yg.resolve(e.extensions||[],new Map),r=e.doc instanceof Le?e.doc:Le.of((e.doc||"").split(a.staticFacet(t.lineSeparator)||dS)),n=e.selection?e.selection instanceof E?e.selection:E.single(e.selection.anchor,e.selection.head):E.single(0);return qE(n,r.length),a.staticFacet(gS)||(n=n.asSingle()),new t(a,r,n,a.dynamicSlots.map(()=>null),(i,o)=>o.create(i),null)}get tabSize(){return this.facet(t.tabSize)}get lineBreak(){return this.facet(t.lineSeparator)||`
@@ -136,7 +136,7 @@ ${this.parser.parse(t)}</blockquote>
136
136
  ${t}</tr>
137
137
  `}tablecell(t){let e=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+e+`</${a}>
138
138
  `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Tr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:a,tokens:r,autolink:n}){let i=n?Tr(a,!0):this.parser.parseInline(r),o=F5(t);if(o===null)return i;t=Tr(o,n);let s='<a href="'+t+'"';return e&&(s+=' title="'+Tr(e)+'"'),s+=">"+i+"</a>",s}image({href:t,title:e,text:a,tokens:r}){r&&(a=this.parser.parseInline(r,this.parser.textRenderer));let n=F5(t);if(n===null)return Tr(a);t=n;let i=`<img src="${Tr(t)}" alt="${Tr(a)}"`;return e&&(i+=` title="${Tr(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Tr(t.text)}},vC=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Bn=class hC{options;renderer;textRenderer;constructor(e){this.options=e||Kl,this.options.renderer=this.options.renderer||new s0,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vC}static parse(e,a){return new hC(a).parse(e)}static parseInline(e,a){return new hC(a).parseInline(e)}parse(e){this.renderer.parser=this;let a="";for(let r=0;r<e.length;r++){let n=e[r];if(this.options.extensions?.renderers?.[n.type]){let o=n,s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(o.type)){a+=s||"";continue}}let i=n;switch(i.type){case"space":{a+=this.renderer.space(i);break}case"hr":{a+=this.renderer.hr(i);break}case"heading":{a+=this.renderer.heading(i);break}case"code":{a+=this.renderer.code(i);break}case"table":{a+=this.renderer.table(i);break}case"blockquote":{a+=this.renderer.blockquote(i);break}case"list":{a+=this.renderer.list(i);break}case"checkbox":{a+=this.renderer.checkbox(i);break}case"html":{a+=this.renderer.html(i);break}case"def":{a+=this.renderer.def(i);break}case"paragraph":{a+=this.renderer.paragraph(i);break}case"text":{a+=this.renderer.text(i);break}default:{let o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return a}parseInline(e,a=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<e.length;n++){let i=e[n];if(this.options.extensions?.renderers?.[i.type]){let s=this.options.extensions.renderers[i.type].call({parser:this},i);if(s!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){r+=s||"";continue}}let o=i;switch(o.type){case"escape":{r+=a.text(o);break}case"html":{r+=a.html(o);break}case"link":{r+=a.link(o);break}case"image":{r+=a.image(o);break}case"checkbox":{r+=a.checkbox(o);break}case"strong":{r+=a.strong(o);break}case"em":{r+=a.em(o);break}case"codespan":{r+=a.codespan(o);break}case"br":{r+=a.br(o);break}case"del":{r+=a.del(o);break}case"text":{r+=a.text(o);break}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}},Eh=class{options;block;constructor(t){this.options=t||Kl}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?$n.lex:$n.lexInline}provideParser(t=this.block){return t?Bn.parse:Bn.parseInline}},SC=class{defaults=pC();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Bn;Renderer=s0;TextRenderer=vC;Lexer=$n;Tokenizer=o0;Hooks=Eh;constructor(...t){this.use(...t)}walkTokens(t,e){let a=[];for(let r of t)switch(a=a.concat(e.call(this,r)),r.type){case"table":{let n=r;for(let i of n.header)a=a.concat(this.walkTokens(i.tokens,e));for(let i of n.rows)for(let o of i)a=a.concat(this.walkTokens(o.tokens,e));break}case"list":{let n=r;a=a.concat(this.walkTokens(n.items,e));break}default:{let n=r;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(i=>{let o=n[i].flat(1/0);a=a.concat(this.walkTokens(o,e))}):n.tokens&&(a=a.concat(this.walkTokens(n.tokens,e)))}}return a}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let r={...a};if(r.async=this.defaults.async||r.async||!1,a.extensions&&(a.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let i=e.renderers[n.name];i?e.renderers[n.name]=function(...o){let s=n.renderer.apply(this,o);return s===!1&&(s=i.apply(this,o)),s}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[n.level];i?i.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),r.extensions=e),a.renderer){let n=this.defaults.renderer||new s0(this.defaults);for(let i in a.renderer){if(!(i in n))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,s=a.renderer[o],l=n[o];n[o]=(...u)=>{let c=s.apply(n,u);return c===!1&&(c=l.apply(n,u)),c||""}}r.renderer=n}if(a.tokenizer){let n=this.defaults.tokenizer||new o0(this.defaults);for(let i in a.tokenizer){if(!(i in n))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,s=a.tokenizer[o],l=n[o];n[o]=(...u)=>{let c=s.apply(n,u);return c===!1&&(c=l.apply(n,u)),c}}r.tokenizer=n}if(a.hooks){let n=this.defaults.hooks||new Eh;for(let i in a.hooks){if(!(i in n))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,s=a.hooks[o],l=n[o];Eh.passThroughHooks.has(i)?n[o]=u=>{if(this.defaults.async&&Eh.passThroughHooksRespectAsync.has(i))return(async()=>{let f=await s.call(n,u);return l.call(n,f)})();let c=s.call(n,u);return l.call(n,c)}:n[o]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await s.apply(n,u);return f===!1&&(f=await l.apply(n,u)),f})();let c=s.apply(n,u);return c===!1&&(c=l.apply(n,u)),c}}r.hooks=n}if(a.walkTokens){let n=this.defaults.walkTokens,i=a.walkTokens;r.walkTokens=function(o){let s=[];return s.push(i.call(this,o)),n&&(s=s.concat(n.call(this,o))),s}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return $n.lex(t,e??this.defaults)}parser(t,e){return Bn.parse(t,e??this.defaults)}parseMarkdown(t){return(e,a)=>{let r={...a},n={...this.defaults,...r},i=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&r.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let o=n.hooks?await n.hooks.preprocess(e):e,s=await(n.hooks?await n.hooks.provideLexer(t):t?$n.lex:$n.lexInline)(o,n),l=n.hooks?await n.hooks.processAllTokens(s):s;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let u=await(n.hooks?await n.hooks.provideParser(t):t?Bn.parse:Bn.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(u):u})().catch(i);try{n.hooks&&(e=n.hooks.preprocess(e));let o=(n.hooks?n.hooks.provideLexer(t):t?$n.lex:$n.lexInline)(e,n);n.hooks&&(o=n.hooks.processAllTokens(o)),n.walkTokens&&this.walkTokens(o,n.walkTokens);let s=(n.hooks?n.hooks.provideParser(t):t?Bn.parse:Bn.parseInline)(o,n);return n.hooks&&(s=n.hooks.postprocess(s)),s}catch(o){return i(o)}}}onError(t,e){return a=>{if(a.message+=`
139
- Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Tr(a.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(a);throw a}}},Wl=new SC;function it(t,e){return Wl.parse(t,e)}it.options=it.setOptions=function(t){return Wl.setOptions(t),it.defaults=Wl.defaults,K5(it.defaults),it};it.getDefaults=pC;it.defaults=Kl;function G8(...t){return Wl.use(...t),it.defaults=Wl.defaults,K5(it.defaults),it}it.use=G8;it.walkTokens=function(t,e){return Wl.walkTokens(t,e)};it.parseInline=Wl.parseInline;it.Parser=Bn;it.parser=Bn.parse;it.Renderer=s0;it.TextRenderer=vC;it.Lexer=$n;it.lexer=$n.lex;it.Tokenizer=o0;it.Hooks=Eh;it.parse=it;var Qse=it.options,Mse=it.setOptions,Ese=it.walkTokens,Dse=it.parseInline;var $se=Bn.parse,Bse=$n.lex;var Vse=L(F(),1);var zh=L(G(),1);function l0({className:t,orientation:e="horizontal",...a}){return(0,zh.jsx)(Cl.Root,{"data-slot":"tabs","data-orientation":e,orientation:e,className:pe("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",t),...a})}var Y8=si("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function u0({className:t,variant:e="default",...a}){return(0,zh.jsx)(Cl.List,{"data-slot":"tabs-list","data-variant":e,className:pe(Y8({variant:e}),t),...a})}function _h({className:t,...e}){return(0,zh.jsx)(Cl.Trigger,{"data-slot":"tabs-trigger",className:pe("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",t),...e})}function Jl({className:t,...e}){return(0,zh.jsx)(Cl.Content,{"data-slot":"tabs-content",className:pe("flex-1 outline-none",t),...e})}var or=L(G(),1),W8=new SC({renderer:{html:({text:t})=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},walkTokens:t=>{(t.type==="link"||t.type==="image")&&/^\s*(javascript|vbscript|data):/i.test(t.href)&&(t.href="#")}}),sz="h-auto flex-none cursor-pointer rounded-md px-[11px] py-[5px] text-[11.5px] font-semibold text-zinc-500 data-[state=active]:shadow-[0_1px_2px_rgba(0,0,0,0.08)]";function wC({body:t,onChange:e}){return(0,or.jsxs)(l0,{defaultValue:e===void 0?"preview":"source",className:"gap-0 overflow-hidden rounded-xl border bg-background",children:[(0,or.jsxs)("div",{className:"flex items-center gap-2.5 border-b border-[#f0f0f0] px-[13px] py-[9px]",children:[(0,or.jsx)("span",{className:"text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:"Body"}),(0,or.jsx)("span",{className:"font-mono text-[10.5px] text-zinc-400",children:"markdown"}),(0,or.jsxs)(u0,{className:"ml-auto h-auto gap-0.5 rounded-lg bg-[#f0f0f2] p-[3px]",children:[(0,or.jsx)(_h,{value:"source",className:sz,children:"Source"}),(0,or.jsx)(_h,{value:"preview",className:sz,children:"Preview"})]})]}),(0,or.jsx)(Jl,{value:"source",className:"h-[300px] flex-none",children:(0,or.jsx)(K8,{body:t,onChange:e})}),(0,or.jsx)(Jl,{value:"preview",children:(0,or.jsx)("div",{className:"min-h-32 px-[18px] py-4 text-[12.5px] leading-[1.65] text-zinc-700 [&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:font-mono [&_code]:text-xs [&_h1]:mb-[7px] [&_h1]:text-[15px] [&_h1]:font-bold [&_h1]:text-foreground [&_h2]:mt-4 [&_h2]:mb-[7px] [&_h2]:text-[13px] [&_h2]:font-bold [&_h2]:text-foreground [&_strong]:font-semibold [&_strong]:text-foreground [&_li]:ml-5 [&_ol]:list-decimal [&_p]:mb-2 [&_ul]:list-disc",dangerouslySetInnerHTML:{__html:W8.parse(t,{async:!1})}})})]})}function K8({body:t,onChange:e}){let a=(0,lz.useCallback)(r=>{let n=new oe({parent:r,doc:t,extensions:[q5(),j$(F$),iB(),zl.of([...DB,...uB]),oe.lineWrapping,oe.editable.of(e!==void 0),oe.updateListener.of(i=>{i.docChanged&&e?.(i.state.doc.toString())})]});return()=>n.destroy()},[]);return(0,or.jsx)("div",{className:"h-full",ref:a})}var ale=L(F(),1);var uz=L(G(),1);function eu({className:t,type:e,...a}){return(0,uz.jsx)("input",{type:e,"data-slot":"input",className:pe("h-[30px] w-full min-w-0 rounded-lg border border-input bg-background px-[11px] py-1 font-mono text-[11.5px] text-foreground transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30","focus-visible:border-[#d92f45]","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...a})}var ile=L(F(),1);var cz=L(G(),1);function Nh({className:t,...e}){return(0,cz.jsx)(Eg.Root,{"data-slot":"label",className:pe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}var ule=L(F(),1);var Rt=L(G(),1);function CC({...t}){return(0,Rt.jsx)(Ea.Root,{"data-slot":"select",...t})}function kC({...t}){return(0,Rt.jsx)(Ea.Value,{"data-slot":"select-value",...t})}function LC({className:t,size:e="default",children:a,...r}){return(0,Rt.jsxs)(Ea.Trigger,{"data-slot":"select-trigger","data-size":e,className:pe("flex w-fit cursor-pointer items-center justify-between gap-2 rounded-lg border border-input bg-background px-[11px] py-1 font-mono text-[11.5px] whitespace-nowrap text-foreground transition-[color,box-shadow] outline-none focus-visible:border-[#d92f45] disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-[30px] data-[size=sm]:h-7 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...r,children:[a,(0,Rt.jsx)(Ea.Icon,{asChild:!0,children:(0,Rt.jsx)(Oc,{className:"size-4 opacity-50"})})]})}function TC({className:t,children:e,position:a="item-aligned",align:r="center",...n}){return(0,Rt.jsx)(Ea.Portal,{children:(0,Rt.jsxs)(Ea.Content,{"data-slot":"select-content",className:pe("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,align:r,...n,children:[(0,Rt.jsx)(J8,{}),(0,Rt.jsx)(Ea.Viewport,{className:pe("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:e}),(0,Rt.jsx)(eW,{})]})})}function PC({className:t,children:e,...a}){return(0,Rt.jsxs)(Ea.Item,{"data-slot":"select-item",className:pe("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...a,children:[(0,Rt.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,Rt.jsx)(Ea.ItemIndicator,{children:(0,Rt.jsx)(Sd,{className:"size-4"})})}),(0,Rt.jsx)(Ea.ItemText,{children:e})]})}function J8({className:t,...e}){return(0,Rt.jsx)(Ea.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:pe("flex cursor-default items-center justify-center py-1",t),...e,children:(0,Rt.jsx)(wd,{className:"size-4"})})}function eW({className:t,...e}){return(0,Rt.jsx)(Ea.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:pe("flex cursor-default items-center justify-center py-1",t),...e,children:(0,Rt.jsx)(Oc,{className:"size-4"})})}var K=L(G(),1);function RC({identity:t,newKind:e,onDone:a,onClose:r}){let{data:n}=wA(t);if(t===void 0)return(0,K.jsx)(fz,{openedPrimitive:null,entityTag:"",newKind:e??"",onDone:a,onClose:r});if(n===void 0)return null;let{answer:i,entityTag:o}=n;return i.type==="Fault"?(0,K.jsx)(hz,{faults:[i]}):i.data.layerName!=="repo"?(0,K.jsx)(tW,{openedPrimitive:i}):(0,K.jsx)(fz,{openedPrimitive:i,entityTag:o,newKind:"",onDone:a,onClose:r})}function fz({openedPrimitive:t,entityTag:e,newKind:a,onDone:r,onClose:n}){let i=t?.data,[o,s]=(0,ff.useState)(i?.kind??a),[l,u]=(0,ff.useState)(i===void 0?"":String(i.headers.id)),[c,f]=(0,ff.useState)(()=>Object.fromEntries(Object.entries(i?.headers??{}).filter(([R])=>R!=="id").map(([R,D])=>[R,typeof D=="string"?D:[...D]]))),[d,h]=(0,ff.useState)(t?.data.body??""),[p,m]=(0,ff.useState)([]),{data:x}=xc(),{data:g}=CA(o),{data:O}=ii(),y=kA(),b=LA(),v=TA(),S=x===void 0?[]:Object.keys(x.data),w=g?.type==="PrimitiveRequirements"?g.data.headers:[],k=O?.type==="Primitives"?O.data.primitives.filter(({data:R})=>R.kind==="corpus").map(({data:R})=>R.identity):[],T=Object.fromEntries(w.flatMap(({data:{field:R}})=>{let D=c[R],Y=typeof D=="string"?D.trim():(D??[]).map(B=>B.trim()).filter(B=>B!=="");return Y.length===0?[]:[[R,Y]]})),Q=R=>m(R.type==="Faults"?R.data.faults:[R]),$=async()=>{let R=t===null?await y.mutateAsync({kind:o,id:l,headers:T,body:d}):await b.mutateAsync({param:{identity:t.data.identity},header:{"if-match":e},json:{headers:T,body:d}});if(R.type!=="Primitive")return Q(R);let{file:D,headers:Y}=R.data;r(t===null?"Primitive created":"Primitive saved",`${D} \xB7 ${t===null&&typeof Y.executionPath=="string"?`${Y.executionPath} beside it is the file it runs, write the script there \xB7 `:""}nothing compiled until the next build`)},A=async()=>{if(t===null)return;let R=await v.mutateAsync(t.data.identity);if(R!==null)return Q(R);r("Primitive deleted",`${t.data.file} \xB7 what still names it is reported by Doctor`)};return(0,K.jsxs)("div",{className:"space-y-3.5",children:[(0,K.jsxs)("div",{className:dz,children:[t===null?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(co,{label:"kind",htmlFor:"primitive-kind",children:(0,K.jsxs)(CC,{value:o,onValueChange:s,children:[(0,K.jsx)(LC,{id:"primitive-kind",className:"w-full",children:(0,K.jsx)(kC,{})}),(0,K.jsx)(TC,{children:S.map(R=>(0,K.jsx)(PC,{value:R,children:R},R))})]})}),(0,K.jsx)(co,{label:"id",htmlFor:"primitive-id",children:(0,K.jsx)(eu,{id:"primitive-id",value:l,placeholder:"no-any",spellCheck:!1,onChange:R=>u(R.currentTarget.value)})})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(co,{label:"kind",hint:"the identity is the file \u2014 rename by creating a new primitive and deleting this one",children:(0,K.jsx)("span",{className:"font-mono text-[11.5px]",children:o})}),(0,K.jsx)(co,{label:"id",children:(0,K.jsx)("span",{className:"font-mono text-[11.5px]",children:l})})]}),w.map(({data:{field:R,shape:D,required:Y,allowedValues:B}})=>(0,K.jsx)(co,{label:R,htmlFor:`header-${R}`,hint:Y?"required":void 0,children:D==="list"?(0,K.jsx)(aW,{field:R,entries:Array.isArray(c[R])?c[R]:[],onChange:q=>f({...c,[R]:q})}):B!==void 0?(0,K.jsxs)(CC,{value:typeof c[R]=="string"?c[R]:"",onValueChange:q=>f({...c,[R]:q}),children:[(0,K.jsx)(LC,{id:`header-${R}`,className:"w-full",children:(0,K.jsx)(kC,{placeholder:"\u2014"})}),(0,K.jsx)(TC,{children:B.map(q=>(0,K.jsx)(PC,{value:q,children:q},q))})]}):(0,K.jsx)(eu,{id:`header-${R}`,spellCheck:!1,autoComplete:"off",value:typeof c[R]=="string"?c[R]:"",list:R==="rationale"?"corpus-identities":void 0,onChange:q=>f({...c,[R]:q.currentTarget.value})})},R))]}),(0,K.jsx)("datalist",{id:"corpus-identities",children:k.map(R=>(0,K.jsx)("option",{value:R},R))}),(0,K.jsx)(wC,{body:d,onChange:h}),p.length>0&&(0,K.jsx)(hz,{faults:p}),(0,K.jsxs)("div",{className:ui,children:[(0,K.jsx)(Ae,{onClick:()=>{$()},children:t===null?"Create primitive":"Save"}),(0,K.jsx)(Ae,{variant:"outline",onClick:n,children:"Cancel"}),t!==null&&(0,K.jsx)(Ae,{variant:"destructive",className:"ml-auto",onClick:()=>{A()},children:"Delete"})]})]})}function tW({openedPrimitive:t}){let{kind:e,description:a,file:r,layerName:n,headers:i}=t.data;return(0,K.jsxs)("div",{className:"space-y-3.5",children:[(0,K.jsxs)(Ur,{className:"rounded-xl border-[#7c3aed33] bg-[#f6f2ff]",children:[(0,K.jsx)(jr,{className:"text-[12.5px] font-bold",children:n==="vendor"?"Installed from a vendor, and read-only here.":"Built into cw, and read-only here."}),(0,K.jsx)(Fr,{className:"text-[11.5px] text-zinc-600",children:"To differ from it, author a primitive of your own under an identity of its own."})]}),(0,K.jsxs)("div",{className:dz,children:[(0,K.jsx)(co,{label:"kind",children:(0,K.jsx)("span",{className:"font-mono text-[11.5px]",children:e})}),(0,K.jsx)(co,{label:"file",children:(0,K.jsx)("span",{className:"font-mono text-[11.5px]",children:r})}),(0,K.jsx)(co,{label:"description",children:(0,K.jsx)("span",{className:"text-xs",children:a})}),Object.entries(i).filter(([o])=>o!=="id"&&o!=="description").map(([o,s])=>(0,K.jsx)(co,{label:o,children:(0,K.jsx)("span",{className:"font-mono text-[11.5px]",children:typeof s=="string"?s:s.join(", ")})},o))]}),(0,K.jsx)(wC,{body:t.data.body})]})}var dz="overflow-hidden rounded-[11px] border border-[#f0f0f0] bg-background divide-y divide-zinc-100";function co({label:t,htmlFor:e,hint:a,children:r}){return(0,K.jsxs)("div",{className:"flex items-center gap-3 px-[13px] py-2.5",children:[(0,K.jsx)(Nh,{htmlFor:e,className:"w-[118px] shrink-0 text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:t}),(0,K.jsx)("div",{className:"min-w-0 flex-1",children:r}),a!==void 0&&(0,K.jsx)("span",{className:"max-w-[45%] shrink text-right text-[11.5px] text-zinc-400",children:a})]})}function aW({field:t,entries:e,onChange:a}){let r=e.length===0?[""]:e;return(0,K.jsxs)("div",{className:"flex flex-col gap-1.5",children:[r.map((n,i)=>(0,K.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,K.jsx)(eu,{id:i===0?`header-${t}`:void 0,"aria-label":`${t} ${i+1}`,spellCheck:!1,value:n,onChange:o=>a(r.map((s,l)=>l===i?o.currentTarget.value:s))}),r.length>1&&(0,K.jsx)(Ae,{variant:"outline",size:"icon",className:"size-[26px] shrink-0 rounded-[7px] text-zinc-400 [&_svg:not([class*='size-'])]:size-[11px]","aria-label":`Remove this ${t} entry`,onClick:()=>a(r.filter((o,s)=>s!==i)),children:(0,K.jsx)(sl,{})})]},i)),(0,K.jsxs)(Ae,{variant:"outline",size:"sm",className:"h-auto self-start rounded-[7px] border-dashed border-zinc-300 px-2.5 py-[5px] text-[11px] font-normal text-zinc-500",onClick:()=>a([...r,""]),children:["Add ",t]})]})}function hz({faults:t}){return(0,K.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,K.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:"Refused, and nothing was written"}),(0,K.jsx)(Fr,{children:t.map(({data:{message:e,fix:a}})=>(0,K.jsxs)("p",{className:"whitespace-pre-line",children:[e," ",(0,K.jsx)("span",{className:"text-muted-foreground",children:a})]},e))})]})}var c0=L(F(),1);var pt=L(G(),1);function pz({onDone:t,onClose:e}){let[a,r]=(0,c0.useState)(""),[n,i]=(0,c0.useState)(""),[o,s]=(0,c0.useState)(null),l=xc(),u=AA(),c=async()=>{let f=n.trim(),d=await u.mutateAsync({source:a.trim(),...f===""?{}:{version:f}});if(d!==null)return s(d);t("Vendor source added",`${a.trim()}${f===""?"":` @ ${f}`} \xB7 run Build to compile what it adds`)};return(0,pt.jsxs)("div",{className:"space-y-3.5",children:[(0,pt.jsx)("p",{className:"text-[13px] leading-[1.65] text-zinc-700",children:"A vendor source is a repository governed by cw: only its charter, under .cw/charter/, is installed."}),(0,pt.jsxs)("div",{className:"divide-y divide-zinc-100 overflow-hidden rounded-[11px] border border-[#f0f0f0]",children:[(0,pt.jsxs)("div",{className:"flex items-center gap-3 px-[13px] py-2.5",children:[(0,pt.jsx)(Nh,{htmlFor:"vendor-source",className:"w-[118px] shrink-0 text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:"source"}),(0,pt.jsx)(eu,{id:"vendor-source",value:a,spellCheck:!1,onChange:f=>r(f.target.value)})]}),(0,pt.jsxs)("div",{className:"flex items-center gap-3 px-[13px] py-2.5",children:[(0,pt.jsx)(Nh,{htmlFor:"vendor-version",className:"w-[118px] shrink-0 text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:"version"}),(0,pt.jsx)(eu,{id:"vendor-version",value:n,spellCheck:!1,onChange:f=>i(f.target.value)}),(0,pt.jsx)("span",{className:"max-w-[45%] shrink text-right text-[11.5px] text-zinc-400",children:"a tag, branch or commit; left empty, the source's default"})]})]}),(0,pt.jsxs)("div",{className:"rounded-[11px] border bg-zinc-50 px-3.5 py-3","aria-label":"Reserved directories",children:[(0,pt.jsx)("div",{className:"mb-1 text-[11px] font-bold tracking-[0.07em] text-zinc-400 uppercase",children:"Directories under its .cw/charter/"}),Object.entries(l.data?.data??{}).map(([f,d])=>(0,pt.jsxs)("div",{className:"flex items-baseline gap-[9px] border-t border-zinc-100 py-[7px]",children:[(0,pt.jsxs)("span",{className:"min-w-[150px] font-mono text-[11.5px]",children:[f,"/"]}),(0,pt.jsx)("span",{className:"text-[11.5px] text-zinc-500",children:d})]},f))]}),o!==null&&(0,pt.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,pt.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:"Refused, and nothing was installed"}),(0,pt.jsx)(Fr,{children:(0,pt.jsxs)("p",{className:"whitespace-pre-line",children:[o.data.message," ",(0,pt.jsx)("span",{className:"text-muted-foreground",children:o.data.fix})]})})]}),(0,pt.jsxs)("div",{className:ui,children:[(0,pt.jsx)(Ae,{disabled:u.isPending||a.trim()==="",onClick:()=>{c()},children:"Add source"}),(0,pt.jsx)(Ae,{variant:"outline",onClick:e,children:"Cancel"})]})]})}var IC=L(F(),1);var It=L(G(),1);function mz({name:t,onDone:e,onClose:a}){let n=Fm().data?.data.testSuites.find(({data:i})=>i.name===t);return n===void 0?null:(0,It.jsx)(rW,{name:t,initialText:n.data.text??"",onDone:e,onClose:a},t)}function rW({name:t,initialText:e,onDone:a,onClose:r}){let[n,i]=(0,IC.useState)(e),[o,s]=(0,IC.useState)(null),l=DA(),u=$A(),c=async()=>{let d=await l.mutateAsync({name:t,text:n});if(typeof d!="string")return s(d);a("Saved",`.cw/test/${t} rewritten \xB7 run the cases again`)},f=async()=>{let d=await u.mutateAsync(t);if(d!==null)return s(d);a("Test file deleted",`.cw/test/${t} removed`)};return(0,It.jsxs)("div",{className:"space-y-3",children:[(0,It.jsxs)("p",{className:"text-xs leading-[1.65] text-zinc-600 [&_code]:font-mono",children:["A case is one situation \u2014 a touched file (",(0,It.jsx)("code",{children:"do.touchFile"}),") or a raised event (",(0,It.jsx)("code",{children:"when"}),") \u2014 and expects one thing:"," ",(0,It.jsx)("code",{children:"activate"}),", ",(0,It.jsx)("code",{children:"run"})," or ",(0,It.jsx)("code",{children:"allow"}),"."]}),(0,It.jsx)("textarea",{"aria-label":"Test file text",className:"h-[340px] w-full resize-y rounded-[11px] border bg-zinc-50 px-3.5 py-3 font-mono text-[11.5px] leading-[1.65] outline-none",spellCheck:!1,value:n,onChange:d=>i(d.target.value)}),o!==null&&(0,It.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,It.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:"Refused, and nothing was written"}),(0,It.jsx)(Fr,{children:(0,It.jsxs)("p",{className:"break-words whitespace-pre-line",children:[o.data.message," ",(0,It.jsx)("span",{className:"text-muted-foreground",children:o.data.fix})]})})]}),(0,It.jsx)("p",{className:"text-[11.5px] leading-[1.6] text-zinc-400",children:"Read only when tests run \u2014 never compiled, never read by an agent."}),(0,It.jsxs)("div",{className:ui,children:[(0,It.jsx)(Ae,{disabled:l.isPending,onClick:()=>{c()},children:"Save"}),(0,It.jsx)(Ae,{variant:"outline",onClick:r,children:"Cancel"}),(0,It.jsx)(Ae,{variant:"destructive",className:"ml-auto",disabled:u.isPending,onClick:()=>{f()},children:"Delete file"})]})]})}var $le=L(F(),1);var sr=L(G(),1);function gz({...t}){return(0,sr.jsx)(xn.Root,{"data-slot":"dialog",...t})}function nW({...t}){return(0,sr.jsx)(xn.Portal,{"data-slot":"dialog-portal",...t})}function iW({className:t,...e}){return(0,sr.jsx)(xn.Overlay,{"data-slot":"dialog-overlay",className:pe("fixed inset-0 z-50 bg-[rgba(9,9,11,0.35)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",t),...e})}function Oz({className:t,children:e,showCloseButton:a=!0,...r}){return(0,sr.jsxs)(nW,{"data-slot":"dialog-portal",children:[(0,sr.jsx)(iW,{}),(0,sr.jsxs)(xn.Content,{"data-slot":"dialog-content",className:pe("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",t),...r,children:[e,a&&(0,sr.jsxs)(xn.Close,{"data-slot":"dialog-close",className:"absolute top-4 right-[18px] cursor-pointer rounded-xs p-0.5 text-zinc-400 ring-offset-background transition-colors hover:text-foreground focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,sr.jsx)(sl,{}),(0,sr.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function xz({className:t,...e}){return(0,sr.jsx)("div",{"data-slot":"dialog-header",className:pe("flex flex-col gap-2 text-center sm:text-left",t),...e})}function yz({className:t,...e}){return(0,sr.jsx)(xn.Title,{"data-slot":"dialog-title",className:pe("text-lg leading-none font-semibold",t),...e})}function bz({className:t,...e}){return(0,sr.jsx)(xn.Description,{"data-slot":"dialog-description",className:pe("text-sm text-muted-foreground",t),...e})}var pa=L(G(),1),oW={explanation:{title:()=>"Explain",context:({identity:t})=>t,holdsDraft:!1,render:({identity:t},{open:e})=>(0,pa.jsx)(TE,{identity:t,onExplain:a=>e("explanation",{identity:a})},t)},primitive:{title:({identity:t})=>t,context:()=>"",holdsDraft:!0,render:({identity:t},{close:e})=>(0,pa.jsx)(RC,{identity:t,onDone:f0(e),onClose:e},t)},newPrimitive:{title:()=>"New primitive",context:()=>"",holdsDraft:!0,render:({kind:t},{close:e})=>(0,pa.jsx)(RC,{newKind:t,onDone:f0(e),onClose:e},`new ${t}`)},buildPreview:{title:()=>"cw build",context:()=>"nothing written yet",holdsDraft:!1,render:(t,{open:e})=>(0,pa.jsx)(SE,{onBuilt:a=>e("buildOutcome",{buildAnswer:a})})},buildOutcome:{title:()=>"cw build",context:()=>"",holdsDraft:!1,render:({buildAnswer:t})=>(0,pa.jsx)(wE,{buildAnswer:t})},addVendor:{title:()=>"Add vendor source",context:()=>"",holdsDraft:!0,render:(t,{close:e})=>(0,pa.jsx)(pz,{onDone:f0(e),onClose:e})},testSuite:{title:({name:t})=>`.cw/test/${t}`,context:()=>"",holdsDraft:!0,render:({name:t},{close:e})=>(0,pa.jsx)(mz,{name:t,onDone:f0(e),onClose:e},t)},doctor:{title:()=>"Doctor",context:()=>"cw 0.4.0",holdsDraft:!1,render:(t,{open:e})=>(0,pa.jsx)(LE,{onBuilt:a=>e("buildOutcome",{buildAnswer:a})})}};function f0(t){return(e,a)=>{t(),ll(e,{description:a})}}var vz=(0,tu.createContext)(null);function fo(){return(0,tu.useContext)(vz)}function Sz({children:t}){let[e,a]=(0,tu.useState)(null),[r,n]=(0,tu.useState)(!1),i={open:(s,l)=>{a({name:s,params:l}),n(!0)},close:()=>n(!1)},o=e===null?null:oW[e.name];return(0,pa.jsxs)(vz.Provider,{value:i,children:[t,(0,pa.jsx)(gz,{open:r,onOpenChange:n,children:e!==null&&o!==null&&(0,pa.jsxs)(Oz,{className:"flex max-h-[88vh] w-[920px] max-w-[calc(100%-48px)] flex-col gap-0 overflow-hidden rounded-[15px] border-0 p-0 shadow-[0_34px_80px_-22px_rgba(0,0,0,0.4)] sm:max-w-[calc(100%-48px)]",onInteractOutside:s=>o.holdsDraft&&s.preventDefault(),onEscapeKeyDown:s=>o.holdsDraft&&s.preventDefault(),children:[(0,pa.jsxs)(xz,{className:"flex-row items-baseline gap-2.5 border-b border-[#f0f0f0] py-[15px] pr-12 pl-[18px]",children:[(0,pa.jsx)(yz,{className:"text-[14.5px] font-bold tracking-[-0.01em]",children:o.title(e.params)}),(0,pa.jsx)(bz,{className:"font-mono text-[11px] text-zinc-400",children:o.context(e.params)})]}),(0,pa.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-[18px]",children:o.render(e.params,i)})]})})]})}var h0=L(F(),1);var Wle=L(F(),1);var sW=L(G(),1),wz=si("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 min-w-9 px-2",sm:"h-8 min-w-8 px-1.5",lg:"h-10 min-w-10 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});var d0=L(G(),1),Cz=h0.createContext({size:"default",variant:"default",spacing:0});function kz({className:t,variant:e,size:a,spacing:r=0,children:n,...i}){return(0,d0.jsx)(Xd.Root,{"data-slot":"toggle-group","data-variant":e,"data-size":a,"data-spacing":r,style:{"--gap":r},className:pe("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",t),...i,children:(0,d0.jsx)(Cz.Provider,{value:{variant:e,size:a,spacing:r},children:n})})}function Lz({className:t,children:e,variant:a,size:r,...n}){let i=h0.useContext(Cz);return(0,d0.jsx)(Xd.Item,{"data-slot":"toggle-group-item","data-variant":i.variant||a,"data-size":i.size||r,"data-spacing":i.spacing,className:pe(wz({variant:i.variant||a,size:i.size||r}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",t),...n,children:e})}var se=L(G(),1);function MC({layerNames:t,kind:e,onKindChange:a}){let{open:r}=fo(),n=xc(),i=ii();if(n.data===void 0||i.data===void 0)return null;let o=n.data.data,s=i.data;if(s.type==="FaultsByFile")return(0,se.jsx)(lW,{faultsByFile:s});if(s.type==="Fault")return(0,se.jsx)(uW,{fault:s});let l=s.data.primitives.filter(({data:d})=>t.includes(d.layerName)),u=new Map(Object.keys(o).map(d=>[d,l.filter(({data:h})=>h.kind===d).length])),c=e??[...u].find(([,d])=>d>0)?.[0]??Object.keys(o)[0],f=l.filter(({data:d})=>d.kind===c);return(0,se.jsxs)("div",{className:"min-w-0",children:[(0,se.jsxs)("div",{className:"mb-3 flex items-baseline gap-[9px]",children:[(0,se.jsx)("h2",{className:"text-[12.5px] font-bold",children:"Charter primitives"}),(0,se.jsxs)("span",{className:"text-[11.5px] text-zinc-400",children:[l.length," in this charter"]}),t.includes("repo")&&(0,se.jsxs)(Ae,{size:"sm",variant:"outline",className:"ml-auto",onClick:()=>r("newPrimitive",{kind:c}),children:["New ",c]})]}),(0,se.jsx)(kz,{type:"single",spacing:1.5,"aria-label":"Kinds",className:"mb-3 flex-wrap",value:c,onValueChange:d=>d!==""&&a(d),children:[...u].map(([d,h])=>(0,se.jsxs)(Lz,{value:d,"aria-label":d,className:`group/chip h-auto cursor-pointer gap-1.5 rounded-[9px] border bg-background px-2.5 py-1.5 text-[11.5px] font-medium text-zinc-700 capitalize hover:bg-background hover:text-zinc-700 data-[state=on]:border-foreground data-[state=on]:bg-foreground data-[state=on]:font-semibold data-[state=on]:text-white ${h===0&&d!==c?"opacity-50":""}`,children:[d,(0,se.jsx)(pi,{className:"rounded-none bg-transparent p-0 font-mono text-[10px] font-normal text-zinc-400 group-data-[state=on]/chip:text-white/70",children:h})]},d))}),(0,se.jsxs)("p",{className:"mb-2.5 flex items-baseline gap-2 px-0.5",children:[(0,se.jsx)("span",{className:"shrink-0 text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:"Activates when"}),(0,se.jsx)("span",{className:"text-xs leading-normal text-zinc-700","aria-label":"Activates when",children:o[c]})]}),f.length===0?(0,se.jsxs)("p",{className:"rounded-[14px] border p-[22px] text-center text-[12.5px] text-zinc-400",children:["No ",c," in this charter yet."]}):(0,se.jsx)(cW,{kind:c,listed:f})]})}function lW({faultsByFile:t}){let e=Object.entries(t.data.files);return(0,se.jsxs)("div",{className:"space-y-3.5",children:[(0,se.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,se.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:"The engine will not read this charter"}),(0,se.jsxs)(Fr,{children:[e.length," file",e.length===1?" is":"s are"," refused, so there is no listing to show. Fix",e.length===1?" it":" them"," and the charter comes back."]})]}),(0,se.jsx)(cs,{faultsByFile:t,label:"Refused files"})]})}function uW({fault:t}){return(0,se.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,se.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:t.data.message}),(0,se.jsx)(Fr,{children:t.data.fix})]})}function AC(t){return t===void 0?void 0:typeof t=="string"?[t]:t}function cW({kind:t,listed:e}){let{open:a}=fo(),r=t==="guide",n=t!=="mixin";return(0,se.jsx)("div",{className:"overflow-hidden rounded-[14px] border bg-background",children:(0,se.jsxs)(kl,{"aria-label":`${t} primitives`,className:"table-fixed",children:[(0,se.jsx)(bE,{children:(0,se.jsxs)(Tl,{className:"border-[#ececef] bg-zinc-50 hover:bg-zinc-50 [&>th]:h-auto [&>th]:px-[15px] [&>th]:py-[9px] [&>th]:text-[9.5px] [&>th]:font-bold [&>th]:tracking-[0.07em] [&>th]:text-zinc-400 [&>th]:uppercase",children:[(0,se.jsx)(Pl,{className:"w-[170px]",children:"Id"}),(0,se.jsx)(Pl,{children:"Description"}),r&&(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(Pl,{className:"w-[170px] text-right",children:"Matching globs"}),(0,se.jsx)(Pl,{className:"w-[120px] text-right",children:"Rationale"})]}),n&&(0,se.jsx)(Pl,{className:"w-[120px] text-right",children:"Mixins"}),(0,se.jsx)(Pl,{className:"w-[50px]"})]})}),(0,se.jsx)(Ll,{children:e.map(({data:{identity:i,description:o,file:s,headers:l}})=>{let u=AC(l.globs);return(0,se.jsxs)(Tl,{className:"group/row border-[#f7f7f8] align-top hover:bg-zinc-50 [&>td]:px-[15px] [&>td]:py-3",children:[(0,se.jsx)(Cn,{className:"truncate",children:(0,se.jsx)(Ae,{variant:"link",className:"block h-auto max-w-full truncate rounded-none p-0 text-left font-mono text-[11.5px] font-bold text-foreground",title:`Open ${s}`,onClick:()=>a("primitive",{identity:i}),children:String(l.id)})}),(0,se.jsxs)(Cn,{className:"whitespace-normal",children:[(0,se.jsx)("div",{className:"text-[12.5px] font-semibold",children:o}),(0,se.jsx)("div",{className:"mt-[3px] truncate font-mono text-[10.5px] text-zinc-400",children:s})]}),r&&(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(QC,{named:u,none:"all patterns",said:u===void 0,label:"Matching globs"}),(0,se.jsx)(QC,{named:AC(l.rationale),none:"none",said:!1,label:"Rationale"})]}),n&&(0,se.jsx)(QC,{named:AC(l.mixins),none:"none",said:!1,label:"Mixins"}),(0,se.jsx)(Cn,{children:(0,se.jsx)(Ae,{variant:"ghost",size:"icon",className:"ml-auto size-6 rounded-[7px] border border-transparent text-zinc-300 group-hover/row:border-zinc-200 group-hover/row:bg-background group-hover/row:text-zinc-400 hover:!border-foreground hover:bg-background hover:!text-foreground [&_svg:not([class*='size-'])]:size-[13px]","aria-label":`Explain ${i}`,onClick:()=>a("explanation",{identity:i}),children:(0,se.jsx)(hn,{})})})]},i)})})]})})}function QC({named:t,none:e,said:a,label:r}){return(0,se.jsx)(Cn,{"aria-label":r,children:(0,se.jsx)("div",{className:"flex min-w-0 flex-wrap content-start justify-end gap-1",children:t===void 0||t.length===0?(0,se.jsx)("span",{className:`text-[10.5px] ${a?"text-destructive":"text-zinc-300"}`,children:e}):t.map(n=>(0,se.jsx)(pi,{title:n,className:"block max-w-full truncate rounded-[5px] bg-zinc-100 px-1.5 py-0.5 font-mono text-[10px] font-normal text-zinc-700",children:n},n))})})}var NC=L(F(),1);var Sue=L(F(),1);var Tz=1,fW=.9,dW=.8,hW=.17,EC=.1,DC=.999,pW=.9999,mW=.99,gW=/[\\\/_+.#"@\[\(\{&]/,OW=/[\\\/_+.#"@\[\(\{&]/g,xW=/[\s-]/,Rz=/[\s-]/g;function $C(t,e,a,r,n,i,o){if(i===e.length)return n===t.length?Tz:mW;var s=`${n},${i}`;if(o[s]!==void 0)return o[s];for(var l=r.charAt(i),u=a.indexOf(l,n),c=0,f,d,h,p;u>=0;)f=$C(t,e,a,r,u+1,i+1,o),f>c&&(u===n?f*=Tz:gW.test(t.charAt(u-1))?(f*=dW,h=t.slice(n,u-1).match(OW),h&&n>0&&(f*=Math.pow(DC,h.length))):xW.test(t.charAt(u-1))?(f*=fW,p=t.slice(n,u-1).match(Rz),p&&n>0&&(f*=Math.pow(DC,p.length))):(f*=hW,n>0&&(f*=Math.pow(DC,u-n))),t.charAt(u)!==e.charAt(i)&&(f*=pW)),(f<EC&&a.charAt(u-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&a.charAt(u-1)!==r.charAt(i))&&(d=$C(t,e,a,r,u+1,i+2,o),d*EC>f&&(f=d*EC)),f>c&&(c=f),u=a.indexOf(l,u+1);return o[s]=c,c}function Pz(t){return t.toLowerCase().replace(Rz," ")}function Iz(t,e,a){return t=a&&a.length>0?`${t+" "+a.join(" ")}`:t,$C(t,e,Pz(t),Pz(e),0,0,{})}var J=L(F(),1);var Xh='[cmdk-group=""]',BC='[cmdk-group-items=""]',yW='[cmdk-group-heading=""]',Qz='[cmdk-item=""]',Az=`${Qz}:not([aria-disabled="true"])`,_C="cmdk-item-select",df="data-value",bW=(t,e,a)=>Iz(t,e,a),Mz=J.createContext(void 0),qh=()=>J.useContext(Mz),Ez=J.createContext(void 0),zC=()=>J.useContext(Ez),Dz=J.createContext(void 0),$z=J.forwardRef((t,e)=>{let a=hf(()=>{var P,H;return{search:"",value:(H=(P=t.value)!=null?P:t.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=hf(()=>new Set),n=hf(()=>new Map),i=hf(()=>new Map),o=hf(()=>new Set),s=Bz(t),{label:l,children:u,value:c,onValueChange:f,filter:d,shouldFilter:h,loop:p,disablePointerSelection:m=!1,vimBindings:x=!0,...g}=t,O=Dt(),y=Dt(),b=Dt(),v=J.useRef(null),S=AW();au(()=>{if(c!==void 0){let P=c.trim();a.current.value=P,w.emit()}},[c]),au(()=>{S(6,R)},[]);let w=J.useMemo(()=>({subscribe:P=>(o.current.add(P),()=>o.current.delete(P)),snapshot:()=>a.current,setState:(P,H,N)=>{var M,j,de,ee;if(!Object.is(a.current[P],H)){if(a.current[P]=H,P==="search")A(),Q(),S(1,$);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Z=document.getElementById(b);Z?Z.focus():(M=document.getElementById(O))==null||M.focus()}if(S(7,()=>{var Z;a.current.selectedItemId=(Z=D())==null?void 0:Z.id,w.emit()}),N||S(5,R),((j=s.current)==null?void 0:j.value)!==void 0){let Z=H??"";(ee=(de=s.current).onValueChange)==null||ee.call(de,Z);return}}w.emit()}},emit:()=>{o.current.forEach(P=>P())}}),[]),k=J.useMemo(()=>({value:(P,H,N)=>{var M;H!==((M=i.current.get(P))==null?void 0:M.value)&&(i.current.set(P,{value:H,keywords:N}),a.current.filtered.items.set(P,T(H,N)),S(2,()=>{Q(),w.emit()}))},item:(P,H)=>(r.current.add(P),H&&(n.current.has(H)?n.current.get(H).add(P):n.current.set(H,new Set([P]))),S(3,()=>{A(),Q(),a.current.value||$(),w.emit()}),()=>{i.current.delete(P),r.current.delete(P),a.current.filtered.items.delete(P);let N=D();S(4,()=>{A(),N?.getAttribute("id")===P&&$(),w.emit()})}),group:P=>(n.current.has(P)||n.current.set(P,new Set),()=>{i.current.delete(P),n.current.delete(P)}),filter:()=>s.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:O,inputId:b,labelId:y,listInnerRef:v}),[]);function T(P,H){var N,M;let j=(M=(N=s.current)==null?void 0:N.filter)!=null?M:bW;return P?j(P,a.current.search,H):0}function Q(){if(!a.current.search||s.current.shouldFilter===!1)return;let P=a.current.filtered.items,H=[];a.current.filtered.groups.forEach(M=>{let j=n.current.get(M),de=0;j.forEach(ee=>{let Z=P.get(ee);de=Math.max(Z,de)}),H.push([M,de])});let N=v.current;Y().sort((M,j)=>{var de,ee;let Z=M.getAttribute("id"),qe=j.getAttribute("id");return((de=P.get(qe))!=null?de:0)-((ee=P.get(Z))!=null?ee:0)}).forEach(M=>{let j=M.closest(BC);j?j.appendChild(M.parentElement===j?M:M.closest(`${BC} > *`)):N.appendChild(M.parentElement===N?M:M.closest(`${BC} > *`))}),H.sort((M,j)=>j[1]-M[1]).forEach(M=>{var j;let de=(j=v.current)==null?void 0:j.querySelector(`${Xh}[${df}="${encodeURIComponent(M[0])}"]`);de?.parentElement.appendChild(de)})}function $(){let P=Y().find(N=>N.getAttribute("aria-disabled")!=="true"),H=P?.getAttribute(df);w.setState("value",H||void 0)}function A(){var P,H,N,M;if(!a.current.search||s.current.shouldFilter===!1){a.current.filtered.count=r.current.size;return}a.current.filtered.groups=new Set;let j=0;for(let de of r.current){let ee=(H=(P=i.current.get(de))==null?void 0:P.value)!=null?H:"",Z=(M=(N=i.current.get(de))==null?void 0:N.keywords)!=null?M:[],qe=T(ee,Z);a.current.filtered.items.set(de,qe),qe>0&&j++}for(let[de,ee]of n.current)for(let Z of ee)if(a.current.filtered.items.get(Z)>0){a.current.filtered.groups.add(de);break}a.current.filtered.count=j}function R(){var P,H,N;let M=D();M&&(((P=M.parentElement)==null?void 0:P.firstChild)===M&&((N=(H=M.closest(Xh))==null?void 0:H.querySelector(yW))==null||N.scrollIntoView({block:"nearest"})),M.scrollIntoView({block:"nearest"}))}function D(){var P;return(P=v.current)==null?void 0:P.querySelector(`${Qz}[aria-selected="true"]`)}function Y(){var P;return Array.from(((P=v.current)==null?void 0:P.querySelectorAll(Az))||[])}function B(P){let H=Y()[P];H&&w.setState("value",H.getAttribute(df))}function q(P){var H;let N=D(),M=Y(),j=M.findIndex(ee=>ee===N),de=M[j+P];(H=s.current)!=null&&H.loop&&(de=j+P<0?M[M.length-1]:j+P===M.length?M[0]:M[j+P]),de&&w.setState("value",de.getAttribute(df))}function re(P){let H=D(),N=H?.closest(Xh),M;for(;N&&!M;)N=P>0?RW(N,Xh):IW(N,Xh),M=N?.querySelector(Az);M?w.setState("value",M.getAttribute(df)):q(P)}let ie=()=>B(Y().length-1),z=P=>{P.preventDefault(),P.metaKey?ie():P.altKey?re(1):q(1)},Pe=P=>{P.preventDefault(),P.metaKey?B(0):P.altKey?re(-1):q(-1)};return J.createElement(ue.div,{ref:e,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:P=>{var H;(H=g.onKeyDown)==null||H.call(g,P);let N=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||N))switch(P.key){case"n":case"j":{x&&P.ctrlKey&&z(P);break}case"ArrowDown":{z(P);break}case"p":case"k":{x&&P.ctrlKey&&Pe(P);break}case"ArrowUp":{Pe(P);break}case"Home":{P.preventDefault(),B(0);break}case"End":{P.preventDefault(),ie();break}case"Enter":{P.preventDefault();let M=D();if(M){let j=new Event(_C);M.dispatchEvent(j)}}}}},J.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:MW},l),p0(t,P=>J.createElement(Ez.Provider,{value:w},J.createElement(Mz.Provider,{value:k},P))))}),vW=J.forwardRef((t,e)=>{var a,r;let n=Dt(),i=J.useRef(null),o=J.useContext(Dz),s=qh(),l=Bz(t),u=(r=(a=l.current)==null?void 0:a.forceMount)!=null?r:o?.forceMount;au(()=>{if(!u)return s.item(n,o?.id)},[u]);let c=_z(n,i,[t.value,t.children,i],t.keywords),f=zC(),d=Ms(S=>S.value&&S.value===c.current),h=Ms(S=>u||s.filter()===!1?!0:S.search?S.filtered.items.get(n)>0:!0);J.useEffect(()=>{let S=i.current;if(!(!S||t.disabled))return S.addEventListener(_C,p),()=>S.removeEventListener(_C,p)},[h,t.onSelect,t.disabled]);function p(){var S,w;m(),(w=(S=l.current).onSelect)==null||w.call(S,c.current)}function m(){f.setState("value",c.current,!0)}if(!h)return null;let{disabled:x,value:g,onSelect:O,forceMount:y,keywords:b,...v}=t;return J.createElement(ue.div,{ref:es(i,e),...v,id:n,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!d,"data-disabled":!!x,"data-selected":!!d,onPointerMove:x||s.getDisablePointerSelection()?void 0:m,onClick:x?void 0:p},t.children)}),SW=J.forwardRef((t,e)=>{let{heading:a,children:r,forceMount:n,...i}=t,o=Dt(),s=J.useRef(null),l=J.useRef(null),u=Dt(),c=qh(),f=Ms(h=>n||c.filter()===!1?!0:h.search?h.filtered.groups.has(o):!0);au(()=>c.group(o),[]),_z(o,s,[t.value,t.heading,l]);let d=J.useMemo(()=>({id:o,forceMount:n}),[n]);return J.createElement(ue.div,{ref:es(s,e),...i,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},a&&J.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},a),p0(t,h=>J.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?u:void 0},J.createElement(Dz.Provider,{value:d},h))))}),wW=J.forwardRef((t,e)=>{let{alwaysRender:a,...r}=t,n=J.useRef(null),i=Ms(o=>!o.search);return!a&&!i?null:J.createElement(ue.div,{ref:es(n,e),...r,"cmdk-separator":"",role:"separator"})}),CW=J.forwardRef((t,e)=>{let{onValueChange:a,...r}=t,n=t.value!=null,i=zC(),o=Ms(u=>u.search),s=Ms(u=>u.selectedItemId),l=qh();return J.useEffect(()=>{t.value!=null&&i.setState("search",t.value)},[t.value]),J.createElement(ue.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:n?t.value:o,onChange:u=>{n||i.setState("search",u.target.value),a?.(u.target.value)}})}),kW=J.forwardRef((t,e)=>{let{children:a,label:r="Suggestions",...n}=t,i=J.useRef(null),o=J.useRef(null),s=Ms(u=>u.selectedItemId),l=qh();return J.useEffect(()=>{if(o.current&&i.current){let u=o.current,c=i.current,f,d=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let h=u.offsetHeight;c.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return d.observe(u),()=>{cancelAnimationFrame(f),d.unobserve(u)}}},[]),J.createElement(ue.div,{ref:es(i,e),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},p0(t,u=>J.createElement("div",{ref:es(o,l.listInnerRef),"cmdk-list-sizer":""},u)))}),LW=J.forwardRef((t,e)=>{let{open:a,onOpenChange:r,overlayClassName:n,contentClassName:i,container:o,...s}=t;return J.createElement(Rv,{open:a,onOpenChange:r},J.createElement(Iv,{container:o},J.createElement(Av,{"cmdk-overlay":"",className:n}),J.createElement(Qv,{"aria-label":t.label,"cmdk-dialog":"",className:i},J.createElement($z,{ref:e,...s}))))}),TW=J.forwardRef((t,e)=>Ms(a=>a.filtered.count===0)?J.createElement(ue.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),PW=J.forwardRef((t,e)=>{let{progress:a,children:r,label:n="Loading...",...i}=t;return J.createElement(ue.div,{ref:e,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},p0(t,o=>J.createElement("div",{"aria-hidden":!0},o)))}),ru=Object.assign($z,{List:kW,Item:vW,Input:CW,Group:SW,Separator:wW,Dialog:LW,Empty:TW,Loading:PW});function RW(t,e){let a=t.nextElementSibling;for(;a;){if(a.matches(e))return a;a=a.nextElementSibling}}function IW(t,e){let a=t.previousElementSibling;for(;a;){if(a.matches(e))return a;a=a.previousElementSibling}}function Bz(t){let e=J.useRef(t);return au(()=>{e.current=t}),e}var au=typeof window>"u"?J.useEffect:J.useLayoutEffect;function hf(t){let e=J.useRef();return e.current===void 0&&(e.current=t()),e}function Ms(t){let e=zC(),a=()=>t(e.snapshot());return J.useSyncExternalStore(e.subscribe,a,a)}function _z(t,e,a,r=[]){let n=J.useRef(),i=qh();return au(()=>{var o;let s=(()=>{var u;for(let c of a){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():n.current}})(),l=r.map(u=>u.trim());i.value(t,s,l),(o=e.current)==null||o.setAttribute(df,s),n.current=s}),n}var AW=()=>{let[t,e]=J.useState(),a=hf(()=>new Map);return au(()=>{a.current.forEach(r=>r()),a.current=new Map},[t]),(r,n)=>{a.current.set(r,n),e({})}};function QW(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function p0({asChild:t,children:e},a){return t&&J.isValidElement(e)?J.cloneElement(QW(e),{ref:e.ref},a(e.props.children)):a(e)}var MW={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var vi=L(G(),1);function zz({className:t,...e}){return(0,vi.jsx)(ru,{"data-slot":"command",className:pe("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e})}function Nz({className:t,...e}){return(0,vi.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,vi.jsx)(kd,{className:"size-4 shrink-0 opacity-50"}),(0,vi.jsx)(ru.Input,{"data-slot":"command-input",className:pe("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]})}function Xz({className:t,...e}){return(0,vi.jsx)(ru.List,{"data-slot":"command-list",className:pe("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function qz({...t}){return(0,vi.jsx)(ru.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function Zz({className:t,...e}){return(0,vi.jsx)(ru.Group,{"data-slot":"command-group",className:pe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e})}function Vz({className:t,...e}){return(0,vi.jsx)(ru.Item,{"data-slot":"command-item",className:pe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...e})}var mt=L(G(),1);function jz({onPick:t}){let[e,a]=(0,NC.useState)(""),[r,n]=(0,NC.useState)(!1),{data:i}=ii(e);return(0,mt.jsxs)(zz,{shouldFilter:!1,className:"relative w-full overflow-visible rounded-[9px] border bg-zinc-50 text-zinc-400 focus-within:border-foreground focus-within:bg-background focus-within:text-zinc-500 [&_[data-slot=command-input-wrapper]]:h-[32px] [&_[data-slot=command-input-wrapper]]:border-0 [&_[data-slot=command-input]]:h-8 [&_[data-slot=command-input]]:text-[12.5px] [&_[data-slot=command-input]]:text-foreground [&_[data-slot=command-input]]:placeholder:text-zinc-400",onFocus:()=>n(!0),onBlur:()=>n(!1),children:[(0,mt.jsx)(Nz,{placeholder:"Search everything",spellCheck:!1,value:e,onValueChange:a,onKeyDown:o=>o.key==="Escape"&&a("")}),r&&e!==""&&(0,mt.jsxs)(Xz,{className:"absolute top-full right-0 left-0 z-50 mt-[7px] max-h-[min(460px,62vh)] rounded-xl border bg-popover p-[5px] shadow-[0_20px_44px_-16px_rgba(0,0,0,0.3)] [&_[cmdk-group-heading]]:px-[11px] [&_[cmdk-group-heading]]:pt-2 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:text-[10px] [&_[cmdk-group-heading]]:font-bold [&_[cmdk-group-heading]]:tracking-[0.07em] [&_[cmdk-group-heading]]:text-zinc-400 [&_[cmdk-group-heading]]:uppercase [&_[data-slot=command-group]]:p-0",onMouseDown:o=>o.preventDefault(),children:[i?.type==="FaultsByFile"&&(0,mt.jsx)("p",{className:"px-3 py-3.5 text-xs text-zinc-400",children:"The engine will not read this charter, so there is nothing to search."}),i?.type==="Fault"&&(0,mt.jsxs)("p",{className:"px-3 py-3.5 text-xs text-zinc-400",children:[i.data.message," ",i.data.fix]}),i?.type==="Primitives"&&(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsx)(qz,{className:"px-3 py-3.5 text-xs text-zinc-400",children:"Nothing in the charter says that."}),i.data.primitives.length>0&&(0,mt.jsx)(Zz,{heading:`${i.data.primitives.length} primitive${i.data.primitives.length===1?"":"s"}`,children:i.data.primitives.map(o=>{let{identity:s,kind:l,description:u,layerName:c,headers:f}=o.data;return(0,mt.jsxs)(Vz,{value:s,className:"grid cursor-pointer grid-cols-[74px_minmax(0,1fr)_max-content] items-baseline gap-2.5 rounded-lg px-[11px] py-2 data-[selected=true]:bg-zinc-50 data-[selected=true]:outline data-[selected=true]:outline-zinc-200",onSelect:()=>{a(""),n(!1),t(o)},children:[(0,mt.jsx)("span",{className:"font-mono text-[9.5px] font-bold tracking-[0.03em] text-zinc-500 uppercase",children:l}),(0,mt.jsxs)("span",{className:"min-w-0",children:[(0,mt.jsx)("span",{className:"block truncate font-mono text-xs text-foreground",children:(0,mt.jsx)(Uz,{text:String(f.id),word:e})}),(0,mt.jsx)("span",{className:"mt-0.5 block truncate text-[11px] leading-[1.45] text-zinc-400",children:(0,mt.jsx)(Uz,{text:u,word:e})})]}),(0,mt.jsx)(pi,{className:`rounded-[5px] px-1.5 py-0.5 font-mono text-[9.5px] font-bold tracking-[0.03em] ${EW[c]}`,children:c})]},s)})})]})]})]})}var EW={repo:"bg-[#eff6ff] text-[#1d4ed8]",vendor:"bg-[#f6f2ff] text-[#7c3aed]",builtin:"bg-zinc-100 text-zinc-700"};function Uz({text:t,word:e}){let a=t.toLowerCase().indexOf(e.toLowerCase());return a===-1||e===""?(0,mt.jsx)(mt.Fragment,{children:t}):(0,mt.jsxs)(mt.Fragment,{children:[t.slice(0,a),(0,mt.jsx)("mark",{className:"rounded-[2px] bg-[#fff2b8] text-inherit",children:t.slice(a,a+e.length)}),t.slice(a+e.length)]})}var Fz=L(F(),1);var De=L(G(),1);function Hz(){let{open:t}=fo(),e=Fm(),a=MA(),r=ii(),n=EA(),[i,o]=(0,Fz.useState)(null);if(e.data===void 0)return null;let{testSuites:s}=e.data.data,l=new Set(r.data?.type==="Primitives"?r.data.data.primitives.map(({data:m})=>m.identity):[]),u=a.data?.type==="TestRunReport"?a.data:void 0,c=m=>u?.data.testCaseReports.filter(({data:x})=>x.suiteName===m)??[],f=s.reduce((m,{data:x})=>m+x.cases.length,0),d=u?.data.testCaseReports.filter(({data:m})=>!m.passed).length??0,h=async()=>{let{data:m}=await a.refetch();if(m?.type!=="TestRunReport")return;let x=m.data.testCaseReports.find(({data:g})=>!g.passed);x!==void 0&&o(x.data.suiteName)},p=async()=>{let m=await n.mutateAsync();o(m),t("testSuite",{name:m}),ll("Test file created",{description:`.cw/test/${m} \xB7 edit the cases, then run them`})};return(0,De.jsxs)("div",{className:"space-y-2.5",children:[(0,De.jsxs)("div",{className:`mb-[18px] flex flex-wrap items-center gap-[11px] rounded-xl border px-[15px] py-[13px] ${u===void 0?"":d>0?"border-[#f6d9d9] bg-[#fef6f6]":"border-[#dcf0e2] bg-[#f5fbf7]"}`,"aria-label":"Test summary",children:[(0,De.jsx)("span",{className:"text-[12.5px] font-bold",children:u===void 0?`${f} case${f===1?"":"s"} in ${s.length} file${s.length===1?"":"s"}`:`${u.data.testCaseReports.length-d} of ${u.data.testCaseReports.length} cases pass`}),(0,De.jsx)("span",{className:"min-w-0 flex-1 text-[11.5px] leading-[1.6] text-zinc-500",children:"A case names the file a change touches or the event it raises, then says what must come up. It runs nothing and asks no agent."}),(0,De.jsx)(Ae,{variant:"outline",disabled:n.isPending,onClick:()=>{p()},children:"New test file"}),(0,De.jsx)(Ae,{disabled:a.isFetching,onClick:()=>{h()},children:"Run all tests"})]}),a.data?.type==="FaultsByFile"&&(0,De.jsx)(cs,{faultsByFile:a.data,label:"Nothing was resolved"}),s.length===0&&(0,De.jsx)("div",{className:"rounded-xl border border-dashed px-[15px] py-3.5 text-[11.5px] leading-[1.6] text-zinc-500",children:"No test file yet. Test files live in .cw/test/."}),s.map(({data:m})=>{let x=c(m.name),g=x.filter(({data:O})=>!O.passed).length;return(0,De.jsxs)("section",{className:"overflow-hidden rounded-[14px] border bg-background","aria-label":m.name,children:[(0,De.jsxs)("div",{className:"flex items-baseline gap-2.5 px-[15px] py-3",children:[(0,De.jsxs)("button",{className:"flex min-w-0 flex-1 cursor-pointer items-baseline gap-2.5 text-left","aria-expanded":i===m.name,onClick:()=>o(i===m.name?null:m.name),children:[(0,De.jsx)("span",{className:"font-mono text-[11.5px] font-bold",children:m.name}),(0,De.jsx)("span",{className:"min-w-0 flex-1 text-[11.5px] text-zinc-500",children:m.description}),(0,De.jsxs)("span",{className:`font-mono text-[10.5px] ${g>0?"text-destructive":"text-zinc-400"}`,children:[m.cases.length," case",m.cases.length===1?"":"s",g>0&&` \xB7 ${g} failing`]})]}),(0,De.jsx)(Ae,{variant:"ghost",className:"h-auto p-0 text-[11.5px] text-zinc-400 hover:bg-transparent hover:text-foreground",onClick:()=>t("testSuite",{name:m.name}),children:"Edit"})]}),m.fault!==void 0&&(0,De.jsxs)("p",{className:"border-t border-[#f7f7f8] px-[15px] py-2.5 text-[11.5px] text-destructive",children:[m.fault.data.message," ",(0,De.jsx)("span",{className:"text-zinc-400",children:m.fault.data.fix})]}),i===m.name&&m.cases.map(({data:O},y)=>(0,De.jsx)(DW,{testCase:O,testCaseReport:x[y],isHeld:O.identity===void 0||l.has(O.identity),onOpen:b=>t("primitive",{identity:b})},y))]},m.name)})]})}function DW({testCase:t,testCaseReport:e,isHeld:a,onOpen:r}){let n=e?.data.unmet,{identity:i,expectation:o}=t;return(0,De.jsxs)("div",{className:`grid grid-cols-[minmax(150px,1fr)_minmax(0,1.4fr)_auto] items-baseline gap-3 border-t border-[#f7f7f8] px-[15px] py-2.5 ${n?"bg-[#fef6f6]":""}`,children:[(0,De.jsx)("span",{className:"font-mono text-[10.5px]",children:t.situation}),n!==void 0?(0,De.jsxs)("span",{className:"font-mono text-[10.5px] text-destructive",children:[n.data.message," ",(0,De.jsx)("span",{className:"text-zinc-400",children:n.data.fix})]}):(0,De.jsx)("span",{className:"font-mono text-[10.5px] text-zinc-400",children:i===void 0||!o.endsWith(i)?o:(0,De.jsxs)(De.Fragment,{children:[o.slice(0,-i.length),a?(0,De.jsx)("button",{className:"cursor-pointer text-[#1d4ed8] underline underline-offset-2",onClick:()=>r(i),children:i}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("span",{className:"underline decoration-dotted underline-offset-2",children:i})," ",(0,De.jsx)(pi,{className:"rounded-[5px] bg-zinc-100 px-1.5 py-0 font-sans text-[10px] font-normal text-zinc-500",children:"not in the charter"})]})]})}),(0,De.jsx)(pi,{className:`rounded-[5px] px-[7px] py-0 text-[11.5px] font-bold tracking-[0.04em] [font-variant-caps:all-small-caps] ${e===void 0?"bg-zinc-50 text-[#c4c4c8]":e.data.passed?"bg-[#f0fdf4] text-[#15803d]":"bg-[#fdeef0] text-[#b91c1c]"}`,children:e===void 0?"not run":e.data.passed?"pass":"fail"})]})}var Zt=L(G(),1);function Gz(){let{open:t}=fo(),e=IA(),a=ii(),r=QA();if(e.data===void 0)return null;let n=e.data,i=a.data?.type==="Primitives"?a.data.data.primitives.filter(({data:s})=>s.layerName==="vendor"):[],o=async s=>{let l=await r.mutateAsync(s.split("/").at(-1)??"");if(l!==null)return void ll.error(l.data.message,{description:l.data.fix});ll("Vendor source removed",{description:`${s} \xB7 run Build to compile the charter without it`})};return n.length===0?(0,Zt.jsxs)("div",{className:"flex items-center gap-[9px] rounded-xl border border-dashed px-[15px] py-3.5","aria-label":"Vendor sources",children:[(0,Zt.jsx)("span",{className:"text-xs font-semibold",children:"No vendor source installed"}),(0,Zt.jsx)(Ae,{size:"sm",className:"ml-auto",onClick:()=>t("addVendor",{}),children:"Add vendor source"})]}):(0,Zt.jsxs)("section",{className:"divide-y divide-[#f0f0f0] overflow-hidden rounded-[13px] border bg-background","aria-label":"Vendor sources",children:[(0,Zt.jsx)("h2",{className:"px-3.5 py-[11px] text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:"Vendor sources"}),n.map(s=>{let l=i.filter(({data:c})=>c.file.startsWith(`${s}/`)),u=[...new Set(l.map(({data:c})=>c.kind))].map(c=>[c,l.filter(({data:f})=>f.kind===c).length]);return(0,Zt.jsxs)("div",{className:"flex flex-col gap-2.5 bg-[#f6f2ff] px-3.5 py-3","aria-label":s,children:[(0,Zt.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,Zt.jsx)("div",{className:"text-[12.5px] font-semibold",children:s.split("/").at(-1)}),(0,Zt.jsxs)("div",{className:"text-[11px] text-zinc-500",children:[(0,Zt.jsxs)("span",{className:"font-mono",children:[s,"/"]})," \xB7 read-only"]})]}),(0,Zt.jsx)("dl",{className:"grid grid-cols-[1fr_auto] gap-x-2 gap-y-1.5 text-[11.5px] text-zinc-500","aria-label":"Primitives by kind",children:u.map(([c,f])=>(0,Zt.jsxs)("div",{className:"contents",children:[(0,Zt.jsx)("dt",{children:c}),(0,Zt.jsx)("dd",{className:"font-mono text-[10.5px] text-zinc-400",children:f})]},c))}),(0,Zt.jsx)(Ae,{size:"sm",variant:"outline",className:"self-start",disabled:r.isPending,onClick:()=>{o(s)},children:"Remove"})]},s)}),(0,Zt.jsx)("div",{className:"px-3.5 py-[11px]",children:(0,Zt.jsx)(Ae,{size:"sm",variant:"outline",onClick:()=>t("addVendor",{}),children:"Add source"})})]})}var nu=L(G(),1),Yz=({...t})=>(0,nu.jsx)(XA,{theme:"light",className:"toaster group",icons:{success:(0,nu.jsx)(Ho,{className:"size-4"}),info:(0,nu.jsx)(Cd,{className:"size-4"}),warning:(0,nu.jsx)(Wo,{className:"size-4"}),error:(0,nu.jsx)(Yo,{className:"size-4"}),loading:(0,nu.jsx)(Go,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...t});var Ge=L(G(),1),$W=[["repo","Repo Charter"],["vendor","Vendor"],["test","Test"]],XC="rounded-2xl border bg-background px-[22px] py-5";function BW(){let[t,e]=(0,Zh.useState)("repo"),[a,r]=(0,Zh.useState)(null),{open:n}=fo();return(0,Ge.jsxs)(Ge.Fragment,{children:[(0,Ge.jsxs)("header",{className:"sticky top-0 z-20 flex h-14 items-center gap-3 border-b bg-background px-[26px]",children:[(0,Ge.jsxs)("span",{className:"flex items-center gap-[9px] text-[13.5px] font-bold tracking-[-0.01em]",children:[(0,Ge.jsx)("img",{src:"./logo.png",alt:"",className:"size-[22px] object-contain"}),"Cherry Works"]}),(0,Ge.jsx)("span",{className:"font-mono text-[11.5px] text-zinc-400"}),(0,Ge.jsx)("div",{className:"ml-auto flex w-full max-w-[460px]",children:(0,Ge.jsx)(jz,{onPick:({data:{identity:i,kind:o,layerName:s}})=>{e(s==="vendor"?"vendor":"repo"),r(o),n("primitive",{identity:i})}})}),(0,Ge.jsx)(Ae,{variant:"outline",onClick:()=>n("buildPreview",{}),children:"Build"}),(0,Ge.jsx)(Ae,{variant:"outline",onClick:()=>n("doctor",{}),children:"Doctor"})]}),(0,Ge.jsx)("main",{className:"mx-auto max-w-[1120px] px-[26px] pt-[22px] pb-[60px]",children:(0,Ge.jsxs)(l0,{value:t,onValueChange:i=>{e(i),r(null)},children:[(0,Ge.jsx)(u0,{className:"mb-4 h-auto w-full gap-1 rounded-[11px] bg-[#e9e9ec] p-1",children:$W.map(([i,o])=>(0,Ge.jsx)(_h,{value:i,className:"h-auto rounded-lg py-[9px] text-[12.5px] font-semibold text-zinc-500 data-[state=active]:shadow-[0_1px_3px_rgba(0,0,0,0.09)]",children:o},i))}),(0,Ge.jsx)(Jl,{value:"repo",className:XC,children:(0,Ge.jsx)(MC,{layerNames:["repo","builtin"],kind:a,onKindChange:r})}),(0,Ge.jsxs)(Jl,{value:"vendor",className:`${XC} grid items-start gap-4 md:has-[>section]:grid-cols-[210px_minmax(0,1fr)]`,children:[(0,Ge.jsx)(Gz,{}),(0,Ge.jsx)(MC,{layerNames:["vendor"],kind:a,onKindChange:r})]}),(0,Ge.jsx)(Jl,{value:"test",className:XC,children:(0,Ge.jsx)(Hz,{})})]})}),(0,Ge.jsx)(Yz,{})]})}var _W=new Db;(0,Wz.createRoot)(document.getElementById("root")).render((0,Ge.jsx)(Zh.StrictMode,{children:(0,Ge.jsx)(Cb,{client:_W,children:(0,Ge.jsx)(Sz,{children:(0,Ge.jsx)(BW,{})})})}));
139
+ Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Tr(a.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(a);throw a}}},Wl=new SC;function it(t,e){return Wl.parse(t,e)}it.options=it.setOptions=function(t){return Wl.setOptions(t),it.defaults=Wl.defaults,K5(it.defaults),it};it.getDefaults=pC;it.defaults=Kl;function G8(...t){return Wl.use(...t),it.defaults=Wl.defaults,K5(it.defaults),it}it.use=G8;it.walkTokens=function(t,e){return Wl.walkTokens(t,e)};it.parseInline=Wl.parseInline;it.Parser=Bn;it.parser=Bn.parse;it.Renderer=s0;it.TextRenderer=vC;it.Lexer=$n;it.lexer=$n.lex;it.Tokenizer=o0;it.Hooks=Eh;it.parse=it;var Qse=it.options,Mse=it.setOptions,Ese=it.walkTokens,Dse=it.parseInline;var $se=Bn.parse,Bse=$n.lex;var Vse=L(F(),1);var zh=L(G(),1);function l0({className:t,orientation:e="horizontal",...a}){return(0,zh.jsx)(Cl.Root,{"data-slot":"tabs","data-orientation":e,orientation:e,className:pe("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",t),...a})}var Y8=si("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function u0({className:t,variant:e="default",...a}){return(0,zh.jsx)(Cl.List,{"data-slot":"tabs-list","data-variant":e,className:pe(Y8({variant:e}),t),...a})}function _h({className:t,...e}){return(0,zh.jsx)(Cl.Trigger,{"data-slot":"tabs-trigger",className:pe("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",t),...e})}function Jl({className:t,...e}){return(0,zh.jsx)(Cl.Content,{"data-slot":"tabs-content",className:pe("flex-1 outline-none",t),...e})}var or=L(G(),1),W8=new SC({renderer:{html:({text:t})=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},walkTokens:t=>{(t.type==="link"||t.type==="image")&&/^\s*(javascript|vbscript|data):/i.test(t.href)&&(t.href="#")}}),sz="h-auto flex-none cursor-pointer rounded-md px-[11px] py-[5px] text-[11.5px] font-semibold text-zinc-500 data-[state=active]:shadow-[0_1px_2px_rgba(0,0,0,0.08)]";function wC({body:t,onChange:e}){return(0,or.jsxs)(l0,{defaultValue:e===void 0?"preview":"source",className:"gap-0 overflow-hidden rounded-xl border bg-background",children:[(0,or.jsxs)("div",{className:"flex items-center gap-2.5 border-b border-[#f0f0f0] px-[13px] py-[9px]",children:[(0,or.jsx)("span",{className:"text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:"Body"}),(0,or.jsx)("span",{className:"font-mono text-[10.5px] text-zinc-400",children:"markdown"}),(0,or.jsxs)(u0,{className:"ml-auto h-auto gap-0.5 rounded-lg bg-[#f0f0f2] p-[3px]",children:[(0,or.jsx)(_h,{value:"source",className:sz,children:"Source"}),(0,or.jsx)(_h,{value:"preview",className:sz,children:"Preview"})]})]}),(0,or.jsx)(Jl,{value:"source",className:"h-[300px] flex-none",children:(0,or.jsx)(K8,{body:t,onChange:e})}),(0,or.jsx)(Jl,{value:"preview",children:(0,or.jsx)("div",{className:"min-h-32 px-[18px] py-4 text-[12.5px] leading-[1.65] text-zinc-700 [&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:font-mono [&_code]:text-xs [&_h1]:mb-[7px] [&_h1]:text-[15px] [&_h1]:font-bold [&_h1]:text-foreground [&_h2]:mt-4 [&_h2]:mb-[7px] [&_h2]:text-[13px] [&_h2]:font-bold [&_h2]:text-foreground [&_strong]:font-semibold [&_strong]:text-foreground [&_li]:ml-5 [&_ol]:list-decimal [&_p]:mb-2 [&_ul]:list-disc",dangerouslySetInnerHTML:{__html:W8.parse(t,{async:!1})}})})]})}function K8({body:t,onChange:e}){let a=(0,lz.useCallback)(r=>{let n=new oe({parent:r,doc:t,extensions:[q5(),j$(F$),iB(),zl.of([...DB,...uB]),oe.lineWrapping,oe.editable.of(e!==void 0),oe.updateListener.of(i=>{i.docChanged&&e?.(i.state.doc.toString())})]});return()=>n.destroy()},[]);return(0,or.jsx)("div",{className:"h-full",ref:a})}var ale=L(F(),1);var uz=L(G(),1);function eu({className:t,type:e,...a}){return(0,uz.jsx)("input",{type:e,"data-slot":"input",className:pe("h-[30px] w-full min-w-0 rounded-lg border border-input bg-background px-[11px] py-1 font-mono text-[11.5px] text-foreground transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30","focus-visible:border-[#d92f45]","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...a})}var ile=L(F(),1);var cz=L(G(),1);function Nh({className:t,...e}){return(0,cz.jsx)(Eg.Root,{"data-slot":"label",className:pe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}var ule=L(F(),1);var Rt=L(G(),1);function CC({...t}){return(0,Rt.jsx)(Ea.Root,{"data-slot":"select",...t})}function kC({...t}){return(0,Rt.jsx)(Ea.Value,{"data-slot":"select-value",...t})}function LC({className:t,size:e="default",children:a,...r}){return(0,Rt.jsxs)(Ea.Trigger,{"data-slot":"select-trigger","data-size":e,className:pe("flex w-fit cursor-pointer items-center justify-between gap-2 rounded-lg border border-input bg-background px-[11px] py-1 font-mono text-[11.5px] whitespace-nowrap text-foreground transition-[color,box-shadow] outline-none focus-visible:border-[#d92f45] disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-[30px] data-[size=sm]:h-7 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...r,children:[a,(0,Rt.jsx)(Ea.Icon,{asChild:!0,children:(0,Rt.jsx)(Oc,{className:"size-4 opacity-50"})})]})}function TC({className:t,children:e,position:a="item-aligned",align:r="center",...n}){return(0,Rt.jsx)(Ea.Portal,{children:(0,Rt.jsxs)(Ea.Content,{"data-slot":"select-content",className:pe("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,align:r,...n,children:[(0,Rt.jsx)(J8,{}),(0,Rt.jsx)(Ea.Viewport,{className:pe("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:e}),(0,Rt.jsx)(eW,{})]})})}function PC({className:t,children:e,...a}){return(0,Rt.jsxs)(Ea.Item,{"data-slot":"select-item",className:pe("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...a,children:[(0,Rt.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,Rt.jsx)(Ea.ItemIndicator,{children:(0,Rt.jsx)(Sd,{className:"size-4"})})}),(0,Rt.jsx)(Ea.ItemText,{children:e})]})}function J8({className:t,...e}){return(0,Rt.jsx)(Ea.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:pe("flex cursor-default items-center justify-center py-1",t),...e,children:(0,Rt.jsx)(wd,{className:"size-4"})})}function eW({className:t,...e}){return(0,Rt.jsx)(Ea.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:pe("flex cursor-default items-center justify-center py-1",t),...e,children:(0,Rt.jsx)(Oc,{className:"size-4"})})}var K=L(G(),1);function RC({id:t,newKind:e,onDone:a,onClose:r}){let{data:n}=wA(t);if(t===void 0)return(0,K.jsx)(fz,{openedPrimitive:null,entityTag:"",newKind:e??"",onDone:a,onClose:r});if(n===void 0)return null;let{answer:i,entityTag:o}=n;return i.type==="Fault"?(0,K.jsx)(hz,{faults:[i]}):i.data.layerName!=="repo"?(0,K.jsx)(tW,{openedPrimitive:i}):(0,K.jsx)(fz,{openedPrimitive:i,entityTag:o,newKind:"",onDone:a,onClose:r})}function fz({openedPrimitive:t,entityTag:e,newKind:a,onDone:r,onClose:n}){let i=t?.data,[o,s]=(0,ff.useState)(i?.kind??a),[l,u]=(0,ff.useState)(i===void 0?"":String(i.headers.id)),[c,f]=(0,ff.useState)(()=>Object.fromEntries(Object.entries(i?.headers??{}).filter(([R])=>R!=="id").map(([R,D])=>[R,typeof D=="string"?D:[...D]]))),[d,h]=(0,ff.useState)(t?.data.body??""),[p,m]=(0,ff.useState)([]),{data:x}=xc(),{data:g}=CA(o),{data:O}=ii(),y=kA(),b=LA(),v=TA(),S=x===void 0?[]:Object.keys(x.data),w=g?.type==="PrimitiveRequirements"?g.data.headers:[],k=O?.type==="Primitives"?O.data.primitives.filter(({data:R})=>R.kind==="corpus").map(({data:R})=>R.id):[],T=Object.fromEntries(w.flatMap(({data:{field:R}})=>{let D=c[R],Y=typeof D=="string"?D.trim():(D??[]).map(B=>B.trim()).filter(B=>B!=="");return Y.length===0?[]:[[R,Y]]})),Q=R=>m(R.type==="Faults"?R.data.faults:[R]),$=async()=>{let R=t===null?await y.mutateAsync({kind:o,id:l,headers:T,body:d}):await b.mutateAsync({param:{id:t.data.id},header:{"if-match":e},json:{headers:T,body:d}});if(R.type!=="Primitive")return Q(R);let{file:D,headers:Y}=R.data;r(t===null?"Primitive created":"Primitive saved",`${D} \xB7 ${t===null&&typeof Y.executionPath=="string"?`${Y.executionPath} beside it is the file it runs, write the script there \xB7 `:""}nothing compiled until the next build`)},A=async()=>{if(t===null)return;let R=await v.mutateAsync(t.data.id);if(R!==null)return Q(R);r("Primitive deleted",`${t.data.file} \xB7 what still names it is reported by Doctor`)};return(0,K.jsxs)("div",{className:"space-y-3.5",children:[(0,K.jsxs)("div",{className:dz,children:[t===null?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(co,{label:"kind",htmlFor:"primitive-kind",children:(0,K.jsxs)(CC,{value:o,onValueChange:s,children:[(0,K.jsx)(LC,{id:"primitive-kind",className:"w-full",children:(0,K.jsx)(kC,{})}),(0,K.jsx)(TC,{children:S.map(R=>(0,K.jsx)(PC,{value:R,children:R},R))})]})}),(0,K.jsx)(co,{label:"id",htmlFor:"primitive-id",children:(0,K.jsx)(eu,{id:"primitive-id",value:l,placeholder:"no-any",spellCheck:!1,onChange:R=>u(R.currentTarget.value)})})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(co,{label:"kind",hint:"the id is the file \u2014 rename by creating a new primitive and deleting this one",children:(0,K.jsx)("span",{className:"font-mono text-[11.5px]",children:o})}),(0,K.jsx)(co,{label:"id",children:(0,K.jsx)("span",{className:"font-mono text-[11.5px]",children:l})})]}),w.map(({data:{field:R,shape:D,required:Y,allowedValues:B}})=>(0,K.jsx)(co,{label:R,htmlFor:`header-${R}`,hint:Y?"required":void 0,children:D==="list"?(0,K.jsx)(aW,{field:R,entries:Array.isArray(c[R])?c[R]:[],onChange:q=>f({...c,[R]:q})}):B!==void 0?(0,K.jsxs)(CC,{value:typeof c[R]=="string"?c[R]:"",onValueChange:q=>f({...c,[R]:q}),children:[(0,K.jsx)(LC,{id:`header-${R}`,className:"w-full",children:(0,K.jsx)(kC,{placeholder:"\u2014"})}),(0,K.jsx)(TC,{children:B.map(q=>(0,K.jsx)(PC,{value:q,children:q},q))})]}):(0,K.jsx)(eu,{id:`header-${R}`,spellCheck:!1,autoComplete:"off",value:typeof c[R]=="string"?c[R]:"",list:R==="rationale"?"corpus-ids":void 0,onChange:q=>f({...c,[R]:q.currentTarget.value})})},R))]}),(0,K.jsx)("datalist",{id:"corpus-ids",children:k.map(R=>(0,K.jsx)("option",{value:R},R))}),(0,K.jsx)(wC,{body:d,onChange:h}),p.length>0&&(0,K.jsx)(hz,{faults:p}),(0,K.jsxs)("div",{className:ui,children:[(0,K.jsx)(Ae,{onClick:()=>{$()},children:t===null?"Create primitive":"Save"}),(0,K.jsx)(Ae,{variant:"outline",onClick:n,children:"Cancel"}),t!==null&&(0,K.jsx)(Ae,{variant:"destructive",className:"ml-auto",onClick:()=>{A()},children:"Delete"})]})]})}function tW({openedPrimitive:t}){let{kind:e,description:a,file:r,layerName:n,headers:i}=t.data;return(0,K.jsxs)("div",{className:"space-y-3.5",children:[(0,K.jsxs)(Ur,{className:"rounded-xl border-[#7c3aed33] bg-[#f6f2ff]",children:[(0,K.jsx)(jr,{className:"text-[12.5px] font-bold",children:n==="vendor"?"Installed from a vendor, and read-only here.":"Built into cw, and read-only here."}),(0,K.jsx)(Fr,{className:"text-[11.5px] text-zinc-600",children:"To differ from it, author a primitive of your own under an id of its own."})]}),(0,K.jsxs)("div",{className:dz,children:[(0,K.jsx)(co,{label:"kind",children:(0,K.jsx)("span",{className:"font-mono text-[11.5px]",children:e})}),(0,K.jsx)(co,{label:"file",children:(0,K.jsx)("span",{className:"font-mono text-[11.5px]",children:r})}),(0,K.jsx)(co,{label:"description",children:(0,K.jsx)("span",{className:"text-xs",children:a})}),Object.entries(i).filter(([o])=>o!=="id"&&o!=="description").map(([o,s])=>(0,K.jsx)(co,{label:o,children:(0,K.jsx)("span",{className:"font-mono text-[11.5px]",children:typeof s=="string"?s:s.join(", ")})},o))]}),(0,K.jsx)(wC,{body:t.data.body})]})}var dz="overflow-hidden rounded-[11px] border border-[#f0f0f0] bg-background divide-y divide-zinc-100";function co({label:t,htmlFor:e,hint:a,children:r}){return(0,K.jsxs)("div",{className:"flex items-center gap-3 px-[13px] py-2.5",children:[(0,K.jsx)(Nh,{htmlFor:e,className:"w-[118px] shrink-0 text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:t}),(0,K.jsx)("div",{className:"min-w-0 flex-1",children:r}),a!==void 0&&(0,K.jsx)("span",{className:"max-w-[45%] shrink text-right text-[11.5px] text-zinc-400",children:a})]})}function aW({field:t,entries:e,onChange:a}){let r=e.length===0?[""]:e;return(0,K.jsxs)("div",{className:"flex flex-col gap-1.5",children:[r.map((n,i)=>(0,K.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,K.jsx)(eu,{id:i===0?`header-${t}`:void 0,"aria-label":`${t} ${i+1}`,spellCheck:!1,value:n,onChange:o=>a(r.map((s,l)=>l===i?o.currentTarget.value:s))}),r.length>1&&(0,K.jsx)(Ae,{variant:"outline",size:"icon",className:"size-[26px] shrink-0 rounded-[7px] text-zinc-400 [&_svg:not([class*='size-'])]:size-[11px]","aria-label":`Remove this ${t} entry`,onClick:()=>a(r.filter((o,s)=>s!==i)),children:(0,K.jsx)(sl,{})})]},i)),(0,K.jsxs)(Ae,{variant:"outline",size:"sm",className:"h-auto self-start rounded-[7px] border-dashed border-zinc-300 px-2.5 py-[5px] text-[11px] font-normal text-zinc-500",onClick:()=>a([...r,""]),children:["Add ",t]})]})}function hz({faults:t}){return(0,K.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,K.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:"Refused, and nothing was written"}),(0,K.jsx)(Fr,{children:t.map(({data:{message:e,fix:a}})=>(0,K.jsxs)("p",{className:"whitespace-pre-line",children:[e," ",(0,K.jsx)("span",{className:"text-muted-foreground",children:a})]},e))})]})}var c0=L(F(),1);var pt=L(G(),1);function pz({onDone:t,onClose:e}){let[a,r]=(0,c0.useState)(""),[n,i]=(0,c0.useState)(""),[o,s]=(0,c0.useState)(null),l=xc(),u=AA(),c=async()=>{let f=n.trim(),d=await u.mutateAsync({source:a.trim(),...f===""?{}:{version:f}});if(d!==null)return s(d);t("Vendor source added",`${a.trim()}${f===""?"":` @ ${f}`} \xB7 run Build to compile what it adds`)};return(0,pt.jsxs)("div",{className:"space-y-3.5",children:[(0,pt.jsx)("p",{className:"text-[13px] leading-[1.65] text-zinc-700",children:"A vendor source is a repository governed by cw: only its charter, under .cw/charter/, is installed."}),(0,pt.jsxs)("div",{className:"divide-y divide-zinc-100 overflow-hidden rounded-[11px] border border-[#f0f0f0]",children:[(0,pt.jsxs)("div",{className:"flex items-center gap-3 px-[13px] py-2.5",children:[(0,pt.jsx)(Nh,{htmlFor:"vendor-source",className:"w-[118px] shrink-0 text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:"source"}),(0,pt.jsx)(eu,{id:"vendor-source",value:a,spellCheck:!1,onChange:f=>r(f.target.value)})]}),(0,pt.jsxs)("div",{className:"flex items-center gap-3 px-[13px] py-2.5",children:[(0,pt.jsx)(Nh,{htmlFor:"vendor-version",className:"w-[118px] shrink-0 text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:"version"}),(0,pt.jsx)(eu,{id:"vendor-version",value:n,spellCheck:!1,onChange:f=>i(f.target.value)}),(0,pt.jsx)("span",{className:"max-w-[45%] shrink text-right text-[11.5px] text-zinc-400",children:"a tag, branch or commit; left empty, the source's default"})]})]}),(0,pt.jsxs)("div",{className:"rounded-[11px] border bg-zinc-50 px-3.5 py-3","aria-label":"Reserved directories",children:[(0,pt.jsx)("div",{className:"mb-1 text-[11px] font-bold tracking-[0.07em] text-zinc-400 uppercase",children:"Directories under its .cw/charter/"}),Object.entries(l.data?.data??{}).map(([f,d])=>(0,pt.jsxs)("div",{className:"flex items-baseline gap-[9px] border-t border-zinc-100 py-[7px]",children:[(0,pt.jsxs)("span",{className:"min-w-[150px] font-mono text-[11.5px]",children:[f,"/"]}),(0,pt.jsx)("span",{className:"text-[11.5px] text-zinc-500",children:d})]},f))]}),o!==null&&(0,pt.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,pt.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:"Refused, and nothing was installed"}),(0,pt.jsx)(Fr,{children:(0,pt.jsxs)("p",{className:"whitespace-pre-line",children:[o.data.message," ",(0,pt.jsx)("span",{className:"text-muted-foreground",children:o.data.fix})]})})]}),(0,pt.jsxs)("div",{className:ui,children:[(0,pt.jsx)(Ae,{disabled:u.isPending||a.trim()==="",onClick:()=>{c()},children:"Add source"}),(0,pt.jsx)(Ae,{variant:"outline",onClick:e,children:"Cancel"})]})]})}var IC=L(F(),1);var It=L(G(),1);function mz({name:t,onDone:e,onClose:a}){let n=Fm().data?.data.testSuites.find(({data:i})=>i.name===t);return n===void 0?null:(0,It.jsx)(rW,{name:t,initialText:n.data.text??"",onDone:e,onClose:a},t)}function rW({name:t,initialText:e,onDone:a,onClose:r}){let[n,i]=(0,IC.useState)(e),[o,s]=(0,IC.useState)(null),l=DA(),u=$A(),c=async()=>{let d=await l.mutateAsync({name:t,text:n});if(typeof d!="string")return s(d);a("Saved",`.cw/test/${t} rewritten \xB7 run the cases again`)},f=async()=>{let d=await u.mutateAsync(t);if(d!==null)return s(d);a("Test file deleted",`.cw/test/${t} removed`)};return(0,It.jsxs)("div",{className:"space-y-3",children:[(0,It.jsxs)("p",{className:"text-xs leading-[1.65] text-zinc-600 [&_code]:font-mono",children:["A case is one situation \u2014 a touched file (",(0,It.jsx)("code",{children:"do.touchFile"}),") or a raised event (",(0,It.jsx)("code",{children:"when"}),") \u2014 and expects one thing:"," ",(0,It.jsx)("code",{children:"activate"}),", ",(0,It.jsx)("code",{children:"run"})," or ",(0,It.jsx)("code",{children:"allow"}),"."]}),(0,It.jsx)("textarea",{"aria-label":"Test file text",className:"h-[340px] w-full resize-y rounded-[11px] border bg-zinc-50 px-3.5 py-3 font-mono text-[11.5px] leading-[1.65] outline-none",spellCheck:!1,value:n,onChange:d=>i(d.target.value)}),o!==null&&(0,It.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,It.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:"Refused, and nothing was written"}),(0,It.jsx)(Fr,{children:(0,It.jsxs)("p",{className:"break-words whitespace-pre-line",children:[o.data.message," ",(0,It.jsx)("span",{className:"text-muted-foreground",children:o.data.fix})]})})]}),(0,It.jsx)("p",{className:"text-[11.5px] leading-[1.6] text-zinc-400",children:"Read only when tests run \u2014 never compiled, never read by an agent."}),(0,It.jsxs)("div",{className:ui,children:[(0,It.jsx)(Ae,{disabled:l.isPending,onClick:()=>{c()},children:"Save"}),(0,It.jsx)(Ae,{variant:"outline",onClick:r,children:"Cancel"}),(0,It.jsx)(Ae,{variant:"destructive",className:"ml-auto",disabled:u.isPending,onClick:()=>{f()},children:"Delete file"})]})]})}var $le=L(F(),1);var sr=L(G(),1);function gz({...t}){return(0,sr.jsx)(xn.Root,{"data-slot":"dialog",...t})}function nW({...t}){return(0,sr.jsx)(xn.Portal,{"data-slot":"dialog-portal",...t})}function iW({className:t,...e}){return(0,sr.jsx)(xn.Overlay,{"data-slot":"dialog-overlay",className:pe("fixed inset-0 z-50 bg-[rgba(9,9,11,0.35)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",t),...e})}function Oz({className:t,children:e,showCloseButton:a=!0,...r}){return(0,sr.jsxs)(nW,{"data-slot":"dialog-portal",children:[(0,sr.jsx)(iW,{}),(0,sr.jsxs)(xn.Content,{"data-slot":"dialog-content",className:pe("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",t),...r,children:[e,a&&(0,sr.jsxs)(xn.Close,{"data-slot":"dialog-close",className:"absolute top-4 right-[18px] cursor-pointer rounded-xs p-0.5 text-zinc-400 ring-offset-background transition-colors hover:text-foreground focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,sr.jsx)(sl,{}),(0,sr.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function xz({className:t,...e}){return(0,sr.jsx)("div",{"data-slot":"dialog-header",className:pe("flex flex-col gap-2 text-center sm:text-left",t),...e})}function yz({className:t,...e}){return(0,sr.jsx)(xn.Title,{"data-slot":"dialog-title",className:pe("text-lg leading-none font-semibold",t),...e})}function bz({className:t,...e}){return(0,sr.jsx)(xn.Description,{"data-slot":"dialog-description",className:pe("text-sm text-muted-foreground",t),...e})}var pa=L(G(),1),oW={explanation:{title:()=>"Explain",context:({id:t})=>t,holdsDraft:!1,render:({id:t},{open:e})=>(0,pa.jsx)(TE,{id:t,onExplain:a=>e("explanation",{id:a})},t)},primitive:{title:({id:t})=>t,context:()=>"",holdsDraft:!0,render:({id:t},{close:e})=>(0,pa.jsx)(RC,{id:t,onDone:f0(e),onClose:e},t)},newPrimitive:{title:()=>"New primitive",context:()=>"",holdsDraft:!0,render:({kind:t},{close:e})=>(0,pa.jsx)(RC,{newKind:t,onDone:f0(e),onClose:e},`new ${t}`)},buildPreview:{title:()=>"cw build",context:()=>"nothing written yet",holdsDraft:!1,render:(t,{open:e})=>(0,pa.jsx)(SE,{onBuilt:a=>e("buildOutcome",{buildAnswer:a})})},buildOutcome:{title:()=>"cw build",context:()=>"",holdsDraft:!1,render:({buildAnswer:t})=>(0,pa.jsx)(wE,{buildAnswer:t})},addVendor:{title:()=>"Add vendor source",context:()=>"",holdsDraft:!0,render:(t,{close:e})=>(0,pa.jsx)(pz,{onDone:f0(e),onClose:e})},testSuite:{title:({name:t})=>`.cw/test/${t}`,context:()=>"",holdsDraft:!0,render:({name:t},{close:e})=>(0,pa.jsx)(mz,{name:t,onDone:f0(e),onClose:e},t)},doctor:{title:()=>"Doctor",context:()=>"cw 0.5.0",holdsDraft:!1,render:(t,{open:e})=>(0,pa.jsx)(LE,{onBuilt:a=>e("buildOutcome",{buildAnswer:a})})}};function f0(t){return(e,a)=>{t(),ll(e,{description:a})}}var vz=(0,tu.createContext)(null);function fo(){return(0,tu.useContext)(vz)}function Sz({children:t}){let[e,a]=(0,tu.useState)(null),[r,n]=(0,tu.useState)(!1),i={open:(s,l)=>{a({name:s,params:l}),n(!0)},close:()=>n(!1)},o=e===null?null:oW[e.name];return(0,pa.jsxs)(vz.Provider,{value:i,children:[t,(0,pa.jsx)(gz,{open:r,onOpenChange:n,children:e!==null&&o!==null&&(0,pa.jsxs)(Oz,{className:"flex max-h-[88vh] w-[920px] max-w-[calc(100%-48px)] flex-col gap-0 overflow-hidden rounded-[15px] border-0 p-0 shadow-[0_34px_80px_-22px_rgba(0,0,0,0.4)] sm:max-w-[calc(100%-48px)]",onInteractOutside:s=>o.holdsDraft&&s.preventDefault(),onEscapeKeyDown:s=>o.holdsDraft&&s.preventDefault(),children:[(0,pa.jsxs)(xz,{className:"flex-row items-baseline gap-2.5 border-b border-[#f0f0f0] py-[15px] pr-12 pl-[18px]",children:[(0,pa.jsx)(yz,{className:"text-[14.5px] font-bold tracking-[-0.01em]",children:o.title(e.params)}),(0,pa.jsx)(bz,{className:"font-mono text-[11px] text-zinc-400",children:o.context(e.params)})]}),(0,pa.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-[18px]",children:o.render(e.params,i)})]})})]})}var h0=L(F(),1);var Wle=L(F(),1);var sW=L(G(),1),wz=si("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 min-w-9 px-2",sm:"h-8 min-w-8 px-1.5",lg:"h-10 min-w-10 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});var d0=L(G(),1),Cz=h0.createContext({size:"default",variant:"default",spacing:0});function kz({className:t,variant:e,size:a,spacing:r=0,children:n,...i}){return(0,d0.jsx)(Xd.Root,{"data-slot":"toggle-group","data-variant":e,"data-size":a,"data-spacing":r,style:{"--gap":r},className:pe("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",t),...i,children:(0,d0.jsx)(Cz.Provider,{value:{variant:e,size:a,spacing:r},children:n})})}function Lz({className:t,children:e,variant:a,size:r,...n}){let i=h0.useContext(Cz);return(0,d0.jsx)(Xd.Item,{"data-slot":"toggle-group-item","data-variant":i.variant||a,"data-size":i.size||r,"data-spacing":i.spacing,className:pe(wz({variant:i.variant||a,size:i.size||r}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",t),...n,children:e})}var se=L(G(),1);function MC({layerNames:t,kind:e,onKindChange:a}){let{open:r}=fo(),n=xc(),i=ii();if(n.data===void 0||i.data===void 0)return null;let o=n.data.data,s=i.data;if(s.type==="FaultsByFile")return(0,se.jsx)(lW,{faultsByFile:s});if(s.type==="Fault")return(0,se.jsx)(uW,{fault:s});let l=s.data.primitives.filter(({data:d})=>t.includes(d.layerName)),u=new Map(Object.keys(o).map(d=>[d,l.filter(({data:h})=>h.kind===d).length])),c=e??[...u].find(([,d])=>d>0)?.[0]??Object.keys(o)[0],f=l.filter(({data:d})=>d.kind===c);return(0,se.jsxs)("div",{className:"min-w-0",children:[(0,se.jsxs)("div",{className:"mb-3 flex items-baseline gap-[9px]",children:[(0,se.jsx)("h2",{className:"text-[12.5px] font-bold",children:"Charter primitives"}),(0,se.jsxs)("span",{className:"text-[11.5px] text-zinc-400",children:[l.length," in this charter"]}),t.includes("repo")&&(0,se.jsxs)(Ae,{size:"sm",variant:"outline",className:"ml-auto",onClick:()=>r("newPrimitive",{kind:c}),children:["New ",c]})]}),(0,se.jsx)(kz,{type:"single",spacing:1.5,"aria-label":"Kinds",className:"mb-3 flex-wrap",value:c,onValueChange:d=>d!==""&&a(d),children:[...u].map(([d,h])=>(0,se.jsxs)(Lz,{value:d,"aria-label":d,className:`group/chip h-auto cursor-pointer gap-1.5 rounded-[9px] border bg-background px-2.5 py-1.5 text-[11.5px] font-medium text-zinc-700 capitalize hover:bg-background hover:text-zinc-700 data-[state=on]:border-foreground data-[state=on]:bg-foreground data-[state=on]:font-semibold data-[state=on]:text-white ${h===0&&d!==c?"opacity-50":""}`,children:[d,(0,se.jsx)(pi,{className:"rounded-none bg-transparent p-0 font-mono text-[10px] font-normal text-zinc-400 group-data-[state=on]/chip:text-white/70",children:h})]},d))}),(0,se.jsxs)("p",{className:"mb-2.5 flex items-baseline gap-2 px-0.5",children:[(0,se.jsx)("span",{className:"shrink-0 text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:"Activates when"}),(0,se.jsx)("span",{className:"text-xs leading-normal text-zinc-700","aria-label":"Activates when",children:o[c]})]}),f.length===0?(0,se.jsxs)("p",{className:"rounded-[14px] border p-[22px] text-center text-[12.5px] text-zinc-400",children:["No ",c," in this charter yet."]}):(0,se.jsx)(cW,{kind:c,listed:f})]})}function lW({faultsByFile:t}){let e=Object.entries(t.data.files);return(0,se.jsxs)("div",{className:"space-y-3.5",children:[(0,se.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,se.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:"The engine will not read this charter"}),(0,se.jsxs)(Fr,{children:[e.length," file",e.length===1?" is":"s are"," refused, so there is no listing to show. Fix",e.length===1?" it":" them"," and the charter comes back."]})]}),(0,se.jsx)(cs,{faultsByFile:t,label:"Refused files"})]})}function uW({fault:t}){return(0,se.jsxs)(Ur,{variant:"destructive",className:"rounded-xl border-[#f6d9d9] bg-[#fef6f6]",children:[(0,se.jsx)(jr,{className:"text-[12.5px] font-bold text-foreground",children:t.data.message}),(0,se.jsx)(Fr,{children:t.data.fix})]})}function AC(t){return t===void 0?void 0:typeof t=="string"?[t]:t}function cW({kind:t,listed:e}){let{open:a}=fo(),r=t==="guide",n=t!=="mixin";return(0,se.jsx)("div",{className:"overflow-hidden rounded-[14px] border bg-background",children:(0,se.jsxs)(kl,{"aria-label":`${t} primitives`,className:"table-fixed",children:[(0,se.jsx)(bE,{children:(0,se.jsxs)(Tl,{className:"border-[#ececef] bg-zinc-50 hover:bg-zinc-50 [&>th]:h-auto [&>th]:px-[15px] [&>th]:py-[9px] [&>th]:text-[9.5px] [&>th]:font-bold [&>th]:tracking-[0.07em] [&>th]:text-zinc-400 [&>th]:uppercase",children:[(0,se.jsx)(Pl,{className:"w-[170px]",children:"Id"}),(0,se.jsx)(Pl,{children:"Description"}),r&&(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(Pl,{className:"w-[170px] text-right",children:"Matching globs"}),(0,se.jsx)(Pl,{className:"w-[120px] text-right",children:"Rationale"})]}),n&&(0,se.jsx)(Pl,{className:"w-[120px] text-right",children:"Mixins"}),(0,se.jsx)(Pl,{className:"w-[50px]"})]})}),(0,se.jsx)(Ll,{children:e.map(({data:{id:i,description:o,file:s,headers:l}})=>{let u=AC(l.globs);return(0,se.jsxs)(Tl,{className:"group/row border-[#f7f7f8] align-top hover:bg-zinc-50 [&>td]:px-[15px] [&>td]:py-3",children:[(0,se.jsx)(Cn,{className:"truncate",children:(0,se.jsx)(Ae,{variant:"link",className:"block h-auto max-w-full truncate rounded-none p-0 text-left font-mono text-[11.5px] font-bold text-foreground",title:`Open ${s}`,onClick:()=>a("primitive",{id:i}),children:String(l.id)})}),(0,se.jsxs)(Cn,{className:"whitespace-normal",children:[(0,se.jsx)("div",{className:"text-[12.5px] font-semibold",children:o}),(0,se.jsx)("div",{className:"mt-[3px] truncate font-mono text-[10.5px] text-zinc-400",children:s})]}),r&&(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(QC,{named:u,none:"all patterns",said:u===void 0,label:"Matching globs"}),(0,se.jsx)(QC,{named:AC(l.rationale),none:"none",said:!1,label:"Rationale"})]}),n&&(0,se.jsx)(QC,{named:AC(l.mixins),none:"none",said:!1,label:"Mixins"}),(0,se.jsx)(Cn,{children:(0,se.jsx)(Ae,{variant:"ghost",size:"icon",className:"ml-auto size-6 rounded-[7px] border border-transparent text-zinc-300 group-hover/row:border-zinc-200 group-hover/row:bg-background group-hover/row:text-zinc-400 hover:!border-foreground hover:bg-background hover:!text-foreground [&_svg:not([class*='size-'])]:size-[13px]","aria-label":`Explain ${i}`,onClick:()=>a("explanation",{id:i}),children:(0,se.jsx)(hn,{})})})]},i)})})]})})}function QC({named:t,none:e,said:a,label:r}){return(0,se.jsx)(Cn,{"aria-label":r,children:(0,se.jsx)("div",{className:"flex min-w-0 flex-wrap content-start justify-end gap-1",children:t===void 0||t.length===0?(0,se.jsx)("span",{className:`text-[10.5px] ${a?"text-destructive":"text-zinc-300"}`,children:e}):t.map(n=>(0,se.jsx)(pi,{title:n,className:"block max-w-full truncate rounded-[5px] bg-zinc-100 px-1.5 py-0.5 font-mono text-[10px] font-normal text-zinc-700",children:n},n))})})}var NC=L(F(),1);var Sue=L(F(),1);var Tz=1,fW=.9,dW=.8,hW=.17,EC=.1,DC=.999,pW=.9999,mW=.99,gW=/[\\\/_+.#"@\[\(\{&]/,OW=/[\\\/_+.#"@\[\(\{&]/g,xW=/[\s-]/,Rz=/[\s-]/g;function $C(t,e,a,r,n,i,o){if(i===e.length)return n===t.length?Tz:mW;var s=`${n},${i}`;if(o[s]!==void 0)return o[s];for(var l=r.charAt(i),u=a.indexOf(l,n),c=0,f,d,h,p;u>=0;)f=$C(t,e,a,r,u+1,i+1,o),f>c&&(u===n?f*=Tz:gW.test(t.charAt(u-1))?(f*=dW,h=t.slice(n,u-1).match(OW),h&&n>0&&(f*=Math.pow(DC,h.length))):xW.test(t.charAt(u-1))?(f*=fW,p=t.slice(n,u-1).match(Rz),p&&n>0&&(f*=Math.pow(DC,p.length))):(f*=hW,n>0&&(f*=Math.pow(DC,u-n))),t.charAt(u)!==e.charAt(i)&&(f*=pW)),(f<EC&&a.charAt(u-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&a.charAt(u-1)!==r.charAt(i))&&(d=$C(t,e,a,r,u+1,i+2,o),d*EC>f&&(f=d*EC)),f>c&&(c=f),u=a.indexOf(l,u+1);return o[s]=c,c}function Pz(t){return t.toLowerCase().replace(Rz," ")}function Iz(t,e,a){return t=a&&a.length>0?`${t+" "+a.join(" ")}`:t,$C(t,e,Pz(t),Pz(e),0,0,{})}var J=L(F(),1);var Xh='[cmdk-group=""]',BC='[cmdk-group-items=""]',yW='[cmdk-group-heading=""]',Qz='[cmdk-item=""]',Az=`${Qz}:not([aria-disabled="true"])`,_C="cmdk-item-select",df="data-value",bW=(t,e,a)=>Iz(t,e,a),Mz=J.createContext(void 0),qh=()=>J.useContext(Mz),Ez=J.createContext(void 0),zC=()=>J.useContext(Ez),Dz=J.createContext(void 0),$z=J.forwardRef((t,e)=>{let a=hf(()=>{var P,H;return{search:"",value:(H=(P=t.value)!=null?P:t.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=hf(()=>new Set),n=hf(()=>new Map),i=hf(()=>new Map),o=hf(()=>new Set),s=Bz(t),{label:l,children:u,value:c,onValueChange:f,filter:d,shouldFilter:h,loop:p,disablePointerSelection:m=!1,vimBindings:x=!0,...g}=t,O=Dt(),y=Dt(),b=Dt(),v=J.useRef(null),S=AW();au(()=>{if(c!==void 0){let P=c.trim();a.current.value=P,w.emit()}},[c]),au(()=>{S(6,R)},[]);let w=J.useMemo(()=>({subscribe:P=>(o.current.add(P),()=>o.current.delete(P)),snapshot:()=>a.current,setState:(P,H,N)=>{var M,j,de,ee;if(!Object.is(a.current[P],H)){if(a.current[P]=H,P==="search")A(),Q(),S(1,$);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Z=document.getElementById(b);Z?Z.focus():(M=document.getElementById(O))==null||M.focus()}if(S(7,()=>{var Z;a.current.selectedItemId=(Z=D())==null?void 0:Z.id,w.emit()}),N||S(5,R),((j=s.current)==null?void 0:j.value)!==void 0){let Z=H??"";(ee=(de=s.current).onValueChange)==null||ee.call(de,Z);return}}w.emit()}},emit:()=>{o.current.forEach(P=>P())}}),[]),k=J.useMemo(()=>({value:(P,H,N)=>{var M;H!==((M=i.current.get(P))==null?void 0:M.value)&&(i.current.set(P,{value:H,keywords:N}),a.current.filtered.items.set(P,T(H,N)),S(2,()=>{Q(),w.emit()}))},item:(P,H)=>(r.current.add(P),H&&(n.current.has(H)?n.current.get(H).add(P):n.current.set(H,new Set([P]))),S(3,()=>{A(),Q(),a.current.value||$(),w.emit()}),()=>{i.current.delete(P),r.current.delete(P),a.current.filtered.items.delete(P);let N=D();S(4,()=>{A(),N?.getAttribute("id")===P&&$(),w.emit()})}),group:P=>(n.current.has(P)||n.current.set(P,new Set),()=>{i.current.delete(P),n.current.delete(P)}),filter:()=>s.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:O,inputId:b,labelId:y,listInnerRef:v}),[]);function T(P,H){var N,M;let j=(M=(N=s.current)==null?void 0:N.filter)!=null?M:bW;return P?j(P,a.current.search,H):0}function Q(){if(!a.current.search||s.current.shouldFilter===!1)return;let P=a.current.filtered.items,H=[];a.current.filtered.groups.forEach(M=>{let j=n.current.get(M),de=0;j.forEach(ee=>{let Z=P.get(ee);de=Math.max(Z,de)}),H.push([M,de])});let N=v.current;Y().sort((M,j)=>{var de,ee;let Z=M.getAttribute("id"),qe=j.getAttribute("id");return((de=P.get(qe))!=null?de:0)-((ee=P.get(Z))!=null?ee:0)}).forEach(M=>{let j=M.closest(BC);j?j.appendChild(M.parentElement===j?M:M.closest(`${BC} > *`)):N.appendChild(M.parentElement===N?M:M.closest(`${BC} > *`))}),H.sort((M,j)=>j[1]-M[1]).forEach(M=>{var j;let de=(j=v.current)==null?void 0:j.querySelector(`${Xh}[${df}="${encodeURIComponent(M[0])}"]`);de?.parentElement.appendChild(de)})}function $(){let P=Y().find(N=>N.getAttribute("aria-disabled")!=="true"),H=P?.getAttribute(df);w.setState("value",H||void 0)}function A(){var P,H,N,M;if(!a.current.search||s.current.shouldFilter===!1){a.current.filtered.count=r.current.size;return}a.current.filtered.groups=new Set;let j=0;for(let de of r.current){let ee=(H=(P=i.current.get(de))==null?void 0:P.value)!=null?H:"",Z=(M=(N=i.current.get(de))==null?void 0:N.keywords)!=null?M:[],qe=T(ee,Z);a.current.filtered.items.set(de,qe),qe>0&&j++}for(let[de,ee]of n.current)for(let Z of ee)if(a.current.filtered.items.get(Z)>0){a.current.filtered.groups.add(de);break}a.current.filtered.count=j}function R(){var P,H,N;let M=D();M&&(((P=M.parentElement)==null?void 0:P.firstChild)===M&&((N=(H=M.closest(Xh))==null?void 0:H.querySelector(yW))==null||N.scrollIntoView({block:"nearest"})),M.scrollIntoView({block:"nearest"}))}function D(){var P;return(P=v.current)==null?void 0:P.querySelector(`${Qz}[aria-selected="true"]`)}function Y(){var P;return Array.from(((P=v.current)==null?void 0:P.querySelectorAll(Az))||[])}function B(P){let H=Y()[P];H&&w.setState("value",H.getAttribute(df))}function q(P){var H;let N=D(),M=Y(),j=M.findIndex(ee=>ee===N),de=M[j+P];(H=s.current)!=null&&H.loop&&(de=j+P<0?M[M.length-1]:j+P===M.length?M[0]:M[j+P]),de&&w.setState("value",de.getAttribute(df))}function re(P){let H=D(),N=H?.closest(Xh),M;for(;N&&!M;)N=P>0?RW(N,Xh):IW(N,Xh),M=N?.querySelector(Az);M?w.setState("value",M.getAttribute(df)):q(P)}let ie=()=>B(Y().length-1),z=P=>{P.preventDefault(),P.metaKey?ie():P.altKey?re(1):q(1)},Pe=P=>{P.preventDefault(),P.metaKey?B(0):P.altKey?re(-1):q(-1)};return J.createElement(ue.div,{ref:e,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:P=>{var H;(H=g.onKeyDown)==null||H.call(g,P);let N=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||N))switch(P.key){case"n":case"j":{x&&P.ctrlKey&&z(P);break}case"ArrowDown":{z(P);break}case"p":case"k":{x&&P.ctrlKey&&Pe(P);break}case"ArrowUp":{Pe(P);break}case"Home":{P.preventDefault(),B(0);break}case"End":{P.preventDefault(),ie();break}case"Enter":{P.preventDefault();let M=D();if(M){let j=new Event(_C);M.dispatchEvent(j)}}}}},J.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:MW},l),p0(t,P=>J.createElement(Ez.Provider,{value:w},J.createElement(Mz.Provider,{value:k},P))))}),vW=J.forwardRef((t,e)=>{var a,r;let n=Dt(),i=J.useRef(null),o=J.useContext(Dz),s=qh(),l=Bz(t),u=(r=(a=l.current)==null?void 0:a.forceMount)!=null?r:o?.forceMount;au(()=>{if(!u)return s.item(n,o?.id)},[u]);let c=_z(n,i,[t.value,t.children,i],t.keywords),f=zC(),d=Ms(S=>S.value&&S.value===c.current),h=Ms(S=>u||s.filter()===!1?!0:S.search?S.filtered.items.get(n)>0:!0);J.useEffect(()=>{let S=i.current;if(!(!S||t.disabled))return S.addEventListener(_C,p),()=>S.removeEventListener(_C,p)},[h,t.onSelect,t.disabled]);function p(){var S,w;m(),(w=(S=l.current).onSelect)==null||w.call(S,c.current)}function m(){f.setState("value",c.current,!0)}if(!h)return null;let{disabled:x,value:g,onSelect:O,forceMount:y,keywords:b,...v}=t;return J.createElement(ue.div,{ref:es(i,e),...v,id:n,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!d,"data-disabled":!!x,"data-selected":!!d,onPointerMove:x||s.getDisablePointerSelection()?void 0:m,onClick:x?void 0:p},t.children)}),SW=J.forwardRef((t,e)=>{let{heading:a,children:r,forceMount:n,...i}=t,o=Dt(),s=J.useRef(null),l=J.useRef(null),u=Dt(),c=qh(),f=Ms(h=>n||c.filter()===!1?!0:h.search?h.filtered.groups.has(o):!0);au(()=>c.group(o),[]),_z(o,s,[t.value,t.heading,l]);let d=J.useMemo(()=>({id:o,forceMount:n}),[n]);return J.createElement(ue.div,{ref:es(s,e),...i,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},a&&J.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},a),p0(t,h=>J.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?u:void 0},J.createElement(Dz.Provider,{value:d},h))))}),wW=J.forwardRef((t,e)=>{let{alwaysRender:a,...r}=t,n=J.useRef(null),i=Ms(o=>!o.search);return!a&&!i?null:J.createElement(ue.div,{ref:es(n,e),...r,"cmdk-separator":"",role:"separator"})}),CW=J.forwardRef((t,e)=>{let{onValueChange:a,...r}=t,n=t.value!=null,i=zC(),o=Ms(u=>u.search),s=Ms(u=>u.selectedItemId),l=qh();return J.useEffect(()=>{t.value!=null&&i.setState("search",t.value)},[t.value]),J.createElement(ue.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:n?t.value:o,onChange:u=>{n||i.setState("search",u.target.value),a?.(u.target.value)}})}),kW=J.forwardRef((t,e)=>{let{children:a,label:r="Suggestions",...n}=t,i=J.useRef(null),o=J.useRef(null),s=Ms(u=>u.selectedItemId),l=qh();return J.useEffect(()=>{if(o.current&&i.current){let u=o.current,c=i.current,f,d=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let h=u.offsetHeight;c.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return d.observe(u),()=>{cancelAnimationFrame(f),d.unobserve(u)}}},[]),J.createElement(ue.div,{ref:es(i,e),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},p0(t,u=>J.createElement("div",{ref:es(o,l.listInnerRef),"cmdk-list-sizer":""},u)))}),LW=J.forwardRef((t,e)=>{let{open:a,onOpenChange:r,overlayClassName:n,contentClassName:i,container:o,...s}=t;return J.createElement(Rv,{open:a,onOpenChange:r},J.createElement(Iv,{container:o},J.createElement(Av,{"cmdk-overlay":"",className:n}),J.createElement(Qv,{"aria-label":t.label,"cmdk-dialog":"",className:i},J.createElement($z,{ref:e,...s}))))}),TW=J.forwardRef((t,e)=>Ms(a=>a.filtered.count===0)?J.createElement(ue.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),PW=J.forwardRef((t,e)=>{let{progress:a,children:r,label:n="Loading...",...i}=t;return J.createElement(ue.div,{ref:e,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},p0(t,o=>J.createElement("div",{"aria-hidden":!0},o)))}),ru=Object.assign($z,{List:kW,Item:vW,Input:CW,Group:SW,Separator:wW,Dialog:LW,Empty:TW,Loading:PW});function RW(t,e){let a=t.nextElementSibling;for(;a;){if(a.matches(e))return a;a=a.nextElementSibling}}function IW(t,e){let a=t.previousElementSibling;for(;a;){if(a.matches(e))return a;a=a.previousElementSibling}}function Bz(t){let e=J.useRef(t);return au(()=>{e.current=t}),e}var au=typeof window>"u"?J.useEffect:J.useLayoutEffect;function hf(t){let e=J.useRef();return e.current===void 0&&(e.current=t()),e}function Ms(t){let e=zC(),a=()=>t(e.snapshot());return J.useSyncExternalStore(e.subscribe,a,a)}function _z(t,e,a,r=[]){let n=J.useRef(),i=qh();return au(()=>{var o;let s=(()=>{var u;for(let c of a){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():n.current}})(),l=r.map(u=>u.trim());i.value(t,s,l),(o=e.current)==null||o.setAttribute(df,s),n.current=s}),n}var AW=()=>{let[t,e]=J.useState(),a=hf(()=>new Map);return au(()=>{a.current.forEach(r=>r()),a.current=new Map},[t]),(r,n)=>{a.current.set(r,n),e({})}};function QW(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function p0({asChild:t,children:e},a){return t&&J.isValidElement(e)?J.cloneElement(QW(e),{ref:e.ref},a(e.props.children)):a(e)}var MW={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var vi=L(G(),1);function zz({className:t,...e}){return(0,vi.jsx)(ru,{"data-slot":"command",className:pe("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e})}function Nz({className:t,...e}){return(0,vi.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,vi.jsx)(kd,{className:"size-4 shrink-0 opacity-50"}),(0,vi.jsx)(ru.Input,{"data-slot":"command-input",className:pe("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]})}function Xz({className:t,...e}){return(0,vi.jsx)(ru.List,{"data-slot":"command-list",className:pe("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function qz({...t}){return(0,vi.jsx)(ru.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function Zz({className:t,...e}){return(0,vi.jsx)(ru.Group,{"data-slot":"command-group",className:pe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e})}function Vz({className:t,...e}){return(0,vi.jsx)(ru.Item,{"data-slot":"command-item",className:pe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...e})}var mt=L(G(),1);function jz({onPick:t}){let[e,a]=(0,NC.useState)(""),[r,n]=(0,NC.useState)(!1),{data:i}=ii(e);return(0,mt.jsxs)(zz,{shouldFilter:!1,className:"relative w-full overflow-visible rounded-[9px] border bg-zinc-50 text-zinc-400 focus-within:border-foreground focus-within:bg-background focus-within:text-zinc-500 [&_[data-slot=command-input-wrapper]]:h-[32px] [&_[data-slot=command-input-wrapper]]:border-0 [&_[data-slot=command-input]]:h-8 [&_[data-slot=command-input]]:text-[12.5px] [&_[data-slot=command-input]]:text-foreground [&_[data-slot=command-input]]:placeholder:text-zinc-400",onFocus:()=>n(!0),onBlur:()=>n(!1),children:[(0,mt.jsx)(Nz,{placeholder:"Search everything",spellCheck:!1,value:e,onValueChange:a,onKeyDown:o=>o.key==="Escape"&&a("")}),r&&e!==""&&(0,mt.jsxs)(Xz,{className:"absolute top-full right-0 left-0 z-50 mt-[7px] max-h-[min(460px,62vh)] rounded-xl border bg-popover p-[5px] shadow-[0_20px_44px_-16px_rgba(0,0,0,0.3)] [&_[cmdk-group-heading]]:px-[11px] [&_[cmdk-group-heading]]:pt-2 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:text-[10px] [&_[cmdk-group-heading]]:font-bold [&_[cmdk-group-heading]]:tracking-[0.07em] [&_[cmdk-group-heading]]:text-zinc-400 [&_[cmdk-group-heading]]:uppercase [&_[data-slot=command-group]]:p-0",onMouseDown:o=>o.preventDefault(),children:[i?.type==="FaultsByFile"&&(0,mt.jsx)("p",{className:"px-3 py-3.5 text-xs text-zinc-400",children:"The engine will not read this charter, so there is nothing to search."}),i?.type==="Fault"&&(0,mt.jsxs)("p",{className:"px-3 py-3.5 text-xs text-zinc-400",children:[i.data.message," ",i.data.fix]}),i?.type==="Primitives"&&(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsx)(qz,{className:"px-3 py-3.5 text-xs text-zinc-400",children:"Nothing in the charter says that."}),i.data.primitives.length>0&&(0,mt.jsx)(Zz,{heading:`${i.data.primitives.length} primitive${i.data.primitives.length===1?"":"s"}`,children:i.data.primitives.map(o=>{let{id:s,kind:l,description:u,layerName:c,headers:f}=o.data;return(0,mt.jsxs)(Vz,{value:s,className:"grid cursor-pointer grid-cols-[74px_minmax(0,1fr)_max-content] items-baseline gap-2.5 rounded-lg px-[11px] py-2 data-[selected=true]:bg-zinc-50 data-[selected=true]:outline data-[selected=true]:outline-zinc-200",onSelect:()=>{a(""),n(!1),t(o)},children:[(0,mt.jsx)("span",{className:"font-mono text-[9.5px] font-bold tracking-[0.03em] text-zinc-500 uppercase",children:l}),(0,mt.jsxs)("span",{className:"min-w-0",children:[(0,mt.jsx)("span",{className:"block truncate font-mono text-xs text-foreground",children:(0,mt.jsx)(Uz,{text:String(f.id),word:e})}),(0,mt.jsx)("span",{className:"mt-0.5 block truncate text-[11px] leading-[1.45] text-zinc-400",children:(0,mt.jsx)(Uz,{text:u,word:e})})]}),(0,mt.jsx)(pi,{className:`rounded-[5px] px-1.5 py-0.5 font-mono text-[9.5px] font-bold tracking-[0.03em] ${EW[c]}`,children:c})]},s)})})]})]})]})}var EW={repo:"bg-[#eff6ff] text-[#1d4ed8]",vendor:"bg-[#f6f2ff] text-[#7c3aed]",builtin:"bg-zinc-100 text-zinc-700"};function Uz({text:t,word:e}){let a=t.toLowerCase().indexOf(e.toLowerCase());return a===-1||e===""?(0,mt.jsx)(mt.Fragment,{children:t}):(0,mt.jsxs)(mt.Fragment,{children:[t.slice(0,a),(0,mt.jsx)("mark",{className:"rounded-[2px] bg-[#fff2b8] text-inherit",children:t.slice(a,a+e.length)}),t.slice(a+e.length)]})}var Fz=L(F(),1);var De=L(G(),1);function Hz(){let{open:t}=fo(),e=Fm(),a=MA(),r=ii(),n=EA(),[i,o]=(0,Fz.useState)(null);if(e.data===void 0)return null;let{testSuites:s}=e.data.data,l=new Set(r.data?.type==="Primitives"?r.data.data.primitives.map(({data:m})=>m.id):[]),u=a.data?.type==="TestRunReport"?a.data:void 0,c=m=>u?.data.testCaseReports.filter(({data:x})=>x.suiteName===m)??[],f=s.reduce((m,{data:x})=>m+x.cases.length,0),d=u?.data.testCaseReports.filter(({data:m})=>!m.passed).length??0,h=async()=>{let{data:m}=await a.refetch();if(m?.type!=="TestRunReport")return;let x=m.data.testCaseReports.find(({data:g})=>!g.passed);x!==void 0&&o(x.data.suiteName)},p=async()=>{let m=await n.mutateAsync();o(m),t("testSuite",{name:m}),ll("Test file created",{description:`.cw/test/${m} \xB7 edit the cases, then run them`})};return(0,De.jsxs)("div",{className:"space-y-2.5",children:[(0,De.jsxs)("div",{className:`mb-[18px] flex flex-wrap items-center gap-[11px] rounded-xl border px-[15px] py-[13px] ${u===void 0?"":d>0?"border-[#f6d9d9] bg-[#fef6f6]":"border-[#dcf0e2] bg-[#f5fbf7]"}`,"aria-label":"Test summary",children:[(0,De.jsx)("span",{className:"text-[12.5px] font-bold",children:u===void 0?`${f} case${f===1?"":"s"} in ${s.length} file${s.length===1?"":"s"}`:`${u.data.testCaseReports.length-d} of ${u.data.testCaseReports.length} cases pass`}),(0,De.jsx)("span",{className:"min-w-0 flex-1 text-[11.5px] leading-[1.6] text-zinc-500",children:"A case names the file a change touches or the event it raises, then says what must come up. It runs nothing and asks no agent."}),(0,De.jsx)(Ae,{variant:"outline",disabled:n.isPending,onClick:()=>{p()},children:"New test file"}),(0,De.jsx)(Ae,{disabled:a.isFetching,onClick:()=>{h()},children:"Run all tests"})]}),a.data?.type==="FaultsByFile"&&(0,De.jsx)(cs,{faultsByFile:a.data,label:"Nothing was resolved"}),s.length===0&&(0,De.jsx)("div",{className:"rounded-xl border border-dashed px-[15px] py-3.5 text-[11.5px] leading-[1.6] text-zinc-500",children:"No test file yet. Test files live in .cw/test/."}),s.map(({data:m})=>{let x=c(m.name),g=x.filter(({data:O})=>!O.passed).length;return(0,De.jsxs)("section",{className:"overflow-hidden rounded-[14px] border bg-background","aria-label":m.name,children:[(0,De.jsxs)("div",{className:"flex items-baseline gap-2.5 px-[15px] py-3",children:[(0,De.jsxs)("button",{className:"flex min-w-0 flex-1 cursor-pointer items-baseline gap-2.5 text-left","aria-expanded":i===m.name,onClick:()=>o(i===m.name?null:m.name),children:[(0,De.jsx)("span",{className:"font-mono text-[11.5px] font-bold",children:m.name}),(0,De.jsx)("span",{className:"min-w-0 flex-1 text-[11.5px] text-zinc-500",children:m.description}),(0,De.jsxs)("span",{className:`font-mono text-[10.5px] ${g>0?"text-destructive":"text-zinc-400"}`,children:[m.cases.length," case",m.cases.length===1?"":"s",g>0&&` \xB7 ${g} failing`]})]}),(0,De.jsx)(Ae,{variant:"ghost",className:"h-auto p-0 text-[11.5px] text-zinc-400 hover:bg-transparent hover:text-foreground",onClick:()=>t("testSuite",{name:m.name}),children:"Edit"})]}),m.fault!==void 0&&(0,De.jsxs)("p",{className:"border-t border-[#f7f7f8] px-[15px] py-2.5 text-[11.5px] text-destructive",children:[m.fault.data.message," ",(0,De.jsx)("span",{className:"text-zinc-400",children:m.fault.data.fix})]}),i===m.name&&m.cases.map(({data:O},y)=>(0,De.jsx)(DW,{testCase:O,testCaseReport:x[y],isHeld:O.id===void 0||l.has(O.id),onOpen:b=>t("primitive",{id:b})},y))]},m.name)})]})}function DW({testCase:t,testCaseReport:e,isHeld:a,onOpen:r}){let n=e?.data.unmet,{id:i,expectation:o}=t;return(0,De.jsxs)("div",{className:`grid grid-cols-[minmax(150px,1fr)_minmax(0,1.4fr)_auto] items-baseline gap-3 border-t border-[#f7f7f8] px-[15px] py-2.5 ${n?"bg-[#fef6f6]":""}`,children:[(0,De.jsx)("span",{className:"font-mono text-[10.5px]",children:t.situation}),n!==void 0?(0,De.jsxs)("span",{className:"font-mono text-[10.5px] text-destructive",children:[n.data.message," ",(0,De.jsx)("span",{className:"text-zinc-400",children:n.data.fix})]}):(0,De.jsx)("span",{className:"font-mono text-[10.5px] text-zinc-400",children:i===void 0||!o.endsWith(i)?o:(0,De.jsxs)(De.Fragment,{children:[o.slice(0,-i.length),a?(0,De.jsx)("button",{className:"cursor-pointer text-[#1d4ed8] underline underline-offset-2",onClick:()=>r(i),children:i}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("span",{className:"underline decoration-dotted underline-offset-2",children:i})," ",(0,De.jsx)(pi,{className:"rounded-[5px] bg-zinc-100 px-1.5 py-0 font-sans text-[10px] font-normal text-zinc-500",children:"not in the charter"})]})]})}),(0,De.jsx)(pi,{className:`rounded-[5px] px-[7px] py-0 text-[11.5px] font-bold tracking-[0.04em] [font-variant-caps:all-small-caps] ${e===void 0?"bg-zinc-50 text-[#c4c4c8]":e.data.passed?"bg-[#f0fdf4] text-[#15803d]":"bg-[#fdeef0] text-[#b91c1c]"}`,children:e===void 0?"not run":e.data.passed?"pass":"fail"})]})}var Zt=L(G(),1);function Gz(){let{open:t}=fo(),e=IA(),a=ii(),r=QA();if(e.data===void 0)return null;let n=e.data,i=a.data?.type==="Primitives"?a.data.data.primitives.filter(({data:s})=>s.layerName==="vendor"):[],o=async s=>{let l=await r.mutateAsync(s.split("/").at(-1)??"");if(l!==null)return void ll.error(l.data.message,{description:l.data.fix});ll("Vendor source removed",{description:`${s} \xB7 run Build to compile the charter without it`})};return n.length===0?(0,Zt.jsxs)("div",{className:"flex items-center gap-[9px] rounded-xl border border-dashed px-[15px] py-3.5","aria-label":"Vendor sources",children:[(0,Zt.jsx)("span",{className:"text-xs font-semibold",children:"No vendor source installed"}),(0,Zt.jsx)(Ae,{size:"sm",className:"ml-auto",onClick:()=>t("addVendor",{}),children:"Add vendor source"})]}):(0,Zt.jsxs)("section",{className:"divide-y divide-[#f0f0f0] overflow-hidden rounded-[13px] border bg-background","aria-label":"Vendor sources",children:[(0,Zt.jsx)("h2",{className:"px-3.5 py-[11px] text-[10.5px] font-bold tracking-[0.06em] text-zinc-400 uppercase",children:"Vendor sources"}),n.map(s=>{let l=i.filter(({data:c})=>c.file.startsWith(`${s}/`)),u=[...new Set(l.map(({data:c})=>c.kind))].sort().map(c=>[c,l.filter(({data:f})=>f.kind===c).length]);return(0,Zt.jsxs)("div",{className:"flex flex-col gap-2.5 bg-[#f6f2ff] px-3.5 py-3","aria-label":s,children:[(0,Zt.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,Zt.jsx)("div",{className:"text-[12.5px] font-semibold",children:s.split("/").at(-1)}),(0,Zt.jsxs)("div",{className:"text-[11px] text-zinc-500",children:[(0,Zt.jsxs)("span",{className:"font-mono",children:[s,"/"]})," \xB7 read-only"]})]}),(0,Zt.jsx)("dl",{className:"grid grid-cols-[1fr_auto] gap-x-2 gap-y-1.5 text-[11.5px] text-zinc-500","aria-label":"Primitives by kind",children:u.map(([c,f])=>(0,Zt.jsxs)("div",{className:"contents",children:[(0,Zt.jsx)("dt",{children:c}),(0,Zt.jsx)("dd",{className:"font-mono text-[10.5px] text-zinc-400",children:f})]},c))}),(0,Zt.jsx)(Ae,{size:"sm",variant:"outline",className:"self-start",disabled:r.isPending,onClick:()=>{o(s)},children:"Remove"})]},s)}),(0,Zt.jsx)("div",{className:"px-3.5 py-[11px]",children:(0,Zt.jsx)(Ae,{size:"sm",variant:"outline",onClick:()=>t("addVendor",{}),children:"Add source"})})]})}var nu=L(G(),1),Yz=({...t})=>(0,nu.jsx)(XA,{theme:"light",className:"toaster group",icons:{success:(0,nu.jsx)(Ho,{className:"size-4"}),info:(0,nu.jsx)(Cd,{className:"size-4"}),warning:(0,nu.jsx)(Wo,{className:"size-4"}),error:(0,nu.jsx)(Yo,{className:"size-4"}),loading:(0,nu.jsx)(Go,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...t});var Ge=L(G(),1),$W=[["repo","Repo Charter"],["vendor","Vendor"],["test","Test"]],XC="rounded-2xl border bg-background px-[22px] py-5";function BW(){let[t,e]=(0,Zh.useState)("repo"),[a,r]=(0,Zh.useState)(null),{open:n}=fo();return(0,Ge.jsxs)(Ge.Fragment,{children:[(0,Ge.jsxs)("header",{className:"sticky top-0 z-20 flex h-14 items-center gap-3 border-b bg-background px-[26px]",children:[(0,Ge.jsxs)("span",{className:"flex items-center gap-[9px] text-[13.5px] font-bold tracking-[-0.01em]",children:[(0,Ge.jsx)("img",{src:"./logo.png",alt:"",className:"size-[22px] object-contain"}),"Cherry Works"]}),(0,Ge.jsx)("span",{className:"font-mono text-[11.5px] text-zinc-400"}),(0,Ge.jsx)("div",{className:"ml-auto flex w-full max-w-[460px]",children:(0,Ge.jsx)(jz,{onPick:({data:{id:i,kind:o,layerName:s}})=>{e(s==="vendor"?"vendor":"repo"),r(o),n("primitive",{id:i})}})}),(0,Ge.jsx)(Ae,{variant:"outline",onClick:()=>n("buildPreview",{}),children:"Build"}),(0,Ge.jsx)(Ae,{variant:"outline",onClick:()=>n("doctor",{}),children:"Doctor"})]}),(0,Ge.jsx)("main",{className:"mx-auto max-w-[1120px] px-[26px] pt-[22px] pb-[60px]",children:(0,Ge.jsxs)(l0,{value:t,onValueChange:i=>{e(i),r(null)},children:[(0,Ge.jsx)(u0,{className:"mb-4 h-auto w-full gap-1 rounded-[11px] bg-[#e9e9ec] p-1",children:$W.map(([i,o])=>(0,Ge.jsx)(_h,{value:i,className:"h-auto rounded-lg py-[9px] text-[12.5px] font-semibold text-zinc-500 data-[state=active]:shadow-[0_1px_3px_rgba(0,0,0,0.09)]",children:o},i))}),(0,Ge.jsx)(Jl,{value:"repo",className:XC,children:(0,Ge.jsx)(MC,{layerNames:["repo","builtin"],kind:a,onKindChange:r})}),(0,Ge.jsxs)(Jl,{value:"vendor",className:`${XC} grid items-start gap-4 md:has-[>section]:grid-cols-[210px_minmax(0,1fr)]`,children:[(0,Ge.jsx)(Gz,{}),(0,Ge.jsx)(MC,{layerNames:["vendor"],kind:a,onKindChange:r})]}),(0,Ge.jsx)(Jl,{value:"test",className:XC,children:(0,Ge.jsx)(Hz,{})})]})}),(0,Ge.jsx)(Yz,{})]})}var _W=new Db;(0,Wz.createRoot)(document.getElementById("root")).render((0,Ge.jsx)(Zh.StrictMode,{children:(0,Ge.jsx)(Cb,{client:_W,children:(0,Ge.jsx)(Sz,{children:(0,Ge.jsx)(BW,{})})})}));
140
140
  /*! Bundled license information:
141
141
 
142
142
  react/cjs/react.production.js: