@fonderie/admin 0.10.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/brain/outcomes.md +1 -1
- package/brain/signatures.md +2 -2
- package/dist/index.cjs +15 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/dist/ui/app.global.js +1 -1
- package/package.json +2 -1
package/dist/ui/app.global.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
`+s[n].replace(" at new "," at ");return t.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",t.displayName)),d}while(1<=n&&0<=a);break}}}finally{ks=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Fl(l):""}function Ng(t,e){switch(t.tag){case 26:case 27:case 5:return Fl(t.type);case 16:return Fl("Lazy");case 13:return t.child!==e&&e!==null?Fl("Suspense Fallback"):Fl("Suspense");case 19:return Fl("SuspenseList");case 0:case 15:return ws(t.type,!1);case 11:return ws(t.type.render,!1);case 1:return ws(t.type,!0);case 31:return Fl("Activity");case 30:return Fl("ViewTransition");default:return""}}function jd(t){try{var e="",l=null;do e+=Ng(t,l),l=t,t=t.return;while(t);return e}catch(n){return`
|
|
7
7
|
Error generating stack: `+n.message+`
|
|
8
8
|
`+n.stack}}var fc=Object.prototype.hasOwnProperty,mr=Mt.unstable_scheduleCallback,zs=Mt.unstable_cancelCallback,Mg=Mt.unstable_shouldYield,_g=Mt.unstable_requestPaint,ve=Mt.unstable_now,xg=Mt.unstable_getCurrentPriorityLevel,Um=Mt.unstable_ImmediatePriority,Rm=Mt.unstable_UserBlockingPriority,uo=Mt.unstable_NormalPriority,Dg=Mt.unstable_LowPriority,Nm=Mt.unstable_IdlePriority,qg=Mt.log,Hg=Mt.unstable_setDisableYieldValue,Ku=null,be=null;function ln(t){if(typeof qg=="function"&&Hg(t),be&&typeof be.setStrictMode=="function")try{be.setStrictMode(Ku,t)}catch{}}var Se=Math.clz32?Math.clz32:Gg,Lg=Math.log,Bg=Math.LN2;function Gg(t){return t>>>=0,t===0?32:31-(Lg(t)/Bg|0)|0}var gi=256,vi=262144,bi=4194304;function Mn(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 Mo(t,e,l){var n=t.pendingLanes;if(n===0)return 0;var a=0,u=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var o=n&134217727;return o!==0?(n=o&~u,n!==0?a=Mn(n):(i&=o,i!==0?a=Mn(i):l||(l=o&~t,l!==0&&(a=Mn(l))))):(o=n&~u,o!==0?a=Mn(o):i!==0?a=Mn(i):l||(l=n&~t,l!==0&&(a=Mn(l)))),a===0?0:e!==0&&e!==a&&(e&u)===0&&(u=a&-a,l=e&-e,u>=l||u===32&&(l&4194048)!==0)?e:a}function Ju(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Mm(t,e){(e&8)!==0&&(e|=e&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=e;0<l;){var n=31-Se(l),a=1<<n;e|=t[n],l&=~a}return e}function jg(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 _m(){var t=bi;return bi<<=1,(bi&62914560)===0&&(bi=4194304),t}function Os(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function $u(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Yg(t,e,l,n,a,u){var i=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var o=t.entanglements,s=t.expirationTimes,r=t.hiddenUpdates;for(l=i&~l;0<l;){var d=31-Se(l),y=1<<d;o[d]=0,s[d]=-1;var f=r[d];if(f!==null)for(r[d]=null,d=0;d<f.length;d++){var m=f[d];m!==null&&(m.lane&=-536870913)}l&=~y}n!==0&&xm(t,n,0),u!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=u&~(i&~e))}function xm(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var n=31-Se(e);t.entangledLanes|=e,t.entanglements[n]=t.entanglements[n]|1073741824|l&261930}function Dm(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var n=31-Se(l),a=1<<n;a&e|t[n]&e&&(t[n]|=e),l&=~a}}function qm(t,e){var l=e&-e;return l=(l&42)!==0?1:yr(l),(l&(t.suspendedLanes|e))!==0?0:l}function yr(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 pr(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Hm(){var t=F.p;return t!==0?t:(t=window.event,t===void 0?32:vp(t.type))}function Yd(t,e){var l=F.p;try{return F.p=t,e()}finally{F.p=l}}var Dl=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Dl,se="__reactProps$"+Dl,Ka="__reactContainer$"+Dl,Xd="__reactEvents$"+Dl,Xg="__reactListeners$"+Dl,Qg="__reactHandles$"+Dl,Qd="__reactResources$"+Dl,Fu="__reactMarker$"+Dl,io="__reactLoad$"+Dl;function _o(t){delete t[Lt],delete t[se],delete t[Xg],delete t[Qg]}function Dn(t){var e;if(e=t[Lt])return e;for(var l=t.parentNode;l;){if(e=l[Ka]||l[Lt]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=om(t);t!==null;){if(l=t[Lt])return l;t=om(t)}return e}t=l,l=t.parentNode}return null}function Ja(t){if(t=t[Lt]||t[Ka]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function yu(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(E(33))}function ka(t){var e=t[Qd];return e||(e=t[Qd]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Dt(t){t[Fu]=!0}function Lm(t){t[io]=void 0}var Bm=new Set,Gm={};function Fn(t,e){qa(t,e),qa(t+"Capture",e)}function qa(t,e){for(Gm[t]=e,t=0;t<e.length;t++)Bm.add(e[t])}var Vg=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]*$"),Vd={},Zd={};function Zg(t){return fc.call(Zd,t)?!0:fc.call(Vd,t)?!1:Vg.test(t)?Zd[t]=!0:(Vd[t]=!0,!1)}var J=!1;function Id(){var t=J;return J=!1,t}function Hi(t,e,l){if(Zg(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var n=e.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,l)}}function Si(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,l)}}function Al(t,e,l,n){if(n===null)t.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,n)}}function me(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function jm(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ig(t,e,l){var n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,u=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return a.call(this)},set:function(i){l=""+i,u.call(this,i)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(i){l=""+i},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function dc(t){if(!t._valueTracker){var e=jm(t)?"checked":"value";t._valueTracker=Ig(t,e,""+t[e])}}function Ym(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),n="";return t&&(n=jm(t)?t.checked?"true":"false":t.value),t=n,t!==l?(e.setValue(t),!0):!1}var Kg=/[\n"\\]/g;function Re(t){return t.replace(Kg,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function hc(t,e,l,n,a,u,i,o){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),e!=null?i==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+me(e)):t.value!==""+me(e)&&(t.value=""+me(e)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),e!=null?i==="number"&&t.value==e?Us(t,me(t.value)):Us(t,me(e)):l!=null?Us(t,me(l)):n!=null&&t.removeAttribute("value"),a==null&&u!=null&&(t.defaultChecked=!!u),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.name=""+me(o):t.removeAttribute("name")}function Xm(t,e,l,n,a,u,i,o){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){dc(t);return}l=l!=null?""+me(l):"",e=e!=null?""+me(e):l,o||e===t.value||(t.value=e),t.defaultValue=e}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=o?t.checked:!!n,t.defaultChecked=!!n,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),dc(t)}function Us(t,e){t.defaultValue!==""+e&&(t.defaultValue=""+e)}function wa(t,e,l,n){if(t=t.options,e){e={};for(var a=0;a<l.length;a++)e["$"+l[a]]=!0;for(l=0;l<t.length;l++)a=e.hasOwnProperty("$"+t[l].value),t[l].selected!==a&&(t[l].selected=a),a&&n&&(t[l].defaultSelected=!0)}else{for(l=""+me(l),e=null,a=0;a<t.length;a++){if(t[a].value===l){t[a].selected=!0,n&&(t[a].defaultSelected=!0);return}e!==null||t[a].disabled||(e=t[a])}e!==null&&(e.selected=!0)}}function Qm(t,e,l){if(e!=null&&(e=""+me(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+me(l):""}function Vm(t,e,l,n){if(e==null){if(n!=null){if(l!=null)throw Error(E(92));if(mu(n)){if(1<n.length)throw Error(E(93));n=n[0]}l=n}l==null&&(l=""),e=l}l=me(e),t.defaultValue=l,n=t.textContent,n===l&&n!==""&&n!==null&&(t.value=n),dc(t)}function Ha(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var Jg=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 Kd(t,e,l){var n=e.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":n?t.setProperty(e,l):typeof l!="number"||l===0||Jg.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function Zm(t,e,l){if(e!=null&&typeof e!="object")throw Error(E(62));if(t=t.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||e!=null&&e.hasOwnProperty(n)||(n.indexOf("--")===0?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="",J=!0);for(var a in e)n=e[a],e.hasOwnProperty(a)&&l[a]!==n&&(Kd(t,a,n),J=!0)}else for(var u in e)e.hasOwnProperty(u)&&Kd(t,u,e[u])}function gr(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 $g=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"]]),Fg=/^[\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 Li(t){return Fg.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function il(){}var mc=null;function vr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var pa=null,za=null;function Jd(t){var e=Ja(t);if(e&&(t=e.stateNode)){var l=t[se]||null;t:switch(t=e.stateNode,e.type){case"input":if(hc(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),e=l.name,l.type==="radio"&&e!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Re(""+e)+'"][type="radio"]'),e=0;e<l.length;e++){var n=l[e];if(n!==t&&n.form===t.form){var a=n[se]||null;if(!a)throw Error(E(90));hc(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(e=0;e<l.length;e++)n=l[e],n.form===t.form&&Ym(n)}break t;case"textarea":Qm(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&wa(t,!!l.multiple,e,!1)}}}var Rs=!1;function Im(t,e,l){if(Rs)return t(e,l);Rs=!0;try{var n=t(e);return n}finally{if(Rs=!1,(pa!==null||za!==null)&&(Io(),pa&&(e=pa,t=za,za=pa=null,Jd(e),t)))for(e=0;e<t.length;e++)Jd(t[e])}}function Mu(t,e){var l=t.stateNode;if(l===null)return null;var n=l[se]||null;if(n===null)return null;l=n[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(E(231,e,typeof l));return l}var Ul=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yc=!1;if(Ul)try{oa={},Object.defineProperty(oa,"passive",{get:function(){yc=!0}}),window.addEventListener("test",oa,oa),window.removeEventListener("test",oa,oa)}catch{yc=!1}var oa,nn=null,br=null,Bi=null;function Km(){if(Bi)return Bi;var t,e=br,l=e.length,n,a="value"in nn?nn.value:nn.textContent,u=a.length;for(t=0;t<l&&e[t]===a[t];t++);var i=l-t;for(n=1;n<=i&&e[l-n]===a[u-n];n++);return Bi=a.slice(t,1<n?1-n:void 0)}function Gi(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 Ei(){return!0}function $d(){return!1}function Pt(t){function e(l,n,a,u,i){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=u,this.target=i,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&&(l=t[o],this[o]=l?l(u):u[o]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ei:$d,this.isPropagationStopped=$d,this}return ot(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ei)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ei)},persist:function(){},isPersistent:Ei}),e}var Cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xo=Pt(Cn),Wu=ot({},Cn,{view:0,detail:0}),Wg=Pt(Wu),Ns,Ms,su,Do=ot({},Wu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sr,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!==su&&(su&&t.type==="mousemove"?(Ns=t.screenX-su.screenX,Ms=t.screenY-su.screenY):Ms=Ns=0,su=t),Ns)},movementY:function(t){return"movementY"in t?t.movementY:Ms}}),Fd=Pt(Do),Pg=ot({},Do,{dataTransfer:0}),tv=Pt(Pg),ev=ot({},Wu,{relatedTarget:0}),_s=Pt(ev),lv=ot({},Cn,{animationName:0,elapsedTime:0,pseudoElement:0}),nv=Pt(lv),av=ot({},Cn,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),uv=Pt(av),iv=ot({},Cn,{data:0}),Wd=Pt(iv),ov={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sv={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"},cv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rv(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=cv[t])?!!e[t]:!1}function Sr(){return rv}var fv=ot({},Wu,{key:function(t){if(t.key){var e=ov[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Gi(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?sv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sr,charCode:function(t){return t.type==="keypress"?Gi(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Gi(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),dv=Pt(fv),hv=ot({},Do,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pd=Pt(hv),mv=ot({},Cn,{submitter:0}),yv=Pt(mv),pv=ot({},Wu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sr}),gv=Pt(pv),vv=ot({},Cn,{propertyName:0,elapsedTime:0,pseudoElement:0}),bv=Pt(vv),Sv=ot({},Do,{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}),Ev=Pt(Sv),Tv=ot({},Cn,{newState:0,oldState:0,source:0}),Av=Pt(Tv),Cv=[9,13,27,32],Er=Ul&&"CompositionEvent"in window,vu=null;Ul&&"documentMode"in document&&(vu=document.documentMode);var kv=Ul&&"TextEvent"in window&&!vu,Jm=Ul&&(!Er||vu&&8<vu&&11>=vu),th=" ",eh=!1;function $m(t,e){switch(t){case"keyup":return Cv.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ga=!1;function wv(t,e){switch(t){case"compositionend":return Fm(e);case"keypress":return e.which!==32?null:(eh=!0,th);case"textInput":return t=e.data,t===th&&eh?null:t;default:return null}}function zv(t,e){if(ga)return t==="compositionend"||!Er&&$m(t,e)?(t=Km(),Bi=br=nn=null,ga=!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 Jm&&e.locale!=="ko"?null:e.data;default:return null}}var Ov={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 lh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Ov[t.type]:e==="textarea"}function Wm(t,e,l,n){pa?za?za.push(n):za=[n]:pa=n,e=Uo(e,"onChange"),0<e.length&&(l=new xo("onChange","change",null,l,n),t.push({event:l,listeners:e}))}var bu=null,_u=null;function Uv(t){Iy(t,0)}function qo(t){var e=yu(t);if(Ym(e))return t}function nh(t,e){if(t==="change")return e}var Pm=!1;Ul&&(Ul?(Ai="oninput"in document,Ai||(xs=document.createElement("div"),xs.setAttribute("oninput","return;"),Ai=typeof xs.oninput=="function"),Ti=Ai):Ti=!1,Pm=Ti&&(!document.documentMode||9<document.documentMode));var Ti,Ai,xs;function ah(){bu&&(bu.detachEvent("onpropertychange",t0),_u=bu=null)}function t0(t){if(t.propertyName==="value"&&qo(_u)){var e=[];Wm(e,_u,t,vr(t)),Im(Uv,e)}}function Rv(t,e,l){t==="focusin"?(ah(),bu=e,_u=l,bu.attachEvent("onpropertychange",t0)):t==="focusout"&&ah()}function Nv(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return qo(_u)}function Mv(t,e){if(t==="click")return qo(e)}function _v(t,e){if(t==="input"||t==="change")return qo(e)}function xv(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Te=typeof Object.is=="function"?Object.is:xv;function xu(t,e){if(Te(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var l=Object.keys(t),n=Object.keys(e);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!fc.call(e,a)||!Te(t[a],e[a]))return!1}return!0}function pc(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 uh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ih(t,e){var l=uh(t);t=0;for(var n;l;){if(l.nodeType===3){if(n=t+l.textContent.length,t<=e&&n>=e)return{node:l,offset:e-t};t=n}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=uh(l)}}function e0(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?e0(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function l0(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=pc(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=pc(t.document)}return e}function Tr(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 Dv=Ul&&"documentMode"in document&&11>=document.documentMode,va=null,gc=null,Su=null,vc=!1;function oh(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;vc||va==null||va!==pc(n)||(n=va,"selectionStart"in n&&Tr(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Su&&xu(Su,n)||(Su=n,n=Uo(gc,"onSelect"),0<n.length&&(e=new xo("onSelect","select",null,e,l),t.push({event:e,listeners:n}),e.target=va)))}function Rn(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var ba={animationend:Rn("Animation","AnimationEnd"),animationiteration:Rn("Animation","AnimationIteration"),animationstart:Rn("Animation","AnimationStart"),transitionrun:Rn("Transition","TransitionRun"),transitionstart:Rn("Transition","TransitionStart"),transitioncancel:Rn("Transition","TransitionCancel"),transitionend:Rn("Transition","TransitionEnd")},Ds={},n0={};Ul&&(n0=document.createElement("div").style,"AnimationEvent"in window||(delete ba.animationend.animation,delete ba.animationiteration.animation,delete ba.animationstart.animation),"TransitionEvent"in window||delete ba.transitionend.transition);function Wn(t){if(Ds[t])return Ds[t];if(!ba[t])return t;var e=ba[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in n0)return Ds[t]=e[l];return t}var a0=Wn("animationend"),u0=Wn("animationiteration"),i0=Wn("animationstart"),qv=Wn("transitionrun"),Hv=Wn("transitionstart"),Lv=Wn("transitioncancel"),o0=Wn("transitionend"),s0=new Map,bc="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(" ");bc.push("scrollEnd");function Ie(t,e){s0.set(t,e),Fn(e,[t])}var Bv=0;function Rl(t,e){if(t.name!=null&&t.name!=="auto")return t.name;if(e.autoName!==null)return e.autoName;t=Ze.identifierPrefix;var l=Bv++;return t="_"+t+"t_"+l.toString(32)+"_",e.autoName=t}function sh(t){if(t==null||typeof t=="string")return t;var e=null,l=xa;if(l!==null)for(var n=0;n<l.length;n++){var a=t[l[n]];if(a!=null){if(a==="none")return"none";e=e==null?a:e+(" "+a)}}return e??t.default}function ql(t,e){return t=sh(t),e=sh(e),e==null?t==="auto"?null:t:e==="auto"?null:e}var oo=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)},ze=[],Sa=0,Ar=0;function Ho(){for(var t=Sa,e=Ar=Sa=0;e<t;){var l=ze[e];ze[e++]=null;var n=ze[e];ze[e++]=null;var a=ze[e];ze[e++]=null;var u=ze[e];if(ze[e++]=null,n!==null&&a!==null){var i=n.pending;i===null?a.next=a:(a.next=i.next,i.next=a),n.pending=a}u!==0&&c0(l,a,u)}}function Lo(t,e,l,n){ze[Sa++]=t,ze[Sa++]=e,ze[Sa++]=l,ze[Sa++]=n,Ar|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function Cr(t,e,l,n){return Lo(t,e,l,n),so(t)}function Pn(t,e){return Lo(t,null,null,e),so(t)}function c0(t,e,l){t.lanes|=l;var n=t.alternate;n!==null&&(n.lanes|=l);for(var a=!1,u=t.return;u!==null;)u.childLanes|=l,n=u.alternate,n!==null&&(n.childLanes|=l),u.tag===22&&(t=u.stateNode,t===null||t._visibility&1||(a=!0)),t=u,u=u.return;return t.tag===3?(u=t.stateNode,a&&e!==null&&(a=31-Se(l),t=u.hiddenUpdates,n=t[a],n===null?t[a]=[e]:n.push(e),e.lane=l|536870912),u):null}function so(t){if(50<Ru)throw Ru=0,$i=null,Error(E(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Ea={};function Gv(t,e,l,n){this.tag=t,this.key=l,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ue(t,e,l,n){return new Gv(t,e,l,n)}function kr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function zl(t,e){var l=t.alternate;return l===null?(l=ue(t.tag,e,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=e,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&1206910976,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function r0(t,e){t.flags&=1206910978;var l=t.alternate;return l===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=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function ji(t,e,l,n,a,u){var i=0;if(n=t,typeof n=="function")kr(n)&&(i=1);else if(typeof n=="string")i=db(t,l,cl.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(n){case ic:return t=ue(31,l,e,a),t.elementType=ic,t.lanes=u,t;case ma:return Ln(l.children,a,u,e);case zm:i=8,a|=24;break;case nc:return t=ue(12,l,e,a|2),t.elementType=nc,t.lanes=u,t;case ac:return t=ue(13,l,e,a),t.elementType=ac,t.lanes=u,t;case uc:return t=ue(19,l,e,a),t.elementType=uc,t.lanes=u,t;case zg:case oc:return t=a|32,t=ue(30,l,e,t),t.elementType=oc,t.lanes=u,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case ul:i=10;break t;case Om:i=9;break t;case dr:i=11;break t;case hr:i=14;break t;case Pl:i=16,n=null;break t}i=29,l=Error(E(130,t===null?"null":typeof t,"")),n=null}return e=ue(i,l,e,a),e.elementType=t,e.type=n,e.lanes=u,e}function Ln(t,e,l,n){return t=ue(7,t,n,e),t.lanes=l,t}function qs(t,e,l){return t=ue(6,t,null,e),t.lanes=l,t}function f0(t){var e=ue(18,null,null,0);return e.stateNode=t,e}function Hs(t,e,l){return e=ue(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var ch=new WeakMap;function Ne(t,e){if(typeof t=="object"&&t!==null){var l=ch.get(t);return l!==void 0?l:(e={value:t,source:e,stack:jd(e)},ch.set(t,e),e)}return{value:t,source:e,stack:jd(e)}}var Ta=[],Aa=0,co=null,Du=0,Oe=[],Ue=0,bn=null,ol=1,sl="";function kl(t,e){Ta[Aa++]=Du,Ta[Aa++]=co,co=t,Du=e}function d0(t,e,l){Oe[Ue++]=ol,Oe[Ue++]=sl,Oe[Ue++]=bn,bn=t;var n=ol;t=sl;var a=32-Se(n)-1;n&=~(1<<a),l+=1;var u=32-Se(e)+a;if(30<u){var i=a-a%5;u=(n&(1<<i)-1).toString(32),n>>=i,a-=i,ol=1<<32-Se(e)+a|l<<a|n,sl=u+t}else ol=1<<u|l<<a|n,sl=t}function Bo(t){t.return!==null&&(kl(t,1),d0(t,1,0))}function wr(t){for(;t===co;)co=Ta[--Aa],Ta[Aa]=null,Du=Ta[--Aa],Ta[Aa]=null;for(;t===bn;)bn=Oe[--Ue],Oe[Ue]=null,sl=Oe[--Ue],Oe[Ue]=null,ol=Oe[--Ue],Oe[Ue]=null}function h0(t,e){Oe[Ue++]=ol,Oe[Ue++]=sl,Oe[Ue++]=bn,ol=e.id,sl=e.overflow,bn=t}var qt=null,rt=null,B=!1,rn=null,Me=!1,Sc=Error(E(519));function Sn(t){var e=Error(E(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw qu(Ne(e,t)),Sc}function rh(t){var e=t.stateNode,l=t.type,n=t.memoizedProps;switch(e[Lt]=t,e[se]=n,l){case"dialog":X("cancel",e),X("close",e);break;case"iframe":case"object":case"embed":X("load",e);break;case"video":case"audio":for(l=0;l<Gu.length;l++)X(Gu[l],e);break;case"source":X("error",e);break;case"img":case"image":case"link":X("error",e),X("load",e);break;case"details":X("toggle",e);break;case"input":X("invalid",e),Xm(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":X("invalid",e);break;case"textarea":X("invalid",e),Vm(e,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||e.textContent===""+l||n.suppressHydrationWarning===!0||Jy(e.textContent,l)?(n.popover!=null&&(X("beforetoggle",e),X("toggle",e)),n.onScroll!=null&&X("scroll",e),n.onScrollEnd!=null&&X("scrollend",e),n.onClick!=null&&(e.onclick=il),e=!0):e=!1,e||Sn(t,!0)}function ro(t){for(qt=t.return;qt;)switch(qt.tag){case 5:case 31:case 13:Me=!1;return;case 27:case 3:Me=!0;return;default:qt=qt.return}}function sa(t){if(t!==qt)return!1;if(!B)return ro(t),B=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||ar(t.type,t.memoizedProps)),l=!l),l&&rt&&Sn(t),ro(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(E(317));rt=im(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(E(317));rt=im(t)}else e===27?(e=rt,kn(t.type)?(t=sr,sr=null,rt=t):rt=e):rt=qt?_e(t.stateNode.nextSibling):null;return!0}function Yn(){rt=qt=null,B=!1}function Ls(){var t=rn;return t!==null&&(ne===null?ne=t:ne.push.apply(ne,t),rn=null),t}function qu(t){rn===null?rn=[t]:rn.push(t)}var Ec=dl(null),ta=null,wl=null;function an(t,e,l){ft(Ec,e._currentValue),e._currentValue=l}function Ol(t){t._currentValue=Ec.current,Gt(Ec)}function Yi(t,e,l){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===l)break;t=t.return}}function Tc(t,e,l,n){var a=t.child;for(a!==null&&(a.return=t);a!==null;){var u=a.dependencies;if(u!==null){var i=a.child;u=u.firstContext;t:for(;u!==null;){var o=u;u=a;for(var s=0;s<e.length;s++)if(o.context===e[s]){u.lanes|=l,o=u.alternate,o!==null&&(o.lanes|=l),Yi(u.return,l,t),n||(i=null);break t}u=o.next}}else if(a.tag===18){if(i=a.return,i===null)throw Error(E(341));i.lanes|=l,u=i.alternate,u!==null&&(u.lanes|=l),Yi(i,l,t),i=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=l,i=a.alternate,i!==null&&(i.lanes|=l),Yi(a.return,l,t),i=a.child,i=i!==null?i.sibling:null):i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}}function Xn(t,e,l,n){t=null;for(var a=e,u=!1;a!==null;){if(!u){if((a.flags&524288)!==0)u=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var i=a.alternate;if(i===null)throw Error(E(387));if(i=i.memoizedProps,i!==null){var o=a.type;Te(a.pendingProps.value,i.value)||(t!==null?t.push(o):t=[o])}}else if(a===lo.current){if(i=a.alternate,i===null)throw Error(E(387));i.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push(Va):t=[Va])}a=a.return}return t!==null&&Tc(e,t,l,n),e.flags|=262144,t!==null}function fo(t){for(t=t.firstContext;t!==null;){if(!Te(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Qn(t){ta=t,wl=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Bt(t){return m0(ta,t)}function Ci(t,e){return ta===null&&Qn(t),m0(t,e)}function m0(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},wl===null){if(t===null)throw Error(E(308));wl=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else wl=wl.next=e;return l}var jv=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,n){t.push(n)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},Yv=Mt.unstable_scheduleCallback,Xv=Mt.unstable_NormalPriority,zt={$$typeof:ul,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zr(){return{controller:new jv,data:new Map,refCount:0}}function Pu(t){t.refCount--,t.refCount===0&&Yv(Xv,function(){t.controller.abort()})}function fh(t,e){if((t.pendingLanes&4194048)!==0){var l=t.transitionTypes;for(l===null&&(l=t.transitionTypes=[]),t=0;t<e.length;t++){var n=e[t];l.indexOf(n)===-1&&l.push(n)}}}var pu=null;function Qv(t){var e=t.transitionTypes;return t.transitionTypes=null,e}var Eu=null,Ac=0,Vn=0,Oa=null;function Vv(t,e){if(Eu===null){var l=Eu=[];Ac=0,Vn=ef(),Oa={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Ac++,e.then(dh,dh),e}function dh(){if(--Ac===0&&(pu=null,Eu!==null)){Oa!==null&&(Oa.status="fulfilled");var t=Eu;Eu=null,Vn=0,Oa=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Zv(t,e){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return t.then(function(){n.status="fulfilled",n.value=e;for(var a=0;a<l.length;a++)(0,l[a])(e)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var hh=M.S;M.S=function(t,e){if(My=ve(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&Vv(t,e),pu!==null)for(var l=Ya;l!==null;)fh(l,pu),l=l.next;if(l=t.types,l!==null){for(var n=Ya;n!==null;)fh(n,l),n=n.next;if(Vn!==0){n=pu,n===null&&(n=pu=[]);for(var a=0;a<l.length;a++){var u=l[a];n.indexOf(u)===-1&&n.push(u)}}}hh!==null&&hh(t,e)};var Bn=dl(null);function Or(){var t=Bn.current;return t!==null?t:it.pooledCache}function Xi(t,e){e===null?ft(Bn,Bn.current):ft(Bn,e.pool)}function y0(){var t=Or();return t===null?null:{parent:zt._currentValue,pool:t}}var $a=Error(E(460)),Ur=Error(E(474)),Go=Error(E(542)),ho={then:function(){}};function mh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function p0(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(il,il),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ph(t),t===void 0&&!("reason"in e)?Error(E(600)):t;default:if(typeof e.status=="string")e.then(il,il);else{if(t=it,t!==null&&100<t.shellSuspendCounter)throw Error(E(482));t=e,t.status="pending",t.then(function(n){if(e.status==="pending"){var a=e;a.status="fulfilled",a.value=n}},function(n){if(e.status==="pending"){var a=e;a.status="rejected",a.reason=n}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ph(t),t}throw Gn=e,$a}}function _n(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Gn=l,$a):l}}var Gn=null;function yh(){if(Gn===null)throw Error(E(459));var t=Gn;return Gn=null,t}function ph(t){if(t===$a||t===Go)throw Error(E(483))}var Ua=null,Hu=0;function ki(t){var e=Hu;return Hu+=1,Ua===null&&(Ua=[]),p0(Ua,t,e)}function $l(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function wi(t,e){throw e.$$typeof===wg?Error(E(525)):(t=Object.prototype.toString.call(e),Error(E(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function g0(t){function e(p,h){if(t){var g=p.deletions;g===null?(p.deletions=[h],p.flags|=16):g.push(h)}}function l(p,h){if(!t)return null;for(;h!==null;)e(p,h),h=h.sibling;return null}function n(p){for(var h=new Map;p!==null;)p.key===null?h.set(p.index,p):h.set(p.key,p),p=p.sibling;return h}function a(p,h){return p=zl(p,h),p.index=0,p.sibling=null,p}function u(p,h,g){return p.index=g,t?(g=p.alternate,g!==null?(g=g.index,g<h?(p.flags|=2,h):g):(p.flags|=134217730,h)):(p.flags|=1048576,h)}function i(p){return t&&p.alternate===null&&(p.flags|=134217730),p}function o(p,h,g,S){return h===null||h.tag!==6?(h=qs(g,p.mode,S),h.return=p,h):(h=a(h,g),h.return=p,h)}function s(p,h,g,S){var w=g.type;return w===ma?(p=d(p,h,g.props.children,S,g.key),$l(p,g),p):h!==null&&(h.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Pl&&_n(w)===h.type)?(h=a(h,g.props),$l(h,g),h.return=p,h):(h=ji(g.type,g.key,g.props,null,p.mode,S),$l(h,g),h.return=p,h)}function r(p,h,g,S){return h===null||h.tag!==4||h.stateNode.containerInfo!==g.containerInfo||h.stateNode.implementation!==g.implementation?(h=Hs(g,p.mode,S),h.return=p,h):(h=a(h,g.children||[]),h.return=p,h)}function d(p,h,g,S,w){return h===null||h.tag!==7?(h=Ln(g,p.mode,S,w),h.return=p,h):(h=a(h,g),h.return=p,h)}function y(p,h,g){if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return h=qs(""+h,p.mode,g),h.return=p,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case pi:return g=ji(h.type,h.key,h.props,null,p.mode,g),$l(g,h),g.return=p,g;case hu:return h=Hs(h,p.mode,g),h.return=p,h;case Pl:return h=_n(h),y(p,h,g)}if(mu(h)||ou(h))return h=Ln(h,p.mode,g,null),h.return=p,h;if(typeof h.then=="function")return y(p,ki(h),g);if(h.$$typeof===ul)return y(p,Ci(p,h),g);wi(p,h)}return null}function f(p,h,g,S){var w=h!==null?h.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return w!==null?null:o(p,h,""+g,S);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case pi:return g.key===w?s(p,h,g,S):null;case hu:return g.key===w?r(p,h,g,S):null;case Pl:return g=_n(g),f(p,h,g,S)}if(mu(g)||ou(g))return w!==null?null:d(p,h,g,S,null);if(typeof g.then=="function")return f(p,h,ki(g),S);if(g.$$typeof===ul)return f(p,h,Ci(p,g),S);wi(p,g)}return null}function m(p,h,g,S,w){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return p=p.get(g)||null,o(h,p,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case pi:return p=p.get(S.key===null?g:S.key)||null,s(h,p,S,w);case hu:return p=p.get(S.key===null?g:S.key)||null,r(h,p,S,w);case Pl:return S=_n(S),m(p,h,g,S,w)}if(mu(S)||ou(S))return p=p.get(g)||null,d(h,p,S,w,null);if(typeof S.then=="function")return m(p,h,g,ki(S),w);if(S.$$typeof===ul)return m(p,h,g,Ci(h,S),w);wi(h,S)}return null}function b(p,h,g,S){for(var w=null,U=null,O=h,C=h=0,_=null;O!==null&&C<g.length;C++){O.index>C?(_=O,O=null):_=O.sibling;var H=f(p,O,g[C],S);if(H===null){O===null&&(O=_);break}t&&O&&H.alternate===null&&e(p,O),h=u(H,h,C),U===null?w=H:U.sibling=H,U=H,O=_}if(C===g.length)return l(p,O),B&&kl(p,C),w;if(O===null){for(;C<g.length;C++)O=y(p,g[C],S),O!==null&&(h=u(O,h,C),U===null?w=O:U.sibling=O,U=O);return B&&kl(p,C),w}for(O=n(O);C<g.length;C++)_=m(O,p,C,g[C],S),_!==null&&(t&&(H=_.alternate,H!==null&&O.delete(H.key===null?C:H.key)),h=u(_,h,C),U===null?w=_:U.sibling=_,U=_);return t&&O.forEach(function(te){return e(p,te)}),B&&kl(p,C),w}function v(p,h,g,S){if(g==null)throw Error(E(151));for(var w=null,U=null,O=h,C=h=0,_=null,H=g.next();O!==null&&!H.done;C++,H=g.next()){O.index>C?(_=O,O=null):_=O.sibling;var te=f(p,O,H.value,S);if(te===null){O===null&&(O=_);break}t&&O&&te.alternate===null&&e(p,O),h=u(te,h,C),U===null?w=te:U.sibling=te,U=te,O=_}if(H.done)return l(p,O),B&&kl(p,C),w;if(O===null){for(;!H.done;C++,H=g.next())H=y(p,H.value,S),H!==null&&(h=u(H,h,C),U===null?w=H:U.sibling=H,U=H);return B&&kl(p,C),w}for(O=n(O);!H.done;C++,H=g.next())H=m(O,p,C,H.value,S),H!==null&&(t&&(_=H.alternate,_!==null&&O.delete(_.key===null?C:_.key)),h=u(H,h,C),U===null?w=H:U.sibling=H,U=H);return t&&O.forEach(function(Qt){return e(p,Qt)}),B&&kl(p,C),w}function A(p,h,g,S){if(typeof g=="object"&&g!==null&&g.type===ma&&g.key===null&&g.props.ref===void 0&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case pi:t:{for(var w=g.key;h!==null;){if(h.key===w){if(w=g.type,w===ma){if(h.tag===7){l(p,h.sibling),S=a(h,g.props.children),$l(S,g),S.return=p,p=S;break t}}else if(h.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Pl&&_n(w)===h.type){l(p,h.sibling),S=a(h,g.props),$l(S,g),S.return=p,p=S;break t}l(p,h);break}else e(p,h);h=h.sibling}g.type===ma?(S=Ln(g.props.children,p.mode,S,g.key),$l(S,g),S.return=p,p=S):(S=ji(g.type,g.key,g.props,null,p.mode,S),$l(S,g),S.return=p,p=S)}return i(p);case hu:t:{for(w=g.key;h!==null;){if(h.key===w)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){l(p,h.sibling),S=a(h,g.children||[]),S.return=p,p=S;break t}else{l(p,h);break}else e(p,h);h=h.sibling}S=Hs(g,p.mode,S),S.return=p,p=S}return i(p);case Pl:return g=_n(g),A(p,h,g,S)}if(mu(g))return b(p,h,g,S);if(ou(g)){if(w=ou(g),typeof w!="function")throw Error(E(150));return g=w.call(g),v(p,h,g,S)}if(typeof g.then=="function")return A(p,h,ki(g),S);if(g.$$typeof===ul)return A(p,h,Ci(p,g),S);wi(p,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,h!==null&&h.tag===6?(l(p,h.sibling),S=a(h,g),S.return=p,p=S):(l(p,h),S=qs(g,p.mode,S),S.return=p,p=S),i(p)):l(p,h)}return function(p,h,g,S){try{Hu=0;var w=A(p,h,g,S);return Ua=null,w}catch(O){if(O===$a||O===Go)throw O;var U=ue(29,O,null,p.mode);return U.lanes=S,U.return=p,U}}}var Zn=g0(!0),v0=g0(!1),tn=!1;function Rr(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Cc(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 fn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function dn(t,e,l){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,($&2)!==0){var a=n.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),n.pending=e,e=so(t),c0(t,null,l),e}return Lo(t,n,e,l),so(t)}function Tu(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Dm(t,l)}}function Bs(t,e){var l=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var i={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?a=u=i:u=u.next=i,l=l.next}while(l!==null);u===null?a=u=e:u=u.next=e}else a=u=e;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var kc=!1;function Au(){if(kc){var t=Oa;if(t!==null)throw t}}function Cu(t,e,l,n){kc=!1;var a=t.updateQueue;tn=!1;var u=a.firstBaseUpdate,i=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var s=o,r=s.next;s.next=null,i===null?u=r:i.next=r,i=s;var d=t.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==i&&(o===null?d.firstBaseUpdate=r:o.next=r,d.lastBaseUpdate=s))}if(u!==null){var y=a.baseState;i=0,d=r=s=null,o=u;do{var f=o.lane&-536870913,m=f!==o.lane;if(m?(Z&f)===f:(n&f)===f){f!==0&&f===Vn&&(kc=!0),d!==null&&(d=d.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});t:{var b=t,v=o;f=e;var A=l;switch(v.tag){case 1:if(b=v.payload,typeof b=="function"){y=b.call(A,y,f);break t}y=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=v.payload,f=typeof b=="function"?b.call(A,y,f):b,f==null)break t;y=ot({},y,f);break t;case 2:tn=!0}}f=o.callback,f!==null&&(t.flags|=64,m&&(t.flags|=8192),m=a.callbacks,m===null?a.callbacks=[f]:m.push(f))}else m={lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(r=d=m,s=y):d=d.next=m,i|=f;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;m=o,o=m.next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}while(!0);d===null&&(s=y),a.baseState=s,a.firstBaseUpdate=r,a.lastBaseUpdate=d,u===null&&(a.shared.lanes=0),An|=i,t.lanes=i,t.memoizedState=y}}function b0(t,e){if(typeof t!="function")throw Error(E(191,t));t.call(e)}function S0(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)b0(l[t],e)}var En=dl(null),mo=dl(0);function gh(t,e){t=xl,ft(mo,t),ft(En,e),xl=t|e.baseLanes}function wc(){ft(mo,xl),ft(En,En.current)}function Nr(){xl=mo.current,Gt(En),Gt(mo)}var Xt=dl(null),Kt=null;function hn(t){var e=t.alternate;ft(jt,jt.current&1),ft(Xt,t),Kt===null&&(e===null||En.current!==null||e.memoizedState!==null)&&(Kt=t)}function zc(t){ft(jt,jt.current),ft(Xt,t),Kt===null&&(Kt=t)}function E0(t){t.tag===22?(ft(jt,jt.current),ft(Xt,t),Kt===null&&(Kt=t)):mn()}function mn(){ft(jt,jt.current),ft(Xt,Xt.current)}function ye(t){Gt(Xt),Kt===t&&(Kt=null),Gt(jt)}var jt=dl(0);function Lu(t,e){ft(Xt,Xt.current),ft(jt,e)}function Mr(t){Gt(jt),Gt(Xt),Kt===t&&(Kt=null)}function yo(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||or(l)||uf(l)))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 Nl=0,D=null,at=null,wt=null,po=!1,Ra=!1,In=!1,go=0,Bu=0,Na=null,Iv=0;function vt(){throw Error(E(321))}function _r(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!Te(t[l],e[l]))return!1;return!0}function xr(t,e,l,n,a,u){return Nl=u,D=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,M.H=t===null||t.memoizedState===null?W0:P0,In=!1,u=l(n,a),In=!1,Ra&&(u=A0(e,l,n,a)),T0(t),u}function T0(t){M.H=vo;var e=at!==null&&at.next!==null;if(Nl=0,wt=at=D=null,po=!1,Bu=0,Na=null,e)throw Error(E(300));t===null||Ot||(t=t.dependencies,t!==null&&fo(t)&&(Ot=!0))}function A0(t,e,l,n){D=t;var a=0;do{if(Ra&&(Na=null),Bu=0,Ra=!1,25<=a)throw Error(E(301));if(a+=1,wt=at=null,t.updateQueue!=null){var u=t.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}M.H=e1,u=e(l,n)}while(Ra);return u}function Kv(){var t=M.H,e=t.useState()[0];return e=typeof e.then=="function"?ti(e):e,t=t.useState()[0],(at!==null?at.memoizedState:null)!==t&&(D.flags|=1024),e}function Dr(){var t=go!==0;return go=0,t}function qr(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function Hr(t){if(po){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}po=!1}Nl=0,wt=at=D=null,Ra=!1,Bu=go=0,Na=null}function Wt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?D.memoizedState=wt=t:wt=wt.next=t,wt}function Tt(){if(at===null){var t=D.alternate;t=t!==null?t.memoizedState:null}else t=at.next;var e=wt===null?D.memoizedState:wt.next;if(e!==null)wt=e,at=t;else{if(t===null)throw D.alternate===null?Error(E(467)):Error(E(310));at=t,t={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},wt===null?D.memoizedState=wt=t:wt=wt.next=t}return wt}function jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ti(t){var e=Bu;return Bu+=1,Na===null&&(Na=[]),t=p0(Na,t,e),e=D,(wt===null?e.memoizedState:wt.next)===null&&(e=e.alternate,M.H=e===null||e.memoizedState===null?W0:P0),t}function Yo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ti(t);if(t.$$typeof===Ug)return;if(t.$$typeof===ul)return Bt(t)}throw Error(E(438,String(t)))}function Lr(t){var e=null,l=D.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var n=D.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(e={data:n.data.map(function(a){return a.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),l===null&&(l=jo(),D.updateQueue=l),l.memoCache=e,l=e.data[e.index],l===void 0)for(l=e.data[e.index]=Array(t),n=0;n<t;n++)l[n]=Og;return e.index++,l}function Ml(t,e){return typeof e=="function"?e(t):e}function Qi(t){var e=Tt();return Br(e,at,t)}function Br(t,e,l){var n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=l;var a=t.baseQueue,u=n.pending;if(u!==null){if(a!==null){var i=a.next;a.next=u.next,u.next=i}e.baseQueue=a=u,n.pending=null}if(u=t.baseState,a===null)t.memoizedState=u;else{e=a.next;var o=i=null,s=null,r=e,d=!1;do{var y=r.lane&-536870913;if(y!==r.lane?(Z&y)===y:(Nl&y)===y){var f=r.revertLane;if(f===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:r.action,hasEagerState:r.hasEagerState,eagerState:r.eagerState,next:null}),y===Vn&&(d=!0);else if((Nl&f)===f){r=r.next,f===Vn&&(d=!0);continue}else y={lane:0,revertLane:r.revertLane,gesture:null,action:r.action,hasEagerState:r.hasEagerState,eagerState:r.eagerState,next:null},s===null?(o=s=y,i=u):s=s.next=y,D.lanes|=f,An|=f;y=r.action,In&&l(u,y),u=r.hasEagerState?r.eagerState:l(u,y)}else f={lane:y,revertLane:r.revertLane,gesture:r.gesture,action:r.action,hasEagerState:r.hasEagerState,eagerState:r.eagerState,next:null},s===null?(o=s=f,i=u):s=s.next=f,D.lanes|=y,An|=y;r=r.next}while(r!==null&&r!==e);if(s===null?i=u:s.next=o,!Te(u,t.memoizedState)&&(Ot=!0,d&&(l=Oa,l!==null)))throw l;t.memoizedState=u,t.baseState=i,t.baseQueue=s,n.lastRenderedState=u}return a===null&&(n.lanes=0),[t.memoizedState,n.dispatch]}function Gs(t){var e=Tt(),l=e.queue;if(l===null)throw Error(E(311));l.lastRenderedReducer=t;var n=l.dispatch,a=l.pending,u=e.memoizedState;if(a!==null){l.pending=null;var i=a=a.next;do u=t(u,i.action),i=i.next;while(i!==a);Te(u,e.memoizedState)||(Ot=!0),e.memoizedState=u,e.baseQueue===null&&(e.baseState=u),l.lastRenderedState=u}return[u,n]}function C0(t,e,l){var n=D,a=Tt(),u=B;if(u){if(l===void 0)throw Error(E(407));l=l()}else l=e();var i=!Te((at||a).memoizedState,l);if(i&&(a.memoizedState=l,Ot=!0),a=a.queue,Gr(z0.bind(null,n,a,t),[t]),t=a.getSnapshot!==e||i||wt!==null&&(wt.memoizedState.tag&1)!==0,La(t?9:8,{destroy:void 0},w0.bind(null,n,a,l,e),null),t){if(n.flags|=2048,it===null)throw Error(E(349));u||(Nl&127)!==0||k0(n,e,l)}return l}function k0(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=D.updateQueue,e===null?(e=jo(),D.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function w0(t,e,l,n){e.value=l,e.getSnapshot=n,O0(e)&&U0(t)}function z0(t,e,l){return l(function(){O0(e)&&U0(t)})}function O0(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!Te(t,l)}catch{return!0}}function U0(t){var e=Pn(t,2);e!==null&&ie(e,t,2)}function Oc(t){var e=Wt();if(typeof t=="function"){var l=t;if(t=l(),In){ln(!0);try{l()}finally{ln(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:t},e}function R0(t,e,l,n){return t.baseState=l,Br(t,at,typeof n=="function"?n:Ml)}function Jv(t,e,l,n,a){if(Qo(t))throw Error(E(485));if(t=e.action,t!==null){var u={payload:a,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){u.listeners.push(i)}};M.T!==null?l(!0):u.isTransition=!1,n(u),l=e.pending,l===null?(u.next=e.pending=u,N0(e,u)):(u.next=l.next,e.pending=l.next=u)}}function N0(t,e){var l=e.action,n=e.payload,a=t.state;if(e.isTransition){var u=M.T,i={};i.types=u!==null?u.types:null,M.T=i;try{var o=l(a,n),s=M.S;s!==null&&s(i,o),vh(t,e,o)}catch(r){Uc(t,e,r)}finally{u!==null&&i.types!==null&&(u.types=i.types),M.T=u}}else try{u=l(a,n),vh(t,e,u)}catch(r){Uc(t,e,r)}}function vh(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){bh(t,e,n)},function(n){return Uc(t,e,n)}):bh(t,e,l)}function bh(t,e,l){e.status="fulfilled",e.value=l,M0(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,N0(t,l)))}function Uc(t,e,l){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status="rejected",e.reason=l,M0(e),e=e.next;while(e!==n)}t.action=null}function M0(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function _0(t,e){return e}function Sh(t,e){if(B){var l=it.formState;if(l!==null){t:{var n=D;if(B){if(rt){e:{for(var a=rt,u=Me;a.nodeType!==8;){if(!u){a=null;break e}if(a=_e(a.nextSibling),a===null){a=null;break e}}u=a.data,a=u==="F!"||u==="F"?a:null}if(a){rt=_e(a.nextSibling),n=a.data==="F!";break t}}Sn(n)}n=!1}n&&(e=l[0])}}return l=Wt(),l.memoizedState=l.baseState=e,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_0,lastRenderedState:e},l.queue=n,l=J0.bind(null,D,n),n.dispatch=l,n=Oc(!1),u=Qr.bind(null,D,!1,n.queue),n=Wt(),a={state:e,dispatch:null,action:t,pending:null},n.queue=a,l=Jv.bind(null,D,a,u,l),a.dispatch=l,n.memoizedState=t,[e,l,!1]}function Eh(t){var e=Tt();return x0(e,at,t)}function x0(t,e,l){if(e=Br(t,e,_0)[0],t=Qi(Ml)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var n=ti(e)}catch(i){throw i===$a?Go:i}else n=e;e=Tt();var a=e.queue,u=a.dispatch;return l!==e.memoizedState&&(D.flags|=2048,La(9,{destroy:void 0},$v.bind(null,a,l),null)),[n,u,t]}function $v(t,e){t.action=e}function Th(t){var e=Tt(),l=at;if(l!==null)return x0(e,l,t);Tt(),e=e.memoizedState,l=Tt();var n=l.queue.dispatch;return l.memoizedState=t,[e,n,!1]}function La(t,e,l,n){return t={tag:t,create:l,deps:n,inst:e,next:null},e=D.updateQueue,e===null&&(e=jo(),D.updateQueue=e),l=e.lastEffect,l===null?e.lastEffect=t.next=t:(n=l.next,l.next=t,t.next=n,e.lastEffect=t),t}function D0(){return Tt().memoizedState}function Vi(t,e,l,n){var a=Wt();D.flags|=t,a.memoizedState=La(1|e,{destroy:void 0},l,n===void 0?null:n)}function Xo(t,e,l,n){var a=Tt();n=n===void 0?null:n;var u=a.memoizedState.inst;at!==null&&n!==null&&_r(n,at.memoizedState.deps)?a.memoizedState=La(e,u,l,n):(D.flags|=t,a.memoizedState=La(1|e,u,l,n))}function Ah(t,e){Vi(8390656,8,t,e)}function Gr(t,e){Xo(2048,8,t,e)}function Fv(t){D.flags|=4;var e=D.updateQueue;if(e===null)e=jo(),D.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function q0(t){var e=Tt().memoizedState;return Fv({ref:e,nextImpl:t}),function(){if(($&2)!==0)throw Error(E(440));return e.impl.apply(void 0,arguments)}}function H0(t,e){return Xo(4,2,t,e)}function L0(t,e){return Xo(4,4,t,e)}function B0(t,e){if(typeof e=="function"){t=t();var l=e(t);return function(){typeof l=="function"?l():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function G0(t,e,l){l=l!=null?l.concat([t]):null,Xo(4,4,B0.bind(null,e,t),l)}function jr(){}function j0(t,e){var l=Tt();e=e===void 0?null:e;var n=l.memoizedState;return e!==null&&_r(e,n[1])?n[0]:(l.memoizedState=[t,e],t)}function Y0(t,e){var l=Tt();e=e===void 0?null:e;var n=l.memoizedState;if(e!==null&&_r(e,n[1]))return n[0];if(n=t(),In){ln(!0);try{t()}finally{ln(!1)}}return l.memoizedState=[n,e],n}function Yr(t,e,l){return l===void 0||(Nl&1073741824)!==0&&(Z&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=xy(),D.lanes|=t,An|=t,l)}function X0(t,e,l,n){return Te(l,e)?l:En.current!==null?(t=Yr(t,l,n),Te(t,e)||(Ot=!0),t):(Nl&106)===0||(Nl&1073741824)!==0&&(Z&261930)===0?(Ot=!0,t.memoizedState=l):(t=xy(),D.lanes|=t,An|=t,e)}function Q0(t,e,l,n,a){var u=F.p;F.p=u!==0&&8>u?u:8;var i=M.T,o={};o.types=i!==null?i.types:null,M.T=o,Qr(t,!1,e,l);try{var s=a(),r=M.S;if(r!==null&&r(o,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var d=Zv(s,n);ku(t,e,d,Ee(t))}else ku(t,e,n,Ee(t))}catch(y){ku(t,e,{then:function(){},status:"rejected",reason:y},Ee())}finally{F.p=u,i!==null&&o.types!==null&&(i.types=o.types),M.T=i}}function Wv(){}function Rc(t,e,l,n){if(t.tag!==5)throw Error(E(476));var a=V0(t).queue;Q0(t,a,e,Hn,l===null?Wv:function(){return Z0(t),l(n)})}function V0(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Hn,baseState:Hn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:Hn},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Z0(t){var e=V0(t);e.next===null&&(e=t.alternate.memoizedState),ku(t,e.next.queue,{},Ee())}function Xr(){return Bt(Va)}function I0(){return Tt().memoizedState}function K0(){return Tt().memoizedState}function Pv(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=Ee();t=fn(l);var n=dn(e,t,l);n!==null&&(ie(n,e,l),Tu(n,e,l)),e={cache:zr()},t.payload=e;return}e=e.return}}function t1(t,e,l){var n=Ee();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Qo(t)?$0(e,l):(l=Cr(t,e,l,n),l!==null&&(ie(l,t,n),F0(l,e,n)))}function J0(t,e,l){var n=Ee();ku(t,e,l,n)}function ku(t,e,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Qo(t))$0(e,a);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var i=e.lastRenderedState,o=u(i,l);if(a.hasEagerState=!0,a.eagerState=o,Te(o,i))return Lo(t,e,a,0),it===null&&Ho(),!1}catch{}if(l=Cr(t,e,a,n),l!==null)return ie(l,t,n),F0(l,e,n),!0}return!1}function Qr(t,e,l,n){if(n={lane:2,revertLane:ef(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Qo(t)){if(e)throw Error(E(479))}else e=Cr(t,l,n,2),e!==null&&ie(e,t,2)}function Qo(t){var e=t.alternate;return t===D||e!==null&&e===D}function $0(t,e){Ra=po=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function F0(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Dm(t,l)}}var vo={readContext:Bt,use:Yo,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useLayoutEffect:vt,useInsertionEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useSyncExternalStore:vt,useId:vt,useHostTransitionStatus:vt,useFormState:vt,useActionState:vt,useOptimistic:vt,useMemoCache:vt,useCacheRefresh:vt,useEffectEvent:vt},W0={readContext:Bt,use:Yo,useCallback:function(t,e){return Wt().memoizedState=[t,e===void 0?null:e],t},useContext:Bt,useEffect:Ah,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,Vi(4194308,4,B0.bind(null,e,t),l)},useLayoutEffect:function(t,e){return Vi(4194308,4,t,e)},useInsertionEffect:function(t,e){Vi(4,2,t,e)},useMemo:function(t,e){var l=Wt();e=e===void 0?null:e;var n=t();if(In){ln(!0);try{t()}finally{ln(!1)}}return l.memoizedState=[n,e],n},useReducer:function(t,e,l){var n=Wt();if(l!==void 0){var a=l(e);if(In){ln(!0);try{l(e)}finally{ln(!1)}}}else a=e;return n.memoizedState=n.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},n.queue=t,t=t.dispatch=t1.bind(null,D,t),[n.memoizedState,t]},useRef:function(t){var e=Wt();return t={current:t},e.memoizedState=t},useState:function(t){t=Oc(t);var e=t.queue,l=J0.bind(null,D,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:jr,useDeferredValue:function(t,e){var l=Wt();return Yr(l,t,e)},useTransition:function(){var t=Oc(!1);return t=Q0.bind(null,D,t.queue,!0,!1),Wt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var n=D,a=Wt();if(B){if(l===void 0)throw Error(E(407));l=l()}else{if(l=e(),it===null)throw Error(E(349));(Z&127)!==0||k0(n,e,l)}a.memoizedState=l;var u={value:l,getSnapshot:e};return a.queue=u,Ah(z0.bind(null,n,u,t),[t]),n.flags|=2048,La(9,{destroy:void 0},w0.bind(null,n,u,l,e),null),l},useId:function(){var t=Wt(),e=it.identifierPrefix;if(B){var l=sl,n=ol;l=(n&~(1<<32-Se(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=go++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=Iv++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Xr,useFormState:Sh,useActionState:Sh,useOptimistic:function(t){var e=Wt();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=Qr.bind(null,D,!0,l),l.dispatch=e,[t,e]},useMemoCache:Lr,useCacheRefresh:function(){return Wt().memoizedState=Pv.bind(null,D)},useEffectEvent:function(t){var e=Wt(),l={impl:t};return e.memoizedState=l,function(){if(($&2)!==0)throw Error(E(440));return l.impl.apply(void 0,arguments)}}},P0={readContext:Bt,use:Yo,useCallback:j0,useContext:Bt,useEffect:Gr,useImperativeHandle:G0,useInsertionEffect:H0,useLayoutEffect:L0,useMemo:Y0,useReducer:Qi,useRef:D0,useState:function(){return Qi(Ml)},useDebugValue:jr,useDeferredValue:function(t,e){var l=Tt();return X0(l,at.memoizedState,t,e)},useTransition:function(){var t=Qi(Ml)[0],e=Tt().memoizedState;return[typeof t=="boolean"?t:ti(t),e]},useSyncExternalStore:C0,useId:I0,useHostTransitionStatus:Xr,useFormState:Eh,useActionState:Eh,useOptimistic:function(t,e){var l=Tt();return R0(l,at,t,e)},useMemoCache:Lr,useCacheRefresh:K0,useEffectEvent:q0},e1={readContext:Bt,use:Yo,useCallback:j0,useContext:Bt,useEffect:Gr,useImperativeHandle:G0,useInsertionEffect:H0,useLayoutEffect:L0,useMemo:Y0,useReducer:Gs,useRef:D0,useState:function(){return Gs(Ml)},useDebugValue:jr,useDeferredValue:function(t,e){var l=Tt();return at===null?Yr(l,t,e):X0(l,at.memoizedState,t,e)},useTransition:function(){var t=Gs(Ml)[0],e=Tt().memoizedState;return[typeof t=="boolean"?t:ti(t),e]},useSyncExternalStore:C0,useId:I0,useHostTransitionStatus:Xr,useFormState:Th,useActionState:Th,useOptimistic:function(t,e){var l=Tt();return at!==null?R0(l,at,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Lr,useCacheRefresh:K0,useEffectEvent:q0};function js(t,e,l,n){e=t.memoizedState,l=l(n,e),l=l==null?e:ot({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var Nc={enqueueSetState:function(t,e,l){t=t._reactInternals;var n=Ee(),a=fn(n);a.payload=e,l!=null&&(a.callback=l),e=dn(t,a,n),e!==null&&(ie(e,t,n),Tu(e,t,n))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var n=Ee(),a=fn(n);a.tag=1,a.payload=e,l!=null&&(a.callback=l),e=dn(t,a,n),e!==null&&(ie(e,t,n),Tu(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=Ee(),n=fn(l);n.tag=2,e!=null&&(n.callback=e),e=dn(t,n,l),e!==null&&(ie(e,t,l),Tu(e,t,l))}};function Ch(t,e,l,n,a,u,i){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,u,i):e.prototype&&e.prototype.isPureReactComponent?!xu(l,n)||!xu(a,u):!0}function kh(t,e,l,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,n),e.state!==t&&Nc.enqueueReplaceState(e,e.state,null)}function Kn(t,e){var l=e;if("ref"in e){l={};for(var n in e)n!=="ref"&&(l[n]=e[n])}if(t=t.defaultProps){l===e&&(l=ot({},l));for(var a in t)l[a]===void 0&&(l[a]=t[a])}return l}function ty(t){oo(t)}function ey(t){console.error(t)}function ly(t){oo(t)}function bo(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function wh(t,e,l){try{var n=t.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Mc(t,e,l){return l=fn(l),l.tag=3,l.payload={element:null},l.callback=function(){bo(t,e)},l}function ny(t){return t=fn(t),t.tag=3,t}function ay(t,e,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var u=n.value;t.payload=function(){return a(u)},t.callback=function(){wh(e,l,n)}}var i=l.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(t.callback=function(){wh(e,l,n),typeof a!="function"&&(yn===null?yn=new Set([this]):yn.add(this));var o=n.stack;this.componentDidCatch(n.value,{componentStack:o!==null?o:""})})}function l1(t,e,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(e=l.alternate,e!==null&&Xn(e,l,a,!0),l=Xt.current,l!==null){switch(l.tag){case 31:case 13:case 19:return Kt===null?zo():l.alternate===null&&bt===0&&(bt=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===ho?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([n]):e.add(n),Ks(t,n,a)),!1;case 22:return l.flags|=65536,n===ho?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([n]):l.add(n)),Ks(t,n,a)),!1}throw Error(E(435,l.tag))}return Ks(t,n,a),zo(),!1}if(B)return e=Xt.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,n!==Sc&&(t=Error(E(422),{cause:n}),qu(Ne(t,l)))):(n!==Sc&&(e=Error(E(423),{cause:n}),qu(Ne(e,l))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,n=Ne(n,l),a=Mc(t.stateNode,n,a),Bs(t,a),bt!==4&&(bt=2)),!1;var u=Error(E(520),{cause:n});if(u=Ne(u,l),Uu===null?Uu=[u]:Uu.push(u),bt!==4&&(bt=2),e===null)return!0;n=Ne(n,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=a&-a,l.lanes|=t,t=Mc(l.stateNode,n,t),Bs(l,t),!1;case 1:if(e=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(yn===null||!yn.has(u))))return l.flags|=65536,a&=-a,l.lanes|=a,a=ny(a),ay(a,t,l,n),Bs(l,a),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Vr=Error(E(461)),Ot=!1;function Rt(t,e,l,n){e.child=t===null?v0(e,null,l,n):Zn(e,t.child,l,n)}function zh(t,e,l,n,a){l=l.render;var u=e.ref;if("ref"in n){var i={};for(var o in n)o!=="ref"&&(i[o]=n[o])}else i=n;return Qn(e),n=xr(t,e,l,i,u,a),o=Dr(),t!==null&&!Ot?(qr(t,e,a),_l(t,e,a)):(B&&o&&Bo(e),e.flags|=1,Rt(t,e,n,a),e.child)}function Oh(t,e,l,n,a){if(t===null){var u=l.type;return typeof u=="function"&&!kr(u)&&u.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=u,uy(t,e,u,n,a)):(t=ji(l.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(u=t.child,!Ir(t,a)){var i=u.memoizedProps;if(l=l.compare,l=l!==null?l:xu,l(i,n)&&t.ref===e.ref)return _l(t,e,a)}return e.flags|=1,t=zl(u,n),t.ref=e.ref,t.return=e,e.child=t}function uy(t,e,l,n,a){if(t!==null){var u=t.memoizedProps;if(xu(u,n)&&t.ref===e.ref)if(Ot=!1,e.pendingProps=n=u,Ir(t,a))(t.flags&131072)!==0&&(Ot=!0);else return e.lanes=t.lanes,_l(t,e,a)}return _c(t,e,l,n,a)}function iy(t,e,l,n){var a=n.children,u=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((e.flags&128)!==0){if(u=u!==null?u.baseLanes|l:l,t!==null){for(n=e.child=t.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~u}else n=0,e.child=null;return Uh(t,e,u,l,n)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Xi(e,u!==null?u.cachePool:null),u!==null?gh(e,u):wc(),E0(e);else return n=e.lanes=536870912,Uh(t,e,u!==null?u.baseLanes|l:l,l,n)}else u!==null?(Xi(e,u.cachePool),gh(e,u),mn(),e.memoizedState=null):(t!==null&&Xi(e,null),wc(),mn());return Rt(t,e,a,l),e.child}function wu(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Uh(t,e,l,n,a){var u=Or();return u=u===null?null:{parent:zt._currentValue,pool:u},e.memoizedState={baseLanes:l,cachePool:u},t!==null&&Xi(e,null),wc(),E0(e),t!==null&&Xn(t,e,n,!0),e.childLanes=a,null}function Zi(t,e){return e=Vo({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Rh(t,e,l){return Zn(e,t.child,null,l),t=Zi(e,e.pendingProps),t.flags|=2,ye(e),e.memoizedState=null,t}function n1(t,e,l){var n=e.pendingProps,a=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(B){if(n.mode==="hidden")return t=Zi(e,n),e.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},wu(null,t);if(zc(e),(t=rt)?(t=ip(t,Me),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:bn!==null?{id:ol,overflow:sl}:null,retryLane:536870912,hydrationErrors:null},l=f0(t),l.return=e,e.child=l,qt=e,rt=null)):t=null,t===null)throw Sn(e);return e.lanes=536870912,null}return Zi(e,n)}var u=t.memoizedState;if(u!==null){var i=u.dehydrated;if(zc(e),a)if(e.flags&256)e.flags&=-257,e=Rh(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(E(558));else if(Ot||Xn(t,e,l,!1),a=(l&t.childLanes)!==0,Ot||a){if(En.current===null){if(n=it,n!==null&&(i=qm(n,l),i!==0&&i!==u.retryLane))throw u.retryLane=i,Pn(t,i),ie(n,t,i),Vr;zo()}e=Rh(t,e,l)}else t=u.treeContext,rt=_e(i.nextSibling),qt=e,B=!0,rn=null,Me=!1,t!==null&&h0(e,t),e=Zi(e,n),e.flags|=134221824;return e}return t=zl(t.child,{mode:n.mode,children:n.children}),t.ref=e.ref,e.child=t,t.return=e,t}function ra(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(E(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function _c(t,e,l,n,a){return Qn(e),l=xr(t,e,l,n,void 0,a),n=Dr(),t!==null&&!Ot?(qr(t,e,a),_l(t,e,a)):(B&&n&&Bo(e),e.flags|=1,Rt(t,e,l,a),e.child)}function Nh(t,e,l,n,a,u){return Qn(e),e.updateQueue=null,l=A0(e,n,l,a),T0(t),n=Dr(),t!==null&&!Ot?(qr(t,e,u),_l(t,e,u)):(B&&n&&Bo(e),e.flags|=1,Rt(t,e,l,u),e.child)}function Mh(t,e,l,n,a){if(Qn(e),e.stateNode===null){var u=Ea,i=l.contextType;typeof i=="object"&&i!==null&&(u=Bt(i)),u=new l(n,u),e.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Nc,e.stateNode=u,u._reactInternals=e,u=e.stateNode,u.props=n,u.state=e.memoizedState,u.refs={},Rr(e),i=l.contextType,u.context=typeof i=="object"&&i!==null?Bt(i):Ea,u.state=e.memoizedState,i=l.getDerivedStateFromProps,typeof i=="function"&&(js(e,l,i,n),u.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(i=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),i!==u.state&&Nc.enqueueReplaceState(u,u.state,null),Cu(e,n,u,a),Au(),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308),n=!0}else if(t===null){u=e.stateNode;var o=e.memoizedProps,s=Kn(l,o);u.props=s;var r=u.context,d=l.contextType;i=Ea,typeof d=="object"&&d!==null&&(i=Bt(d));var y=l.getDerivedStateFromProps;d=typeof y=="function"||typeof u.getSnapshotBeforeUpdate=="function",o=e.pendingProps!==o,d||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(o||r!==i)&&kh(e,u,n,i),tn=!1;var f=e.memoizedState;u.state=f,Cu(e,n,u,a),Au(),r=e.memoizedState,o||f!==r||tn?(typeof y=="function"&&(js(e,l,y,n),r=e.memoizedState),(s=tn||Ch(e,l,s,n,f,r,i))?(d||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(e.flags|=4194308)):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=r),u.props=n,u.state=r,u.context=i,n=s):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{u=e.stateNode,Cc(t,e),i=e.memoizedProps,d=Kn(l,i),u.props=d,y=e.pendingProps,f=u.context,r=l.contextType,s=Ea,typeof r=="object"&&r!==null&&(s=Bt(r)),o=l.getDerivedStateFromProps,(r=typeof o=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==y||f!==s)&&kh(e,u,n,s),tn=!1,f=e.memoizedState,u.state=f,Cu(e,n,u,a),Au();var m=e.memoizedState;i!==y||f!==m||tn||t!==null&&t.dependencies!==null&&fo(t.dependencies)?(typeof o=="function"&&(js(e,l,o,n),m=e.memoizedState),(d=tn||Ch(e,l,d,n,f,m,s)||t!==null&&t.dependencies!==null&&fo(t.dependencies))?(r||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,m,s),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,m,s)),typeof u.componentDidUpdate=="function"&&(e.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof u.componentDidUpdate!="function"||i===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=m),u.props=n,u.state=m,u.context=s,n=d):(typeof u.componentDidUpdate!="function"||i===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),n=!1)}return u=n,ra(t,e),n=(e.flags&128)!==0,u||n?(u=e.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:u.render(),e.flags|=1,t!==null&&n?(e.child=Zn(e,t.child,null,a),e.child=Zn(e,null,l,a)):Rt(t,e,l,a),e.memoizedState=u.state,t=e.child):t=_l(t,e,a),t}function _h(t,e,l,n){return Yn(),e.flags|=256,Rt(t,e,l,n),e.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dc(t){return{baseLanes:t,cachePool:y0()}}function qc(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=ge),t}function oy(t,e,l){var n=e.pendingProps,a=!1,u=(e.flags&128)!==0,i;if((i=u)||(i=t!==null&&t.memoizedState===null?!1:(jt.current&2)!==0),i&&(a=!0,e.flags&=-129),i=(e.flags&32)!==0,e.flags&=-33,t===null){if(B){if(a?hn(e):mn(),(t=rt)?(t=ip(t,Me),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:bn!==null?{id:ol,overflow:sl}:null,retryLane:536870912,hydrationErrors:null},l=f0(t),l.return=e,e.child=l,qt=e,rt=null)):t=null,t===null)throw Sn(e);return uf(t)?e.lanes=32:e.lanes=536870912,null}return u=n.children,n=n.fallback,a?(mn(),a=e.mode,u=Vo({mode:"hidden",children:u},a),n=Ln(n,a,l,null),u.return=e,n.return=e,u.sibling=n,e.child=u,n=e.child,n.memoizedState=Dc(l),n.childLanes=qc(t,i,l),e.memoizedState=xc,wu(null,n)):(hn(e),Zr(e,u))}var o=t.memoizedState;if(o!==null){var s=o.dehydrated;if(s!==null)return a1(t,e,u,i,n,s,o,l)}return a?(mn(),a=n.fallback,u=e.mode,o=t.child,s=o.sibling,n=zl(o,{mode:"hidden",children:n.children}),n.subtreeFlags=o.subtreeFlags&1206910976,s!==null?a=zl(s,a):(a=Ln(a,u,l,null),a.flags|=2),a.return=e,n.return=e,n.sibling=a,e.child=n,wu(null,n),n=e.child,a=t.child.memoizedState,a===null?a=Dc(l):(u=a.cachePool,u!==null?(o=zt._currentValue,u=u.parent!==o?{parent:o,pool:o}:u):u=y0(),a={baseLanes:a.baseLanes|l,cachePool:u}),n.memoizedState=a,n.childLanes=qc(t,i,l),e.memoizedState=xc,wu(t.child,n)):(hn(e),l=t.child,t=l.sibling,l=zl(l,{mode:"visible",children:n.children}),l.return=e,l.sibling=null,t!==null&&(i=e.deletions,i===null?(e.deletions=[t],e.flags|=16):i.push(t)),e.child=l,e.memoizedState=null,l)}function Zr(t,e){return e=Vo({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Vo(t,e){return t=ue(22,t,null,e),t.lanes=0,t}function zi(t,e,l){return Zn(e,t.child,null,l),t=Zr(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function a1(t,e,l,n,a,u,i,o){if(l)return e.flags&256?(hn(e),e.flags&=-257,zi(t,e,o)):e.memoizedState!==null?(mn(),e.child=t.child,e.flags|=128,null):(mn(),u=a.fallback,i=e.mode,a=Vo({mode:"visible",children:a.children},i),u=Ln(u,i,o,null),u.flags|=2,a.return=e,u.return=e,a.sibling=u,e.child=a,Zn(e,t.child,null,o),a=e.child,a.memoizedState=Dc(o),a.childLanes=qc(t,n,o),e.memoizedState=xc,wu(null,a));if(hn(e),uf(u)){if(n=u.nextSibling&&u.nextSibling.dataset,n)var s=n.dgst;return n=s,n!==""&&(a=Error(E(419)),a.stack="",a.digest=n,qu({value:a,source:null,stack:null})),zi(t,e,o)}if(Ot||Xn(t,e,o,!1),n=(o&t.childLanes)!==0,Ot||n){if(En.current!==null)return zi(t,e,o);if(n=it,n!==null&&(a=qm(n,o),a!==0&&a!==i.retryLane))throw i.retryLane=a,Pn(t,a),ie(n,t,a),Vr;return or(u)||zo(),zi(t,e,o)}return or(u)?(e.flags|=192,e.child=t.child,null):(t=i.treeContext,rt=_e(u.nextSibling),qt=e,B=!0,rn=null,Me=!1,t!==null&&h0(e,t),e=Zr(e,a.children),e.flags|=134221824,e)}function xh(t,e,l){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Yi(t.return,e,l)}function Dh(t){for(var e=null;t!==null;){var l=t.alternate;l!==null&&yo(l)===null&&(e=t),t=t.sibling}return e}function Oi(t,e,l,n,a,u){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:u}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=l,i.tailMode=a,i.treeForkCount=u)}function Ys(t){var e=t.child;for(t.child=null;e!==null;){var l=e.sibling;e.sibling=t.child,t.child=e,e=l}}function Hc(t,e,l){var n=e.pendingProps,a=n.revealOrder,u=n.tail;n=n.children;var i=jt.current;if(e.flags&128)return Lu(e,i),null;var o=(i&2)!==0;if(o?(i=i&1|2,e.flags|=128):i&=1,Lu(e,i),a==="backwards"&&t!==null?(Ys(t),Rt(t,e,n,l),Ys(t)):Rt(t,e,n,l),n=B?Du:0,!o&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&xh(t,l,e);else if(t.tag===19)xh(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(a){case"backwards":l=Dh(e.child),l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null,Ys(e)),Oi(e,!0,a,null,u,n);break;case"unstable_legacy-backwards":for(l=null,a=e.child,e.child=null;a!==null;){if(t=a.alternate,t!==null&&yo(t)===null){e.child=a;break}t=a.sibling,a.sibling=l,l=a,a=t}Oi(e,!0,l,null,u,n);break;case"together":Oi(e,!1,null,null,void 0,n);break;case"independent":e.memoizedState=null;break;default:l=Dh(e.child),l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null),Oi(e,!1,a,l,u,n)}return e.child}function qh(t,e,l){var n=e.pendingProps;return an(e,e.type,n.value),Rt(t,e,n.children,l),e.child}function _l(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),An|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(Xn(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(E(153));if(e.child!==null){for(t=e.child,l=zl(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=zl(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function Ir(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&fo(t)))}function u1(t,e,l){switch(e.tag){case 3:no(e,e.stateNode.containerInfo),an(e,zt,t.memoizedState.cache),Yn();break;case 27:case 5:rc(e);break;case 4:no(e,e.stateNode.containerInfo);break;case 10:an(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,zc(e),null;break;case 13:var n=e.memoizedState;if(n!==null){if(n.dehydrated!==null)return hn(e),e.flags|=128,null;n=Xn(t,e,l,!1);var a=e.child.childLanes;return n||(l&a)!==0?oy(t,e,l):(hn(e),t=_l(t,e,l),t!==null?t.sibling:null)}hn(e);break;case 19:if(e.flags&128)return Hc(t,e,l);if(a=(t.flags&128)!==0,n=(l&e.childLanes)!==0,n||(Xn(t,e,l,!1),n=(l&e.childLanes)!==0),a){if(n)return Hc(t,e,l);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Lu(e,jt.current),n)break;return null;case 22:return e.lanes=0,iy(t,e,l,e.pendingProps);case 24:an(e,zt,t.memoizedState.cache)}return _l(t,e,l)}function sy(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Ot=!0;else{if(!Ir(t,l)&&(e.flags&128)===0)return Ot=!1,u1(t,e,l);Ot=(t.flags&131072)!==0}else Ot=!1,B&&(e.flags&1048576)!==0&&d0(e,Du,e.index);switch(e.lanes=0,e.tag){case 16:t:{var n=e.pendingProps;if(t=_n(e.elementType),e.type=t,typeof t=="function")kr(t)?(n=Kn(t,n),e.tag=1,e=Mh(null,e,t,n,l)):(e.tag=0,e=_c(null,e,t,n,l));else{if(t!=null){var a=t.$$typeof;if(a===dr){e.tag=11,e=zh(null,e,t,n,l);break t}else if(a===hr){e.tag=14,e=Oh(null,e,t,n,l);break t}else if(a===ul){e.tag=10,e.type=t,e=qh(null,e,l);break t}}throw e=sc(t)||t,Error(E(306,e,""))}}return e;case 0:return _c(t,e,e.type,e.pendingProps,l);case 1:return n=e.type,a=Kn(n,e.pendingProps),Mh(t,e,n,a,l);case 3:t:{if(no(e,e.stateNode.containerInfo),t===null)throw Error(E(387));n=e.pendingProps;var u=e.memoizedState;a=u.element,Cc(t,e),Cu(e,n,null,l);var i=e.memoizedState;if(n=i.cache,an(e,zt,n),n!==u.cache&&Tc(e,[zt],l,!0),Au(),n=i.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:i.cache},e.updateQueue.baseState=u,e.memoizedState=u,e.flags&256){e=_h(t,e,n,l);break t}else if(n!==a){a=Ne(Error(E(424)),e),qu(a),e=_h(t,e,n,l);break t}else for(t=e.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,rt=_e(t.firstChild),qt=e,B=!0,rn=null,Me=!0,l=v0(e,null,n,l),e.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling;else{if(Yn(),n===a){e=_l(t,e,l);break t}Rt(t,e,n,l)}e=e.child}return e;case 26:return ra(t,e),t===null?(l=cm(e.type,null,e.pendingProps,null))?e.memoizedState=l:B||(e.stateNode=Fy(e.type,e.pendingProps,cn.current,e)):e.memoizedState=cm(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return rc(e),t===null&&B&&(n=e.stateNode=op(e.type,e.pendingProps,cn.current),qt=e,Me=!0,a=rt,kn(e.type)?(sr=a,rt=_e(n.firstChild)):rt=a),Rt(t,e,e.pendingProps.children,l),ra(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&B&&((a=n=rt)&&(n=F1(n,e.type,e.pendingProps,Me),n!==null?(e.stateNode=n,qt=e,rt=_e(n.firstChild),Me=!1,a=!0):a=!1),a||Sn(e)),rc(e),a=e.type,u=e.pendingProps,i=t!==null?t.memoizedProps:null,n=u.children,ar(a,u)?n=null:i!==null&&ar(a,i)&&(e.flags|=32),e.memoizedState!==null&&(a=xr(t,e,Kv,null,null,l),Va._currentValue=a),ra(t,e),Rt(t,e,n,l),e.child;case 6:return t===null&&B&&((t=l=rt)&&(l=W1(l,e.pendingProps,Me),l!==null?(e.stateNode=l,qt=e,rt=null,t=!0):t=!1),t||Sn(e)),null;case 13:return oy(t,e,l);case 4:return no(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Zn(e,null,n,l):Rt(t,e,n,l),e.child;case 11:return zh(t,e,e.type,e.pendingProps,l);case 7:return n=e.pendingProps,ra(t,e),Rt(t,e,n,l),e.child;case 8:return Rt(t,e,e.pendingProps.children,l),e.child;case 12:return Rt(t,e,e.pendingProps.children,l),e.child;case 10:return qh(t,e,l);case 9:return a=e.type._context,n=e.pendingProps.children,Qn(e),a=Bt(a),n=n(a),e.flags|=1,Rt(t,e,n,l),e.child;case 14:return Oh(t,e,e.type,e.pendingProps,l);case 15:return uy(t,e,e.type,e.pendingProps,l);case 19:return Hc(t,e,l);case 31:return n1(t,e,l);case 22:return iy(t,e,l,e.pendingProps);case 24:return Qn(e),n=Bt(zt),t===null?(a=Or(),a===null&&(a=it,u=zr(),a.pooledCache=u,u.refCount++,u!==null&&(a.pooledCacheLanes|=l),a=u),e.memoizedState={parent:n,cache:a},Rr(e),an(e,zt,a)):((t.lanes&l)!==0&&(Cc(t,e),Cu(e,null,null,l),Au()),a=t.memoizedState,u=e.memoizedState,a.parent!==n?(a={parent:n,cache:n},e.memoizedState=a,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=a),an(e,zt,n)):(n=u.cache,an(e,zt,n),n!==a.cache&&Tc(e,[zt],l,!0))),Rt(t,e,e.pendingProps.children,l),e.child;case 30:return e.stateNode===null&&(e.stateNode={autoName:null,paired:null,clones:null,ref:null}),n=e.pendingProps,n.name!=null&&n.name!=="auto"?e.flags|=t===null?18882560:18874368:B&&Bo(e),t!==null&&t.memoizedProps.name!==n.name?e.flags|=4194816:ra(t,e),Rt(t,e,n.children,l),e.child;case 29:throw e.pendingProps}throw Error(E(156,e.tag))}function Cl(t){t.flags|=4}function Xs(t,e,l,n,a){var u;if((u=(t.mode&32)!==0)&&(u=l===null?dm(e,n):dm(e,n)&&(n.src!==l.src||n.srcSet!==l.srcSet)),u){if(t.flags|=16777216,(a&335544128)===a)if(t.stateNode.complete)t.flags|=8192;else if(Hy())t.flags|=8192;else throw Gn=ho,Ur}else t.flags&=-16777217}function Hh(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!fp(e))if(Hy())t.flags|=8192;else throw Gn=ho,Ur}function Ui(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?_m():536870912,t.lanes|=e,Ba|=e)}function cu(t,e){if(!B)switch(t.tailMode){case"visible":break;case"collapsed":for(var l=t.tail,n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null;break;default:for(e=t.tail,l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null}}function ct(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,n=0;if(e)for(var a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&1206910976,n|=a.flags&1206910976,a.return=t,a=a.sibling;else for(a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=t,a=a.sibling;return t.subtreeFlags|=n,t.childLanes=l,e}function i1(t,e,l){var n=e.pendingProps;switch(wr(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(e),null;case 1:return ct(e),null;case 3:return l=e.stateNode,n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Ol(zt),Da(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(sa(e)?Cl(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Ls())),ct(e),null;case 26:var a=e.type,u=e.memoizedState;return t===null?(Cl(e),u!==null?(ct(e),Hh(e,u)):(ct(e),Xs(e,a,null,n,l))):u?u!==t.memoizedState?(Cl(e),ct(e),Hh(e,u)):(ct(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&Cl(e),ct(e),Xs(e,a,t,n,l)),null;case 27:if(ao(e),l=cn.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Cl(e);else{if(!n){if(e.stateNode===null)throw Error(E(166));return ct(e),e.subtreeFlags&=-33554433,null}t=cl.current,sa(e)?rh(e,t):(t=op(a,n,l),e.stateNode=t,Cl(e))}return ct(e),e.subtreeFlags&=-33554433,null;case 5:if(ao(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Cl(e);else{if(!n){if(e.stateNode===null)throw Error(E(166));return ct(e),e.subtreeFlags&=-33554433,null}if(u=cl.current,sa(e))rh(e,u);else{var i=Yu(cn.current);switch(u){case 1:u=i.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:u=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":u=i.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":u=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":u=i.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof n.is=="string"?i.createElement("select",{is:n.is}):i.createElement("select"),n.multiple?u.multiple=!0:n.size&&(u.size=n.size);break;default:u=typeof n.is=="string"?i.createElement(a,{is:n.is}):i.createElement(a)}}u[Lt]=e,u[se]=n;t:for(i=e.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}e.stateNode=u;t:switch(Yt(u,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}n&&Cl(e)}}return ct(e),e.subtreeFlags&=-33554433,Xs(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&Cl(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(E(166));if(t=cn.current,sa(e)){if(t=e.stateNode,l=e.memoizedProps,n=null,a=qt,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}t[Lt]=e,t=!!(t.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||Jy(t.nodeValue,l)),t||Sn(e,!0)}else t=Yu(t).createTextNode(n),t[Lt]=e,e.stateNode=t}return ct(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(n=sa(e),l!==null){if(t===null){if(!n)throw Error(E(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(E(557));t[Lt]=e}else Yn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ct(e),t=!1}else l=Ls(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(ye(e),e):(ye(e),null);if((e.flags&128)!==0)throw Error(E(558))}return ct(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=sa(e),n!==null&&n.dehydrated!==null){if(t===null){if(!a)throw Error(E(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(E(317));a[Lt]=e}else Yn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ct(e),a=!1}else a=Ls(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(ye(e),e):(ye(e),null)}return ye(e),(e.flags&128)!==0?(e.lanes=l,e):(l=n!==null,t=t!==null&&t.memoizedState!==null,l&&(n=e.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),Ui(e,e.updateQueue),ct(e),null);case 4:return Da(),t===null&&lf(e.stateNode.containerInfo),e.flags|=67108864,ct(e),null;case 10:return Ol(e.type),ct(e),null;case 19:if(Mr(e),n=e.memoizedState,n===null)return ct(e),null;if(a=(e.flags&128)!==0,u=n.rendering,u===null)if(a)cu(n,!1);else{if(bt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=yo(t),u!==null){for(e.flags|=128,cu(n,!1),t=u.updateQueue,e.updateQueue=t,Ui(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)r0(l,t),l=l.sibling;return Lu(e,jt.current&1|2),B&&kl(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&ve()>ko&&(e.flags|=128,a=!0,cu(n,!1),e.lanes=4194304)}else{if(!a)if(t=yo(u),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,Ui(e,t),cu(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!u.alternate&&!B)return ct(e),null}else 2*ve()-n.renderingStartTime>ko&&l!==536870912&&(e.flags|=128,a=!0,cu(n,!1),e.lanes=4194304);n.isBackwards?(u.sibling=e.child,e.child=u):(t=n.last,t!==null?t.sibling=u:e.child=u,n.last=u)}if(n.tail!==null){t=n.tail;t:{for(l=t;l!==null;){if(l.alternate!==null){l=!1;break t}l=l.sibling}l=!0}return n.rendering=t,n.tail=t.sibling,n.renderingStartTime=ve(),t.sibling=null,u=jt.current,u=a?u&1|2:u&1,n.tailMode==="visible"||n.tailMode==="collapsed"||!l||B?Lu(e,u):(l=u,ft(Xt,e),ft(jt,l),Kt===null&&(Kt=e)),B&&kl(e,n.treeForkCount),t}return ct(e),null;case 22:case 23:return ye(e),Nr(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(l&536870912)!==0&&(e.flags&128)===0&&(ct(e),e.subtreeFlags&6&&(e.flags|=8192)):ct(e),l=e.updateQueue,l!==null&&Ui(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==l&&(e.flags|=2048),t!==null&&Gt(Bn),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Ol(zt),ct(e),null;case 25:return null;case 30:return e.flags|=33554432,ct(e),null}throw Error(E(156,e.tag))}function o1(t,e){switch(wr(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ol(zt),Da(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return ao(e),null;case 31:if(e.memoizedState!==null){if(ye(e),e.alternate===null)throw Error(E(340));Yn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(ye(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(E(340));Yn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Mr(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 Da(),null;case 10:return Ol(e.type),null;case 22:case 23:return ye(e),Nr(),t!==null&&Gt(Bn),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Ol(zt),null;case 25:return null;default:return null}}function cy(t,e){switch(wr(e),e.tag){case 3:Ol(zt),Da();break;case 26:case 27:case 5:ao(e);break;case 4:Da();break;case 31:e.memoizedState!==null&&ye(e);break;case 13:ye(e);break;case 19:Mr(e);break;case 10:Ol(e.type);break;case 22:case 23:ye(e),Nr(),t!==null&&Gt(Bn);break;case 24:Ol(zt)}}function ei(t,e){try{var l=e.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&t)===t){n=void 0;var u=l.create,i=l.inst;n=u(),i.destroy=n}l=l.next}while(l!==a)}}catch(o){lt(e,e.return,o)}}function Tn(t,e,l){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var u=a.next;n=u;do{if((n.tag&t)===t){var i=n.inst,o=i.destroy;if(o!==void 0){i.destroy=void 0,a=e;var s=l,r=o;try{r()}catch(d){lt(a,s,d)}}}n=n.next}while(n!==u)}}catch(d){lt(e,e.return,d)}}function ry(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{S0(e,l)}catch(n){lt(t,t.return,n)}}}function fy(t,e,l){l.props=Kn(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){lt(t,e,n)}}function nl(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var n=t.stateNode;break;case 30:var a=t.stateNode,u=Rl(t.memoizedProps,a);(a.ref===null||a.ref.name!==u)&&(a.ref=ep(u)),n=a.ref;break;case 7:if(t.stateNode===null){var i=new Ae(t);oe(t.child,!1,J1,i,void 0,void 0),t.stateNode=i}n=t.stateNode;break;default:n=t.stateNode}typeof l=="function"?t.refCleanup=l(n):l.current=n}}catch(o){lt(t,e,o)}}function Ht(t,e){var l=t.ref,n=t.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){lt(t,e,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){lt(t,e,a)}else l.current=null}function So(t,e){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&e!==null)for(var l=0;l<e.length;l++)up(t.stateNode,e[l])}function Lh(t){for(var e=t.return;e!==null&&(Jr(e)&&up(t.stateNode,e.stateNode),!Kr(e));)e=e.return}function zu(t){for(var e=t.return;e!==null&&(Jr(e)&&$1(t.stateNode,e.stateNode),!Kr(e));)e=e.return}function Kr(t){return t.tag===5||t.tag===3||t.tag===27}function Jr(t){return t&&t.tag===7&&t.stateNode!==null}function Lc(t){var e=t.type,l=t.memoizedProps,n=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break t;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){lt(t,t.return,a)}}function Qs(t,e,l){try{var n=t.stateNode;N1(n,t.type,l,e),n[se]=e}catch(a){lt(t,t.return,a)}}function dy(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&kn(t.type)||t.tag===4}function Vs(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||dy(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&&kn(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Bc(t,e,l,n){var a=t.tag;if(a===5||a===6)a=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(a,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(a),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=il)),So(t,n),J=!0;else if(a!==4&&(a===27&&(So(t,n),n=null,kn(t.type)&&(l=t.stateNode,e=null)),t=t.child,t!==null))for(Bc(t,e,l,n),t=t.sibling;t!==null;)Bc(t,e,l,n),t=t.sibling}function Eo(t,e,l,n){var a=t.tag;if(a===5||a===6)a=t.stateNode,e?l.insertBefore(a,e):l.appendChild(a),So(t,n),J=!0;else if(a!==4&&(a===27&&(So(t,n),n=null,kn(t.type)&&(l=t.stateNode)),t=t.child,t!==null))for(Eo(t,e,l,n),t=t.sibling;t!==null;)Eo(t,e,l,n),t=t.sibling}function hy(t){var e=t.stateNode,l=t.memoizedProps;try{for(var n=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);Yt(e,n,l),e[Lt]=t,e[se]=l}catch(u){lt(t,t.return,u)}}var To=!1,pe=null;function Bh(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(To=!0)}var al=null;function Gh(){var t=al;return al=null,t}var ae=0;function Fa(t,e,l,n,a){return ae=0,my(t.child,e,l,n,a)}function my(t,e,l,n,a){for(var u=!1;t!==null;){if(t.tag===5){var i=t.stateNode;if(n!==null){var o=ur(i);n.push(o),o.view&&(u=!0)}else u||ur(i).view&&(u=!0);To=!0,Wy(i,ae===0?e:e+"_"+ae,l),ae++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&a||my(t.child,e,l,n,a)&&(u=!0));t=t.sibling}return u}function fl(t,e){for(;t!==null;)t.tag===5?Py(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&e||fl(t.child,e)),t=t.sibling}function Ii(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Ii(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var e=t.memoizedProps;if(e.name==null||e.name==="auto")throw Error(E(544));var l=e.name;e=ql(e.default,e.share),e!=="none"&&(Fa(t,l,e,null,!1)||fl(t.child,!1))}t=t.sibling}}function Gc(t,e){if(t.tag===30){var l=t.stateNode,n=t.memoizedProps,a=Rl(n,l),u=ql(n.default,l.paired?n.share:n.enter);u!=="none"?Fa(t,a,u,null,!1)?(Ii(t),l.paired||e||Ga(t,n.onEnter)):fl(t.child,!1):Ii(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Gc(t,e),t=t.sibling;else Ii(t)}function jc(t){if(pe!==null&&pe.size!==0){var e=pe;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 l=t.memoizedProps,n=l.name;if(n!=null&&n!=="auto"){var a=e.get(n);if(a!==void 0){var u=ql(l.default,l.share);if(u!=="none"&&(Fa(t,n,u,null,!1)?(u=t.stateNode,a.paired=u,u.paired=a,Ga(t,l.onShare)):fl(t.child,!1)),e.delete(n),e.size===0)break}}}jc(t)}t=t.sibling}}}function Yc(t){if(t.tag===30){var e=t.memoizedProps,l=Rl(e,t.stateNode),n=pe!==null?pe.get(l):void 0,a=ql(e.default,n!==void 0?e.share:e.exit);a!=="none"&&(Fa(t,l,a,null,!1)?n!==void 0?(a=t.stateNode,n.paired=a,a.paired=n,pe.delete(l),Ga(t,e.onShare)):Ga(t,e.onExit):fl(t.child,!1)),pe!==null&&jc(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Yc(t),t=t.sibling;else pe!==null&&jc(t)}function yy(t){for(t=t.child;t!==null;){if(t.tag===30){var e=t.memoizedProps,l=Rl(e,t.stateNode);e=ql(e.default,e.update),t.flags&=-5,e!=="none"&&Fa(t,l,e,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&yy(t);t=t.sibling}}function Xc(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,fl(t.child,!1))}Xc(t)}t=t.sibling}}function Ki(t){if(t.tag===30)t.stateNode.paired=null,fl(t.child,!1),Xc(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Ki(t),t=t.sibling;else Xc(t)}function py(t){for(t=t.child;t!==null;)t.tag===30?fl(t.child,!1):(t.subtreeFlags&33554432)!==0&&py(t),t=t.sibling}function $r(t,e,l,n,a,u,i){for(var o=!1;e!==null;){if(e.tag===5){var s=e.stateNode;if(u!==null&&ae<u.length){var r=u[ae],d=ur(s);(r.view||d.view)&&(o=!0);var y;if(y=(t.flags&4)===0)if(d.clip)y=!0;else{y=r.rect;var f=d.rect;y=y.y!==f.y||y.x!==f.x||y.height!==f.height||y.width!==f.width}y&&(t.flags|=4),d.abs?d=!r.abs:(r=r.rect,d=d.rect,d=r.height!==d.height||r.width!==d.width),d&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&Wy(s,ae===0?l:l+"_"+ae,a),o&&(t.flags&4)!==0||(al===null&&(al=[]),al.push(s,ae===0?n:n+"_"+ae,e.memoizedProps)),ae++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i?t.flags|=e.flags&32:$r(t,e.child,l,n,a,u,i)&&(o=!0));e=e.sibling}return o}function gy(t,e){for(t=t.child;t!==null;){if(t.tag===30){var l=t.memoizedProps,n=t.stateNode,a=Rl(l,n),u=ql(l.default,l.update);if(e){n=n.clones;var i=n===null?null:n.map(H1)}else i=t.memoizedState,t.memoizedState=null;n=t;var o=t.child;ae=0,a=$r(n,o,a,a,u,i,!1),(t.flags&4)!==0&&a&&(e||Ga(t,l.onUpdate))}else(t.subtreeFlags&33554432)!==0&&gy(t,e);t=t.sibling}}var _t=!1,W=!1,tl=!1,Zs=!1,jh=typeof WeakSet=="function"?WeakSet:Set,xt=null,el=!1,gu=!1,Ao=!1,Qc=!1;function s1(t,e,l){if(t=t.containerInfo,lr=Za,t=l0(t),Tr(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var u=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break t}var o=0,s=-1,r=-1,d=0,y=0,f=t,m=null;e:for(;;){for(var b;f!==n||u!==0&&f.nodeType!==3||(s=o+u),f!==i||a!==0&&f.nodeType!==3||(r=o+a),f.nodeType===3&&(o+=f.nodeValue.length),(b=f.firstChild)!==null;)m=f,f=b;for(;;){if(f===t)break e;if(m===n&&++d===u&&(s=o),m===i&&++y===a&&(r=o),(b=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=b}n=s===-1||r===-1?null:{start:s,end:r}}else n=null}n=n||{start:0,end:0}}else n=null;for(nr={focusedElem:t,selectionRange:n},Za=!1,l=(l&335544064)===l,xt=e,e=l?9270:1024;xt!==null;){if(t=xt,l&&(n=t.deletions,n!==null))for(u=0;u<n.length;u++)l&&Yc(n[u]);if(t.alternate===null&&(t.flags&2)!==0)l&&Bh(t),Ri(l);else{if(t.tag===22){if(n=t.alternate,t.memoizedState!==null){n!==null&&n.memoizedState===null&&l&&Yc(n),Ri(l);continue}else if(n!==null&&n.memoizedState!==null){l&&Bh(t),Ri(l);continue}}n=t.child,(t.subtreeFlags&e)!==0&&n!==null?(n.return=t,xt=n):(l&&yy(t),Ri(l))}}pe=null}function Ri(t){for(;xt!==null;){var e=xt,l=t,n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 15:break;case 1:if((a&1024)!==0&&n!==null){l=void 0,a=n.memoizedProps,n=n.memoizedState;var u=e.stateNode;try{var i=Kn(e.type,a);l=u.getSnapshotBeforeUpdate(i,n),u.__reactInternalSnapshotBeforeUpdate=l}catch(o){lt(e,e.return,o)}}break;case 3:if((a&1024)!==0){if(n=e.stateNode.containerInfo,l=n.nodeType,l===9)ir(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ir(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&n!==null&&(l=Rl(n.memoizedProps,n.stateNode),a=e.memoizedProps,a=ql(a.default,a.update),a!=="none"&&Fa(n,l,a,n.memoizedState=[],!0));break;default:if((a&1024)!==0)throw Error(E(163))}if(n=e.sibling,n!==null){n.return=e.return,xt=n;break}xt=e.return}}function vy(t,e,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:ll(t,l),n&4&&ei(5,l);break;case 1:if(ll(t,l),n&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(i){lt(l,l.return,i)}else{var a=Kn(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(i){lt(l,l.return,i)}}n&64&&ry(l),n&512&&nl(l,l.return);break;case 3:if(ll(t,l),n&64&&(t=l.updateQueue,t!==null)){if(e=null,l.child!==null)switch(l.child.tag){case 27:case 5:e=l.child.stateNode;break;case 1:e=l.child.stateNode}try{S0(t,e)}catch(i){lt(l,l.return,i)}}break;case 27:e===null&&n&4&&hy(l);case 26:case 5:ll(t,l),e===null&&n&4&&Lc(l),n&512&&nl(l,l.return);break;case 12:ll(t,l);break;case 31:ll(t,l),n&4&&Ty(t,l);break;case 13:ll(t,l),n&4&&Ay(t,l),n&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=S1.bind(null,l),P1(t,l))));break;case 22:if(n=l.memoizedState!==null||_t,!n){var u=e!==null&&e.memoizedState!==null||W;e=_t,a=W,_t=n,(W=u)&&!a?(n=2,(l.subtreeFlags&8772)!==0&&(n|=1),Xe(t,l,n)):ll(t,l),_t=e,W=a}break;case 30:ll(t,l),n&512&&nl(l,l.return);break;case 7:n&512&&nl(l,l.return);default:ll(t,l)}}function Vc(t,e){for(t=t.child;t!==null;)by(t,e),t=t.sibling}function by(t,e){switch(t.tag){case 5:case 26:try{var l=t.stateNode;if(e){var n=l.style;typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none"}else{var a=t.stateNode,u=t.memoizedProps.style,i=u!=null&&u.hasOwnProperty("display")?u.display:null;a.style.display=i==null||typeof i=="boolean"?"":(""+i).trim()}}catch(s){lt(t,t.return,s)}Zc(t,e);break;case 6:try{t.stateNode.nodeValue=e?"":t.memoizedProps,J=!0}catch(s){lt(t,t.return,s)}break;case 18:try{var o=t.stateNode;e?nm(o,!0):nm(t.stateNode,!1)}catch(s){lt(t,t.return,s)}break;case 22:case 23:t.memoizedState===null&&Vc(t,e);break;default:Vc(t,e)}}function Zc(t,e){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){t:{var l=t,n=e;switch(l.tag){case 4:by(l,n);break t;case 22:l.memoizedState===null&&Zc(l,n);break t;default:Zc(l,n)}}t=t.sibling}}function Sy(t){var e=t.alternate;e!==null&&(t.alternate=null,Sy(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&_o(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 ht=null,le=!1;function Ye(t,e,l){for(l=l.child;l!==null;)Ey(t,e,l),l=l.sibling}function Ey(t,e,l){if(be&&typeof be.onCommitFiberUnmount=="function")try{be.onCommitFiberUnmount(Ku,l)}catch{}switch(l.tag){case 26:W||Ht(l,e),Ye(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!W&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:W||Ht(l,e),zu(l);var n=ht,a=le;kn(l.type)&&(ht=l.stateNode,le=!1),Ye(t,e,l),sp(l.stateNode,l.type,l.memoizedProps),ht=n,le=a;break;case 5:W||Ht(l,e),zu(l);case 6:if(l.tag===6&&zu(l),n=ht,a=le,ht=null,Ye(t,e,l),ht=n,le=a,ht!==null)if(le)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(l.stateNode),J=!0}catch(u){lt(l,e,u)}else try{ht.removeChild(l.stateNode),J=!0}catch(u){lt(l,e,u)}break;case 18:ht!==null&&(le?(t=ht,lm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Ia(t)):lm(ht,l.stateNode));break;case 4:n=ht,a=le,ht=l.stateNode.containerInfo,le=!0,Ye(t,e,l),ht=n,le=a;break;case 0:case 11:case 14:case 15:Tn(2,l,e),W||Tn(4,l,e),Ye(t,e,l);break;case 1:W||(Ht(l,e),n=l.stateNode,typeof n.componentWillUnmount=="function"&&fy(l,e,n)),Ye(t,e,l);break;case 21:Ye(t,e,l);break;case 22:W=(n=W)||l.memoizedState!==null,Ye(t,e,l),W=n;break;case 30:Ht(l,e),Ye(t,e,l);break;case 7:W||Ht(l,e),Ye(t,e,l);break;default:Ye(t,e,l)}}function Ty(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ia(t)}catch(l){lt(e,e.return,l)}}}function Ay(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ia(t)}catch(l){lt(e,e.return,l)}}function c1(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new jh),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new jh),e;default:throw Error(E(435,t.tag))}}function Ni(t,e){var l=c1(t);e.forEach(function(n){if(!l.has(n)){l.add(n);var a=E1.bind(null,t,n);n.then(a,a)}})}function $t(t,e,l){var n=e.deletions;if(n!==null)for(var a=0;a<n.length;a++){var u=n[a],i=t,o=e,s=o;t:for(;s!==null;){switch(s.tag){case 27:if(kn(s.type)){ht=s.stateNode,le=!1;break t}break;case 5:ht=s.stateNode,le=!1;break t;case 3:case 4:ht=s.stateNode.containerInfo,le=!0;break t}s=s.return}if(ht===null)throw Error(E(160));Ey(i,o,u),ht=null,le=!1,i=u.alternate,i!==null&&(i.return=null),u.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Cy(e,t,l),e=e.sibling}var Qe=null;function Cy(t,e,l){var n=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(a&4&&(n=t.updateQueue,n=n!==null?n.events:null,n!==null))for(var u=0;u<n.length;u++){var i=n[u];i.ref.impl=i.nextImpl}$t(e,t,l),Ft(t),a&4&&(Tn(3,t,t.return),ei(3,t),Tn(5,t,t.return));break;case 1:$t(e,t,l),Ft(t),a&512&&(W||n===null||Ht(n,n.return)),a&64&&_t&&(t=t.updateQueue,t!==null&&(e=t.callbacks,e!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?e:l.concat(e))));break;case 26:if(u=Qe,$t(e,t,l),Ft(t),a&512&&(W||n===null||Ht(n,n.return)),a&4)if(a=n!==null?n.memoizedState:null,l=t.memoizedState,n===null)if(l===null)if(t.stateNode===null)if(_t)t.stateNode=Fy(t.type,t.memoizedProps,e.containerInfo,t);else{t:{e=t.type,l=t.memoizedProps,a=u.ownerDocument||u;e:switch(e){case"title":n=a.getElementsByTagName("title")[0],(!n||n[Fu]||n[Lt]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=a.createElement(e),a.head.insertBefore(n,a.querySelector("head > title"))),Yt(n,e,l),n[Lt]=t,Dt(n),e=n;break t;case"link":if(u=fm("link","href",a).get(e+(l.href||""))){for(i=0;i<u.length;i++)if(n=u[i],n.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&n.getAttribute("rel")===(l.rel==null?null:l.rel)&&n.getAttribute("title")===(l.title==null?null:l.title)&&n.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(i,1);break e}}n=a.createElement(e),Yt(n,e,l),a.head.appendChild(n);break;case"meta":if(u=fm("meta","content",a).get(e+(l.content||""))){for(i=0;i<u.length;i++)if(n=u[i],n.getAttribute("content")===(l.content==null?null:""+l.content)&&n.getAttribute("name")===(l.name==null?null:l.name)&&n.getAttribute("property")===(l.property==null?null:l.property)&&n.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&n.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(i,1);break e}}n=a.createElement(e),Yt(n,e,l),a.head.appendChild(n);break;default:throw Error(E(468,e))}n[Lt]=t,Dt(n),e=n}t.stateNode=e}else _t||cr(u,t.type,t.stateNode);else t.stateNode=rm(u,l,t.memoizedProps);else a!==l?(a===null?(e=n.stateNode,e===null||W||e.parentNode.removeChild(e)):a.count--,l===null?_t||cr(u,t.type,t.stateNode):rm(u,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Qs(t,t.memoizedProps,n.memoizedProps);break;case 27:$t(e,t,l),Ft(t),a&512&&(W||n===null||Ht(n,n.return)),n!==null&&a&4&&Qs(t,t.memoizedProps,n.memoizedProps);break;case 5:if(u=tl,tl=!1,$t(e,t,l),tl=u,Ft(t),a&512&&(W||n===null||Ht(n,n.return)),t.flags&32){e=t.stateNode;try{Ha(e,""),J=!0}catch(d){lt(t,t.return,d)}}a&4&&t.stateNode!=null&&(e=t.memoizedProps,Qs(t,e,n!==null?n.memoizedProps:e)),a&1024&&(Zs=!0);break;case 6:if($t(e,t,l),Ft(t),a&4){if(t.stateNode===null)throw Error(E(162));e=t.memoizedProps,l=t.stateNode;try{l.nodeValue=e,J=!0}catch(d){lt(t,t.return,d)}}break;case 3:if(J=!1,Wi=null,u=Qe,Qe=Xu(e.containerInfo),$t(e,t,l),Qe=u,Ft(t),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Ia(e.containerInfo)}catch(d){lt(t,t.return,d)}Zs&&(Zs=!1,ky(t)),J=!1;break;case 4:a=tl,tl=_t,n=Id(),u=Qe,Qe=Xu(t.stateNode.containerInfo),$t(e,t,l),Ft(t),Qe=u,J&&gu&&(Ao=!0),J=n,tl=a;break;case 12:$t(e,t,l),Ft(t);break;case 31:$t(e,t,l),Ft(t),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,Ni(t,e)));break;case 13:$t(e,t,l),Ft(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zo=ve()),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,Ni(t,e)));break;case 22:u=t.memoizedState!==null,i=n!==null&&n.memoizedState!==null;var o=_t,s=W,r=tl;_t=o||u,tl=r||u,W=s||i,$t(e,t,l),W=s,tl=r,_t=o,Ft(t),a&8192&&(e=t.stateNode,e._visibility=u?e._visibility&-2:e._visibility|1,!u||n===null||i||_t||W||(e=i||W,l=_t,n=W,_t=u||_t,W=e,Wl(t,2),_t=l,W=n),!u&&tl||Vc(t,u)),a&4&&(e=t.updateQueue,e!==null&&(l=e.retryQueue,l!==null&&(e.retryQueue=null,Ni(t,l))));break;case 19:$t(e,t,l),Ft(t),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,Ni(t,e)));break;case 30:a&512&&(W||n===null||Ht(n,n.return)),a=Id(),u=gu,i=(l&335544064)===l,o=t.memoizedProps,gu=i&&ql(o.default,o.update)!=="none",$t(e,t,l),Ft(t),i&&n!==null&&J&&(t.flags|=4),gu=u,J=a;break;case 21:break;case 7:a&512&&(W||n===null||Ht(n,n.return)),n&&n.stateNode!==null&&(n.stateNode._fragmentFiber=t);default:$t(e,t,l),Ft(t)}}function Ft(t){var e=t.flags;if(e&2){try{for(var l,n=t.return;n!==null;){if(dy(n)){l=n;break}n=n.return}n=null;for(var a=t.return;a!==null;){if(Jr(a)){var u=a.stateNode;n===null?n=[u]:n.push(u)}if(Kr(a))break;a=a.return}var i=n;if(l==null)throw Error(E(160));switch(l.tag){case 27:var o=l.stateNode,s=Vs(t);Eo(t,s,o,i);break;case 5:var r=l.stateNode;l.flags&32&&(Ha(r,""),l.flags&=-33);var d=Vs(t);Eo(t,d,r,i);break;case 3:case 4:var y=l.stateNode.containerInfo,f=Vs(t);Bc(t,f,y,i);break;default:throw Error(E(161))}}catch(m){lt(t,t.return,m)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function ky(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;ky(e),e.tag===5&&e.flags&1024&&(e=e.stateNode,Za=!0,e.reset(),Za=!1),t=t.sibling}}function ca(t,e){if(e.subtreeFlags&9270)for(e=e.child;e!==null;)wy(e,t),e=e.sibling;else gy(e,!1)}function wy(t,e){var l=t.alternate;if(l===null)Gc(t,!1);else switch(t.tag){case 3:if(Qc=el=!1,Gh(),ca(e,t),!el&&!Ao){if(t=al,t!==null)for(var n=0;n<t.length;n+=3){l=t[n];var a=t[n+1];Py(l,t[n+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+a+")"})}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"})),Qc=!0}al=null;break;case 5:ca(e,t);break;case 4:n=el,el=!1,ca(e,t),el&&(Ao=!0),el=n;break;case 22:t.memoizedState===null&&(l.memoizedState!==null?Gc(t,!1):ca(e,t));break;case 30:n=el,a=Gh(),el=!1,ca(e,t),el&&(t.flags|=4);var u=t.memoizedProps,i=t.stateNode;e=Rl(u,i),i=Rl(l.memoizedProps,i);var o=ql(u.default,u.update);o==="none"?e=!1:(u=l.memoizedState,l.memoizedState=null,l=t.child,ae=0,e=$r(t,l,e,i,o,u,!0),ae!==(u===null?0:u.length)&&(t.flags|=32)),(t.flags&4)!==0&&e?(Ga(t,t.memoizedProps.onUpdate),al=a):a!==null&&(a.push.apply(a,al),al=a),el=(t.flags&32)!==0?!0:n;break;default:ca(e,t)}}function ll(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)vy(t,e.alternate,e),e=e.sibling}function Wl(t,e){for(t=t.child;t!==null;){var l=t,n=e;switch(l.tag){case 0:case 11:case 14:case 15:Tn(4,l,l.return),Wl(l,n);break;case 1:Ht(l,l.return);var a=l.stateNode;typeof a.componentWillUnmount=="function"&&fy(l,l.return,a),Wl(l,n);break;case 27:(n&2)!==0&&sp(l.stateNode,l.type,l.memoizedProps);case 5:Ht(l,l.return),l.tag!==5&&l.tag!==27||zu(l),Wl(l,n);break;case 6:zu(l);break;case 26:Ht(l,l.return),a=l.stateNode,l.memoizedState!==null||a===null||W||a.parentNode.removeChild(a),Wl(l,n);break;case 22:l.memoizedState===null&&Wl(l,n);break;case 30:Ht(l,l.return),Wl(l,n);break;case 7:Ht(l,l.return);default:Wl(l,n)}t=t.sibling}}function Xe(t,e,l){for(l=(e.subtreeFlags&8772)!==0?l:l&-2,e=e.child;e!==null;){var n=e.alternate,a=t,u=e,i=u.flags,o=(l&1)!==0;switch(u.tag){case 0:case 11:case 15:Xe(a,u,l),ei(4,u);break;case 1:if(Xe(a,u,l),n=u,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(d){lt(n,n.return,d)}if(n=u,a=n.updateQueue,a!==null){var s=n.stateNode;try{var r=a.shared.hiddenCallbacks;if(r!==null)for(a.shared.hiddenCallbacks=null,a=0;a<r.length;a++)b0(r[a],s)}catch(d){lt(n,n.return,d)}}o&&i&64&&ry(u),nl(u,u.return);break;case 27:(l&2)!==0&&hy(u);case 5:u.tag!==5&&u.tag!==27||Lh(u),Xe(a,u,l),o&&n===null&&i&4&&Lc(u),nl(u,u.return);break;case 6:Lh(u);break;case 26:s=u.stateNode,u.memoizedState!==null||s===null||_t||cr(Xu(s.ownerDocument),u.type,s),Xe(a,u,l),o&&n===null&&i&4&&Lc(u),nl(u,u.return);break;case 12:Xe(a,u,l);break;case 31:Xe(a,u,l),o&&i&4&&Ty(a,u);break;case 13:Xe(a,u,l),o&&i&4&&Ay(a,u);break;case 22:u.memoizedState===null&&Xe(a,u,l),nl(u,u.return);break;case 30:Xe(a,u,l),nl(u,u.return);break;case 7:nl(u,u.return);default:Xe(a,u,l)}e=e.sibling}}function Fr(t,e){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&Pu(l))}function Wr(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Pu(t))}function we(t,e,l,n){var a=(l&335544064)===l;if(e.subtreeFlags&(a?10262:10256))for(e=e.child;e!==null;)zy(t,e,l,n),e=e.sibling;else a&&py(e)}function zy(t,e,l,n){var a=(l&335544064)===l;a&&e.alternate===null&&e.return!==null&&e.return.alternate!==null&&Ki(e);var u=e.flags;switch(e.tag){case 0:case 11:case 15:we(t,e,l,n),u&2048&&ei(9,e);break;case 1:we(t,e,l,n);break;case 3:we(t,e,l,n),a&&Qc&&(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="")),u&2048&&(u=null,e.alternate!==null&&(u=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==u&&(e.refCount++,u!=null&&Pu(u)));break;case 12:if(u&2048){we(t,e,l,n),u=e.stateNode;try{var i=e.memoizedProps,o=i.id,s=i.onPostCommit;typeof s=="function"&&s(o,e.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(r){lt(e,e.return,r)}}else we(t,e,l,n);break;case 31:we(t,e,l,n);break;case 13:we(t,e,l,n);break;case 23:break;case 22:i=e.stateNode,o=e.alternate,e.memoizedState!==null?(a&&o!==null&&o.memoizedState===null&&Ki(o),i._visibility&2?we(t,e,l,n):Ou(t,e)):(a&&o!==null&&o.memoizedState!==null&&Ki(e),i._visibility&2?we(t,e,l,n):(i._visibility|=2,fa(t,e,l,n,(e.subtreeFlags&10256)!==0||!1))),u&2048&&Fr(o,e);break;case 24:we(t,e,l,n),u&2048&&Wr(e.alternate,e);break;case 30:a&&(u=e.alternate,u!==null&&(fl(u.child,!0),fl(e.child,!0))),we(t,e,l,n);break;default:we(t,e,l,n)}}function fa(t,e,l,n,a){for(a=a&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var u=t,i=e,o=l,s=n,r=i.flags;switch(i.tag){case 0:case 11:case 15:fa(u,i,o,s,a),ei(8,i);break;case 23:break;case 22:var d=i.stateNode;i.memoizedState!==null?d._visibility&2?fa(u,i,o,s,a):Ou(u,i):(d._visibility|=2,fa(u,i,o,s,a)),a&&r&2048&&Fr(i.alternate,i);break;case 24:fa(u,i,o,s,a),a&&r&2048&&Wr(i.alternate,i);break;default:fa(u,i,o,s,a)}e=e.sibling}}function Ou(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var l=t,n=e,a=n.flags;switch(n.tag){case 22:Ou(l,n),a&2048&&Fr(n.alternate,n);break;case 24:Ou(l,n),a&2048&&Wr(n.alternate,n);break;default:Ou(l,n)}e=e.sibling}}var xn=8192;function Nn(t,e,l){if(t.subtreeFlags&xn)for(t=t.child;t!==null;)Oy(t,e,l),t=t.sibling}function Oy(t,e,l){switch(t.tag){case 26:Nn(t,e,l),t.flags&xn&&(t.memoizedState!==null?hb(l,Qe,t.memoizedState,t.memoizedProps):(t=t.stateNode,(e&335544128)===e&&hm(l,t)));break;case 5:Nn(t,e,l),t.flags&xn&&(t=t.stateNode,(e&335544128)===e&&hm(l,t));break;case 3:case 4:var n=Qe;Qe=Xu(t.stateNode.containerInfo),Nn(t,e,l),Qe=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=xn,xn=16777216,Nn(t,e,l),xn=n):Nn(t,e,l));break;case 30:if((t.flags&xn)!==0&&(n=t.memoizedProps.name,n!=null&&n!=="auto")){var a=t.stateNode;a.paired=null,pe===null&&(pe=new Map),pe.set(n,a)}Nn(t,e,l);break;default:Nn(t,e,l)}}function Uy(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 ru(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];xt=n,Ny(n,t)}Uy(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ry(t),t=t.sibling}function Ry(t){switch(t.tag){case 0:case 11:case 15:ru(t),t.flags&2048&&Tn(9,t,t.return);break;case 3:ru(t);break;case 12:ru(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Ji(t)):ru(t);break;default:ru(t)}}function Ji(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];xt=n,Ny(n,t)}Uy(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Tn(8,e,e.return),Ji(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,Ji(e));break;default:Ji(e)}t=t.sibling}}function Ny(t,e){for(;xt!==null;){var l=xt;switch(l.tag){case 0:case 11:case 15:Tn(8,l,e);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Pu(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,xt=n;else t:for(l=t;xt!==null;){n=xt;var a=n.sibling,u=n.return;if(Sy(n),n===l){xt=null;break t}if(a!==null){a.return=u,xt=a;break t}xt=u}}}var r1={getCacheForType:function(t){var e=Bt(zt),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return Bt(zt).controller.signal}},f1=typeof WeakMap=="function"?WeakMap:Map,$=0,it=null,Q=null,Z=0,tt=0,he=null,un=!1,Wa=!1,Pr=!1,xl=0,bt=0,An=0,jn=0,Co=0,ge=0,Ba=0,Uu=null,ne=null,Ic=!1,Zo=0,My=0,ko=1/0,wo=null,yn=null,yt=0,Ze=null,Jn=null,rl=0,Kc=0,Jc=null,_y=null,Ma=null,_a=null,xa=null,Ru=0,$i=null;function Ee(){return($&2)!==0&&Z!==0?Z&-Z:M.T!==null?ef():Hm()}function xy(){if(ge===0)if((Z&536870912)===0||B){var t=vi;vi<<=1,(vi&3932160)===0&&(vi=262144),ge=t}else ge=536870912;return t=Xt.current,t!==null&&(t.flags|=32),ge}function Ga(t,e){if(e!=null){var l=t.stateNode,n=l.ref;n===null&&(n=l.ref=ep(Rl(t.memoizedProps,l))),_a===null&&(_a=[]),_a.push(e.bind(null,n))}}function ie(t,e,l){(t===it&&(tt===2||tt===9)||t.cancelPendingCommit!==null)&&(ja(t,0),on(t,Z,ge,!1)),$u(t,l),(($&2)===0||t!==it)&&(t===it&&(($&2)===0&&(jn|=l),bt===4&&on(t,Z,ge,!1)),hl(t))}function Dy(t,e,l){if(($&6)!==0)throw Error(E(327));var n=!l&&(e&127)===0&&(e&t.expiredLanes)===0||Ju(t,e),a=n?m1(t,e):Is(t,e,!0),u=n;do{if(a===0){Wa&&!n&&on(t,e,0,!1);break}else{if(l=t.current.alternate,u&&!d1(l)){a=Is(t,e,!1),u=!1;continue}if(a===2){if(u=e,t.errorRecoveryDisabledLanes&u)var i=0;else i=t.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){e=i;t:{var o=t;a=Uu;var s=o.current.memoizedState.isDehydrated;if(s&&(ja(o,i).flags|=256),i=Is(o,i,!1),i!==2&&i!==6){if(Pr&&!s){o.errorRecoveryDisabledLanes|=u,jn|=u,a=4;break t}u=ne,ne=a,u!==null&&(ne===null?ne=u:ne.push.apply(ne,u))}a=i}if(u=!1,a!==2)continue}}if(a===1){ja(t,0),on(t,e,0,!0);break}t:{switch(n=t,u=a,u){case 0:case 1:throw Error(E(345));case 4:if((e&4194048)!==e&&(e&62914560)!==e)break;case 6:on(n,e,ge,!un);break t;case 2:ne=null;break;case 3:case 5:break;default:throw Error(E(329))}if((e&62914560)===e&&(a=Zo+300-ve(),10<a)){if(on(n,e,ge,!un),Mo(n,0,!0)!==0)break t;rl=e,n.timeoutHandle=nf(Yh.bind(null,n,l,ne,wo,Ic,e,ge,jn,Ba,un,u,"Throttled",-0,0),a);break t}Yh(n,l,ne,wo,Ic,e,ge,jn,Ba,un,u,null,-0,0)}}break}while(!0);hl(t)}function Yh(t,e,l,n,a,u,i,o,s,r,d,y,f,m){t.timeoutHandle=-1;var b=e.subtreeFlags,v=(u&335544064)===u;if(y=null,(v||b&8192||(b&16785408)===16785408)&&(y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:il},pe=null,Oy(e,u,y),v&&(b=y,v=t.containerInfo,v=(v.nodeType===9?v:v.ownerDocument).__reactViewTransition,v!=null&&(b.count++,b.waitingForViewTransition=!0,b=Qu.bind(b),v.finished.then(b,b))),b=(u&62914560)===u?Zo-ve():(u&4194048)===u?My-ve():0,b=mb(y,b),b!==null)){rl=u,t.cancelPendingCommit=b(Qh.bind(null,t,e,u,l,n,a,i,o,s,r,d,y,null,f,m)),on(t,u,i,!r);return}Qh(t,e,u,l,n,a,i,o,s,r,d,y)}function d1(t){for(var e=t;;){var l=e.tag;if((l===0||l===11||l===15)&&e.flags&16384&&(l=e.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var a=l[n],u=a.getSnapshot;a=a.value;try{if(!Te(u(),a))return!1}catch{return!1}}if(l=e.child,e.subtreeFlags&16384&&l!==null)l.return=e,e=l;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 on(t,e,l,n){e=Mm(t,e),e&=~Co,e&=~jn,t.suspendedLanes|=e,t.pingedLanes&=~e,n&&(t.warmLanes|=e),n=t.expirationTimes;for(var a=e;0<a;){var u=31-Se(a),i=1<<u;n[u]=-1,a&=~i}l!==0&&xm(t,l,e)}function Io(){return($&6)===0?(li(0,!1),!1):!0}function tf(){if(Q!==null){if(tt===0)var t=Q.return;else t=Q,wl=ta=null,Hr(t),Ua=null,Hu=0,t=Q;for(;t!==null;)cy(t.alternate,t),t=t.return;Q=null}}function ja(t,e){var l=t.timeoutHandle;return l!==-1&&(t.timeoutHandle=-1,x1(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),rl=0,tf(),it=t,Q=l=zl(t.current,null),Z=e,tt=0,he=null,un=!1,Wa=Ju(t,e),Pr=!1,Ba=ge=Co=jn=An=bt=0,ne=Uu=null,Ic=!1,xl=Mm(t,e),Ho(),l}function qy(t,e){D=null,M.H=vo,e===$a||e===Go?(e=yh(),tt=3):e===Ur?(e=yh(),tt=4):tt=e===Vr?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,he=e,Q===null&&(bt=1,bo(t,Ne(e,t.current)))}function Hy(){var t=Xt.current;return t===null?!0:(Z&4194048)===Z?Kt===null:(Z&62914560)===Z||(Z&536870912)!==0?t===Kt:!1}function Ly(){var t=M.H;return M.H=vo,t===null?vo:t}function By(){var t=M.A;return M.A=r1,t}function zo(){bt=4,un||(Z&4194048)!==Z&&Xt.current!==null||(Wa=!0),(An&134217727)===0&&(jn&134217727)===0||it===null||on(it,Z,ge,!1)}function Is(t,e,l){var n=$;$|=2;var a=Ly(),u=By();(it!==t||Z!==e)&&(wo=null,ja(t,e)),e=!1;var i=bt;t:do try{if(tt!==0&&Q!==null){var o=Q,s=he;switch(tt){case 8:tf(),i=6;break t;case 3:case 2:case 9:case 6:Xt.current===null&&(e=!0);var r=tt;if(tt=0,he=null,Ca(t,o,s,r),l&&Wa){i=0;break t}break;default:r=tt,tt=0,he=null,Ca(t,o,s,r)}}h1(),i=bt;break}catch(d){qy(t,d)}while(!0);return e&&t.shellSuspendCounter++,wl=ta=null,$=n,M.H=a,M.A=u,Q===null&&(it=null,Z=0,Ho()),i}function h1(){for(;Q!==null;)Gy(Q)}function m1(t,e){var l=$;$|=2;var n=Ly(),a=By();it!==t||Z!==e?(wo=null,ko=ve()+500,ja(t,e)):Wa=Ju(t,e);t:do try{if(tt!==0&&Q!==null){e=Q;var u=he;e:switch(tt){case 1:tt=0,he=null,Ca(t,e,u,1);break;case 2:case 9:if(mh(u)){tt=0,he=null,Xh(e);break}e=function(){tt!==2&&tt!==9||it!==t||(tt=7),hl(t)},u.then(e,e);break t;case 3:tt=7;break t;case 4:tt=5;break t;case 7:mh(u)?(tt=0,he=null,Xh(e)):(tt=0,he=null,Ca(t,e,u,7));break;case 5:var i=null;switch(Q.tag){case 26:i=Q.memoizedState;case 5:case 27:var o=Q;if(i?fp(i):o.stateNode.complete){tt=0,he=null;var s=o.sibling;if(s!==null)Q=s;else{var r=o.return;r!==null?(Q=r,Ko(r)):Q=null}break e}}tt=0,he=null,Ca(t,e,u,5);break;case 6:tt=0,he=null,Ca(t,e,u,6);break;case 8:tf(),bt=6;break t;default:throw Error(E(462))}}y1();break}catch(d){qy(t,d)}while(!0);return wl=ta=null,M.H=n,M.A=a,$=l,Q!==null?0:(it=null,Z=0,Ho(),bt)}function y1(){for(;Q!==null&&!Mg();)Gy(Q)}function Gy(t){var e=sy(t.alternate,t,xl);t.memoizedProps=t.pendingProps,e===null?Ko(t):Q=e}function Xh(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=Nh(l,e,e.pendingProps,e.type,void 0,Z);break;case 11:e=Nh(l,e,e.pendingProps,e.type.render,e.ref,Z);break;case 5:Hr(e);var n=e;n===qt&&(B?(ro(n),n.tag===5&&n.stateNode!=null&&(rt=n.stateNode)):(ro(n),B=!0));default:cy(l,e),e=Q=r0(e,xl),e=sy(l,e,xl)}t.memoizedProps=t.pendingProps,e===null?Ko(t):Q=e}function Ca(t,e,l,n){wl=ta=null,Hr(e),Ua=null,Hu=0;var a=e.return;try{if(l1(t,a,e,l,Z)){bt=1,bo(t,Ne(l,t.current)),Q=null;return}}catch(u){if(a!==null)throw Q=a,u;bt=1,bo(t,Ne(l,t.current)),Q=null;return}e.flags&32768?(B||n===1?t=!0:Wa||(Z&536870912)!==0?t=!1:(un=t=!0,(n===2||n===9||n===3||n===6)&&(n=Xt.current,n!==null&&n.tag===13&&(n.flags|=16384))),jy(e,t)):Ko(e)}function Ko(t){var e=t;do{if((e.flags&32768)!==0){jy(e,un);return}t=e.return;var l=i1(e.alternate,e,xl);if(l!==null){Q=l;return}if(e=e.sibling,e!==null){Q=e;return}Q=e=t}while(e!==null);bt===0&&(bt=5)}function jy(t,e){do{var l=o1(t.alternate,t);if(l!==null){l.flags&=32767,Q=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){Q=t;return}Q=t=l}while(t!==null);bt=6,Q=null}function Qh(t,e,l,n,a,u,i,o,s,r,d,y){t.cancelPendingCommit=null;do Jo();while(yt!==0);if(($&6)!==0)throw Error(E(327));if(e!==null){if(e===t.current)throw Error(E(177));t===it&&(Q=it=null,Z=0),Jn=e,Ze=t,rl=l,Jc=a,_y=n,p1(t,e,l,i,o,s,y)}}function p1(t,e,l,n,a,u,i){var o=e.lanes|e.childLanes;if(Kc=o,o|=Ar,Yg(t,l,o,n,a,u),_a=null,(l&335544064)===l?(xa=Qv(t),n=10262):(xa=null,n=10256),(e.subtreeFlags&n)!==0||(e.flags&n)!==0?(t.callbackNode=null,t.callbackPriority=0,T1(uo,function(){return Pc(),null})):(t.callbackNode=null,t.callbackPriority=0),To=!1,n=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||n){n=M.T,M.T=null,a=F.p,F.p=2,u=$,$|=4;try{s1(t,e,l)}finally{$=u,F.p=a,M.T=n}}yt=1,To?Ma=G1(i,t.containerInfo,xa,$c,Fc,v1,Wc,Pc,g1,null,null):($c(),Fc(),Wc())}function g1(t){if(yt!==0){var e=Ze.onRecoverableError;e(t,{componentStack:null})}}function v1(){yt===3&&(yt=0,wy(Jn,Ze),yt=4)}function $c(){if(yt===1){yt=0;var t=Ze,e=Jn,l=rl,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=M.T,M.T=null;var a=F.p;F.p=2;var u=$;$|=4;try{gu=Ao=!1,Cy(e,t,l),l=nr;var i=l0(t.containerInfo),o=l.focusedElem,s=l.selectionRange;if(i!==o&&o&&o.ownerDocument&&e0(o.ownerDocument.documentElement,o)){if(s!==null&&Tr(o)){var r=s.start,d=s.end;if(d===void 0&&(d=r),"selectionStart"in o)o.selectionStart=r,o.selectionEnd=Math.min(d,o.value.length);else{var y=o.ownerDocument||document,f=y&&y.defaultView||window;if(f.getSelection){var m=f.getSelection(),b=o.textContent.length,v=Math.min(s.start,b),A=s.end===void 0?v:Math.min(s.end,b);!m.extend&&v>A&&(i=A,A=v,v=i);var p=ih(o,v),h=ih(o,A);if(p&&h&&(m.rangeCount!==1||m.anchorNode!==p.node||m.anchorOffset!==p.offset||m.focusNode!==h.node||m.focusOffset!==h.offset)){var g=y.createRange();g.setStart(p.node,p.offset),m.removeAllRanges(),v>A?(m.addRange(g),m.extend(h.node,h.offset)):(g.setEnd(h.node,h.offset),m.addRange(g))}}}}for(y=[],m=o;m=m.parentNode;)m.nodeType===1&&y.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<y.length;o++){var S=y[o];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}Za=!!lr,nr=lr=null}finally{$=u,F.p=a,M.T=n}}t.current=e,yt=2}}function Fc(){if(yt===2){yt=0;var t=Ze,e=Jn,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=M.T,M.T=null;var n=F.p;F.p=2;var a=$;$|=4;try{vy(t,e.alternate,e)}finally{$=a,F.p=n,M.T=l}}yt=3}}function Wc(){if(yt===4||yt===3){yt=0;var t=Ma;Ma=null,_g();var e=Ze,l=Jn,n=rl,a=_y,u=(n&335544064)===n?10262:10256;if((l.subtreeFlags&u)!==0||(l.flags&u)!==0?yt=5:(yt=0,Jn=Ze=null,Yy(e,e.pendingLanes)),u=e.pendingLanes,u===0&&(yn=null),pr(n),l=l.stateNode,be&&typeof be.onCommitFiberRoot=="function")try{be.onCommitFiberRoot(Ku,l,void 0,(l.current.flags&128)===128)}catch{}if(a!==null){l=M.T,u=F.p,F.p=2,M.T=null;try{for(var i=e.onRecoverableError,o=0;o<a.length;o++){var s=a[o];i(s.value,{componentStack:s.stack})}}finally{M.T=l,F.p=u}}if(a=_a,i=xa,xa=null,a!==null&&(_a=null,i===null&&(i=[]),t!==null))for(s=0;s<a.length;s++)l=(0,a[s])(i),l!==void 0&&t.finished.finally(l);(rl&3)!==0&&Jo(),hl(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===$i?Ru++:(Ru=0,$i=e):(Ru=0,$i=null),li(0,!1)}}function Yy(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Pu(e)))}function Jo(){return Ma!==null&&(Ma.skipTransition(),Ma=null),$c(),Fc(),Wc(),Pc()}function Pc(){if(yt!==5)return!1;var t=Ze,e=Kc;Kc=0;var l=pr(rl),n=M.T,a=F.p;try{F.p=32>l?32:l,M.T=null,l=Jc,Jc=null;var u=Ze,i=rl;if(yt=0,Jn=Ze=null,rl=0,($&6)!==0)throw Error(E(331));var o=$;if($|=4,Ry(u.current),zy(u,u.current,i,l),$=o,li(0,!1),be&&typeof be.onPostCommitFiberRoot=="function")try{be.onPostCommitFiberRoot(Ku,u)}catch{}return!0}finally{F.p=a,M.T=n,Yy(t,e)}}function Vh(t,e,l){e=Ne(l,e),e=Mc(t.stateNode,e,2),t=dn(t,e,2),t!==null&&($u(t,2),hl(t))}function lt(t,e,l){if(t.tag===3)Vh(t,t,l);else for(;e!==null;){if(e.tag===3){Vh(e,t,l);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(yn===null||!yn.has(n))){t=Ne(l,t),l=ny(2),n=dn(e,l,2),n!==null&&(ay(l,n,e,t),$u(n,2),hl(n));break}}e=e.return}}function Ks(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new f1;var a=new Set;n.set(e,a)}else a=n.get(e),a===void 0&&(a=new Set,n.set(e,a));a.has(l)||(Pr=!0,a.add(l),t=b1.bind(null,t,e,l),e.then(t,t))}function b1(t,e,l){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,it===t&&(Z&l)===l&&((bt===4||bt===3&&(Z&62914560)===Z&&300>ve()-Zo)&&($&2)===0?ja(t,0):Co|=l,Ba===Z&&(Ba=0)),hl(t)}function Xy(t,e){e===0&&(e=_m()),t=Pn(t,e),t!==null&&($u(t,e),hl(t))}function S1(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),Xy(t,l)}function E1(t,e){var l=0;switch(t.tag){case 31:case 13:var n=t.stateNode,a=t.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(E(314))}n!==null&&n.delete(e),Xy(t,l)}function T1(t,e){return mr(t,e)}var Ya=null,da=null,tr=!1,Oo=!1,Js=!1,sn=0;function hl(t){t!==da&&t.next===null&&(da===null?Ya=da=t:da=da.next=t),Oo=!0,tr||(tr=!0,C1())}function li(t,e){if(!Js&&Oo){Js=!0;do for(var l=!1,n=Ya;n!==null;){if(!e)if(t!==0){var a=n.pendingLanes;if(a===0)var u=0;else{var i=n.suspendedLanes,o=n.pingedLanes;u=(1<<31-Se(42|t)+1)-1,u&=a&~(i&~o),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,Zh(n,u))}else u=Z,u=Mo(n,n===it?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||Ju(n,u)||(l=!0,Zh(n,u));n=n.next}while(l);Js=!1}}function A1(){Qy()}function Qy(){Oo=tr=!1;var t=0;sn!==0&&_1()&&(t=sn);for(var e=ve(),l=null,n=Ya;n!==null;){var a=n.next,u=Vy(n,e);u===0?(n.next=null,l===null?Ya=a:l.next=a,a===null&&(da=l)):(l=n,(t!==0||(u&3)!==0)&&(Oo=!0)),n=a}yt!==0&&yt!==5||li(t,!1),sn!==0&&(sn=0)}function Vy(t,e){for(var l=t.suspendedLanes,n=t.pingedLanes,a=t.expirationTimes,u=t.pendingLanes&-62914561;0<u;){var i=31-Se(u),o=1<<i,s=a[i];s===-1?((o&l)===0||(o&n)!==0)&&(a[i]=jg(o,e)):s<=e&&(t.expiredLanes|=o),u&=~o}if(e=it,l=Z,l=Mo(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,l===0||t===e&&(tt===2||tt===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&zs(n),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Ju(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(n!==null&&zs(n),pr(l)){case 2:case 8:l=Rm;break;case 32:l=uo;break;case 268435456:l=Nm;break;default:l=uo}return n=Zy.bind(null,t),l=mr(l,n),t.callbackPriority=e,t.callbackNode=l,e}return n!==null&&n!==null&&zs(n),t.callbackPriority=2,t.callbackNode=null,2}function Zy(t,e){if(yt!==0&&yt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Jo()&&t.callbackNode!==l)return null;var n=Z;return n=Mo(t,t===it?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(Dy(t,n,e),Vy(t,ve()),t.callbackNode!=null&&t.callbackNode===l?Zy.bind(null,t):null)}function Zh(t,e){if(Jo())return null;Dy(t,e,!0)}function C1(){D1(function(){($&6)!==0?mr(Um,A1):Qy()})}function ef(){if(sn===0){var t=Vn;t===0&&(t=gi,gi<<=1,(gi&261888)===0&&(gi=256)),sn=t}return sn}function Ih(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Li(t)}function k1(t,e,l,n,a){if(e==="submit"&&l&&l.stateNode===a){var u=Ih((a[se]||null).action),i=n.submitter;i&&(e=(e=i[se]||null)?Ih(e.formAction):i.getAttribute("formAction"),e!==null&&(u=e,i=null));var o=new xo("action","action",null,n,a);t.push({event:o,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(sn!==0){var s=new FormData(a,i);Rc(l,{pending:!0,data:s,method:a.method,action:u},null,s)}}else typeof u=="function"&&(o.preventDefault(),s=new FormData(a,i),Rc(l,{pending:!0,data:s,method:a.method,action:u},u,s))},currentTarget:a}]})}}for(Mi=0;Mi<bc.length;Mi++)_i=bc[Mi],Kh=_i.toLowerCase(),Jh=_i[0].toUpperCase()+_i.slice(1),Ie(Kh,"on"+Jh);var _i,Kh,Jh,Mi;Ie(a0,"onAnimationEnd");Ie(u0,"onAnimationIteration");Ie(i0,"onAnimationStart");Ie("dblclick","onDoubleClick");Ie("focusin","onFocus");Ie("focusout","onBlur");Ie(qv,"onTransitionRun");Ie(Hv,"onTransitionStart");Ie(Lv,"onTransitionCancel");Ie(o0,"onTransitionEnd");qa("onMouseEnter",["mouseout","mouseover"]);qa("onMouseLeave",["mouseout","mouseover"]);qa("onPointerEnter",["pointerout","pointerover"]);qa("onPointerLeave",["pointerout","pointerover"]);Fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gu="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(" "),w1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gu));function Iy(t,e){e=(e&4)!==0;for(var l=0;l<t.length;l++){var n=t[l],a=n.event;n=n.listeners;t:{var u=void 0;if(e)for(var i=n.length-1;0<=i;i--){var o=n[i],s=o.instance,r=o.currentTarget;if(o=o.listener,s!==u&&a.isPropagationStopped())break t;u=o,a.currentTarget=r;try{u(a)}catch(d){oo(d)}a.currentTarget=null,u=s}else for(i=0;i<n.length;i++){if(o=n[i],s=o.instance,r=o.currentTarget,o=o.listener,s!==u&&a.isPropagationStopped())break t;u=o,a.currentTarget=r;try{u(a)}catch(d){oo(d)}a.currentTarget=null,u=s}}}}function X(t,e){var l=e[Xd];l===void 0&&(l=e[Xd]=new Set);var n=t+"__bubble";l.has(n)||(Ky(e,t,2,!1),l.add(n))}function $s(t,e,l){var n=0;e&&(n|=4),Ky(l,t,n,e)}var xi="_reactListening"+Math.random().toString(36).slice(2);function lf(t){if(!t[xi]){t[xi]=!0,Bm.forEach(function(l){l!=="selectionchange"&&(w1.has(l)||$s(l,!1,t),$s(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[xi]||(e[xi]=!0,$s("selectionchange",!1,e))}}function Ky(t,e,l,n){switch(vp(e)){case 2:var a=vb;break;case 8:a=bb;break;default:a=rf}l=a.bind(null,e,l,t),a=void 0,!yc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(a=!0),n?a!==void 0?t.addEventListener(e,l,{capture:!0,passive:a}):t.addEventListener(e,l,!0):a!==void 0?t.addEventListener(e,l,{passive:a}):t.addEventListener(e,l,!1)}function Fs(t,e,l,n,a){var u=n;if((e&1)===0&&(e&2)===0&&n!==null)t:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var o=n.stateNode.containerInfo;if(o===a)break;if(i===4)for(i=n.return;i!==null;){var s=i.tag;if((s===3||s===4)&&i.stateNode.containerInfo===a)return;i=i.return}for(;o!==null;){if(i=Dn(o),i===null)return;if(s=i.tag,s===5||s===6||s===26||s===27){n=u=i;continue t}o=o.parentNode}}n=n.return}Im(function(){var r=u,d=vr(l),y=[];t:{var f=s0.get(t);if(f!==void 0){var m=xo,b=t;switch(t){case"keypress":if(Gi(l)===0)break t;case"keydown":case"keyup":m=dv;break;case"focusin":b="focus",m=_s;break;case"focusout":b="blur",m=_s;break;case"beforeblur":case"afterblur":m=_s;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Fd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=tv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=gv;break;case a0:case u0:case i0:m=nv;break;case o0:m=bv;break;case"scroll":case"scrollend":m=Wg;break;case"wheel":m=Ev;break;case"copy":case"cut":case"paste":m=uv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Pd;break;case"submit":m=yv;break;case"toggle":case"beforetoggle":m=Av}var v=(e&4)!==0,A=!v&&(t==="scroll"||t==="scrollend"),p=v?f!==null?f+"Capture":null:f;v=[];for(var h=r,g;h!==null;){var S=h;if(g=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||g===null||p===null||(S=Mu(h,p),S!=null&&v.push(ju(h,S,g))),A)break;h=h.return}0<v.length&&(f=new m(f,b,null,l,d),y.push({event:f,listeners:v}))}}if((e&7)===0){t:{if(m=t==="mouseover"||t==="pointerover",f=t==="mouseout"||t==="pointerout",m&&l!==mc&&(b=l.relatedTarget||l.fromElement)&&(Dn(b)||b[Ka]))break t;(f||m)&&(b=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,f?(m=l.relatedTarget||l.toElement,f=r,m=m?Dn(m):null,m!==null&&(A=Iu(m),v=m.tag,m!==A||v!==5&&v!==27&&v!==6)&&(m=null)):(f=null,m=r),f!==m&&(v=Fd,S="onMouseLeave",p="onMouseEnter",h="mouse",(t==="pointerout"||t==="pointerover")&&(v=Pd,S="onPointerLeave",p="onPointerEnter",h="pointer"),A=f==null?b:yu(f),g=m==null?b:yu(m),b=new v(S,h+"leave",f,l,d),b.target=A,b.relatedTarget=g,S=null,Dn(d)===r&&(v=new v(p,h+"enter",m,l,d),v.target=g,v.relatedTarget=A,S=v),A=S,v=f&&m?lc(f,m,z1):null,f!==null&&$h(y,b,f,v,!1),m!==null&&A!==null&&$h(y,A,m,v,!0)))}t:{if(f=r?yu(r):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var w=nh;else if(lh(f))if(Pm)w=_v;else{w=Nv;var U=Rv}else m=f.nodeName,!m||m.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?r&&gr(r.elementType)&&(w=nh):w=Mv;if(w&&(w=w(t,r))){Wm(y,w,l,d);break t}U&&U(t,f,r)}switch(U=r?yu(r):window,t){case"focusin":(lh(U)||U.contentEditable==="true")&&(va=U,gc=r,Su=null);break;case"focusout":Su=gc=va=null;break;case"mousedown":vc=!0;break;case"contextmenu":case"mouseup":case"dragend":vc=!1,oh(y,l,d);break;case"selectionchange":if(Dv)break;case"keydown":case"keyup":oh(y,l,d)}var O;if(Er)t:{switch(t){case"compositionstart":var C="onCompositionStart";break t;case"compositionend":C="onCompositionEnd";break t;case"compositionupdate":C="onCompositionUpdate";break t}C=void 0}else ga?$m(t,l)&&(C="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(C="onCompositionStart");C&&(Jm&&l.locale!=="ko"&&(ga||C!=="onCompositionStart"?C==="onCompositionEnd"&&ga&&(O=Km()):(nn=d,br="value"in nn?nn.value:nn.textContent,ga=!0)),U=Uo(r,C),0<U.length&&(C=new Wd(C,t,null,l,d),y.push({event:C,listeners:U}),O?C.data=O:(O=Fm(l),O!==null&&(C.data=O)))),(O=kv?wv(t,l):zv(t,l))&&(C=Uo(r,"onBeforeInput"),0<C.length&&(U=new Wd("onBeforeInput","beforeinput",null,l,d),y.push({event:U,listeners:C}),U.data=O)),k1(y,t,r,l,d)}Iy(y,e)})}function ju(t,e,l){return{instance:t,listener:e,currentTarget:l}}function Uo(t,e){for(var l=e+"Capture",n=[];t!==null;){var a=t,u=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||u===null||(a=Mu(t,l),a!=null&&n.unshift(ju(t,a,u)),a=Mu(t,e),a!=null&&n.push(ju(t,a,u))),t.tag===3)return n;t=t.return}return[]}function z1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function $h(t,e,l,n,a){for(var u=e._reactName,i=[];l!==null&&l!==n;){var o=l,s=o.alternate,r=o.stateNode;if(o=o.tag,s!==null&&s===n)break;o!==5&&o!==26&&o!==27||r===null||(s=r,a?(r=Mu(l,u),r!=null&&i.unshift(ju(l,r,s))):a||(r=Mu(l,u),r!=null&&i.push(ju(l,r,s)))),l=l.return}i.length!==0&&t.push({event:e,listeners:i})}var O1=/\r\n?/g,U1=/\u0000|\uFFFD/g;function Fh(t){return(typeof t=="string"?t:""+t).replace(O1,`
|
|
9
|
-
`).replace(U1,"")}function Jy(t,e){return e=Fh(e),Fh(t)===e}function et(t,e,l,n,a,u){switch(l){case"children":if(typeof n=="string")e==="body"||e==="textarea"&&n===""||Ha(t,n);else if(typeof n=="number"||typeof n=="bigint")e!=="body"&&Ha(t,""+n);else return;break;case"className":Si(t,"class",n);break;case"tabIndex":Si(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Si(t,l,n);break;case"style":Zm(t,n,u);return;case"data":if(e!=="object"){Si(t,"data",n);break}case"src":case"href":if(n===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Li(n),t.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){t.setAttribute(l,"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 u=="function"&&(l==="formAction"?(e!=="input"&&et(t,e,"name",a.name,a,null),et(t,e,"formEncType",a.formEncType,a,null),et(t,e,"formMethod",a.formMethod,a,null),et(t,e,"formTarget",a.formTarget,a,null)):(et(t,e,"encType",a.encType,a,null),et(t,e,"method",a.method,a,null),et(t,e,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Li(n),t.setAttribute(l,n);break;case"onClick":n!=null&&(t.onclick=il);return;case"onScroll":n!=null&&X("scroll",t);return;case"onScrollEnd":n!=null&&X("scrollend",t);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(E(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(E(60));u?.__html!==l&&(t.innerHTML=l)}}break;case"multiple":t.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":t.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){t.removeAttribute("xlink:href");break}l=Li(n),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,n):t.removeAttribute(l);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":n&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":n===!0?t.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,n):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?t.setAttribute(l,n):t.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?t.removeAttribute(l):t.setAttribute(l,n);break;case"popover":X("beforetoggle",t),X("toggle",t),Hi(t,"popover",n);break;case"xlinkActuate":Al(t,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Al(t,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Al(t,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Al(t,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Al(t,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Al(t,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Al(t,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Al(t,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Al(t,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Hi(t,"is",n);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=$g.get(l)||l,Hi(t,l,n);else return}J=!0}function er(t,e,l,n,a,u){switch(l){case"style":Zm(t,n,u);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(E(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(E(60));u?.__html!==l&&(t.innerHTML=l)}}break;case"children":if(typeof n=="string")Ha(t,n);else if(typeof n=="number"||typeof n=="bigint")Ha(t,""+n);else return;break;case"onScroll":n!=null&&X("scroll",t);return;case"onScrollEnd":n!=null&&X("scrollend",t);return;case"onClick":n!=null&&(t.onclick=il);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Gm.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),u=l.slice(2,a?l.length-7:void 0),e=t[se]||null,e=e!=null?e[l]:null,typeof e=="function"&&t.removeEventListener(u,e,a),typeof n=="function")){typeof e!="function"&&e!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(u,n,a);break t}J=!0,l in t?t[l]=n:n===!0?t.setAttribute(l,""):Hi(t,l,n)}return}J=!0}function Yt(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":X("error",t),X("load",t);var n=!1,a=!1,u;for(u in l)if(l.hasOwnProperty(u)){var i=l[u];if(i!=null)switch(u){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(E(137,e));default:et(t,e,u,i,l,null)}}a&&et(t,e,"srcSet",l.srcSet,l,null),n&&et(t,e,"src",l.src,l,null);return;case"input":X("invalid",t);var o=u=i=a=null,s=null,r=null;for(n in l)if(l.hasOwnProperty(n)){var d=l[n];if(d!=null)switch(n){case"name":a=d;break;case"type":i=d;break;case"checked":s=d;break;case"defaultChecked":r=d;break;case"value":u=d;break;case"defaultValue":o=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(E(137,e));break;default:et(t,e,n,d,l,null)}}Xm(t,u,o,s,r,i,a,!1);return;case"select":X("invalid",t),n=i=u=null;for(a in l)if(l.hasOwnProperty(a)&&(o=l[a],o!=null))switch(a){case"value":u=o;break;case"defaultValue":i=o;break;case"multiple":n=o;default:et(t,e,a,o,l,null)}e=u,l=i,t.multiple=!!n,e!=null?wa(t,!!n,e,!1):l!=null&&wa(t,!!n,l,!0);return;case"textarea":X("invalid",t),u=a=n=null;for(i in l)if(l.hasOwnProperty(i)&&(o=l[i],o!=null))switch(i){case"value":n=o;break;case"defaultValue":a=o;break;case"children":u=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(E(91));break;default:et(t,e,i,o,l,null)}Vm(t,n,a,u);return;case"option":for(s in l)l.hasOwnProperty(s)&&(n=l[s],n!=null)&&(s==="selected"?t.selected=n&&typeof n!="function"&&typeof n!="symbol":et(t,e,s,n,l,null));return;case"dialog":X("beforetoggle",t),X("toggle",t),X("cancel",t),X("close",t);break;case"iframe":case"object":X("load",t);break;case"video":case"audio":for(n=0;n<Gu.length;n++)X(Gu[n],t);break;case"image":X("error",t),X("load",t);break;case"details":X("toggle",t);break;case"embed":case"source":case"link":X("error",t),X("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(r in l)if(l.hasOwnProperty(r)&&(n=l[r],n!=null))switch(r){case"children":case"dangerouslySetInnerHTML":throw Error(E(137,e));default:et(t,e,r,n,l,null)}return;default:if(gr(e)){for(d in l)l.hasOwnProperty(d)&&(n=l[d],n!==void 0&&er(t,e,d,n,l,void 0));return}}for(o in l)l.hasOwnProperty(o)&&(n=l[o],n!=null&&et(t,e,o,n,l,null))}var R1={};function N1(t,e,l,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,u=null,i=null,o=null,s=null,r=null,d=null;for(m in l){var y=l[m];if(l.hasOwnProperty(m)&&y!=null)switch(m){case"checked":break;case"value":break;case"defaultValue":s=y;default:n.hasOwnProperty(m)||et(t,e,m,null,n,y)}}for(var f in n){var m=n[f];if(y=l[f],n.hasOwnProperty(f)&&(m!=null||y!=null))switch(f){case"type":m!==y&&(J=!0),u=m;break;case"name":m!==y&&(J=!0),a=m;break;case"checked":m!==y&&(J=!0),r=m;break;case"defaultChecked":m!==y&&(J=!0),d=m;break;case"value":m!==y&&(J=!0),i=m;break;case"defaultValue":m!==y&&(J=!0),o=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(E(137,e));break;default:m!==y&&et(t,e,f,m,n,y)}}hc(t,i,o,s,r,d,u,a);return;case"select":m=i=o=f=null;for(u in l)if(s=l[u],l.hasOwnProperty(u)&&s!=null)switch(u){case"value":break;case"multiple":m=s;default:n.hasOwnProperty(u)||et(t,e,u,null,n,s)}for(a in n)if(u=n[a],s=l[a],n.hasOwnProperty(a)&&(u!=null||s!=null))switch(a){case"value":u!==s&&(J=!0),f=u;break;case"defaultValue":u!==s&&(J=!0),o=u;break;case"multiple":u!==s&&(J=!0),i=u;default:u!==s&&et(t,e,a,u,n,s)}e=o,l=i,n=m,f!=null?wa(t,!!l,f,!1):!!n!=!!l&&(e!=null?wa(t,!!l,e,!0):wa(t,!!l,l?[]:"",!1));return;case"textarea":m=f=null;for(o in l)if(a=l[o],l.hasOwnProperty(o)&&a!=null&&!n.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:et(t,e,o,null,n,a)}for(i in n)if(a=n[i],u=l[i],n.hasOwnProperty(i)&&(a!=null||u!=null))switch(i){case"value":a!==u&&(J=!0),f=a;break;case"defaultValue":a!==u&&(J=!0),m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(E(91));break;default:a!==u&&et(t,e,i,a,n,u)}Qm(t,f,m);return;case"option":for(var b in l)f=l[b],l.hasOwnProperty(b)&&f!=null&&!n.hasOwnProperty(b)&&(b==="selected"?t.selected=!1:et(t,e,b,null,n,f));for(s in n)f=n[s],m=l[s],n.hasOwnProperty(s)&&f!==m&&(f!=null||m!=null)&&(s==="selected"?(f!==m&&(J=!0),t.selected=f&&typeof f!="function"&&typeof f!="symbol"):et(t,e,s,f,n,m));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in l)f=l[v],l.hasOwnProperty(v)&&f!=null&&!n.hasOwnProperty(v)&&et(t,e,v,null,n,f);for(r in n)if(f=n[r],m=l[r],n.hasOwnProperty(r)&&f!==m&&(f!=null||m!=null))switch(r){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(E(137,e));break;default:et(t,e,r,f,n,m)}return;default:if(gr(e)){for(var A in l)f=l[A],l.hasOwnProperty(A)&&f!==void 0&&!n.hasOwnProperty(A)&&er(t,e,A,void 0,n,f);for(d in n)f=n[d],m=l[d],!n.hasOwnProperty(d)||f===m||f===void 0&&m===void 0||er(t,e,d,f,n,m);return}}for(var p in l)f=l[p],l.hasOwnProperty(p)&&f!=null&&!n.hasOwnProperty(p)&&et(t,e,p,null,n,f);for(y in n)f=n[y],m=l[y],!n.hasOwnProperty(y)||f===m||f==null&&m==null||et(t,e,y,f,n,m)}function Wh(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function M1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],u=a.transferSize,i=a.initiatorType,o=a.duration;if(u&&o&&Wh(i)){for(i=0,o=a.responseEnd,n+=1;n<l.length;n++){var s=l[n],r=s.startTime;if(r>o)break;var d=s.transferSize,y=s.initiatorType;d&&Wh(y)&&(s=s.responseEnd,i+=d*(s<o?1:(o-r)/(s-r)))}if(--n,e+=8*(u+i)/(a.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 lr=null,nr=null;function Yu(t){return t.nodeType===9?t:t.ownerDocument}function Ph(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 $y(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 Fy(t,e,l,n){return l=Yu(l).createElement(t),l[Lt]=n,l[se]=e,Yt(l,t,e),Dt(l),l}function ar(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 Ws=null;function _1(){var t=window.event;return t&&t.type==="popstate"?t===Ws?!1:(Ws=t,!0):(Ws=null,!1)}var nf=typeof setTimeout=="function"?setTimeout:void 0,x1=typeof clearTimeout=="function"?clearTimeout:void 0,tm=typeof Promise=="function"?Promise:void 0,em=typeof requestAnimationFrame=="function"?requestAnimationFrame:nf,D1=typeof queueMicrotask=="function"?queueMicrotask:typeof tm<"u"?function(t){return tm.resolve(null).then(t).catch(q1)}:nf;function q1(t){setTimeout(function(){throw t})}function kn(t){return t==="head"}function lm(t,e){var l=e,n=0;do{var a=l.nextSibling;if(t.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){t.removeChild(a),Ia(e);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")tc(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,tc(l);for(var u=l.firstChild;u;){var i=u.nextSibling,o=u.nodeName;u[Fu]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=i}}else l==="body"&&tc(t.ownerDocument.body);l=a}while(l);Ia(e)}function nm(t,e){var l=t;t=0;do{var n=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=n}while(l)}function Wy(t,e,l){if(e=CSS.escape(e)!==e?"r-"+btoa(e).replace(/=/g,""):e,t.style.viewTransitionName=e,l!=null&&(t.style.viewTransitionClass=l),l=getComputedStyle(t),l.display==="inline"){if(e=t.getClientRects(),e.length===1)var n=1;else for(var a=n=0;a<e.length;a++){var u=e[a];0<u.width&&0<u.height&&n++}n===1&&(t=t.style,t.display=e.length===1?"inline-block":"block",t.marginTop="-"+l.paddingTop,t.marginBottom="-"+l.paddingBottom)}}function Py(t,e){t=t.style,e=e.style;var l=e!=null?e.hasOwnProperty("viewTransitionName")?e.viewTransitionName:e.hasOwnProperty("view-transition-name")?e["view-transition-name"]:null:null;t.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=e!=null?e.hasOwnProperty("viewTransitionClass")?e.viewTransitionClass:e.hasOwnProperty("view-transition-class")?e["view-transition-class"]:null:null,t.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),t.display==="inline-block"&&(e==null?t.display=t.margin="":(l=e.display,t.display=l==null||typeof l=="boolean"?"":l,l=e.margin,l!=null?t.margin=l:(l=e.hasOwnProperty("marginTop")?e.marginTop:e["margin-top"],t.marginTop=l==null||typeof l=="boolean"?"":l,e=e.hasOwnProperty("marginBottom")?e.marginBottom:e["margin-bottom"],t.marginBottom=e==null||typeof e=="boolean"?"":e)))}function tp(t,e,l){return l=l.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<=l.innerHeight&&t.left<=l.innerWidth}}function ur(t){var e=t.getBoundingClientRect(),l=getComputedStyle(t);return tp(e,l,t)}function H1(t){var e=t.getBoundingClientRect();e=new DOMRect(e.x+2e4,e.y+2e4,e.width,e.height);var l=getComputedStyle(t);return tp(e,l,t)}function L1(t){return t.documentElement.clientHeight}function B1(t){this.addEventListener("load",t),this.addEventListener("error",t)}function G1(t,e,l,n,a,u,i,o,s){var r=e.nodeType===9?e:e.ownerDocument;try{var d=r.startViewTransition({update:function(){var f=r.defaultView,m=f.navigation&&f.navigation.transition,b=r.fonts.status;n();var v=[];if(b==="loaded"&&(L1(r),r.fonts.status==="loading"&&v.push(r.fonts.ready)),b=v.length,t!==null)for(var A=t.suspenseyImages,p=0,h=0;h<A.length;h++){var g=A[h];if(!g.complete){var S=g.getBoundingClientRect();if(0<S.bottom&&0<S.right&&S.top<f.innerHeight&&S.left<f.innerWidth){if(p+=dp(g),p>Pi){v.length=b;break}g=new Promise(B1.bind(g)),v.push(g)}}}if(0<v.length)return f=Promise.race([Promise.all(v),new Promise(function(w){return setTimeout(w,500)})]).then(a,a),(m?Promise.allSettled([m.finished,f]):f).then(u,u);if(a(),m)return m.finished.then(u,u);u()},types:l});r.__reactViewTransition=d;var y=[];return d.ready.then(function(){for(var f=r.documentElement.getAnimations({subtree:!0}),m=0;m<f.length;m++){var b=f[m],v=b.effect,A=v.pseudoElement;if(A!=null&&A.startsWith("::view-transition")){y.push(b),b=v.getKeyframes();for(var p=A=void 0,h=!0,g=0;g<b.length;g++){var S=b[g],w=S.width;if(A===void 0)A=w;else if(A!==w){h=!1;break}if(w=S.height,p===void 0)p=w;else if(p!==w){h=!1;break}delete S.width,delete S.height,S.transform==="none"&&delete S.transform}h&&A!==void 0&&p!==void 0&&(v.setKeyframes(b),h=getComputedStyle(v.target,v.pseudoElement),h.width!==A||h.height!==p)&&(h=b[0],h.width=A,h.height=p,h=b[b.length-1],h.width=A,h.height=p,v.setKeyframes(b))}}i()},function(f){r.__reactViewTransition===d&&(r.__reactViewTransition=null);try{typeof f=="object"&&f!==null&&f.name==="InvalidStateError"&&(f.message==="View transition was skipped because document visibility state is hidden."||f.message==="Skipping view transition because document visibility state has become hidden."||f.message==="Skipping view transition because viewport size changed."||f.message==="Transition was aborted because of invalid state")&&(f=null),f!==null&&s(f)}finally{n(),a(),i()}}),d.finished.finally(function(){for(var f=0;f<y.length;f++)y[f].cancel();r.__reactViewTransition===d&&(r.__reactViewTransition=null),o()}),d}catch{return n(),a(),i(),null}}function qn(t,e){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+e+")"}qn.prototype.animate=function(t,e){return e=typeof e=="number"?{duration:e}:ot({},e),e.pseudoElement=this._selector,this._scope.animate(t,e)};qn.prototype.getAnimations=function(){for(var t=this._scope,e=this._selector,l=t.getAnimations({subtree:!0}),n=[],a=0;a<l.length;a++){var u=l[a].effect;u!==null&&u.target===t&&u.pseudoElement===e&&n.push(l[a])}return n};qn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function ep(t){return{name:t,group:new qn("group",t),imagePair:new qn("image-pair",t),old:new qn("old",t),new:new qn("new",t)}}function Ae(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Ae.prototype.addEventListener=function(t,e,l){var n=null,a=null;if(!(l!=null&&typeof l!="boolean"&&(n=l.signal||null,n!==null&&n.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var u=this._eventListeners;if(lp(u,t,e,l)===-1){var i=this,o=e;l!=null&&typeof l!="boolean"&&l.once===!0&&(o=function(s){i.removeEventListener(t,e,l),typeof e=="function"?e.call(this,s):e.handleEvent(s)}),n!==null&&(a=i.removeEventListener.bind(i,t,e,l),n.addEventListener("abort",a,{once:!0}),a=n.removeEventListener.bind(n,"abort",a)),n=Xa(l),u.push({type:t,listener:e,optionsOrUseCapture:l,attachedListener:o,cleanup:a}),oe(this._fragmentFiber.child,!1,j1,t,o,n)}this._eventListeners=u}};function j1(t,e,l,n){return Nt(t).addEventListener(e,l,n),!1}Ae.prototype.removeEventListener=function(t,e,l){var n=this._eventListeners;if(n!==null&&(e=lp(n,t,e,l),e!==-1)){var a=n[e];l=a.attachedListener;var u=a.cleanup;a=Xa(a.optionsOrUseCapture),oe(this._fragmentFiber.child,!1,Y1,t,l,a),n.splice(e,1),u!==null&&u()}};function Y1(t,e,l,n){return Nt(t).removeEventListener(e,l,n),!1}function Xa(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function am(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function lp(t,e,l,n){if(t.length===0)return-1;n=am(n);for(var a=0;a<t.length;a++){var u=t[a];if(u.type===e&&u.listener===l&&am(u.optionsOrUseCapture)===n)return a}return-1}Ae.prototype.dispatchEvent=function(t){var e=$n(this._fragmentFiber);if(e===null)return!0;e=Nt(e);var l=this._eventListeners;if(l!==null&&0<l.length||!t.bubbles){var n=e.nodeType===9?e.createComment(""):document.createTextNode("");if(l)for(var a=0;a<l.length;a++){var u=l[a];n.addEventListener(u.type,u.attachedListener,Xa(u.optionsOrUseCapture))}if(e.appendChild(n),t=n.dispatchEvent(t),l)for(a=0;a<l.length;a++)u=l[a],n.removeEventListener(u.type,u.attachedListener,Xa(u.optionsOrUseCapture));return e.removeChild(n),t}return e.dispatchEvent(t)};Ae.prototype.focus=function(t){oe(this._fragmentFiber.child,!0,np,t,void 0,void 0)};function np(t,e){return t.tag===6?!1:(t=Nt(t),tb(t,e))}Ae.prototype.focusLast=function(t){var e=[];oe(this._fragmentFiber.child,!0,af,e,void 0,void 0);for(var l=e.length-1;0<=l&&!np(e[l],t);l--);};function af(t,e){return e.push(t),!1}Ae.prototype.blur=function(){var t=$n(this._fragmentFiber);t!==null&&(t=Nt(t),t=Yu(t).activeElement,t!==null&&oe(this._fragmentFiber.child,!1,X1,t,void 0,void 0))};function X1(t,e){return t.tag===6?!1:(t=Nt(t),t===e||t.contains(e)?(e.blur(),!0):!1)}Ae.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),oe(this._fragmentFiber.child,!1,Q1,t,void 0,void 0)};function Q1(t,e){return t.tag===6||(t=Nt(t),e.observe(t)),!1}Ae.prototype.unobserveUsing=function(t){var e=this._observers;if(e!==null&&e.has(t)){e.delete(t),oe(this._fragmentFiber.child,!1,V1,t,void 0,void 0);for(var l=e=0;l<Ve.length;l++){var n=Ve[l];n.fragmentInstance===this&&n.observer===t?t.unobserve(n.instance):Ve[e++]=n}Ve.length=e}};function V1(t,e){return t.tag===6||(t=Nt(t),e.unobserve(t)),!1}var Ve=[],Ps=!1;function Z1(t,e,l){Ve.push({fragmentInstance:t,observer:e,instance:l}),Ps||(Ps=!0,eb(function(){Ps=!1;var n=Ve;Ve=[];for(var a=0;a<n.length;a++){var u=n[a];u.observer.unobserve(u.instance)}}))}Ae.prototype.getClientRects=function(){var t=[];return oe(this._fragmentFiber.child,!1,I1,t,void 0,void 0),t};function I1(t,e){if(t.tag===6){t=t.stateNode;var l=t.ownerDocument.createRange();l.selectNodeContents(t),e.push.apply(e,l.getClientRects())}else t=Nt(t),e.push.apply(e,t.getClientRects());return!1}Ae.prototype.getRootNode=function(t){var e=$n(this._fragmentFiber);return e===null?this:Nt(e).getRootNode(t)};Ae.prototype.compareDocumentPosition=function(t){var e=$n(this._fragmentFiber);if(e===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];oe(this._fragmentFiber.child,!1,af,l,void 0,void 0);var n=Nt(e);if(l.length===0){if(l=n,Hd(this._fragmentFiber)){t:{for(e=this._fragmentFiber.return;e!==null;){if(e.tag===4){e=e.stateNode.containerInfo;break t}if(e.tag===3||e.tag===5||e.tag===27)break;e=e.return}e=null}e!=null&&(l=e)}e=this._fragmentFiber;var a=n=l.compareDocumentPosition(t);return l===t?a=Node.DOCUMENT_POSITION_CONTAINS:n&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=km(e)[1],l===null?a=Node.DOCUMENT_POSITION_PRECEDING:(t=Nt(l).compareDocumentPosition(t),a=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),a|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}e=Nt(l[0]),a=Nt(l[l.length-1]);var u=Hd(this._fragmentFiber)?e.parentElement:n;if(u==null)return Node.DOCUMENT_POSITION_DISCONNECTED;n=u.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY,u=u.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY;var i=e.compareDocumentPosition(t),o=a.compareDocumentPosition(t),s=i&Node.DOCUMENT_POSITION_CONTAINED_BY||o&Node.DOCUMENT_POSITION_CONTAINED_BY;return o=n&&u&&i&Node.DOCUMENT_POSITION_FOLLOWING&&o&Node.DOCUMENT_POSITION_PRECEDING,e=n&&e===t||u&&a===t||s||o?Node.DOCUMENT_POSITION_CONTAINED_BY:!n&&e===t||!u&&a===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:i,e&Node.DOCUMENT_POSITION_DISCONNECTED||e&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||K1(e,this._fragmentFiber,l[0],l[l.length-1],t)?e:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function K1(t,e,l,n,a){var u=Dn(a);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!u)t:{for(;u!==null;){if(u.tag===7&&(u===e||u.alternate===e)){l=!0;break t}u=u.return}l=!1}return l}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(u===null)return u=a.ownerDocument,a===u||a===u.documentElement||a===u.body;t:{for(u=e,e=$n(e);u!==null;){if(!(u.tag!==5&&u.tag!==3&&u.tag!==27||u!==e&&u.alternate!==e)){u=!0;break t}u=u.return}u=!1}return u}return t&Node.DOCUMENT_POSITION_PRECEDING?((e=!!u)&&!(e=u===l)&&(e=lc(l,u,Ld),e===null?e=!1:(oe(e,!0,Cg,u,l),u=ha,ha=null,e=u!==null)),e):t&Node.DOCUMENT_POSITION_FOLLOWING?((e=!!u)&&!(e=u===n)&&(e=lc(n,u,Ld),e===null?e=!1:(oe(e,!0,kg,u,n),u=ha,ec=ha=null,e=u!==null)),e):!1}function um(t,e){var l=t.ownerDocument.createRange();l.selectNodeContents(t),t=l.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,e?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}Ae.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(E(566));var e=[];oe(this._fragmentFiber.child,!1,af,e,void 0,void 0);var l=t!==!1;if(e.length===0){var n=km(this._fragmentFiber);if(n=l?n[1]||n[0]||$n(this._fragmentFiber):n[0]||n[1],n===null)return;if(n.tag===6){t=Nt(n),um(t,l);return}if(n=Nt(n),n.nodeType!==9){if(n.nodeType===11){l="host"in n?n.host:null,l!==null&&l.scrollIntoView(t);return}n.scrollIntoView(t)}}for(n=l?e.length-1:0;n!==(l?-1:e.length);){var a=e[n];a.tag===6?(a=Nt(a),um(a,l)):Nt(a).scrollIntoView(t),n+=l?-1:1}};function J1(t,e){return t=Nt(t),ap(t,e),!1}function ap(t,e){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(e)}function up(t,e){var l=e._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];t.addEventListener(a.type,a.attachedListener,Xa(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(u){for(var i=0,o=0;o<Ve.length;o++){var s=Ve[o];(s.fragmentInstance!==e||s.observer!==u||s.instance!==t)&&(Ve[i++]=s)}Ve.length=i,u.observe(t)}),ap(t,e))}function $1(t,e){var l=e._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];t.removeEventListener(a.type,a.attachedListener,Xa(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(u){typeof u.rootMargin=="string"?Z1(e,u,t):u.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(e))}function ir(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ir(l),_o(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function F1(t,e,l,n){for(;t.nodeType===1;){var a=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!n&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(n){if(!t[Fu])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(u=t.getAttribute("rel"),u==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(u!==a.rel||t.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||t.getAttribute("title")!==(a.title==null?null:a.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(u=t.getAttribute("src"),(u!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&u&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var u=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===u)return t}else return t;if(t=_e(t.nextSibling),t===null)break}return null}function W1(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=_e(t.nextSibling),t===null))return null;return t}function ip(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=_e(t.nextSibling),t===null))return null;return t}function or(t){return t.data==="$?"||t.data==="$~"}function uf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function P1(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var n=function(){e(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),t._reactRetry=n}}function _e(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 sr=null;function im(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return _e(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function om(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function tb(t,e){function l(){n=!0}if(t.ownerDocument.activeElement===t)return!0;var n=!1;try{t.ownerDocument.addEventListener("focus",l,!0),(t.focus||HTMLElement.prototype.focus).call(t,e)}finally{t.ownerDocument.removeEventListener("focus",l,!0)}return n}function eb(t){em(function(){em(function(e){return t(e)})})}function op(t,e,l){switch(e=Yu(l),t){case"html":if(t=e.documentElement,!t)throw Error(E(452));return t;case"head":if(t=e.head,!t)throw Error(E(453));return t;case"body":if(t=e.body,!t)throw Error(E(454));return t;default:throw Error(E(451))}}function sp(t,e,l){for(var n in l){var a=l[n];l.hasOwnProperty(n)&&a!=null&&et(t,e,n,null,R1,a)}l.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===il&&(t.onclick=null),_o(t)}function tc(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);_o(t)}var xe=new Map,sm=new Set;function Xu(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 Hl=F.d;F.d={f:lb,r:nb,D:ab,C:ub,L:ib,m:ob,X:cb,S:sb,M:rb};function lb(){var t=Hl.f(),e=Io();return t||e}function nb(t){var e=Ja(t);e!==null&&e.tag===5&&e.type==="form"?Z0(e):Hl.r(t)}var Pa=typeof document>"u"?null:document;function cp(t,e,l){var n=Pa;if(n&&typeof e=="string"&&e){var a=Re(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),sm.has(a)||(sm.add(a),t={rel:t,crossOrigin:l,href:e},n.querySelector(a)===null&&(e=n.createElement("link"),Yt(e,"link",t),Dt(e),n.head.appendChild(e)))}}function ab(t){Hl.D(t),cp("dns-prefetch",t,null)}function ub(t,e){Hl.C(t,e),cp("preconnect",t,e)}function ib(t,e,l){Hl.L(t,e,l);var n=Pa;if(n&&t&&e){var a='link[rel="preload"][as="'+Re(e)+'"]';e==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Re(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Re(l.imageSizes)+'"]')):a+='[href="'+Re(t)+'"]';var u=a;switch(e){case"style":u=Qa(t);break;case"script":u=tu(t)}if(!(xe.has(u)||(t=ot({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),xe.set(u,t),n.querySelector(a)!==null||e==="style"&&n.querySelector(ni(u))||e==="script"&&n.querySelector(ai(u))))){var i=n.createElement("link");Yt(i,"link",t),e==="style"&&(i[io]=!0,i.onload=i.onerror=function(){Lm(i)}),Dt(i),n.head.appendChild(i)}}}function ob(t,e){Hl.m(t,e);var l=Pa;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+Re(n)+'"][href="'+Re(t)+'"]',u=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=tu(t)}if(!xe.has(u)&&(t=ot({rel:"modulepreload",href:t},e),xe.set(u,t),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ai(u)))return}n=l.createElement("link"),Yt(n,"link",t),Dt(n),l.head.appendChild(n)}}}function sb(t,e,l){Hl.S(t,e,l);var n=Pa;if(n&&t){var a=ka(n).hoistableStyles,u=Qa(t);e=e||"default";var i=a.get(u);if(!i){var o={loading:0,preload:null};if(i=n.querySelector(ni(u)))o.loading=5;else{t=ot({rel:"stylesheet",href:t,"data-precedence":e},l),(l=xe.get(u))&&of(t,l);var s=i=n.createElement("link");Dt(s),Yt(s,"link",t),s._p=new Promise(function(r,d){s.onload=r,s.onerror=d}),s.addEventListener("load",function(){o.loading|=1}),s.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Fi(i,e,n)}i={type:"stylesheet",instance:i,count:1,state:o},a.set(u,i)}}}function cb(t,e){Hl.X(t,e);var l=Pa;if(l&&t){var n=ka(l).hoistableScripts,a=tu(t),u=n.get(a);u||(u=l.querySelector(ai(a)),u||(t=ot({src:t,async:!0},e),(e=xe.get(a))&&sf(t,e),u=l.createElement("script"),Dt(u),Yt(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function rb(t,e){Hl.M(t,e);var l=Pa;if(l&&t){var n=ka(l).hoistableScripts,a=tu(t),u=n.get(a);u||(u=l.querySelector(ai(a)),u||(t=ot({src:t,async:!0,type:"module"},e),(e=xe.get(a))&&sf(t,e),u=l.createElement("script"),Dt(u),Yt(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function cm(t,e,l,n){var a=(a=cn.current)?Xu(a):null;if(!a)throw Error(E(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Qa(l.href),e=ka(a).hoistableStyles,n=e.get(l),n||(n={type:"style",instance:null,count:0,state:null},e.set(l,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Qa(l.href);var u=ka(a).hoistableStyles,i=u.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,i),(u=a.querySelector(ni(t)))?u._p||(i.instance=u,i.state.loading=5):(u=xe.get(t),u||(u={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},xe.set(t,u)),fb(a,t,u,i.state))),e&&n===null)throw Error(E(528,""));return i}if(e&&n!==null)throw Error(E(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(l=tu(l),e=ka(a).hoistableScripts,n=e.get(l),n||(n={type:"script",instance:null,count:0,state:null},e.set(l,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(E(444,t))}}function Qa(t){return'href="'+Re(t)+'"'}function ni(t){return'link[rel="stylesheet"]['+t+"]"}function rp(t){return ot({},t,{"data-precedence":t.precedence,precedence:null})}function fb(t,e,l,n){if(e=t.querySelector('link[rel="preload"][as="style"]['+e+"]")){if(e[io]!==!0){n.loading=1;return}}else e=t.createElement("link"),e[io]=!0,e.onload=e.onerror=Lm.bind(null,e),Yt(e,"link",l),Dt(e),t.head.appendChild(e);n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2})}function tu(t){return'[src="'+Re(t)+'"]'}function ai(t){return"script[async]"+t}function rm(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+Re(l.href)+'"]');if(n)return e.instance=n,Dt(n),n;var a=ot({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),Dt(n),Yt(n,"style",a),Fi(n,l.precedence,t),e.instance=n;case"stylesheet":a=Qa(l.href);var u=t.querySelector(ni(a));if(u)return e.state.loading|=4,e.instance=u,Dt(u),u;n=rp(l),(a=xe.get(a))&&of(n,a),u=(t.ownerDocument||t).createElement("link"),Dt(u);var i=u;return i._p=new Promise(function(o,s){i.onload=o,i.onerror=s}),Yt(u,"link",n),e.state.loading|=4,Fi(u,l.precedence,t),e.instance=u;case"script":return u=tu(l.src),(a=t.querySelector(ai(u)))?(e.instance=a,Dt(a),a):(n=l,(a=xe.get(u))&&(n=ot({},l),sf(n,a)),t=t.ownerDocument||t,a=t.createElement("script"),Dt(a),Yt(a,"link",n),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(E(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,Fi(n,l.precedence,t));return e.instance}function Fi(t,e,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,u=a,i=0;i<n.length;i++){var o=n[i];if(o.dataset.precedence===e)u=o;else if(u!==a)break}u?u.parentNode.insertBefore(t,u.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function of(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function sf(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Wi=null;function fm(t,e,l){if(Wi===null){var n=new Map,a=Wi=new Map;a.set(l,n)}else a=Wi,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(t))return n;for(n.set(t,null),l=l.getElementsByTagName(t),a=0;a<l.length;a++){var u=l[a];if(!(u[Fu]||u[Lt]||t==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var i=u.getAttribute(e)||"";i=t+i;var o=n.get(i);o?o.push(u):n.set(i,[u])}}return n}function cr(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function db(t,e,l){if(l===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 dm(t,e){return t==="img"&&e.src!=null&&e.src!==""&&e.onLoad==null&&e.loading!=="lazy"}function fp(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function dp(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function hm(t,e){typeof e.decode=="function"&&(t.imgCount++,e.complete||(t.imgBytes+=dp(e),t.suspenseyImages.push(e)),t=yb.bind(t),e.decode().then(t,t))}function hb(t,e,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=Qa(n.href),u=e.querySelector(ni(a));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Qu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=u,Dt(u);return}u=e.ownerDocument||e,n=rp(n),(a=xe.get(a))&&of(n,a),u=u.createElement("link"),Dt(u);var i=u;i._p=new Promise(function(o,s){i.onload=o,i.onerror=s}),Yt(u,"link",n),l.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Qu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var Pi=0;function mb(t,e){return t.stylesheets&&t.count===0&&to(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var n=setTimeout(function(){if(t.stylesheets&&to(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4+e);0<t.imgBytes&&Pi===0&&(Pi=62500*M1());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&to(t,t.stylesheets),t.unsuspend)){var u=t.unsuspend;t.unsuspend=null,u()}},(t.imgBytes>Pi?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function hp(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)to(t,t.stylesheets);else if(t.unsuspend){var e=t.unsuspend;t.unsuspend=null,e()}}}function Qu(){this.count--,hp(this)}function yb(){this.imgCount--,hp(this)}var Ro=null;function to(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ro=new Map,e.forEach(pb,t),Ro=null,Qu.call(t))}function pb(t,e){if(!(e.state.loading&4)){var l=Ro.get(t);if(l)var n=l.get(null);else{l=new Map,Ro.set(t,l);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<a.length;u++){var i=a[u];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(l.set(i.dataset.precedence,i),n=i)}n&&l.set(null,n)}a=e.instance,i=a.getAttribute("data-precedence"),u=l.get(i)||n,u===n&&l.set(null,a),l.set(i,a),this.count++,n=Qu.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),u?u.parentNode.insertBefore(a,u.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}var Va={$$typeof:ul,Provider:null,Consumer:null,_currentValue:Hn,_currentValue2:Hn,_threadCount:0};function gb(t,e,l,n,a,u,i,o,s){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=Os(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Os(0),this.hiddenUpdates=Os(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=u,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.transitionTypes=null,this.incompleteTransitions=new Map}function mp(t,e,l,n,a,u,i,o,s,r,d,y){return t=new gb(t,e,l,i,s,r,d,y,o),e=1,u===!0&&(e|=24),u=ue(3,null,null,e),t.current=u,u.stateNode=t,e=zr(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:n,isDehydrated:l,cache:e},Rr(u),t}function yp(t){return t?(t=Ea,t):Ea}function pp(t,e,l,n,a,u){a=yp(a),n.context===null?n.context=a:n.pendingContext=a,n=fn(e),n.payload={element:l},u=u===void 0?null:u,u!==null&&(n.callback=u),l=dn(t,n,e),l!==null&&(ie(l,t,e),Tu(l,t,e))}function mm(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function cf(t,e){mm(t,e),(t=t.alternate)&&mm(t,e)}function gp(t){if(t.tag===13||t.tag===31){var e=Pn(t,67108864);e!==null&&ie(e,t,67108864),cf(t,67108864)}}function ym(t){if(t.tag===13||t.tag===31){var e=Ee();e=yr(e);var l=Pn(t,e);l!==null&&ie(l,t,e),cf(t,e)}}var Za=!0;function vb(t,e,l,n){var a=M.T;M.T=null;var u=F.p;try{F.p=2,rf(t,e,l,n)}finally{F.p=u,M.T=a}}function bb(t,e,l,n){var a=M.T;M.T=null;var u=F.p;try{F.p=8,rf(t,e,l,n)}finally{F.p=u,M.T=a}}function rf(t,e,l,n){if(Za){var a=rr(n);if(a===null)Fs(t,e,n,No,l),pm(t,n);else if(Eb(a,t,e,l,n))n.stopPropagation();else if(pm(t,n),e&4&&-1<Sb.indexOf(t)){for(;a!==null;){var u=Ja(a);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var i=Mn(u.pendingLanes);if(i!==0){var o=u;for(o.pendingLanes|=2,o.entangledLanes|=2;i;){var s=1<<31-Se(i);o.entanglements[1]|=s,i&=~s}hl(u),($&6)===0&&(ko=ve()+500,li(0,!1))}}break;case 31:case 13:o=Pn(u,2),o!==null&&ie(o,u,2),Io(),cf(u,2)}if(u=rr(n),u===null&&Fs(t,e,n,No,l),u===a)break;a=u}a!==null&&n.stopPropagation()}else Fs(t,e,n,null,l)}}function rr(t){return t=vr(t),ff(t)}var No=null;function ff(t){if(No=null,t=Dn(t),t!==null){var e=Iu(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=Tm(e),t!==null)return t;t=null}else if(l===31){if(t=Am(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return No=t,null}function vp(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(xg()){case Um:return 2;case Rm:return 8;case uo:case Dg:return 32;case Nm:return 268435456;default:return 32}default:return 32}}var fr=!1,pn=null,gn=null,vn=null,Vu=new Map,Zu=new Map,en=[],Sb="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 pm(t,e){switch(t){case"focusin":case"focusout":pn=null;break;case"dragenter":case"dragleave":gn=null;break;case"mouseover":case"mouseout":vn=null;break;case"pointerover":case"pointerout":Vu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zu.delete(e.pointerId)}}function fu(t,e,l,n,a,u){return t===null||t.nativeEvent!==u?(t={blockedOn:e,domEventName:l,eventSystemFlags:n,nativeEvent:u,targetContainers:[a]},e!==null&&(e=Ja(e),e!==null&&gp(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function Eb(t,e,l,n,a){switch(e){case"focusin":return pn=fu(pn,t,e,l,n,a),!0;case"dragenter":return gn=fu(gn,t,e,l,n,a),!0;case"mouseover":return vn=fu(vn,t,e,l,n,a),!0;case"pointerover":var u=a.pointerId;return Vu.set(u,fu(Vu.get(u)||null,t,e,l,n,a)),!0;case"gotpointercapture":return u=a.pointerId,Zu.set(u,fu(Zu.get(u)||null,t,e,l,n,a)),!0}return!1}function bp(t){var e=Dn(t.target);if(e!==null){var l=Iu(e);if(l!==null){if(e=l.tag,e===13){if(e=Tm(l),e!==null){t.blockedOn=e,Yd(t.priority,function(){ym(l)});return}}else if(e===31){if(e=Am(l),e!==null){t.blockedOn=e,Yd(t.priority,function(){ym(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function eo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=rr(t.nativeEvent);if(l===null){l=t.nativeEvent;var n=new l.constructor(l.type,l);mc=n,l.target.dispatchEvent(n),mc=null}else return e=Ja(l),e!==null&&gp(e),t.blockedOn=l,!1;e.shift()}return!0}function gm(t,e,l){eo(t)&&l.delete(e)}function Tb(){fr=!1,pn!==null&&eo(pn)&&(pn=null),gn!==null&&eo(gn)&&(gn=null),vn!==null&&eo(vn)&&(vn=null),Vu.forEach(gm),Zu.forEach(gm)}function Di(t,e){t.blockedOn===e&&(t.blockedOn=null,fr||(fr=!0,Mt.unstable_scheduleCallback(Mt.unstable_NormalPriority,Tb)))}var qi=null;function vm(t){qi!==t&&(qi=t,Mt.unstable_scheduleCallback(Mt.unstable_NormalPriority,function(){qi===t&&(qi=null);for(var e=0;e<t.length;e+=3){var l=t[e],n=t[e+1],a=t[e+2];if(typeof n!="function"){if(ff(n||l)===null)continue;break}var u=Ja(l);u!==null&&(t.splice(e,3),e-=3,Rc(u,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function Ia(t){function e(s){return Di(s,t)}pn!==null&&Di(pn,t),gn!==null&&Di(gn,t),vn!==null&&Di(vn,t),Vu.forEach(e),Zu.forEach(e);for(var l=0;l<en.length;l++){var n=en[l];n.blockedOn===t&&(n.blockedOn=null)}for(;0<en.length&&(l=en[0],l.blockedOn===null);)bp(l),l.blockedOn===null&&en.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],u=l[n+1],i=a[se]||null;if(typeof u=="function")i||vm(l);else if(i){var o=null;if(u&&u.hasAttribute("formAction")){if(a=u,i=u[se]||null)o=i.formAction;else if(ff(a)!==null)continue}else o=i.action;typeof o=="function"?l[n+1]=o:(l.splice(n,3),n-=3),vm(l)}}}function Sp(){function t(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(i){return a=i})},focusReset:"manual",scroll:"manual"})}function e(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),a!==null&&(a(),a=null)}}}function df(t){this._internalRoot=t}$o.prototype.render=df.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(E(409));var l=e.current,n=Ee();pp(l,n,t,e,null,null)};$o.prototype.unmount=df.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;pp(t.current,2,null,t,null,null),Io(),e[Ka]=null}};function $o(t){this._internalRoot=t}$o.prototype.unstable_scheduleHydration=function(t){if(t){var e=Hm();t={blockedOn:null,target:t,priority:e};for(var l=0;l<en.length&&e!==0&&e<en[l].priority;l++);en.splice(l,0,t),l===0&&bp(t)}};var bm=Sm.version;if(bm!=="19.3.0")throw Error(E(527,bm,"19.3.0"));F.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(E(188)):(t=Object.keys(t).join(","),Error(E(268,t)));return t=Ag(e),t=t!==null?Cm(t):null,t=t===null?null:t.stateNode,t};var Ab={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(du=__REACT_DEVTOOLS_GLOBAL_HOOK__,!du.isDisabled&&du.supportsFiber))try{Ku=du.inject(Ab),be=du}catch{}var du;Fo.createRoot=function(t,e){if(!Em(t))throw Error(E(299));var l=!1,n="",a=ty,u=ey,i=ly;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onUncaughtError!==void 0&&(a=e.onUncaughtError),e.onCaughtError!==void 0&&(u=e.onCaughtError),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=mp(t,1,!1,null,null,l,n,null,a,u,i,Sp),t[Ka]=e.current,lf(t),new df(e)};Fo.hydrateRoot=function(t,e,l){if(!Em(t))throw Error(E(299));var n=!1,a="",u=ty,i=ey,o=ly,s=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(i=l.onCaughtError),l.onRecoverableError!==void 0&&(o=l.onRecoverableError),l.formState!==void 0&&(s=l.formState)),e=mp(t,1,!0,e,l??null,n,a,s,u,i,o,Sp),e.context=yp(null),l=e.current,n=Ee(),n=yr(n),a=fn(n),a.callback=null,dn(l,a,n),l=n,e.current.lanes=l,$u(e,l),hl(e),t[Ka]=e.current,lf(t),new $o(e)};Fo.version="19.3.0"});var Cp=Ke((PS,Ap)=>{"use strict";function Tp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Tp)}catch(t){console.error(t)}}Tp(),Ap.exports=Ep()});var T=class extends Error{constructor(e,l,n,a,u){super(l);I(this,"reason");I(this,"explanation");I(this,"status");I(this,"details");I(this,"requestId");this.reason=e,this.explanation=l,this.status=n,this.details=a,this.requestId=u,this.name="FonderieApiError"}};function Ef(t){let e=globalThis.crypto,l=new Uint8Array(t);if(e?.getRandomValues)e.getRandomValues(l);else for(let a=0;a<t;a++)l[a]=Math.floor(Math.random()*256);let n="";for(let a of l)n+=a.toString(16).padStart(2,"0");return n}var ea=class{constructor(t,e={}){I(this,"baseUrl");I(this,"cache");I(this,"defaultTtlMs");I(this,"refresh");this.baseUrl=t,this.cache=e.cache,this.defaultTtlMs=e.defaultTtlMs??6e4,this.refresh=e.refresh}absolute(t){return`${this.baseUrl}${t}`}clearCache(){this.cache?.clear()}async request(t){let e=t.method.toUpperCase(),l=this.cache;if(l&&e==="GET"&&t.cache!==!1){let a=`GET ${t.path}::ws=${t.workspaceId??""}`;if(!t.bust){let i=l.get(a);if(i!==void 0)return i}let u=typeof t.cache=="number"?t.cache:this.defaultTtlMs;return l.dedupe(a,async()=>{let i=await this.exec(t);return l.set(a,i,u),i})}let n=await this.exec(t);if(l&&e!=="GET"){let a=t.path.split("?")[0]?.split("/").filter(Boolean)[0];a&&l.invalidate(`/${a}`);for(let u of t.invalidate??[])l.invalidate(u)}return n}async exec(t,e=!1){let l=Ef(16),n=l,a={"Content-Type":"application/json",traceparent:`00-${l}-${Ef(8)}-01`,"X-Request-ID":n};t.token&&(a.Authorization=`Bearer ${t.token}`),t.cookie&&(a.Cookie=t.cookie),t.workspaceId&&(a["X-Workspace-ID"]=t.workspaceId),Object.assign(a,t.headers??{});let u={method:t.method,headers:a,credentials:"include"};t.body!==void 0&&(u.body=JSON.stringify(t.body));let i=await fetch(`${this.baseUrl}${t.path}`,u),o=i.headers.get("x-request-id")??n;if(i.status===401&&this.refresh&&!e&&!t.path.startsWith("/auth/")){let r=await this.refresh();if(r)return this.exec({...t,token:r},!0)}if(i.status===204){if(!i.ok)throw new T("unknown",i.statusText,i.status,void 0,o);return}let s=await i.json();if(!i.ok||i.status===202){let r=s;throw new T(r.reason,r.explanation,i.status,r.details,o)}return s}};var la=t=>t.replace(/\/+$/,"");function re(t){return t?`?environment=${encodeURIComponent(t)}`:""}var ts=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=t.prefix?la(t.prefix):void 0,this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}rebase(t){return this.prefix?{...t,path:t.path.replace(/^\/admin(?=\/|\?|$)/,this.prefix)}:t}listConfig(t){return this.http.request(this.rebase({method:"GET",path:`/admin/config${re(t)}`,token:this.adminToken}))}getConfig(t,e){return this.http.request(this.rebase({method:"GET",path:`/admin/config/${encodeURIComponent(t)}${re(e)}`,token:this.adminToken}))}setConfig(t,e,l){return this.http.request(this.rebase({method:"PUT",path:`/admin/config/${encodeURIComponent(t)}${re(l)}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}deleteConfig(t,e){return this.http.request(this.rebase({method:"DELETE",path:`/admin/config/${encodeURIComponent(t)}${re(e)}`,token:this.adminToken,headers:this.actorHeaders}))}listConfigRevisions(t,e){return this.http.request(this.rebase({method:"GET",path:`/admin/config/${encodeURIComponent(t)}/revisions${re(e)}`,token:this.adminToken}))}rollbackConfig(t,e,l){return this.http.request(this.rebase({method:"POST",path:`/admin/config/${encodeURIComponent(t)}/rollback${re(l)}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}listSecrets(t){return this.http.request(this.rebase({method:"GET",path:`/admin/secrets${re(t)}`,token:this.adminToken}))}getSecret(t,e){return this.http.request(this.rebase({method:"GET",path:`/admin/secrets/${encodeURIComponent(t)}${re(e)}`,token:this.adminToken}))}setSecret(t,e,l){return this.http.request(this.rebase({method:"PUT",path:`/admin/secrets/${encodeURIComponent(t)}${re(l)}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}deleteSecret(t,e){return this.http.request(this.rebase({method:"DELETE",path:`/admin/secrets/${encodeURIComponent(t)}${re(e)}`,token:this.adminToken,headers:this.actorHeaders}))}listSecretRevisions(t,e){return this.http.request(this.rebase({method:"GET",path:`/admin/secrets/${encodeURIComponent(t)}/revisions${re(e)}`,token:this.adminToken}))}rollbackSecret(t,e,l){return this.http.request(this.rebase({method:"POST",path:`/admin/secrets/${encodeURIComponent(t)}/rollback${re(l)}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}revealSecret(t,e){return this.http.request(this.rebase({method:"POST",path:`/admin/secrets/${encodeURIComponent(t)}/reveal${re(e)}`,token:this.adminToken,headers:this.actorHeaders}))}},ui=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=la(t.prefix??"/_admin"),this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}get(t){return this.call("GET",t)}call(t,e,l){return this.http.request({method:t,path:`${this.prefix}${e}`,token:this.adminToken,headers:this.actorHeaders,...l!==void 0?{body:l}:{}})}attention(){return this.get("")}manifest(){return this.get("/manifest")}doctor(){return this.get("/doctor")}config(){return this.get("/config")}routes(){return this.get("/routes")}tokens(){return this.get("/access/tokens")}adminLog(t={}){let e=new URLSearchParams;t.limit&&e.set("limit",String(t.limit)),t.before&&e.set("before",t.before);let l=e.toString();return this.get(`/activity/admin-log${l?`?${l}`:""}`)}issueToken(t){return this.call("POST","/access/tokens",t)}revokeToken(t){return this.call("DELETE",`/access/tokens/${encodeURIComponent(t)}`)}migrations(){return this.get("/migrations")}applyMigrations(t,e){return this.call("POST",`/migrations/${encodeURIComponent(t)}/apply`,{expect:e})}},es=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=la(t.prefix??"/_admin"),this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}call(t,e){return this.http.request({method:t,path:`${this.prefix}/users${e}`,token:this.adminToken,headers:this.actorHeaders})}listUsers(t={}){let e=new URLSearchParams;t.limit&&e.set("limit",String(t.limit)),t.cursor&&e.set("cursor",t.cursor);let l=e.toString();return this.call("GET",l?`?${l}`:"")}findUser(t){return this.call("GET",`?email=${encodeURIComponent(t)}`)}getUser(t){return this.call("GET",`/${encodeURIComponent(t)}`)}listUserSessions(t){return this.call("GET",`/${encodeURIComponent(t)}/sessions`)}revokeUserSessions(t){return this.call("DELETE",`/${encodeURIComponent(t)}/sessions`)}userLoginHistory(t,e={}){let l=new URLSearchParams;e.limit&&l.set("limit",String(e.limit)),e.cursor&&l.set("cursor",e.cursor);let n=l.toString();return this.call("GET",`/${encodeURIComponent(t)}/login-history${n?`?${n}`:""}`)}suspendUser(t){return this.call("POST",`/${encodeURIComponent(t)}/suspend`)}unsuspendUser(t){return this.call("POST",`/${encodeURIComponent(t)}/unsuspend`)}},ls=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=la(t.prefix??"/_admin"),this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}call(t,e,l){return this.http.request({method:t,path:`${this.prefix}${e}`,token:this.adminToken,headers:this.actorHeaders,...l!==void 0?{body:l}:{}})}sub(t,e){return`/${t}/${encodeURIComponent(e)}`}catalog(){return this.call("GET","/catalog")}createPlan(t){return this.call("POST","/plans",t)}updatePlan(t,e){return this.call("PUT",`/plans/${encodeURIComponent(t)}`,e)}deletePlan(t){return this.call("DELETE",`/plans/${encodeURIComponent(t)}`)}listSubscriptions(t={}){let e=new URLSearchParams;t.limit&&e.set("limit",String(t.limit)),t.cursor&&e.set("cursor",t.cursor);let l=e.toString();return this.call("GET",`/subscriptions${l?`?${l}`:""}`)}subscription(t,e){return this.call("GET",`/subscriptions${this.sub(t,e)}`)}wallet(t,e,l){let n=l?`?currency=${encodeURIComponent(l)}`:"";return this.call("GET",`/wallet${this.sub(t,e)}${n}`)}walletLedger(t,e,l={}){let n=new URLSearchParams;l.currency&&n.set("currency",l.currency),l.limit&&n.set("limit",String(l.limit)),l.cursor&&n.set("cursor",l.cursor);let a=n.toString();return this.call("GET",`/wallet${this.sub(t,e)}/ledger${a?`?${a}`:""}`)}grant(t){return this.call("POST","/wallet/grant",t)}},Tf=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=la(t.prefix??"/_admin"),this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}listAudit(t={}){let e=new URLSearchParams;t.workspaceId&&e.set("workspaceId",t.workspaceId),t.type&&e.set("type",t.type),t.actorId&&e.set("actorId",t.actorId),t.from&&e.set("from",t.from.toISOString()),t.to&&e.set("to",t.to.toISOString()),t.limit&&e.set("limit",String(t.limit)),t.cursor&&e.set("cursor",t.cursor);let l=e.toString();return this.http.request({method:"GET",path:`${this.prefix}/audit${l?`?${l}`:""}`,token:this.adminToken,headers:this.actorHeaders})}},ns=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=t.prefix?la(t.prefix):void 0,this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}rebase(t){return this.prefix?{...t,path:t.path.replace(/^\/admin(?=\/|\?|$)/,this.prefix)}:t}listTemplates(){return this.http.request(this.rebase({method:"GET",path:"/admin/templates",token:this.adminToken}))}getTemplate(t,e){let l=e?`?locale=${encodeURIComponent(e)}`:"";return this.http.request(this.rebase({method:"GET",path:`/admin/templates/${encodeURIComponent(t)}${l}`,token:this.adminToken}))}setTemplate(t,e,l){let n=l?`?locale=${encodeURIComponent(l)}`:"";return this.http.request(this.rebase({method:"PUT",path:`/admin/templates/${encodeURIComponent(t)}${n}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}deleteTemplate(t,e){let l=e?`?locale=${encodeURIComponent(e)}`:"";return this.http.request(this.rebase({method:"DELETE",path:`/admin/templates/${encodeURIComponent(t)}${l}`,token:this.adminToken,headers:this.actorHeaders}))}listRevisions(t,e){let l=e?`?locale=${encodeURIComponent(e)}`:"";return this.http.request(this.rebase({method:"GET",path:`/admin/templates/${encodeURIComponent(t)}/revisions${l}`,token:this.adminToken}))}rollback(t,e,l){let n=l?`?locale=${encodeURIComponent(l)}`:"";return this.http.request(this.rebase({method:"POST",path:`/admin/templates/${encodeURIComponent(t)}/rollback${n}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}previewTemplate(t,e,l){let n=l?`?locale=${encodeURIComponent(l)}`:"";return this.http.request(this.rebase({method:"POST",path:`/admin/templates/${encodeURIComponent(t)}/preview${n}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}};var Je=R(L(),1);var Bl=R(L(),1);var yl=R(L(),1);var eu=R(L(),1);var Gl=R(L(),1);var pl=R(L(),1);var $e=R(L(),1);function oi(t,e){let[l,n]=(0,Je.useState)([]),[a,u]=(0,Je.useState)(!0),[i,o]=(0,Je.useState)(null),s=(0,Je.useCallback)(async()=>{u(!0),o(null);try{let{result:y}=await t.listConfig(e);if(!Array.isArray(y))throw new T("UNEXPECTED_SHAPE","Config list returned an unexpected shape \u2014 is @fonderie/config mounted at this prefix?",200);n(y)}catch(y){let f=y instanceof T?y:new T("unknown",String(y),0);o(f)}finally{u(!1)}},[t,e]),r=(0,Je.useCallback)(async(y,f)=>{o(null);try{let{result:m}=await t.setConfig(y,f,e);return await s(),m}catch(m){let b=m instanceof T?m:new T("unknown",String(m),0);throw o(b),b}},[t,e,s]),d=(0,Je.useCallback)(async y=>{o(null);try{await t.deleteConfig(y,e),await s()}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw o(m),m}},[t,e,s]);return(0,Je.useEffect)(()=>{s()},[s]),{entries:l,isLoading:a,error:i,refresh:s,saveEntry:r,removeEntry:d}}function Hf(t,e,l){let[n,a]=(0,Bl.useState)(null),[u,i]=(0,Bl.useState)(!0),[o,s]=(0,Bl.useState)(null),r=(0,Bl.useCallback)(async()=>{if(!e){i(!1);return}i(!0),s(null);try{let{result:d}=await t.getConfig(e,l);a(d)}catch(d){let y=d instanceof T?d:new T("unknown",String(d),0);s(y)}finally{i(!1)}},[t,e,l]);return(0,Bl.useEffect)(()=>{r()},[r]),{entry:n,isLoading:u,error:o,refresh:r}}function Lf(t,e,l){let[n,a]=(0,yl.useState)([]),[u,i]=(0,yl.useState)(!0),[o,s]=(0,yl.useState)(null),r=(0,yl.useCallback)(async()=>{if(!e){i(!1);return}i(!0),s(null);try{let{result:y}=await t.listConfigRevisions(e,l);a(y)}catch(y){let f=y instanceof T?y:new T("unknown",String(y),0);s(f)}finally{i(!1)}},[t,e,l]),d=(0,yl.useCallback)(async y=>{s(null);try{let{result:f}=await t.rollbackConfig(e,{toVersion:y},l);return await r(),f}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw s(m),m}},[t,e,l,r]);return(0,yl.useEffect)(()=>{r()},[r]),{revisions:n,isLoading:u,error:o,refresh:r,rollback:d}}function si(t){let[e,l]=(0,eu.useState)(!1),[n,a]=(0,eu.useState)(null);return{revealSecret:(0,eu.useCallback)(async(i,o)=>{l(!0),a(null);try{let{result:s}=await t.revealSecret(i,o);return s.value}catch(s){let r=s instanceof T?s:new T("unknown",String(s),0);throw a(r),r}finally{l(!1)}},[t]),isLoading:e,error:n}}function Bf(t,e,l){let[n,a]=(0,Gl.useState)(null),[u,i]=(0,Gl.useState)(!0),[o,s]=(0,Gl.useState)(null),r=(0,Gl.useCallback)(async()=>{if(!e){i(!1);return}i(!0),s(null);try{let{result:d}=await t.getSecret(e,l);a(d)}catch(d){let y=d instanceof T?d:new T("unknown",String(d),0);s(y)}finally{i(!1)}},[t,e,l]);return(0,Gl.useEffect)(()=>{r()},[r]),{secret:n,isLoading:u,error:o,refresh:r}}function Gf(t,e,l){let[n,a]=(0,pl.useState)([]),[u,i]=(0,pl.useState)(!0),[o,s]=(0,pl.useState)(null),r=(0,pl.useCallback)(async()=>{if(!e){i(!1);return}i(!0),s(null);try{let{result:y}=await t.listSecretRevisions(e,l);a(y)}catch(y){let f=y instanceof T?y:new T("unknown",String(y),0);s(f)}finally{i(!1)}},[t,e,l]),d=(0,pl.useCallback)(async y=>{s(null);try{let{result:f}=await t.rollbackSecret(e,{toVersion:y},l);return await r(),f}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw s(m),m}},[t,e,l,r]);return(0,pl.useEffect)(()=>{r()},[r]),{revisions:n,isLoading:u,error:o,refresh:r,rollback:d}}function ci(t,e){let[l,n]=(0,$e.useState)([]),[a,u]=(0,$e.useState)(!0),[i,o]=(0,$e.useState)(null),s=(0,$e.useCallback)(async()=>{u(!0),o(null);try{let{result:y}=await t.listSecrets(e);if(!Array.isArray(y))throw new T("UNEXPECTED_SHAPE","Secret list returned an unexpected shape \u2014 is @fonderie/config mounted at this prefix?",200);n(y)}catch(y){let f=y instanceof T?y:new T("unknown",String(y),0);o(f)}finally{u(!1)}},[t,e]),r=(0,$e.useCallback)(async(y,f)=>{o(null);try{let{result:m}=await t.setSecret(y,f,e);return await s(),m}catch(m){let b=m instanceof T?m:new T("unknown",String(m),0);throw o(b),b}},[t,e,s]),d=(0,$e.useCallback)(async y=>{o(null);try{await t.deleteSecret(y,e),await s()}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw o(m),m}},[t,e,s]);return(0,$e.useEffect)(()=>{s()},[s]),{secrets:l,isLoading:a,error:i,refresh:s,saveSecret:r,removeSecret:d}}var gl=R(L(),1),mt=R(At(),1);var Vf=R(L(),1),St=R(At(),1);function Qf({client:t,kind:e,configKey:l,environment:n,onSaved:a}){let u=e==="secret",i=Hf(t,u?"":l,n),o=Bf(t,u?l:"",n),s=oi(t,n),r=ci(t,n),d=Lf(t,u?"":l,n),y=Gf(t,u?l:"",n),{revealSecret:f,isLoading:m}=si(t),b=u?o:i,v=u?y:d,[A,p]=(0,gl.useState)(""),[h,g]=(0,gl.useState)(""),[S,w]=(0,gl.useState)(null),[U,O]=(0,gl.useState)(!1),[C,_]=(0,gl.useState)(null);(0,gl.useEffect)(()=>{u||i.entry&&(p(JSON.stringify(i.entry.value,null,2)),g(i.entry.description??""))},[u,i.entry]),(0,gl.useEffect)(()=>{u&&o.secret&&g(o.secret.description??"")},[u,o.secret]);let H=async Qt=>{Qt.preventDefault(),O(!0),_(null);try{if(u){let De={value:A};h&&(De.description=h),await r.saveSecret(l,De)}else{let De={value:JSON.parse(A)};h&&(De.description=h),await s.saveEntry(l,De)}await b.refresh(),a?.()}catch(De){De instanceof T&&_(De)}finally{O(!1)}},te=async()=>{try{w(await f(l,n))}catch{}};return b.isLoading?(0,mt.jsx)("p",{style:Ct.status,children:"Loading\u2026"}):b.error?(0,mt.jsx)("p",{style:Ct.error,role:"alert",children:b.error.explanation}):(0,mt.jsxs)("div",{style:Ct.container,children:[(0,mt.jsx)("h1",{style:Ct.title,children:l}),(0,mt.jsxs)("p",{style:Ct.meta,children:[n??"all"," \xB7 v",u?o.secret?.version:i.entry?.version]}),u&&(0,mt.jsxs)("div",{style:Ct.revealBox,children:[(0,mt.jsx)("span",{style:Ct.revealedValue,children:S??"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"}),(0,mt.jsx)("button",{type:"button",disabled:m,onClick:te,style:Ct.smallButton,children:"Reveal"})]}),(0,mt.jsxs)("form",{style:Ct.form,onSubmit:H,children:[(0,mt.jsx)("label",{style:Ct.label,htmlFor:"config-value",children:u?"New value":"Value (JSON)"}),(0,mt.jsx)("textarea",{id:"config-value",style:Ct.textarea,value:A,onChange:Qt=>p(Qt.target.value),rows:u?2:8,required:!0}),(0,mt.jsx)("label",{style:Ct.label,htmlFor:"config-description",children:"Description"}),(0,mt.jsx)("input",{id:"config-description",style:Ct.input,value:h,onChange:Qt=>g(Qt.target.value)}),C&&(0,mt.jsx)("p",{style:Ct.error,role:"alert",children:C.explanation}),(0,mt.jsx)("button",{type:"submit",disabled:U,style:Ct.button,children:U?"Saving\u2026":"Save"})]}),v.revisions.length>0&&(0,mt.jsxs)("div",{style:Ct.revisions,children:[(0,mt.jsx)("h2",{style:Ct.subtitle,children:"History"}),(0,mt.jsx)("ul",{style:Ct.list,children:v.revisions.map(Qt=>(0,mt.jsxs)("li",{style:Ct.row,children:[(0,mt.jsxs)("span",{children:["v",Qt.version," \u2014 ",Qt.actor??"unknown"," \u2014"," ",new Date(Qt.createdAt).toLocaleString()]}),(0,mt.jsx)("button",{type:"button",onClick:()=>v.rollback(Qt.version),style:Ct.smallButton,children:"Roll back"})]},Qt.version))})]})]})}var Ct={container:{padding:24,maxWidth:640},title:{fontSize:24,fontWeight:700},meta:{fontSize:13,color:"var(--fonderie-text-muted,#5c5c5c)",marginBottom:16},status:{padding:24,textAlign:"center",color:"var(--fonderie-text-muted,#5c5c5c)"},error:{color:"var(--fonderie-danger,#e00)",marginBottom:12,fontSize:14},revealBox:{display:"flex",alignItems:"center",gap:12,marginBottom:16},revealedValue:{fontFamily:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)',fontSize:13,color:"var(--fonderie-text,#171717)"},form:{display:"flex",flexDirection:"column",gap:4},label:{fontSize:13,fontWeight:600,marginTop:12},input:{border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:10,fontSize:14},textarea:{border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:10,fontSize:14,fontFamily:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)'},button:{marginTop:16,backgroundColor:"var(--fonderie-text,#171717)",color:"var(--fonderie-surface,#fff)",padding:"10px 20px",borderRadius:8,border:"none",fontSize:14,fontWeight:600,cursor:"pointer",alignSelf:"flex-start"},smallButton:{background:"none",border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:"4px 10px",fontSize:12,cursor:"pointer"},revisions:{marginTop:32},subtitle:{fontSize:16,fontWeight:600,marginBottom:8},list:{listStyle:"none",padding:0,margin:0},row:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid var(--fonderie-border-light,#f5f5f5)",fontSize:13}};function Zf({client:t,environment:e,onSelectConfig:l,onSelectSecret:n}){let{entries:a,isLoading:u,error:i}=oi(t,e),{secrets:o,isLoading:s,error:r}=ci(t,e),{revealSecret:d,isLoading:y}=si(t),[f,m]=(0,Vf.useState)({}),b=async v=>{try{let A=await d(v,e);m(p=>({...p,[v]:A}))}catch{}};return(0,St.jsxs)("div",{style:Ut.container,children:[(0,St.jsx)("h1",{style:Ut.title,children:"Config"}),u?(0,St.jsx)("p",{style:Ut.status,children:"Loading\u2026"}):i?(0,St.jsx)("p",{style:Ut.error,role:"alert",children:i.explanation}):(0,St.jsx)("ul",{style:Ut.list,children:a.map(v=>(0,St.jsx)("li",{style:Ut.row,children:(0,St.jsxs)("button",{type:"button",onClick:()=>l?.(v.key),style:Ut.rowButton,children:[(0,St.jsx)("span",{style:Ut.key,children:v.key}),(0,St.jsx)("span",{style:Ut.env,children:v.environment})]})},`${v.key}:${v.environment}`))}),(0,St.jsx)("h1",{style:Ut.title,children:"Secrets"}),s?(0,St.jsx)("p",{style:Ut.status,children:"Loading\u2026"}):r?(0,St.jsx)("p",{style:Ut.error,role:"alert",children:r.explanation}):(0,St.jsx)("ul",{style:Ut.list,children:o.map(v=>(0,St.jsxs)("li",{style:Ut.row,children:[(0,St.jsxs)("button",{type:"button",onClick:()=>n?.(v.key),style:Ut.rowButton,children:[(0,St.jsx)("span",{style:Ut.key,children:v.key}),(0,St.jsx)("span",{style:Ut.env,children:v.environment})]}),(0,St.jsx)("span",{style:Ut.revealed,children:f[v.key]??"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"}),(0,St.jsx)("button",{type:"button",disabled:y,onClick:()=>b(v.key),style:Ut.revealButton,children:"Reveal"})]},`${v.key}:${v.environment}`))})]})}var Ut={container:{padding:24,maxWidth:640},title:{fontSize:20,fontWeight:700,marginTop:24,marginBottom:12},status:{padding:12,color:"var(--fonderie-text-muted,#5c5c5c)"},error:{color:"var(--fonderie-danger,#e00)",marginBottom:12,fontSize:14},list:{listStyle:"none",padding:0,margin:0},row:{display:"flex",alignItems:"center",gap:12,borderBottom:"1px solid var(--fonderie-border-light,#f5f5f5)",padding:"10px 0"},rowButton:{flex:1,display:"flex",justifyContent:"space-between",background:"none",border:"none",cursor:"pointer",textAlign:"left",padding:0},key:{fontSize:14,fontWeight:600},env:{fontSize:13,color:"var(--fonderie-text-muted,#5c5c5c)"},revealed:{fontSize:13,fontFamily:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)',color:"var(--fonderie-text,#171717)",minWidth:100},revealButton:{background:"none",border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:"4px 10px",fontSize:12,cursor:"pointer"}};var jl=R(L(),1);var vl=R(L(),1);var Fe=R(L(),1);var On=R(L(),1);function If(t,e,l){let[n,a]=(0,jl.useState)(null),[u,i]=(0,jl.useState)(!0),[o,s]=(0,jl.useState)(null),r=(0,jl.useCallback)(async()=>{i(!0),s(null);try{let{result:d}=await t.getTemplate(e,l);a(d)}catch(d){let y=d instanceof T?d:new T("unknown",String(d),0);s(y)}finally{i(!1)}},[t,e,l]);return(0,jl.useEffect)(()=>{r()},[r]),{template:n,isLoading:u,error:o,refresh:r}}function Kf(t,e,l){let[n,a]=(0,vl.useState)([]),[u,i]=(0,vl.useState)(!0),[o,s]=(0,vl.useState)(null),r=(0,vl.useCallback)(async()=>{i(!0),s(null);try{let{result:y}=await t.listRevisions(e,l);a(y)}catch(y){let f=y instanceof T?y:new T("unknown",String(y),0);s(f)}finally{i(!1)}},[t,e,l]),d=(0,vl.useCallback)(async y=>{s(null);try{let{result:f}=await t.rollback(e,{toVersion:y},l);return await r(),f}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw s(m),m}},[t,e,l,r]);return(0,vl.useEffect)(()=>{r()},[r]),{revisions:n,isLoading:u,error:o,refresh:r,rollback:d}}function fi(t){let[e,l]=(0,Fe.useState)([]),[n,a]=(0,Fe.useState)(!0),[u,i]=(0,Fe.useState)(null),o=(0,Fe.useCallback)(async()=>{a(!0),i(null);try{let{result:d}=await t.listTemplates();l(d)}catch(d){let y=d instanceof T?d:new T("unknown",String(d),0);i(y)}finally{a(!1)}},[t]),s=(0,Fe.useCallback)(async(d,y,f)=>{i(null);try{let{result:m}=await t.setTemplate(d,y,f);return await o(),m}catch(m){let b=m instanceof T?m:new T("unknown",String(m),0);throw i(b),b}},[t,o]),r=(0,Fe.useCallback)(async(d,y)=>{i(null);try{await t.deleteTemplate(d,y),await o()}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw i(m),m}},[t,o]);return(0,Fe.useEffect)(()=>{o()},[o]),{templates:e,isLoading:n,error:u,refresh:o,saveTemplate:s,removeTemplate:r}}function Jf(t){let[e,l]=(0,On.useState)(null),[n,a]=(0,On.useState)(!1),[u,i]=(0,On.useState)(null),o=(0,On.useCallback)(async(r,d,y)=>{a(!0),i(null);try{let{result:f}=await t.previewTemplate(r,d,y);return l(f),f}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw i(m),m}finally{a(!1)}},[t]),s=(0,On.useCallback)(()=>l(null),[]);return{preview:e,isPreviewing:n,error:u,renderPreview:o,clearPreview:s}}var ee=R(L(),1),G=R(At(),1);var Ce=R(At(),1),tg=new Set(["subject","preheader","brandName"]);function $f({client:t,type:e,locale:l,onSaved:n}){let{template:a,isLoading:u,error:i,refresh:o}=If(t,e,l),{saveTemplate:s}=fi(t),{revisions:r,rollback:d}=Kf(t,e,l),[y,f]=(0,ee.useState)(!1),[m,b]=(0,ee.useState)(null),[v,A]=(0,ee.useState)(""),[p,h]=(0,ee.useState)(""),[g,S]=(0,ee.useState)(""),[w,U]=(0,ee.useState)(!0),{preview:O,isPreviewing:C,error:_,renderPreview:H}=Jf(t),[te,Qt]=(0,ee.useState)("{}"),[De,Wo]=(0,ee.useState)(null);(0,ee.useEffect)(()=>{a&&(A(a.subject??""),h(a.html??""),S(a.text),U(a.active))},[a]);let gf=(0,ee.useCallback)(async()=>{let pt={};try{let ml=JSON.parse(te||"{}");if(!ml||typeof ml!="object"||Array.isArray(ml)){Wo("Sample data must be a JSON object.");return}pt=ml,Wo(null)}catch{Wo("Sample data is not valid JSON.");return}let bf=(await H(e,{text:g,data:pt,...v?{subject:v}:{},...p?{html:p}:{}},l)).variables.filter(ml=>!tg.has(ml)&&!(ml in pt));if(bf.length>0){let ml={...pt,...Object.fromEntries(bf.map(Sf=>[Sf,Sf]))};Qt(JSON.stringify(ml,null,2))}},[H,e,g,v,p,l,te]),vf=a?`${e}:${l??""}`:null;(0,ee.useEffect)(()=>{vf&&gf()},[vf]);let zp=async pt=>{pt.preventDefault(),f(!0),b(null);try{let zn={text:g,active:w};v&&(zn.subject=v),p&&(zn.html=p),a?.version!==void 0&&(zn.ifVersion=a.version),await s(e,zn,l),await o(),n?.()}catch(zn){b(zn)}finally{f(!1)}};return u?(0,G.jsx)("p",{style:K.status,children:"Loading template\u2026"}):i?(0,G.jsx)("p",{style:K.error,role:"alert",children:i.explanation}):(0,G.jsxs)("div",{style:K.container,children:[(0,G.jsx)("h1",{style:K.title,children:e}),(0,G.jsxs)("p",{style:K.meta,children:[l??"base"," \xB7 v",a?.version??1]}),(0,G.jsxs)("div",{style:K.split,children:[(0,G.jsxs)("div",{style:K.column,children:[(0,G.jsxs)("form",{style:K.form,onSubmit:zp,children:[(0,G.jsx)("label",{style:K.label,htmlFor:"template-subject",children:"Subject"}),(0,G.jsx)("input",{id:"template-subject",style:K.input,value:v,onChange:pt=>A(pt.target.value)}),(0,G.jsx)("label",{style:K.label,htmlFor:"template-html",children:"HTML body"}),(0,G.jsx)("textarea",{id:"template-html",style:K.textarea,value:p,onChange:pt=>h(pt.target.value),rows:8}),(0,G.jsx)("label",{style:K.label,htmlFor:"template-text",children:"Plain-text body"}),(0,G.jsx)("textarea",{id:"template-text",style:K.textarea,value:g,onChange:pt=>S(pt.target.value),rows:4,required:!0}),(0,G.jsxs)("label",{style:K.checkboxLabel,children:[(0,G.jsx)("input",{type:"checkbox",checked:w,onChange:pt=>U(pt.target.checked)}),"Active"]}),m&&(0,G.jsx)("p",{style:K.error,role:"alert",children:m.explanation}),(0,G.jsx)("button",{type:"submit",disabled:y,style:K.button,children:y?"Saving\u2026":"Save"})]}),(0,G.jsx)("label",{style:K.label,htmlFor:"template-sample",children:"Sample data"}),(0,G.jsx)("textarea",{id:"template-sample",style:K.textarea,value:te,onChange:pt=>Qt(pt.target.value),rows:6,spellCheck:!1}),De&&(0,G.jsx)("p",{style:K.error,role:"alert",children:De})]}),(0,G.jsxs)("div",{style:K.column,children:[(0,G.jsxs)("div",{style:K.previewHeader,children:[(0,G.jsx)("span",{style:K.label,children:"Preview"}),(0,G.jsx)("button",{type:"button",onClick:()=>{gf()},disabled:C,style:K.rollbackButton,children:C?"Rendering\u2026":"Render"})]}),_&&(0,G.jsx)("p",{style:K.error,role:"alert",children:_.explanation}),O?.subject&&(0,G.jsx)("p",{style:K.previewSubject,children:O.subject}),O?.html?(0,G.jsx)("iframe",{title:"Template preview",style:K.previewFrame,sandbox:"",srcDoc:O.html}):O?(0,G.jsx)("pre",{style:K.previewText,children:O.text}):(0,G.jsx)("p",{style:K.meta,children:"Nothing rendered yet."})]})]}),r.length>0&&(0,G.jsxs)("div",{style:K.revisions,children:[(0,G.jsx)("h2",{style:K.subtitle,children:"History"}),(0,G.jsx)("ul",{style:K.list,children:r.map(pt=>(0,G.jsxs)("li",{style:K.row,children:[(0,G.jsxs)("span",{children:["v",pt.version," \u2014 ",pt.actor??"unknown"," \u2014"," ",new Date(pt.createdAt).toLocaleString()]}),(0,G.jsx)("button",{type:"button",onClick:()=>d(pt.version),style:K.rollbackButton,children:"Roll back"})]},pt.version))})]})]})}var K={container:{padding:24,maxWidth:1180},split:{display:"flex",gap:24,alignItems:"flex-start",flexWrap:"wrap"},column:{flex:"1 1 460px",minWidth:320,display:"flex",flexDirection:"column"},previewHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:12},previewSubject:{fontSize:14,fontWeight:600,margin:"8px 0"},previewFrame:{width:"100%",height:520,border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,background:"var(--fonderie-surface,#fff)"},previewText:{whiteSpace:"pre-wrap",border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:12,fontSize:13,fontFamily:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)'},title:{fontSize:24,fontWeight:700},meta:{fontSize:13,color:"var(--fonderie-text-muted,#5c5c5c)",marginBottom:16},status:{padding:24,textAlign:"center",color:"var(--fonderie-text-muted,#5c5c5c)"},error:{color:"var(--fonderie-danger,#e00)",marginBottom:12,fontSize:14},form:{display:"flex",flexDirection:"column",gap:4},label:{fontSize:13,fontWeight:600,marginTop:12},input:{border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:10,fontSize:14},textarea:{border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:10,fontSize:14,fontFamily:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)'},checkboxLabel:{display:"flex",alignItems:"center",gap:8,marginTop:12,fontSize:14},button:{marginTop:16,backgroundColor:"var(--fonderie-text,#171717)",color:"var(--fonderie-surface,#fff)",padding:"10px 20px",borderRadius:8,border:"none",fontSize:14,fontWeight:600,cursor:"pointer",alignSelf:"flex-start"},revisions:{marginTop:32},subtitle:{fontSize:16,fontWeight:600,marginBottom:8},list:{listStyle:"none",padding:0,margin:0},row:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid var(--fonderie-border-light,#f5f5f5)",fontSize:13},rollbackButton:{background:"none",border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:"4px 10px",fontSize:12,cursor:"pointer"}};function Ff({client:t,onSelectTemplate:e}){let{templates:l,isLoading:n,error:a}=fi(t);return n?(0,Ce.jsx)("p",{style:qe.status,children:"Loading templates\u2026"}):a?(0,Ce.jsx)("p",{style:qe.error,role:"alert",children:a.explanation}):(0,Ce.jsxs)("div",{style:qe.container,children:[(0,Ce.jsx)("h1",{style:qe.title,children:"Templates"}),(0,Ce.jsx)("ul",{style:qe.list,children:l.map(u=>(0,Ce.jsx)("li",{style:qe.row,children:(0,Ce.jsxs)("button",{type:"button",onClick:()=>e?.(u),style:qe.rowButton,children:[(0,Ce.jsx)("span",{style:qe.type,children:u.type}),(0,Ce.jsx)("span",{style:qe.locale,children:u.locale??"base"}),(0,Ce.jsx)("span",{style:u.active?qe.active:qe.inactive,children:u.active?"Active":"Inactive"})]})},`${u.type}:${u.locale??"base"}`))})]})}var qe={container:{padding:24,maxWidth:640},title:{fontSize:24,fontWeight:700,marginBottom:16},status:{padding:24,textAlign:"center",color:"var(--fonderie-text-muted,#5c5c5c)"},error:{color:"var(--fonderie-danger,#e00)",marginBottom:12,fontSize:14},list:{listStyle:"none",padding:0,margin:0},row:{borderBottom:"1px solid var(--fonderie-border-light,#f5f5f5)"},rowButton:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 0",background:"none",border:"none",cursor:"pointer",textAlign:"left"},type:{fontSize:14,fontWeight:600,flex:1},locale:{fontSize:13,color:"var(--fonderie-text-muted,#5c5c5c)",marginRight:16},active:{fontSize:12,color:"var(--fonderie-accent-strong,#009767)"},inactive:{fontSize:12,color:"var(--fonderie-text-muted,#5c5c5c)"}};var hs=R(L(),1);var Yl=R(L(),1);var Xl=R(L(),1);var Ql=R(L(),1);var Vl=R(L(),1);var Zl=R(L(),1);var bl=R(L(),1);var He=R(L(),1);var We=R(L(),1);var Le=R(L(),1);var Il=R(L(),1);var Be=R(L(),1);var Sl=R(L(),1);var fe=R(L(),1);var Ge=R(L(),1);var je=R(L(),1);var El=R(L(),1);function ed(t){let[e,l]=(0,Yl.useState)(null),[n,a]=(0,Yl.useState)(!0),[u,i]=(0,Yl.useState)(null),o=(0,Yl.useCallback)(async()=>{a(!0),i(null);try{let{result:s}=await t.attention();l(s)}catch(s){i(s instanceof T?s:new T("unknown",String(s),0))}finally{a(!1)}},[t]);return(0,Yl.useEffect)(()=>{o()},[o]),{attention:e,isLoading:n,error:u,refresh:o}}function ld(t){let[e,l]=(0,Xl.useState)(null),[n,a]=(0,Xl.useState)(!0),[u,i]=(0,Xl.useState)(null),o=(0,Xl.useCallback)(async()=>{a(!0),i(null);try{let{result:s}=await t.manifest();l(s)}catch(s){i(s instanceof T?s:new T("unknown",String(s),0))}finally{a(!1)}},[t]);return(0,Xl.useEffect)(()=>{o()},[o]),{manifest:e,isLoading:n,error:u,refresh:o}}function nd(t){let[e,l]=(0,Ql.useState)(null),[n,a]=(0,Ql.useState)(!0),[u,i]=(0,Ql.useState)(null),o=(0,Ql.useCallback)(async()=>{a(!0),i(null);try{let{result:s}=await t.doctor();l(s)}catch(s){i(s instanceof T?s:new T("unknown",String(s),0))}finally{a(!1)}},[t]);return(0,Ql.useEffect)(()=>{o()},[o]),{report:e,isLoading:n,error:u,refresh:o}}function ad(t){let[e,l]=(0,Vl.useState)(null),[n,a]=(0,Vl.useState)(!0),[u,i]=(0,Vl.useState)(null),o=(0,Vl.useCallback)(async()=>{a(!0),i(null);try{let{result:s}=await t.config();l(s)}catch(s){i(s instanceof T?s:new T("unknown",String(s),0))}finally{a(!1)}},[t]);return(0,Vl.useEffect)(()=>{o()},[o]),{report:e,isLoading:n,error:u,refresh:o}}function ud(t){let[e,l]=(0,Zl.useState)(null),[n,a]=(0,Zl.useState)(!0),[u,i]=(0,Zl.useState)(null),o=(0,Zl.useCallback)(async()=>{a(!0),i(null);try{let{result:s}=await t.routes();l(s)}catch(s){i(s instanceof T?s:new T("unknown",String(s),0))}finally{a(!1)}},[t]);return(0,Zl.useEffect)(()=>{o()},[o]),{report:e,isLoading:n,error:u,refresh:o}}var Wf=t=>t instanceof T?t:new T("unknown",String(t),0);function id(t){let[e,l]=(0,bl.useState)(null),[n,a]=(0,bl.useState)(!0),[u,i]=(0,bl.useState)(null),o=(0,bl.useCallback)(async()=>{a(!0),i(null);try{let{result:r}=await t.tokens();l(r)}catch(r){i(Wf(r))}finally{a(!1)}},[t]),s=(0,bl.useCallback)(async r=>{i(null);try{let{result:d}=await r();return await o(),d}catch(d){let y=Wf(d);throw i(y),y}},[o]);return(0,bl.useEffect)(()=>{o()},[o]),{report:e,isLoading:n,error:u,refresh:o,issue:r=>s(()=>t.issueToken(r)),revoke:async r=>{await s(()=>t.revokeToken(r))}}}function od(t,e={}){let[l,n]=(0,He.useState)([]),[a,u]=(0,He.useState)(null),[i,o]=(0,He.useState)(!0),[s,r]=(0,He.useState)(null),d=e.limit,y=(0,He.useCallback)(async b=>{o(!0),r(null);try{let{result:v}=await t.adminLog({...d?{limit:d}:{},...b?{before:b}:{}});n(A=>b?[...A,...v.entries]:v.entries),u(v.next)}catch(v){r(v instanceof T?v:new T("unknown",String(v),0))}finally{o(!1)}},[t,d]),f=(0,He.useCallback)(()=>y(),[y]),m=(0,He.useCallback)(async()=>{a&&await y(a)},[y,a]);return(0,He.useEffect)(()=>{f()},[f]),{entries:l,hasMore:a!==null,isLoading:i,error:s,refresh:f,loadMore:m}}function sd(t,e){let[l,n]=(0,We.useState)(null),[a,u]=(0,We.useState)(!1),[i,o]=(0,We.useState)(null),{email:s,id:r}=e,d=(0,We.useCallback)(async m=>{u(!0),o(null);try{await m()}catch(b){o(b instanceof T?b:new T("unknown",String(b),0))}finally{u(!1)}},[]),y=(0,We.useCallback)(async()=>{if(!s&&!r){n(null);return}await d(async()=>{let{result:m}=r?await t.getUser(r):await t.findUser(s);n(m)})},[t,s,r,d]),f=(0,We.useCallback)(m=>async()=>{l&&await d(async()=>{let{result:b}=await m(l.id);b&&n(b)})},[l,d]);return(0,We.useEffect)(()=>{y()},[y]),{user:l,isLoading:a,error:i,refresh:y,suspend:f(m=>t.suspendUser(m)),unsuspend:f(m=>t.unsuspendUser(m)),revokeSessions:f(async m=>(await t.revokeUserSessions(m),{result:void 0}))}}function cd(t,e={}){let[l,n]=(0,Le.useState)([]),[a,u]=(0,Le.useState)(null),[i,o]=(0,Le.useState)(!0),[s,r]=(0,Le.useState)(null),d=e.limit,y=(0,Le.useCallback)(async b=>{o(!0),r(null);try{let{result:v}=await t.listUsers({...d?{limit:d}:{},...b?{cursor:b}:{}});n(A=>b?[...A,...v.users]:v.users),u(v.nextCursor)}catch(v){r(v instanceof T?v:new T("unknown",String(v),0))}finally{o(!1)}},[t,d]),f=(0,Le.useCallback)(()=>y(),[y]),m=(0,Le.useCallback)(async()=>{a&&await y(a)},[y,a]);return(0,Le.useEffect)(()=>{f()},[f]),{users:l,hasMore:a!==null,isLoading:i,error:s,refresh:f,loadMore:m}}function rd(t,e){let[l,n]=(0,Il.useState)([]),[a,u]=(0,Il.useState)(!1),[i,o]=(0,Il.useState)(null),s=(0,Il.useCallback)(async()=>{if(!e){n([]);return}u(!0),o(null);try{let{result:r}=await t.listUserSessions(e);n(r)}catch(r){o(r instanceof T?r:new T("unknown",String(r),0))}finally{u(!1)}},[t,e]);return(0,Il.useEffect)(()=>{s()},[s]),{sessions:l,isLoading:a,error:i,refresh:s}}function fd(t,e,l={}){let[n,a]=(0,Be.useState)([]),[u,i]=(0,Be.useState)(null),[o,s]=(0,Be.useState)(!1),[r,d]=(0,Be.useState)(null),y=l.limit,f=(0,Be.useCallback)(async v=>{if(!e){a([]),i(null);return}s(!0),d(null);try{let{result:A}=await t.userLoginHistory(e,{...y?{limit:y}:{},...v?{cursor:v}:{}});a(p=>v?[...p,...A.events]:A.events),i(A.nextCursor)}catch(A){d(A instanceof T?A:new T("unknown",String(A),0))}finally{s(!1)}},[t,e,y]),m=(0,Be.useCallback)(()=>f(),[f]),b=(0,Be.useCallback)(async()=>{u&&await f(u)},[f,u]);return(0,Be.useEffect)(()=>{m()},[m]),{events:n,hasMore:u!==null,isLoading:o,error:r,refresh:m,loadMore:b}}var Pf=t=>t instanceof T?t:new T("unknown",String(t),0);function dd(t){let[e,l]=(0,Sl.useState)(null),[n,a]=(0,Sl.useState)(!0),[u,i]=(0,Sl.useState)(null),o=(0,Sl.useCallback)(async()=>{a(!0),i(null);try{let{result:r}=await t.catalog();l(r)}catch(r){i(Pf(r))}finally{a(!1)}},[t]),s=(0,Sl.useCallback)(async r=>{i(null);try{let{result:d}=await r();return await o(),d}catch(d){let y=Pf(d);throw i(y),y}},[o]);return(0,Sl.useEffect)(()=>{o()},[o]),{catalog:e,isLoading:n,error:u,refresh:o,createPlan:r=>s(()=>t.createPlan(r)),updatePlan:(r,d)=>s(()=>t.updatePlan(r,d)),deletePlan:async r=>{await s(()=>t.deletePlan(r))}}}var fs=t=>t instanceof T?t:new T("unknown",String(t),0),ds=t=>t instanceof T&&t.status===404;function hd(t,e,l={}){let[n,a]=(0,fe.useState)(null),[u,i]=(0,fe.useState)(null),[o,s]=(0,fe.useState)([]),[r,d]=(0,fe.useState)(null),[y,f]=(0,fe.useState)(!1),[m,b]=(0,fe.useState)(null),v=e?.type,A=e?.id,{currency:p,limit:h}=l,g=(0,fe.useCallback)(async()=>{if(!v||!A){a(null),i(null),s([]),d(null);return}f(!0),b(null);try{let[U,O,C]=await Promise.all([t.subscription(v,A).then(_=>_.result,_=>ds(_)?null:Promise.reject(_)),t.wallet(v,A,p).then(_=>_.result,_=>ds(_)?null:Promise.reject(_)),t.walletLedger(v,A,{...p?{currency:p}:{},...h?{limit:h}:{}}).then(_=>_.result,_=>ds(_)?null:Promise.reject(_))]);a(U),i(O),s(C?.entries??[]),d(C?.nextCursor??null)}catch(U){b(fs(U))}finally{f(!1)}},[t,v,A,p,h]),S=(0,fe.useCallback)(async()=>{if(!(!v||!A||!r))try{let{result:U}=await t.walletLedger(v,A,{...p?{currency:p}:{},...h?{limit:h}:{},cursor:r});s(O=>[...O,...U.entries]),d(U.nextCursor)}catch(U){b(fs(U))}},[t,v,A,p,h,r]),w=(0,fe.useCallback)(async U=>{if(!(!v||!A)){b(null);try{await t.grant({...U,subscriberType:v,subscriberId:A}),await g()}catch(O){let C=fs(O);throw b(C),C}}},[t,v,A,g]);return(0,fe.useEffect)(()=>{g()},[g]),{subscription:n,wallet:u,ledger:o,hasMoreLedger:r!==null,isLoading:y,error:m,refresh:g,loadMoreLedger:S,grant:w}}function md(t,e={}){let[l,n]=(0,Ge.useState)([]),[a,u]=(0,Ge.useState)(null),[i,o]=(0,Ge.useState)(!0),[s,r]=(0,Ge.useState)(null),d=e.limit,y=(0,Ge.useCallback)(async b=>{o(!0),r(null);try{let{result:v}=await t.listSubscriptions({...d?{limit:d}:{},...b?{cursor:b}:{}});n(A=>b?[...A,...v.subscriptions]:v.subscriptions),u(v.nextCursor)}catch(v){r(v instanceof T?v:new T("unknown",String(v),0))}finally{o(!1)}},[t,d]),f=(0,Ge.useCallback)(()=>y(),[y]),m=(0,Ge.useCallback)(async()=>{a&&await y(a)},[y,a]);return(0,Ge.useEffect)(()=>{f()},[f]),{subscriptions:l,hasMore:a!==null,isLoading:i,error:s,refresh:f,loadMore:m}}var eg=t=>t instanceof T?t:new T("unknown",String(t),0);function yd(t,e={}){let[l,n]=(0,je.useState)([]),[a,u]=(0,je.useState)(null),[i,o]=(0,je.useState)(!0),[s,r]=(0,je.useState)(null),{workspaceId:d,type:y,actorId:f,from:m,to:b,limit:v}=e,A=m?.getTime(),p=b?.getTime(),h=(0,je.useCallback)(async w=>{o(!0),r(null);try{let{result:U}=await t.listAudit({...d?{workspaceId:d}:{},...y?{type:y}:{},...f?{actorId:f}:{},...A!==void 0?{from:new Date(A)}:{},...p!==void 0?{to:new Date(p)}:{},...v?{limit:v}:{},...w?{cursor:w}:{}});n(O=>w?[...O,...U.events]:U.events),u(U.nextCursor)}catch(U){r(eg(U))}finally{o(!1)}},[t,d,y,f,A,p,v]),g=(0,je.useCallback)(()=>h(),[h]),S=(0,je.useCallback)(async()=>{a&&await h(a)},[h,a]);return(0,je.useEffect)(()=>{g()},[g]),{events:l,hasMore:a!==null,isLoading:i,error:s,refresh:g,loadMore:S}}var td=t=>t instanceof T?t:new T("unknown",String(t),0);function pd(t){let[e,l]=(0,El.useState)(null),[n,a]=(0,El.useState)(!0),[u,i]=(0,El.useState)(null),o=(0,El.useCallback)(async()=>{a(!0),i(null);try{let{result:r}=await t.migrations();l(r)}catch(r){i(td(r))}finally{a(!1)}},[t]),s=(0,El.useCallback)(async(r,d)=>{i(null);try{let{result:y}=await t.applyMigrations(r,d);return await o(),y}catch(y){let f=td(y);throw await o().catch(()=>{}),i(f),f}},[t,o]);return(0,El.useEffect)(()=>{o()},[o]),{report:e,isLoading:n,error:u,refresh:o,apply:s}}var P=R(At(),1);var de=R(At(),1);var gt=R(At(),1);var Vt=R(At(),1);var nt=R(At(),1);var kt=R(At(),1);var Et=R(At(),1);var lu=R(L(),1),N=R(At(),1);var ms=R(L(),1),z=R(At(),1);var Y=R(At(),1);var Un=R(L(),1),k=R(At(),1);var ys=R(L(),1),ut=R(At(),1),j=R(At(),1),V={text:"var(--fonderie-text,#171717)",muted:"var(--fonderie-text-muted,#5c5c5c)",bg:"var(--fonderie-bg,#fafafa)",surface:"var(--fonderie-surface,#fff)",surfaceAlt:"var(--fonderie-surface-alt,#fafafa)",border:"var(--fonderie-border,#e0e0e0)",borderLight:"var(--fonderie-border-light,#f5f5f5)",accent:"var(--fonderie-accent,#00d294)",accentStrong:"var(--fonderie-accent-strong,#009767)",warning:"var(--fonderie-warning,#f5a623)",danger:"var(--fonderie-danger,#e00)",font:'var(--fonderie-font,Inter,"Inter Fallback",-apple-system,BlinkMacSystemFont,"Helvetica Neue",system-ui,sans-serif)',mono:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)',radius:"var(--fonderie-radius,4px)",radiusLg:"var(--fonderie-radius-lg,8px)",trackingDisplay:"var(--fonderie-tracking-display,-0.05em)",shadowCard:"var(--fonderie-shadow-card,0 2px 3px 0 rgba(0,0,0,.05))"},c={shell:{display:"flex",minHeight:"100vh",fontFamily:V.font,color:V.text,background:V.bg},nav:{width:220,borderRight:`1px solid ${V.border}`,padding:16,flexShrink:0,background:V.surface},navGroup:{fontSize:11,textTransform:"uppercase",letterSpacing:.6,color:V.muted,margin:"16px 0 6px",fontWeight:600},navItem:{display:"block",width:"100%",textAlign:"left",background:"none",border:"none",borderRadius:V.radius,padding:"6px 8px",cursor:"pointer",fontSize:14,color:V.text,fontFamily:"inherit"},navItemActive:{background:V.surfaceAlt,fontWeight:600,color:V.accentStrong},main:{flex:1,padding:24,maxWidth:960},container:{padding:24,maxWidth:960},title:{fontSize:20,fontWeight:600,marginTop:0,marginBottom:12,letterSpacing:V.trackingDisplay},subtitle:{fontSize:15,fontWeight:600,marginTop:24,marginBottom:8,letterSpacing:V.trackingDisplay},status:{padding:12,color:V.muted},error:{color:V.danger,marginBottom:12,fontSize:14},ok:{color:V.accentStrong,fontWeight:600},bad:{color:V.danger,fontWeight:600},advice:{color:V.warning},muted:{color:V.muted,fontSize:13},mono:{fontFamily:V.mono,fontSize:13},table:{width:"100%",borderCollapse:"collapse",fontSize:14},th:{textAlign:"left",borderBottom:`1px solid ${V.border}`,padding:"6px 8px",fontWeight:600,color:V.muted},td:{borderBottom:`1px solid ${V.borderLight}`,padding:"6px 8px",verticalAlign:"top"},list:{listStyle:"none",padding:0,margin:0},row:{borderBottom:`1px solid ${V.borderLight}`,padding:"8px 0"},badge:{display:"inline-block",borderRadius:999,padding:"1px 8px",fontSize:12,background:V.surfaceAlt,border:`1px solid ${V.border}`,color:V.muted},button:{background:V.surface,border:`1px solid ${V.border}`,borderRadius:V.radius,padding:"4px 10px",cursor:"pointer",fontSize:13,color:V.text,fontFamily:"inherit",boxShadow:V.shadowCard},toolbar:{display:"flex",gap:8,alignItems:"center",marginBottom:12},card:{background:V.surface,border:`1px solid ${V.border}`,borderRadius:V.radiusLg,padding:16,boxShadow:V.shadowCard},accent:{color:V.accent}};function lg({client:t,pageSize:e=50}){let{entries:l,hasMore:n,isLoading:a,error:u,refresh:i,loadMore:o}=od(t,{limit:e});return(0,P.jsxs)("div",{style:c.container,children:[(0,P.jsxs)("div",{style:c.toolbar,children:[(0,P.jsx)("h1",{style:{...c.title,marginBottom:0},children:"Admin log"}),(0,P.jsx)("button",{type:"button",style:c.button,onClick:()=>{i()},disabled:a,children:"Refresh"})]}),u?(0,P.jsx)("p",{style:c.error,role:"alert",children:u.status===404?"The admin log is off \u2014 give AdminModule a store.":u.explanation}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("table",{style:c.table,children:[(0,P.jsx)("thead",{children:(0,P.jsxs)("tr",{children:[(0,P.jsx)("th",{style:c.th,children:"When"}),(0,P.jsx)("th",{style:c.th,children:"Actor"}),(0,P.jsx)("th",{style:c.th,children:"Request"}),(0,P.jsx)("th",{style:c.th,children:"Status"}),(0,P.jsx)("th",{style:c.th,children:"Module"})]})}),(0,P.jsx)("tbody",{children:l.map(s=>(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{style:{...c.td,...c.muted},children:new Date(s.at).toLocaleString()}),(0,P.jsx)("td",{style:c.td,children:s.actor}),(0,P.jsxs)("td",{style:{...c.td,...c.mono},children:[s.method," ",s.path]}),(0,P.jsxs)("td",{style:c.td,children:[(0,P.jsx)("span",{style:s.status>=400?c.bad:c.ok,children:s.status})," ",(0,P.jsxs)("span",{style:c.muted,children:[s.durationMs," ms"]})]}),(0,P.jsx)("td",{style:{...c.td,...c.muted},children:s.module})]},s.id))})]}),a?(0,P.jsx)("p",{style:c.status,children:"Loading\u2026"}):null,n&&!a?(0,P.jsx)("button",{type:"button",style:{...c.button,marginTop:12},onClick:()=>{o()},children:"Load more"}):null]})]})}function ng({client:t}){let{attention:e,isLoading:l,error:n,refresh:a}=ed(t);return(0,de.jsxs)("div",{style:c.container,children:[(0,de.jsxs)("div",{style:c.toolbar,children:[(0,de.jsx)("h1",{style:{...c.title,marginBottom:0},children:"Attention"}),(0,de.jsx)("button",{type:"button",style:c.button,onClick:()=>{a()},disabled:l,children:"Refresh"})]}),l&&!e?(0,de.jsx)("p",{style:c.status,children:"Running the checks\u2026"}):n?(0,de.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):e?.items.length===0?(0,de.jsxs)("p",{style:c.ok,children:["Nothing needs you. Checked ",new Date(e.generatedAt).toLocaleString(),"."]}):(0,de.jsx)("ul",{style:c.list,children:e?.items.map(u=>(0,de.jsxs)("li",{style:c.row,children:[(0,de.jsx)("span",{style:u.severity==="error"?c.bad:c.advice,children:u.severity==="error"?"error":"advice"})," ",(0,de.jsx)("span",{style:c.mono,children:u.source})," \u2014 ",u.message]},`${u.source}:${u.message}`))})]})}function ag({client:t}){let{report:e,isLoading:l,error:n}=ad(t);return(0,gt.jsxs)("div",{style:c.container,children:[(0,gt.jsx)("h1",{style:c.title,children:"Configuration"}),l?(0,gt.jsx)("p",{style:c.status,children:"Loading\u2026"}):n?(0,gt.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):e?(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsx)("h2",{style:c.subtitle,children:"Readiness"}),(0,gt.jsx)("ul",{style:c.list,children:e.modules.map(a=>(0,gt.jsxs)("li",{style:c.row,children:[(0,gt.jsx)("span",{style:c.mono,children:a.name})," ",a.problems.length===0?(0,gt.jsx)("span",{style:c.ok,children:"ok"}):a.problems.map(u=>(0,gt.jsx)("div",{style:u.severity==="error"?c.bad:c.advice,children:u.message},u.message))]},a.name))}),(0,gt.jsx)("h2",{style:c.subtitle,children:"Environment"}),e.env.length===0?(0,gt.jsx)("p",{style:c.muted,children:"No variables declared \u2014 pass `env` to AdminModule."}):(0,gt.jsx)("ul",{style:c.list,children:e.env.map(a=>(0,gt.jsxs)("li",{style:c.row,children:[(0,gt.jsx)("span",{style:c.mono,children:a.name})," ",a.set?(0,gt.jsx)("span",{style:c.ok,children:"set"}):(0,gt.jsx)("span",{style:c.bad,children:"missing"})]},a.name))})]}):null]})}function ug({client:t}){let{report:e,isLoading:l,error:n,refresh:a}=nd(t);return(0,Vt.jsxs)("div",{style:c.container,children:[(0,Vt.jsxs)("div",{style:c.toolbar,children:[(0,Vt.jsx)("h1",{style:{...c.title,marginBottom:0},children:"Doctor"}),(0,Vt.jsx)("button",{type:"button",style:c.button,onClick:()=>{a()},disabled:l,children:"Run again"}),e&&!l?(0,Vt.jsx)("span",{style:e.ok?c.ok:c.bad,children:e.ok?"all checks pass":"a check failed"}):null]}),l&&!e?(0,Vt.jsx)("p",{style:c.status,children:"Running the checks\u2026"}):n?(0,Vt.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):(0,Vt.jsx)("ul",{style:c.list,children:e?.checks.map(u=>(0,Vt.jsxs)("li",{style:c.row,children:[(0,Vt.jsx)("span",{style:u.skipped?c.muted:u.ok?c.ok:c.bad,children:u.skipped?"skipped":u.ok?"ok":"failed"})," ",(0,Vt.jsx)("span",{style:c.mono,children:u.name})," ",(0,Vt.jsxs)("span",{style:c.muted,children:[u.module," \xB7 ",u.durationMs," ms"]}),u.skipped?(0,Vt.jsx)("div",{style:c.muted,children:u.skipped}):null,u.findings.map(i=>(0,Vt.jsx)("div",{style:u.ok?c.advice:c.bad,children:i},i))]},u.name))})]})}function ig({client:t}){let{manifest:e,isLoading:l,error:n}=ld(t);return(0,nt.jsxs)("div",{style:c.container,children:[(0,nt.jsx)("h1",{style:c.title,children:"Modules"}),l?(0,nt.jsx)("p",{style:c.status,children:"Loading\u2026"}):n?(0,nt.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):e?(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsxs)("p",{style:c.muted,children:[e.env," \xB7 admin ",e.admin.version," \xB7 admin log"," ",e.admin.log?"on":"off"," \xB7 ",e.routes.length," routes"]}),(0,nt.jsxs)("table",{style:c.table,children:[(0,nt.jsx)("thead",{children:(0,nt.jsxs)("tr",{children:[(0,nt.jsx)("th",{style:c.th,children:"Module"}),(0,nt.jsx)("th",{style:c.th,children:"Version"}),(0,nt.jsx)("th",{style:c.th,children:"Readiness"}),(0,nt.jsx)("th",{style:c.th,children:"Describes admin"})]})}),(0,nt.jsx)("tbody",{children:e.modules.map(a=>(0,nt.jsxs)("tr",{children:[(0,nt.jsx)("td",{style:{...c.td,...c.mono},children:a.name}),(0,nt.jsx)("td",{style:c.td,children:a.version??(0,nt.jsx)("span",{style:c.muted,children:"not reported"})}),(0,nt.jsxs)("td",{style:c.td,children:[a.readiness.ok?(0,nt.jsx)("span",{style:c.ok,children:"ok"}):(0,nt.jsx)("span",{style:c.bad,children:"error"}),a.readiness.problems.map(u=>(0,nt.jsx)("div",{style:u.severity==="error"?c.bad:c.advice,children:u.message},u.message))]}),(0,nt.jsx)("td",{style:c.td,children:a.describesAdmin?"yes":(0,nt.jsx)("span",{style:c.muted,children:"no"})})]},a.name))})]})]}):null]})}function og({client:t}){let{report:e,isLoading:l,error:n}=ud(t);return(0,kt.jsxs)("div",{style:c.container,children:[(0,kt.jsx)("h1",{style:c.title,children:"Routes"}),l?(0,kt.jsx)("p",{style:c.status,children:"Loading\u2026"}):n?(0,kt.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):(0,kt.jsxs)("table",{style:c.table,children:[(0,kt.jsx)("thead",{children:(0,kt.jsxs)("tr",{children:[(0,kt.jsx)("th",{style:c.th,children:"Method"}),(0,kt.jsx)("th",{style:c.th,children:"Path"}),(0,kt.jsx)("th",{style:c.th,children:"Guard"}),(0,kt.jsx)("th",{style:c.th,children:"Module"})]})}),(0,kt.jsx)("tbody",{children:e?.routes.map(a=>(0,kt.jsxs)("tr",{children:[(0,kt.jsx)("td",{style:{...c.td,...c.mono},children:a.method}),(0,kt.jsx)("td",{style:{...c.td,...c.mono},children:a.path}),(0,kt.jsx)("td",{style:c.td,children:(0,kt.jsx)("span",{style:c.badge,children:a.guard})}),(0,kt.jsx)("td",{style:{...c.td,...c.muted},children:a.module??"application"})]},`${a.method} ${a.path}`))})]})]})}function sg(t,e){return t.pending.length===0?null:t.blockedBy?`Apply "${t.blockedBy}" first \u2014 it runs before this one and is behind.`:e&&t.pending.some(l=>l.impact==="destructive")?"Contains a migration that deletes data. No down-migration brings it back \u2014 apply this one through CI or `npm run migrate`.":null}function cg({client:t}){let{report:e,isLoading:l,error:n,refresh:a,apply:u}=pd(t),i=e?.modules.filter(o=>o.pending.length>0)??[];return(0,Et.jsxs)("div",{style:c.container,children:[(0,Et.jsx)("h1",{style:c.title,children:"Migrations"}),n?(0,Et.jsx)("p",{style:c.error,role:"alert",children:n.status===403?"Applying migrations needs a token with the write scope.":n.explanation}):null,(0,Et.jsxs)("p",{children:[(0,Et.jsx)("button",{type:"button",style:c.button,onClick:()=>{a()},disabled:l,children:l?"Checking\u2026":"Refresh"})," ",e&&!e.everApplied?(0,Et.jsx)("span",{style:c.advice,children:"This database has never been migrated \u2014 treating it as a first install, so nothing is held back."}):null]}),e&&i.length===0?(0,Et.jsx)("p",{style:c.ok,children:"Every module is up to date."}):null,i.map(o=>{let s=sg(o,e?.everApplied??!1),r=o.pending.map(d=>d.file);return(0,Et.jsxs)("section",{style:{marginBottom:24},children:[(0,Et.jsxs)("h2",{style:c.subtitle,children:[o.name," \u2014 ",o.pending.length," pending"]}),(0,Et.jsx)("ul",{children:o.pending.map(d=>(0,Et.jsxs)("li",{children:[(0,Et.jsx)("code",{children:d.file})," ",d.impact==="destructive"?(0,Et.jsx)("span",{style:c.bad,children:"destructive"}):(0,Et.jsx)("span",{style:c.advice,children:"additive"}),d.destructive.length>0?(0,Et.jsx)("ul",{children:d.destructive.map(y=>(0,Et.jsx)("li",{children:(0,Et.jsx)("code",{children:y.slice(0,120)})},y))}):null]},d.file))}),s?(0,Et.jsx)("p",{style:c.advice,children:s}):(0,Et.jsxs)("button",{type:"button",style:c.button,disabled:l||!o.appliable,onClick:()=>{window.confirm(`Apply ${o.pending.length} migration(s) to "${o.name}"? This changes the database schema.`)&&u(o.name,r).catch(()=>{})},children:["Apply ",o.pending.length," migration",o.pending.length===1?"":"s"]})]},o.name)})]})}var rg=["read","write","secrets"];function fg({client:t}){let{report:e,isLoading:l,error:n,issue:a,revoke:u}=id(t),[i,o]=(0,lu.useState)(""),[s,r]=(0,lu.useState)(["read"]),[d,y]=(0,lu.useState)(""),[f,m]=(0,lu.useState)(null),b=v=>r(A=>A.includes(v)?A.filter(p=>p!==v):[...A,v]);return(0,N.jsxs)("div",{style:c.container,children:[(0,N.jsx)("h1",{style:c.title,children:"Access"}),n?(0,N.jsx)("p",{style:c.error,role:"alert",children:n.status===401?"Issuing and revoking need the root token (the one in your deployment config).":n.explanation}):null,(0,N.jsx)("h2",{style:c.subtitle,children:"Root token"}),e?(0,N.jsxs)("p",{children:[e.admin.ok?(0,N.jsx)("span",{style:c.ok,children:"strong"}):(0,N.jsx)("span",{style:c.bad,children:"weak"}),e.admin.problems.map(v=>(0,N.jsx)("div",{style:c.bad,children:v.message},v.message))]}):null,(0,N.jsx)("h2",{style:c.subtitle,children:"Issued tokens"}),e?.issued===null?(0,N.jsx)("p",{style:c.muted,children:"Issuing is off \u2014 give AdminModule a store and run its migrations."}):(0,N.jsxs)(N.Fragment,{children:[f?(0,N.jsxs)("p",{style:c.ok,children:["Copy this now \u2014 it is never shown again."," ",(0,N.jsx)("span",{style:c.mono,children:f.token})," (",f.name,")"]}):null,(0,N.jsxs)("form",{style:c.toolbar,onSubmit:v=>{v.preventDefault();let A=Number(d);a({name:i.trim(),scopes:s,...d&&Number.isInteger(A)&&A>0?{expiresInDays:A}:{}}).then(p=>{m({name:p.name,token:p.token}),o(""),y("")}).catch(()=>{})},children:[(0,N.jsx)("input",{value:i,onChange:v=>o(v.target.value),placeholder:"name",style:{...c.button,cursor:"text"},"aria-label":"Name"}),rg.map(v=>(0,N.jsxs)("label",{style:{...c.badge,cursor:"pointer"},children:[(0,N.jsx)("input",{type:"checkbox",checked:s.includes(v),onChange:()=>b(v)})," ",v]},v)),(0,N.jsx)("input",{value:d,onChange:v=>y(v.target.value),placeholder:"days (optional)",style:{...c.button,cursor:"text",width:140},"aria-label":"Days"}),(0,N.jsx)("button",{type:"submit",style:c.button,disabled:!i.trim()||s.length===0||l,children:"Issue"})]}),e?.issued&&e.issued.length>0?(0,N.jsxs)("table",{style:c.table,children:[(0,N.jsx)("thead",{children:(0,N.jsxs)("tr",{children:[(0,N.jsx)("th",{style:c.th,children:"Name"}),(0,N.jsx)("th",{style:c.th,children:"Scopes"}),(0,N.jsx)("th",{style:c.th,children:"Created"}),(0,N.jsx)("th",{style:c.th,children:"Expires"}),(0,N.jsx)("th",{style:c.th,children:"Last used"}),(0,N.jsx)("th",{style:c.th})]})}),(0,N.jsx)("tbody",{children:e.issued.map(v=>(0,N.jsxs)("tr",{children:[(0,N.jsxs)("td",{style:c.td,children:[v.name,v.revokedAt?(0,N.jsx)("span",{style:c.badge,children:" revoked"}):null]}),(0,N.jsx)("td",{style:{...c.td,...c.mono},children:v.scopes.join(", ")}),(0,N.jsxs)("td",{style:{...c.td,...c.muted},children:[new Date(v.createdAt).toLocaleDateString()," \xB7 ",v.createdBy]}),(0,N.jsx)("td",{style:{...c.td,...c.muted},children:v.expiresAt?new Date(v.expiresAt).toLocaleDateString():"never"}),(0,N.jsx)("td",{style:{...c.td,...c.muted},children:v.lastUsedAt?new Date(v.lastUsedAt).toLocaleString():"never"}),(0,N.jsx)("td",{style:c.td,children:v.revokedAt?null:(0,N.jsx)("button",{type:"button",style:c.button,onClick:()=>{window.confirm(`Revoke "${v.name}"? Anything using it stops working immediately.`)&&u(v.id).catch(()=>{})},children:"Revoke"})})]},v.id))})]}):(0,N.jsx)("p",{style:c.muted,children:"None issued."})]}),(0,N.jsx)("h2",{style:c.subtitle,children:"Legacy per-brick tokens"}),e&&e.legacy.length===0?(0,N.jsx)("p",{style:c.muted,children:"None \u2014 every brick's admin surface goes through this token."}):(0,N.jsx)("ul",{style:c.list,children:e?.legacy.map(v=>(0,N.jsxs)("li",{style:c.row,children:[(0,N.jsx)("span",{style:c.mono,children:v.module})," ",(0,N.jsx)("span",{style:c.muted,children:"still registers its standalone routes with its own token (deprecated)"})]},v.module))})]})}function dg({client:t,pageSize:e=50}){let[l,n]=(0,ms.useState)(""),[a,u]=(0,ms.useState)(null),i=cd(t,{limit:e}),{user:o,isLoading:s,error:r,suspend:d,unsuspend:y,revokeSessions:f}=sd(t,a??{}),m=o?.id??null,b=rd(t,m),v=fd(t,m,{limit:20}),A=h=>h?(0,z.jsx)("span",{style:c.ok,children:"yes"}):(0,z.jsx)("span",{style:c.muted,children:"no"}),p=()=>{u(null),n("")};return(0,z.jsxs)("div",{style:c.container,children:[(0,z.jsx)("h1",{style:c.title,children:"Users"}),(0,z.jsxs)("form",{style:c.toolbar,onSubmit:h=>{h.preventDefault();let g=l.trim();u(g?{email:g}:null)},children:[(0,z.jsx)("input",{type:"email",value:l,onChange:h=>n(h.target.value),placeholder:"email address",style:{...c.button,cursor:"text",minWidth:280},"aria-label":"Email"}),(0,z.jsx)("button",{type:"submit",style:c.button,disabled:s,children:"Look up"}),a?(0,z.jsx)("button",{type:"button",style:c.button,onClick:p,children:"\u2190 All users"}):(0,z.jsx)("button",{type:"button",style:c.button,onClick:()=>{i.refresh()},disabled:i.isLoading,children:"Refresh"})]}),r?(0,z.jsx)("p",{style:c.error,role:"alert",children:r.status===404?"No user with that email.":r.explanation}):null,a?null:(0,z.jsxs)(z.Fragment,{children:[i.error?(0,z.jsx)("p",{style:c.error,role:"alert",children:i.error.explanation}):null,i.users.length===0&&!i.isLoading?(0,z.jsx)("p",{style:c.muted,children:"No users yet."}):(0,z.jsxs)("table",{style:c.table,children:[(0,z.jsx)("thead",{children:(0,z.jsxs)("tr",{children:[(0,z.jsx)("th",{style:c.th,children:"Email"}),(0,z.jsx)("th",{style:c.th,children:"Name"}),(0,z.jsx)("th",{style:c.th,children:"Created"}),(0,z.jsx)("th",{style:c.th,children:"Status"})]})}),(0,z.jsx)("tbody",{children:i.users.map(h=>(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:(0,z.jsx)("button",{type:"button",style:{...c.navItem,padding:0},onClick:()=>u({id:h.id}),children:h.email})}),(0,z.jsx)("td",{style:c.td,children:`${h.firstName??""} ${h.lastName??""}`.trim()||(0,z.jsx)("span",{style:c.muted,children:"\u2014"})}),(0,z.jsx)("td",{style:c.td,children:new Date(h.createdAt).toLocaleDateString()}),(0,z.jsxs)("td",{style:c.td,children:[h.suspended?(0,z.jsx)("span",{style:c.badge,children:"suspended"}):null,h.deletedAt?(0,z.jsx)("span",{style:c.badge,children:"deleted"}):null,!h.suspended&&!h.deletedAt?(0,z.jsx)("span",{style:c.muted,children:"active"}):null]})]},h.id))})]}),i.isLoading?(0,z.jsx)("p",{style:c.status,children:"Loading\u2026"}):null,i.hasMore&&!i.isLoading?(0,z.jsx)("button",{type:"button",style:{...c.button,marginTop:8},onClick:()=>{i.loadMore()},children:"Load more"}):null]}),o?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("h2",{style:c.subtitle,children:[o.firstName||o.lastName?`${o.firstName} ${o.lastName}`.trim():o.email," ",o.suspended?(0,z.jsx)("span",{style:c.badge,children:"suspended"}):null,o.deletedAt?(0,z.jsx)("span",{style:c.badge,children:"deleted"}):null]}),(0,z.jsx)("table",{style:c.table,children:(0,z.jsxs)("tbody",{children:[(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"id"}),(0,z.jsx)("td",{style:{...c.td,...c.mono},children:o.id})]}),(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"email"}),(0,z.jsxs)("td",{style:c.td,children:[o.email," \xB7 verified ",A(o.isEmailVerified)]})]}),(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"MFA"}),(0,z.jsx)("td",{style:c.td,children:A(o.mfaEnabled)})]}),(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"provider"}),(0,z.jsxs)("td",{style:c.td,children:[o.provider||"password",o.hasPassword?"":" \xB7 no password set"]})]}),(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"last login"}),(0,z.jsx)("td",{style:c.td,children:o.lastLogin?new Date(o.lastLogin).toLocaleString():(0,z.jsx)("span",{style:c.muted,children:"never"})})]}),(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"created"}),(0,z.jsx)("td",{style:c.td,children:new Date(o.createdAt).toLocaleString()})]})]})}),(0,z.jsxs)("div",{style:{...c.toolbar,marginTop:12},children:[o.suspended?(0,z.jsx)("button",{type:"button",style:c.button,onClick:()=>{y()},disabled:s,children:"Unsuspend"}):(0,z.jsx)("button",{type:"button",style:c.button,onClick:()=>{d()},disabled:s,children:"Suspend"}),(0,z.jsx)("button",{type:"button",style:c.button,onClick:()=>{f().then(()=>b.refresh())},disabled:s,children:"Sign out everywhere"})]}),(0,z.jsx)("h2",{style:c.subtitle,children:"Live sessions"}),b.sessions.length===0?(0,z.jsx)("p",{style:c.muted,children:"None."}):(0,z.jsx)("ul",{style:c.list,children:b.sessions.map(h=>(0,z.jsxs)("li",{style:c.row,children:[(0,z.jsx)("span",{style:c.mono,children:h.ipAddress??"\u2014"})," ",(0,z.jsx)("span",{style:c.muted,children:h.userAgent??""})," ",(0,z.jsxs)("span",{style:c.muted,children:["since ",new Date(h.createdAt).toLocaleString()]})]},h.id))}),(0,z.jsx)("h2",{style:c.subtitle,children:"Recent sign-ins"}),v.events.length===0&&!v.isLoading?(0,z.jsx)("p",{style:c.muted,children:"None recorded."}):(0,z.jsx)("ul",{style:c.list,children:v.events.map(h=>(0,z.jsxs)("li",{style:c.row,children:[(0,z.jsx)("span",{style:h.outcome==="success"?c.ok:c.bad,children:h.outcome})," ",(0,z.jsx)("span",{style:c.muted,children:h.method})," ",(0,z.jsx)("span",{style:c.muted,children:new Date(h.createdAt).toLocaleString()})]},h.id))}),v.hasMore&&!v.isLoading?(0,z.jsx)("button",{type:"button",style:{...c.button,marginTop:8},onClick:()=>{v.loadMore()},children:"Load more"}):null]}):null]})}function hg({client:t}){let{catalog:e,isLoading:l,error:n,refresh:a,deletePlan:u}=dd(t),i=o=>o==null?"\u2014":(o/100).toFixed(2);return(0,Y.jsxs)("div",{style:c.container,children:[(0,Y.jsxs)("div",{style:c.toolbar,children:[(0,Y.jsx)("h1",{style:{...c.title,marginBottom:0},children:"Catalog"}),(0,Y.jsx)("button",{type:"button",style:c.button,onClick:()=>{a()},disabled:l,children:"Refresh"})]}),n?(0,Y.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):null,l&&!e?(0,Y.jsx)("p",{style:c.status,children:"Loading\u2026"}):null,e?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("h2",{style:c.subtitle,children:"Configured (code)"}),(0,Y.jsx)("pre",{style:{...c.mono,background:"var(--fonderie-surface-alt,#fafafa)",padding:12,overflowX:"auto"},children:JSON.stringify(e.configured,null,2)}),(0,Y.jsx)("h2",{style:c.subtitle,children:"Stored (database)"}),e.stored.length===0?(0,Y.jsx)("p",{style:c.muted,children:"No stored plans."}):(0,Y.jsxs)("table",{style:c.table,children:[(0,Y.jsx)("thead",{children:(0,Y.jsxs)("tr",{children:[(0,Y.jsx)("th",{style:c.th,children:"Plan"}),(0,Y.jsx)("th",{style:c.th,children:"Tier"}),(0,Y.jsx)("th",{style:c.th,children:"Seats"}),(0,Y.jsx)("th",{style:c.th,children:"Monthly"}),(0,Y.jsx)("th",{style:c.th,children:"Yearly"}),(0,Y.jsx)("th",{style:c.th,children:"Trial"}),(0,Y.jsx)("th",{style:c.th})]})}),(0,Y.jsx)("tbody",{children:e.stored.map(o=>(0,Y.jsxs)("tr",{children:[(0,Y.jsxs)("td",{style:c.td,children:[(0,Y.jsx)("strong",{children:o.name}),o.description?(0,Y.jsx)("div",{style:c.muted,children:o.description}):null]}),(0,Y.jsx)("td",{style:c.td,children:o.tier}),(0,Y.jsx)("td",{style:c.td,children:o.seats??"\u221E"}),(0,Y.jsxs)("td",{style:c.td,children:[i(o.pricing?.monthly)," ",o.pricing?.currency??""]}),(0,Y.jsx)("td",{style:c.td,children:i(o.pricing?.yearly)}),(0,Y.jsx)("td",{style:c.td,children:o.trialDays?`${o.trialDays} d`:"\u2014"}),(0,Y.jsx)("td",{style:c.td,children:(0,Y.jsx)("button",{type:"button",style:c.button,onClick:()=>{window.confirm(`Delete stored plan "${o.name}"?`)&&u(o.id).catch(()=>{})},children:"Delete"})})]},o.id))})]})]}):null]})}function mg({client:t,pageSize:e=50}){let[l,n]=(0,Un.useState)("user"),[a,u]=(0,Un.useState)(""),[i,o]=(0,Un.useState)(null),s=md(t,{limit:e}),{subscription:r,wallet:d,ledger:y,hasMoreLedger:f,isLoading:m,error:b,loadMoreLedger:v,grant:A}=hd(t,i,{limit:20}),[p,h]=(0,Un.useState)(""),[g,S]=(0,Un.useState)(""),[w,U]=(0,Un.useState)(null),O=(C,_)=>{U(null),n(C),u(_),o({type:C,id:_})};return(0,k.jsxs)("div",{style:c.container,children:[(0,k.jsx)("h1",{style:c.title,children:"Subscriber"}),(0,k.jsxs)("form",{style:c.toolbar,onSubmit:C=>{C.preventDefault(),U(null),o(a.trim()?{type:l,id:a.trim()}:null)},children:[(0,k.jsxs)("select",{value:l,onChange:C=>n(C.target.value),style:c.button,"aria-label":"Type",children:[(0,k.jsx)("option",{value:"user",children:"user"}),(0,k.jsx)("option",{value:"workspace",children:"workspace"})]}),(0,k.jsx)("input",{value:a,onChange:C=>u(C.target.value),placeholder:"subscriber id",style:{...c.button,cursor:"text",minWidth:280},"aria-label":"Subscriber id"}),(0,k.jsx)("button",{type:"submit",style:c.button,disabled:m,children:"Look up"}),i?(0,k.jsx)("button",{type:"button",style:c.button,onClick:()=>{o(null),u(""),U(null)},children:"\u2190 All subscribers"}):(0,k.jsx)("button",{type:"button",style:c.button,onClick:()=>{s.refresh()},disabled:s.isLoading,children:"Refresh"})]}),b?(0,k.jsx)("p",{style:c.error,role:"alert",children:b.explanation}):null,i?null:(0,k.jsxs)(k.Fragment,{children:[s.error?(0,k.jsx)("p",{style:c.error,role:"alert",children:s.error.explanation}):null,s.subscriptions.length===0&&!s.isLoading?(0,k.jsx)("p",{style:c.muted,children:"No subscribers yet."}):(0,k.jsxs)("table",{style:c.table,children:[(0,k.jsx)("thead",{children:(0,k.jsxs)("tr",{children:[(0,k.jsx)("th",{style:c.th,children:"Subscriber"}),(0,k.jsx)("th",{style:c.th,children:"Plan"}),(0,k.jsx)("th",{style:c.th,children:"Status"}),(0,k.jsx)("th",{style:c.th,children:"Renews"})]})}),(0,k.jsx)("tbody",{children:s.subscriptions.map(C=>(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:c.td,children:(0,k.jsxs)("button",{type:"button",style:{...c.navItem,padding:0,...c.mono},onClick:()=>O(C.subscriberType,C.subscriberId),children:[C.subscriberType,"/",C.subscriberId]})}),(0,k.jsxs)("td",{style:c.td,children:[(0,k.jsx)("strong",{children:C.plan})," \xB7 ",C.interval]}),(0,k.jsxs)("td",{style:c.td,children:[C.status,C.cancelAtPeriodEnd?(0,k.jsx)("span",{style:c.badge,children:"cancels"}):null]}),(0,k.jsx)("td",{style:c.td,children:C.currentPeriodEnd?new Date(C.currentPeriodEnd).toLocaleDateString():(0,k.jsx)("span",{style:c.muted,children:"\u2014"})})]},C.id))})]}),s.isLoading?(0,k.jsx)("p",{style:c.status,children:"Loading\u2026"}):null,s.hasMore&&!s.isLoading?(0,k.jsx)("button",{type:"button",style:{...c.button,marginTop:8},onClick:()=>{s.loadMore()},children:"Load more"}):null]}),i&&!m?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("h2",{style:c.subtitle,children:"Subscription"}),r?(0,k.jsx)("table",{style:c.table,children:(0,k.jsxs)("tbody",{children:[(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:c.td,children:"plan"}),(0,k.jsxs)("td",{style:c.td,children:[(0,k.jsx)("strong",{children:r.plan})," \xB7 ",r.interval]})]}),(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:c.td,children:"status"}),(0,k.jsxs)("td",{style:c.td,children:[r.status,r.cancelAtPeriodEnd?" \xB7 cancels at period end":""]})]}),(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:c.td,children:"period"}),(0,k.jsxs)("td",{style:c.td,children:[r.currentPeriodStart?new Date(r.currentPeriodStart).toLocaleDateString():"\u2014"," ","\u2192"," ",r.currentPeriodEnd?new Date(r.currentPeriodEnd).toLocaleDateString():"\u2014"]})]}),(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:c.td,children:"provider"}),(0,k.jsx)("td",{style:{...c.td,...c.mono},children:r.providerSubscriptionId??"\u2014"})]})]})}):(0,k.jsx)("p",{style:c.muted,children:"No subscription."}),(0,k.jsx)("h2",{style:c.subtitle,children:"Wallet"}),d?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("p",{children:[(0,k.jsx)("strong",{children:d.balance})," ",d.currency," ",(0,k.jsxs)("span",{style:c.muted,children:["(granted ",d.granted??"0"," \xB7 purchased ",d.purchased??"0",") \xB7 minor units, precision ",d.precision]})]}),(0,k.jsxs)("form",{style:c.toolbar,onSubmit:C=>{C.preventDefault();let _=`admin-grant-${i.type}-${i.id}-${Date.now()}`;A({amount:p.trim(),...g?{description:g}:{},idempotencyKey:_}).then(()=>{U(`Granted ${p.trim()} ${d.currency}.`),h(""),S("")}).catch(()=>{})},children:[(0,k.jsx)("input",{value:p,onChange:C=>h(C.target.value),placeholder:"amount (minor units)",style:{...c.button,cursor:"text"},"aria-label":"Amount"}),(0,k.jsx)("input",{value:g,onChange:C=>S(C.target.value),placeholder:"reason (optional)",style:{...c.button,cursor:"text",minWidth:220},"aria-label":"Reason"}),(0,k.jsx)("button",{type:"submit",style:c.button,disabled:!/^\d+$/.test(p.trim()),children:"Grant"}),w?(0,k.jsx)("span",{style:c.ok,children:w}):null]}),(0,k.jsx)("h2",{style:c.subtitle,children:"Ledger"}),y.length===0?(0,k.jsx)("p",{style:c.muted,children:"Nothing moved yet."}):(0,k.jsxs)("table",{style:c.table,children:[(0,k.jsx)("thead",{children:(0,k.jsxs)("tr",{children:[(0,k.jsx)("th",{style:c.th,children:"When"}),(0,k.jsx)("th",{style:c.th,children:"Kind"}),(0,k.jsx)("th",{style:c.th,children:"Amount"}),(0,k.jsx)("th",{style:c.th,children:"Note"})]})}),(0,k.jsx)("tbody",{children:y.map(C=>(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:{...c.td,...c.muted},children:new Date(C.createdAt).toLocaleString()}),(0,k.jsx)("td",{style:c.td,children:C.type}),(0,k.jsx)("td",{style:{...c.td,...c.mono},children:C.amount}),(0,k.jsx)("td",{style:{...c.td,...c.muted},children:C.description??""})]},C.id))})]}),f?(0,k.jsx)("button",{type:"button",style:{...c.button,marginTop:8},onClick:()=>{v()},children:"Load more"}):null]}):(0,k.jsx)("p",{style:c.muted,children:"No wallet \u2014 billing has no wallet configuration."})]}):null]})}function yg({client:t,pageSize:e=50}){let[l,n]=(0,ys.useState)({workspaceId:"",type:"",actorId:""}),[a,u]=(0,ys.useState)({}),{events:i,hasMore:o,isLoading:s,error:r,refresh:d,loadMore:y}=yd(t,{...a,limit:e}),f=(m,b)=>(0,ut.jsx)("input",{value:l[m],onChange:v=>n({...l,[m]:v.target.value}),placeholder:b,style:{...c.button,cursor:"text"},"aria-label":b});return(0,ut.jsxs)("div",{style:c.container,children:[(0,ut.jsx)("h1",{style:c.title,children:"Audit"}),(0,ut.jsxs)("form",{style:c.toolbar,onSubmit:m=>{m.preventDefault(),u({...l.workspaceId.trim()?{workspaceId:l.workspaceId.trim()}:{},...l.type.trim()?{type:l.type.trim()}:{},...l.actorId.trim()?{actorId:l.actorId.trim()}:{}})},children:[f("workspaceId","workspace id (all if empty)"),f("type","event type"),f("actorId","actor id"),(0,ut.jsx)("button",{type:"submit",style:c.button,disabled:s,children:"Filter"}),(0,ut.jsx)("button",{type:"button",style:c.button,onClick:()=>{d()},disabled:s,children:"Refresh"})]}),r?(0,ut.jsx)("p",{style:c.error,role:"alert",children:r.explanation}):null,i.length===0&&!s?(0,ut.jsx)("p",{style:c.muted,children:"Nothing recorded for this filter."}):(0,ut.jsxs)("table",{style:c.table,children:[(0,ut.jsx)("thead",{children:(0,ut.jsxs)("tr",{children:[(0,ut.jsx)("th",{style:c.th,children:"When"}),(0,ut.jsx)("th",{style:c.th,children:"Type"}),(0,ut.jsx)("th",{style:c.th,children:"Workspace"}),(0,ut.jsx)("th",{style:c.th,children:"Actor"}),(0,ut.jsx)("th",{style:c.th,children:"Request"})]})}),(0,ut.jsx)("tbody",{children:i.map(m=>(0,ut.jsxs)("tr",{children:[(0,ut.jsx)("td",{style:{...c.td,...c.muted},children:new Date(m.createdAt).toLocaleString()}),(0,ut.jsx)("td",{style:{...c.td,...c.mono},children:m.type}),(0,ut.jsx)("td",{style:{...c.td,...c.mono},children:String(m.payload.workspaceId??"\u2014")}),(0,ut.jsx)("td",{style:{...c.td,...c.mono},children:m.actorId??"\u2014"}),(0,ut.jsx)("td",{style:{...c.td,...c.muted},children:m.requestId??""})]},m.id))})]}),s?(0,ut.jsx)("p",{style:c.status,children:"Loading\u2026"}):null,o&&!s?(0,ut.jsx)("button",{type:"button",style:{...c.button,marginTop:8},onClick:()=>{y()},children:"Load more"}):null]})}var pg=[{group:"Today",items:[{page:"attention",label:"Attention"}]},{group:"System",items:[{page:"modules",label:"Modules"},{page:"config",label:"Configuration"},{page:"doctor",label:"Doctor"},{page:"routes",label:"Routes"}]},{group:"People",items:[{page:"users",label:"Users",needs:"auth"}]},{group:"Money",items:[{page:"catalog",label:"Catalog",needs:"billing"},{page:"subscriber",label:"Subscriber",needs:"billing"}]},{group:"Settings",items:[{page:"settings",label:"Config & secrets",needs:"config"}]},{group:"Messaging",items:[{page:"templates",label:"Templates",needs:"courier"}]},{group:"Activity",items:[{page:"audit",label:"Audit",needs:"audit"},{page:"log",label:"Admin log"},{page:"tokens",label:"Access"},{page:"migrations",label:"Migrations"}]}];function gd({client:t,configClient:e,courierClient:l,authClient:n,billingClient:a,auditClient:u,environment:i,page:o,onNavigate:s}){let[r,d]=(0,hs.useState)("attention"),y=o??r,f=p=>{s&&s(p),o===void 0&&d(p)},[m,b]=(0,hs.useState)(null),v={config:!!e,courier:!!l,auth:!!n,billing:!!a,audit:!!u},A;switch(y){case"attention":A=(0,j.jsx)(ng,{client:t});break;case"modules":A=(0,j.jsx)(ig,{client:t});break;case"doctor":A=(0,j.jsx)(ug,{client:t});break;case"config":A=(0,j.jsx)(ag,{client:t});break;case"routes":A=(0,j.jsx)(og,{client:t});break;case"tokens":A=(0,j.jsx)(fg,{client:t});break;case"migrations":A=(0,j.jsx)(cg,{client:t});break;case"log":A=(0,j.jsx)(lg,{client:t});break;case"catalog":A=a?(0,j.jsx)(hg,{client:a}):(0,j.jsx)("p",{style:c.status,children:"Pass a BillingAdminClient to see the catalog here."});break;case"subscriber":A=a?(0,j.jsx)(mg,{client:a}):(0,j.jsx)("p",{style:c.status,children:"Pass a BillingAdminClient to look up subscribers here."});break;case"audit":A=u?(0,j.jsx)(yg,{client:u}):(0,j.jsx)("p",{style:c.status,children:"Pass an AuditAdminClient to see the audit trail here."});break;case"users":A=n?(0,j.jsx)(dg,{client:n}):(0,j.jsx)("p",{style:c.status,children:"Pass an AuthAdminClient to look up users here."});break;case"settings":A=e?m&&m.kind!=="template"?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("button",{type:"button",style:c.button,onClick:()=>b(null),children:"\u2190 Back"}),(0,j.jsx)(Qf,{client:e,kind:m.kind,configKey:m.key,...i!==void 0?{environment:i}:{},onSaved:()=>b(null)})]}):(0,j.jsx)(Zf,{client:e,...i!==void 0?{environment:i}:{},onSelectConfig:p=>b({kind:"config",key:p}),onSelectSecret:p=>b({kind:"secret",key:p})}):(0,j.jsx)("p",{style:c.status,children:"Pass a ConfigAdminClient to manage config and secrets here."});break;case"templates":A=l?m?.kind==="template"?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("button",{type:"button",style:c.button,onClick:()=>b(null),children:"\u2190 Back"}),(0,j.jsx)($f,{client:l,type:m.type,onSaved:()=>b(null)})]}):(0,j.jsx)(Ff,{client:l,onSelectTemplate:p=>b({kind:"template",type:p.type})}):(0,j.jsx)("p",{style:c.status,children:"Pass a CourierAdminClient to manage templates here."});break}return(0,j.jsxs)("div",{style:c.shell,children:[(0,j.jsx)("nav",{style:c.nav,"aria-label":"Admin",children:pg.map(p=>{let h=p.items.filter(g=>!g.needs||v[g.needs]);return h.length===0?null:(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{style:c.navGroup,children:p.group}),h.map(g=>(0,j.jsx)("button",{type:"button",style:{...c.navItem,...y===g.page?c.navItemActive:{}},"aria-current":y===g.page?"page":void 0,onClick:()=>{b(null),f(g.page)},children:g.label},g.page))]},p.group)})}),(0,j.jsx)("main",{style:c.main,children:A})]})}var wn=R(L(),1),wp=R(Cp(),1),q=R(At(),1),mf=window.location.pathname.replace(/\/ui\/?$/,""),yf="fonderie.admin.token",Cb=()=>{try{return window.sessionStorage.getItem(yf)??""}catch{return""}},hf=t=>{try{t?window.sessionStorage.setItem(yf,t):window.sessionStorage.removeItem(yf)}catch{}},pf="fonderie.admin.theme",kb=()=>{try{let t=window.localStorage.getItem(pf);return t==="light"||t==="dark"?t:"system"}catch{return"system"}},wb=t=>{t==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",t);try{t==="system"?window.localStorage.removeItem(pf):window.localStorage.setItem(pf,t)}catch{}},zb={system:(0,q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,q.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),(0,q.jsx)("path",{d:"M8 21h8"}),(0,q.jsx)("path",{d:"M12 17v4"})]}),light:(0,q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,q.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,q.jsx)("path",{d:"M12 2v2"}),(0,q.jsx)("path",{d:"M12 20v2"}),(0,q.jsx)("path",{d:"m4.93 4.93 1.41 1.41"}),(0,q.jsx)("path",{d:"m17.66 17.66 1.41 1.41"}),(0,q.jsx)("path",{d:"M2 12h2"}),(0,q.jsx)("path",{d:"M20 12h2"}),(0,q.jsx)("path",{d:"m6.34 17.66-1.41 1.41"}),(0,q.jsx)("path",{d:"m19.07 4.93-1.41 1.41"})]}),dark:(0,q.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,q.jsx)("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"})})},Ob=[["system","System"],["light","Light"],["dark","Dark"]];function Ub(){let[t,e]=(0,wn.useState)(kb);return(0,q.jsx)("fieldset",{className:"theme-switch","aria-label":"Theme switcher",children:Ob.map(([l,n])=>(0,q.jsxs)("label",{className:"theme-switch__option","data-theme-value":l,children:[(0,q.jsx)("input",{type:"radio",name:"theme",value:l,checked:t===l,onChange:()=>{wb(l),e(l)}}),zb[l],(0,q.jsx)("span",{children:n})]},l))})}var ce={text:"var(--fonderie-text,#171717)",muted:"var(--fonderie-text-muted,#5c5c5c)",surface:"var(--fonderie-surface,#fff)",border:"var(--fonderie-border,#e0e0e0)",danger:"var(--fonderie-danger,#e00)",radius:"var(--fonderie-radius,4px)",tracking:"var(--fonderie-tracking-display,-0.05em)",shadow:"var(--fonderie-shadow-card,0 2px 3px 0 rgba(0,0,0,.05))"},Ll={gate:{maxWidth:420,margin:"15vh auto 0",padding:24,color:ce.text},h1:{fontSize:20,fontWeight:600,marginBottom:4,letterSpacing:ce.tracking},p:{color:ce.muted,fontSize:14,marginTop:0},input:{width:"100%",padding:"8px 10px",border:`1px solid ${ce.border}`,borderRadius:ce.radius,fontSize:14,marginTop:12,fontFamily:"inherit",background:ce.surface,color:ce.text,boxSizing:"border-box"},button:{marginTop:12,padding:"8px 14px",border:`1px solid ${ce.border}`,borderRadius:ce.radius,background:ce.surface,cursor:"pointer",fontSize:14,fontFamily:"inherit",color:ce.text,boxShadow:ce.shadow},err:{color:ce.danger,fontSize:14,marginTop:12},sessionDock:{position:"fixed",left:16,bottom:16,zIndex:10},themeDock:{position:"fixed",right:16,bottom:16,zIndex:10,borderRadius:9999,boxShadow:ce.shadow}};function Rb({onToken:t,error:e}){let[l,n]=(0,wn.useState)("");return(0,q.jsxs)("form",{style:Ll.gate,onSubmit:a=>{a.preventDefault(),l.trim()&&t(l.trim())},children:[(0,q.jsx)("h1",{style:Ll.h1,children:"Admin"}),(0,q.jsxs)("p",{style:Ll.p,children:["Paste an admin token. It is kept for this tab only and sent as a Bearer header \u2014 never stored on the server. A ",(0,q.jsx)("code",{children:"read"}),"-scoped token is enough to look around and cannot reveal secrets."]}),(0,q.jsx)("input",{type:"password",value:l,onChange:a=>n(a.target.value),placeholder:"admin token",style:Ll.input,"aria-label":"Admin token"}),e?(0,q.jsx)("p",{style:Ll.err,children:e}):null,(0,q.jsx)("button",{type:"submit",style:Ll.button,children:"Open"})]})}function Nb(){let[t,e]=(0,wn.useState)(Cb),[l,n]=(0,wn.useState)(null),[a,u]=(0,wn.useState)(null);return(0,wn.useEffect)(()=>{if(!t)return;let i=!0;return new ui({baseUrl:window.location.origin,adminToken:t,prefix:mf}).manifest().then(({result:s})=>{i&&(hf(t),n(s),u(null))}).catch(s=>{i&&(hf(""),e(""),n(null),u(s instanceof T&&s.status===401?"That token was refused.":`Could not reach the admin surface: ${s instanceof T?s.explanation:String(s)}`))}),()=>{i=!1}},[t]),(0,q.jsxs)(q.Fragment,{children:[!t||!l?(0,q.jsx)(Rb,{onToken:e,error:a}):(0,q.jsx)(Mb,{token:t,manifest:l}),t&&l?(0,q.jsx)("div",{style:Ll.sessionDock,children:(0,q.jsx)("button",{type:"button",style:{...Ll.button,marginTop:0},onClick:()=>{hf(""),e(""),n(null)},children:"Forget token"})}):null,(0,q.jsx)("div",{style:Ll.themeDock,children:(0,q.jsx)(Ub,{})})]})}function Mb({token:t,manifest:e}){let l=new Set(e.routes.map(u=>u.path)),n=u=>l.has(`${mf}${u}`),a={baseUrl:window.location.origin,adminToken:t,prefix:mf};return(0,q.jsx)(gd,{client:new ui(a),...n("/secrets")?{configClient:new ts(a)}:{},...n("/templates")?{courierClient:new ns(a)}:{},...n("/users")?{authClient:new es(a)}:{},...n("/catalog")?{billingClient:new ls(a)}:{},...n("/audit")?{auditClient:new Tf(a)}:{}})}var kp=document.getElementById("root");kp&&(0,wp.createRoot)(kp).render((0,q.jsx)(Nb,{}));})();
|
|
9
|
+
`).replace(U1,"")}function Jy(t,e){return e=Fh(e),Fh(t)===e}function et(t,e,l,n,a,u){switch(l){case"children":if(typeof n=="string")e==="body"||e==="textarea"&&n===""||Ha(t,n);else if(typeof n=="number"||typeof n=="bigint")e!=="body"&&Ha(t,""+n);else return;break;case"className":Si(t,"class",n);break;case"tabIndex":Si(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Si(t,l,n);break;case"style":Zm(t,n,u);return;case"data":if(e!=="object"){Si(t,"data",n);break}case"src":case"href":if(n===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Li(n),t.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){t.setAttribute(l,"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 u=="function"&&(l==="formAction"?(e!=="input"&&et(t,e,"name",a.name,a,null),et(t,e,"formEncType",a.formEncType,a,null),et(t,e,"formMethod",a.formMethod,a,null),et(t,e,"formTarget",a.formTarget,a,null)):(et(t,e,"encType",a.encType,a,null),et(t,e,"method",a.method,a,null),et(t,e,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Li(n),t.setAttribute(l,n);break;case"onClick":n!=null&&(t.onclick=il);return;case"onScroll":n!=null&&X("scroll",t);return;case"onScrollEnd":n!=null&&X("scrollend",t);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(E(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(E(60));u?.__html!==l&&(t.innerHTML=l)}}break;case"multiple":t.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":t.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){t.removeAttribute("xlink:href");break}l=Li(n),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,n):t.removeAttribute(l);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":n&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":n===!0?t.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,n):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?t.setAttribute(l,n):t.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?t.removeAttribute(l):t.setAttribute(l,n);break;case"popover":X("beforetoggle",t),X("toggle",t),Hi(t,"popover",n);break;case"xlinkActuate":Al(t,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Al(t,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Al(t,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Al(t,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Al(t,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Al(t,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Al(t,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Al(t,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Al(t,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Hi(t,"is",n);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=$g.get(l)||l,Hi(t,l,n);else return}J=!0}function er(t,e,l,n,a,u){switch(l){case"style":Zm(t,n,u);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(E(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(E(60));u?.__html!==l&&(t.innerHTML=l)}}break;case"children":if(typeof n=="string")Ha(t,n);else if(typeof n=="number"||typeof n=="bigint")Ha(t,""+n);else return;break;case"onScroll":n!=null&&X("scroll",t);return;case"onScrollEnd":n!=null&&X("scrollend",t);return;case"onClick":n!=null&&(t.onclick=il);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Gm.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),u=l.slice(2,a?l.length-7:void 0),e=t[se]||null,e=e!=null?e[l]:null,typeof e=="function"&&t.removeEventListener(u,e,a),typeof n=="function")){typeof e!="function"&&e!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(u,n,a);break t}J=!0,l in t?t[l]=n:n===!0?t.setAttribute(l,""):Hi(t,l,n)}return}J=!0}function Yt(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":X("error",t),X("load",t);var n=!1,a=!1,u;for(u in l)if(l.hasOwnProperty(u)){var i=l[u];if(i!=null)switch(u){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(E(137,e));default:et(t,e,u,i,l,null)}}a&&et(t,e,"srcSet",l.srcSet,l,null),n&&et(t,e,"src",l.src,l,null);return;case"input":X("invalid",t);var o=u=i=a=null,s=null,r=null;for(n in l)if(l.hasOwnProperty(n)){var d=l[n];if(d!=null)switch(n){case"name":a=d;break;case"type":i=d;break;case"checked":s=d;break;case"defaultChecked":r=d;break;case"value":u=d;break;case"defaultValue":o=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(E(137,e));break;default:et(t,e,n,d,l,null)}}Xm(t,u,o,s,r,i,a,!1);return;case"select":X("invalid",t),n=i=u=null;for(a in l)if(l.hasOwnProperty(a)&&(o=l[a],o!=null))switch(a){case"value":u=o;break;case"defaultValue":i=o;break;case"multiple":n=o;default:et(t,e,a,o,l,null)}e=u,l=i,t.multiple=!!n,e!=null?wa(t,!!n,e,!1):l!=null&&wa(t,!!n,l,!0);return;case"textarea":X("invalid",t),u=a=n=null;for(i in l)if(l.hasOwnProperty(i)&&(o=l[i],o!=null))switch(i){case"value":n=o;break;case"defaultValue":a=o;break;case"children":u=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(E(91));break;default:et(t,e,i,o,l,null)}Vm(t,n,a,u);return;case"option":for(s in l)l.hasOwnProperty(s)&&(n=l[s],n!=null)&&(s==="selected"?t.selected=n&&typeof n!="function"&&typeof n!="symbol":et(t,e,s,n,l,null));return;case"dialog":X("beforetoggle",t),X("toggle",t),X("cancel",t),X("close",t);break;case"iframe":case"object":X("load",t);break;case"video":case"audio":for(n=0;n<Gu.length;n++)X(Gu[n],t);break;case"image":X("error",t),X("load",t);break;case"details":X("toggle",t);break;case"embed":case"source":case"link":X("error",t),X("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(r in l)if(l.hasOwnProperty(r)&&(n=l[r],n!=null))switch(r){case"children":case"dangerouslySetInnerHTML":throw Error(E(137,e));default:et(t,e,r,n,l,null)}return;default:if(gr(e)){for(d in l)l.hasOwnProperty(d)&&(n=l[d],n!==void 0&&er(t,e,d,n,l,void 0));return}}for(o in l)l.hasOwnProperty(o)&&(n=l[o],n!=null&&et(t,e,o,n,l,null))}var R1={};function N1(t,e,l,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,u=null,i=null,o=null,s=null,r=null,d=null;for(m in l){var y=l[m];if(l.hasOwnProperty(m)&&y!=null)switch(m){case"checked":break;case"value":break;case"defaultValue":s=y;default:n.hasOwnProperty(m)||et(t,e,m,null,n,y)}}for(var f in n){var m=n[f];if(y=l[f],n.hasOwnProperty(f)&&(m!=null||y!=null))switch(f){case"type":m!==y&&(J=!0),u=m;break;case"name":m!==y&&(J=!0),a=m;break;case"checked":m!==y&&(J=!0),r=m;break;case"defaultChecked":m!==y&&(J=!0),d=m;break;case"value":m!==y&&(J=!0),i=m;break;case"defaultValue":m!==y&&(J=!0),o=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(E(137,e));break;default:m!==y&&et(t,e,f,m,n,y)}}hc(t,i,o,s,r,d,u,a);return;case"select":m=i=o=f=null;for(u in l)if(s=l[u],l.hasOwnProperty(u)&&s!=null)switch(u){case"value":break;case"multiple":m=s;default:n.hasOwnProperty(u)||et(t,e,u,null,n,s)}for(a in n)if(u=n[a],s=l[a],n.hasOwnProperty(a)&&(u!=null||s!=null))switch(a){case"value":u!==s&&(J=!0),f=u;break;case"defaultValue":u!==s&&(J=!0),o=u;break;case"multiple":u!==s&&(J=!0),i=u;default:u!==s&&et(t,e,a,u,n,s)}e=o,l=i,n=m,f!=null?wa(t,!!l,f,!1):!!n!=!!l&&(e!=null?wa(t,!!l,e,!0):wa(t,!!l,l?[]:"",!1));return;case"textarea":m=f=null;for(o in l)if(a=l[o],l.hasOwnProperty(o)&&a!=null&&!n.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:et(t,e,o,null,n,a)}for(i in n)if(a=n[i],u=l[i],n.hasOwnProperty(i)&&(a!=null||u!=null))switch(i){case"value":a!==u&&(J=!0),f=a;break;case"defaultValue":a!==u&&(J=!0),m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(E(91));break;default:a!==u&&et(t,e,i,a,n,u)}Qm(t,f,m);return;case"option":for(var b in l)f=l[b],l.hasOwnProperty(b)&&f!=null&&!n.hasOwnProperty(b)&&(b==="selected"?t.selected=!1:et(t,e,b,null,n,f));for(s in n)f=n[s],m=l[s],n.hasOwnProperty(s)&&f!==m&&(f!=null||m!=null)&&(s==="selected"?(f!==m&&(J=!0),t.selected=f&&typeof f!="function"&&typeof f!="symbol"):et(t,e,s,f,n,m));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in l)f=l[v],l.hasOwnProperty(v)&&f!=null&&!n.hasOwnProperty(v)&&et(t,e,v,null,n,f);for(r in n)if(f=n[r],m=l[r],n.hasOwnProperty(r)&&f!==m&&(f!=null||m!=null))switch(r){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(E(137,e));break;default:et(t,e,r,f,n,m)}return;default:if(gr(e)){for(var A in l)f=l[A],l.hasOwnProperty(A)&&f!==void 0&&!n.hasOwnProperty(A)&&er(t,e,A,void 0,n,f);for(d in n)f=n[d],m=l[d],!n.hasOwnProperty(d)||f===m||f===void 0&&m===void 0||er(t,e,d,f,n,m);return}}for(var p in l)f=l[p],l.hasOwnProperty(p)&&f!=null&&!n.hasOwnProperty(p)&&et(t,e,p,null,n,f);for(y in n)f=n[y],m=l[y],!n.hasOwnProperty(y)||f===m||f==null&&m==null||et(t,e,y,f,n,m)}function Wh(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function M1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],u=a.transferSize,i=a.initiatorType,o=a.duration;if(u&&o&&Wh(i)){for(i=0,o=a.responseEnd,n+=1;n<l.length;n++){var s=l[n],r=s.startTime;if(r>o)break;var d=s.transferSize,y=s.initiatorType;d&&Wh(y)&&(s=s.responseEnd,i+=d*(s<o?1:(o-r)/(s-r)))}if(--n,e+=8*(u+i)/(a.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 lr=null,nr=null;function Yu(t){return t.nodeType===9?t:t.ownerDocument}function Ph(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 $y(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 Fy(t,e,l,n){return l=Yu(l).createElement(t),l[Lt]=n,l[se]=e,Yt(l,t,e),Dt(l),l}function ar(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 Ws=null;function _1(){var t=window.event;return t&&t.type==="popstate"?t===Ws?!1:(Ws=t,!0):(Ws=null,!1)}var nf=typeof setTimeout=="function"?setTimeout:void 0,x1=typeof clearTimeout=="function"?clearTimeout:void 0,tm=typeof Promise=="function"?Promise:void 0,em=typeof requestAnimationFrame=="function"?requestAnimationFrame:nf,D1=typeof queueMicrotask=="function"?queueMicrotask:typeof tm<"u"?function(t){return tm.resolve(null).then(t).catch(q1)}:nf;function q1(t){setTimeout(function(){throw t})}function kn(t){return t==="head"}function lm(t,e){var l=e,n=0;do{var a=l.nextSibling;if(t.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){t.removeChild(a),Ia(e);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")tc(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,tc(l);for(var u=l.firstChild;u;){var i=u.nextSibling,o=u.nodeName;u[Fu]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=i}}else l==="body"&&tc(t.ownerDocument.body);l=a}while(l);Ia(e)}function nm(t,e){var l=t;t=0;do{var n=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=n}while(l)}function Wy(t,e,l){if(e=CSS.escape(e)!==e?"r-"+btoa(e).replace(/=/g,""):e,t.style.viewTransitionName=e,l!=null&&(t.style.viewTransitionClass=l),l=getComputedStyle(t),l.display==="inline"){if(e=t.getClientRects(),e.length===1)var n=1;else for(var a=n=0;a<e.length;a++){var u=e[a];0<u.width&&0<u.height&&n++}n===1&&(t=t.style,t.display=e.length===1?"inline-block":"block",t.marginTop="-"+l.paddingTop,t.marginBottom="-"+l.paddingBottom)}}function Py(t,e){t=t.style,e=e.style;var l=e!=null?e.hasOwnProperty("viewTransitionName")?e.viewTransitionName:e.hasOwnProperty("view-transition-name")?e["view-transition-name"]:null:null;t.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=e!=null?e.hasOwnProperty("viewTransitionClass")?e.viewTransitionClass:e.hasOwnProperty("view-transition-class")?e["view-transition-class"]:null:null,t.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),t.display==="inline-block"&&(e==null?t.display=t.margin="":(l=e.display,t.display=l==null||typeof l=="boolean"?"":l,l=e.margin,l!=null?t.margin=l:(l=e.hasOwnProperty("marginTop")?e.marginTop:e["margin-top"],t.marginTop=l==null||typeof l=="boolean"?"":l,e=e.hasOwnProperty("marginBottom")?e.marginBottom:e["margin-bottom"],t.marginBottom=e==null||typeof e=="boolean"?"":e)))}function tp(t,e,l){return l=l.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<=l.innerHeight&&t.left<=l.innerWidth}}function ur(t){var e=t.getBoundingClientRect(),l=getComputedStyle(t);return tp(e,l,t)}function H1(t){var e=t.getBoundingClientRect();e=new DOMRect(e.x+2e4,e.y+2e4,e.width,e.height);var l=getComputedStyle(t);return tp(e,l,t)}function L1(t){return t.documentElement.clientHeight}function B1(t){this.addEventListener("load",t),this.addEventListener("error",t)}function G1(t,e,l,n,a,u,i,o,s){var r=e.nodeType===9?e:e.ownerDocument;try{var d=r.startViewTransition({update:function(){var f=r.defaultView,m=f.navigation&&f.navigation.transition,b=r.fonts.status;n();var v=[];if(b==="loaded"&&(L1(r),r.fonts.status==="loading"&&v.push(r.fonts.ready)),b=v.length,t!==null)for(var A=t.suspenseyImages,p=0,h=0;h<A.length;h++){var g=A[h];if(!g.complete){var S=g.getBoundingClientRect();if(0<S.bottom&&0<S.right&&S.top<f.innerHeight&&S.left<f.innerWidth){if(p+=dp(g),p>Pi){v.length=b;break}g=new Promise(B1.bind(g)),v.push(g)}}}if(0<v.length)return f=Promise.race([Promise.all(v),new Promise(function(w){return setTimeout(w,500)})]).then(a,a),(m?Promise.allSettled([m.finished,f]):f).then(u,u);if(a(),m)return m.finished.then(u,u);u()},types:l});r.__reactViewTransition=d;var y=[];return d.ready.then(function(){for(var f=r.documentElement.getAnimations({subtree:!0}),m=0;m<f.length;m++){var b=f[m],v=b.effect,A=v.pseudoElement;if(A!=null&&A.startsWith("::view-transition")){y.push(b),b=v.getKeyframes();for(var p=A=void 0,h=!0,g=0;g<b.length;g++){var S=b[g],w=S.width;if(A===void 0)A=w;else if(A!==w){h=!1;break}if(w=S.height,p===void 0)p=w;else if(p!==w){h=!1;break}delete S.width,delete S.height,S.transform==="none"&&delete S.transform}h&&A!==void 0&&p!==void 0&&(v.setKeyframes(b),h=getComputedStyle(v.target,v.pseudoElement),h.width!==A||h.height!==p)&&(h=b[0],h.width=A,h.height=p,h=b[b.length-1],h.width=A,h.height=p,v.setKeyframes(b))}}i()},function(f){r.__reactViewTransition===d&&(r.__reactViewTransition=null);try{typeof f=="object"&&f!==null&&f.name==="InvalidStateError"&&(f.message==="View transition was skipped because document visibility state is hidden."||f.message==="Skipping view transition because document visibility state has become hidden."||f.message==="Skipping view transition because viewport size changed."||f.message==="Transition was aborted because of invalid state")&&(f=null),f!==null&&s(f)}finally{n(),a(),i()}}),d.finished.finally(function(){for(var f=0;f<y.length;f++)y[f].cancel();r.__reactViewTransition===d&&(r.__reactViewTransition=null),o()}),d}catch{return n(),a(),i(),null}}function qn(t,e){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+e+")"}qn.prototype.animate=function(t,e){return e=typeof e=="number"?{duration:e}:ot({},e),e.pseudoElement=this._selector,this._scope.animate(t,e)};qn.prototype.getAnimations=function(){for(var t=this._scope,e=this._selector,l=t.getAnimations({subtree:!0}),n=[],a=0;a<l.length;a++){var u=l[a].effect;u!==null&&u.target===t&&u.pseudoElement===e&&n.push(l[a])}return n};qn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function ep(t){return{name:t,group:new qn("group",t),imagePair:new qn("image-pair",t),old:new qn("old",t),new:new qn("new",t)}}function Ae(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Ae.prototype.addEventListener=function(t,e,l){var n=null,a=null;if(!(l!=null&&typeof l!="boolean"&&(n=l.signal||null,n!==null&&n.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var u=this._eventListeners;if(lp(u,t,e,l)===-1){var i=this,o=e;l!=null&&typeof l!="boolean"&&l.once===!0&&(o=function(s){i.removeEventListener(t,e,l),typeof e=="function"?e.call(this,s):e.handleEvent(s)}),n!==null&&(a=i.removeEventListener.bind(i,t,e,l),n.addEventListener("abort",a,{once:!0}),a=n.removeEventListener.bind(n,"abort",a)),n=Xa(l),u.push({type:t,listener:e,optionsOrUseCapture:l,attachedListener:o,cleanup:a}),oe(this._fragmentFiber.child,!1,j1,t,o,n)}this._eventListeners=u}};function j1(t,e,l,n){return Nt(t).addEventListener(e,l,n),!1}Ae.prototype.removeEventListener=function(t,e,l){var n=this._eventListeners;if(n!==null&&(e=lp(n,t,e,l),e!==-1)){var a=n[e];l=a.attachedListener;var u=a.cleanup;a=Xa(a.optionsOrUseCapture),oe(this._fragmentFiber.child,!1,Y1,t,l,a),n.splice(e,1),u!==null&&u()}};function Y1(t,e,l,n){return Nt(t).removeEventListener(e,l,n),!1}function Xa(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function am(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function lp(t,e,l,n){if(t.length===0)return-1;n=am(n);for(var a=0;a<t.length;a++){var u=t[a];if(u.type===e&&u.listener===l&&am(u.optionsOrUseCapture)===n)return a}return-1}Ae.prototype.dispatchEvent=function(t){var e=$n(this._fragmentFiber);if(e===null)return!0;e=Nt(e);var l=this._eventListeners;if(l!==null&&0<l.length||!t.bubbles){var n=e.nodeType===9?e.createComment(""):document.createTextNode("");if(l)for(var a=0;a<l.length;a++){var u=l[a];n.addEventListener(u.type,u.attachedListener,Xa(u.optionsOrUseCapture))}if(e.appendChild(n),t=n.dispatchEvent(t),l)for(a=0;a<l.length;a++)u=l[a],n.removeEventListener(u.type,u.attachedListener,Xa(u.optionsOrUseCapture));return e.removeChild(n),t}return e.dispatchEvent(t)};Ae.prototype.focus=function(t){oe(this._fragmentFiber.child,!0,np,t,void 0,void 0)};function np(t,e){return t.tag===6?!1:(t=Nt(t),tb(t,e))}Ae.prototype.focusLast=function(t){var e=[];oe(this._fragmentFiber.child,!0,af,e,void 0,void 0);for(var l=e.length-1;0<=l&&!np(e[l],t);l--);};function af(t,e){return e.push(t),!1}Ae.prototype.blur=function(){var t=$n(this._fragmentFiber);t!==null&&(t=Nt(t),t=Yu(t).activeElement,t!==null&&oe(this._fragmentFiber.child,!1,X1,t,void 0,void 0))};function X1(t,e){return t.tag===6?!1:(t=Nt(t),t===e||t.contains(e)?(e.blur(),!0):!1)}Ae.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),oe(this._fragmentFiber.child,!1,Q1,t,void 0,void 0)};function Q1(t,e){return t.tag===6||(t=Nt(t),e.observe(t)),!1}Ae.prototype.unobserveUsing=function(t){var e=this._observers;if(e!==null&&e.has(t)){e.delete(t),oe(this._fragmentFiber.child,!1,V1,t,void 0,void 0);for(var l=e=0;l<Ve.length;l++){var n=Ve[l];n.fragmentInstance===this&&n.observer===t?t.unobserve(n.instance):Ve[e++]=n}Ve.length=e}};function V1(t,e){return t.tag===6||(t=Nt(t),e.unobserve(t)),!1}var Ve=[],Ps=!1;function Z1(t,e,l){Ve.push({fragmentInstance:t,observer:e,instance:l}),Ps||(Ps=!0,eb(function(){Ps=!1;var n=Ve;Ve=[];for(var a=0;a<n.length;a++){var u=n[a];u.observer.unobserve(u.instance)}}))}Ae.prototype.getClientRects=function(){var t=[];return oe(this._fragmentFiber.child,!1,I1,t,void 0,void 0),t};function I1(t,e){if(t.tag===6){t=t.stateNode;var l=t.ownerDocument.createRange();l.selectNodeContents(t),e.push.apply(e,l.getClientRects())}else t=Nt(t),e.push.apply(e,t.getClientRects());return!1}Ae.prototype.getRootNode=function(t){var e=$n(this._fragmentFiber);return e===null?this:Nt(e).getRootNode(t)};Ae.prototype.compareDocumentPosition=function(t){var e=$n(this._fragmentFiber);if(e===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];oe(this._fragmentFiber.child,!1,af,l,void 0,void 0);var n=Nt(e);if(l.length===0){if(l=n,Hd(this._fragmentFiber)){t:{for(e=this._fragmentFiber.return;e!==null;){if(e.tag===4){e=e.stateNode.containerInfo;break t}if(e.tag===3||e.tag===5||e.tag===27)break;e=e.return}e=null}e!=null&&(l=e)}e=this._fragmentFiber;var a=n=l.compareDocumentPosition(t);return l===t?a=Node.DOCUMENT_POSITION_CONTAINS:n&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=km(e)[1],l===null?a=Node.DOCUMENT_POSITION_PRECEDING:(t=Nt(l).compareDocumentPosition(t),a=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),a|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}e=Nt(l[0]),a=Nt(l[l.length-1]);var u=Hd(this._fragmentFiber)?e.parentElement:n;if(u==null)return Node.DOCUMENT_POSITION_DISCONNECTED;n=u.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY,u=u.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY;var i=e.compareDocumentPosition(t),o=a.compareDocumentPosition(t),s=i&Node.DOCUMENT_POSITION_CONTAINED_BY||o&Node.DOCUMENT_POSITION_CONTAINED_BY;return o=n&&u&&i&Node.DOCUMENT_POSITION_FOLLOWING&&o&Node.DOCUMENT_POSITION_PRECEDING,e=n&&e===t||u&&a===t||s||o?Node.DOCUMENT_POSITION_CONTAINED_BY:!n&&e===t||!u&&a===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:i,e&Node.DOCUMENT_POSITION_DISCONNECTED||e&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||K1(e,this._fragmentFiber,l[0],l[l.length-1],t)?e:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function K1(t,e,l,n,a){var u=Dn(a);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!u)t:{for(;u!==null;){if(u.tag===7&&(u===e||u.alternate===e)){l=!0;break t}u=u.return}l=!1}return l}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(u===null)return u=a.ownerDocument,a===u||a===u.documentElement||a===u.body;t:{for(u=e,e=$n(e);u!==null;){if(!(u.tag!==5&&u.tag!==3&&u.tag!==27||u!==e&&u.alternate!==e)){u=!0;break t}u=u.return}u=!1}return u}return t&Node.DOCUMENT_POSITION_PRECEDING?((e=!!u)&&!(e=u===l)&&(e=lc(l,u,Ld),e===null?e=!1:(oe(e,!0,Cg,u,l),u=ha,ha=null,e=u!==null)),e):t&Node.DOCUMENT_POSITION_FOLLOWING?((e=!!u)&&!(e=u===n)&&(e=lc(n,u,Ld),e===null?e=!1:(oe(e,!0,kg,u,n),u=ha,ec=ha=null,e=u!==null)),e):!1}function um(t,e){var l=t.ownerDocument.createRange();l.selectNodeContents(t),t=l.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,e?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}Ae.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(E(566));var e=[];oe(this._fragmentFiber.child,!1,af,e,void 0,void 0);var l=t!==!1;if(e.length===0){var n=km(this._fragmentFiber);if(n=l?n[1]||n[0]||$n(this._fragmentFiber):n[0]||n[1],n===null)return;if(n.tag===6){t=Nt(n),um(t,l);return}if(n=Nt(n),n.nodeType!==9){if(n.nodeType===11){l="host"in n?n.host:null,l!==null&&l.scrollIntoView(t);return}n.scrollIntoView(t)}}for(n=l?e.length-1:0;n!==(l?-1:e.length);){var a=e[n];a.tag===6?(a=Nt(a),um(a,l)):Nt(a).scrollIntoView(t),n+=l?-1:1}};function J1(t,e){return t=Nt(t),ap(t,e),!1}function ap(t,e){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(e)}function up(t,e){var l=e._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];t.addEventListener(a.type,a.attachedListener,Xa(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(u){for(var i=0,o=0;o<Ve.length;o++){var s=Ve[o];(s.fragmentInstance!==e||s.observer!==u||s.instance!==t)&&(Ve[i++]=s)}Ve.length=i,u.observe(t)}),ap(t,e))}function $1(t,e){var l=e._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];t.removeEventListener(a.type,a.attachedListener,Xa(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(u){typeof u.rootMargin=="string"?Z1(e,u,t):u.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(e))}function ir(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ir(l),_o(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function F1(t,e,l,n){for(;t.nodeType===1;){var a=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!n&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(n){if(!t[Fu])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(u=t.getAttribute("rel"),u==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(u!==a.rel||t.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||t.getAttribute("title")!==(a.title==null?null:a.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(u=t.getAttribute("src"),(u!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&u&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var u=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===u)return t}else return t;if(t=_e(t.nextSibling),t===null)break}return null}function W1(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=_e(t.nextSibling),t===null))return null;return t}function ip(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=_e(t.nextSibling),t===null))return null;return t}function or(t){return t.data==="$?"||t.data==="$~"}function uf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function P1(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var n=function(){e(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),t._reactRetry=n}}function _e(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 sr=null;function im(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return _e(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function om(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function tb(t,e){function l(){n=!0}if(t.ownerDocument.activeElement===t)return!0;var n=!1;try{t.ownerDocument.addEventListener("focus",l,!0),(t.focus||HTMLElement.prototype.focus).call(t,e)}finally{t.ownerDocument.removeEventListener("focus",l,!0)}return n}function eb(t){em(function(){em(function(e){return t(e)})})}function op(t,e,l){switch(e=Yu(l),t){case"html":if(t=e.documentElement,!t)throw Error(E(452));return t;case"head":if(t=e.head,!t)throw Error(E(453));return t;case"body":if(t=e.body,!t)throw Error(E(454));return t;default:throw Error(E(451))}}function sp(t,e,l){for(var n in l){var a=l[n];l.hasOwnProperty(n)&&a!=null&&et(t,e,n,null,R1,a)}l.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===il&&(t.onclick=null),_o(t)}function tc(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);_o(t)}var xe=new Map,sm=new Set;function Xu(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 Hl=F.d;F.d={f:lb,r:nb,D:ab,C:ub,L:ib,m:ob,X:cb,S:sb,M:rb};function lb(){var t=Hl.f(),e=Io();return t||e}function nb(t){var e=Ja(t);e!==null&&e.tag===5&&e.type==="form"?Z0(e):Hl.r(t)}var Pa=typeof document>"u"?null:document;function cp(t,e,l){var n=Pa;if(n&&typeof e=="string"&&e){var a=Re(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),sm.has(a)||(sm.add(a),t={rel:t,crossOrigin:l,href:e},n.querySelector(a)===null&&(e=n.createElement("link"),Yt(e,"link",t),Dt(e),n.head.appendChild(e)))}}function ab(t){Hl.D(t),cp("dns-prefetch",t,null)}function ub(t,e){Hl.C(t,e),cp("preconnect",t,e)}function ib(t,e,l){Hl.L(t,e,l);var n=Pa;if(n&&t&&e){var a='link[rel="preload"][as="'+Re(e)+'"]';e==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Re(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Re(l.imageSizes)+'"]')):a+='[href="'+Re(t)+'"]';var u=a;switch(e){case"style":u=Qa(t);break;case"script":u=tu(t)}if(!(xe.has(u)||(t=ot({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),xe.set(u,t),n.querySelector(a)!==null||e==="style"&&n.querySelector(ni(u))||e==="script"&&n.querySelector(ai(u))))){var i=n.createElement("link");Yt(i,"link",t),e==="style"&&(i[io]=!0,i.onload=i.onerror=function(){Lm(i)}),Dt(i),n.head.appendChild(i)}}}function ob(t,e){Hl.m(t,e);var l=Pa;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+Re(n)+'"][href="'+Re(t)+'"]',u=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=tu(t)}if(!xe.has(u)&&(t=ot({rel:"modulepreload",href:t},e),xe.set(u,t),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ai(u)))return}n=l.createElement("link"),Yt(n,"link",t),Dt(n),l.head.appendChild(n)}}}function sb(t,e,l){Hl.S(t,e,l);var n=Pa;if(n&&t){var a=ka(n).hoistableStyles,u=Qa(t);e=e||"default";var i=a.get(u);if(!i){var o={loading:0,preload:null};if(i=n.querySelector(ni(u)))o.loading=5;else{t=ot({rel:"stylesheet",href:t,"data-precedence":e},l),(l=xe.get(u))&&of(t,l);var s=i=n.createElement("link");Dt(s),Yt(s,"link",t),s._p=new Promise(function(r,d){s.onload=r,s.onerror=d}),s.addEventListener("load",function(){o.loading|=1}),s.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Fi(i,e,n)}i={type:"stylesheet",instance:i,count:1,state:o},a.set(u,i)}}}function cb(t,e){Hl.X(t,e);var l=Pa;if(l&&t){var n=ka(l).hoistableScripts,a=tu(t),u=n.get(a);u||(u=l.querySelector(ai(a)),u||(t=ot({src:t,async:!0},e),(e=xe.get(a))&&sf(t,e),u=l.createElement("script"),Dt(u),Yt(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function rb(t,e){Hl.M(t,e);var l=Pa;if(l&&t){var n=ka(l).hoistableScripts,a=tu(t),u=n.get(a);u||(u=l.querySelector(ai(a)),u||(t=ot({src:t,async:!0,type:"module"},e),(e=xe.get(a))&&sf(t,e),u=l.createElement("script"),Dt(u),Yt(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function cm(t,e,l,n){var a=(a=cn.current)?Xu(a):null;if(!a)throw Error(E(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Qa(l.href),e=ka(a).hoistableStyles,n=e.get(l),n||(n={type:"style",instance:null,count:0,state:null},e.set(l,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Qa(l.href);var u=ka(a).hoistableStyles,i=u.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,i),(u=a.querySelector(ni(t)))?u._p||(i.instance=u,i.state.loading=5):(u=xe.get(t),u||(u={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},xe.set(t,u)),fb(a,t,u,i.state))),e&&n===null)throw Error(E(528,""));return i}if(e&&n!==null)throw Error(E(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(l=tu(l),e=ka(a).hoistableScripts,n=e.get(l),n||(n={type:"script",instance:null,count:0,state:null},e.set(l,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(E(444,t))}}function Qa(t){return'href="'+Re(t)+'"'}function ni(t){return'link[rel="stylesheet"]['+t+"]"}function rp(t){return ot({},t,{"data-precedence":t.precedence,precedence:null})}function fb(t,e,l,n){if(e=t.querySelector('link[rel="preload"][as="style"]['+e+"]")){if(e[io]!==!0){n.loading=1;return}}else e=t.createElement("link"),e[io]=!0,e.onload=e.onerror=Lm.bind(null,e),Yt(e,"link",l),Dt(e),t.head.appendChild(e);n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2})}function tu(t){return'[src="'+Re(t)+'"]'}function ai(t){return"script[async]"+t}function rm(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+Re(l.href)+'"]');if(n)return e.instance=n,Dt(n),n;var a=ot({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),Dt(n),Yt(n,"style",a),Fi(n,l.precedence,t),e.instance=n;case"stylesheet":a=Qa(l.href);var u=t.querySelector(ni(a));if(u)return e.state.loading|=4,e.instance=u,Dt(u),u;n=rp(l),(a=xe.get(a))&&of(n,a),u=(t.ownerDocument||t).createElement("link"),Dt(u);var i=u;return i._p=new Promise(function(o,s){i.onload=o,i.onerror=s}),Yt(u,"link",n),e.state.loading|=4,Fi(u,l.precedence,t),e.instance=u;case"script":return u=tu(l.src),(a=t.querySelector(ai(u)))?(e.instance=a,Dt(a),a):(n=l,(a=xe.get(u))&&(n=ot({},l),sf(n,a)),t=t.ownerDocument||t,a=t.createElement("script"),Dt(a),Yt(a,"link",n),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(E(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,Fi(n,l.precedence,t));return e.instance}function Fi(t,e,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,u=a,i=0;i<n.length;i++){var o=n[i];if(o.dataset.precedence===e)u=o;else if(u!==a)break}u?u.parentNode.insertBefore(t,u.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function of(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function sf(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Wi=null;function fm(t,e,l){if(Wi===null){var n=new Map,a=Wi=new Map;a.set(l,n)}else a=Wi,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(t))return n;for(n.set(t,null),l=l.getElementsByTagName(t),a=0;a<l.length;a++){var u=l[a];if(!(u[Fu]||u[Lt]||t==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var i=u.getAttribute(e)||"";i=t+i;var o=n.get(i);o?o.push(u):n.set(i,[u])}}return n}function cr(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function db(t,e,l){if(l===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 dm(t,e){return t==="img"&&e.src!=null&&e.src!==""&&e.onLoad==null&&e.loading!=="lazy"}function fp(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function dp(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function hm(t,e){typeof e.decode=="function"&&(t.imgCount++,e.complete||(t.imgBytes+=dp(e),t.suspenseyImages.push(e)),t=yb.bind(t),e.decode().then(t,t))}function hb(t,e,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=Qa(n.href),u=e.querySelector(ni(a));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Qu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=u,Dt(u);return}u=e.ownerDocument||e,n=rp(n),(a=xe.get(a))&&of(n,a),u=u.createElement("link"),Dt(u);var i=u;i._p=new Promise(function(o,s){i.onload=o,i.onerror=s}),Yt(u,"link",n),l.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Qu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var Pi=0;function mb(t,e){return t.stylesheets&&t.count===0&&to(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var n=setTimeout(function(){if(t.stylesheets&&to(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4+e);0<t.imgBytes&&Pi===0&&(Pi=62500*M1());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&to(t,t.stylesheets),t.unsuspend)){var u=t.unsuspend;t.unsuspend=null,u()}},(t.imgBytes>Pi?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function hp(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)to(t,t.stylesheets);else if(t.unsuspend){var e=t.unsuspend;t.unsuspend=null,e()}}}function Qu(){this.count--,hp(this)}function yb(){this.imgCount--,hp(this)}var Ro=null;function to(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ro=new Map,e.forEach(pb,t),Ro=null,Qu.call(t))}function pb(t,e){if(!(e.state.loading&4)){var l=Ro.get(t);if(l)var n=l.get(null);else{l=new Map,Ro.set(t,l);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<a.length;u++){var i=a[u];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(l.set(i.dataset.precedence,i),n=i)}n&&l.set(null,n)}a=e.instance,i=a.getAttribute("data-precedence"),u=l.get(i)||n,u===n&&l.set(null,a),l.set(i,a),this.count++,n=Qu.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),u?u.parentNode.insertBefore(a,u.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}var Va={$$typeof:ul,Provider:null,Consumer:null,_currentValue:Hn,_currentValue2:Hn,_threadCount:0};function gb(t,e,l,n,a,u,i,o,s){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=Os(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Os(0),this.hiddenUpdates=Os(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=u,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.transitionTypes=null,this.incompleteTransitions=new Map}function mp(t,e,l,n,a,u,i,o,s,r,d,y){return t=new gb(t,e,l,i,s,r,d,y,o),e=1,u===!0&&(e|=24),u=ue(3,null,null,e),t.current=u,u.stateNode=t,e=zr(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:n,isDehydrated:l,cache:e},Rr(u),t}function yp(t){return t?(t=Ea,t):Ea}function pp(t,e,l,n,a,u){a=yp(a),n.context===null?n.context=a:n.pendingContext=a,n=fn(e),n.payload={element:l},u=u===void 0?null:u,u!==null&&(n.callback=u),l=dn(t,n,e),l!==null&&(ie(l,t,e),Tu(l,t,e))}function mm(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function cf(t,e){mm(t,e),(t=t.alternate)&&mm(t,e)}function gp(t){if(t.tag===13||t.tag===31){var e=Pn(t,67108864);e!==null&&ie(e,t,67108864),cf(t,67108864)}}function ym(t){if(t.tag===13||t.tag===31){var e=Ee();e=yr(e);var l=Pn(t,e);l!==null&&ie(l,t,e),cf(t,e)}}var Za=!0;function vb(t,e,l,n){var a=M.T;M.T=null;var u=F.p;try{F.p=2,rf(t,e,l,n)}finally{F.p=u,M.T=a}}function bb(t,e,l,n){var a=M.T;M.T=null;var u=F.p;try{F.p=8,rf(t,e,l,n)}finally{F.p=u,M.T=a}}function rf(t,e,l,n){if(Za){var a=rr(n);if(a===null)Fs(t,e,n,No,l),pm(t,n);else if(Eb(a,t,e,l,n))n.stopPropagation();else if(pm(t,n),e&4&&-1<Sb.indexOf(t)){for(;a!==null;){var u=Ja(a);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var i=Mn(u.pendingLanes);if(i!==0){var o=u;for(o.pendingLanes|=2,o.entangledLanes|=2;i;){var s=1<<31-Se(i);o.entanglements[1]|=s,i&=~s}hl(u),($&6)===0&&(ko=ve()+500,li(0,!1))}}break;case 31:case 13:o=Pn(u,2),o!==null&&ie(o,u,2),Io(),cf(u,2)}if(u=rr(n),u===null&&Fs(t,e,n,No,l),u===a)break;a=u}a!==null&&n.stopPropagation()}else Fs(t,e,n,null,l)}}function rr(t){return t=vr(t),ff(t)}var No=null;function ff(t){if(No=null,t=Dn(t),t!==null){var e=Iu(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=Tm(e),t!==null)return t;t=null}else if(l===31){if(t=Am(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return No=t,null}function vp(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(xg()){case Um:return 2;case Rm:return 8;case uo:case Dg:return 32;case Nm:return 268435456;default:return 32}default:return 32}}var fr=!1,pn=null,gn=null,vn=null,Vu=new Map,Zu=new Map,en=[],Sb="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 pm(t,e){switch(t){case"focusin":case"focusout":pn=null;break;case"dragenter":case"dragleave":gn=null;break;case"mouseover":case"mouseout":vn=null;break;case"pointerover":case"pointerout":Vu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zu.delete(e.pointerId)}}function fu(t,e,l,n,a,u){return t===null||t.nativeEvent!==u?(t={blockedOn:e,domEventName:l,eventSystemFlags:n,nativeEvent:u,targetContainers:[a]},e!==null&&(e=Ja(e),e!==null&&gp(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function Eb(t,e,l,n,a){switch(e){case"focusin":return pn=fu(pn,t,e,l,n,a),!0;case"dragenter":return gn=fu(gn,t,e,l,n,a),!0;case"mouseover":return vn=fu(vn,t,e,l,n,a),!0;case"pointerover":var u=a.pointerId;return Vu.set(u,fu(Vu.get(u)||null,t,e,l,n,a)),!0;case"gotpointercapture":return u=a.pointerId,Zu.set(u,fu(Zu.get(u)||null,t,e,l,n,a)),!0}return!1}function bp(t){var e=Dn(t.target);if(e!==null){var l=Iu(e);if(l!==null){if(e=l.tag,e===13){if(e=Tm(l),e!==null){t.blockedOn=e,Yd(t.priority,function(){ym(l)});return}}else if(e===31){if(e=Am(l),e!==null){t.blockedOn=e,Yd(t.priority,function(){ym(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function eo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=rr(t.nativeEvent);if(l===null){l=t.nativeEvent;var n=new l.constructor(l.type,l);mc=n,l.target.dispatchEvent(n),mc=null}else return e=Ja(l),e!==null&&gp(e),t.blockedOn=l,!1;e.shift()}return!0}function gm(t,e,l){eo(t)&&l.delete(e)}function Tb(){fr=!1,pn!==null&&eo(pn)&&(pn=null),gn!==null&&eo(gn)&&(gn=null),vn!==null&&eo(vn)&&(vn=null),Vu.forEach(gm),Zu.forEach(gm)}function Di(t,e){t.blockedOn===e&&(t.blockedOn=null,fr||(fr=!0,Mt.unstable_scheduleCallback(Mt.unstable_NormalPriority,Tb)))}var qi=null;function vm(t){qi!==t&&(qi=t,Mt.unstable_scheduleCallback(Mt.unstable_NormalPriority,function(){qi===t&&(qi=null);for(var e=0;e<t.length;e+=3){var l=t[e],n=t[e+1],a=t[e+2];if(typeof n!="function"){if(ff(n||l)===null)continue;break}var u=Ja(l);u!==null&&(t.splice(e,3),e-=3,Rc(u,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function Ia(t){function e(s){return Di(s,t)}pn!==null&&Di(pn,t),gn!==null&&Di(gn,t),vn!==null&&Di(vn,t),Vu.forEach(e),Zu.forEach(e);for(var l=0;l<en.length;l++){var n=en[l];n.blockedOn===t&&(n.blockedOn=null)}for(;0<en.length&&(l=en[0],l.blockedOn===null);)bp(l),l.blockedOn===null&&en.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],u=l[n+1],i=a[se]||null;if(typeof u=="function")i||vm(l);else if(i){var o=null;if(u&&u.hasAttribute("formAction")){if(a=u,i=u[se]||null)o=i.formAction;else if(ff(a)!==null)continue}else o=i.action;typeof o=="function"?l[n+1]=o:(l.splice(n,3),n-=3),vm(l)}}}function Sp(){function t(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(i){return a=i})},focusReset:"manual",scroll:"manual"})}function e(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),a!==null&&(a(),a=null)}}}function df(t){this._internalRoot=t}$o.prototype.render=df.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(E(409));var l=e.current,n=Ee();pp(l,n,t,e,null,null)};$o.prototype.unmount=df.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;pp(t.current,2,null,t,null,null),Io(),e[Ka]=null}};function $o(t){this._internalRoot=t}$o.prototype.unstable_scheduleHydration=function(t){if(t){var e=Hm();t={blockedOn:null,target:t,priority:e};for(var l=0;l<en.length&&e!==0&&e<en[l].priority;l++);en.splice(l,0,t),l===0&&bp(t)}};var bm=Sm.version;if(bm!=="19.3.0")throw Error(E(527,bm,"19.3.0"));F.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(E(188)):(t=Object.keys(t).join(","),Error(E(268,t)));return t=Ag(e),t=t!==null?Cm(t):null,t=t===null?null:t.stateNode,t};var Ab={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(du=__REACT_DEVTOOLS_GLOBAL_HOOK__,!du.isDisabled&&du.supportsFiber))try{Ku=du.inject(Ab),be=du}catch{}var du;Fo.createRoot=function(t,e){if(!Em(t))throw Error(E(299));var l=!1,n="",a=ty,u=ey,i=ly;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onUncaughtError!==void 0&&(a=e.onUncaughtError),e.onCaughtError!==void 0&&(u=e.onCaughtError),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=mp(t,1,!1,null,null,l,n,null,a,u,i,Sp),t[Ka]=e.current,lf(t),new df(e)};Fo.hydrateRoot=function(t,e,l){if(!Em(t))throw Error(E(299));var n=!1,a="",u=ty,i=ey,o=ly,s=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(i=l.onCaughtError),l.onRecoverableError!==void 0&&(o=l.onRecoverableError),l.formState!==void 0&&(s=l.formState)),e=mp(t,1,!0,e,l??null,n,a,s,u,i,o,Sp),e.context=yp(null),l=e.current,n=Ee(),n=yr(n),a=fn(n),a.callback=null,dn(l,a,n),l=n,e.current.lanes=l,$u(e,l),hl(e),t[Ka]=e.current,lf(t),new $o(e)};Fo.version="19.3.0"});var Cp=Ke((PS,Ap)=>{"use strict";function Tp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Tp)}catch(t){console.error(t)}}Tp(),Ap.exports=Ep()});var T=class extends Error{constructor(e,l,n,a,u){super(l);I(this,"reason");I(this,"explanation");I(this,"status");I(this,"details");I(this,"requestId");this.reason=e,this.explanation=l,this.status=n,this.details=a,this.requestId=u,this.name="FonderieApiError"}};function Ef(t){let e=globalThis.crypto,l=new Uint8Array(t);if(e?.getRandomValues)e.getRandomValues(l);else for(let a=0;a<t;a++)l[a]=Math.floor(Math.random()*256);let n="";for(let a of l)n+=a.toString(16).padStart(2,"0");return n}var ea=class{constructor(t,e={}){I(this,"baseUrl");I(this,"cache");I(this,"defaultTtlMs");I(this,"refresh");this.baseUrl=t,this.cache=e.cache,this.defaultTtlMs=e.defaultTtlMs??6e4,this.refresh=e.refresh}absolute(t){return`${this.baseUrl}${t}`}clearCache(){this.cache?.clear()}async request(t){let e=t.method.toUpperCase(),l=this.cache;if(l&&e==="GET"&&t.cache!==!1){let a=`GET ${t.path}::ws=${t.workspaceId??""}`;if(!t.bust){let i=l.get(a);if(i!==void 0)return i}let u=typeof t.cache=="number"?t.cache:this.defaultTtlMs;return l.dedupe(a,async()=>{let i=await this.exec(t);return l.set(a,i,u),i})}let n=await this.exec(t);if(l&&e!=="GET"){let a=t.path.split("?")[0]?.split("/").filter(Boolean)[0];a&&l.invalidate(`/${a}`);for(let u of t.invalidate??[])l.invalidate(u)}return n}async exec(t,e=!1){let l=Ef(16),n=l,a={"Content-Type":"application/json",traceparent:`00-${l}-${Ef(8)}-01`,"X-Request-ID":n};t.token&&(a.Authorization=`Bearer ${t.token}`),t.cookie&&(a.Cookie=t.cookie),t.workspaceId&&(a["X-Workspace-ID"]=t.workspaceId),Object.assign(a,t.headers??{});let u={method:t.method,headers:a,credentials:"include"};t.body!==void 0&&(u.body=JSON.stringify(t.body));let i=await fetch(`${this.baseUrl}${t.path}`,u),o=i.headers.get("x-request-id")??n;if(i.status===401&&this.refresh&&!e&&!t.path.startsWith("/auth/")){let r=await this.refresh();if(r)return this.exec({...t,token:r},!0)}if(i.status===204){if(!i.ok)throw new T("unknown",i.statusText,i.status,void 0,o);return}let s=await i.json();if(!i.ok||i.status===202){let r=s;throw new T(r.reason,r.explanation,i.status,r.details,o)}return s}};var la=t=>t.replace(/\/+$/,"");function re(t){return t?`?environment=${encodeURIComponent(t)}`:""}var ts=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=t.prefix?la(t.prefix):void 0,this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}rebase(t){return this.prefix?{...t,path:t.path.replace(/^\/admin(?=\/|\?|$)/,this.prefix)}:t}listConfig(t){return this.http.request(this.rebase({method:"GET",path:`/admin/config${re(t)}`,token:this.adminToken}))}getConfig(t,e){return this.http.request(this.rebase({method:"GET",path:`/admin/config/${encodeURIComponent(t)}${re(e)}`,token:this.adminToken}))}setConfig(t,e,l){return this.http.request(this.rebase({method:"PUT",path:`/admin/config/${encodeURIComponent(t)}${re(l)}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}deleteConfig(t,e){return this.http.request(this.rebase({method:"DELETE",path:`/admin/config/${encodeURIComponent(t)}${re(e)}`,token:this.adminToken,headers:this.actorHeaders}))}listConfigRevisions(t,e){return this.http.request(this.rebase({method:"GET",path:`/admin/config/${encodeURIComponent(t)}/revisions${re(e)}`,token:this.adminToken}))}rollbackConfig(t,e,l){return this.http.request(this.rebase({method:"POST",path:`/admin/config/${encodeURIComponent(t)}/rollback${re(l)}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}listSecrets(t){return this.http.request(this.rebase({method:"GET",path:`/admin/secrets${re(t)}`,token:this.adminToken}))}getSecret(t,e){return this.http.request(this.rebase({method:"GET",path:`/admin/secrets/${encodeURIComponent(t)}${re(e)}`,token:this.adminToken}))}setSecret(t,e,l){return this.http.request(this.rebase({method:"PUT",path:`/admin/secrets/${encodeURIComponent(t)}${re(l)}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}deleteSecret(t,e){return this.http.request(this.rebase({method:"DELETE",path:`/admin/secrets/${encodeURIComponent(t)}${re(e)}`,token:this.adminToken,headers:this.actorHeaders}))}listSecretRevisions(t,e){return this.http.request(this.rebase({method:"GET",path:`/admin/secrets/${encodeURIComponent(t)}/revisions${re(e)}`,token:this.adminToken}))}rollbackSecret(t,e,l){return this.http.request(this.rebase({method:"POST",path:`/admin/secrets/${encodeURIComponent(t)}/rollback${re(l)}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}revealSecret(t,e){return this.http.request(this.rebase({method:"POST",path:`/admin/secrets/${encodeURIComponent(t)}/reveal${re(e)}`,token:this.adminToken,headers:this.actorHeaders}))}},ui=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=la(t.prefix??"/_admin"),this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}get(t){return this.call("GET",t)}call(t,e,l){return this.http.request({method:t,path:`${this.prefix}${e}`,token:this.adminToken,headers:this.actorHeaders,...l!==void 0?{body:l}:{}})}attention(){return this.get("")}manifest(){return this.get("/manifest")}doctor(){return this.get("/doctor")}environment(){return this.get("/environment")}routes(){return this.get("/routes")}tokens(){return this.get("/access/tokens")}adminLog(t={}){let e=new URLSearchParams;t.limit&&e.set("limit",String(t.limit)),t.before&&e.set("before",t.before);let l=e.toString();return this.get(`/activity/admin-log${l?`?${l}`:""}`)}issueToken(t){return this.call("POST","/access/tokens",t)}revokeToken(t){return this.call("DELETE",`/access/tokens/${encodeURIComponent(t)}`)}migrations(){return this.get("/migrations")}applyMigrations(t,e){return this.call("POST",`/migrations/${encodeURIComponent(t)}/apply`,{expect:e})}},es=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=la(t.prefix??"/_admin"),this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}call(t,e){return this.http.request({method:t,path:`${this.prefix}/users${e}`,token:this.adminToken,headers:this.actorHeaders})}listUsers(t={}){let e=new URLSearchParams;t.limit&&e.set("limit",String(t.limit)),t.cursor&&e.set("cursor",t.cursor);let l=e.toString();return this.call("GET",l?`?${l}`:"")}findUser(t){return this.call("GET",`?email=${encodeURIComponent(t)}`)}getUser(t){return this.call("GET",`/${encodeURIComponent(t)}`)}listUserSessions(t){return this.call("GET",`/${encodeURIComponent(t)}/sessions`)}revokeUserSessions(t){return this.call("DELETE",`/${encodeURIComponent(t)}/sessions`)}userLoginHistory(t,e={}){let l=new URLSearchParams;e.limit&&l.set("limit",String(e.limit)),e.cursor&&l.set("cursor",e.cursor);let n=l.toString();return this.call("GET",`/${encodeURIComponent(t)}/login-history${n?`?${n}`:""}`)}suspendUser(t){return this.call("POST",`/${encodeURIComponent(t)}/suspend`)}unsuspendUser(t){return this.call("POST",`/${encodeURIComponent(t)}/unsuspend`)}},ls=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=la(t.prefix??"/_admin"),this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}call(t,e,l){return this.http.request({method:t,path:`${this.prefix}${e}`,token:this.adminToken,headers:this.actorHeaders,...l!==void 0?{body:l}:{}})}sub(t,e){return`/${t}/${encodeURIComponent(e)}`}catalog(){return this.call("GET","/catalog")}createPlan(t){return this.call("POST","/plans",t)}updatePlan(t,e){return this.call("PUT",`/plans/${encodeURIComponent(t)}`,e)}deletePlan(t){return this.call("DELETE",`/plans/${encodeURIComponent(t)}`)}listSubscriptions(t={}){let e=new URLSearchParams;t.limit&&e.set("limit",String(t.limit)),t.cursor&&e.set("cursor",t.cursor);let l=e.toString();return this.call("GET",`/subscriptions${l?`?${l}`:""}`)}subscription(t,e){return this.call("GET",`/subscriptions${this.sub(t,e)}`)}wallet(t,e,l){let n=l?`?currency=${encodeURIComponent(l)}`:"";return this.call("GET",`/wallet${this.sub(t,e)}${n}`)}walletLedger(t,e,l={}){let n=new URLSearchParams;l.currency&&n.set("currency",l.currency),l.limit&&n.set("limit",String(l.limit)),l.cursor&&n.set("cursor",l.cursor);let a=n.toString();return this.call("GET",`/wallet${this.sub(t,e)}/ledger${a?`?${a}`:""}`)}grant(t){return this.call("POST","/wallet/grant",t)}},Tf=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=la(t.prefix??"/_admin"),this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}listAudit(t={}){let e=new URLSearchParams;t.workspaceId&&e.set("workspaceId",t.workspaceId),t.type&&e.set("type",t.type),t.actorId&&e.set("actorId",t.actorId),t.from&&e.set("from",t.from.toISOString()),t.to&&e.set("to",t.to.toISOString()),t.limit&&e.set("limit",String(t.limit)),t.cursor&&e.set("cursor",t.cursor);let l=e.toString();return this.http.request({method:"GET",path:`${this.prefix}/audit${l?`?${l}`:""}`,token:this.adminToken,headers:this.actorHeaders})}},ns=class{constructor(t){I(this,"http");I(this,"adminToken");I(this,"prefix");I(this,"actorHeaders");this.http=new ea(t.baseUrl),this.adminToken=t.adminToken,this.prefix=t.prefix?la(t.prefix):void 0,this.actorHeaders=t.actor?{"X-Actor":t.actor}:void 0}rebase(t){return this.prefix?{...t,path:t.path.replace(/^\/admin(?=\/|\?|$)/,this.prefix)}:t}listTemplates(){return this.http.request(this.rebase({method:"GET",path:"/admin/templates",token:this.adminToken}))}getTemplate(t,e){let l=e?`?locale=${encodeURIComponent(e)}`:"";return this.http.request(this.rebase({method:"GET",path:`/admin/templates/${encodeURIComponent(t)}${l}`,token:this.adminToken}))}setTemplate(t,e,l){let n=l?`?locale=${encodeURIComponent(l)}`:"";return this.http.request(this.rebase({method:"PUT",path:`/admin/templates/${encodeURIComponent(t)}${n}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}deleteTemplate(t,e){let l=e?`?locale=${encodeURIComponent(e)}`:"";return this.http.request(this.rebase({method:"DELETE",path:`/admin/templates/${encodeURIComponent(t)}${l}`,token:this.adminToken,headers:this.actorHeaders}))}listRevisions(t,e){let l=e?`?locale=${encodeURIComponent(e)}`:"";return this.http.request(this.rebase({method:"GET",path:`/admin/templates/${encodeURIComponent(t)}/revisions${l}`,token:this.adminToken}))}rollback(t,e,l){let n=l?`?locale=${encodeURIComponent(l)}`:"";return this.http.request(this.rebase({method:"POST",path:`/admin/templates/${encodeURIComponent(t)}/rollback${n}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}previewTemplate(t,e,l){let n=l?`?locale=${encodeURIComponent(l)}`:"";return this.http.request(this.rebase({method:"POST",path:`/admin/templates/${encodeURIComponent(t)}/preview${n}`,body:e,token:this.adminToken,headers:this.actorHeaders}))}};var Je=R(L(),1);var Bl=R(L(),1);var yl=R(L(),1);var eu=R(L(),1);var Gl=R(L(),1);var pl=R(L(),1);var $e=R(L(),1);function oi(t,e){let[l,n]=(0,Je.useState)([]),[a,u]=(0,Je.useState)(!0),[i,o]=(0,Je.useState)(null),s=(0,Je.useCallback)(async()=>{u(!0),o(null);try{let{result:y}=await t.listConfig(e);if(!Array.isArray(y))throw new T("UNEXPECTED_SHAPE","Config list returned an unexpected shape \u2014 is @fonderie/config mounted at this prefix?",200);n(y)}catch(y){let f=y instanceof T?y:new T("unknown",String(y),0);o(f)}finally{u(!1)}},[t,e]),r=(0,Je.useCallback)(async(y,f)=>{o(null);try{let{result:m}=await t.setConfig(y,f,e);return await s(),m}catch(m){let b=m instanceof T?m:new T("unknown",String(m),0);throw o(b),b}},[t,e,s]),d=(0,Je.useCallback)(async y=>{o(null);try{await t.deleteConfig(y,e),await s()}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw o(m),m}},[t,e,s]);return(0,Je.useEffect)(()=>{s()},[s]),{entries:l,isLoading:a,error:i,refresh:s,saveEntry:r,removeEntry:d}}function Hf(t,e,l){let[n,a]=(0,Bl.useState)(null),[u,i]=(0,Bl.useState)(!0),[o,s]=(0,Bl.useState)(null),r=(0,Bl.useCallback)(async()=>{if(!e){i(!1);return}i(!0),s(null);try{let{result:d}=await t.getConfig(e,l);a(d)}catch(d){let y=d instanceof T?d:new T("unknown",String(d),0);s(y)}finally{i(!1)}},[t,e,l]);return(0,Bl.useEffect)(()=>{r()},[r]),{entry:n,isLoading:u,error:o,refresh:r}}function Lf(t,e,l){let[n,a]=(0,yl.useState)([]),[u,i]=(0,yl.useState)(!0),[o,s]=(0,yl.useState)(null),r=(0,yl.useCallback)(async()=>{if(!e){i(!1);return}i(!0),s(null);try{let{result:y}=await t.listConfigRevisions(e,l);a(y)}catch(y){let f=y instanceof T?y:new T("unknown",String(y),0);s(f)}finally{i(!1)}},[t,e,l]),d=(0,yl.useCallback)(async y=>{s(null);try{let{result:f}=await t.rollbackConfig(e,{toVersion:y},l);return await r(),f}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw s(m),m}},[t,e,l,r]);return(0,yl.useEffect)(()=>{r()},[r]),{revisions:n,isLoading:u,error:o,refresh:r,rollback:d}}function si(t){let[e,l]=(0,eu.useState)(!1),[n,a]=(0,eu.useState)(null);return{revealSecret:(0,eu.useCallback)(async(i,o)=>{l(!0),a(null);try{let{result:s}=await t.revealSecret(i,o);return s.value}catch(s){let r=s instanceof T?s:new T("unknown",String(s),0);throw a(r),r}finally{l(!1)}},[t]),isLoading:e,error:n}}function Bf(t,e,l){let[n,a]=(0,Gl.useState)(null),[u,i]=(0,Gl.useState)(!0),[o,s]=(0,Gl.useState)(null),r=(0,Gl.useCallback)(async()=>{if(!e){i(!1);return}i(!0),s(null);try{let{result:d}=await t.getSecret(e,l);a(d)}catch(d){let y=d instanceof T?d:new T("unknown",String(d),0);s(y)}finally{i(!1)}},[t,e,l]);return(0,Gl.useEffect)(()=>{r()},[r]),{secret:n,isLoading:u,error:o,refresh:r}}function Gf(t,e,l){let[n,a]=(0,pl.useState)([]),[u,i]=(0,pl.useState)(!0),[o,s]=(0,pl.useState)(null),r=(0,pl.useCallback)(async()=>{if(!e){i(!1);return}i(!0),s(null);try{let{result:y}=await t.listSecretRevisions(e,l);a(y)}catch(y){let f=y instanceof T?y:new T("unknown",String(y),0);s(f)}finally{i(!1)}},[t,e,l]),d=(0,pl.useCallback)(async y=>{s(null);try{let{result:f}=await t.rollbackSecret(e,{toVersion:y},l);return await r(),f}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw s(m),m}},[t,e,l,r]);return(0,pl.useEffect)(()=>{r()},[r]),{revisions:n,isLoading:u,error:o,refresh:r,rollback:d}}function ci(t,e){let[l,n]=(0,$e.useState)([]),[a,u]=(0,$e.useState)(!0),[i,o]=(0,$e.useState)(null),s=(0,$e.useCallback)(async()=>{u(!0),o(null);try{let{result:y}=await t.listSecrets(e);if(!Array.isArray(y))throw new T("UNEXPECTED_SHAPE","Secret list returned an unexpected shape \u2014 is @fonderie/config mounted at this prefix?",200);n(y)}catch(y){let f=y instanceof T?y:new T("unknown",String(y),0);o(f)}finally{u(!1)}},[t,e]),r=(0,$e.useCallback)(async(y,f)=>{o(null);try{let{result:m}=await t.setSecret(y,f,e);return await s(),m}catch(m){let b=m instanceof T?m:new T("unknown",String(m),0);throw o(b),b}},[t,e,s]),d=(0,$e.useCallback)(async y=>{o(null);try{await t.deleteSecret(y,e),await s()}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw o(m),m}},[t,e,s]);return(0,$e.useEffect)(()=>{s()},[s]),{secrets:l,isLoading:a,error:i,refresh:s,saveSecret:r,removeSecret:d}}var gl=R(L(),1),mt=R(At(),1);var Vf=R(L(),1),St=R(At(),1);function Qf({client:t,kind:e,configKey:l,environment:n,onSaved:a}){let u=e==="secret",i=Hf(t,u?"":l,n),o=Bf(t,u?l:"",n),s=oi(t,n),r=ci(t,n),d=Lf(t,u?"":l,n),y=Gf(t,u?l:"",n),{revealSecret:f,isLoading:m}=si(t),b=u?o:i,v=u?y:d,[A,p]=(0,gl.useState)(""),[h,g]=(0,gl.useState)(""),[S,w]=(0,gl.useState)(null),[U,O]=(0,gl.useState)(!1),[C,_]=(0,gl.useState)(null);(0,gl.useEffect)(()=>{u||i.entry&&(p(JSON.stringify(i.entry.value,null,2)),g(i.entry.description??""))},[u,i.entry]),(0,gl.useEffect)(()=>{u&&o.secret&&g(o.secret.description??"")},[u,o.secret]);let H=async Qt=>{Qt.preventDefault(),O(!0),_(null);try{if(u){let De={value:A};h&&(De.description=h),await r.saveSecret(l,De)}else{let De={value:JSON.parse(A)};h&&(De.description=h),await s.saveEntry(l,De)}await b.refresh(),a?.()}catch(De){De instanceof T&&_(De)}finally{O(!1)}},te=async()=>{try{w(await f(l,n))}catch{}};return b.isLoading?(0,mt.jsx)("p",{style:Ct.status,children:"Loading\u2026"}):b.error?(0,mt.jsx)("p",{style:Ct.error,role:"alert",children:b.error.explanation}):(0,mt.jsxs)("div",{style:Ct.container,children:[(0,mt.jsx)("h1",{style:Ct.title,children:l}),(0,mt.jsxs)("p",{style:Ct.meta,children:[n??"all"," \xB7 v",u?o.secret?.version:i.entry?.version]}),u&&(0,mt.jsxs)("div",{style:Ct.revealBox,children:[(0,mt.jsx)("span",{style:Ct.revealedValue,children:S??"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"}),(0,mt.jsx)("button",{type:"button",disabled:m,onClick:te,style:Ct.smallButton,children:"Reveal"})]}),(0,mt.jsxs)("form",{style:Ct.form,onSubmit:H,children:[(0,mt.jsx)("label",{style:Ct.label,htmlFor:"config-value",children:u?"New value":"Value (JSON)"}),(0,mt.jsx)("textarea",{id:"config-value",style:Ct.textarea,value:A,onChange:Qt=>p(Qt.target.value),rows:u?2:8,required:!0}),(0,mt.jsx)("label",{style:Ct.label,htmlFor:"config-description",children:"Description"}),(0,mt.jsx)("input",{id:"config-description",style:Ct.input,value:h,onChange:Qt=>g(Qt.target.value)}),C&&(0,mt.jsx)("p",{style:Ct.error,role:"alert",children:C.explanation}),(0,mt.jsx)("button",{type:"submit",disabled:U,style:Ct.button,children:U?"Saving\u2026":"Save"})]}),v.revisions.length>0&&(0,mt.jsxs)("div",{style:Ct.revisions,children:[(0,mt.jsx)("h2",{style:Ct.subtitle,children:"History"}),(0,mt.jsx)("ul",{style:Ct.list,children:v.revisions.map(Qt=>(0,mt.jsxs)("li",{style:Ct.row,children:[(0,mt.jsxs)("span",{children:["v",Qt.version," \u2014 ",Qt.actor??"unknown"," \u2014"," ",new Date(Qt.createdAt).toLocaleString()]}),(0,mt.jsx)("button",{type:"button",onClick:()=>v.rollback(Qt.version),style:Ct.smallButton,children:"Roll back"})]},Qt.version))})]})]})}var Ct={container:{padding:24,maxWidth:640},title:{fontSize:24,fontWeight:700},meta:{fontSize:13,color:"var(--fonderie-text-muted,#5c5c5c)",marginBottom:16},status:{padding:24,textAlign:"center",color:"var(--fonderie-text-muted,#5c5c5c)"},error:{color:"var(--fonderie-danger,#e00)",marginBottom:12,fontSize:14},revealBox:{display:"flex",alignItems:"center",gap:12,marginBottom:16},revealedValue:{fontFamily:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)',fontSize:13,color:"var(--fonderie-text,#171717)"},form:{display:"flex",flexDirection:"column",gap:4},label:{fontSize:13,fontWeight:600,marginTop:12},input:{border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:10,fontSize:14},textarea:{border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:10,fontSize:14,fontFamily:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)'},button:{marginTop:16,backgroundColor:"var(--fonderie-text,#171717)",color:"var(--fonderie-surface,#fff)",padding:"10px 20px",borderRadius:8,border:"none",fontSize:14,fontWeight:600,cursor:"pointer",alignSelf:"flex-start"},smallButton:{background:"none",border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:"4px 10px",fontSize:12,cursor:"pointer"},revisions:{marginTop:32},subtitle:{fontSize:16,fontWeight:600,marginBottom:8},list:{listStyle:"none",padding:0,margin:0},row:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid var(--fonderie-border-light,#f5f5f5)",fontSize:13}};function Zf({client:t,environment:e,onSelectConfig:l,onSelectSecret:n}){let{entries:a,isLoading:u,error:i}=oi(t,e),{secrets:o,isLoading:s,error:r}=ci(t,e),{revealSecret:d,isLoading:y}=si(t),[f,m]=(0,Vf.useState)({}),b=async v=>{try{let A=await d(v,e);m(p=>({...p,[v]:A}))}catch{}};return(0,St.jsxs)("div",{style:Ut.container,children:[(0,St.jsx)("h1",{style:Ut.title,children:"Config"}),u?(0,St.jsx)("p",{style:Ut.status,children:"Loading\u2026"}):i?(0,St.jsx)("p",{style:Ut.error,role:"alert",children:i.explanation}):(0,St.jsx)("ul",{style:Ut.list,children:a.map(v=>(0,St.jsx)("li",{style:Ut.row,children:(0,St.jsxs)("button",{type:"button",onClick:()=>l?.(v.key),style:Ut.rowButton,children:[(0,St.jsx)("span",{style:Ut.key,children:v.key}),(0,St.jsx)("span",{style:Ut.env,children:v.environment})]})},`${v.key}:${v.environment}`))}),(0,St.jsx)("h1",{style:Ut.title,children:"Secrets"}),s?(0,St.jsx)("p",{style:Ut.status,children:"Loading\u2026"}):r?(0,St.jsx)("p",{style:Ut.error,role:"alert",children:r.explanation}):(0,St.jsx)("ul",{style:Ut.list,children:o.map(v=>(0,St.jsxs)("li",{style:Ut.row,children:[(0,St.jsxs)("button",{type:"button",onClick:()=>n?.(v.key),style:Ut.rowButton,children:[(0,St.jsx)("span",{style:Ut.key,children:v.key}),(0,St.jsx)("span",{style:Ut.env,children:v.environment})]}),(0,St.jsx)("span",{style:Ut.revealed,children:f[v.key]??"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"}),(0,St.jsx)("button",{type:"button",disabled:y,onClick:()=>b(v.key),style:Ut.revealButton,children:"Reveal"})]},`${v.key}:${v.environment}`))})]})}var Ut={container:{padding:24,maxWidth:640},title:{fontSize:20,fontWeight:700,marginTop:24,marginBottom:12},status:{padding:12,color:"var(--fonderie-text-muted,#5c5c5c)"},error:{color:"var(--fonderie-danger,#e00)",marginBottom:12,fontSize:14},list:{listStyle:"none",padding:0,margin:0},row:{display:"flex",alignItems:"center",gap:12,borderBottom:"1px solid var(--fonderie-border-light,#f5f5f5)",padding:"10px 0"},rowButton:{flex:1,display:"flex",justifyContent:"space-between",background:"none",border:"none",cursor:"pointer",textAlign:"left",padding:0},key:{fontSize:14,fontWeight:600},env:{fontSize:13,color:"var(--fonderie-text-muted,#5c5c5c)"},revealed:{fontSize:13,fontFamily:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)',color:"var(--fonderie-text,#171717)",minWidth:100},revealButton:{background:"none",border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:"4px 10px",fontSize:12,cursor:"pointer"}};var jl=R(L(),1);var vl=R(L(),1);var Fe=R(L(),1);var On=R(L(),1);function If(t,e,l){let[n,a]=(0,jl.useState)(null),[u,i]=(0,jl.useState)(!0),[o,s]=(0,jl.useState)(null),r=(0,jl.useCallback)(async()=>{i(!0),s(null);try{let{result:d}=await t.getTemplate(e,l);a(d)}catch(d){let y=d instanceof T?d:new T("unknown",String(d),0);s(y)}finally{i(!1)}},[t,e,l]);return(0,jl.useEffect)(()=>{r()},[r]),{template:n,isLoading:u,error:o,refresh:r}}function Kf(t,e,l){let[n,a]=(0,vl.useState)([]),[u,i]=(0,vl.useState)(!0),[o,s]=(0,vl.useState)(null),r=(0,vl.useCallback)(async()=>{i(!0),s(null);try{let{result:y}=await t.listRevisions(e,l);a(y)}catch(y){let f=y instanceof T?y:new T("unknown",String(y),0);s(f)}finally{i(!1)}},[t,e,l]),d=(0,vl.useCallback)(async y=>{s(null);try{let{result:f}=await t.rollback(e,{toVersion:y},l);return await r(),f}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw s(m),m}},[t,e,l,r]);return(0,vl.useEffect)(()=>{r()},[r]),{revisions:n,isLoading:u,error:o,refresh:r,rollback:d}}function fi(t){let[e,l]=(0,Fe.useState)([]),[n,a]=(0,Fe.useState)(!0),[u,i]=(0,Fe.useState)(null),o=(0,Fe.useCallback)(async()=>{a(!0),i(null);try{let{result:d}=await t.listTemplates();l(d)}catch(d){let y=d instanceof T?d:new T("unknown",String(d),0);i(y)}finally{a(!1)}},[t]),s=(0,Fe.useCallback)(async(d,y,f)=>{i(null);try{let{result:m}=await t.setTemplate(d,y,f);return await o(),m}catch(m){let b=m instanceof T?m:new T("unknown",String(m),0);throw i(b),b}},[t,o]),r=(0,Fe.useCallback)(async(d,y)=>{i(null);try{await t.deleteTemplate(d,y),await o()}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw i(m),m}},[t,o]);return(0,Fe.useEffect)(()=>{o()},[o]),{templates:e,isLoading:n,error:u,refresh:o,saveTemplate:s,removeTemplate:r}}function Jf(t){let[e,l]=(0,On.useState)(null),[n,a]=(0,On.useState)(!1),[u,i]=(0,On.useState)(null),o=(0,On.useCallback)(async(r,d,y)=>{a(!0),i(null);try{let{result:f}=await t.previewTemplate(r,d,y);return l(f),f}catch(f){let m=f instanceof T?f:new T("unknown",String(f),0);throw i(m),m}finally{a(!1)}},[t]),s=(0,On.useCallback)(()=>l(null),[]);return{preview:e,isPreviewing:n,error:u,renderPreview:o,clearPreview:s}}var ee=R(L(),1),G=R(At(),1);var Ce=R(At(),1),tg=new Set(["subject","preheader","brandName"]);function $f({client:t,type:e,locale:l,onSaved:n}){let{template:a,isLoading:u,error:i,refresh:o}=If(t,e,l),{saveTemplate:s}=fi(t),{revisions:r,rollback:d}=Kf(t,e,l),[y,f]=(0,ee.useState)(!1),[m,b]=(0,ee.useState)(null),[v,A]=(0,ee.useState)(""),[p,h]=(0,ee.useState)(""),[g,S]=(0,ee.useState)(""),[w,U]=(0,ee.useState)(!0),{preview:O,isPreviewing:C,error:_,renderPreview:H}=Jf(t),[te,Qt]=(0,ee.useState)("{}"),[De,Wo]=(0,ee.useState)(null);(0,ee.useEffect)(()=>{a&&(A(a.subject??""),h(a.html??""),S(a.text),U(a.active))},[a]);let gf=(0,ee.useCallback)(async()=>{let pt={};try{let ml=JSON.parse(te||"{}");if(!ml||typeof ml!="object"||Array.isArray(ml)){Wo("Sample data must be a JSON object.");return}pt=ml,Wo(null)}catch{Wo("Sample data is not valid JSON.");return}let bf=(await H(e,{text:g,data:pt,...v?{subject:v}:{},...p?{html:p}:{}},l)).variables.filter(ml=>!tg.has(ml)&&!(ml in pt));if(bf.length>0){let ml={...pt,...Object.fromEntries(bf.map(Sf=>[Sf,Sf]))};Qt(JSON.stringify(ml,null,2))}},[H,e,g,v,p,l,te]),vf=a?`${e}:${l??""}`:null;(0,ee.useEffect)(()=>{vf&&gf()},[vf]);let zp=async pt=>{pt.preventDefault(),f(!0),b(null);try{let zn={text:g,active:w};v&&(zn.subject=v),p&&(zn.html=p),a?.version!==void 0&&(zn.ifVersion=a.version),await s(e,zn,l),await o(),n?.()}catch(zn){b(zn)}finally{f(!1)}};return u?(0,G.jsx)("p",{style:K.status,children:"Loading template\u2026"}):i?(0,G.jsx)("p",{style:K.error,role:"alert",children:i.explanation}):(0,G.jsxs)("div",{style:K.container,children:[(0,G.jsx)("h1",{style:K.title,children:e}),(0,G.jsxs)("p",{style:K.meta,children:[l??"base"," \xB7 v",a?.version??1]}),(0,G.jsxs)("div",{style:K.split,children:[(0,G.jsxs)("div",{style:K.column,children:[(0,G.jsxs)("form",{style:K.form,onSubmit:zp,children:[(0,G.jsx)("label",{style:K.label,htmlFor:"template-subject",children:"Subject"}),(0,G.jsx)("input",{id:"template-subject",style:K.input,value:v,onChange:pt=>A(pt.target.value)}),(0,G.jsx)("label",{style:K.label,htmlFor:"template-html",children:"HTML body"}),(0,G.jsx)("textarea",{id:"template-html",style:K.textarea,value:p,onChange:pt=>h(pt.target.value),rows:8}),(0,G.jsx)("label",{style:K.label,htmlFor:"template-text",children:"Plain-text body"}),(0,G.jsx)("textarea",{id:"template-text",style:K.textarea,value:g,onChange:pt=>S(pt.target.value),rows:4,required:!0}),(0,G.jsxs)("label",{style:K.checkboxLabel,children:[(0,G.jsx)("input",{type:"checkbox",checked:w,onChange:pt=>U(pt.target.checked)}),"Active"]}),m&&(0,G.jsx)("p",{style:K.error,role:"alert",children:m.explanation}),(0,G.jsx)("button",{type:"submit",disabled:y,style:K.button,children:y?"Saving\u2026":"Save"})]}),(0,G.jsx)("label",{style:K.label,htmlFor:"template-sample",children:"Sample data"}),(0,G.jsx)("textarea",{id:"template-sample",style:K.textarea,value:te,onChange:pt=>Qt(pt.target.value),rows:6,spellCheck:!1}),De&&(0,G.jsx)("p",{style:K.error,role:"alert",children:De})]}),(0,G.jsxs)("div",{style:K.column,children:[(0,G.jsxs)("div",{style:K.previewHeader,children:[(0,G.jsx)("span",{style:K.label,children:"Preview"}),(0,G.jsx)("button",{type:"button",onClick:()=>{gf()},disabled:C,style:K.rollbackButton,children:C?"Rendering\u2026":"Render"})]}),_&&(0,G.jsx)("p",{style:K.error,role:"alert",children:_.explanation}),O?.subject&&(0,G.jsx)("p",{style:K.previewSubject,children:O.subject}),O?.html?(0,G.jsx)("iframe",{title:"Template preview",style:K.previewFrame,sandbox:"",srcDoc:O.html}):O?(0,G.jsx)("pre",{style:K.previewText,children:O.text}):(0,G.jsx)("p",{style:K.meta,children:"Nothing rendered yet."})]})]}),r.length>0&&(0,G.jsxs)("div",{style:K.revisions,children:[(0,G.jsx)("h2",{style:K.subtitle,children:"History"}),(0,G.jsx)("ul",{style:K.list,children:r.map(pt=>(0,G.jsxs)("li",{style:K.row,children:[(0,G.jsxs)("span",{children:["v",pt.version," \u2014 ",pt.actor??"unknown"," \u2014"," ",new Date(pt.createdAt).toLocaleString()]}),(0,G.jsx)("button",{type:"button",onClick:()=>d(pt.version),style:K.rollbackButton,children:"Roll back"})]},pt.version))})]})]})}var K={container:{padding:24,maxWidth:1180},split:{display:"flex",gap:24,alignItems:"flex-start",flexWrap:"wrap"},column:{flex:"1 1 460px",minWidth:320,display:"flex",flexDirection:"column"},previewHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:12},previewSubject:{fontSize:14,fontWeight:600,margin:"8px 0"},previewFrame:{width:"100%",height:520,border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,background:"var(--fonderie-surface,#fff)"},previewText:{whiteSpace:"pre-wrap",border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:12,fontSize:13,fontFamily:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)'},title:{fontSize:24,fontWeight:700},meta:{fontSize:13,color:"var(--fonderie-text-muted,#5c5c5c)",marginBottom:16},status:{padding:24,textAlign:"center",color:"var(--fonderie-text-muted,#5c5c5c)"},error:{color:"var(--fonderie-danger,#e00)",marginBottom:12,fontSize:14},form:{display:"flex",flexDirection:"column",gap:4},label:{fontSize:13,fontWeight:600,marginTop:12},input:{border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:10,fontSize:14},textarea:{border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:10,fontSize:14,fontFamily:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)'},checkboxLabel:{display:"flex",alignItems:"center",gap:8,marginTop:12,fontSize:14},button:{marginTop:16,backgroundColor:"var(--fonderie-text,#171717)",color:"var(--fonderie-surface,#fff)",padding:"10px 20px",borderRadius:8,border:"none",fontSize:14,fontWeight:600,cursor:"pointer",alignSelf:"flex-start"},revisions:{marginTop:32},subtitle:{fontSize:16,fontWeight:600,marginBottom:8},list:{listStyle:"none",padding:0,margin:0},row:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid var(--fonderie-border-light,#f5f5f5)",fontSize:13},rollbackButton:{background:"none",border:"1px solid var(--fonderie-border,#e0e0e0)",borderRadius:8,padding:"4px 10px",fontSize:12,cursor:"pointer"}};function Ff({client:t,onSelectTemplate:e}){let{templates:l,isLoading:n,error:a}=fi(t);return n?(0,Ce.jsx)("p",{style:qe.status,children:"Loading templates\u2026"}):a?(0,Ce.jsx)("p",{style:qe.error,role:"alert",children:a.explanation}):(0,Ce.jsxs)("div",{style:qe.container,children:[(0,Ce.jsx)("h1",{style:qe.title,children:"Templates"}),(0,Ce.jsx)("ul",{style:qe.list,children:l.map(u=>(0,Ce.jsx)("li",{style:qe.row,children:(0,Ce.jsxs)("button",{type:"button",onClick:()=>e?.(u),style:qe.rowButton,children:[(0,Ce.jsx)("span",{style:qe.type,children:u.type}),(0,Ce.jsx)("span",{style:qe.locale,children:u.locale??"base"}),(0,Ce.jsx)("span",{style:u.active?qe.active:qe.inactive,children:u.active?"Active":"Inactive"})]})},`${u.type}:${u.locale??"base"}`))})]})}var qe={container:{padding:24,maxWidth:640},title:{fontSize:24,fontWeight:700,marginBottom:16},status:{padding:24,textAlign:"center",color:"var(--fonderie-text-muted,#5c5c5c)"},error:{color:"var(--fonderie-danger,#e00)",marginBottom:12,fontSize:14},list:{listStyle:"none",padding:0,margin:0},row:{borderBottom:"1px solid var(--fonderie-border-light,#f5f5f5)"},rowButton:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 0",background:"none",border:"none",cursor:"pointer",textAlign:"left"},type:{fontSize:14,fontWeight:600,flex:1},locale:{fontSize:13,color:"var(--fonderie-text-muted,#5c5c5c)",marginRight:16},active:{fontSize:12,color:"var(--fonderie-accent-strong,#009767)"},inactive:{fontSize:12,color:"var(--fonderie-text-muted,#5c5c5c)"}};var hs=R(L(),1);var Yl=R(L(),1);var Xl=R(L(),1);var Ql=R(L(),1);var Vl=R(L(),1);var Zl=R(L(),1);var bl=R(L(),1);var He=R(L(),1);var We=R(L(),1);var Le=R(L(),1);var Il=R(L(),1);var Be=R(L(),1);var Sl=R(L(),1);var fe=R(L(),1);var Ge=R(L(),1);var je=R(L(),1);var El=R(L(),1);function ed(t){let[e,l]=(0,Yl.useState)(null),[n,a]=(0,Yl.useState)(!0),[u,i]=(0,Yl.useState)(null),o=(0,Yl.useCallback)(async()=>{a(!0),i(null);try{let{result:s}=await t.attention();l(s)}catch(s){i(s instanceof T?s:new T("unknown",String(s),0))}finally{a(!1)}},[t]);return(0,Yl.useEffect)(()=>{o()},[o]),{attention:e,isLoading:n,error:u,refresh:o}}function ld(t){let[e,l]=(0,Xl.useState)(null),[n,a]=(0,Xl.useState)(!0),[u,i]=(0,Xl.useState)(null),o=(0,Xl.useCallback)(async()=>{a(!0),i(null);try{let{result:s}=await t.manifest();l(s)}catch(s){i(s instanceof T?s:new T("unknown",String(s),0))}finally{a(!1)}},[t]);return(0,Xl.useEffect)(()=>{o()},[o]),{manifest:e,isLoading:n,error:u,refresh:o}}function nd(t){let[e,l]=(0,Ql.useState)(null),[n,a]=(0,Ql.useState)(!0),[u,i]=(0,Ql.useState)(null),o=(0,Ql.useCallback)(async()=>{a(!0),i(null);try{let{result:s}=await t.doctor();l(s)}catch(s){i(s instanceof T?s:new T("unknown",String(s),0))}finally{a(!1)}},[t]);return(0,Ql.useEffect)(()=>{o()},[o]),{report:e,isLoading:n,error:u,refresh:o}}function ad(t){let[e,l]=(0,Vl.useState)(null),[n,a]=(0,Vl.useState)(!0),[u,i]=(0,Vl.useState)(null),o=(0,Vl.useCallback)(async()=>{a(!0),i(null);try{let{result:s}=await t.environment();l(s)}catch(s){i(s instanceof T?s:new T("unknown",String(s),0))}finally{a(!1)}},[t]);return(0,Vl.useEffect)(()=>{o()},[o]),{report:e,isLoading:n,error:u,refresh:o}}function ud(t){let[e,l]=(0,Zl.useState)(null),[n,a]=(0,Zl.useState)(!0),[u,i]=(0,Zl.useState)(null),o=(0,Zl.useCallback)(async()=>{a(!0),i(null);try{let{result:s}=await t.routes();l(s)}catch(s){i(s instanceof T?s:new T("unknown",String(s),0))}finally{a(!1)}},[t]);return(0,Zl.useEffect)(()=>{o()},[o]),{report:e,isLoading:n,error:u,refresh:o}}var Wf=t=>t instanceof T?t:new T("unknown",String(t),0);function id(t){let[e,l]=(0,bl.useState)(null),[n,a]=(0,bl.useState)(!0),[u,i]=(0,bl.useState)(null),o=(0,bl.useCallback)(async()=>{a(!0),i(null);try{let{result:r}=await t.tokens();l(r)}catch(r){i(Wf(r))}finally{a(!1)}},[t]),s=(0,bl.useCallback)(async r=>{i(null);try{let{result:d}=await r();return await o(),d}catch(d){let y=Wf(d);throw i(y),y}},[o]);return(0,bl.useEffect)(()=>{o()},[o]),{report:e,isLoading:n,error:u,refresh:o,issue:r=>s(()=>t.issueToken(r)),revoke:async r=>{await s(()=>t.revokeToken(r))}}}function od(t,e={}){let[l,n]=(0,He.useState)([]),[a,u]=(0,He.useState)(null),[i,o]=(0,He.useState)(!0),[s,r]=(0,He.useState)(null),d=e.limit,y=(0,He.useCallback)(async b=>{o(!0),r(null);try{let{result:v}=await t.adminLog({...d?{limit:d}:{},...b?{before:b}:{}});n(A=>b?[...A,...v.entries]:v.entries),u(v.next)}catch(v){r(v instanceof T?v:new T("unknown",String(v),0))}finally{o(!1)}},[t,d]),f=(0,He.useCallback)(()=>y(),[y]),m=(0,He.useCallback)(async()=>{a&&await y(a)},[y,a]);return(0,He.useEffect)(()=>{f()},[f]),{entries:l,hasMore:a!==null,isLoading:i,error:s,refresh:f,loadMore:m}}function sd(t,e){let[l,n]=(0,We.useState)(null),[a,u]=(0,We.useState)(!1),[i,o]=(0,We.useState)(null),{email:s,id:r}=e,d=(0,We.useCallback)(async m=>{u(!0),o(null);try{await m()}catch(b){o(b instanceof T?b:new T("unknown",String(b),0))}finally{u(!1)}},[]),y=(0,We.useCallback)(async()=>{if(!s&&!r){n(null);return}await d(async()=>{let{result:m}=r?await t.getUser(r):await t.findUser(s);n(m)})},[t,s,r,d]),f=(0,We.useCallback)(m=>async()=>{l&&await d(async()=>{let{result:b}=await m(l.id);b&&n(b)})},[l,d]);return(0,We.useEffect)(()=>{y()},[y]),{user:l,isLoading:a,error:i,refresh:y,suspend:f(m=>t.suspendUser(m)),unsuspend:f(m=>t.unsuspendUser(m)),revokeSessions:f(async m=>(await t.revokeUserSessions(m),{result:void 0}))}}function cd(t,e={}){let[l,n]=(0,Le.useState)([]),[a,u]=(0,Le.useState)(null),[i,o]=(0,Le.useState)(!0),[s,r]=(0,Le.useState)(null),d=e.limit,y=(0,Le.useCallback)(async b=>{o(!0),r(null);try{let{result:v}=await t.listUsers({...d?{limit:d}:{},...b?{cursor:b}:{}});n(A=>b?[...A,...v.users]:v.users),u(v.nextCursor)}catch(v){r(v instanceof T?v:new T("unknown",String(v),0))}finally{o(!1)}},[t,d]),f=(0,Le.useCallback)(()=>y(),[y]),m=(0,Le.useCallback)(async()=>{a&&await y(a)},[y,a]);return(0,Le.useEffect)(()=>{f()},[f]),{users:l,hasMore:a!==null,isLoading:i,error:s,refresh:f,loadMore:m}}function rd(t,e){let[l,n]=(0,Il.useState)([]),[a,u]=(0,Il.useState)(!1),[i,o]=(0,Il.useState)(null),s=(0,Il.useCallback)(async()=>{if(!e){n([]);return}u(!0),o(null);try{let{result:r}=await t.listUserSessions(e);n(r)}catch(r){o(r instanceof T?r:new T("unknown",String(r),0))}finally{u(!1)}},[t,e]);return(0,Il.useEffect)(()=>{s()},[s]),{sessions:l,isLoading:a,error:i,refresh:s}}function fd(t,e,l={}){let[n,a]=(0,Be.useState)([]),[u,i]=(0,Be.useState)(null),[o,s]=(0,Be.useState)(!1),[r,d]=(0,Be.useState)(null),y=l.limit,f=(0,Be.useCallback)(async v=>{if(!e){a([]),i(null);return}s(!0),d(null);try{let{result:A}=await t.userLoginHistory(e,{...y?{limit:y}:{},...v?{cursor:v}:{}});a(p=>v?[...p,...A.events]:A.events),i(A.nextCursor)}catch(A){d(A instanceof T?A:new T("unknown",String(A),0))}finally{s(!1)}},[t,e,y]),m=(0,Be.useCallback)(()=>f(),[f]),b=(0,Be.useCallback)(async()=>{u&&await f(u)},[f,u]);return(0,Be.useEffect)(()=>{m()},[m]),{events:n,hasMore:u!==null,isLoading:o,error:r,refresh:m,loadMore:b}}var Pf=t=>t instanceof T?t:new T("unknown",String(t),0);function dd(t){let[e,l]=(0,Sl.useState)(null),[n,a]=(0,Sl.useState)(!0),[u,i]=(0,Sl.useState)(null),o=(0,Sl.useCallback)(async()=>{a(!0),i(null);try{let{result:r}=await t.catalog();l(r)}catch(r){i(Pf(r))}finally{a(!1)}},[t]),s=(0,Sl.useCallback)(async r=>{i(null);try{let{result:d}=await r();return await o(),d}catch(d){let y=Pf(d);throw i(y),y}},[o]);return(0,Sl.useEffect)(()=>{o()},[o]),{catalog:e,isLoading:n,error:u,refresh:o,createPlan:r=>s(()=>t.createPlan(r)),updatePlan:(r,d)=>s(()=>t.updatePlan(r,d)),deletePlan:async r=>{await s(()=>t.deletePlan(r))}}}var fs=t=>t instanceof T?t:new T("unknown",String(t),0),ds=t=>t instanceof T&&t.status===404;function hd(t,e,l={}){let[n,a]=(0,fe.useState)(null),[u,i]=(0,fe.useState)(null),[o,s]=(0,fe.useState)([]),[r,d]=(0,fe.useState)(null),[y,f]=(0,fe.useState)(!1),[m,b]=(0,fe.useState)(null),v=e?.type,A=e?.id,{currency:p,limit:h}=l,g=(0,fe.useCallback)(async()=>{if(!v||!A){a(null),i(null),s([]),d(null);return}f(!0),b(null);try{let[U,O,C]=await Promise.all([t.subscription(v,A).then(_=>_.result,_=>ds(_)?null:Promise.reject(_)),t.wallet(v,A,p).then(_=>_.result,_=>ds(_)?null:Promise.reject(_)),t.walletLedger(v,A,{...p?{currency:p}:{},...h?{limit:h}:{}}).then(_=>_.result,_=>ds(_)?null:Promise.reject(_))]);a(U),i(O),s(C?.entries??[]),d(C?.nextCursor??null)}catch(U){b(fs(U))}finally{f(!1)}},[t,v,A,p,h]),S=(0,fe.useCallback)(async()=>{if(!(!v||!A||!r))try{let{result:U}=await t.walletLedger(v,A,{...p?{currency:p}:{},...h?{limit:h}:{},cursor:r});s(O=>[...O,...U.entries]),d(U.nextCursor)}catch(U){b(fs(U))}},[t,v,A,p,h,r]),w=(0,fe.useCallback)(async U=>{if(!(!v||!A)){b(null);try{await t.grant({...U,subscriberType:v,subscriberId:A}),await g()}catch(O){let C=fs(O);throw b(C),C}}},[t,v,A,g]);return(0,fe.useEffect)(()=>{g()},[g]),{subscription:n,wallet:u,ledger:o,hasMoreLedger:r!==null,isLoading:y,error:m,refresh:g,loadMoreLedger:S,grant:w}}function md(t,e={}){let[l,n]=(0,Ge.useState)([]),[a,u]=(0,Ge.useState)(null),[i,o]=(0,Ge.useState)(!0),[s,r]=(0,Ge.useState)(null),d=e.limit,y=(0,Ge.useCallback)(async b=>{o(!0),r(null);try{let{result:v}=await t.listSubscriptions({...d?{limit:d}:{},...b?{cursor:b}:{}});n(A=>b?[...A,...v.subscriptions]:v.subscriptions),u(v.nextCursor)}catch(v){r(v instanceof T?v:new T("unknown",String(v),0))}finally{o(!1)}},[t,d]),f=(0,Ge.useCallback)(()=>y(),[y]),m=(0,Ge.useCallback)(async()=>{a&&await y(a)},[y,a]);return(0,Ge.useEffect)(()=>{f()},[f]),{subscriptions:l,hasMore:a!==null,isLoading:i,error:s,refresh:f,loadMore:m}}var eg=t=>t instanceof T?t:new T("unknown",String(t),0);function yd(t,e={}){let[l,n]=(0,je.useState)([]),[a,u]=(0,je.useState)(null),[i,o]=(0,je.useState)(!0),[s,r]=(0,je.useState)(null),{workspaceId:d,type:y,actorId:f,from:m,to:b,limit:v}=e,A=m?.getTime(),p=b?.getTime(),h=(0,je.useCallback)(async w=>{o(!0),r(null);try{let{result:U}=await t.listAudit({...d?{workspaceId:d}:{},...y?{type:y}:{},...f?{actorId:f}:{},...A!==void 0?{from:new Date(A)}:{},...p!==void 0?{to:new Date(p)}:{},...v?{limit:v}:{},...w?{cursor:w}:{}});n(O=>w?[...O,...U.events]:U.events),u(U.nextCursor)}catch(U){r(eg(U))}finally{o(!1)}},[t,d,y,f,A,p,v]),g=(0,je.useCallback)(()=>h(),[h]),S=(0,je.useCallback)(async()=>{a&&await h(a)},[h,a]);return(0,je.useEffect)(()=>{g()},[g]),{events:l,hasMore:a!==null,isLoading:i,error:s,refresh:g,loadMore:S}}var td=t=>t instanceof T?t:new T("unknown",String(t),0);function pd(t){let[e,l]=(0,El.useState)(null),[n,a]=(0,El.useState)(!0),[u,i]=(0,El.useState)(null),o=(0,El.useCallback)(async()=>{a(!0),i(null);try{let{result:r}=await t.migrations();l(r)}catch(r){i(td(r))}finally{a(!1)}},[t]),s=(0,El.useCallback)(async(r,d)=>{i(null);try{let{result:y}=await t.applyMigrations(r,d);return await o(),y}catch(y){let f=td(y);throw await o().catch(()=>{}),i(f),f}},[t,o]);return(0,El.useEffect)(()=>{o()},[o]),{report:e,isLoading:n,error:u,refresh:o,apply:s}}var P=R(At(),1);var de=R(At(),1);var gt=R(At(),1);var Vt=R(At(),1);var nt=R(At(),1);var kt=R(At(),1);var Et=R(At(),1);var lu=R(L(),1),N=R(At(),1);var ms=R(L(),1),z=R(At(),1);var Y=R(At(),1);var Un=R(L(),1),k=R(At(),1);var ys=R(L(),1),ut=R(At(),1),j=R(At(),1),V={text:"var(--fonderie-text,#171717)",muted:"var(--fonderie-text-muted,#5c5c5c)",bg:"var(--fonderie-bg,#fafafa)",surface:"var(--fonderie-surface,#fff)",surfaceAlt:"var(--fonderie-surface-alt,#fafafa)",border:"var(--fonderie-border,#e0e0e0)",borderLight:"var(--fonderie-border-light,#f5f5f5)",accent:"var(--fonderie-accent,#00d294)",accentStrong:"var(--fonderie-accent-strong,#009767)",warning:"var(--fonderie-warning,#f5a623)",danger:"var(--fonderie-danger,#e00)",font:'var(--fonderie-font,Inter,"Inter Fallback",-apple-system,BlinkMacSystemFont,"Helvetica Neue",system-ui,sans-serif)',mono:'var(--fonderie-mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace)',radius:"var(--fonderie-radius,4px)",radiusLg:"var(--fonderie-radius-lg,8px)",trackingDisplay:"var(--fonderie-tracking-display,-0.05em)",shadowCard:"var(--fonderie-shadow-card,0 2px 3px 0 rgba(0,0,0,.05))"},c={shell:{display:"flex",minHeight:"100vh",fontFamily:V.font,color:V.text,background:V.bg},nav:{width:220,borderRight:`1px solid ${V.border}`,padding:16,flexShrink:0,background:V.surface},navGroup:{fontSize:11,textTransform:"uppercase",letterSpacing:.6,color:V.muted,margin:"16px 0 6px",fontWeight:600},navItem:{display:"block",width:"100%",textAlign:"left",background:"none",border:"none",borderRadius:V.radius,padding:"6px 8px",cursor:"pointer",fontSize:14,color:V.text,fontFamily:"inherit"},navItemActive:{background:V.surfaceAlt,fontWeight:600,color:V.accentStrong},main:{flex:1,padding:24,maxWidth:960},container:{padding:24,maxWidth:960},title:{fontSize:20,fontWeight:600,marginTop:0,marginBottom:12,letterSpacing:V.trackingDisplay},subtitle:{fontSize:15,fontWeight:600,marginTop:24,marginBottom:8,letterSpacing:V.trackingDisplay},status:{padding:12,color:V.muted},error:{color:V.danger,marginBottom:12,fontSize:14},ok:{color:V.accentStrong,fontWeight:600},bad:{color:V.danger,fontWeight:600},advice:{color:V.warning},muted:{color:V.muted,fontSize:13},mono:{fontFamily:V.mono,fontSize:13},table:{width:"100%",borderCollapse:"collapse",fontSize:14},th:{textAlign:"left",borderBottom:`1px solid ${V.border}`,padding:"6px 8px",fontWeight:600,color:V.muted},td:{borderBottom:`1px solid ${V.borderLight}`,padding:"6px 8px",verticalAlign:"top"},list:{listStyle:"none",padding:0,margin:0},row:{borderBottom:`1px solid ${V.borderLight}`,padding:"8px 0"},badge:{display:"inline-block",borderRadius:999,padding:"1px 8px",fontSize:12,background:V.surfaceAlt,border:`1px solid ${V.border}`,color:V.muted},button:{background:V.surface,border:`1px solid ${V.border}`,borderRadius:V.radius,padding:"4px 10px",cursor:"pointer",fontSize:13,color:V.text,fontFamily:"inherit",boxShadow:V.shadowCard},toolbar:{display:"flex",gap:8,alignItems:"center",marginBottom:12},card:{background:V.surface,border:`1px solid ${V.border}`,borderRadius:V.radiusLg,padding:16,boxShadow:V.shadowCard},accent:{color:V.accent}};function lg({client:t,pageSize:e=50}){let{entries:l,hasMore:n,isLoading:a,error:u,refresh:i,loadMore:o}=od(t,{limit:e});return(0,P.jsxs)("div",{style:c.container,children:[(0,P.jsxs)("div",{style:c.toolbar,children:[(0,P.jsx)("h1",{style:{...c.title,marginBottom:0},children:"Admin log"}),(0,P.jsx)("button",{type:"button",style:c.button,onClick:()=>{i()},disabled:a,children:"Refresh"})]}),u?(0,P.jsx)("p",{style:c.error,role:"alert",children:u.status===404?"The admin log is off \u2014 give AdminModule a store.":u.explanation}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("table",{style:c.table,children:[(0,P.jsx)("thead",{children:(0,P.jsxs)("tr",{children:[(0,P.jsx)("th",{style:c.th,children:"When"}),(0,P.jsx)("th",{style:c.th,children:"Actor"}),(0,P.jsx)("th",{style:c.th,children:"Request"}),(0,P.jsx)("th",{style:c.th,children:"Status"}),(0,P.jsx)("th",{style:c.th,children:"Module"})]})}),(0,P.jsx)("tbody",{children:l.map(s=>(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{style:{...c.td,...c.muted},children:new Date(s.at).toLocaleString()}),(0,P.jsx)("td",{style:c.td,children:s.actor}),(0,P.jsxs)("td",{style:{...c.td,...c.mono},children:[s.method," ",s.path]}),(0,P.jsxs)("td",{style:c.td,children:[(0,P.jsx)("span",{style:s.status>=400?c.bad:c.ok,children:s.status})," ",(0,P.jsxs)("span",{style:c.muted,children:[s.durationMs," ms"]})]}),(0,P.jsx)("td",{style:{...c.td,...c.muted},children:s.module})]},s.id))})]}),a?(0,P.jsx)("p",{style:c.status,children:"Loading\u2026"}):null,n&&!a?(0,P.jsx)("button",{type:"button",style:{...c.button,marginTop:12},onClick:()=>{o()},children:"Load more"}):null]})]})}function ng({client:t}){let{attention:e,isLoading:l,error:n,refresh:a}=ed(t);return(0,de.jsxs)("div",{style:c.container,children:[(0,de.jsxs)("div",{style:c.toolbar,children:[(0,de.jsx)("h1",{style:{...c.title,marginBottom:0},children:"Attention"}),(0,de.jsx)("button",{type:"button",style:c.button,onClick:()=>{a()},disabled:l,children:"Refresh"})]}),l&&!e?(0,de.jsx)("p",{style:c.status,children:"Running the checks\u2026"}):n?(0,de.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):e?.items.length===0?(0,de.jsxs)("p",{style:c.ok,children:["Nothing needs you. Checked ",new Date(e.generatedAt).toLocaleString(),"."]}):(0,de.jsx)("ul",{style:c.list,children:e?.items.map(u=>(0,de.jsxs)("li",{style:c.row,children:[(0,de.jsx)("span",{style:u.severity==="error"?c.bad:c.advice,children:u.severity==="error"?"error":"advice"})," ",(0,de.jsx)("span",{style:c.mono,children:u.source})," \u2014 ",u.message]},`${u.source}:${u.message}`))})]})}function ag({client:t}){let{report:e,isLoading:l,error:n}=ad(t);return(0,gt.jsxs)("div",{style:c.container,children:[(0,gt.jsx)("h1",{style:c.title,children:"Configuration"}),l?(0,gt.jsx)("p",{style:c.status,children:"Loading\u2026"}):n?(0,gt.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):e?(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsx)("h2",{style:c.subtitle,children:"Readiness"}),(0,gt.jsx)("ul",{style:c.list,children:e.modules.map(a=>(0,gt.jsxs)("li",{style:c.row,children:[(0,gt.jsx)("span",{style:c.mono,children:a.name})," ",a.problems.length===0?(0,gt.jsx)("span",{style:c.ok,children:"ok"}):a.problems.map(u=>(0,gt.jsx)("div",{style:u.severity==="error"?c.bad:c.advice,children:u.message},u.message))]},a.name))}),(0,gt.jsx)("h2",{style:c.subtitle,children:"Environment"}),e.env.length===0?(0,gt.jsx)("p",{style:c.muted,children:"No variables declared \u2014 pass `env` to AdminModule."}):(0,gt.jsx)("ul",{style:c.list,children:e.env.map(a=>(0,gt.jsxs)("li",{style:c.row,children:[(0,gt.jsx)("span",{style:c.mono,children:a.name})," ",a.set?(0,gt.jsx)("span",{style:c.ok,children:"set"}):(0,gt.jsx)("span",{style:c.bad,children:"missing"})]},a.name))})]}):null]})}function ug({client:t}){let{report:e,isLoading:l,error:n,refresh:a}=nd(t);return(0,Vt.jsxs)("div",{style:c.container,children:[(0,Vt.jsxs)("div",{style:c.toolbar,children:[(0,Vt.jsx)("h1",{style:{...c.title,marginBottom:0},children:"Doctor"}),(0,Vt.jsx)("button",{type:"button",style:c.button,onClick:()=>{a()},disabled:l,children:"Run again"}),e&&!l?(0,Vt.jsx)("span",{style:e.ok?c.ok:c.bad,children:e.ok?"all checks pass":"a check failed"}):null]}),l&&!e?(0,Vt.jsx)("p",{style:c.status,children:"Running the checks\u2026"}):n?(0,Vt.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):(0,Vt.jsx)("ul",{style:c.list,children:e?.checks.map(u=>(0,Vt.jsxs)("li",{style:c.row,children:[(0,Vt.jsx)("span",{style:u.skipped?c.muted:u.ok?c.ok:c.bad,children:u.skipped?"skipped":u.ok?"ok":"failed"})," ",(0,Vt.jsx)("span",{style:c.mono,children:u.name})," ",(0,Vt.jsxs)("span",{style:c.muted,children:[u.module," \xB7 ",u.durationMs," ms"]}),u.skipped?(0,Vt.jsx)("div",{style:c.muted,children:u.skipped}):null,u.findings.map(i=>(0,Vt.jsx)("div",{style:u.ok?c.advice:c.bad,children:i},i))]},u.name))})]})}function ig({client:t}){let{manifest:e,isLoading:l,error:n}=ld(t);return(0,nt.jsxs)("div",{style:c.container,children:[(0,nt.jsx)("h1",{style:c.title,children:"Modules"}),l?(0,nt.jsx)("p",{style:c.status,children:"Loading\u2026"}):n?(0,nt.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):e?(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsxs)("p",{style:c.muted,children:[e.env," \xB7 admin ",e.admin.version," \xB7 admin log"," ",e.admin.log?"on":"off"," \xB7 ",e.routes.length," routes"]}),(0,nt.jsxs)("table",{style:c.table,children:[(0,nt.jsx)("thead",{children:(0,nt.jsxs)("tr",{children:[(0,nt.jsx)("th",{style:c.th,children:"Module"}),(0,nt.jsx)("th",{style:c.th,children:"Version"}),(0,nt.jsx)("th",{style:c.th,children:"Readiness"}),(0,nt.jsx)("th",{style:c.th,children:"Describes admin"})]})}),(0,nt.jsx)("tbody",{children:e.modules.map(a=>(0,nt.jsxs)("tr",{children:[(0,nt.jsx)("td",{style:{...c.td,...c.mono},children:a.name}),(0,nt.jsx)("td",{style:c.td,children:a.version??(0,nt.jsx)("span",{style:c.muted,children:"not reported"})}),(0,nt.jsxs)("td",{style:c.td,children:[a.readiness.ok?(0,nt.jsx)("span",{style:c.ok,children:"ok"}):(0,nt.jsx)("span",{style:c.bad,children:"error"}),a.readiness.problems.map(u=>(0,nt.jsx)("div",{style:u.severity==="error"?c.bad:c.advice,children:u.message},u.message))]}),(0,nt.jsx)("td",{style:c.td,children:a.describesAdmin?"yes":(0,nt.jsx)("span",{style:c.muted,children:"no"})})]},a.name))})]})]}):null]})}function og({client:t}){let{report:e,isLoading:l,error:n}=ud(t);return(0,kt.jsxs)("div",{style:c.container,children:[(0,kt.jsx)("h1",{style:c.title,children:"Routes"}),l?(0,kt.jsx)("p",{style:c.status,children:"Loading\u2026"}):n?(0,kt.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):(0,kt.jsxs)("table",{style:c.table,children:[(0,kt.jsx)("thead",{children:(0,kt.jsxs)("tr",{children:[(0,kt.jsx)("th",{style:c.th,children:"Method"}),(0,kt.jsx)("th",{style:c.th,children:"Path"}),(0,kt.jsx)("th",{style:c.th,children:"Guard"}),(0,kt.jsx)("th",{style:c.th,children:"Module"})]})}),(0,kt.jsx)("tbody",{children:e?.routes.map(a=>(0,kt.jsxs)("tr",{children:[(0,kt.jsx)("td",{style:{...c.td,...c.mono},children:a.method}),(0,kt.jsx)("td",{style:{...c.td,...c.mono},children:a.path}),(0,kt.jsx)("td",{style:c.td,children:(0,kt.jsx)("span",{style:c.badge,children:a.guard})}),(0,kt.jsx)("td",{style:{...c.td,...c.muted},children:a.module??"application"})]},`${a.method} ${a.path}`))})]})]})}function sg(t,e){return t.pending.length===0?null:t.blockedBy?`Apply "${t.blockedBy}" first \u2014 it runs before this one and is behind.`:e&&t.pending.some(l=>l.impact==="destructive")?"Contains a migration that deletes data. No down-migration brings it back \u2014 apply this one through CI or `npm run migrate`.":null}function cg({client:t}){let{report:e,isLoading:l,error:n,refresh:a,apply:u}=pd(t),i=e?.modules.filter(o=>o.pending.length>0)??[];return(0,Et.jsxs)("div",{style:c.container,children:[(0,Et.jsx)("h1",{style:c.title,children:"Migrations"}),n?(0,Et.jsx)("p",{style:c.error,role:"alert",children:n.status===403?"Applying migrations needs a token with the write scope.":n.explanation}):null,(0,Et.jsxs)("p",{children:[(0,Et.jsx)("button",{type:"button",style:c.button,onClick:()=>{a()},disabled:l,children:l?"Checking\u2026":"Refresh"})," ",e&&!e.everApplied?(0,Et.jsx)("span",{style:c.advice,children:"This database has never been migrated \u2014 treating it as a first install, so nothing is held back."}):null]}),e&&i.length===0?(0,Et.jsx)("p",{style:c.ok,children:"Every module is up to date."}):null,i.map(o=>{let s=sg(o,e?.everApplied??!1),r=o.pending.map(d=>d.file);return(0,Et.jsxs)("section",{style:{marginBottom:24},children:[(0,Et.jsxs)("h2",{style:c.subtitle,children:[o.name," \u2014 ",o.pending.length," pending"]}),(0,Et.jsx)("ul",{children:o.pending.map(d=>(0,Et.jsxs)("li",{children:[(0,Et.jsx)("code",{children:d.file})," ",d.impact==="destructive"?(0,Et.jsx)("span",{style:c.bad,children:"destructive"}):(0,Et.jsx)("span",{style:c.advice,children:"additive"}),d.destructive.length>0?(0,Et.jsx)("ul",{children:d.destructive.map(y=>(0,Et.jsx)("li",{children:(0,Et.jsx)("code",{children:y.slice(0,120)})},y))}):null]},d.file))}),s?(0,Et.jsx)("p",{style:c.advice,children:s}):(0,Et.jsxs)("button",{type:"button",style:c.button,disabled:l||!o.appliable,onClick:()=>{window.confirm(`Apply ${o.pending.length} migration(s) to "${o.name}"? This changes the database schema.`)&&u(o.name,r).catch(()=>{})},children:["Apply ",o.pending.length," migration",o.pending.length===1?"":"s"]})]},o.name)})]})}var rg=["read","write","secrets"];function fg({client:t}){let{report:e,isLoading:l,error:n,issue:a,revoke:u}=id(t),[i,o]=(0,lu.useState)(""),[s,r]=(0,lu.useState)(["read"]),[d,y]=(0,lu.useState)(""),[f,m]=(0,lu.useState)(null),b=v=>r(A=>A.includes(v)?A.filter(p=>p!==v):[...A,v]);return(0,N.jsxs)("div",{style:c.container,children:[(0,N.jsx)("h1",{style:c.title,children:"Access"}),n?(0,N.jsx)("p",{style:c.error,role:"alert",children:n.status===401?"Issuing and revoking need the root token (the one in your deployment config).":n.explanation}):null,(0,N.jsx)("h2",{style:c.subtitle,children:"Root token"}),e?(0,N.jsxs)("p",{children:[e.admin.ok?(0,N.jsx)("span",{style:c.ok,children:"strong"}):(0,N.jsx)("span",{style:c.bad,children:"weak"}),e.admin.problems.map(v=>(0,N.jsx)("div",{style:c.bad,children:v.message},v.message))]}):null,(0,N.jsx)("h2",{style:c.subtitle,children:"Issued tokens"}),e?.issued===null?(0,N.jsx)("p",{style:c.muted,children:"Issuing is off \u2014 give AdminModule a store and run its migrations."}):(0,N.jsxs)(N.Fragment,{children:[f?(0,N.jsxs)("p",{style:c.ok,children:["Copy this now \u2014 it is never shown again."," ",(0,N.jsx)("span",{style:c.mono,children:f.token})," (",f.name,")"]}):null,(0,N.jsxs)("form",{style:c.toolbar,onSubmit:v=>{v.preventDefault();let A=Number(d);a({name:i.trim(),scopes:s,...d&&Number.isInteger(A)&&A>0?{expiresInDays:A}:{}}).then(p=>{m({name:p.name,token:p.token}),o(""),y("")}).catch(()=>{})},children:[(0,N.jsx)("input",{value:i,onChange:v=>o(v.target.value),placeholder:"name",style:{...c.button,cursor:"text"},"aria-label":"Name"}),rg.map(v=>(0,N.jsxs)("label",{style:{...c.badge,cursor:"pointer"},children:[(0,N.jsx)("input",{type:"checkbox",checked:s.includes(v),onChange:()=>b(v)})," ",v]},v)),(0,N.jsx)("input",{value:d,onChange:v=>y(v.target.value),placeholder:"days (optional)",style:{...c.button,cursor:"text",width:140},"aria-label":"Days"}),(0,N.jsx)("button",{type:"submit",style:c.button,disabled:!i.trim()||s.length===0||l,children:"Issue"})]}),e?.issued&&e.issued.length>0?(0,N.jsxs)("table",{style:c.table,children:[(0,N.jsx)("thead",{children:(0,N.jsxs)("tr",{children:[(0,N.jsx)("th",{style:c.th,children:"Name"}),(0,N.jsx)("th",{style:c.th,children:"Scopes"}),(0,N.jsx)("th",{style:c.th,children:"Created"}),(0,N.jsx)("th",{style:c.th,children:"Expires"}),(0,N.jsx)("th",{style:c.th,children:"Last used"}),(0,N.jsx)("th",{style:c.th})]})}),(0,N.jsx)("tbody",{children:e.issued.map(v=>(0,N.jsxs)("tr",{children:[(0,N.jsxs)("td",{style:c.td,children:[v.name,v.revokedAt?(0,N.jsx)("span",{style:c.badge,children:" revoked"}):null]}),(0,N.jsx)("td",{style:{...c.td,...c.mono},children:v.scopes.join(", ")}),(0,N.jsxs)("td",{style:{...c.td,...c.muted},children:[new Date(v.createdAt).toLocaleDateString()," \xB7 ",v.createdBy]}),(0,N.jsx)("td",{style:{...c.td,...c.muted},children:v.expiresAt?new Date(v.expiresAt).toLocaleDateString():"never"}),(0,N.jsx)("td",{style:{...c.td,...c.muted},children:v.lastUsedAt?new Date(v.lastUsedAt).toLocaleString():"never"}),(0,N.jsx)("td",{style:c.td,children:v.revokedAt?null:(0,N.jsx)("button",{type:"button",style:c.button,onClick:()=>{window.confirm(`Revoke "${v.name}"? Anything using it stops working immediately.`)&&u(v.id).catch(()=>{})},children:"Revoke"})})]},v.id))})]}):(0,N.jsx)("p",{style:c.muted,children:"None issued."})]}),(0,N.jsx)("h2",{style:c.subtitle,children:"Legacy per-brick tokens"}),e&&e.legacy.length===0?(0,N.jsx)("p",{style:c.muted,children:"None \u2014 every brick's admin surface goes through this token."}):(0,N.jsx)("ul",{style:c.list,children:e?.legacy.map(v=>(0,N.jsxs)("li",{style:c.row,children:[(0,N.jsx)("span",{style:c.mono,children:v.module})," ",(0,N.jsx)("span",{style:c.muted,children:"still registers its standalone routes with its own token (deprecated)"})]},v.module))})]})}function dg({client:t,pageSize:e=50}){let[l,n]=(0,ms.useState)(""),[a,u]=(0,ms.useState)(null),i=cd(t,{limit:e}),{user:o,isLoading:s,error:r,suspend:d,unsuspend:y,revokeSessions:f}=sd(t,a??{}),m=o?.id??null,b=rd(t,m),v=fd(t,m,{limit:20}),A=h=>h?(0,z.jsx)("span",{style:c.ok,children:"yes"}):(0,z.jsx)("span",{style:c.muted,children:"no"}),p=()=>{u(null),n("")};return(0,z.jsxs)("div",{style:c.container,children:[(0,z.jsx)("h1",{style:c.title,children:"Users"}),(0,z.jsxs)("form",{style:c.toolbar,onSubmit:h=>{h.preventDefault();let g=l.trim();u(g?{email:g}:null)},children:[(0,z.jsx)("input",{type:"email",value:l,onChange:h=>n(h.target.value),placeholder:"email address",style:{...c.button,cursor:"text",minWidth:280},"aria-label":"Email"}),(0,z.jsx)("button",{type:"submit",style:c.button,disabled:s,children:"Look up"}),a?(0,z.jsx)("button",{type:"button",style:c.button,onClick:p,children:"\u2190 All users"}):(0,z.jsx)("button",{type:"button",style:c.button,onClick:()=>{i.refresh()},disabled:i.isLoading,children:"Refresh"})]}),r?(0,z.jsx)("p",{style:c.error,role:"alert",children:r.status===404?"No user with that email.":r.explanation}):null,a?null:(0,z.jsxs)(z.Fragment,{children:[i.error?(0,z.jsx)("p",{style:c.error,role:"alert",children:i.error.explanation}):null,i.users.length===0&&!i.isLoading?(0,z.jsx)("p",{style:c.muted,children:"No users yet."}):(0,z.jsxs)("table",{style:c.table,children:[(0,z.jsx)("thead",{children:(0,z.jsxs)("tr",{children:[(0,z.jsx)("th",{style:c.th,children:"Email"}),(0,z.jsx)("th",{style:c.th,children:"Name"}),(0,z.jsx)("th",{style:c.th,children:"Created"}),(0,z.jsx)("th",{style:c.th,children:"Status"})]})}),(0,z.jsx)("tbody",{children:i.users.map(h=>(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:(0,z.jsx)("button",{type:"button",style:{...c.navItem,padding:0},onClick:()=>u({id:h.id}),children:h.email})}),(0,z.jsx)("td",{style:c.td,children:`${h.firstName??""} ${h.lastName??""}`.trim()||(0,z.jsx)("span",{style:c.muted,children:"\u2014"})}),(0,z.jsx)("td",{style:c.td,children:new Date(h.createdAt).toLocaleDateString()}),(0,z.jsxs)("td",{style:c.td,children:[h.suspended?(0,z.jsx)("span",{style:c.badge,children:"suspended"}):null,h.deletedAt?(0,z.jsx)("span",{style:c.badge,children:"deleted"}):null,!h.suspended&&!h.deletedAt?(0,z.jsx)("span",{style:c.muted,children:"active"}):null]})]},h.id))})]}),i.isLoading?(0,z.jsx)("p",{style:c.status,children:"Loading\u2026"}):null,i.hasMore&&!i.isLoading?(0,z.jsx)("button",{type:"button",style:{...c.button,marginTop:8},onClick:()=>{i.loadMore()},children:"Load more"}):null]}),o?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("h2",{style:c.subtitle,children:[o.firstName||o.lastName?`${o.firstName} ${o.lastName}`.trim():o.email," ",o.suspended?(0,z.jsx)("span",{style:c.badge,children:"suspended"}):null,o.deletedAt?(0,z.jsx)("span",{style:c.badge,children:"deleted"}):null]}),(0,z.jsx)("table",{style:c.table,children:(0,z.jsxs)("tbody",{children:[(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"id"}),(0,z.jsx)("td",{style:{...c.td,...c.mono},children:o.id})]}),(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"email"}),(0,z.jsxs)("td",{style:c.td,children:[o.email," \xB7 verified ",A(o.isEmailVerified)]})]}),(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"MFA"}),(0,z.jsx)("td",{style:c.td,children:A(o.mfaEnabled)})]}),(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"provider"}),(0,z.jsxs)("td",{style:c.td,children:[o.provider||"password",o.hasPassword?"":" \xB7 no password set"]})]}),(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"last login"}),(0,z.jsx)("td",{style:c.td,children:o.lastLogin?new Date(o.lastLogin).toLocaleString():(0,z.jsx)("span",{style:c.muted,children:"never"})})]}),(0,z.jsxs)("tr",{children:[(0,z.jsx)("td",{style:c.td,children:"created"}),(0,z.jsx)("td",{style:c.td,children:new Date(o.createdAt).toLocaleString()})]})]})}),(0,z.jsxs)("div",{style:{...c.toolbar,marginTop:12},children:[o.suspended?(0,z.jsx)("button",{type:"button",style:c.button,onClick:()=>{y()},disabled:s,children:"Unsuspend"}):(0,z.jsx)("button",{type:"button",style:c.button,onClick:()=>{d()},disabled:s,children:"Suspend"}),(0,z.jsx)("button",{type:"button",style:c.button,onClick:()=>{f().then(()=>b.refresh())},disabled:s,children:"Sign out everywhere"})]}),(0,z.jsx)("h2",{style:c.subtitle,children:"Live sessions"}),b.sessions.length===0?(0,z.jsx)("p",{style:c.muted,children:"None."}):(0,z.jsx)("ul",{style:c.list,children:b.sessions.map(h=>(0,z.jsxs)("li",{style:c.row,children:[(0,z.jsx)("span",{style:c.mono,children:h.ipAddress??"\u2014"})," ",(0,z.jsx)("span",{style:c.muted,children:h.userAgent??""})," ",(0,z.jsxs)("span",{style:c.muted,children:["since ",new Date(h.createdAt).toLocaleString()]})]},h.id))}),(0,z.jsx)("h2",{style:c.subtitle,children:"Recent sign-ins"}),v.events.length===0&&!v.isLoading?(0,z.jsx)("p",{style:c.muted,children:"None recorded."}):(0,z.jsx)("ul",{style:c.list,children:v.events.map(h=>(0,z.jsxs)("li",{style:c.row,children:[(0,z.jsx)("span",{style:h.outcome==="success"?c.ok:c.bad,children:h.outcome})," ",(0,z.jsx)("span",{style:c.muted,children:h.method})," ",(0,z.jsx)("span",{style:c.muted,children:new Date(h.createdAt).toLocaleString()})]},h.id))}),v.hasMore&&!v.isLoading?(0,z.jsx)("button",{type:"button",style:{...c.button,marginTop:8},onClick:()=>{v.loadMore()},children:"Load more"}):null]}):null]})}function hg({client:t}){let{catalog:e,isLoading:l,error:n,refresh:a,deletePlan:u}=dd(t),i=o=>o==null?"\u2014":(o/100).toFixed(2);return(0,Y.jsxs)("div",{style:c.container,children:[(0,Y.jsxs)("div",{style:c.toolbar,children:[(0,Y.jsx)("h1",{style:{...c.title,marginBottom:0},children:"Catalog"}),(0,Y.jsx)("button",{type:"button",style:c.button,onClick:()=>{a()},disabled:l,children:"Refresh"})]}),n?(0,Y.jsx)("p",{style:c.error,role:"alert",children:n.explanation}):null,l&&!e?(0,Y.jsx)("p",{style:c.status,children:"Loading\u2026"}):null,e?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("h2",{style:c.subtitle,children:"Configured (code)"}),(0,Y.jsx)("pre",{style:{...c.mono,background:"var(--fonderie-surface-alt,#fafafa)",padding:12,overflowX:"auto"},children:JSON.stringify(e.configured,null,2)}),(0,Y.jsx)("h2",{style:c.subtitle,children:"Stored (database)"}),e.stored.length===0?(0,Y.jsx)("p",{style:c.muted,children:"No stored plans."}):(0,Y.jsxs)("table",{style:c.table,children:[(0,Y.jsx)("thead",{children:(0,Y.jsxs)("tr",{children:[(0,Y.jsx)("th",{style:c.th,children:"Plan"}),(0,Y.jsx)("th",{style:c.th,children:"Tier"}),(0,Y.jsx)("th",{style:c.th,children:"Seats"}),(0,Y.jsx)("th",{style:c.th,children:"Monthly"}),(0,Y.jsx)("th",{style:c.th,children:"Yearly"}),(0,Y.jsx)("th",{style:c.th,children:"Trial"}),(0,Y.jsx)("th",{style:c.th})]})}),(0,Y.jsx)("tbody",{children:e.stored.map(o=>(0,Y.jsxs)("tr",{children:[(0,Y.jsxs)("td",{style:c.td,children:[(0,Y.jsx)("strong",{children:o.name}),o.description?(0,Y.jsx)("div",{style:c.muted,children:o.description}):null]}),(0,Y.jsx)("td",{style:c.td,children:o.tier}),(0,Y.jsx)("td",{style:c.td,children:o.seats??"\u221E"}),(0,Y.jsxs)("td",{style:c.td,children:[i(o.pricing?.monthly)," ",o.pricing?.currency??""]}),(0,Y.jsx)("td",{style:c.td,children:i(o.pricing?.yearly)}),(0,Y.jsx)("td",{style:c.td,children:o.trialDays?`${o.trialDays} d`:"\u2014"}),(0,Y.jsx)("td",{style:c.td,children:(0,Y.jsx)("button",{type:"button",style:c.button,onClick:()=>{window.confirm(`Delete stored plan "${o.name}"?`)&&u(o.id).catch(()=>{})},children:"Delete"})})]},o.id))})]})]}):null]})}function mg({client:t,pageSize:e=50}){let[l,n]=(0,Un.useState)("user"),[a,u]=(0,Un.useState)(""),[i,o]=(0,Un.useState)(null),s=md(t,{limit:e}),{subscription:r,wallet:d,ledger:y,hasMoreLedger:f,isLoading:m,error:b,loadMoreLedger:v,grant:A}=hd(t,i,{limit:20}),[p,h]=(0,Un.useState)(""),[g,S]=(0,Un.useState)(""),[w,U]=(0,Un.useState)(null),O=(C,_)=>{U(null),n(C),u(_),o({type:C,id:_})};return(0,k.jsxs)("div",{style:c.container,children:[(0,k.jsx)("h1",{style:c.title,children:"Subscriber"}),(0,k.jsxs)("form",{style:c.toolbar,onSubmit:C=>{C.preventDefault(),U(null),o(a.trim()?{type:l,id:a.trim()}:null)},children:[(0,k.jsxs)("select",{value:l,onChange:C=>n(C.target.value),style:c.button,"aria-label":"Type",children:[(0,k.jsx)("option",{value:"user",children:"user"}),(0,k.jsx)("option",{value:"workspace",children:"workspace"})]}),(0,k.jsx)("input",{value:a,onChange:C=>u(C.target.value),placeholder:"subscriber id",style:{...c.button,cursor:"text",minWidth:280},"aria-label":"Subscriber id"}),(0,k.jsx)("button",{type:"submit",style:c.button,disabled:m,children:"Look up"}),i?(0,k.jsx)("button",{type:"button",style:c.button,onClick:()=>{o(null),u(""),U(null)},children:"\u2190 All subscribers"}):(0,k.jsx)("button",{type:"button",style:c.button,onClick:()=>{s.refresh()},disabled:s.isLoading,children:"Refresh"})]}),b?(0,k.jsx)("p",{style:c.error,role:"alert",children:b.explanation}):null,i?null:(0,k.jsxs)(k.Fragment,{children:[s.error?(0,k.jsx)("p",{style:c.error,role:"alert",children:s.error.explanation}):null,s.subscriptions.length===0&&!s.isLoading?(0,k.jsx)("p",{style:c.muted,children:"No subscribers yet."}):(0,k.jsxs)("table",{style:c.table,children:[(0,k.jsx)("thead",{children:(0,k.jsxs)("tr",{children:[(0,k.jsx)("th",{style:c.th,children:"Subscriber"}),(0,k.jsx)("th",{style:c.th,children:"Plan"}),(0,k.jsx)("th",{style:c.th,children:"Status"}),(0,k.jsx)("th",{style:c.th,children:"Renews"})]})}),(0,k.jsx)("tbody",{children:s.subscriptions.map(C=>(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:c.td,children:(0,k.jsxs)("button",{type:"button",style:{...c.navItem,padding:0,...c.mono},onClick:()=>O(C.subscriberType,C.subscriberId),children:[C.subscriberType,"/",C.subscriberId]})}),(0,k.jsxs)("td",{style:c.td,children:[(0,k.jsx)("strong",{children:C.plan})," \xB7 ",C.interval]}),(0,k.jsxs)("td",{style:c.td,children:[C.status,C.cancelAtPeriodEnd?(0,k.jsx)("span",{style:c.badge,children:"cancels"}):null]}),(0,k.jsx)("td",{style:c.td,children:C.currentPeriodEnd?new Date(C.currentPeriodEnd).toLocaleDateString():(0,k.jsx)("span",{style:c.muted,children:"\u2014"})})]},C.id))})]}),s.isLoading?(0,k.jsx)("p",{style:c.status,children:"Loading\u2026"}):null,s.hasMore&&!s.isLoading?(0,k.jsx)("button",{type:"button",style:{...c.button,marginTop:8},onClick:()=>{s.loadMore()},children:"Load more"}):null]}),i&&!m?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("h2",{style:c.subtitle,children:"Subscription"}),r?(0,k.jsx)("table",{style:c.table,children:(0,k.jsxs)("tbody",{children:[(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:c.td,children:"plan"}),(0,k.jsxs)("td",{style:c.td,children:[(0,k.jsx)("strong",{children:r.plan})," \xB7 ",r.interval]})]}),(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:c.td,children:"status"}),(0,k.jsxs)("td",{style:c.td,children:[r.status,r.cancelAtPeriodEnd?" \xB7 cancels at period end":""]})]}),(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:c.td,children:"period"}),(0,k.jsxs)("td",{style:c.td,children:[r.currentPeriodStart?new Date(r.currentPeriodStart).toLocaleDateString():"\u2014"," ","\u2192"," ",r.currentPeriodEnd?new Date(r.currentPeriodEnd).toLocaleDateString():"\u2014"]})]}),(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:c.td,children:"provider"}),(0,k.jsx)("td",{style:{...c.td,...c.mono},children:r.providerSubscriptionId??"\u2014"})]})]})}):(0,k.jsx)("p",{style:c.muted,children:"No subscription."}),(0,k.jsx)("h2",{style:c.subtitle,children:"Wallet"}),d?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("p",{children:[(0,k.jsx)("strong",{children:d.balance})," ",d.currency," ",(0,k.jsxs)("span",{style:c.muted,children:["(granted ",d.granted??"0"," \xB7 purchased ",d.purchased??"0",") \xB7 minor units, precision ",d.precision]})]}),(0,k.jsxs)("form",{style:c.toolbar,onSubmit:C=>{C.preventDefault();let _=`admin-grant-${i.type}-${i.id}-${Date.now()}`;A({amount:p.trim(),...g?{description:g}:{},idempotencyKey:_}).then(()=>{U(`Granted ${p.trim()} ${d.currency}.`),h(""),S("")}).catch(()=>{})},children:[(0,k.jsx)("input",{value:p,onChange:C=>h(C.target.value),placeholder:"amount (minor units)",style:{...c.button,cursor:"text"},"aria-label":"Amount"}),(0,k.jsx)("input",{value:g,onChange:C=>S(C.target.value),placeholder:"reason (optional)",style:{...c.button,cursor:"text",minWidth:220},"aria-label":"Reason"}),(0,k.jsx)("button",{type:"submit",style:c.button,disabled:!/^\d+$/.test(p.trim()),children:"Grant"}),w?(0,k.jsx)("span",{style:c.ok,children:w}):null]}),(0,k.jsx)("h2",{style:c.subtitle,children:"Ledger"}),y.length===0?(0,k.jsx)("p",{style:c.muted,children:"Nothing moved yet."}):(0,k.jsxs)("table",{style:c.table,children:[(0,k.jsx)("thead",{children:(0,k.jsxs)("tr",{children:[(0,k.jsx)("th",{style:c.th,children:"When"}),(0,k.jsx)("th",{style:c.th,children:"Kind"}),(0,k.jsx)("th",{style:c.th,children:"Amount"}),(0,k.jsx)("th",{style:c.th,children:"Note"})]})}),(0,k.jsx)("tbody",{children:y.map(C=>(0,k.jsxs)("tr",{children:[(0,k.jsx)("td",{style:{...c.td,...c.muted},children:new Date(C.createdAt).toLocaleString()}),(0,k.jsx)("td",{style:c.td,children:C.type}),(0,k.jsx)("td",{style:{...c.td,...c.mono},children:C.amount}),(0,k.jsx)("td",{style:{...c.td,...c.muted},children:C.description??""})]},C.id))})]}),f?(0,k.jsx)("button",{type:"button",style:{...c.button,marginTop:8},onClick:()=>{v()},children:"Load more"}):null]}):(0,k.jsx)("p",{style:c.muted,children:"No wallet \u2014 billing has no wallet configuration."})]}):null]})}function yg({client:t,pageSize:e=50}){let[l,n]=(0,ys.useState)({workspaceId:"",type:"",actorId:""}),[a,u]=(0,ys.useState)({}),{events:i,hasMore:o,isLoading:s,error:r,refresh:d,loadMore:y}=yd(t,{...a,limit:e}),f=(m,b)=>(0,ut.jsx)("input",{value:l[m],onChange:v=>n({...l,[m]:v.target.value}),placeholder:b,style:{...c.button,cursor:"text"},"aria-label":b});return(0,ut.jsxs)("div",{style:c.container,children:[(0,ut.jsx)("h1",{style:c.title,children:"Audit"}),(0,ut.jsxs)("form",{style:c.toolbar,onSubmit:m=>{m.preventDefault(),u({...l.workspaceId.trim()?{workspaceId:l.workspaceId.trim()}:{},...l.type.trim()?{type:l.type.trim()}:{},...l.actorId.trim()?{actorId:l.actorId.trim()}:{}})},children:[f("workspaceId","workspace id (all if empty)"),f("type","event type"),f("actorId","actor id"),(0,ut.jsx)("button",{type:"submit",style:c.button,disabled:s,children:"Filter"}),(0,ut.jsx)("button",{type:"button",style:c.button,onClick:()=>{d()},disabled:s,children:"Refresh"})]}),r?(0,ut.jsx)("p",{style:c.error,role:"alert",children:r.explanation}):null,i.length===0&&!s?(0,ut.jsx)("p",{style:c.muted,children:"Nothing recorded for this filter."}):(0,ut.jsxs)("table",{style:c.table,children:[(0,ut.jsx)("thead",{children:(0,ut.jsxs)("tr",{children:[(0,ut.jsx)("th",{style:c.th,children:"When"}),(0,ut.jsx)("th",{style:c.th,children:"Type"}),(0,ut.jsx)("th",{style:c.th,children:"Workspace"}),(0,ut.jsx)("th",{style:c.th,children:"Actor"}),(0,ut.jsx)("th",{style:c.th,children:"Request"})]})}),(0,ut.jsx)("tbody",{children:i.map(m=>(0,ut.jsxs)("tr",{children:[(0,ut.jsx)("td",{style:{...c.td,...c.muted},children:new Date(m.createdAt).toLocaleString()}),(0,ut.jsx)("td",{style:{...c.td,...c.mono},children:m.type}),(0,ut.jsx)("td",{style:{...c.td,...c.mono},children:String(m.payload.workspaceId??"\u2014")}),(0,ut.jsx)("td",{style:{...c.td,...c.mono},children:m.actorId??"\u2014"}),(0,ut.jsx)("td",{style:{...c.td,...c.muted},children:m.requestId??""})]},m.id))})]}),s?(0,ut.jsx)("p",{style:c.status,children:"Loading\u2026"}):null,o&&!s?(0,ut.jsx)("button",{type:"button",style:{...c.button,marginTop:8},onClick:()=>{y()},children:"Load more"}):null]})}var pg=[{group:"Today",items:[{page:"attention",label:"Attention"}]},{group:"System",items:[{page:"modules",label:"Modules"},{page:"environment",label:"Environment"},{page:"doctor",label:"Doctor"},{page:"routes",label:"Routes"}]},{group:"People",items:[{page:"users",label:"Users",needs:"auth"}]},{group:"Money",items:[{page:"catalog",label:"Catalog",needs:"billing"},{page:"subscriber",label:"Subscriber",needs:"billing"}]},{group:"Settings",items:[{page:"settings",label:"Config & secrets",needs:"config"}]},{group:"Messaging",items:[{page:"templates",label:"Templates",needs:"courier"}]},{group:"Activity",items:[{page:"audit",label:"Audit",needs:"audit"},{page:"log",label:"Admin log"},{page:"tokens",label:"Access"},{page:"migrations",label:"Migrations"}]}];function gd({client:t,configClient:e,courierClient:l,authClient:n,billingClient:a,auditClient:u,environment:i,page:o,onNavigate:s}){let[r,d]=(0,hs.useState)("attention"),y=o??r,f=p=>{s&&s(p),o===void 0&&d(p)},[m,b]=(0,hs.useState)(null),v={config:!!e,courier:!!l,auth:!!n,billing:!!a,audit:!!u},A;switch(y){case"attention":A=(0,j.jsx)(ng,{client:t});break;case"modules":A=(0,j.jsx)(ig,{client:t});break;case"doctor":A=(0,j.jsx)(ug,{client:t});break;case"environment":A=(0,j.jsx)(ag,{client:t});break;case"routes":A=(0,j.jsx)(og,{client:t});break;case"tokens":A=(0,j.jsx)(fg,{client:t});break;case"migrations":A=(0,j.jsx)(cg,{client:t});break;case"log":A=(0,j.jsx)(lg,{client:t});break;case"catalog":A=a?(0,j.jsx)(hg,{client:a}):(0,j.jsx)("p",{style:c.status,children:"Pass a BillingAdminClient to see the catalog here."});break;case"subscriber":A=a?(0,j.jsx)(mg,{client:a}):(0,j.jsx)("p",{style:c.status,children:"Pass a BillingAdminClient to look up subscribers here."});break;case"audit":A=u?(0,j.jsx)(yg,{client:u}):(0,j.jsx)("p",{style:c.status,children:"Pass an AuditAdminClient to see the audit trail here."});break;case"users":A=n?(0,j.jsx)(dg,{client:n}):(0,j.jsx)("p",{style:c.status,children:"Pass an AuthAdminClient to look up users here."});break;case"settings":A=e?m&&m.kind!=="template"?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("button",{type:"button",style:c.button,onClick:()=>b(null),children:"\u2190 Back"}),(0,j.jsx)(Qf,{client:e,kind:m.kind,configKey:m.key,...i!==void 0?{environment:i}:{},onSaved:()=>b(null)})]}):(0,j.jsx)(Zf,{client:e,...i!==void 0?{environment:i}:{},onSelectConfig:p=>b({kind:"config",key:p}),onSelectSecret:p=>b({kind:"secret",key:p})}):(0,j.jsx)("p",{style:c.status,children:"Pass a ConfigAdminClient to manage config and secrets here."});break;case"templates":A=l?m?.kind==="template"?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("button",{type:"button",style:c.button,onClick:()=>b(null),children:"\u2190 Back"}),(0,j.jsx)($f,{client:l,type:m.type,onSaved:()=>b(null)})]}):(0,j.jsx)(Ff,{client:l,onSelectTemplate:p=>b({kind:"template",type:p.type})}):(0,j.jsx)("p",{style:c.status,children:"Pass a CourierAdminClient to manage templates here."});break}return(0,j.jsxs)("div",{style:c.shell,children:[(0,j.jsx)("nav",{style:c.nav,"aria-label":"Admin",children:pg.map(p=>{let h=p.items.filter(g=>!g.needs||v[g.needs]);return h.length===0?null:(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{style:c.navGroup,children:p.group}),h.map(g=>(0,j.jsx)("button",{type:"button",style:{...c.navItem,...y===g.page?c.navItemActive:{}},"aria-current":y===g.page?"page":void 0,onClick:()=>{b(null),f(g.page)},children:g.label},g.page))]},p.group)})}),(0,j.jsx)("main",{style:c.main,children:A})]})}var wn=R(L(),1),wp=R(Cp(),1),q=R(At(),1),mf=window.location.pathname.replace(/\/ui\/?$/,""),yf="fonderie.admin.token",Cb=()=>{try{return window.sessionStorage.getItem(yf)??""}catch{return""}},hf=t=>{try{t?window.sessionStorage.setItem(yf,t):window.sessionStorage.removeItem(yf)}catch{}},pf="fonderie.admin.theme",kb=()=>{try{let t=window.localStorage.getItem(pf);return t==="light"||t==="dark"?t:"system"}catch{return"system"}},wb=t=>{t==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",t);try{t==="system"?window.localStorage.removeItem(pf):window.localStorage.setItem(pf,t)}catch{}},zb={system:(0,q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,q.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),(0,q.jsx)("path",{d:"M8 21h8"}),(0,q.jsx)("path",{d:"M12 17v4"})]}),light:(0,q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,q.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,q.jsx)("path",{d:"M12 2v2"}),(0,q.jsx)("path",{d:"M12 20v2"}),(0,q.jsx)("path",{d:"m4.93 4.93 1.41 1.41"}),(0,q.jsx)("path",{d:"m17.66 17.66 1.41 1.41"}),(0,q.jsx)("path",{d:"M2 12h2"}),(0,q.jsx)("path",{d:"M20 12h2"}),(0,q.jsx)("path",{d:"m6.34 17.66-1.41 1.41"}),(0,q.jsx)("path",{d:"m19.07 4.93-1.41 1.41"})]}),dark:(0,q.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,q.jsx)("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"})})},Ob=[["system","System"],["light","Light"],["dark","Dark"]];function Ub(){let[t,e]=(0,wn.useState)(kb);return(0,q.jsx)("fieldset",{className:"theme-switch","aria-label":"Theme switcher",children:Ob.map(([l,n])=>(0,q.jsxs)("label",{className:"theme-switch__option","data-theme-value":l,children:[(0,q.jsx)("input",{type:"radio",name:"theme",value:l,checked:t===l,onChange:()=>{wb(l),e(l)}}),zb[l],(0,q.jsx)("span",{children:n})]},l))})}var ce={text:"var(--fonderie-text,#171717)",muted:"var(--fonderie-text-muted,#5c5c5c)",surface:"var(--fonderie-surface,#fff)",border:"var(--fonderie-border,#e0e0e0)",danger:"var(--fonderie-danger,#e00)",radius:"var(--fonderie-radius,4px)",tracking:"var(--fonderie-tracking-display,-0.05em)",shadow:"var(--fonderie-shadow-card,0 2px 3px 0 rgba(0,0,0,.05))"},Ll={gate:{maxWidth:420,margin:"15vh auto 0",padding:24,color:ce.text},h1:{fontSize:20,fontWeight:600,marginBottom:4,letterSpacing:ce.tracking},p:{color:ce.muted,fontSize:14,marginTop:0},input:{width:"100%",padding:"8px 10px",border:`1px solid ${ce.border}`,borderRadius:ce.radius,fontSize:14,marginTop:12,fontFamily:"inherit",background:ce.surface,color:ce.text,boxSizing:"border-box"},button:{marginTop:12,padding:"8px 14px",border:`1px solid ${ce.border}`,borderRadius:ce.radius,background:ce.surface,cursor:"pointer",fontSize:14,fontFamily:"inherit",color:ce.text,boxShadow:ce.shadow},err:{color:ce.danger,fontSize:14,marginTop:12},sessionDock:{position:"fixed",left:16,bottom:16,zIndex:10},themeDock:{position:"fixed",right:16,bottom:16,zIndex:10,borderRadius:9999,boxShadow:ce.shadow}};function Rb({onToken:t,error:e}){let[l,n]=(0,wn.useState)("");return(0,q.jsxs)("form",{style:Ll.gate,onSubmit:a=>{a.preventDefault(),l.trim()&&t(l.trim())},children:[(0,q.jsx)("h1",{style:Ll.h1,children:"Admin"}),(0,q.jsxs)("p",{style:Ll.p,children:["Paste an admin token. It is kept for this tab only and sent as a Bearer header \u2014 never stored on the server. A ",(0,q.jsx)("code",{children:"read"}),"-scoped token is enough to look around and cannot reveal secrets."]}),(0,q.jsx)("input",{type:"password",value:l,onChange:a=>n(a.target.value),placeholder:"admin token",style:Ll.input,"aria-label":"Admin token"}),e?(0,q.jsx)("p",{style:Ll.err,children:e}):null,(0,q.jsx)("button",{type:"submit",style:Ll.button,children:"Open"})]})}function Nb(){let[t,e]=(0,wn.useState)(Cb),[l,n]=(0,wn.useState)(null),[a,u]=(0,wn.useState)(null);return(0,wn.useEffect)(()=>{if(!t)return;let i=!0;return new ui({baseUrl:window.location.origin,adminToken:t,prefix:mf}).manifest().then(({result:s})=>{i&&(hf(t),n(s),u(null))}).catch(s=>{i&&(hf(""),e(""),n(null),u(s instanceof T&&s.status===401?"That token was refused.":`Could not reach the admin surface: ${s instanceof T?s.explanation:String(s)}`))}),()=>{i=!1}},[t]),(0,q.jsxs)(q.Fragment,{children:[!t||!l?(0,q.jsx)(Rb,{onToken:e,error:a}):(0,q.jsx)(Mb,{token:t,manifest:l}),t&&l?(0,q.jsx)("div",{style:Ll.sessionDock,children:(0,q.jsx)("button",{type:"button",style:{...Ll.button,marginTop:0},onClick:()=>{hf(""),e(""),n(null)},children:"Forget token"})}):null,(0,q.jsx)("div",{style:Ll.themeDock,children:(0,q.jsx)(Ub,{})})]})}function Mb({token:t,manifest:e}){let l=new Set(e.routes.map(u=>u.path)),n=u=>l.has(`${mf}${u}`),a={baseUrl:window.location.origin,adminToken:t,prefix:mf};return(0,q.jsx)(gd,{client:new ui(a),...n("/secrets")?{configClient:new ts(a)}:{},...n("/templates")?{courierClient:new ns(a)}:{},...n("/users")?{authClient:new es(a)}:{},...n("/catalog")?{billingClient:new ls(a)}:{},...n("/audit")?{auditClient:new Tf(a)}:{}})}var kp=document.getElementById("root");kp&&(0,wp.createRoot)(kp).render((0,q.jsx)(Nb,{}));})();
|
|
10
10
|
/*! Bundled license information:
|
|
11
11
|
|
|
12
12
|
react/cjs/react.production.js:
|