function ff(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function df(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Os={exports:{}},jl={},Is={exports:{}},I={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var mr=Symbol.for("react.element"),pf=Symbol.for("react.portal"),hf=Symbol.for("react.fragment"),mf=Symbol.for("react.strict_mode"),vf=Symbol.for("react.profiler"),gf=Symbol.for("react.provider"),yf=Symbol.for("react.context"),wf=Symbol.for("react.forward_ref"),Sf=Symbol.for("react.suspense"),kf=Symbol.for("react.memo"),xf=Symbol.for("react.lazy"),hu=Symbol.iterator;function Ef(e){return e===null||typeof e!="object"?null:(e=hu&&e[hu]||e["@@iterator"],typeof e=="function"?e:null)}var Ms={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ds=Object.assign,Fs={};function kn(e,t,n){this.props=e,this.context=t,this.refs=Fs,this.updater=n||Ms}kn.prototype.isReactComponent={};kn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};kn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Us(){}Us.prototype=kn.prototype;function go(e,t,n){this.props=e,this.context=t,this.refs=Fs,this.updater=n||Ms}var yo=go.prototype=new Us;yo.constructor=go;Ds(yo,kn.prototype);yo.isPureReactComponent=!0;var mu=Array.isArray,As=Object.prototype.hasOwnProperty,wo={current:null},Bs={key:!0,ref:!0,__self:!0,__source:!0};function Vs(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)As.call(t,r)&&!Bs.hasOwnProperty(r)&&(l[r]=t[r]);var s=arguments.length-2;if(s===1)l.children=n;else if(1>>1,U=N[D];if(0>>1;Dl(Pn,O))Gel(Kt,Pn)?(N[D]=Kt,N[Ge]=O,D=Ge):(N[D]=Pn,N[Xe]=O,D=Xe);else if(Gel(Kt,O))N[D]=Kt,N[Ge]=O,D=Ge;else break e}}return z}function l(N,z){var O=N.sortIndex-z.sortIndex;return O!==0?O:N.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var u=[],a=[],m=1,h=null,v=3,w=!1,g=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(N){for(var z=n(a);z!==null;){if(z.callback===null)r(a);else if(z.startTime<=N)r(a),z.sortIndex=z.expirationTime,t(u,z);else break;z=n(a)}}function k(N){if(y=!1,p(N),!g)if(n(u)!==null)g=!0,Tt(C);else{var z=n(a);z!==null&&jn(k,z.startTime-N)}}function C(N,z){g=!1,y&&(y=!1,d(L),L=-1),w=!0;var O=v;try{for(p(z),h=n(u);h!==null&&(!(h.expirationTime>z)||N&&!G());){var D=h.callback;if(typeof D=="function"){h.callback=null,v=h.priorityLevel;var U=D(h.expirationTime<=z);z=e.unstable_now(),typeof U=="function"?h.callback=U:h===n(u)&&r(u),p(z)}else r(u);h=n(u)}if(h!==null)var Rt=!0;else{var Xe=n(a);Xe!==null&&jn(k,Xe.startTime-z),Rt=!1}return Rt}finally{h=null,v=O,w=!1}}var P=!1,_=null,L=-1,A=5,R=-1;function G(){return!(e.unstable_now()-RN||125D?(N.sortIndex=O,t(a,N),n(u)===null&&N===n(a)&&(y?(d(L),L=-1):y=!0,jn(k,O-D))):(N.sortIndex=U,t(u,N),g||w||(g=!0,Tt(C))),N},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(N){var z=v;return function(){var O=v;v=z;try{return N.apply(this,arguments)}finally{v=O}}}})(Xs);Ks.exports=Xs;var Mf=Ks.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Df=S,Ce=Mf;function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wi=Object.prototype.hasOwnProperty,Ff=/^[: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]*$/,gu={},yu={};function Uf(e){return wi.call(yu,e)?!0:wi.call(gu,e)?!1:Ff.test(e)?yu[e]=!0:(gu[e]=!0,!1)}function Af(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Bf(e,t,n,r){if(t===null||typeof t>"u"||Af(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function me(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){oe[e]=new me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];oe[t]=new me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){oe[e]=new me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){oe[e]=new me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){oe[e]=new me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){oe[e]=new me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){oe[e]=new me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){oe[e]=new me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){oe[e]=new me(e,5,!1,e.toLowerCase(),null,!1,!1)});var ko=/[\-:]([a-z])/g;function xo(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ko,xo);oe[t]=new me(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ko,xo);oe[t]=new me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ko,xo);oe[t]=new me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){oe[e]=new me(e,1,!1,e.toLowerCase(),null,!1,!1)});oe.xlinkHref=new me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){oe[e]=new me(e,1,!1,e.toLowerCase(),null,!0,!0)});function Eo(e,t,n,r){var l=oe.hasOwnProperty(t)?oe[t]:null;(l!==null?l.type!==0:r||!(2s||l[o]!==i[s]){var u=` `+l[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=s);break}}}finally{Gl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fn(e):""}function Vf(e){switch(e.tag){case 5:return Fn(e.type);case 16:return Fn("Lazy");case 13:return Fn("Suspense");case 19:return Fn("SuspenseList");case 0:case 2:case 15:return e=Yl(e.type,!1),e;case 11:return e=Yl(e.type.render,!1),e;case 1:return e=Yl(e.type,!0),e;default:return""}}function Ei(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yt:return"Fragment";case Gt:return"Portal";case Si:return"Profiler";case Co:return"StrictMode";case ki:return"Suspense";case xi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Js:return(e.displayName||"Context")+".Consumer";case Ys:return(e._context.displayName||"Context")+".Provider";case No:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jo:return t=e.displayName||null,t!==null?t:Ei(e.type)||"Memo";case ut:t=e._payload,e=e._init;try{return Ei(e(t))}catch{}}return null}function $f(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ei(t);case 8:return t===Co?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Et(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qs(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Wf(e){var t=qs(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nr(e){e._valueTracker||(e._valueTracker=Wf(e))}function bs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qs(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function el(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ci(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Su(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Et(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ea(e,t){t=t.checked,t!=null&&Eo(e,"checked",t,!1)}function Ni(e,t){ea(e,t);var n=Et(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ji(e,t.type,n):t.hasOwnProperty("defaultValue")&&ji(e,t.type,Et(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ku(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ji(e,t,n){(t!=="number"||el(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Un=Array.isArray;function un(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=jr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Hf=["Webkit","ms","Moz","O"];Object.keys(Vn).forEach(function(e){Hf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vn[t]=Vn[e]})});function la(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vn.hasOwnProperty(e)&&Vn[e]?(""+t).trim():t+"px"}function ia(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=la(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Qf=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Li(e,t){if(t){if(Qf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function Ti(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ri=null;function Po(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zi=null,sn=null,an=null;function Cu(e){if(e=yr(e)){if(typeof zi!="function")throw Error(E(280));var t=e.stateNode;t&&(t=Rl(t),zi(e.stateNode,e.type,t))}}function oa(e){sn?an?an.push(e):an=[e]:sn=e}function ua(){if(sn){var e=sn,t=an;if(an=sn=null,Cu(e),t)for(e=0;e>>=0,e===0?32:31-(nd(e)/rd|0)|0}var Pr=64,_r=4194304;function An(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ll(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~l;s!==0?r=An(s):(i&=o,i!==0&&(r=An(i)))}else o=n&~l,o!==0?r=An(o):i!==0&&(r=An(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function vr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fe(t),e[t]=n}function ud(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Wn),Ou=" ",Iu=!1;function Pa(e,t){switch(e){case"keyup":return Md.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _a(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jt=!1;function Fd(e,t){switch(e){case"compositionend":return _a(t);case"keypress":return t.which!==32?null:(Iu=!0,Ou);case"textInput":return e=t.data,e===Ou&&Iu?null:e;default:return null}}function Ud(e,t){if(Jt)return e==="compositionend"||!Mo&&Pa(e,t)?(e=Na(),Hr=zo=ft=null,Jt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Uu(n)}}function za(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?za(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Oa(){for(var e=window,t=el();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=el(e.document)}return t}function Do(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Xd(e){var t=Oa(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&za(n.ownerDocument.documentElement,n)){if(r!==null&&Do(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=Au(n,i);var o=Au(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Zt=null,Ui=null,Qn=null,Ai=!1;function Bu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ai||Zt==null||Zt!==el(r)||(r=Zt,"selectionStart"in r&&Do(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Qn&&rr(Qn,r)||(Qn=r,r=ul(Ui,"onSelect"),0en||(e.current=Qi[en],Qi[en]=null,en--)}function B(e,t){en++,Qi[en]=e.current,e.current=t}var Ct={},ce=jt(Ct),ye=jt(!1),At=Ct;function hn(e,t){var n=e.type.contextTypes;if(!n)return Ct;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function we(e){return e=e.childContextTypes,e!=null}function al(){$(ye),$(ce)}function Xu(e,t,n){if(ce.current!==Ct)throw Error(E(168));B(ce,t),B(ye,n)}function $a(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(E(108,$f(e)||"Unknown",l));return X({},n,r)}function cl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ct,At=ce.current,B(ce,e),B(ye,ye.current),!0}function Gu(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=$a(e,t,At),r.__reactInternalMemoizedMergedChildContext=e,$(ye),$(ce),B(ce,e)):$(ye),B(ye,n)}var Ze=null,zl=!1,ai=!1;function Wa(e){Ze===null?Ze=[e]:Ze.push(e)}function ip(e){zl=!0,Wa(e)}function Pt(){if(!ai&&Ze!==null){ai=!0;var e=0,t=F;try{var n=Ze;for(F=1;e>=o,l-=o,qe=1<<32-Fe(t)+l|n<L?(A=_,_=null):A=_.sibling;var R=v(d,_,p[L],k);if(R===null){_===null&&(_=A);break}e&&_&&R.alternate===null&&t(d,_),c=i(R,c,L),P===null?C=R:P.sibling=R,P=R,_=A}if(L===p.length)return n(d,_),W&&zt(d,L),C;if(_===null){for(;LL?(A=_,_=null):A=_.sibling;var G=v(d,_,R.value,k);if(G===null){_===null&&(_=A);break}e&&_&&G.alternate===null&&t(d,_),c=i(G,c,L),P===null?C=G:P.sibling=G,P=G,_=A}if(R.done)return n(d,_),W&&zt(d,L),C;if(_===null){for(;!R.done;L++,R=p.next())R=h(d,R.value,k),R!==null&&(c=i(R,c,L),P===null?C=R:P.sibling=R,P=R);return W&&zt(d,L),C}for(_=r(d,_);!R.done;L++,R=p.next())R=w(_,d,L,R.value,k),R!==null&&(e&&R.alternate!==null&&_.delete(R.key===null?L:R.key),c=i(R,c,L),P===null?C=R:P.sibling=R,P=R);return e&&_.forEach(function(fe){return t(d,fe)}),W&&zt(d,L),C}function x(d,c,p,k){if(typeof p=="object"&&p!==null&&p.type===Yt&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Cr:e:{for(var C=p.key,P=c;P!==null;){if(P.key===C){if(C=p.type,C===Yt){if(P.tag===7){n(d,P.sibling),c=l(P,p.props.children),c.return=d,d=c;break e}}else if(P.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ut&&Zu(C)===P.type){n(d,P.sibling),c=l(P,p.props),c.ref=In(d,P,p),c.return=d,d=c;break e}n(d,P);break}else t(d,P);P=P.sibling}p.type===Yt?(c=Ut(p.props.children,d.mode,k,p.key),c.return=d,d=c):(k=qr(p.type,p.key,p.props,null,d.mode,k),k.ref=In(d,c,p),k.return=d,d=k)}return o(d);case Gt:e:{for(P=p.key;c!==null;){if(c.key===P)if(c.tag===4&&c.stateNode.containerInfo===p.containerInfo&&c.stateNode.implementation===p.implementation){n(d,c.sibling),c=l(c,p.children||[]),c.return=d,d=c;break e}else{n(d,c);break}else t(d,c);c=c.sibling}c=gi(p,d.mode,k),c.return=d,d=c}return o(d);case ut:return P=p._init,x(d,c,P(p._payload),k)}if(Un(p))return g(d,c,p,k);if(Ln(p))return y(d,c,p,k);Mr(d,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,c!==null&&c.tag===6?(n(d,c.sibling),c=l(c,p),c.return=d,d=c):(n(d,c),c=vi(p,d.mode,k),c.return=d,d=c),o(d)):n(d,c)}return x}var vn=Xa(!0),Ga=Xa(!1),pl=jt(null),hl=null,rn=null,Bo=null;function Vo(){Bo=rn=hl=null}function $o(e){var t=pl.current;$(pl),e._currentValue=t}function Gi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function fn(e,t){hl=e,Bo=rn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ge=!0),e.firstContext=null)}function Re(e){var t=e._currentValue;if(Bo!==e)if(e={context:e,memoizedValue:t,next:null},rn===null){if(hl===null)throw Error(E(308));rn=e,hl.dependencies={lanes:0,firstContext:e}}else rn=rn.next=e;return t}var Mt=null;function Wo(e){Mt===null?Mt=[e]:Mt.push(e)}function Ya(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Wo(t)):(n.next=l.next,l.next=n),t.interleaved=n,rt(e,r)}function rt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var st=!1;function Ho(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ja(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function et(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function yt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,M&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,rt(e,n)}return l=r.interleaved,l===null?(t.next=t,Wo(r)):(t.next=l.next,l.next=t),r.interleaved=t,rt(e,n)}function Kr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lo(e,n)}}function qu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ml(e,t,n,r){var l=e.updateQueue;st=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var u=s,a=u.next;u.next=null,o===null?i=a:o.next=a,o=u;var m=e.alternate;m!==null&&(m=m.updateQueue,s=m.lastBaseUpdate,s!==o&&(s===null?m.firstBaseUpdate=a:s.next=a,m.lastBaseUpdate=u))}if(i!==null){var h=l.baseState;o=0,m=a=u=null,s=i;do{var v=s.lane,w=s.eventTime;if((r&v)===v){m!==null&&(m=m.next={eventTime:w,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,y=s;switch(v=t,w=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){h=g.call(w,h,v);break e}h=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,v=typeof g=="function"?g.call(w,h,v):g,v==null)break e;h=X({},h,v);break e;case 2:st=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,v=l.effects,v===null?l.effects=[s]:v.push(s))}else w={eventTime:w,lane:v,tag:s.tag,payload:s.payload,callback:s.callback,next:null},m===null?(a=m=w,u=h):m=m.next=w,o|=v;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;v=s,s=v.next,v.next=null,l.lastBaseUpdate=v,l.shared.pending=null}}while(!0);if(m===null&&(u=h),l.baseState=u,l.firstBaseUpdate=a,l.lastBaseUpdate=m,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);$t|=o,e.lanes=o,e.memoizedState=h}}function bu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=fi.transition;fi.transition={};try{e(!1),t()}finally{F=n,fi.transition=r}}function pc(){return ze().memoizedState}function ap(e,t,n){var r=St(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hc(e))mc(t,n);else if(n=Ya(e,t,n,r),n!==null){var l=pe();Ue(n,e,r,l),vc(n,t,r)}}function cp(e,t,n){var r=St(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hc(e))mc(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,n);if(l.hasEagerState=!0,l.eagerState=s,Ae(s,o)){var u=t.interleaved;u===null?(l.next=l,Wo(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Ya(e,t,l,r),n!==null&&(l=pe(),Ue(n,e,r,l),vc(n,t,r))}}function hc(e){var t=e.alternate;return e===K||t!==null&&t===K}function mc(e,t){Kn=gl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lo(e,n)}}var yl={readContext:Re,useCallback:ue,useContext:ue,useEffect:ue,useImperativeHandle:ue,useInsertionEffect:ue,useLayoutEffect:ue,useMemo:ue,useReducer:ue,useRef:ue,useState:ue,useDebugValue:ue,useDeferredValue:ue,useTransition:ue,useMutableSource:ue,useSyncExternalStore:ue,useId:ue,unstable_isNewReconciler:!1},fp={readContext:Re,useCallback:function(e,t){return We().memoizedState=[e,t===void 0?null:t],e},useContext:Re,useEffect:ts,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gr(4194308,4,sc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gr(4,2,e,t)},useMemo:function(e,t){var n=We();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=We();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ap.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=We();return e={current:e},t.memoizedState=e},useState:es,useDebugValue:qo,useDeferredValue:function(e){return We().memoizedState=e},useTransition:function(){var e=es(!1),t=e[0];return e=sp.bind(null,e[1]),We().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,l=We();if(W){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),re===null)throw Error(E(349));Vt&30||ec(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,ts(nc.bind(null,r,i,e),[e]),r.flags|=2048,fr(9,tc.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=We(),t=re.identifierPrefix;if(W){var n=be,r=qe;n=(r&~(1<<32-Fe(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ar++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[He]=t,e[or]=r,jc(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ti(n,r),n){case"dialog":V("cancel",e),V("close",e),l=r;break;case"iframe":case"object":case"embed":V("load",e),l=r;break;case"video":case"audio":for(l=0;lwn&&(t.flags|=128,r=!0,Mn(i,!1),t.lanes=4194304)}else{if(!r)if(e=vl(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!W)return se(t),null}else 2*q()-i.renderingStartTime>wn&&n!==1073741824&&(t.flags|=128,r=!0,Mn(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=q(),t.sibling=null,n=Q.current,B(Q,r?n&1|2:n&1),t):(se(t),null);case 22:case 23:return lu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ke&1073741824&&(se(t),t.subtreeFlags&6&&(t.flags|=8192)):se(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function wp(e,t){switch(Uo(t),t.tag){case 1:return we(t.type)&&al(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gn(),$(ye),$(ce),Xo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ko(t),null;case 13:if($(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $(Q),null;case 4:return gn(),null;case 10:return $o(t.type._context),null;case 22:case 23:return lu(),null;case 24:return null;default:return null}}var Fr=!1,ae=!1,Sp=typeof WeakSet=="function"?WeakSet:Set,j=null;function ln(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Y(e,t,r)}else n.current=null}function ro(e,t,n){try{n()}catch(r){Y(e,t,r)}}var ds=!1;function kp(e,t){if(Bi=il,e=Oa(),Do(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,s=-1,u=-1,a=0,m=0,h=e,v=null;t:for(;;){for(var w;h!==n||l!==0&&h.nodeType!==3||(s=o+l),h!==i||r!==0&&h.nodeType!==3||(u=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(w=h.firstChild)!==null;)v=h,h=w;for(;;){if(h===e)break t;if(v===n&&++a===l&&(s=o),v===i&&++m===r&&(u=o),(w=h.nextSibling)!==null)break;h=v,v=h.parentNode}h=w}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vi={focusedElem:e,selectionRange:n},il=!1,j=t;j!==null;)if(t=j,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,j=e;else for(;j!==null;){t=j;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,x=g.memoizedState,d=t.stateNode,c=d.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ie(t.type,y),x);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(k){Y(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return g=ds,ds=!1,g}function Xn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&ro(t,n,i)}l=l.next}while(l!==r)}}function Ml(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function lo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Lc(e){var t=e.alternate;t!==null&&(e.alternate=null,Lc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[He],delete t[or],delete t[Hi],delete t[rp],delete t[lp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Tc(e){return e.tag===5||e.tag===3||e.tag===4}function ps(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function io(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=sl));else if(r!==4&&(e=e.child,e!==null))for(io(e,t,n),e=e.sibling;e!==null;)io(e,t,n),e=e.sibling}function oo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(oo(e,t,n),e=e.sibling;e!==null;)oo(e,t,n),e=e.sibling}var le=null,Me=!1;function ot(e,t,n){for(n=n.child;n!==null;)Rc(e,t,n),n=n.sibling}function Rc(e,t,n){if(Qe&&typeof Qe.onCommitFiberUnmount=="function")try{Qe.onCommitFiberUnmount(Pl,n)}catch{}switch(n.tag){case 5:ae||ln(n,t);case 6:var r=le,l=Me;le=null,ot(e,t,n),le=r,Me=l,le!==null&&(Me?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(Me?(e=le,n=n.stateNode,e.nodeType===8?si(e.parentNode,n):e.nodeType===1&&si(e,n),tr(e)):si(le,n.stateNode));break;case 4:r=le,l=Me,le=n.stateNode.containerInfo,Me=!0,ot(e,t,n),le=r,Me=l;break;case 0:case 11:case 14:case 15:if(!ae&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&ro(n,t,o),l=l.next}while(l!==r)}ot(e,t,n);break;case 1:if(!ae&&(ln(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Y(n,t,s)}ot(e,t,n);break;case 21:ot(e,t,n);break;case 22:n.mode&1?(ae=(r=ae)||n.memoizedState!==null,ot(e,t,n),ae=r):ot(e,t,n);break;default:ot(e,t,n)}}function hs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Sp),t.forEach(function(r){var l=Tp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Oe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ep(r/1960))-r,10e?16:e,dt===null)var r=!1;else{if(e=dt,dt=null,kl=0,M&6)throw Error(E(331));var l=M;for(M|=4,j=e.current;j!==null;){var i=j,o=i.child;if(j.flags&16){var s=i.deletions;if(s!==null){for(var u=0;uq()-nu?Ft(e,0):tu|=n),Se(e,t)}function Ac(e,t){t===0&&(e.mode&1?(t=_r,_r<<=1,!(_r&130023424)&&(_r=4194304)):t=1);var n=pe();e=rt(e,t),e!==null&&(vr(e,t,n),Se(e,n))}function Lp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ac(e,n)}function Tp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),Ac(e,n)}var Bc;Bc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ye.current)ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ge=!1,gp(e,t,n);ge=!!(e.flags&131072)}else ge=!1,W&&t.flags&1048576&&Ha(t,dl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yr(e,t),e=t.pendingProps;var l=hn(t,ce.current);fn(t,n),l=Yo(null,t,r,e,l,n);var i=Jo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,we(r)?(i=!0,cl(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ho(t),l.updater=Il,t.stateNode=l,l._reactInternals=t,Ji(t,r,e,n),t=bi(null,t,r,!0,i,n)):(t.tag=0,W&&i&&Fo(t),de(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=zp(r),e=Ie(r,e),l){case 0:t=qi(null,t,r,e,n);break e;case 1:t=as(null,t,r,e,n);break e;case 11:t=us(null,t,r,e,n);break e;case 14:t=ss(null,t,r,Ie(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),qi(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),as(e,t,r,l,n);case 3:e:{if(Ec(t),e===null)throw Error(E(387));r=t.pendingProps,i=t.memoizedState,l=i.element,Ja(e,t),ml(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=yn(Error(E(423)),t),t=cs(e,t,r,n,l);break e}else if(r!==l){l=yn(Error(E(424)),t),t=cs(e,t,r,n,l);break e}else for(xe=gt(t.stateNode.containerInfo.firstChild),Ee=t,W=!0,De=null,n=Ga(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mn(),r===l){t=lt(e,t,n);break e}de(e,t,r,n)}t=t.child}return t;case 5:return Za(t),e===null&&Xi(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,$i(r,l)?o=null:i!==null&&$i(r,i)&&(t.flags|=32),xc(e,t),de(e,t,o,n),t.child;case 6:return e===null&&Xi(t),null;case 13:return Cc(e,t,n);case 4:return Qo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vn(t,null,r,n):de(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),us(e,t,r,l,n);case 7:return de(e,t,t.pendingProps,n),t.child;case 8:return de(e,t,t.pendingProps.children,n),t.child;case 12:return de(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,B(pl,r._currentValue),r._currentValue=o,i!==null)if(Ae(i.value,o)){if(i.children===l.children&&!ye.current){t=lt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=et(-1,n&-n),u.tag=2;var a=i.updateQueue;if(a!==null){a=a.shared;var m=a.pending;m===null?u.next=u:(u.next=m.next,m.next=u),a.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Gi(i.return,n,t),s.lanes|=n;break}u=u.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(E(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Gi(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}de(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,fn(t,n),l=Re(l),r=r(l),t.flags|=1,de(e,t,r,n),t.child;case 14:return r=t.type,l=Ie(r,t.pendingProps),l=Ie(r.type,l),ss(e,t,r,l,n);case 15:return Sc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),Yr(e,t),t.tag=1,we(r)?(e=!0,cl(t)):e=!1,fn(t,n),gc(t,r,l),Ji(t,r,l,n),bi(null,t,r,!0,e,n);case 19:return Nc(e,t,n);case 22:return kc(e,t,n)}throw Error(E(156,t.tag))};function Vc(e,t){return ha(e,t)}function Rp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Le(e,t,n,r){return new Rp(e,t,n,r)}function ou(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zp(e){if(typeof e=="function")return ou(e)?1:0;if(e!=null){if(e=e.$$typeof,e===No)return 11;if(e===jo)return 14}return 2}function kt(e,t){var n=e.alternate;return n===null?(n=Le(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function qr(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")ou(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Yt:return Ut(n.children,l,i,t);case Co:o=8,l|=8;break;case Si:return e=Le(12,n,t,l|2),e.elementType=Si,e.lanes=i,e;case ki:return e=Le(13,n,t,l),e.elementType=ki,e.lanes=i,e;case xi:return e=Le(19,n,t,l),e.elementType=xi,e.lanes=i,e;case Zs:return Fl(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ys:o=10;break e;case Js:o=9;break e;case No:o=11;break e;case jo:o=14;break e;case ut:o=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=Le(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function Ut(e,t,n,r){return e=Le(7,e,r,t),e.lanes=n,e}function Fl(e,t,n,r){return e=Le(22,e,r,t),e.elementType=Zs,e.lanes=n,e.stateNode={isHidden:!1},e}function vi(e,t,n){return e=Le(6,e,null,t),e.lanes=n,e}function gi(e,t,n){return t=Le(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Op(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zl(0),this.expirationTimes=Zl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function uu(e,t,n,r,l,i,o,s,u){return e=new Op(e,t,n,s,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Le(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ho(i),e}function Ip(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qc)}catch(e){console.error(e)}}Qc(),Qs.exports=Ne;var Ap=Qs.exports,Kc,xs=Ap;Kc=xs.createRoot,xs.hydrateRoot;/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function fu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Vp(){return Math.random().toString(36).substr(2,8)}function Cs(e,t){return{usr:e.state,key:e.key,idx:t}}function fo(e,t,n,r){return n===void 0&&(n=null),pr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Cn(t):t,{state:n,key:t&&t.key||r||Vp()})}function Cl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Cn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function $p(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:i=!1}=r,o=l.history,s=pt.Pop,u=null,a=m();a==null&&(a=0,o.replaceState(pr({},o.state,{idx:a}),""));function m(){return(o.state||{idx:null}).idx}function h(){s=pt.Pop;let x=m(),d=x==null?null:x-a;a=x,u&&u({action:s,location:y.location,delta:d})}function v(x,d){s=pt.Push;let c=fo(y.location,x,d);a=m()+1;let p=Cs(c,a),k=y.createHref(c);try{o.pushState(p,"",k)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;l.location.assign(k)}i&&u&&u({action:s,location:y.location,delta:1})}function w(x,d){s=pt.Replace;let c=fo(y.location,x,d);a=m();let p=Cs(c,a),k=y.createHref(c);o.replaceState(p,"",k),i&&u&&u({action:s,location:y.location,delta:0})}function g(x){let d=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof x=="string"?x:Cl(x);return c=c.replace(/ $/,"%20"),J(d,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,d)}let y={get action(){return s},get location(){return e(l,o)},listen(x){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Es,h),u=x,()=>{l.removeEventListener(Es,h),u=null}},createHref(x){return t(l,x)},createURL:g,encodeLocation(x){let d=g(x);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:v,replace:w,go(x){return o.go(x)}};return y}var Ns;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ns||(Ns={}));function Wp(e,t,n){return n===void 0&&(n="/"),Hp(e,t,n)}function Hp(e,t,n,r){let l=typeof t=="string"?Cn(t):t,i=Sn(l.pathname||"/",n);if(i==null)return null;let o=Xc(e);Qp(o);let s=null;for(let u=0;s==null&&u{let u={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};u.relativePath.startsWith("/")&&(J(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let a=xt([r,u.relativePath]),m=n.concat(u);i.children&&i.children.length>0&&(J(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),Xc(i.children,t,m,a)),!(i.path==null&&!i.index)&&t.push({path:a,score:qp(a,i.index),routesMeta:m})};return e.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))l(i,o);else for(let u of Gc(i.path))l(i,o,u)}),t}function Gc(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return l?[i,""]:[i];let o=Gc(r.join("/")),s=[];return s.push(...o.map(u=>u===""?i:[i,u].join("/"))),l&&s.push(...o),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function Qp(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:bp(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Kp=/^:[\w-]+$/,Xp=3,Gp=2,Yp=1,Jp=10,Zp=-2,js=e=>e==="*";function qp(e,t){let n=e.split("/"),r=n.length;return n.some(js)&&(r+=Zp),t&&(r+=Gp),n.filter(l=>!js(l)).reduce((l,i)=>l+(Kp.test(i)?Xp:i===""?Yp:Jp),r)}function bp(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function eh(e,t,n){let{routesMeta:r}=e,l={},i="/",o=[];for(let s=0;s{let{paramName:v,isOptional:w}=m;if(v==="*"){let y=s[h]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const g=s[h];return w&&!g?a[v]=void 0:a[v]=(g||"").replace(/%2F/g,"/"),a},{}),pathname:i,pathnameBase:o,pattern:e}}function th(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),fu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function nh(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return fu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Sn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const rh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lh=e=>rh.test(e);function ih(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Cn(e):e,i;if(n)if(lh(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),fu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=Ps(n.substring(1),"/"):i=Ps(n,t)}else i=t;return{pathname:i,search:sh(r),hash:ah(l)}}function Ps(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function yi(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function oh(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Yc(e,t){let n=oh(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Jc(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Cn(e):(l=pr({},e),J(!l.pathname||!l.pathname.includes("?"),yi("?","pathname","search",l)),J(!l.pathname||!l.pathname.includes("#"),yi("#","pathname","hash",l)),J(!l.search||!l.search.includes("#"),yi("#","search","hash",l)));let i=e===""||l.pathname==="",o=i?"/":l.pathname,s;if(o==null)s=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let v=o.split("/");for(;v[0]==="..";)v.shift(),h-=1;l.pathname=v.join("/")}s=h>=0?t[h]:"/"}let u=ih(l,s),a=o&&o!=="/"&&o.endsWith("/"),m=(i||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(a||m)&&(u.pathname+="/"),u}const xt=e=>e.join("/").replace(/\/\/+/g,"/"),uh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),sh=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ah=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ch(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Zc=["post","put","patch","delete"];new Set(Zc);const fh=["get",...Zc];new Set(fh);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),S.useCallback(function(a,m){if(m===void 0&&(m={}),!s.current)return;if(typeof a=="number"){r.go(a);return}let h=Jc(a,JSON.parse(o),i,m.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:xt([t,h.pathname])),(m.replace?r.replace:r.push)(h,m.state,m)},[t,r,o,i,e])}function mh(){let{matches:e}=S.useContext(Lt),t=e[e.length-1];return t?t.params:{}}function Hl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=S.useContext(_t),{matches:l}=S.useContext(Lt),{pathname:i}=kr(),o=JSON.stringify(Yc(l,r.v7_relativeSplatPath));return S.useMemo(()=>Jc(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function vh(e,t){return gh(e,t)}function gh(e,t,n,r){Sr()||J(!1);let{navigator:l}=S.useContext(_t),{matches:i}=S.useContext(Lt),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let a=kr(),m;if(t){var h;let x=typeof t=="string"?Cn(t):t;u==="/"||(h=x.pathname)!=null&&h.startsWith(u)||J(!1),m=x}else m=a;let v=m.pathname||"/",w=v;if(u!=="/"){let x=u.replace(/^\//,"").split("/");w="/"+v.replace(/^\//,"").split("/").slice(x.length).join("/")}let g=Wp(e,{pathname:w}),y=xh(g&&g.map(x=>Object.assign({},x,{params:Object.assign({},s,x.params),pathname:xt([u,l.encodeLocation?l.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?u:xt([u,l.encodeLocation?l.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&y?S.createElement(Wl.Provider,{value:{location:hr({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:pt.Pop}},y):y}function yh(){let e=jh(),t=ch(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:l},n):null,null)}const wh=S.createElement(yh,null);class Sh extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?S.createElement(Lt.Provider,{value:this.props.routeContext},S.createElement(bc.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function kh(e){let{routeContext:t,match:n,children:r}=e,l=S.useContext($l);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(Lt.Provider,{value:t},r)}function xh(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=(l=n)==null?void 0:l.errors;if(s!=null){let m=o.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);m>=0||J(!1),o=o.slice(0,Math.min(o.length,m+1))}let u=!1,a=-1;if(n&&r&&r.v7_partialHydration)for(let m=0;m=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((m,h,v)=>{let w,g=!1,y=null,x=null;n&&(w=s&&h.route.id?s[h.route.id]:void 0,y=h.route.errorElement||wh,u&&(a<0&&v===0?(_h("route-fallback"),g=!0,x=null):a===v&&(g=!0,x=h.route.hydrateFallbackElement||null)));let d=t.concat(o.slice(0,v+1)),c=()=>{let p;return w?p=y:g?p=x:h.route.Component?p=S.createElement(h.route.Component,null):h.route.element?p=h.route.element:p=m,S.createElement(kh,{match:h,routeContext:{outlet:m,matches:d,isDataRoute:n!=null},children:p})};return n&&(h.route.ErrorBoundary||h.route.errorElement||v===0)?S.createElement(Sh,{location:n.location,revalidation:n.revalidation,component:y,error:w,children:c(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):c()},null)}var tf=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(tf||{}),nf=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(nf||{});function Eh(e){let t=S.useContext($l);return t||J(!1),t}function Ch(e){let t=S.useContext(qc);return t||J(!1),t}function Nh(e){let t=S.useContext(Lt);return t||J(!1),t}function rf(e){let t=Nh(),n=t.matches[t.matches.length-1];return n.route.id||J(!1),n.route.id}function jh(){var e;let t=S.useContext(bc),n=Ch(),r=rf();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Ph(){let{router:e}=Eh(tf.UseNavigateStable),t=rf(nf.UseNavigateStable),n=S.useRef(!1);return ef(()=>{n.current=!0}),S.useCallback(function(l,i){i===void 0&&(i={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,hr({fromRouteId:t},i)))},[e,t])}const _s={};function _h(e,t,n){_s[e]||(_s[e]=!0)}function Lh(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function br(e){J(!1)}function Th(e){let{basename:t="/",children:n=null,location:r,navigationType:l=pt.Pop,navigator:i,static:o=!1,future:s}=e;Sr()&&J(!1);let u=t.replace(/^\/*/,"/"),a=S.useMemo(()=>({basename:u,navigator:i,static:o,future:hr({v7_relativeSplatPath:!1},s)}),[u,s,i,o]);typeof r=="string"&&(r=Cn(r));let{pathname:m="/",search:h="",hash:v="",state:w=null,key:g="default"}=r,y=S.useMemo(()=>{let x=Sn(m,u);return x==null?null:{location:{pathname:x,search:h,hash:v,state:w,key:g},navigationType:l}},[u,m,h,v,w,g,l]);return y==null?null:S.createElement(_t.Provider,{value:a},S.createElement(Wl.Provider,{children:n,value:y}))}function Rh(e){let{children:t,location:n}=e;return vh(ho(t),n)}new Promise(()=>{});function ho(e,t){t===void 0&&(t=[]);let n=[];return S.Children.forEach(e,(r,l)=>{if(!S.isValidElement(r))return;let i=[...t,l];if(r.type===S.Fragment){n.push.apply(n,ho(r.props.children,i));return}r.type!==br&&J(!1),!r.props.index||!r.props.children||J(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ho(r.props.children,i)),n.push(o)}),n}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Nl(){return Nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function zh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Oh(e,t){return e.button===0&&(!t||t==="_self")&&!zh(e)}const Ih=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Mh=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Dh="6";try{window.__reactRouterVersion=Dh}catch{}const Fh=S.createContext({isTransitioning:!1}),Uh="startTransition",Ls=_f[Uh];function Ah(e){let{basename:t,children:n,future:r,window:l}=e,i=S.useRef();i.current==null&&(i.current=Bp({window:l,v5Compat:!0}));let o=i.current,[s,u]=S.useState({action:o.action,location:o.location}),{v7_startTransition:a}=r||{},m=S.useCallback(h=>{a&&Ls?Ls(()=>u(h)):u(h)},[u,a]);return S.useLayoutEffect(()=>o.listen(m),[o,m]),S.useEffect(()=>Lh(r),[r]),S.createElement(Th,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}const Bh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Vh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ql=S.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:i,replace:o,state:s,target:u,to:a,preventScrollReset:m,viewTransition:h}=t,v=lf(t,Ih),{basename:w}=S.useContext(_t),g,y=!1;if(typeof a=="string"&&Vh.test(a)&&(g=a,Bh))try{let p=new URL(window.location.href),k=a.startsWith("//")?new URL(p.protocol+a):new URL(a),C=Sn(k.pathname,w);k.origin===p.origin&&C!=null?a=C+k.search+k.hash:y=!0}catch{}let x=dh(a,{relative:l}),d=Wh(a,{replace:o,state:s,target:u,preventScrollReset:m,relative:l,viewTransition:h});function c(p){r&&r(p),p.defaultPrevented||d(p)}return S.createElement("a",Nl({},v,{href:g||x,onClick:y||i?r:c,ref:n,target:u}))}),Ts=S.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:i="",end:o=!1,style:s,to:u,viewTransition:a,children:m}=t,h=lf(t,Mh),v=Hl(u,{relative:h.relative}),w=kr(),g=S.useContext(qc),{navigator:y,basename:x}=S.useContext(_t),d=g!=null&&Hh(v)&&a===!0,c=y.encodeLocation?y.encodeLocation(v).pathname:v.pathname,p=w.pathname,k=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;l||(p=p.toLowerCase(),k=k?k.toLowerCase():null,c=c.toLowerCase()),k&&x&&(k=Sn(k,x)||k);const C=c!=="/"&&c.endsWith("/")?c.length-1:c.length;let P=p===c||!o&&p.startsWith(c)&&p.charAt(C)==="/",_=k!=null&&(k===c||!o&&k.startsWith(c)&&k.charAt(c.length)==="/"),L={isActive:P,isPending:_,isTransitioning:d},A=P?r:void 0,R;typeof i=="function"?R=i(L):R=[i,P?"active":null,_?"pending":null,d?"transitioning":null].filter(Boolean).join(" ");let G=typeof s=="function"?s(L):s;return S.createElement(Ql,Nl({},h,{"aria-current":A,className:R,ref:n,style:G,to:u,viewTransition:a}),typeof m=="function"?m(L):m)});var mo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(mo||(mo={}));var Rs;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Rs||(Rs={}));function $h(e){let t=S.useContext($l);return t||J(!1),t}function Wh(e,t){let{target:n,replace:r,state:l,preventScrollReset:i,relative:o,viewTransition:s}=t===void 0?{}:t,u=ph(),a=kr(),m=Hl(e,{relative:o});return S.useCallback(h=>{if(Oh(h,n)){h.preventDefault();let v=r!==void 0?r:Cl(a)===Cl(m);u(e,{replace:v,state:l,preventScrollReset:i,relative:o,viewTransition:s})}},[a,u,m,r,l,n,e,i,o,s])}function Hh(e,t){t===void 0&&(t={});let n=S.useContext(Fh);n==null&&J(!1);let{basename:r}=$h(mo.useViewTransitionState),l=Hl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Sn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Sn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return po(l.pathname,o)!=null||po(l.pathname,i)!=null}const of=S.createContext(null);function zs(){try{return localStorage.getItem("authToken")||""}catch{return""}}function Br(e){try{e?localStorage.setItem("authToken",e):localStorage.removeItem("authToken")}catch{}}function Qh({children:e}){const[t,n]=S.useState(zs),[r,l]=S.useState(null),[i,o]=S.useState(!!zs()),[s,u]=S.useState(null);S.useEffect(()=>{if(!t){l(null),o(!1),u(null);return}let g=!1;return o(!0),fetch("/api/auth/me",{headers:{Authorization:`Bearer ${t}`}}).then(async y=>{const x=await y.json().catch(()=>({}));if(!y.ok)throw new Error(x.error||"Kon sessie niet verifiëren.");g||(l(x.user||null),u(null))}).catch(()=>{g||(l(null),n(""),Br(""))}).finally(()=>{g||o(!1)}),()=>{g=!0}},[t]);async function a(g){u(null);const y=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),x=await y.json().catch(()=>({}));if(!y.ok)throw new Error(x.error||"Login mislukt.");return n(x.token),Br(x.token),l(x.user),x.user}async function m(g){u(null);const y=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),x=await y.json().catch(()=>({}));if(!y.ok)throw new Error(x.error||"Registratie mislukt.");return n(x.token),Br(x.token),l(x.user),x.user}function h(){n(""),Br(""),l(null)}const v=S.useMemo(()=>(g,y={})=>{const x={...y.headers||{},...t?{Authorization:`Bearer ${t}`}:{}};return fetch(g,{...y,headers:x})},[t]),w={user:r,token:t,loading:i,error:s,login:a,register:m,logout:h,authFetch:v};return f.jsx(of.Provider,{value:w,children:e})}function uf(){const e=S.useContext(of);if(!e)throw new Error("useAuth moet binnen een AuthProvider gebruikt worden");return e}function Kh(){const e=({isActive:r})=>r?"nav-link active":"nav-link",{user:t,logout:n}=uf();return f.jsxs("nav",{className:"site-nav",children:[f.jsx(Ql,{className:"nav-logo",to:"/",children:"Siti Plugin Repo"}),f.jsxs("div",{className:"nav-links",children:[f.jsx(Ts,{to:"/",end:!0,className:e,children:"Plugins"}),f.jsx(Ts,{to:"/licenses",className:e,children:"Licenties"})]}),f.jsx("div",{className:"nav-user",children:t?f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"nav-user-name",children:["Hallo, ",t.name]}),f.jsx("button",{className:"ghost ghost-small",type:"button",onClick:n,children:"Uitloggen"})]}):f.jsx("span",{className:"nav-user-guest",children:"Niet ingelogd"})})]})}function Xh(){const[e,t]=S.useState([]),[n,r]=S.useState(!0),[l,i]=S.useState(null),[o,s]=S.useState(null);return S.useEffect(()=>{async function u(){try{const a=await fetch("/api/plugins");if(!a.ok)throw new Error("Kon plugins niet laden");const m=await a.json();t(m.items||[]),s(m.updatedAt)}catch{i("Laden van GitHub data is mislukt.")}finally{r(!1)}}u()},[]),f.jsxs("div",{className:"page",children:[f.jsxs("header",{className:"hero",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow",children:"WordPress plugin overzicht"}),f.jsx("h1",{children:"Siti Plugin Repo"}),f.jsx("p",{className:"subtitle",children:"Al je publieke WordPress plugins op één plek."})]}),f.jsx("a",{className:"cta",href:"https://github.com/SitiWeb",target:"_blank",rel:"noreferrer",children:"GitHub SitiWeb"})]}),f.jsxs("section",{className:"grid",children:[n&&f.jsx("div",{className:"state",children:"Bezig met laden…"}),l&&f.jsx("div",{className:"state error",children:l}),!n&&!l&&e.length===0&&f.jsx("div",{className:"state",children:"Geen repositories gevonden."}),e.map(u=>{var h,v;const a=((h=u.manifest)==null?void 0:h.plugin_name)||u.name,m=((v=u.manifest)==null?void 0:v.description)||u.description;return f.jsxs("article",{className:"card",children:[f.jsxs("div",{className:"card-header",children:[f.jsx("h2",{children:a}),f.jsx("span",{className:"pill",children:u.fullName})]}),f.jsx("p",{children:m}),f.jsxs("div",{className:"meta",children:[f.jsxs("span",{children:["★ ",u.stars]}),f.jsxs("span",{children:["Forks ",u.forks]}),f.jsxs("span",{children:["Issues ",u.issues]})]}),u.topics.length>0&&f.jsx("div",{className:"topics",children:u.topics.slice(0,4).map(w=>f.jsx("span",{className:"topic",children:w},w))}),f.jsxs("div",{className:"actions",children:[f.jsx(Ql,{className:"link",to:`/plugin/${u.fullName}`,children:"Bekijk details →"}),f.jsx("a",{className:"ghost",href:u.repoUrl,target:"_blank",rel:"noreferrer",children:"GitHub"})]})]},u.fullName)})]}),f.jsx("footer",{className:"footer",children:f.jsxs("span",{children:["Laatste sync: ",o?new Date(o).toLocaleString("nl-NL"):"-"]})})]})}function Gh(){const{owner:e,repo:t}=mh(),[n,r]=S.useState(null),[l,i]=S.useState(!0),[o,s]=S.useState(null);S.useEffect(()=>{async function y(){try{const x=await fetch(`/api/plugins/${e}/${t}`);if(!x.ok)throw new Error("Kon details niet laden");const d=await x.json();r(d)}catch{s("Laden van plugin details is mislukt.")}finally{i(!1)}}y()},[e,t]);const u=n==null?void 0:n.manifest,a=(u==null?void 0:u.plugin_name)||(n==null?void 0:n.name)||t,m=(u==null?void 0:u.description)||(n==null?void 0:n.description),h=(u==null?void 0:u.author)||"-",v=(u==null?void 0:u.version)||"-",w=S.useMemo(()=>(n==null?void 0:n.releases)||[],[n]),g=S.useMemo(()=>(n==null?void 0:n.commits)||[],[n]);return f.jsxs("div",{className:"page",children:[f.jsxs("header",{className:"detail-hero",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow",children:"Plugin details"}),f.jsx("h1",{children:a}),f.jsx("p",{className:"subtitle",children:m})]}),f.jsxs("div",{className:"detail-actions",children:[f.jsx(Ql,{className:"ghost",to:"/",children:"← Terug"}),(n==null?void 0:n.repoUrl)&&f.jsx("a",{className:"cta",href:n.repoUrl,target:"_blank",rel:"noreferrer",children:"GitHub"})]})]}),l&&f.jsx("div",{className:"state",children:"Bezig met laden…"}),o&&f.jsx("div",{className:"state error",children:o}),!l&&!o&&n&&f.jsxs("section",{className:"detail-grid",children:[f.jsxs("div",{className:"card",children:[f.jsx("h2",{children:"Manifest"}),f.jsxs("div",{className:"detail-list",children:[f.jsxs("div",{children:[f.jsx("span",{children:"Naam"}),f.jsx("strong",{children:a})]}),f.jsxs("div",{children:[f.jsx("span",{children:"Versie"}),f.jsx("strong",{children:v})]}),f.jsxs("div",{children:[f.jsx("span",{children:"Auteur"}),f.jsx("strong",{children:h})]}),f.jsxs("div",{children:[f.jsx("span",{children:"Repository"}),f.jsx("strong",{children:n.fullName})]})]}),(u==null?void 0:u.author_url)&&f.jsx("a",{className:"link",href:u.author_url,target:"_blank",rel:"noreferrer",children:"Auteur website →"})]}),f.jsxs("div",{className:"card",children:[f.jsx("h2",{children:"Releases"}),w.length===0&&f.jsx("p",{children:"Geen releases gevonden."}),f.jsx("ul",{className:"list",children:w.map(y=>f.jsxs("li",{children:[f.jsx("a",{href:y.url,target:"_blank",rel:"noreferrer",children:y.name}),f.jsx("span",{children:y.publishedAt?new Date(y.publishedAt).toLocaleDateString("nl-NL"):"-"})]},y.tag))})]}),f.jsxs("div",{className:"card",children:[f.jsx("h2",{children:"Recente commits"}),g.length===0&&f.jsx("p",{children:"Geen commits gevonden."}),f.jsx("ul",{className:"list",children:g.map(y=>{var x;return f.jsxs("li",{children:[f.jsx("a",{href:y.url,target:"_blank",rel:"noreferrer",children:((x=y.message)==null?void 0:x.split(` `)[0])||y.sha.slice(0,7)}),f.jsx("span",{children:y.author||"-"})]},y.sha)})})]})]})]})}const sf="nl-NL";function vo(e,t=sf){return e?new Date(e).toLocaleString(t):"-"}function Yh(e,t=sf){return e?new Date(e).toLocaleDateString(t):"-"}function Jh({license:e}){const t=e.hostnames||[],n=e.primaryHostname||"Nog niet gekoppeld";return f.jsxs("article",{className:"card license-card",children:[f.jsxs("div",{className:"license-card-header",children:[f.jsxs("div",{children:[f.jsx("h3",{children:e.pluginName||e.label||"Licentie"}),f.jsx("p",{className:"license-subtitle",children:e.repoFullName||"-"})]}),f.jsx("span",{className:"pill",children:e.key})]}),f.jsxs("div",{className:"detail-list license-detail-list",children:[f.jsxs("div",{children:[f.jsx("span",{children:"Versie"}),f.jsx("strong",{children:e.pluginVersion||"-"})]}),f.jsxs("div",{children:[f.jsx("span",{children:"Hostname"}),f.jsx("strong",{children:n})]}),f.jsxs("div",{children:[f.jsx("span",{children:"Aangemaakt"}),f.jsx("strong",{children:Yh(e.createdAt)})]}),f.jsxs("div",{children:[f.jsx("span",{children:"Laatste check"}),f.jsx("strong",{children:vo(e.lastVersionCheckAt)})]})]}),e.note&&f.jsxs("p",{className:"license-note",children:["Notitie: ",e.note]}),t.length>0&&f.jsxs("div",{className:"host-list",children:[f.jsx("p",{className:"hint",children:"Hostnames"}),f.jsx("ul",{children:t.map(r=>f.jsxs("li",{children:[f.jsxs("div",{children:[f.jsx("strong",{children:r.hostname}),f.jsxs("span",{children:[r.hits||0," checks"]})]}),f.jsx("span",{children:vo(r.lastSeenAt)})]},`${r.hostname}-${r.firstSeenAt||r.lastSeenAt}`))})]}),f.jsxs("div",{className:"license-links",children:[e.repoUrl&&f.jsx("a",{className:"link",href:e.repoUrl,target:"_blank",rel:"noreferrer",children:"Repository →"}),e.pluginName&&f.jsx("span",{className:"ghost-pill",children:e.pluginName})]})]})}function Zh(){var pu;const{user:e,token:t,authFetch:n,login:r,register:l,loading:i}=uf(),[o,s]=S.useState([]),[u,a]=S.useState([]),[m,h]=S.useState(""),[v,w]=S.useState(""),[g,y]=S.useState(""),[x,d]=S.useState(!0),[c,p]=S.useState(null),[k,C]=S.useState(!1),[P,_]=S.useState(!1),[L,A]=S.useState(null),[R,G]=S.useState(null),[fe,Be]=S.useState(null),[Nn,xr]=S.useState(!1),[Tt,jn]=S.useState(""),[N,z]=S.useState(""),O=!!(e&&t);S.useEffect(()=>{let T=!1;async function H(){var Z;d(!0),p(null);try{const Ve=await fetch("/api/plugins"),Ye=await Ve.json().catch(()=>({}));if(!Ve.ok)throw new Error(Ye.error||"Kon plugins niet laden.");if(T)return;a(Ye.items||[]);const _n=(Z=Ye.items)==null?void 0:Z[0];if(_n){const af=_n.ownerRepo||_n.fullName;h(cf=>cf||af)}}catch(Ve){T||p(Ve.message||"Kon plugins niet laden.")}finally{T||d(!1)}}return H(),()=>{T=!0}},[]);const D=S.useCallback(async(T=!0)=>{if(!t){s([]),A(null),T&&G({variant:"error",message:"Log in om licenties te beheren."});return}T&&G(null),_(!0);try{const H=await n("/api/licenses"),Z=await H.json().catch(()=>({}));if(H.status===401)throw new Error("Sessie verlopen, log opnieuw in.");if(!H.ok)throw new Error(Z.error||"Kon licenties niet laden.");s(Z.items||[]),A(Z.updatedAt)}catch(H){T&&G({variant:"error",message:H.message})}finally{_(!1)}},[n,t]);S.useEffect(()=>{D(!1)},[D]),S.useEffect(()=>{if(!m&&u.length>0){const T=u[0].ownerRepo||u[0].fullName;h(T)}},[u,m]);const U=S.useMemo(()=>u.find(T=>(T.ownerRepo||T.fullName)===m)||null,[u,m]),Rt=S.useMemo(()=>{const T=H=>H?new Date(H).getTime():0;return[...o].sort((H,Z)=>T(Z.createdAt)-T(H.createdAt))},[o]);async function Xe(T){var H;if(T.preventDefault(),G(null),!O){G({variant:"error",message:"Log in om een licentie aan te maken."});return}if(!U){G({variant:"error",message:"Selecteer een plugin."});return}C(!0);try{const Z={label:v.trim()||((H=U.manifest)==null?void 0:H.plugin_name)||U.name||U.fullName,note:g.trim()||void 0,repo:{repo:U.ownerRepo||U.fullName,provider:U.provider||"github",baseUrl:U.baseUrl}},Ve=await n("/api/licenses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Z)}),Ye=await Ve.json().catch(()=>({}));if(Ve.status===401)throw new Error("Sessie verlopen, log opnieuw in.");if(!Ve.ok)throw new Error(Ye.error||"Licentie aanmaken mislukt.");s(_n=>[Ye,..._n]),G({variant:"success",message:"Licentie aangemaakt."}),w(""),y("")}catch(Z){G({variant:"error",message:Z.message})}finally{C(!1)}}async function Pn(T){if(T.preventDefault(),Be(null),!Tt.trim()||!N.trim()){Be({ok:!1,message:"Vul zowel licentiecode als hostname in."});return}xr(!0);try{const H=await fetch("/api/licenses/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:Tt.trim(),hostname:N.trim()})}),Z=await H.json().catch(()=>({}));if(!H.ok)throw new Error(Z.error||"Controle mislukt.");Be({ok:!0,data:Z}),Z.license&&s(Ve=>Ve.map(Ye=>Ye.key===Z.license.key?Z.license:Ye))}catch(H){Be({ok:!1,message:H.message})}finally{xr(!1)}}const Ge=S.useCallback(async T=>{await r(T),await D(!1)},[r,D]),Kt=S.useCallback(async T=>{await l(T),await D(!1)},[l,D]),du=x||i&&!!t;return f.jsxs("div",{className:"page",children:[f.jsxs("header",{className:"hero",children:[f.jsxs("div",{children:[f.jsx("p",{className:"eyebrow",children:"Licentiebeheer"}),f.jsx("h1",{children:"Licenties"}),f.jsx("p",{className:"subtitle",children:"Maak licenties voor iedere plugin en beheer welke hostname de licentie daadwerkelijk gebruikt."}),f.jsx("p",{className:"hint",children:"Een licentie is geldig voor één hostname. De eerste hostname die controleert wordt automatisch gekoppeld als licentiehouder."})]}),f.jsx("button",{className:"ghost",type:"button",onClick:()=>D(),disabled:P||!O,children:P?"Vernieuwen…":"Vernieuw lijst"})]}),f.jsxs("div",{className:"license-meta-bar",children:[f.jsxs("span",{children:["Actieve licenties: ",o.length]}),f.jsxs("span",{children:["Laatste update: ",vo(L)]}),e&&f.jsxs("span",{children:["Ingelogd als: ",e.email]})]}),du&&f.jsx("div",{className:"state",children:"Bezig met laden…"}),c&&f.jsx("div",{className:"state error",children:c}),!du&&!c&&f.jsxs(f.Fragment,{children:[f.jsxs("section",{className:"license-forms",children:[O?f.jsxs("article",{className:"card",children:[f.jsx("h2",{children:"Nieuwe licentie"}),f.jsx("p",{className:"hint",children:"Kies een plugin en genereer direct een licentiesleutel."}),f.jsxs("form",{className:"form-grid",onSubmit:Xe,children:[f.jsxs("label",{className:"field",children:[f.jsx("span",{children:"Plugin"}),f.jsx("select",{value:m,onChange:T=>h(T.target.value),disabled:u.length===0,children:u.map(T=>{var Z;const H=T.ownerRepo||T.fullName;return f.jsxs("option",{value:H,children:[((Z=T.manifest)==null?void 0:Z.plugin_name)||T.name," (",T.fullName,")"]},H)})})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{children:"Label (optioneel)"}),f.jsx("input",{value:v,onChange:T=>w(T.target.value),placeholder:"Naam of klant"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{children:"Notitie"}),f.jsx("textarea",{value:g,onChange:T=>y(T.target.value),placeholder:"Bijv. contactpersoon of extra info",rows:3})]}),f.jsx("button",{className:"cta",type:"submit",disabled:k||!U,children:k?"Aanmaken…":"Licentie aanmaken"})]}),R&&f.jsx("div",{className:`state inline ${R.variant==="error"?"error":"success"}`,children:R.message})]}):f.jsx(qh,{onLogin:Ge,onRegister:Kt}),f.jsxs("article",{className:"card",children:[f.jsx("h2",{children:"Test of valideer"}),f.jsx("p",{className:"hint",children:"Gebruik dit formulier zoals de plugin dat zou doen om de huidige versie en hostname te controleren."}),f.jsxs("form",{className:"form-grid",onSubmit:Pn,children:[f.jsxs("label",{className:"field",children:[f.jsx("span",{children:"Licentiecode"}),f.jsx("input",{value:Tt,onChange:T=>jn(T.target.value),placeholder:"SITI-XXXX-XXXX"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{children:"Hostname"}),f.jsx("input",{value:N,onChange:T=>z(T.target.value),placeholder:"voorbeeld.nl"})]}),f.jsx("button",{className:"ghost",type:"submit",disabled:Nn,children:Nn?"Controleren…":"Controleer licentie"})]}),fe&&fe.ok&&((pu=fe.data)==null?void 0:pu.license)&&f.jsxs("div",{className:"state success inline",children:[f.jsx("strong",{children:"Licentie geldig"}),f.jsxs("p",{children:[fe.data.license.pluginName||"Plugin"," — versie ",fe.data.license.pluginVersion||"-"]}),f.jsxs("p",{children:["Gekoppeld aan: ",f.jsx("strong",{children:fe.data.license.primaryHostname||"Nog niet gekoppeld"})]})]}),fe&&!fe.ok&&f.jsx("div",{className:"state error inline",children:fe.message})]})]}),O?f.jsx("section",{className:"license-grid",children:Rt.length===0?f.jsx("div",{className:"state",children:"Nog geen licenties aangemaakt."}):Rt.map(T=>f.jsx(Jh,{license:T},T.id||T.key))}):f.jsx("div",{className:"state",children:"Log in of registreer om licenties te bekijken en te beheren."})]})]})}function qh({onLogin:e,onRegister:t}){const[n,r]=S.useState("login"),[l,i]=S.useState({identifier:"",password:""}),[o,s]=S.useState({username:"",name:"",email:"",password:""}),[u,a]=S.useState(null),[m,h]=S.useState(!1);async function v(w){w.preventDefault(),a(null),h(!0);try{n==="login"?(await e(l),a({variant:"success",message:"Succesvol ingelogd."})):(await t(o),a({variant:"success",message:"Account aangemaakt en ingelogd."}))}catch(g){a({variant:"error",message:g.message||"Actie mislukt."})}finally{h(!1)}}return f.jsxs("article",{className:"card auth-card",children:[f.jsxs("div",{className:"auth-tabs",children:[f.jsx("button",{type:"button",className:n==="login"?"auth-tab active":"auth-tab",onClick:()=>r("login"),disabled:m,children:"Inloggen"}),f.jsx("button",{type:"button",className:n==="register"?"auth-tab active":"auth-tab",onClick:()=>r("register"),disabled:m,children:"Registreren"})]}),f.jsxs("form",{className:"form-grid",onSubmit:v,children:[n==="login"?f.jsxs(f.Fragment,{children:[f.jsxs("label",{className:"field",children:[f.jsx("span",{children:"Gebruikersnaam of e-mail"}),f.jsx("input",{value:l.identifier,onChange:w=>i(g=>({...g,identifier:w.target.value})),placeholder:"jouwnaam of mail"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{children:"Wachtwoord"}),f.jsx("input",{type:"password",value:l.password,onChange:w=>i(g=>({...g,password:w.target.value})),placeholder:"••••••••"})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("label",{className:"field",children:[f.jsx("span",{children:"Gebruikersnaam"}),f.jsx("input",{value:o.username,onChange:w=>s(g=>({...g,username:w.target.value})),placeholder:"gebruikersnaam"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{children:"Naam"}),f.jsx("input",{value:o.name,onChange:w=>s(g=>({...g,name:w.target.value})),placeholder:"Volledige naam"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{children:"E-mailadres"}),f.jsx("input",{type:"email",value:o.email,onChange:w=>s(g=>({...g,email:w.target.value})),placeholder:"naam@bedrijf.nl"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{children:"Wachtwoord"}),f.jsx("input",{type:"password",value:o.password,onChange:w=>s(g=>({...g,password:w.target.value})),placeholder:"Minimaal 8 karakters"})]})]}),f.jsx("button",{className:"cta",type:"submit",disabled:m,children:m?"Verwerken…":n==="login"?"Inloggen":"Registreren"})]}),u&&f.jsx("div",{className:`state inline ${u.variant==="error"?"error":"success"}`,children:u.message})]})}function bh(){return f.jsxs("div",{className:"app",children:[f.jsx(Kh,{}),f.jsxs(Rh,{children:[f.jsx(br,{path:"/",element:f.jsx(Xh,{})}),f.jsx(br,{path:"/plugin/:owner/:repo",element:f.jsx(Gh,{})}),f.jsx(br,{path:"/licenses",element:f.jsx(Zh,{})})]})]})}Kc(document.getElementById("root")).render(f.jsx(Ws.StrictMode,{children:f.jsx(Ah,{children:f.jsx(Qh,{children:f.jsx(bh,{})})})}));