1269 lines
381 KiB
JavaScript
1269 lines
381 KiB
JavaScript
var k0=Object.defineProperty;var Bf=e=>{throw TypeError(e)};var _0=(e,t,n)=>t in e?k0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ne=(e,t,n)=>_0(e,typeof t!="symbol"?t+"":t,n),Nu=(e,t,n)=>t.has(e)||Bf("Cannot "+n);var S=(e,t,n)=>(Nu(e,t,"read from private field"),n?n.call(e):t.get(e)),ie=(e,t,n)=>t.has(e)?Bf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),re=(e,t,n,r)=>(Nu(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),me=(e,t,n)=>(Nu(e,t,"access private method"),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function S0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ep={exports:{}},Wo={},Cp={exports:{}},pe={};/**
|
||
* @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 Ji=Symbol.for("react.element"),N0=Symbol.for("react.portal"),j0=Symbol.for("react.fragment"),E0=Symbol.for("react.strict_mode"),C0=Symbol.for("react.profiler"),T0=Symbol.for("react.provider"),A0=Symbol.for("react.context"),P0=Symbol.for("react.forward_ref"),L0=Symbol.for("react.suspense"),M0=Symbol.for("react.memo"),R0=Symbol.for("react.lazy"),Hf=Symbol.iterator;function $0(e){return e===null||typeof e!="object"?null:(e=Hf&&e[Hf]||e["@@iterator"],typeof e=="function"?e:null)}var Tp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ap=Object.assign,Pp={};function Ml(e,t,n){this.props=e,this.context=t,this.refs=Pp,this.updater=n||Tp}Ml.prototype.isReactComponent={};Ml.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")};Ml.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Lp(){}Lp.prototype=Ml.prototype;function kd(e,t,n){this.props=e,this.context=t,this.refs=Pp,this.updater=n||Tp}var _d=kd.prototype=new Lp;_d.constructor=kd;Ap(_d,Ml.prototype);_d.isPureReactComponent=!0;var Kf=Array.isArray,Mp=Object.prototype.hasOwnProperty,Sd={current:null},Rp={key:!0,ref:!0,__self:!0,__source:!0};function $p(e,t,n){var r,s={},l=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(l=""+t.key),t)Mp.call(t,r)&&!Rp.hasOwnProperty(r)&&(s[r]=t[r]);var o=arguments.length-2;if(o===1)s.children=n;else if(1<o){for(var u=Array(o),c=0;c<o;c++)u[c]=arguments[c+2];s.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)s[r]===void 0&&(s[r]=o[r]);return{$$typeof:Ji,type:e,key:l,ref:a,props:s,_owner:Sd.current}}function D0(e,t){return{$$typeof:Ji,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Nd(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ji}function z0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Wf=/\/+/g;function ju(e,t){return typeof e=="object"&&e!==null&&e.key!=null?z0(""+e.key):t.toString(36)}function Wa(e,t,n,r,s){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(l){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ji:case N0:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+ju(a,0):r,Kf(s)?(n="",e!=null&&(n=e.replace(Wf,"$&/")+"/"),Wa(s,t,n,"",function(c){return c})):s!=null&&(Nd(s)&&(s=D0(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(Wf,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",Kf(e))for(var o=0;o<e.length;o++){l=e[o];var u=r+ju(l,o);a+=Wa(l,t,n,u,s)}else if(u=$0(e),typeof u=="function")for(e=u.call(e),o=0;!(l=e.next()).done;)l=l.value,u=r+ju(l,o++),a+=Wa(l,t,n,u,s);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function ja(e,t,n){if(e==null)return e;var r=[],s=0;return Wa(e,r,"","",function(l){return t.call(n,l,s++)}),r}function I0(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Tt={current:null},Ga={transition:null},O0={ReactCurrentDispatcher:Tt,ReactCurrentBatchConfig:Ga,ReactCurrentOwner:Sd};function Dp(){throw Error("act(...) is not supported in production builds of React.")}pe.Children={map:ja,forEach:function(e,t,n){ja(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ja(e,function(){t++}),t},toArray:function(e){return ja(e,function(t){return t})||[]},only:function(e){if(!Nd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pe.Component=Ml;pe.Fragment=j0;pe.Profiler=C0;pe.PureComponent=kd;pe.StrictMode=E0;pe.Suspense=L0;pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O0;pe.act=Dp;pe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ap({},e.props),s=e.key,l=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,a=Sd.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)Mp.call(t,u)&&!Rp.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var c=0;c<u;c++)o[c]=arguments[c+2];r.children=o}return{$$typeof:Ji,type:e.type,key:s,ref:l,props:r,_owner:a}};pe.createContext=function(e){return e={$$typeof:A0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:T0,_context:e},e.Consumer=e};pe.createElement=$p;pe.createFactory=function(e){var t=$p.bind(null,e);return t.type=e,t};pe.createRef=function(){return{current:null}};pe.forwardRef=function(e){return{$$typeof:P0,render:e}};pe.isValidElement=Nd;pe.lazy=function(e){return{$$typeof:R0,_payload:{_status:-1,_result:e},_init:I0}};pe.memo=function(e,t){return{$$typeof:M0,type:e,compare:t===void 0?null:t}};pe.startTransition=function(e){var t=Ga.transition;Ga.transition={};try{e()}finally{Ga.transition=t}};pe.unstable_act=Dp;pe.useCallback=function(e,t){return Tt.current.useCallback(e,t)};pe.useContext=function(e){return Tt.current.useContext(e)};pe.useDebugValue=function(){};pe.useDeferredValue=function(e){return Tt.current.useDeferredValue(e)};pe.useEffect=function(e,t){return Tt.current.useEffect(e,t)};pe.useId=function(){return Tt.current.useId()};pe.useImperativeHandle=function(e,t,n){return Tt.current.useImperativeHandle(e,t,n)};pe.useInsertionEffect=function(e,t){return Tt.current.useInsertionEffect(e,t)};pe.useLayoutEffect=function(e,t){return Tt.current.useLayoutEffect(e,t)};pe.useMemo=function(e,t){return Tt.current.useMemo(e,t)};pe.useReducer=function(e,t,n){return Tt.current.useReducer(e,t,n)};pe.useRef=function(e){return Tt.current.useRef(e)};pe.useState=function(e){return Tt.current.useState(e)};pe.useSyncExternalStore=function(e,t,n){return Tt.current.useSyncExternalStore(e,t,n)};pe.useTransition=function(){return Tt.current.useTransition()};pe.version="18.3.1";Cp.exports=pe;var A=Cp.exports;const Si=S0(A);/**
|
||
* @license React
|
||
* react-jsx-runtime.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 U0=A,F0=Symbol.for("react.element"),V0=Symbol.for("react.fragment"),B0=Object.prototype.hasOwnProperty,H0=U0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,K0={key:!0,ref:!0,__self:!0,__source:!0};function zp(e,t,n){var r,s={},l=null,a=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)B0.call(t,r)&&!K0.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:F0,type:e,key:l,ref:a,props:s,_owner:H0.current}}Wo.Fragment=V0;Wo.jsx=zp;Wo.jsxs=zp;Ep.exports=Wo;var i=Ep.exports,ic={},Ip={exports:{}},Jt={},Op={exports:{}},Up={};/**
|
||
* @license React
|
||
* scheduler.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.
|
||
*/(function(e){function t(M,U){var x=M.length;M.push(U);e:for(;0<x;){var $=x-1>>>1,I=M[$];if(0<s(I,U))M[$]=U,M[x]=I,x=$;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var U=M[0],x=M.pop();if(x!==U){M[0]=x;e:for(var $=0,I=M.length,K=I>>>1;$<K;){var W=2*($+1)-1,ee=M[W],Ae=W+1,gt=M[Ae];if(0>s(ee,x))Ae<I&&0>s(gt,ee)?(M[$]=gt,M[Ae]=x,$=Ae):(M[$]=ee,M[W]=x,$=W);else if(Ae<I&&0>s(gt,x))M[$]=gt,M[Ae]=x,$=Ae;else break e}}return U}function s(M,U){var x=M.sortIndex-U.sortIndex;return x!==0?x:M.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var u=[],c=[],f=1,g=null,d=3,w=!1,y=!1,N=!1,R=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(M){for(var U=n(c);U!==null;){if(U.callback===null)r(c);else if(U.startTime<=M)r(c),U.sortIndex=U.expirationTime,t(u,U);else break;U=n(c)}}function _(M){if(N=!1,m(M),!y)if(n(u)!==null)y=!0,Te(C);else{var U=n(c);U!==null&&V(_,U.startTime-M)}}function C(M,U){y=!1,N&&(N=!1,v(L),L=-1),w=!0;var x=d;try{for(m(U),g=n(u);g!==null&&(!(g.expirationTime>U)||M&&!Y());){var $=g.callback;if(typeof $=="function"){g.callback=null,d=g.priorityLevel;var I=$(g.expirationTime<=U);U=e.unstable_now(),typeof I=="function"?g.callback=I:g===n(u)&&r(u),m(U)}else r(u);g=n(u)}if(g!==null)var K=!0;else{var W=n(c);W!==null&&V(_,W.startTime-U),K=!1}return K}finally{g=null,d=x,w=!1}}var E=!1,j=null,L=-1,G=5,P=-1;function Y(){return!(e.unstable_now()-P<G)}function ae(){if(j!==null){var M=e.unstable_now();P=M;var U=!0;try{U=j(!0,M)}finally{U?le():(E=!1,j=null)}}else E=!1}var le;if(typeof h=="function")le=function(){h(ae)};else if(typeof MessageChannel<"u"){var ke=new MessageChannel,ue=ke.port2;ke.port1.onmessage=ae,le=function(){ue.postMessage(null)}}else le=function(){R(ae,0)};function Te(M){j=M,E||(E=!0,le())}function V(M,U){L=R(function(){M(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_continueExecution=function(){y||w||(y=!0,Te(C))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(M){switch(d){case 1:case 2:case 3:var U=3;break;default:U=d}var x=d;d=U;try{return M()}finally{d=x}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,U){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var x=d;d=M;try{return U()}finally{d=x}},e.unstable_scheduleCallback=function(M,U,x){var $=e.unstable_now();switch(typeof x=="object"&&x!==null?(x=x.delay,x=typeof x=="number"&&0<x?$+x:$):x=$,M){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=x+I,M={id:f++,callback:U,priorityLevel:M,startTime:x,expirationTime:I,sortIndex:-1},x>$?(M.sortIndex=x,t(c,M),n(u)===null&&M===n(c)&&(N?(v(L),L=-1):N=!0,V(_,x-$))):(M.sortIndex=I,t(u,M),y||w||(y=!0,Te(C))),M},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(M){var U=d;return function(){var x=d;d=U;try{return M.apply(this,arguments)}finally{d=x}}}})(Up);Op.exports=Up;var W0=Op.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 G0=A,Zt=W0;function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Fp=new Set,Ni={};function Ms(e,t){bl(e,t),bl(e+"Capture",t)}function bl(e,t){for(Ni[e]=t,e=0;e<t.length;e++)Fp.add(t[e])}var gr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ac=Object.prototype.hasOwnProperty,q0=/^[: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]*$/,Gf={},qf={};function Q0(e){return ac.call(qf,e)?!0:ac.call(Gf,e)?!1:q0.test(e)?qf[e]=!0:(Gf[e]=!0,!1)}function Y0(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 Z0(e,t,n,r){if(t===null||typeof t>"u"||Y0(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 At(e,t,n,r,s,l,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=a}var pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pt[e]=new At(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pt[t]=new At(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pt[e]=new At(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pt[e]=new At(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){pt[e]=new At(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pt[e]=new At(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pt[e]=new At(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pt[e]=new At(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pt[e]=new At(e,5,!1,e.toLowerCase(),null,!1,!1)});var jd=/[\-:]([a-z])/g;function Ed(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(jd,Ed);pt[t]=new At(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(jd,Ed);pt[t]=new At(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(jd,Ed);pt[t]=new At(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pt[e]=new At(e,1,!1,e.toLowerCase(),null,!1,!1)});pt.xlinkHref=new At("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pt[e]=new At(e,1,!1,e.toLowerCase(),null,!0,!0)});function Cd(e,t,n,r){var s=pt.hasOwnProperty(t)?pt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Z0(t,n,s,r)&&(n=null),r||s===null?Q0(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var kr=G0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ea=Symbol.for("react.element"),Ks=Symbol.for("react.portal"),Ws=Symbol.for("react.fragment"),Td=Symbol.for("react.strict_mode"),oc=Symbol.for("react.profiler"),Vp=Symbol.for("react.provider"),Bp=Symbol.for("react.context"),Ad=Symbol.for("react.forward_ref"),uc=Symbol.for("react.suspense"),cc=Symbol.for("react.suspense_list"),Pd=Symbol.for("react.memo"),Tr=Symbol.for("react.lazy"),Hp=Symbol.for("react.offscreen"),Qf=Symbol.iterator;function Gl(e){return e===null||typeof e!="object"?null:(e=Qf&&e[Qf]||e["@@iterator"],typeof e=="function"?e:null)}var Ke=Object.assign,Eu;function ri(e){if(Eu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Eu=t&&t[1]||""}return`
|
||
`+Eu+e}var Cu=!1;function Tu(e,t){if(!e||Cu)return"";Cu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
|
||
`),l=r.stack.split(`
|
||
`),a=s.length-1,o=l.length-1;1<=a&&0<=o&&s[a]!==l[o];)o--;for(;1<=a&&0<=o;a--,o--)if(s[a]!==l[o]){if(a!==1||o!==1)do if(a--,o--,0>o||s[a]!==l[o]){var u=`
|
||
`+s[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=o);break}}}finally{Cu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ri(e):""}function J0(e){switch(e.tag){case 5:return ri(e.type);case 16:return ri("Lazy");case 13:return ri("Suspense");case 19:return ri("SuspenseList");case 0:case 2:case 15:return e=Tu(e.type,!1),e;case 11:return e=Tu(e.type.render,!1),e;case 1:return e=Tu(e.type,!0),e;default:return""}}function dc(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 Ws:return"Fragment";case Ks:return"Portal";case oc:return"Profiler";case Td:return"StrictMode";case uc:return"Suspense";case cc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bp:return(e.displayName||"Context")+".Consumer";case Vp:return(e._context.displayName||"Context")+".Provider";case Ad:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Pd:return t=e.displayName||null,t!==null?t:dc(e.type)||"Memo";case Tr:t=e._payload,e=e._init;try{return dc(e(t))}catch{}}return null}function X0(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 dc(t);case 8:return t===Td?"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 Qr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ex(e){var t=Kp(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 s=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,l.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ca(e){e._valueTracker||(e._valueTracker=ex(e))}function Wp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Kp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ho(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 fc(e,t){var n=t.checked;return Ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Qr(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 Gp(e,t){t=t.checked,t!=null&&Cd(e,"checked",t,!1)}function hc(e,t){Gp(e,t);var n=Qr(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")?pc(e,t.type,n):t.hasOwnProperty("defaultValue")&&pc(e,t.type,Qr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zf(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 pc(e,t,n){(t!=="number"||ho(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var si=Array.isArray;function sl(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Qr(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function mc(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return Ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Jf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(D(92));if(si(n)){if(1<n.length)throw Error(D(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Qr(n)}}function qp(e,t){var n=Qr(t.value),r=Qr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Xf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Qp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function gc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Qp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ta,Yp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ta=Ta||document.createElement("div"),Ta.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ta.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ji(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ci={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},tx=["Webkit","ms","Moz","O"];Object.keys(ci).forEach(function(e){tx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ci[t]=ci[e]})});function Zp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ci.hasOwnProperty(e)&&ci[e]?(""+t).trim():t+"px"}function Jp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Zp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var nx=Ke({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 vc(e,t){if(t){if(nx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function xc(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 yc=null;function Ld(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wc=null,ll=null,il=null;function eh(e){if(e=ta(e)){if(typeof wc!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Zo(t),wc(e.stateNode,e.type,t))}}function Xp(e){ll?il?il.push(e):il=[e]:ll=e}function em(){if(ll){var e=ll,t=il;if(il=ll=null,eh(e),t)for(e=0;e<t.length;e++)eh(t[e])}}function tm(e,t){return e(t)}function nm(){}var Au=!1;function rm(e,t,n){if(Au)return e(t,n);Au=!0;try{return tm(e,t,n)}finally{Au=!1,(ll!==null||il!==null)&&(nm(),em())}}function Ei(e,t){var n=e.stateNode;if(n===null)return null;var r=Zo(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(D(231,t,typeof n));return n}var bc=!1;if(gr)try{var ql={};Object.defineProperty(ql,"passive",{get:function(){bc=!0}}),window.addEventListener("test",ql,ql),window.removeEventListener("test",ql,ql)}catch{bc=!1}function rx(e,t,n,r,s,l,a,o,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var di=!1,po=null,mo=!1,kc=null,sx={onError:function(e){di=!0,po=e}};function lx(e,t,n,r,s,l,a,o,u){di=!1,po=null,rx.apply(sx,arguments)}function ix(e,t,n,r,s,l,a,o,u){if(lx.apply(this,arguments),di){if(di){var c=po;di=!1,po=null}else throw Error(D(198));mo||(mo=!0,kc=c)}}function Rs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function sm(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function th(e){if(Rs(e)!==e)throw Error(D(188))}function ax(e){var t=e.alternate;if(!t){if(t=Rs(e),t===null)throw Error(D(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var l=s.alternate;if(l===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===l.child){for(l=s.child;l;){if(l===n)return th(s),e;if(l===r)return th(s),t;l=l.sibling}throw Error(D(188))}if(n.return!==r.return)n=s,r=l;else{for(var a=!1,o=s.child;o;){if(o===n){a=!0,n=s,r=l;break}if(o===r){a=!0,r=s,n=l;break}o=o.sibling}if(!a){for(o=l.child;o;){if(o===n){a=!0,n=l,r=s;break}if(o===r){a=!0,r=l,n=s;break}o=o.sibling}if(!a)throw Error(D(189))}}if(n.alternate!==r)throw Error(D(190))}if(n.tag!==3)throw Error(D(188));return n.stateNode.current===n?e:t}function lm(e){return e=ax(e),e!==null?im(e):null}function im(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=im(e);if(t!==null)return t;e=e.sibling}return null}var am=Zt.unstable_scheduleCallback,nh=Zt.unstable_cancelCallback,ox=Zt.unstable_shouldYield,ux=Zt.unstable_requestPaint,qe=Zt.unstable_now,cx=Zt.unstable_getCurrentPriorityLevel,Md=Zt.unstable_ImmediatePriority,om=Zt.unstable_UserBlockingPriority,go=Zt.unstable_NormalPriority,dx=Zt.unstable_LowPriority,um=Zt.unstable_IdlePriority,Go=null,Qn=null;function fx(e){if(Qn&&typeof Qn.onCommitFiberRoot=="function")try{Qn.onCommitFiberRoot(Go,e,void 0,(e.current.flags&128)===128)}catch{}}var An=Math.clz32?Math.clz32:mx,hx=Math.log,px=Math.LN2;function mx(e){return e>>>=0,e===0?32:31-(hx(e)/px|0)|0}var Aa=64,Pa=4194304;function li(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 vo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,l=e.pingedLanes,a=n&268435455;if(a!==0){var o=a&~s;o!==0?r=li(o):(l&=a,l!==0&&(r=li(l)))}else a=n&~s,a!==0?r=li(a):l!==0&&(r=li(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,l=t&-t,s>=l||s===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-An(t),s=1<<n,r|=e[n],t&=~s;return r}function gx(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vx(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,l=e.pendingLanes;0<l;){var a=31-An(l),o=1<<a,u=s[a];u===-1?(!(o&n)||o&r)&&(s[a]=gx(o,t)):u<=t&&(e.expiredLanes|=o),l&=~o}}function _c(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function cm(){var e=Aa;return Aa<<=1,!(Aa&4194240)&&(Aa=64),e}function Pu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-An(t),e[t]=n}function xx(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<n;){var s=31-An(n),l=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~l}}function Rd(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-An(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var je=0;function dm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var fm,$d,hm,pm,mm,Sc=!1,La=[],Or=null,Ur=null,Fr=null,Ci=new Map,Ti=new Map,Pr=[],yx="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 submit".split(" ");function rh(e,t){switch(e){case"focusin":case"focusout":Or=null;break;case"dragenter":case"dragleave":Ur=null;break;case"mouseover":case"mouseout":Fr=null;break;case"pointerover":case"pointerout":Ci.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ti.delete(t.pointerId)}}function Ql(e,t,n,r,s,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[s]},t!==null&&(t=ta(t),t!==null&&$d(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function wx(e,t,n,r,s){switch(t){case"focusin":return Or=Ql(Or,e,t,n,r,s),!0;case"dragenter":return Ur=Ql(Ur,e,t,n,r,s),!0;case"mouseover":return Fr=Ql(Fr,e,t,n,r,s),!0;case"pointerover":var l=s.pointerId;return Ci.set(l,Ql(Ci.get(l)||null,e,t,n,r,s)),!0;case"gotpointercapture":return l=s.pointerId,Ti.set(l,Ql(Ti.get(l)||null,e,t,n,r,s)),!0}return!1}function gm(e){var t=os(e.target);if(t!==null){var n=Rs(t);if(n!==null){if(t=n.tag,t===13){if(t=sm(n),t!==null){e.blockedOn=t,mm(e.priority,function(){hm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Nc(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);yc=r,n.target.dispatchEvent(r),yc=null}else return t=ta(n),t!==null&&$d(t),e.blockedOn=n,!1;t.shift()}return!0}function sh(e,t,n){qa(e)&&n.delete(t)}function bx(){Sc=!1,Or!==null&&qa(Or)&&(Or=null),Ur!==null&&qa(Ur)&&(Ur=null),Fr!==null&&qa(Fr)&&(Fr=null),Ci.forEach(sh),Ti.forEach(sh)}function Yl(e,t){e.blockedOn===t&&(e.blockedOn=null,Sc||(Sc=!0,Zt.unstable_scheduleCallback(Zt.unstable_NormalPriority,bx)))}function Ai(e){function t(s){return Yl(s,e)}if(0<La.length){Yl(La[0],e);for(var n=1;n<La.length;n++){var r=La[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Or!==null&&Yl(Or,e),Ur!==null&&Yl(Ur,e),Fr!==null&&Yl(Fr,e),Ci.forEach(t),Ti.forEach(t),n=0;n<Pr.length;n++)r=Pr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Pr.length&&(n=Pr[0],n.blockedOn===null);)gm(n),n.blockedOn===null&&Pr.shift()}var al=kr.ReactCurrentBatchConfig,xo=!0;function kx(e,t,n,r){var s=je,l=al.transition;al.transition=null;try{je=1,Dd(e,t,n,r)}finally{je=s,al.transition=l}}function _x(e,t,n,r){var s=je,l=al.transition;al.transition=null;try{je=4,Dd(e,t,n,r)}finally{je=s,al.transition=l}}function Dd(e,t,n,r){if(xo){var s=Nc(e,t,n,r);if(s===null)Fu(e,t,r,yo,n),rh(e,r);else if(wx(s,e,t,n,r))r.stopPropagation();else if(rh(e,r),t&4&&-1<yx.indexOf(e)){for(;s!==null;){var l=ta(s);if(l!==null&&fm(l),l=Nc(e,t,n,r),l===null&&Fu(e,t,r,yo,n),l===s)break;s=l}s!==null&&r.stopPropagation()}else Fu(e,t,r,null,n)}}var yo=null;function Nc(e,t,n,r){if(yo=null,e=Ld(r),e=os(e),e!==null)if(t=Rs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=sm(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return yo=e,null}function vm(e){switch(e){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"resize":case"seeked":case"submit":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"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(cx()){case Md:return 1;case om:return 4;case go:case dx:return 16;case um:return 536870912;default:return 16}default:return 16}}var Dr=null,zd=null,Qa=null;function xm(){if(Qa)return Qa;var e,t=zd,n=t.length,r,s="value"in Dr?Dr.value:Dr.textContent,l=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[l-r];r++);return Qa=s.slice(e,1<r?1-r:void 0)}function Ya(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ma(){return!0}function lh(){return!1}function Xt(e){function t(n,r,s,l,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=l,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Ma:lh,this.isPropagationStopped=lh,this}return Ke(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ma)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ma)},persist:function(){},isPersistent:Ma}),t}var Rl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Id=Xt(Rl),ea=Ke({},Rl,{view:0,detail:0}),Sx=Xt(ea),Lu,Mu,Zl,qo=Ke({},ea,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Od,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Zl&&(Zl&&e.type==="mousemove"?(Lu=e.screenX-Zl.screenX,Mu=e.screenY-Zl.screenY):Mu=Lu=0,Zl=e),Lu)},movementY:function(e){return"movementY"in e?e.movementY:Mu}}),ih=Xt(qo),Nx=Ke({},qo,{dataTransfer:0}),jx=Xt(Nx),Ex=Ke({},ea,{relatedTarget:0}),Ru=Xt(Ex),Cx=Ke({},Rl,{animationName:0,elapsedTime:0,pseudoElement:0}),Tx=Xt(Cx),Ax=Ke({},Rl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Px=Xt(Ax),Lx=Ke({},Rl,{data:0}),ah=Xt(Lx),Mx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Rx={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"},$x={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$x[e])?!!t[e]:!1}function Od(){return Dx}var zx=Ke({},ea,{key:function(e){if(e.key){var t=Mx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ya(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Rx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Od,charCode:function(e){return e.type==="keypress"?Ya(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ya(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ix=Xt(zx),Ox=Ke({},qo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oh=Xt(Ox),Ux=Ke({},ea,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Od}),Fx=Xt(Ux),Vx=Ke({},Rl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bx=Xt(Vx),Hx=Ke({},qo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Kx=Xt(Hx),Wx=[9,13,27,32],Ud=gr&&"CompositionEvent"in window,fi=null;gr&&"documentMode"in document&&(fi=document.documentMode);var Gx=gr&&"TextEvent"in window&&!fi,ym=gr&&(!Ud||fi&&8<fi&&11>=fi),uh=" ",ch=!1;function wm(e,t){switch(e){case"keyup":return Wx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gs=!1;function qx(e,t){switch(e){case"compositionend":return bm(t);case"keypress":return t.which!==32?null:(ch=!0,uh);case"textInput":return e=t.data,e===uh&&ch?null:e;default:return null}}function Qx(e,t){if(Gs)return e==="compositionend"||!Ud&&wm(e,t)?(e=xm(),Qa=zd=Dr=null,Gs=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ym&&t.locale!=="ko"?null:t.data;default:return null}}var Yx={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 dh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yx[e.type]:t==="textarea"}function km(e,t,n,r){Xp(r),t=wo(t,"onChange"),0<t.length&&(n=new Id("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hi=null,Pi=null;function Zx(e){Mm(e,0)}function Qo(e){var t=Ys(e);if(Wp(t))return e}function Jx(e,t){if(e==="change")return t}var _m=!1;if(gr){var $u;if(gr){var Du="oninput"in document;if(!Du){var fh=document.createElement("div");fh.setAttribute("oninput","return;"),Du=typeof fh.oninput=="function"}$u=Du}else $u=!1;_m=$u&&(!document.documentMode||9<document.documentMode)}function hh(){hi&&(hi.detachEvent("onpropertychange",Sm),Pi=hi=null)}function Sm(e){if(e.propertyName==="value"&&Qo(Pi)){var t=[];km(t,Pi,e,Ld(e)),rm(Zx,t)}}function Xx(e,t,n){e==="focusin"?(hh(),hi=t,Pi=n,hi.attachEvent("onpropertychange",Sm)):e==="focusout"&&hh()}function e1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qo(Pi)}function t1(e,t){if(e==="click")return Qo(t)}function n1(e,t){if(e==="input"||e==="change")return Qo(t)}function r1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rn=typeof Object.is=="function"?Object.is:r1;function Li(e,t){if(Rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!ac.call(t,s)||!Rn(e[s],t[s]))return!1}return!0}function ph(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mh(e,t){var n=ph(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=ph(n)}}function Nm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jm(){for(var e=window,t=ho();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ho(e.document)}return t}function Fd(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 s1(e){var t=jm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Nm(n.ownerDocument.documentElement,n)){if(r!==null&&Fd(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 s=n.textContent.length,l=Math.min(r.start,s);r=r.end===void 0?l:Math.min(r.end,s),!e.extend&&l>r&&(s=r,r=l,l=s),s=mh(n,l);var a=mh(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var l1=gr&&"documentMode"in document&&11>=document.documentMode,qs=null,jc=null,pi=null,Ec=!1;function gh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ec||qs==null||qs!==ho(r)||(r=qs,"selectionStart"in r&&Fd(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}),pi&&Li(pi,r)||(pi=r,r=wo(jc,"onSelect"),0<r.length&&(t=new Id("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=qs)))}function Ra(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qs={animationend:Ra("Animation","AnimationEnd"),animationiteration:Ra("Animation","AnimationIteration"),animationstart:Ra("Animation","AnimationStart"),transitionend:Ra("Transition","TransitionEnd")},zu={},Em={};gr&&(Em=document.createElement("div").style,"AnimationEvent"in window||(delete Qs.animationend.animation,delete Qs.animationiteration.animation,delete Qs.animationstart.animation),"TransitionEvent"in window||delete Qs.transitionend.transition);function Yo(e){if(zu[e])return zu[e];if(!Qs[e])return e;var t=Qs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Em)return zu[e]=t[n];return e}var Cm=Yo("animationend"),Tm=Yo("animationiteration"),Am=Yo("animationstart"),Pm=Yo("transitionend"),Lm=new Map,vh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");function es(e,t){Lm.set(e,t),Ms(t,[e])}for(var Iu=0;Iu<vh.length;Iu++){var Ou=vh[Iu],i1=Ou.toLowerCase(),a1=Ou[0].toUpperCase()+Ou.slice(1);es(i1,"on"+a1)}es(Cm,"onAnimationEnd");es(Tm,"onAnimationIteration");es(Am,"onAnimationStart");es("dblclick","onDoubleClick");es("focusin","onFocus");es("focusout","onBlur");es(Pm,"onTransitionEnd");bl("onMouseEnter",["mouseout","mouseover"]);bl("onMouseLeave",["mouseout","mouseover"]);bl("onPointerEnter",["pointerout","pointerover"]);bl("onPointerLeave",["pointerout","pointerover"]);Ms("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ms("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ms("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ms("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ms("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ms("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ii="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(" "),o1=new Set("cancel close invalid load scroll toggle".split(" ").concat(ii));function xh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ix(r,t,void 0,e),e.currentTarget=null}function Mm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],u=o.instance,c=o.currentTarget;if(o=o.listener,u!==l&&s.isPropagationStopped())break e;xh(s,o,c),l=u}else for(a=0;a<r.length;a++){if(o=r[a],u=o.instance,c=o.currentTarget,o=o.listener,u!==l&&s.isPropagationStopped())break e;xh(s,o,c),l=u}}}if(mo)throw e=kc,mo=!1,kc=null,e}function Re(e,t){var n=t[Lc];n===void 0&&(n=t[Lc]=new Set);var r=e+"__bubble";n.has(r)||(Rm(t,e,2,!1),n.add(r))}function Uu(e,t,n){var r=0;t&&(r|=4),Rm(n,e,r,t)}var $a="_reactListening"+Math.random().toString(36).slice(2);function Mi(e){if(!e[$a]){e[$a]=!0,Fp.forEach(function(n){n!=="selectionchange"&&(o1.has(n)||Uu(n,!1,e),Uu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$a]||(t[$a]=!0,Uu("selectionchange",!1,t))}}function Rm(e,t,n,r){switch(vm(t)){case 1:var s=kx;break;case 4:s=_x;break;default:s=Dd}n=s.bind(null,t,n,e),s=void 0,!bc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Fu(e,t,n,r,s){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===s||o.nodeType===8&&o.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;a=a.return}for(;o!==null;){if(a=os(o),a===null)return;if(u=a.tag,u===5||u===6){r=l=a;continue e}o=o.parentNode}}r=r.return}rm(function(){var c=l,f=Ld(n),g=[];e:{var d=Lm.get(e);if(d!==void 0){var w=Id,y=e;switch(e){case"keypress":if(Ya(n)===0)break e;case"keydown":case"keyup":w=Ix;break;case"focusin":y="focus",w=Ru;break;case"focusout":y="blur",w=Ru;break;case"beforeblur":case"afterblur":w=Ru;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":w=ih;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=jx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=Fx;break;case Cm:case Tm:case Am:w=Tx;break;case Pm:w=Bx;break;case"scroll":w=Sx;break;case"wheel":w=Kx;break;case"copy":case"cut":case"paste":w=Px;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=oh}var N=(t&4)!==0,R=!N&&e==="scroll",v=N?d!==null?d+"Capture":null:d;N=[];for(var h=c,m;h!==null;){m=h;var _=m.stateNode;if(m.tag===5&&_!==null&&(m=_,v!==null&&(_=Ei(h,v),_!=null&&N.push(Ri(h,_,m)))),R)break;h=h.return}0<N.length&&(d=new w(d,y,null,n,f),g.push({event:d,listeners:N}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",d&&n!==yc&&(y=n.relatedTarget||n.fromElement)&&(os(y)||y[vr]))break e;if((w||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,w?(y=n.relatedTarget||n.toElement,w=c,y=y?os(y):null,y!==null&&(R=Rs(y),y!==R||y.tag!==5&&y.tag!==6)&&(y=null)):(w=null,y=c),w!==y)){if(N=ih,_="onMouseLeave",v="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(N=oh,_="onPointerLeave",v="onPointerEnter",h="pointer"),R=w==null?d:Ys(w),m=y==null?d:Ys(y),d=new N(_,h+"leave",w,n,f),d.target=R,d.relatedTarget=m,_=null,os(f)===c&&(N=new N(v,h+"enter",y,n,f),N.target=m,N.relatedTarget=R,_=N),R=_,w&&y)t:{for(N=w,v=y,h=0,m=N;m;m=Us(m))h++;for(m=0,_=v;_;_=Us(_))m++;for(;0<h-m;)N=Us(N),h--;for(;0<m-h;)v=Us(v),m--;for(;h--;){if(N===v||v!==null&&N===v.alternate)break t;N=Us(N),v=Us(v)}N=null}else N=null;w!==null&&yh(g,d,w,N,!1),y!==null&&R!==null&&yh(g,R,y,N,!0)}}e:{if(d=c?Ys(c):window,w=d.nodeName&&d.nodeName.toLowerCase(),w==="select"||w==="input"&&d.type==="file")var C=Jx;else if(dh(d))if(_m)C=n1;else{C=e1;var E=Xx}else(w=d.nodeName)&&w.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=t1);if(C&&(C=C(e,c))){km(g,C,n,f);break e}E&&E(e,d,c),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&pc(d,"number",d.value)}switch(E=c?Ys(c):window,e){case"focusin":(dh(E)||E.contentEditable==="true")&&(qs=E,jc=c,pi=null);break;case"focusout":pi=jc=qs=null;break;case"mousedown":Ec=!0;break;case"contextmenu":case"mouseup":case"dragend":Ec=!1,gh(g,n,f);break;case"selectionchange":if(l1)break;case"keydown":case"keyup":gh(g,n,f)}var j;if(Ud)e:{switch(e){case"compositionstart":var L="onCompositionStart";break e;case"compositionend":L="onCompositionEnd";break e;case"compositionupdate":L="onCompositionUpdate";break e}L=void 0}else Gs?wm(e,n)&&(L="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(L="onCompositionStart");L&&(ym&&n.locale!=="ko"&&(Gs||L!=="onCompositionStart"?L==="onCompositionEnd"&&Gs&&(j=xm()):(Dr=f,zd="value"in Dr?Dr.value:Dr.textContent,Gs=!0)),E=wo(c,L),0<E.length&&(L=new ah(L,e,null,n,f),g.push({event:L,listeners:E}),j?L.data=j:(j=bm(n),j!==null&&(L.data=j)))),(j=Gx?qx(e,n):Qx(e,n))&&(c=wo(c,"onBeforeInput"),0<c.length&&(f=new ah("onBeforeInput","beforeinput",null,n,f),g.push({event:f,listeners:c}),f.data=j))}Mm(g,t)})}function Ri(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wo(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,l=s.stateNode;s.tag===5&&l!==null&&(s=l,l=Ei(e,n),l!=null&&r.unshift(Ri(e,l,s)),l=Ei(e,t),l!=null&&r.push(Ri(e,l,s))),e=e.return}return r}function Us(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function yh(e,t,n,r,s){for(var l=t._reactName,a=[];n!==null&&n!==r;){var o=n,u=o.alternate,c=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&c!==null&&(o=c,s?(u=Ei(n,l),u!=null&&a.unshift(Ri(n,u,o))):s||(u=Ei(n,l),u!=null&&a.push(Ri(n,u,o)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var u1=/\r\n?/g,c1=/\u0000|\uFFFD/g;function wh(e){return(typeof e=="string"?e:""+e).replace(u1,`
|
||
`).replace(c1,"")}function Da(e,t,n){if(t=wh(t),wh(e)!==t&&n)throw Error(D(425))}function bo(){}var Cc=null,Tc=null;function Ac(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Pc=typeof setTimeout=="function"?setTimeout:void 0,d1=typeof clearTimeout=="function"?clearTimeout:void 0,bh=typeof Promise=="function"?Promise:void 0,f1=typeof queueMicrotask=="function"?queueMicrotask:typeof bh<"u"?function(e){return bh.resolve(null).then(e).catch(h1)}:Pc;function h1(e){setTimeout(function(){throw e})}function Vu(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Ai(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Ai(t)}function Vr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function kh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var $l=Math.random().toString(36).slice(2),Gn="__reactFiber$"+$l,$i="__reactProps$"+$l,vr="__reactContainer$"+$l,Lc="__reactEvents$"+$l,p1="__reactListeners$"+$l,m1="__reactHandles$"+$l;function os(e){var t=e[Gn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[vr]||n[Gn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=kh(e);e!==null;){if(n=e[Gn])return n;e=kh(e)}return t}e=n,n=e.parentNode}return null}function ta(e){return e=e[Gn]||e[vr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ys(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function Zo(e){return e[$i]||null}var Mc=[],Zs=-1;function ts(e){return{current:e}}function De(e){0>Zs||(e.current=Mc[Zs],Mc[Zs]=null,Zs--)}function Le(e,t){Zs++,Mc[Zs]=e.current,e.current=t}var Yr={},kt=ts(Yr),zt=ts(!1),Ns=Yr;function kl(e,t){var n=e.type.contextTypes;if(!n)return Yr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},l;for(l in n)s[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function It(e){return e=e.childContextTypes,e!=null}function ko(){De(zt),De(kt)}function _h(e,t,n){if(kt.current!==Yr)throw Error(D(168));Le(kt,t),Le(zt,n)}function $m(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(D(108,X0(e)||"Unknown",s));return Ke({},n,r)}function _o(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yr,Ns=kt.current,Le(kt,e),Le(zt,zt.current),!0}function Sh(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=$m(e,t,Ns),r.__reactInternalMemoizedMergedChildContext=e,De(zt),De(kt),Le(kt,e)):De(zt),Le(zt,n)}var lr=null,Jo=!1,Bu=!1;function Dm(e){lr===null?lr=[e]:lr.push(e)}function g1(e){Jo=!0,Dm(e)}function ns(){if(!Bu&&lr!==null){Bu=!0;var e=0,t=je;try{var n=lr;for(je=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}lr=null,Jo=!1}catch(s){throw lr!==null&&(lr=lr.slice(e+1)),am(Md,ns),s}finally{je=t,Bu=!1}}return null}var Js=[],Xs=0,So=null,No=0,on=[],un=0,js=null,dr=1,fr="";function is(e,t){Js[Xs++]=No,Js[Xs++]=So,So=e,No=t}function zm(e,t,n){on[un++]=dr,on[un++]=fr,on[un++]=js,js=e;var r=dr;e=fr;var s=32-An(r)-1;r&=~(1<<s),n+=1;var l=32-An(t)+s;if(30<l){var a=s-s%5;l=(r&(1<<a)-1).toString(32),r>>=a,s-=a,dr=1<<32-An(t)+s|n<<s|r,fr=l+e}else dr=1<<l|n<<s|r,fr=e}function Vd(e){e.return!==null&&(is(e,1),zm(e,1,0))}function Bd(e){for(;e===So;)So=Js[--Xs],Js[Xs]=null,No=Js[--Xs],Js[Xs]=null;for(;e===js;)js=on[--un],on[un]=null,fr=on[--un],on[un]=null,dr=on[--un],on[un]=null}var Qt=null,qt=null,Ue=!1,En=null;function Im(e,t){var n=dn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Nh(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Qt=e,qt=Vr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Qt=e,qt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=js!==null?{id:dr,overflow:fr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=dn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Qt=e,qt=null,!0):!1;default:return!1}}function Rc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function $c(e){if(Ue){var t=qt;if(t){var n=t;if(!Nh(e,t)){if(Rc(e))throw Error(D(418));t=Vr(n.nextSibling);var r=Qt;t&&Nh(e,t)?Im(r,n):(e.flags=e.flags&-4097|2,Ue=!1,Qt=e)}}else{if(Rc(e))throw Error(D(418));e.flags=e.flags&-4097|2,Ue=!1,Qt=e}}}function jh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Qt=e}function za(e){if(e!==Qt)return!1;if(!Ue)return jh(e),Ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ac(e.type,e.memoizedProps)),t&&(t=qt)){if(Rc(e))throw Om(),Error(D(418));for(;t;)Im(e,t),t=Vr(t.nextSibling)}if(jh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){qt=Vr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}qt=null}}else qt=Qt?Vr(e.stateNode.nextSibling):null;return!0}function Om(){for(var e=qt;e;)e=Vr(e.nextSibling)}function _l(){qt=Qt=null,Ue=!1}function Hd(e){En===null?En=[e]:En.push(e)}var v1=kr.ReactCurrentBatchConfig;function Jl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(D(309));var r=n.stateNode}if(!r)throw Error(D(147,e));var s=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(a){var o=s.refs;a===null?delete o[l]:o[l]=a},t._stringRef=l,t)}if(typeof e!="string")throw Error(D(284));if(!n._owner)throw Error(D(290,e))}return e}function Ia(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Eh(e){var t=e._init;return t(e._payload)}function Um(e){function t(v,h){if(e){var m=v.deletions;m===null?(v.deletions=[h],v.flags|=16):m.push(h)}}function n(v,h){if(!e)return null;for(;h!==null;)t(v,h),h=h.sibling;return null}function r(v,h){for(v=new Map;h!==null;)h.key!==null?v.set(h.key,h):v.set(h.index,h),h=h.sibling;return v}function s(v,h){return v=Wr(v,h),v.index=0,v.sibling=null,v}function l(v,h,m){return v.index=m,e?(m=v.alternate,m!==null?(m=m.index,m<h?(v.flags|=2,h):m):(v.flags|=2,h)):(v.flags|=1048576,h)}function a(v){return e&&v.alternate===null&&(v.flags|=2),v}function o(v,h,m,_){return h===null||h.tag!==6?(h=Yu(m,v.mode,_),h.return=v,h):(h=s(h,m),h.return=v,h)}function u(v,h,m,_){var C=m.type;return C===Ws?f(v,h,m.props.children,_,m.key):h!==null&&(h.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Tr&&Eh(C)===h.type)?(_=s(h,m.props),_.ref=Jl(v,h,m),_.return=v,_):(_=ro(m.type,m.key,m.props,null,v.mode,_),_.ref=Jl(v,h,m),_.return=v,_)}function c(v,h,m,_){return h===null||h.tag!==4||h.stateNode.containerInfo!==m.containerInfo||h.stateNode.implementation!==m.implementation?(h=Zu(m,v.mode,_),h.return=v,h):(h=s(h,m.children||[]),h.return=v,h)}function f(v,h,m,_,C){return h===null||h.tag!==7?(h=bs(m,v.mode,_,C),h.return=v,h):(h=s(h,m),h.return=v,h)}function g(v,h,m){if(typeof h=="string"&&h!==""||typeof h=="number")return h=Yu(""+h,v.mode,m),h.return=v,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Ea:return m=ro(h.type,h.key,h.props,null,v.mode,m),m.ref=Jl(v,null,h),m.return=v,m;case Ks:return h=Zu(h,v.mode,m),h.return=v,h;case Tr:var _=h._init;return g(v,_(h._payload),m)}if(si(h)||Gl(h))return h=bs(h,v.mode,m,null),h.return=v,h;Ia(v,h)}return null}function d(v,h,m,_){var C=h!==null?h.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return C!==null?null:o(v,h,""+m,_);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ea:return m.key===C?u(v,h,m,_):null;case Ks:return m.key===C?c(v,h,m,_):null;case Tr:return C=m._init,d(v,h,C(m._payload),_)}if(si(m)||Gl(m))return C!==null?null:f(v,h,m,_,null);Ia(v,m)}return null}function w(v,h,m,_,C){if(typeof _=="string"&&_!==""||typeof _=="number")return v=v.get(m)||null,o(h,v,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ea:return v=v.get(_.key===null?m:_.key)||null,u(h,v,_,C);case Ks:return v=v.get(_.key===null?m:_.key)||null,c(h,v,_,C);case Tr:var E=_._init;return w(v,h,m,E(_._payload),C)}if(si(_)||Gl(_))return v=v.get(m)||null,f(h,v,_,C,null);Ia(h,_)}return null}function y(v,h,m,_){for(var C=null,E=null,j=h,L=h=0,G=null;j!==null&&L<m.length;L++){j.index>L?(G=j,j=null):G=j.sibling;var P=d(v,j,m[L],_);if(P===null){j===null&&(j=G);break}e&&j&&P.alternate===null&&t(v,j),h=l(P,h,L),E===null?C=P:E.sibling=P,E=P,j=G}if(L===m.length)return n(v,j),Ue&&is(v,L),C;if(j===null){for(;L<m.length;L++)j=g(v,m[L],_),j!==null&&(h=l(j,h,L),E===null?C=j:E.sibling=j,E=j);return Ue&&is(v,L),C}for(j=r(v,j);L<m.length;L++)G=w(j,v,L,m[L],_),G!==null&&(e&&G.alternate!==null&&j.delete(G.key===null?L:G.key),h=l(G,h,L),E===null?C=G:E.sibling=G,E=G);return e&&j.forEach(function(Y){return t(v,Y)}),Ue&&is(v,L),C}function N(v,h,m,_){var C=Gl(m);if(typeof C!="function")throw Error(D(150));if(m=C.call(m),m==null)throw Error(D(151));for(var E=C=null,j=h,L=h=0,G=null,P=m.next();j!==null&&!P.done;L++,P=m.next()){j.index>L?(G=j,j=null):G=j.sibling;var Y=d(v,j,P.value,_);if(Y===null){j===null&&(j=G);break}e&&j&&Y.alternate===null&&t(v,j),h=l(Y,h,L),E===null?C=Y:E.sibling=Y,E=Y,j=G}if(P.done)return n(v,j),Ue&&is(v,L),C;if(j===null){for(;!P.done;L++,P=m.next())P=g(v,P.value,_),P!==null&&(h=l(P,h,L),E===null?C=P:E.sibling=P,E=P);return Ue&&is(v,L),C}for(j=r(v,j);!P.done;L++,P=m.next())P=w(j,v,L,P.value,_),P!==null&&(e&&P.alternate!==null&&j.delete(P.key===null?L:P.key),h=l(P,h,L),E===null?C=P:E.sibling=P,E=P);return e&&j.forEach(function(ae){return t(v,ae)}),Ue&&is(v,L),C}function R(v,h,m,_){if(typeof m=="object"&&m!==null&&m.type===Ws&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Ea:e:{for(var C=m.key,E=h;E!==null;){if(E.key===C){if(C=m.type,C===Ws){if(E.tag===7){n(v,E.sibling),h=s(E,m.props.children),h.return=v,v=h;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Tr&&Eh(C)===E.type){n(v,E.sibling),h=s(E,m.props),h.ref=Jl(v,E,m),h.return=v,v=h;break e}n(v,E);break}else t(v,E);E=E.sibling}m.type===Ws?(h=bs(m.props.children,v.mode,_,m.key),h.return=v,v=h):(_=ro(m.type,m.key,m.props,null,v.mode,_),_.ref=Jl(v,h,m),_.return=v,v=_)}return a(v);case Ks:e:{for(E=m.key;h!==null;){if(h.key===E)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(v,h.sibling),h=s(h,m.children||[]),h.return=v,v=h;break e}else{n(v,h);break}else t(v,h);h=h.sibling}h=Zu(m,v.mode,_),h.return=v,v=h}return a(v);case Tr:return E=m._init,R(v,h,E(m._payload),_)}if(si(m))return y(v,h,m,_);if(Gl(m))return N(v,h,m,_);Ia(v,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(n(v,h.sibling),h=s(h,m),h.return=v,v=h):(n(v,h),h=Yu(m,v.mode,_),h.return=v,v=h),a(v)):n(v,h)}return R}var Sl=Um(!0),Fm=Um(!1),jo=ts(null),Eo=null,el=null,Kd=null;function Wd(){Kd=el=Eo=null}function Gd(e){var t=jo.current;De(jo),e._currentValue=t}function Dc(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 ol(e,t){Eo=e,Kd=el=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Dt=!0),e.firstContext=null)}function gn(e){var t=e._currentValue;if(Kd!==e)if(e={context:e,memoizedValue:t,next:null},el===null){if(Eo===null)throw Error(D(308));el=e,Eo.dependencies={lanes:0,firstContext:e}}else el=el.next=e;return t}var us=null;function qd(e){us===null?us=[e]:us.push(e)}function Vm(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,qd(t)):(n.next=s.next,s.next=n),t.interleaved=n,xr(e,r)}function xr(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 Ar=!1;function Qd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bm(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 pr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Br(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,we&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,xr(e,n)}return s=r.interleaved,s===null?(t.next=t,qd(r)):(t.next=s.next,s.next=t),r.interleaved=t,xr(e,n)}function Za(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,Rd(e,n)}}function Ch(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?s=l=a:l=l.next=a,n=n.next}while(n!==null);l===null?s=l=t:l=l.next=t}else s=l=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:l,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 Co(e,t,n,r){var s=e.updateQueue;Ar=!1;var l=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var u=o,c=u.next;u.next=null,a===null?l=c:a.next=c,a=u;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==a&&(o===null?f.firstBaseUpdate=c:o.next=c,f.lastBaseUpdate=u))}if(l!==null){var g=s.baseState;a=0,f=c=u=null,o=l;do{var d=o.lane,w=o.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:w,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=e,N=o;switch(d=t,w=n,N.tag){case 1:if(y=N.payload,typeof y=="function"){g=y.call(w,g,d);break e}g=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=N.payload,d=typeof y=="function"?y.call(w,g,d):y,d==null)break e;g=Ke({},g,d);break e;case 2:Ar=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,d=s.effects,d===null?s.effects=[o]:d.push(o))}else w={eventTime:w,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(c=f=w,u=g):f=f.next=w,a|=d;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;d=o,o=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(!0);if(f===null&&(u=g),s.baseState=u,s.firstBaseUpdate=c,s.lastBaseUpdate=f,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else l===null&&(s.shared.lanes=0);Cs|=a,e.lanes=a,e.memoizedState=g}}function Th(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(D(191,s));s.call(r)}}}var na={},Yn=ts(na),Di=ts(na),zi=ts(na);function cs(e){if(e===na)throw Error(D(174));return e}function Yd(e,t){switch(Le(zi,t),Le(Di,e),Le(Yn,na),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gc(t,e)}De(Yn),Le(Yn,t)}function Nl(){De(Yn),De(Di),De(zi)}function Hm(e){cs(zi.current);var t=cs(Yn.current),n=gc(t,e.type);t!==n&&(Le(Di,e),Le(Yn,n))}function Zd(e){Di.current===e&&(De(Yn),De(Di))}var Be=ts(0);function To(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hu=[];function Jd(){for(var e=0;e<Hu.length;e++)Hu[e]._workInProgressVersionPrimary=null;Hu.length=0}var Ja=kr.ReactCurrentDispatcher,Ku=kr.ReactCurrentBatchConfig,Es=0,He=null,Xe=null,it=null,Ao=!1,mi=!1,Ii=0,x1=0;function xt(){throw Error(D(321))}function Xd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rn(e[n],t[n]))return!1;return!0}function ef(e,t,n,r,s,l){if(Es=l,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ja.current=e===null||e.memoizedState===null?k1:_1,e=n(r,s),mi){l=0;do{if(mi=!1,Ii=0,25<=l)throw Error(D(301));l+=1,it=Xe=null,t.updateQueue=null,Ja.current=S1,e=n(r,s)}while(mi)}if(Ja.current=Po,t=Xe!==null&&Xe.next!==null,Es=0,it=Xe=He=null,Ao=!1,t)throw Error(D(300));return e}function tf(){var e=Ii!==0;return Ii=0,e}function Vn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?He.memoizedState=it=e:it=it.next=e,it}function vn(){if(Xe===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=it===null?He.memoizedState:it.next;if(t!==null)it=t,Xe=e;else{if(e===null)throw Error(D(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},it===null?He.memoizedState=it=e:it=it.next=e}return it}function Oi(e,t){return typeof t=="function"?t(e):t}function Wu(e){var t=vn(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=Xe,s=r.baseQueue,l=n.pending;if(l!==null){if(s!==null){var a=s.next;s.next=l.next,l.next=a}r.baseQueue=s=l,n.pending=null}if(s!==null){l=s.next,r=r.baseState;var o=a=null,u=null,c=l;do{var f=c.lane;if((Es&f)===f)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var g={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(o=u=g,a=r):u=u.next=g,He.lanes|=f,Cs|=f}c=c.next}while(c!==null&&c!==l);u===null?a=r:u.next=o,Rn(r,t.memoizedState)||(Dt=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do l=s.lane,He.lanes|=l,Cs|=l,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Gu(e){var t=vn(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,l=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do l=e(l,a.action),a=a.next;while(a!==s);Rn(l,t.memoizedState)||(Dt=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function Km(){}function Wm(e,t){var n=He,r=vn(),s=t(),l=!Rn(r.memoizedState,s);if(l&&(r.memoizedState=s,Dt=!0),r=r.queue,nf(Qm.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||it!==null&&it.memoizedState.tag&1){if(n.flags|=2048,Ui(9,qm.bind(null,n,r,s,t),void 0,null),ot===null)throw Error(D(349));Es&30||Gm(n,t,s)}return s}function Gm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=He.updateQueue,t===null?(t={lastEffect:null,stores:null},He.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function qm(e,t,n,r){t.value=n,t.getSnapshot=r,Ym(t)&&Zm(e)}function Qm(e,t,n){return n(function(){Ym(t)&&Zm(e)})}function Ym(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rn(e,n)}catch{return!0}}function Zm(e){var t=xr(e,1);t!==null&&Pn(t,e,1,-1)}function Ah(e){var t=Vn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:e},t.queue=e,e=e.dispatch=b1.bind(null,He,e),[t.memoizedState,e]}function Ui(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=He.updateQueue,t===null?(t={lastEffect:null,stores:null},He.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Jm(){return vn().memoizedState}function Xa(e,t,n,r){var s=Vn();He.flags|=e,s.memoizedState=Ui(1|t,n,void 0,r===void 0?null:r)}function Xo(e,t,n,r){var s=vn();r=r===void 0?null:r;var l=void 0;if(Xe!==null){var a=Xe.memoizedState;if(l=a.destroy,r!==null&&Xd(r,a.deps)){s.memoizedState=Ui(t,n,l,r);return}}He.flags|=e,s.memoizedState=Ui(1|t,n,l,r)}function Ph(e,t){return Xa(8390656,8,e,t)}function nf(e,t){return Xo(2048,8,e,t)}function Xm(e,t){return Xo(4,2,e,t)}function eg(e,t){return Xo(4,4,e,t)}function tg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ng(e,t,n){return n=n!=null?n.concat([e]):null,Xo(4,4,tg.bind(null,t,e),n)}function rf(){}function rg(e,t){var n=vn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function sg(e,t){var n=vn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function lg(e,t,n){return Es&21?(Rn(n,t)||(n=cm(),He.lanes|=n,Cs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Dt=!0),e.memoizedState=n)}function y1(e,t){var n=je;je=n!==0&&4>n?n:4,e(!0);var r=Ku.transition;Ku.transition={};try{e(!1),t()}finally{je=n,Ku.transition=r}}function ig(){return vn().memoizedState}function w1(e,t,n){var r=Kr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ag(e))og(t,n);else if(n=Vm(e,t,n,r),n!==null){var s=Et();Pn(n,e,r,s),ug(n,t,r)}}function b1(e,t,n){var r=Kr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ag(e))og(t,s);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var a=t.lastRenderedState,o=l(a,n);if(s.hasEagerState=!0,s.eagerState=o,Rn(o,a)){var u=t.interleaved;u===null?(s.next=s,qd(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Vm(e,t,s,r),n!==null&&(s=Et(),Pn(n,e,r,s),ug(n,t,r))}}function ag(e){var t=e.alternate;return e===He||t!==null&&t===He}function og(e,t){mi=Ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ug(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rd(e,n)}}var Po={readContext:gn,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useInsertionEffect:xt,useLayoutEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useMutableSource:xt,useSyncExternalStore:xt,useId:xt,unstable_isNewReconciler:!1},k1={readContext:gn,useCallback:function(e,t){return Vn().memoizedState=[e,t===void 0?null:t],e},useContext:gn,useEffect:Ph,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Xa(4194308,4,tg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xa(4,2,e,t)},useMemo:function(e,t){var n=Vn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vn();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=w1.bind(null,He,e),[r.memoizedState,e]},useRef:function(e){var t=Vn();return e={current:e},t.memoizedState=e},useState:Ah,useDebugValue:rf,useDeferredValue:function(e){return Vn().memoizedState=e},useTransition:function(){var e=Ah(!1),t=e[0];return e=y1.bind(null,e[1]),Vn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=He,s=Vn();if(Ue){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),ot===null)throw Error(D(349));Es&30||Gm(r,t,n)}s.memoizedState=n;var l={value:n,getSnapshot:t};return s.queue=l,Ph(Qm.bind(null,r,l,e),[e]),r.flags|=2048,Ui(9,qm.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Vn(),t=ot.identifierPrefix;if(Ue){var n=fr,r=dr;n=(r&~(1<<32-An(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ii++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=x1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},_1={readContext:gn,useCallback:rg,useContext:gn,useEffect:nf,useImperativeHandle:ng,useInsertionEffect:Xm,useLayoutEffect:eg,useMemo:sg,useReducer:Wu,useRef:Jm,useState:function(){return Wu(Oi)},useDebugValue:rf,useDeferredValue:function(e){var t=vn();return lg(t,Xe.memoizedState,e)},useTransition:function(){var e=Wu(Oi)[0],t=vn().memoizedState;return[e,t]},useMutableSource:Km,useSyncExternalStore:Wm,useId:ig,unstable_isNewReconciler:!1},S1={readContext:gn,useCallback:rg,useContext:gn,useEffect:nf,useImperativeHandle:ng,useInsertionEffect:Xm,useLayoutEffect:eg,useMemo:sg,useReducer:Gu,useRef:Jm,useState:function(){return Gu(Oi)},useDebugValue:rf,useDeferredValue:function(e){var t=vn();return Xe===null?t.memoizedState=e:lg(t,Xe.memoizedState,e)},useTransition:function(){var e=Gu(Oi)[0],t=vn().memoizedState;return[e,t]},useMutableSource:Km,useSyncExternalStore:Wm,useId:ig,unstable_isNewReconciler:!1};function _n(e,t){if(e&&e.defaultProps){t=Ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function zc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var eu={isMounted:function(e){return(e=e._reactInternals)?Rs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Et(),s=Kr(e),l=pr(r,s);l.payload=t,n!=null&&(l.callback=n),t=Br(e,l,s),t!==null&&(Pn(t,e,s,r),Za(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Et(),s=Kr(e),l=pr(r,s);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Br(e,l,s),t!==null&&(Pn(t,e,s,r),Za(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Et(),r=Kr(e),s=pr(n,r);s.tag=2,t!=null&&(s.callback=t),t=Br(e,s,r),t!==null&&(Pn(t,e,r,n),Za(t,e,r))}};function Lh(e,t,n,r,s,l,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,a):t.prototype&&t.prototype.isPureReactComponent?!Li(n,r)||!Li(s,l):!0}function cg(e,t,n){var r=!1,s=Yr,l=t.contextType;return typeof l=="object"&&l!==null?l=gn(l):(s=It(t)?Ns:kt.current,r=t.contextTypes,l=(r=r!=null)?kl(e,s):Yr),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=eu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=l),t}function Mh(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&eu.enqueueReplaceState(t,t.state,null)}function Ic(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Qd(e);var l=t.contextType;typeof l=="object"&&l!==null?s.context=gn(l):(l=It(t)?Ns:kt.current,s.context=kl(e,l)),s.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(zc(e,t,l,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&eu.enqueueReplaceState(s,s.state,null),Co(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function jl(e,t){try{var n="",r=t;do n+=J0(r),r=r.return;while(r);var s=n}catch(l){s=`
|
||
Error generating stack: `+l.message+`
|
||
`+l.stack}return{value:e,source:t,stack:s,digest:null}}function qu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Oc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var N1=typeof WeakMap=="function"?WeakMap:Map;function dg(e,t,n){n=pr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Mo||(Mo=!0,Qc=r),Oc(e,t)},n}function fg(e,t,n){n=pr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Oc(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Oc(e,t),typeof r!="function"&&(Hr===null?Hr=new Set([this]):Hr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Rh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new N1;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=O1.bind(null,e,t,n),t.then(e,e))}function $h(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Dh(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=pr(-1,1),t.tag=2,Br(n,t,1))),n.lanes|=1),e)}var j1=kr.ReactCurrentOwner,Dt=!1;function jt(e,t,n,r){t.child=e===null?Fm(t,null,n,r):Sl(t,e.child,n,r)}function zh(e,t,n,r,s){n=n.render;var l=t.ref;return ol(t,s),r=ef(e,t,n,r,l,s),n=tf(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,yr(e,t,s)):(Ue&&n&&Vd(t),t.flags|=1,jt(e,t,r,s),t.child)}function Ih(e,t,n,r,s){if(e===null){var l=n.type;return typeof l=="function"&&!ff(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,hg(e,t,l,r,s)):(e=ro(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&s)){var a=l.memoizedProps;if(n=n.compare,n=n!==null?n:Li,n(a,r)&&e.ref===t.ref)return yr(e,t,s)}return t.flags|=1,e=Wr(l,r),e.ref=t.ref,e.return=t,t.child=e}function hg(e,t,n,r,s){if(e!==null){var l=e.memoizedProps;if(Li(l,r)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=r=l,(e.lanes&s)!==0)e.flags&131072&&(Dt=!0);else return t.lanes=e.lanes,yr(e,t,s)}return Uc(e,t,n,r,s)}function pg(e,t,n){var r=t.pendingProps,s=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Le(nl,Wt),Wt|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Le(nl,Wt),Wt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,Le(nl,Wt),Wt|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,Le(nl,Wt),Wt|=r;return jt(e,t,s,n),t.child}function mg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Uc(e,t,n,r,s){var l=It(n)?Ns:kt.current;return l=kl(t,l),ol(t,s),n=ef(e,t,n,r,l,s),r=tf(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,yr(e,t,s)):(Ue&&r&&Vd(t),t.flags|=1,jt(e,t,n,s),t.child)}function Oh(e,t,n,r,s){if(It(n)){var l=!0;_o(t)}else l=!1;if(ol(t,s),t.stateNode===null)eo(e,t),cg(t,n,r),Ic(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var u=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=gn(c):(c=It(n)?Ns:kt.current,c=kl(t,c));var f=n.getDerivedStateFromProps,g=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||u!==c)&&Mh(t,a,r,c),Ar=!1;var d=t.memoizedState;a.state=d,Co(t,r,a,s),u=t.memoizedState,o!==r||d!==u||zt.current||Ar?(typeof f=="function"&&(zc(t,n,f,r),u=t.memoizedState),(o=Ar||Lh(t,n,o,r,d,u,c))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Bm(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:_n(t.type,o),a.props=c,g=t.pendingProps,d=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=gn(u):(u=It(n)?Ns:kt.current,u=kl(t,u));var w=n.getDerivedStateFromProps;(f=typeof w=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==g||d!==u)&&Mh(t,a,r,u),Ar=!1,d=t.memoizedState,a.state=d,Co(t,r,a,s);var y=t.memoizedState;o!==g||d!==y||zt.current||Ar?(typeof w=="function"&&(zc(t,n,w,r),y=t.memoizedState),(c=Ar||Lh(t,n,c,r,d,y,u)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,y,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,y,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),a.props=r,a.state=y,a.context=u,r=c):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Fc(e,t,n,r,l,s)}function Fc(e,t,n,r,s,l){mg(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&Sh(t,n,!1),yr(e,t,l);r=t.stateNode,j1.current=t;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Sl(t,e.child,null,l),t.child=Sl(t,null,o,l)):jt(e,t,o,l),t.memoizedState=r.state,s&&Sh(t,n,!0),t.child}function gg(e){var t=e.stateNode;t.pendingContext?_h(e,t.pendingContext,t.pendingContext!==t.context):t.context&&_h(e,t.context,!1),Yd(e,t.containerInfo)}function Uh(e,t,n,r,s){return _l(),Hd(s),t.flags|=256,jt(e,t,n,r),t.child}var Vc={dehydrated:null,treeContext:null,retryLane:0};function Bc(e){return{baseLanes:e,cachePool:null,transitions:null}}function vg(e,t,n){var r=t.pendingProps,s=Be.current,l=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Le(Be,s&1),e===null)return $c(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,l?(r=t.mode,l=t.child,a={mode:"hidden",children:a},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=a):l=ru(a,r,0,null),e=bs(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Bc(n),t.memoizedState=Vc,e):sf(t,a));if(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return E1(e,t,a,r,o,s,n);if(l){l=r.fallback,a=t.mode,s=e.child,o=s.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Wr(s,u),r.subtreeFlags=s.subtreeFlags&14680064),o!==null?l=Wr(o,l):(l=bs(l,a,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,a=e.child.memoizedState,a=a===null?Bc(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},l.memoizedState=a,l.childLanes=e.childLanes&~n,t.memoizedState=Vc,r}return l=e.child,e=l.sibling,r=Wr(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function sf(e,t){return t=ru({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Oa(e,t,n,r){return r!==null&&Hd(r),Sl(t,e.child,null,n),e=sf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function E1(e,t,n,r,s,l,a){if(n)return t.flags&256?(t.flags&=-257,r=qu(Error(D(422))),Oa(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,s=t.mode,r=ru({mode:"visible",children:r.children},s,0,null),l=bs(l,s,a,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Sl(t,e.child,null,a),t.child.memoizedState=Bc(a),t.memoizedState=Vc,l);if(!(t.mode&1))return Oa(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var o=r.dgst;return r=o,l=Error(D(419)),r=qu(l,r,void 0),Oa(e,t,a,r)}if(o=(a&e.childLanes)!==0,Dt||o){if(r=ot,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==l.retryLane&&(l.retryLane=s,xr(e,s),Pn(r,e,s,-1))}return df(),r=qu(Error(D(421))),Oa(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=U1.bind(null,e),s._reactRetry=t,null):(e=l.treeContext,qt=Vr(s.nextSibling),Qt=t,Ue=!0,En=null,e!==null&&(on[un++]=dr,on[un++]=fr,on[un++]=js,dr=e.id,fr=e.overflow,js=t),t=sf(t,r.children),t.flags|=4096,t)}function Fh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Dc(e.return,t,n)}function Qu(e,t,n,r,s){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=s)}function xg(e,t,n){var r=t.pendingProps,s=r.revealOrder,l=r.tail;if(jt(e,t,r.children,n),r=Be.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fh(e,n,t);else if(e.tag===19)Fh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Le(Be,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&To(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Qu(t,!1,s,n,l);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&To(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Qu(t,!0,n,null,l);break;case"together":Qu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function eo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function yr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Cs|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=Wr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Wr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function C1(e,t,n){switch(t.tag){case 3:gg(t),_l();break;case 5:Hm(t);break;case 1:It(t.type)&&_o(t);break;case 4:Yd(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Le(jo,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Le(Be,Be.current&1),t.flags|=128,null):n&t.child.childLanes?vg(e,t,n):(Le(Be,Be.current&1),e=yr(e,t,n),e!==null?e.sibling:null);Le(Be,Be.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return xg(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Le(Be,Be.current),r)break;return null;case 22:case 23:return t.lanes=0,pg(e,t,n)}return yr(e,t,n)}var yg,Hc,wg,bg;yg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Hc=function(){};wg=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,cs(Yn.current);var l=null;switch(n){case"input":s=fc(e,s),r=fc(e,r),l=[];break;case"select":s=Ke({},s,{value:void 0}),r=Ke({},r,{value:void 0}),l=[];break;case"textarea":s=mc(e,s),r=mc(e,r),l=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bo)}vc(n,r);var a;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var o=s[c];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ni.hasOwnProperty(c)?l||(l=[]):(l=l||[]).push(c,null));for(c in r){var u=r[c];if(o=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&u!==o&&(u!=null||o!=null))if(c==="style")if(o){for(a in o)!o.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&o[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(l||(l=[]),l.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(l=l||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ni.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&Re("scroll",e),l||o===u||(l=[])):(l=l||[]).push(c,u))}n&&(l=l||[]).push("style",n);var c=l;(t.updateQueue=c)&&(t.flags|=4)}};bg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xl(e,t){if(!Ue)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function T1(e,t,n){var r=t.pendingProps;switch(Bd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return It(t.type)&&ko(),yt(t),null;case 3:return r=t.stateNode,Nl(),De(zt),De(kt),Jd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(za(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,En!==null&&(Jc(En),En=null))),Hc(e,t),yt(t),null;case 5:Zd(t);var s=cs(zi.current);if(n=t.type,e!==null&&t.stateNode!=null)wg(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return yt(t),null}if(e=cs(Yn.current),za(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Gn]=t,r[$i]=l,e=(t.mode&1)!==0,n){case"dialog":Re("cancel",r),Re("close",r);break;case"iframe":case"object":case"embed":Re("load",r);break;case"video":case"audio":for(s=0;s<ii.length;s++)Re(ii[s],r);break;case"source":Re("error",r);break;case"img":case"image":case"link":Re("error",r),Re("load",r);break;case"details":Re("toggle",r);break;case"input":Yf(r,l),Re("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Re("invalid",r);break;case"textarea":Jf(r,l),Re("invalid",r)}vc(n,l),s=null;for(var a in l)if(l.hasOwnProperty(a)){var o=l[a];a==="children"?typeof o=="string"?r.textContent!==o&&(l.suppressHydrationWarning!==!0&&Da(r.textContent,o,e),s=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&Da(r.textContent,o,e),s=["children",""+o]):Ni.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&Re("scroll",r)}switch(n){case"input":Ca(r),Zf(r,l,!0);break;case"textarea":Ca(r),Xf(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=bo)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Qp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Gn]=t,e[$i]=r,yg(e,t,!1,!1),t.stateNode=e;e:{switch(a=xc(n,r),n){case"dialog":Re("cancel",e),Re("close",e),s=r;break;case"iframe":case"object":case"embed":Re("load",e),s=r;break;case"video":case"audio":for(s=0;s<ii.length;s++)Re(ii[s],e);s=r;break;case"source":Re("error",e),s=r;break;case"img":case"image":case"link":Re("error",e),Re("load",e),s=r;break;case"details":Re("toggle",e),s=r;break;case"input":Yf(e,r),s=fc(e,r),Re("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Ke({},r,{value:void 0}),Re("invalid",e);break;case"textarea":Jf(e,r),s=mc(e,r),Re("invalid",e);break;default:s=r}vc(n,s),o=s;for(l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="style"?Jp(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Yp(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&ji(e,u):typeof u=="number"&&ji(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Ni.hasOwnProperty(l)?u!=null&&l==="onScroll"&&Re("scroll",e):u!=null&&Cd(e,l,u,a))}switch(n){case"input":Ca(e),Zf(e,r,!1);break;case"textarea":Ca(e),Xf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Qr(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?sl(e,!!r.multiple,l,!1):r.defaultValue!=null&&sl(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=bo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return yt(t),null;case 6:if(e&&t.stateNode!=null)bg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=cs(zi.current),cs(Yn.current),za(t)){if(r=t.stateNode,n=t.memoizedProps,r[Gn]=t,(l=r.nodeValue!==n)&&(e=Qt,e!==null))switch(e.tag){case 3:Da(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Da(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Gn]=t,t.stateNode=r}return yt(t),null;case 13:if(De(Be),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ue&&qt!==null&&t.mode&1&&!(t.flags&128))Om(),_l(),t.flags|=98560,l=!1;else if(l=za(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(D(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(D(317));l[Gn]=t}else _l(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yt(t),l=!1}else En!==null&&(Jc(En),En=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Be.current&1?tt===0&&(tt=3):df())),t.updateQueue!==null&&(t.flags|=4),yt(t),null);case 4:return Nl(),Hc(e,t),e===null&&Mi(t.stateNode.containerInfo),yt(t),null;case 10:return Gd(t.type._context),yt(t),null;case 17:return It(t.type)&&ko(),yt(t),null;case 19:if(De(Be),l=t.memoizedState,l===null)return yt(t),null;if(r=(t.flags&128)!==0,a=l.rendering,a===null)if(r)Xl(l,!1);else{if(tt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=To(e),a!==null){for(t.flags|=128,Xl(l,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,a=l.alternate,a===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=a.childLanes,l.lanes=a.lanes,l.child=a.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=a.memoizedProps,l.memoizedState=a.memoizedState,l.updateQueue=a.updateQueue,l.type=a.type,e=a.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Le(Be,Be.current&1|2),t.child}e=e.sibling}l.tail!==null&&qe()>El&&(t.flags|=128,r=!0,Xl(l,!1),t.lanes=4194304)}else{if(!r)if(e=To(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!a.alternate&&!Ue)return yt(t),null}else 2*qe()-l.renderingStartTime>El&&n!==1073741824&&(t.flags|=128,r=!0,Xl(l,!1),t.lanes=4194304);l.isBackwards?(a.sibling=t.child,t.child=a):(n=l.last,n!==null?n.sibling=a:t.child=a,l.last=a)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=qe(),t.sibling=null,n=Be.current,Le(Be,r?n&1|2:n&1),t):(yt(t),null);case 22:case 23:return cf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Wt&1073741824&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function A1(e,t){switch(Bd(t),t.tag){case 1:return It(t.type)&&ko(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nl(),De(zt),De(kt),Jd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Zd(t),null;case 13:if(De(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));_l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return De(Be),null;case 4:return Nl(),null;case 10:return Gd(t.type._context),null;case 22:case 23:return cf(),null;case 24:return null;default:return null}}var Ua=!1,bt=!1,P1=typeof WeakSet=="function"?WeakSet:Set,H=null;function tl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){We(e,t,r)}else n.current=null}function Kc(e,t,n){try{n()}catch(r){We(e,t,r)}}var Vh=!1;function L1(e,t){if(Cc=xo,e=jm(),Fd(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 s=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var a=0,o=-1,u=-1,c=0,f=0,g=e,d=null;t:for(;;){for(var w;g!==n||s!==0&&g.nodeType!==3||(o=a+s),g!==l||r!==0&&g.nodeType!==3||(u=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(w=g.firstChild)!==null;)d=g,g=w;for(;;){if(g===e)break t;if(d===n&&++c===s&&(o=a),d===l&&++f===r&&(u=a),(w=g.nextSibling)!==null)break;g=d,d=g.parentNode}g=w}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Tc={focusedElem:e,selectionRange:n},xo=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var N=y.memoizedProps,R=y.memoizedState,v=t.stateNode,h=v.getSnapshotBeforeUpdate(t.elementType===t.type?N:_n(t.type,N),R);v.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(_){We(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return y=Vh,Vh=!1,y}function gi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var l=s.destroy;s.destroy=void 0,l!==void 0&&Kc(t,n,l)}s=s.next}while(s!==r)}}function tu(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 Wc(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 kg(e){var t=e.alternate;t!==null&&(e.alternate=null,kg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Gn],delete t[$i],delete t[Lc],delete t[p1],delete t[m1])),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 _g(e){return e.tag===5||e.tag===3||e.tag===4}function Bh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_g(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 Gc(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=bo));else if(r!==4&&(e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function qc(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(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}var ct=null,jn=!1;function Cr(e,t,n){for(n=n.child;n!==null;)Sg(e,t,n),n=n.sibling}function Sg(e,t,n){if(Qn&&typeof Qn.onCommitFiberUnmount=="function")try{Qn.onCommitFiberUnmount(Go,n)}catch{}switch(n.tag){case 5:bt||tl(n,t);case 6:var r=ct,s=jn;ct=null,Cr(e,t,n),ct=r,jn=s,ct!==null&&(jn?(e=ct,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ct.removeChild(n.stateNode));break;case 18:ct!==null&&(jn?(e=ct,n=n.stateNode,e.nodeType===8?Vu(e.parentNode,n):e.nodeType===1&&Vu(e,n),Ai(e)):Vu(ct,n.stateNode));break;case 4:r=ct,s=jn,ct=n.stateNode.containerInfo,jn=!0,Cr(e,t,n),ct=r,jn=s;break;case 0:case 11:case 14:case 15:if(!bt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var l=s,a=l.destroy;l=l.tag,a!==void 0&&(l&2||l&4)&&Kc(n,t,a),s=s.next}while(s!==r)}Cr(e,t,n);break;case 1:if(!bt&&(tl(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){We(n,t,o)}Cr(e,t,n);break;case 21:Cr(e,t,n);break;case 22:n.mode&1?(bt=(r=bt)||n.memoizedState!==null,Cr(e,t,n),bt=r):Cr(e,t,n);break;default:Cr(e,t,n)}}function Hh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new P1),t.forEach(function(r){var s=F1.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function bn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var l=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:ct=o.stateNode,jn=!1;break e;case 3:ct=o.stateNode.containerInfo,jn=!0;break e;case 4:ct=o.stateNode.containerInfo,jn=!0;break e}o=o.return}if(ct===null)throw Error(D(160));Sg(l,a,s),ct=null,jn=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(c){We(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ng(t,e),t=t.sibling}function Ng(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bn(t,e),Fn(e),r&4){try{gi(3,e,e.return),tu(3,e)}catch(N){We(e,e.return,N)}try{gi(5,e,e.return)}catch(N){We(e,e.return,N)}}break;case 1:bn(t,e),Fn(e),r&512&&n!==null&&tl(n,n.return);break;case 5:if(bn(t,e),Fn(e),r&512&&n!==null&&tl(n,n.return),e.flags&32){var s=e.stateNode;try{ji(s,"")}catch(N){We(e,e.return,N)}}if(r&4&&(s=e.stateNode,s!=null)){var l=e.memoizedProps,a=n!==null?n.memoizedProps:l,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&Gp(s,l),xc(o,a);var c=xc(o,l);for(a=0;a<u.length;a+=2){var f=u[a],g=u[a+1];f==="style"?Jp(s,g):f==="dangerouslySetInnerHTML"?Yp(s,g):f==="children"?ji(s,g):Cd(s,f,g,c)}switch(o){case"input":hc(s,l);break;case"textarea":qp(s,l);break;case"select":var d=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!l.multiple;var w=l.value;w!=null?sl(s,!!l.multiple,w,!1):d!==!!l.multiple&&(l.defaultValue!=null?sl(s,!!l.multiple,l.defaultValue,!0):sl(s,!!l.multiple,l.multiple?[]:"",!1))}s[$i]=l}catch(N){We(e,e.return,N)}}break;case 6:if(bn(t,e),Fn(e),r&4){if(e.stateNode===null)throw Error(D(162));s=e.stateNode,l=e.memoizedProps;try{s.nodeValue=l}catch(N){We(e,e.return,N)}}break;case 3:if(bn(t,e),Fn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ai(t.containerInfo)}catch(N){We(e,e.return,N)}break;case 4:bn(t,e),Fn(e);break;case 13:bn(t,e),Fn(e),s=e.child,s.flags&8192&&(l=s.memoizedState!==null,s.stateNode.isHidden=l,!l||s.alternate!==null&&s.alternate.memoizedState!==null||(of=qe())),r&4&&Hh(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(bt=(c=bt)||f,bn(t,e),bt=c):bn(t,e),Fn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(H=e,f=e.child;f!==null;){for(g=H=f;H!==null;){switch(d=H,w=d.child,d.tag){case 0:case 11:case 14:case 15:gi(4,d,d.return);break;case 1:tl(d,d.return);var y=d.stateNode;if(typeof y.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(N){We(r,n,N)}}break;case 5:tl(d,d.return);break;case 22:if(d.memoizedState!==null){Wh(g);continue}}w!==null?(w.return=d,H=w):Wh(g)}f=f.sibling}e:for(f=null,g=e;;){if(g.tag===5){if(f===null){f=g;try{s=g.stateNode,c?(l=s.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=g.stateNode,u=g.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=Zp("display",a))}catch(N){We(e,e.return,N)}}}else if(g.tag===6){if(f===null)try{g.stateNode.nodeValue=c?"":g.memoizedProps}catch(N){We(e,e.return,N)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;f===g&&(f=null),g=g.return}f===g&&(f=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:bn(t,e),Fn(e),r&4&&Hh(e);break;case 21:break;default:bn(t,e),Fn(e)}}function Fn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(_g(n)){var r=n;break e}n=n.return}throw Error(D(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ji(s,""),r.flags&=-33);var l=Bh(e);qc(e,l,s);break;case 3:case 4:var a=r.stateNode.containerInfo,o=Bh(e);Gc(e,o,a);break;default:throw Error(D(161))}}catch(u){We(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function M1(e,t,n){H=e,jg(e)}function jg(e,t,n){for(var r=(e.mode&1)!==0;H!==null;){var s=H,l=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||Ua;if(!a){var o=s.alternate,u=o!==null&&o.memoizedState!==null||bt;o=Ua;var c=bt;if(Ua=a,(bt=u)&&!c)for(H=s;H!==null;)a=H,u=a.child,a.tag===22&&a.memoizedState!==null?Gh(s):u!==null?(u.return=a,H=u):Gh(s);for(;l!==null;)H=l,jg(l),l=l.sibling;H=s,Ua=o,bt=c}Kh(e)}else s.subtreeFlags&8772&&l!==null?(l.return=s,H=l):Kh(e)}}function Kh(e){for(;H!==null;){var t=H;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:bt||tu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!bt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:_n(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Th(t,l,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Th(t,a,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var g=f.dehydrated;g!==null&&Ai(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}bt||t.flags&512&&Wc(t)}catch(d){We(t,t.return,d)}}if(t===e){H=null;break}if(n=t.sibling,n!==null){n.return=t.return,H=n;break}H=t.return}}function Wh(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var n=t.sibling;if(n!==null){n.return=t.return,H=n;break}H=t.return}}function Gh(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{tu(4,t)}catch(u){We(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){We(t,s,u)}}var l=t.return;try{Wc(t)}catch(u){We(t,l,u)}break;case 5:var a=t.return;try{Wc(t)}catch(u){We(t,a,u)}}}catch(u){We(t,t.return,u)}if(t===e){H=null;break}var o=t.sibling;if(o!==null){o.return=t.return,H=o;break}H=t.return}}var R1=Math.ceil,Lo=kr.ReactCurrentDispatcher,lf=kr.ReactCurrentOwner,fn=kr.ReactCurrentBatchConfig,we=0,ot=null,Ye=null,ft=0,Wt=0,nl=ts(0),tt=0,Fi=null,Cs=0,nu=0,af=0,vi=null,$t=null,of=0,El=1/0,sr=null,Mo=!1,Qc=null,Hr=null,Fa=!1,zr=null,Ro=0,xi=0,Yc=null,to=-1,no=0;function Et(){return we&6?qe():to!==-1?to:to=qe()}function Kr(e){return e.mode&1?we&2&&ft!==0?ft&-ft:v1.transition!==null?(no===0&&(no=cm()),no):(e=je,e!==0||(e=window.event,e=e===void 0?16:vm(e.type)),e):1}function Pn(e,t,n,r){if(50<xi)throw xi=0,Yc=null,Error(D(185));Xi(e,n,r),(!(we&2)||e!==ot)&&(e===ot&&(!(we&2)&&(nu|=n),tt===4&&Lr(e,ft)),Ot(e,r),n===1&&we===0&&!(t.mode&1)&&(El=qe()+500,Jo&&ns()))}function Ot(e,t){var n=e.callbackNode;vx(e,t);var r=vo(e,e===ot?ft:0);if(r===0)n!==null&&nh(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&nh(n),t===1)e.tag===0?g1(qh.bind(null,e)):Dm(qh.bind(null,e)),f1(function(){!(we&6)&&ns()}),n=null;else{switch(dm(r)){case 1:n=Md;break;case 4:n=om;break;case 16:n=go;break;case 536870912:n=um;break;default:n=go}n=Rg(n,Eg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Eg(e,t){if(to=-1,no=0,we&6)throw Error(D(327));var n=e.callbackNode;if(ul()&&e.callbackNode!==n)return null;var r=vo(e,e===ot?ft:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=$o(e,r);else{t=r;var s=we;we|=2;var l=Tg();(ot!==e||ft!==t)&&(sr=null,El=qe()+500,ws(e,t));do try{z1();break}catch(o){Cg(e,o)}while(!0);Wd(),Lo.current=l,we=s,Ye!==null?t=0:(ot=null,ft=0,t=tt)}if(t!==0){if(t===2&&(s=_c(e),s!==0&&(r=s,t=Zc(e,s))),t===1)throw n=Fi,ws(e,0),Lr(e,r),Ot(e,qe()),n;if(t===6)Lr(e,r);else{if(s=e.current.alternate,!(r&30)&&!$1(s)&&(t=$o(e,r),t===2&&(l=_c(e),l!==0&&(r=l,t=Zc(e,l))),t===1))throw n=Fi,ws(e,0),Lr(e,r),Ot(e,qe()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(D(345));case 2:as(e,$t,sr);break;case 3:if(Lr(e,r),(r&130023424)===r&&(t=of+500-qe(),10<t)){if(vo(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Et(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Pc(as.bind(null,e,$t,sr),t);break}as(e,$t,sr);break;case 4:if(Lr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-An(r);l=1<<a,a=t[a],a>s&&(s=a),r&=~l}if(r=s,r=qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*R1(r/1960))-r,10<r){e.timeoutHandle=Pc(as.bind(null,e,$t,sr),r);break}as(e,$t,sr);break;case 5:as(e,$t,sr);break;default:throw Error(D(329))}}}return Ot(e,qe()),e.callbackNode===n?Eg.bind(null,e):null}function Zc(e,t){var n=vi;return e.current.memoizedState.isDehydrated&&(ws(e,t).flags|=256),e=$o(e,t),e!==2&&(t=$t,$t=n,t!==null&&Jc(t)),e}function Jc(e){$t===null?$t=e:$t.push.apply($t,e)}function $1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],l=s.getSnapshot;s=s.value;try{if(!Rn(l(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Lr(e,t){for(t&=~af,t&=~nu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-An(t),r=1<<n;e[n]=-1,t&=~r}}function qh(e){if(we&6)throw Error(D(327));ul();var t=vo(e,0);if(!(t&1))return Ot(e,qe()),null;var n=$o(e,t);if(e.tag!==0&&n===2){var r=_c(e);r!==0&&(t=r,n=Zc(e,r))}if(n===1)throw n=Fi,ws(e,0),Lr(e,t),Ot(e,qe()),n;if(n===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,as(e,$t,sr),Ot(e,qe()),null}function uf(e,t){var n=we;we|=1;try{return e(t)}finally{we=n,we===0&&(El=qe()+500,Jo&&ns())}}function Ts(e){zr!==null&&zr.tag===0&&!(we&6)&&ul();var t=we;we|=1;var n=fn.transition,r=je;try{if(fn.transition=null,je=1,e)return e()}finally{je=r,fn.transition=n,we=t,!(we&6)&&ns()}}function cf(){Wt=nl.current,De(nl)}function ws(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,d1(n)),Ye!==null)for(n=Ye.return;n!==null;){var r=n;switch(Bd(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ko();break;case 3:Nl(),De(zt),De(kt),Jd();break;case 5:Zd(r);break;case 4:Nl();break;case 13:De(Be);break;case 19:De(Be);break;case 10:Gd(r.type._context);break;case 22:case 23:cf()}n=n.return}if(ot=e,Ye=e=Wr(e.current,null),ft=Wt=t,tt=0,Fi=null,af=nu=Cs=0,$t=vi=null,us!==null){for(t=0;t<us.length;t++)if(n=us[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,l=n.pending;if(l!==null){var a=l.next;l.next=s,r.next=a}n.pending=r}us=null}return e}function Cg(e,t){do{var n=Ye;try{if(Wd(),Ja.current=Po,Ao){for(var r=He.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ao=!1}if(Es=0,it=Xe=He=null,mi=!1,Ii=0,lf.current=null,n===null||n.return===null){tt=1,Fi=t,Ye=null;break}e:{var l=e,a=n.return,o=n,u=t;if(t=ft,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,f=o,g=f.tag;if(!(f.mode&1)&&(g===0||g===11||g===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var w=$h(a);if(w!==null){w.flags&=-257,Dh(w,a,o,l,t),w.mode&1&&Rh(l,c,t),t=w,u=c;var y=t.updateQueue;if(y===null){var N=new Set;N.add(u),t.updateQueue=N}else y.add(u);break e}else{if(!(t&1)){Rh(l,c,t),df();break e}u=Error(D(426))}}else if(Ue&&o.mode&1){var R=$h(a);if(R!==null){!(R.flags&65536)&&(R.flags|=256),Dh(R,a,o,l,t),Hd(jl(u,o));break e}}l=u=jl(u,o),tt!==4&&(tt=2),vi===null?vi=[l]:vi.push(l),l=a;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var v=dg(l,u,t);Ch(l,v);break e;case 1:o=u;var h=l.type,m=l.stateNode;if(!(l.flags&128)&&(typeof h.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Hr===null||!Hr.has(m)))){l.flags|=65536,t&=-t,l.lanes|=t;var _=fg(l,o,t);Ch(l,_);break e}}l=l.return}while(l!==null)}Pg(n)}catch(C){t=C,Ye===n&&n!==null&&(Ye=n=n.return);continue}break}while(!0)}function Tg(){var e=Lo.current;return Lo.current=Po,e===null?Po:e}function df(){(tt===0||tt===3||tt===2)&&(tt=4),ot===null||!(Cs&268435455)&&!(nu&268435455)||Lr(ot,ft)}function $o(e,t){var n=we;we|=2;var r=Tg();(ot!==e||ft!==t)&&(sr=null,ws(e,t));do try{D1();break}catch(s){Cg(e,s)}while(!0);if(Wd(),we=n,Lo.current=r,Ye!==null)throw Error(D(261));return ot=null,ft=0,tt}function D1(){for(;Ye!==null;)Ag(Ye)}function z1(){for(;Ye!==null&&!ox();)Ag(Ye)}function Ag(e){var t=Mg(e.alternate,e,Wt);e.memoizedProps=e.pendingProps,t===null?Pg(e):Ye=t,lf.current=null}function Pg(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=A1(n,t),n!==null){n.flags&=32767,Ye=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{tt=6,Ye=null;return}}else if(n=T1(n,t,Wt),n!==null){Ye=n;return}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);tt===0&&(tt=5)}function as(e,t,n){var r=je,s=fn.transition;try{fn.transition=null,je=1,I1(e,t,n,r)}finally{fn.transition=s,je=r}return null}function I1(e,t,n,r){do ul();while(zr!==null);if(we&6)throw Error(D(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(D(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(xx(e,l),e===ot&&(Ye=ot=null,ft=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Fa||(Fa=!0,Rg(go,function(){return ul(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=fn.transition,fn.transition=null;var a=je;je=1;var o=we;we|=4,lf.current=null,L1(e,n),Ng(n,e),s1(Tc),xo=!!Cc,Tc=Cc=null,e.current=n,M1(n),ux(),we=o,je=a,fn.transition=l}else e.current=n;if(Fa&&(Fa=!1,zr=e,Ro=s),l=e.pendingLanes,l===0&&(Hr=null),fx(n.stateNode),Ot(e,qe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Mo)throw Mo=!1,e=Qc,Qc=null,e;return Ro&1&&e.tag!==0&&ul(),l=e.pendingLanes,l&1?e===Yc?xi++:(xi=0,Yc=e):xi=0,ns(),null}function ul(){if(zr!==null){var e=dm(Ro),t=fn.transition,n=je;try{if(fn.transition=null,je=16>e?16:e,zr===null)var r=!1;else{if(e=zr,zr=null,Ro=0,we&6)throw Error(D(331));var s=we;for(we|=4,H=e.current;H!==null;){var l=H,a=l.child;if(H.flags&16){var o=l.deletions;if(o!==null){for(var u=0;u<o.length;u++){var c=o[u];for(H=c;H!==null;){var f=H;switch(f.tag){case 0:case 11:case 15:gi(8,f,l)}var g=f.child;if(g!==null)g.return=f,H=g;else for(;H!==null;){f=H;var d=f.sibling,w=f.return;if(kg(f),f===c){H=null;break}if(d!==null){d.return=w,H=d;break}H=w}}}var y=l.alternate;if(y!==null){var N=y.child;if(N!==null){y.child=null;do{var R=N.sibling;N.sibling=null,N=R}while(N!==null)}}H=l}}if(l.subtreeFlags&2064&&a!==null)a.return=l,H=a;else e:for(;H!==null;){if(l=H,l.flags&2048)switch(l.tag){case 0:case 11:case 15:gi(9,l,l.return)}var v=l.sibling;if(v!==null){v.return=l.return,H=v;break e}H=l.return}}var h=e.current;for(H=h;H!==null;){a=H;var m=a.child;if(a.subtreeFlags&2064&&m!==null)m.return=a,H=m;else e:for(a=h;H!==null;){if(o=H,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:tu(9,o)}}catch(C){We(o,o.return,C)}if(o===a){H=null;break e}var _=o.sibling;if(_!==null){_.return=o.return,H=_;break e}H=o.return}}if(we=s,ns(),Qn&&typeof Qn.onPostCommitFiberRoot=="function")try{Qn.onPostCommitFiberRoot(Go,e)}catch{}r=!0}return r}finally{je=n,fn.transition=t}}return!1}function Qh(e,t,n){t=jl(n,t),t=dg(e,t,1),e=Br(e,t,1),t=Et(),e!==null&&(Xi(e,1,t),Ot(e,t))}function We(e,t,n){if(e.tag===3)Qh(e,e,n);else for(;t!==null;){if(t.tag===3){Qh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Hr===null||!Hr.has(r))){e=jl(n,e),e=fg(t,e,1),t=Br(t,e,1),e=Et(),t!==null&&(Xi(t,1,e),Ot(t,e));break}}t=t.return}}function O1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Et(),e.pingedLanes|=e.suspendedLanes&n,ot===e&&(ft&n)===n&&(tt===4||tt===3&&(ft&130023424)===ft&&500>qe()-of?ws(e,0):af|=n),Ot(e,t)}function Lg(e,t){t===0&&(e.mode&1?(t=Pa,Pa<<=1,!(Pa&130023424)&&(Pa=4194304)):t=1);var n=Et();e=xr(e,t),e!==null&&(Xi(e,t,n),Ot(e,n))}function U1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Lg(e,n)}function F1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),Lg(e,n)}var Mg;Mg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||zt.current)Dt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Dt=!1,C1(e,t,n);Dt=!!(e.flags&131072)}else Dt=!1,Ue&&t.flags&1048576&&zm(t,No,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;eo(e,t),e=t.pendingProps;var s=kl(t,kt.current);ol(t,n),s=ef(null,t,r,e,s,n);var l=tf();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,It(r)?(l=!0,_o(t)):l=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Qd(t),s.updater=eu,t.stateNode=s,s._reactInternals=t,Ic(t,r,e,n),t=Fc(null,t,r,!0,l,n)):(t.tag=0,Ue&&l&&Vd(t),jt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(eo(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=B1(r),e=_n(r,e),s){case 0:t=Uc(null,t,r,e,n);break e;case 1:t=Oh(null,t,r,e,n);break e;case 11:t=zh(null,t,r,e,n);break e;case 14:t=Ih(null,t,r,_n(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:_n(r,s),Uc(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:_n(r,s),Oh(e,t,r,s,n);case 3:e:{if(gg(t),e===null)throw Error(D(387));r=t.pendingProps,l=t.memoizedState,s=l.element,Bm(e,t),Co(t,r,null,n);var a=t.memoizedState;if(r=a.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){s=jl(Error(D(423)),t),t=Uh(e,t,r,n,s);break e}else if(r!==s){s=jl(Error(D(424)),t),t=Uh(e,t,r,n,s);break e}else for(qt=Vr(t.stateNode.containerInfo.firstChild),Qt=t,Ue=!0,En=null,n=Fm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_l(),r===s){t=yr(e,t,n);break e}jt(e,t,r,n)}t=t.child}return t;case 5:return Hm(t),e===null&&$c(t),r=t.type,s=t.pendingProps,l=e!==null?e.memoizedProps:null,a=s.children,Ac(r,s)?a=null:l!==null&&Ac(r,l)&&(t.flags|=32),mg(e,t),jt(e,t,a,n),t.child;case 6:return e===null&&$c(t),null;case 13:return vg(e,t,n);case 4:return Yd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Sl(t,null,r,n):jt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:_n(r,s),zh(e,t,r,s,n);case 7:return jt(e,t,t.pendingProps,n),t.child;case 8:return jt(e,t,t.pendingProps.children,n),t.child;case 12:return jt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,l=t.memoizedProps,a=s.value,Le(jo,r._currentValue),r._currentValue=a,l!==null)if(Rn(l.value,a)){if(l.children===s.children&&!zt.current){t=yr(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){a=l.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=pr(-1,n&-n),u.tag=2;var c=l.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Dc(l.return,n,t),o.lanes|=n;break}u=u.next}}else if(l.tag===10)a=l.type===t.type?null:l.child;else if(l.tag===18){if(a=l.return,a===null)throw Error(D(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),Dc(a,n,t),a=l.sibling}else a=l.child;if(a!==null)a.return=l;else for(a=l;a!==null;){if(a===t){a=null;break}if(l=a.sibling,l!==null){l.return=a.return,a=l;break}a=a.return}l=a}jt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,ol(t,n),s=gn(s),r=r(s),t.flags|=1,jt(e,t,r,n),t.child;case 14:return r=t.type,s=_n(r,t.pendingProps),s=_n(r.type,s),Ih(e,t,r,s,n);case 15:return hg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:_n(r,s),eo(e,t),t.tag=1,It(r)?(e=!0,_o(t)):e=!1,ol(t,n),cg(t,r,s),Ic(t,r,s,n),Fc(null,t,r,!0,e,n);case 19:return xg(e,t,n);case 22:return pg(e,t,n)}throw Error(D(156,t.tag))};function Rg(e,t){return am(e,t)}function V1(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 dn(e,t,n,r){return new V1(e,t,n,r)}function ff(e){return e=e.prototype,!(!e||!e.isReactComponent)}function B1(e){if(typeof e=="function")return ff(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ad)return 11;if(e===Pd)return 14}return 2}function Wr(e,t){var n=e.alternate;return n===null?(n=dn(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 ro(e,t,n,r,s,l){var a=2;if(r=e,typeof e=="function")ff(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ws:return bs(n.children,s,l,t);case Td:a=8,s|=8;break;case oc:return e=dn(12,n,t,s|2),e.elementType=oc,e.lanes=l,e;case uc:return e=dn(13,n,t,s),e.elementType=uc,e.lanes=l,e;case cc:return e=dn(19,n,t,s),e.elementType=cc,e.lanes=l,e;case Hp:return ru(n,s,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Vp:a=10;break e;case Bp:a=9;break e;case Ad:a=11;break e;case Pd:a=14;break e;case Tr:a=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=dn(a,n,t,s),t.elementType=e,t.type=r,t.lanes=l,t}function bs(e,t,n,r){return e=dn(7,e,r,t),e.lanes=n,e}function ru(e,t,n,r){return e=dn(22,e,r,t),e.elementType=Hp,e.lanes=n,e.stateNode={isHidden:!1},e}function Yu(e,t,n){return e=dn(6,e,null,t),e.lanes=n,e}function Zu(e,t,n){return t=dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function H1(e,t,n,r,s){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=Pu(0),this.expirationTimes=Pu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pu(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function hf(e,t,n,r,s,l,a,o,u){return e=new H1(e,t,n,o,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=dn(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qd(l),e}function K1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ks,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function $g(e){if(!e)return Yr;e=e._reactInternals;e:{if(Rs(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(It(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var n=e.type;if(It(n))return $m(e,n,t)}return t}function Dg(e,t,n,r,s,l,a,o,u){return e=hf(n,r,!0,e,s,l,a,o,u),e.context=$g(null),n=e.current,r=Et(),s=Kr(n),l=pr(r,s),l.callback=t??null,Br(n,l,s),e.current.lanes=s,Xi(e,s,r),Ot(e,r),e}function su(e,t,n,r){var s=t.current,l=Et(),a=Kr(s);return n=$g(n),t.context===null?t.context=n:t.pendingContext=n,t=pr(l,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Br(s,t,a),e!==null&&(Pn(e,s,a,l),Za(e,s,a)),a}function Do(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Yh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pf(e,t){Yh(e,t),(e=e.alternate)&&Yh(e,t)}function W1(){return null}var zg=typeof reportError=="function"?reportError:function(e){console.error(e)};function mf(e){this._internalRoot=e}lu.prototype.render=mf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));su(e,t,null,null)};lu.prototype.unmount=mf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ts(function(){su(null,e,null,null)}),t[vr]=null}};function lu(e){this._internalRoot=e}lu.prototype.unstable_scheduleHydration=function(e){if(e){var t=pm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pr.length&&t!==0&&t<Pr[n].priority;n++);Pr.splice(n,0,e),n===0&&gm(e)}};function gf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function iu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Zh(){}function G1(e,t,n,r,s){if(s){if(typeof r=="function"){var l=r;r=function(){var c=Do(a);l.call(c)}}var a=Dg(t,r,e,0,null,!1,!1,"",Zh);return e._reactRootContainer=a,e[vr]=a.current,Mi(e.nodeType===8?e.parentNode:e),Ts(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var o=r;r=function(){var c=Do(u);o.call(c)}}var u=hf(e,0,!1,null,null,!1,!1,"",Zh);return e._reactRootContainer=u,e[vr]=u.current,Mi(e.nodeType===8?e.parentNode:e),Ts(function(){su(t,u,n,r)}),u}function au(e,t,n,r,s){var l=n._reactRootContainer;if(l){var a=l;if(typeof s=="function"){var o=s;s=function(){var u=Do(a);o.call(u)}}su(t,a,e,s)}else a=G1(n,t,e,s,r);return Do(a)}fm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=li(t.pendingLanes);n!==0&&(Rd(t,n|1),Ot(t,qe()),!(we&6)&&(El=qe()+500,ns()))}break;case 13:Ts(function(){var r=xr(e,1);if(r!==null){var s=Et();Pn(r,e,1,s)}}),pf(e,1)}};$d=function(e){if(e.tag===13){var t=xr(e,134217728);if(t!==null){var n=Et();Pn(t,e,134217728,n)}pf(e,134217728)}};hm=function(e){if(e.tag===13){var t=Kr(e),n=xr(e,t);if(n!==null){var r=Et();Pn(n,e,t,r)}pf(e,t)}};pm=function(){return je};mm=function(e,t){var n=je;try{return je=e,t()}finally{je=n}};wc=function(e,t,n){switch(t){case"input":if(hc(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Zo(r);if(!s)throw Error(D(90));Wp(r),hc(r,s)}}}break;case"textarea":qp(e,n);break;case"select":t=n.value,t!=null&&sl(e,!!n.multiple,t,!1)}};tm=uf;nm=Ts;var q1={usingClientEntryPoint:!1,Events:[ta,Ys,Zo,Xp,em,uf]},ei={findFiberByHostInstance:os,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Q1={bundleType:ei.bundleType,version:ei.version,rendererPackageName:ei.rendererPackageName,rendererConfig:ei.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:kr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=lm(e),e===null?null:e.stateNode},findFiberByHostInstance:ei.findFiberByHostInstance||W1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Va=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Va.isDisabled&&Va.supportsFiber)try{Go=Va.inject(Q1),Qn=Va}catch{}}Jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q1;Jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gf(t))throw Error(D(200));return K1(e,t,null,n)};Jt.createRoot=function(e,t){if(!gf(e))throw Error(D(299));var n=!1,r="",s=zg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=hf(e,1,!1,null,null,n,!1,r,s),e[vr]=t.current,Mi(e.nodeType===8?e.parentNode:e),new mf(t)};Jt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=lm(t),e=e===null?null:e.stateNode,e};Jt.flushSync=function(e){return Ts(e)};Jt.hydrate=function(e,t,n){if(!iu(t))throw Error(D(200));return au(null,e,t,!0,n)};Jt.hydrateRoot=function(e,t,n){if(!gf(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,s=!1,l="",a=zg;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Dg(t,null,e,1,n??null,s,!1,l,a),e[vr]=t.current,Mi(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new lu(t)};Jt.render=function(e,t,n){if(!iu(t))throw Error(D(200));return au(null,e,t,!1,n)};Jt.unmountComponentAtNode=function(e){if(!iu(e))throw Error(D(40));return e._reactRootContainer?(Ts(function(){au(null,null,e,!1,function(){e._reactRootContainer=null,e[vr]=null})}),!0):!1};Jt.unstable_batchedUpdates=uf;Jt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!iu(n))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return au(e,t,n,!1,r)};Jt.version="18.3.1-next-f1338f8080-20240426";function Ig(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ig)}catch(e){console.error(e)}}Ig(),Ip.exports=Jt;var Y1=Ip.exports,Jh=Y1;ic.createRoot=Jh.createRoot,ic.hydrateRoot=Jh.hydrateRoot;/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Z1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Og=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var J1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const X1=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:l,iconNode:a,...o},u)=>A.createElement("svg",{ref:u,...J1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Og("lucide",s),...o},[...a.map(([c,f])=>A.createElement(c,f)),...Array.isArray(l)?l:[l]]));/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const oe=(e,t)=>{const n=A.forwardRef(({className:r,...s},l)=>A.createElement(X1,{ref:l,iconNode:t,className:Og(`lucide-${Z1(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ug=oe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Fg=oe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ey=oe("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Xh=oe("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ra=oe("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ty=oe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ny=oe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Cl=oe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ln=oe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Vi=oe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ry=oe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Vg=oe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const sy=oe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ep=oe("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ou=oe("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ly=oe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const iy=oe("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Xc=oe("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const vf=oe("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ay=oe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const oy=oe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const tp=oe("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Bi=oe("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const uy=oe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Zn=oe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const cy=oe("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Bg=oe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const dy=oe("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const np=oe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fy=oe("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const hy=oe("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Hg=oe("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Kg=oe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const py=oe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const my=oe("TableProperties",[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const cn=oe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const xf=oe("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const gy=oe("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const rp=oe("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const so=oe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Wg=oe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
||
* @license lucide-react v0.424.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Gg=oe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function vy({branding:e,user:t,activeTab:n,onChangeTab:r,themeMode:s,onChangeThemeMode:l,onLogout:a,onOpenAuth:o,onOpenCreateEvent:u,onOpenTemplates:c,onOpenProfile:f,onOpenAdmin:g,pwaInstallPrompt:d,onInstallPwa:w}){const y=(e==null?void 0:e.primary_color)||"var(--brand-primary)",[N,R]=Si.useState(()=>localStorage.getItem("guest_display_name")||"");Si.useEffect(()=>{const h=()=>{R(localStorage.getItem("guest_display_name")||"")};return window.addEventListener("guest_name_updated",h),window.addEventListener("storage",h),()=>{window.removeEventListener("guest_name_updated",h),window.removeEventListener("storage",h)}},[]);const v=()=>{l(s==="dark"?"light":s==="light"?"auto":"dark")};return i.jsxs("header",{className:"bg-surface border-b border-grid sticky top-0 z-40",children:[i.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between gap-4",children:[i.jsxs("div",{className:"flex items-center space-x-3 shrink-0",children:[i.jsx("div",{onClick:()=>r("home"),style:{backgroundColor:y},className:"w-8 h-8 rounded-sm flex items-center justify-center text-white font-bold cursor-pointer shadow-sm",children:e!=null&&e.logo_url?i.jsx("img",{src:e.logo_url,alt:"Logo",className:"w-4 h-4 object-contain"}):i.jsx(ra,{className:"w-4 h-4"})}),i.jsxs("div",{onClick:()=>r("home"),className:"cursor-pointer",children:[i.jsx("h1",{className:"font-serif text-base font-bold tracking-tight text-main leading-none",children:(e==null?void 0:e.app_name)||"Schichtplaner"}),i.jsx("div",{className:"text-[10px] font-mono text-muted mt-1 uppercase tracking-wider flex items-center gap-1.5",children:t?i.jsxs("span",{className:"text-emerald-500 font-semibold",children:["[ ",t.display_name||t.username," ]"]}):N?i.jsxs("span",{className:"text-amber-400 font-semibold flex items-center gap-1",children:["[ 👤 GAST: ",N," ]"]}):i.jsx("span",{className:"text-amber-500 font-semibold",children:"[ GAST-MODUS ]"})})]})]}),i.jsxs("nav",{className:"hidden md:flex items-center gap-2",children:[i.jsxs("button",{onClick:()=>r("home"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="home"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[i.jsx(ep,{className:"w-3.5 h-3.5"})," Startseite"]}),i.jsxs("button",{onClick:()=>r("calendar"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="calendar"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[i.jsx(Xh,{className:"w-3.5 h-3.5"})," Kalender"]}),((t==null?void 0:t.is_admin_user)||(t==null?void 0:t.is_staff)||(t==null?void 0:t.is_superuser))&&i.jsxs("button",{onClick:()=>r("admin"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="admin"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[i.jsx(np,{className:"w-3.5 h-3.5 text-indigo-400"})," Admin"]})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("button",{onClick:v,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5",title:`Design-Modus: ${s.toUpperCase()}`,children:s==="dark"?i.jsxs(i.Fragment,{children:[i.jsx(oy,{className:"w-3.5 h-3.5 text-indigo-400"}),i.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"DARK"})]}):s==="light"?i.jsxs(i.Fragment,{children:[i.jsx(py,{className:"w-3.5 h-3.5 text-amber-500"}),i.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"LIGHT"})]}):i.jsxs(i.Fragment,{children:[i.jsx(ay,{className:"w-3.5 h-3.5 text-blue-500"}),i.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"AUTO"})]})}),d&&i.jsxs("button",{onClick:w,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-emerald-500/10 text-emerald-500 border border-emerald-500/20 hover:bg-emerald-500/20 transition flex items-center gap-1",children:[i.jsx(Kg,{className:"w-3 h-3"})," PWA"]}),t?i.jsxs(i.Fragment,{children:[i.jsxs("button",{onClick:u,style:{backgroundColor:y},className:"h-8 px-3 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1 shadow-sm hover:brightness-110",children:[i.jsx(Zn,{className:"w-3.5 h-3.5"})," Event"]}),i.jsxs("button",{onClick:c,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition hidden sm:flex items-center gap-1",title:"Vorlagen",children:[i.jsx(ou,{className:"w-3.5 h-3.5 text-muted"})," Vorlagen"]}),i.jsxs("button",{onClick:f,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1",title:"Profil & Namen ändern",children:[i.jsx(Bi,{className:"w-3.5 h-3.5 text-amber-500"})," Profil"]}),(t.is_admin_user||t.is_staff||t.is_superuser)&&i.jsxs("button",{onClick:()=>r("admin"),className:`h-8 px-2.5 rounded-sm text-xs font-mono transition flex items-center gap-1 border ${n==="admin"?"bg-indigo-500/20 text-indigo-300 border-indigo-500/40 font-bold":"bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border-indigo-500/30"}`,title:"Admin-Zentrale",children:[i.jsx(np,{className:"w-3.5 h-3.5"})," Admin"]}),i.jsx("div",{className:"h-4 w-px bg-grid mx-1"}),i.jsx("button",{onClick:a,className:"h-8 w-8 rounded-sm text-muted hover:text-red-500 hover:bg-red-500/10 border border-transparent hover:border-red-500/20 transition flex items-center justify-center",title:"Abmelden",children:i.jsx(iy,{className:"w-3.5 h-3.5"})})]}):i.jsxs("button",{onClick:o,style:{backgroundColor:y},className:"h-8 px-3.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 flex items-center gap-1.5 shadow-sm",children:[i.jsx(so,{className:"w-3.5 h-3.5"})," Anmelden"]})]})]}),i.jsxs("div",{className:"flex md:hidden items-center justify-around border-t border-grid py-2 bg-subtle text-xs font-mono",children:[i.jsxs("button",{onClick:()=>r("home"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="home"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[i.jsx(ep,{className:"w-3.5 h-3.5"})," Start"]}),i.jsxs("button",{onClick:()=>r("calendar"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="calendar"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[i.jsx(Xh,{className:"w-3.5 h-3.5"})," Termine"]}),i.jsxs("button",{onClick:()=>r("schedule"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="schedule"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[i.jsx(my,{className:"w-3.5 h-3.5"})," Schichtplan"]})]})]})}function xy({event:e,user:t,onSignupClick:n,onCancelClick:r,onRemoveUserFromShift:s,onGenerateClaimLink:l,onExportPdf:a,onPrintView:o,onEditEvent:u,onDeleteEvent:c}){var N,R,v;const[f,g]=Si.useState(()=>localStorage.getItem("guest_display_name")||"");if(Si.useEffect(()=>{const h=()=>g(localStorage.getItem("guest_display_name")||"");return window.addEventListener("guest_name_updated",h),window.addEventListener("storage",h),()=>{window.removeEventListener("guest_name_updated",h),window.removeEventListener("storage",h)}},[]),!e||!e.task_areas||e.task_areas.length===0)return i.jsxs("div",{className:"hallmark-panel rounded-sm p-12 text-center border border-grid font-mono",children:[i.jsx(Vi,{className:"w-8 h-8 text-muted mx-auto mb-3"}),i.jsx("h3",{className:"font-serif text-xl font-bold text-main uppercase",children:"Keine Aufgabenfelder vorhanden"}),i.jsx("p",{className:"text-xs text-muted mt-1 mb-4",children:"[ Event hat noch keine definierten Aufgabenfelder oder Schichten ]"}),t&&(t.is_admin_user||t.is_staff||t.is_superuser||(e==null?void 0:e.created_by)===t.id||((N=e==null?void 0:e.created_by)==null?void 0:N.id)===t.id||(e==null?void 0:e.co_managers)&&e.co_managers.some(h=>typeof h=="object"?h.id===t.id:h===t.id))&&u&&i.jsxs("button",{onClick:()=>u(e),className:"px-4 py-2 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border border-indigo-500/30 font-bold text-xs inline-flex items-center gap-2",children:[i.jsx(Bi,{className:"w-4 h-4"})," SCHICHTEN & BEREICHE ANLEGEN"]})]});const d=!t,w=t&&(e==null?void 0:e.co_managers)&&e.co_managers.some(h=>typeof h=="object"?h.id===t.id:h===t.id),y=t&&(t.is_admin_user||t.is_staff||t.is_superuser||(e==null?void 0:e.created_by)===t.id||((R=e==null?void 0:e.created_by)==null?void 0:R.id)===t.id||w);return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid flex flex-col md:flex-row md:items-center justify-between gap-4",children:[i.jsxs("div",{className:"space-y-1 font-mono",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted mb-1",children:[i.jsxs("span",{className:"bg-subtle px-2.5 py-0.5 rounded-sm border border-grid font-bold text-main",children:[new Date(e.start_date).toLocaleDateString("de-DE")," — ",new Date(e.end_date).toLocaleDateString("de-DE")]}),e.location&&i.jsxs("span",{className:"flex items-center gap-1 text-muted",children:[i.jsx(vf,{className:"w-3.5 h-3.5 shrink-0"}),e.location]}),e.is_active===!1&&i.jsx("span",{className:"px-2 py-0.5 rounded-sm bg-amber-500/10 text-amber-500 border border-amber-500/20 font-bold",children:"[ DEAKTIVIERT ]"})]}),i.jsx("h2",{className:"font-serif text-3xl sm:text-4xl font-bold uppercase tracking-tight text-main",children:e.title}),e.description&&i.jsx("p",{className:"text-xs font-sans text-muted max-w-2xl mt-1",children:e.description})]}),i.jsxs("div",{className:"flex items-center gap-2 no-print font-mono text-xs shrink-0",children:[y&&u&&i.jsxs("button",{onClick:()=>u(e),className:"px-3.5 py-1.5 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border border-indigo-500/30 transition flex items-center gap-1.5 font-bold",title:"Schichten und Aufgabenbereiche für diese Veranstaltung bearbeiten",children:[i.jsx(Bi,{className:"w-3.5 h-3.5"})," SCHICHTEN BEARBEITEN"]}),t&&(t.is_admin_user||t.is_staff||t.is_superuser||(e==null?void 0:e.created_by)===t.id||((v=e==null?void 0:e.created_by)==null?void 0:v.id)===t.id)&&c&&i.jsxs("button",{onClick:()=>c(e),className:"px-3.5 py-1.5 rounded-sm bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/30 transition flex items-center gap-1.5 font-bold",title:"Diese Veranstaltung unwiderruflich löschen",children:[i.jsx(cn,{className:"w-3.5 h-3.5"})," LÖSCHEN"]}),i.jsxs("button",{onClick:o,className:"px-3.5 py-1.5 rounded-sm bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 font-bold",children:[i.jsx(cy,{className:"w-3.5 h-3.5"})," DRUCKEN"]}),i.jsxs("button",{onClick:a,className:"px-3.5 py-1.5 rounded-sm bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 font-bold",children:[i.jsx(ry,{className:"w-3.5 h-3.5"})," PDF"]})]})]}),d&&i.jsxs("div",{className:"p-3.5 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs font-mono flex items-center gap-2",children:[i.jsx(Hg,{className:"w-4 h-4 shrink-0 text-amber-500"}),i.jsxs("span",{children:["[ GAST-DATENSCHUTZ ]: Belegungszahlen sichtbar, Namensanzeige aus Datenschutzgründen ",i.jsx("strong",{children:"anonymisiert"}),"."]})]}),i.jsx("div",{className:"hallmark-panel rounded-sm border border-grid overflow-hidden",children:i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"bg-subtle border-b border-grid text-[11px] font-mono text-muted uppercase tracking-wider",children:[i.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Aufgabenfeld"}),i.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Schicht & Zeitraum"}),i.jsx("th",{className:"py-3.5 px-4 w-1/6",children:"Qualifikation"}),i.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Belegung & Personen"}),i.jsx("th",{className:"py-3.5 px-4 w-1/6 text-right",children:"Aktion"})]})}),i.jsx("tbody",{className:"divide-y divide-grid text-xs font-sans",children:e.task_areas.map(h=>!h.shifts||h.shifts.length===0?i.jsxs("tr",{children:[i.jsx("td",{className:"py-3.5 px-4 font-serif text-lg font-bold text-main uppercase",children:h.name}),i.jsx("td",{colSpan:4,className:"py-3.5 px-4 text-muted font-mono text-[11px]",children:"[ Keine Schichten angelegt ]"})]},`area-${h.id}`):h.shifts.map((m,_)=>{const C=_===0,E=m.is_full,L=!!(t?m.signups.find(P=>!P.is_guest&&P.display_name===t.display_name):null),G=m.required_skills&&m.required_skills.length>0;return i.jsxs("tr",{className:"hover:bg-surface-hover/60 transition",children:[C?i.jsxs("td",{rowSpan:h.shifts.length,className:"py-3.5 px-4 font-serif text-lg font-bold text-main uppercase bg-subtle/80 align-top border-r border-grid",children:[i.jsx("div",{children:h.name}),h.description&&i.jsx("div",{className:"text-[11px] font-sans font-normal text-muted mt-0.5",children:h.description})]}):null,i.jsxs("td",{className:"py-3.5 px-4",children:[i.jsxs("div",{className:"font-semibold text-main flex items-center gap-2 flex-wrap",children:[i.jsx("span",{children:m.title}),m.date&&i.jsxs("span",{className:"text-[10px] font-mono font-bold text-indigo-400 bg-indigo-500/10 px-2 py-0.5 rounded-sm border border-indigo-500/20",children:["📅 ",new Date(m.date+"T00:00:00").toLocaleDateString("de-DE",{weekday:"short",day:"2-digit",month:"2-digit"})]})]}),i.jsxs("div",{className:"text-[11px] font-mono text-muted flex items-center gap-1 mt-0.5",children:[i.jsx(Vi,{className:"w-3 h-3 text-muted shrink-0"}),i.jsxs("span",{children:[m.start_time," — ",m.end_time," Uhr"]})]})]}),i.jsx("td",{className:"py-3.5 px-4 font-mono",children:G?i.jsx("div",{className:"flex flex-wrap gap-1",children:m.required_skills.map(P=>i.jsxs("span",{style:{backgroundColor:`${P.color}15`,borderColor:`${P.color}35`,color:P.color},className:"px-2 py-0.5 rounded-sm text-[10px] font-semibold border flex items-center gap-1",children:[i.jsx(ey,{className:"w-3 h-3 shrink-0"})," ",P.name]},P.id))}):i.jsx("span",{className:"text-[11px] text-muted",children:"—"})}),i.jsxs("td",{className:"py-3.5 px-4 font-mono",children:[i.jsx("div",{className:"flex items-center gap-2",children:i.jsxs("span",{className:`px-2 py-0.5 rounded-sm text-[11px] font-bold border ${E?"bg-red-500/10 text-red-500 border-red-500/20":"bg-emerald-500/10 text-emerald-500 border-emerald-500/20"}`,children:["[ ",m.signups_count," / ",m.max_participants," BELEGT ]"]})}),i.jsx("div",{className:"mt-2 space-y-1 font-sans",children:m.signups.map(P=>{var ae;const Y=d&&P.is_guest&&(P.is_self||f&&((ae=P.display_name)==null?void 0:ae.trim().toLowerCase())===f.trim().toLowerCase());return i.jsxs("div",{className:`text-[11px] text-muted flex items-center justify-between gap-2 p-1.5 rounded-sm border ${Y?"bg-amber-500/10 border-amber-500/30":"bg-subtle border-grid"}`,children:[i.jsxs("div",{className:"flex items-center gap-1.5 truncate",children:[i.jsx(xf,{className:`w-3 h-3 shrink-0 ${Y?"text-amber-400":"text-muted"}`}),i.jsx("span",{className:`truncate ${Y?"font-bold text-amber-300":""}`,children:P.display_name}),P.is_guest&&i.jsx("span",{className:"text-[9px] font-mono text-amber-500 px-1 rounded-sm bg-amber-500/10 border border-amber-500/20 font-bold",children:"GAST"}),Y&&i.jsx("span",{className:"text-[9px] font-mono text-emerald-400 px-1 rounded-sm bg-emerald-500/10 border border-emerald-500/20 font-bold",children:"DU"})]}),i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[t&&P.is_guest&&l&&i.jsxs("button",{onClick:()=>l(P),className:"text-indigo-400 hover:text-indigo-300 transition p-1 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 border border-indigo-500/20 flex items-center gap-1 text-[10px] font-mono font-bold",title:"Konto-Einladungslink für diese Gast-Eintragung kopieren",children:[i.jsx(gy,{className:"w-3 h-3"})," LINK"]}),y&&s&&i.jsx("button",{onClick:()=>s(m,P.id),className:"text-muted hover:text-red-500 transition p-1 rounded-sm hover:bg-red-500/10",title:"Person aus dieser Schicht entfernen",children:i.jsx(rp,{className:"w-3.5 h-3.5"})})]})]},P.id)})})]}),i.jsx("td",{className:"py-3.5 px-4 text-right font-mono",children:L?i.jsxs("button",{onClick:()=>r(m),className:"px-3 py-1.5 rounded-sm text-xs font-semibold bg-red-500/10 hover:bg-red-500/20 text-red-500 border border-red-500/20 transition flex items-center gap-1 ml-auto",children:[i.jsx(rp,{className:"w-3.5 h-3.5"})," AUSTRAGEN"]}):E?i.jsx("span",{className:"text-xs text-muted font-bold",children:"[ VOLL ]"}):i.jsxs("button",{onClick:()=>n(m),style:{backgroundColor:"var(--brand-primary)"},className:"px-3.5 py-1.5 rounded-sm text-xs font-bold text-white transition hover:brightness-110 flex items-center gap-1 ml-auto shadow-sm",children:[i.jsx(Ln,{className:"w-3.5 h-3.5"})," EINTRAGEN"]})})]},`shift-${m.id}`)}))})]})})})]})}const qg=!1;var Qg=Array.isArray,yy=Array.prototype.indexOf,Tl=Array.prototype.includes,wy=Array.from,zo=Object.keys,Hi=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,by=Object.getOwnPropertyDescriptors,ky=Object.prototype,_y=Array.prototype,Yg=Object.getPrototypeOf,sp=Object.isExtensible;const Gr=()=>{};function Sy(e){for(var t=0;t<e.length;t++)e[t]()}function Zg(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}const mt=2,Al=4,uu=8,yf=1<<24,Cn=16,Jn=32,wr=64,ed=128,hn=512,et=1024,at=2048,Xn=4096,pn=8192,Mn=16384,rs=32768,td=1<<25,Zr=65536,Io=1<<17,Ny=1<<18,$s=1<<19,jy=1<<20,As=65536,Oo=1<<21,dl=1<<22,qr=1<<23,fl=Symbol("$state"),Ey=Symbol("legacy props"),Cy=Symbol(""),lo=Symbol("attributes"),nd=Symbol("class"),rd=Symbol("style"),ai=Symbol("text"),yi=Symbol("form reset"),cu=new class extends Error{constructor(){super(...arguments);ne(this,"name","StaleReactionError");ne(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var Sp;const sa=!!((Sp=globalThis.document)!=null&&Sp.contentType)&&globalThis.document.contentType.includes("xml"),la=3,ia=8;function Jg(e){return e===this.v}function Xg(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ty(e){return!Xg(e,this.v)}function Ay(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Py(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ly(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function My(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ry(e){throw new Error("https://svelte.dev/e/effect_orphan")}function $y(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Dy(){throw new Error("https://svelte.dev/e/hydration_failed")}function zy(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Iy(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Oy(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Uy(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}let Fy=!1;const Vy=1,By=2,wf="[",ev="[!",lp="[?",tv="]",Ps={},Qe=Symbol("uninitialized"),nv="http://www.w3.org/1999/xhtml",Hy="http://www.w3.org/2000/svg",Ky="http://www.w3.org/1998/Math/MathML",Wy="@attach";let Ut=null;function Pl(e){Ut=e}function _r(e,t=!1,n){Ut={p:Ut,i:!1,c:null,e:null,s:e,x:null,r:ce,l:null}}function Sr(e){var t=Ut,n=t.e;if(n!==null){t.e=null;for(var r of n)Dv(r)}return e!==void 0&&(t.x=e),t.i=!0,Ut=t.p,e??{}}function rv(){return!0}let ds=[];function sv(){var e=ds;ds=[],Sy(e)}function mr(e){if(ds.length===0&&!bi){var t=ds;queueMicrotask(()=>{t===ds&&sv()})}ds.push(e)}function Gy(){for(;ds.length>0;)sv()}function qy(){console.warn("https://svelte.dev/e/derived_inert")}function aa(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Qy(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Yy(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let he=!1;function qn(e){he=e}let fe;function Ct(e){if(e===null)throw aa(),Ps;return fe=e}function Ls(){return Ct(nr(fe))}function $e(e){if(he){if(nr(fe)!==null)throw aa(),Ps;fe=e}}function bf(e=1){if(he){for(var t=e,n=fe;t--;)n=nr(n);fe=n}}function kf(e=!0){for(var t=0,n=fe;;){if(n.nodeType===ia){var r=n.data;if(r===tv){if(t===0)return n;t-=1}else(r===wf||r===ev||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var s=nr(n);e&&n.remove(),n=s}}function lv(e){if(!e||e.nodeType!==ia)throw aa(),Ps;return e.data}function hr(e){if(typeof e!="object"||e===null||fl in e)return e;const t=Yg(e);if(t!==ky&&t!==_y)return e;var n=new Map,r=Qg(e),s=ge(0),l=Ss,a=o=>{if(Ss===l)return o();var u=ve,c=Ss;xn(null),fp(l);var f=o();return xn(u),fp(c),f};return r&&n.set("length",ge(e.length)),new Proxy(e,{defineProperty(o,u,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&zy();var f=n.get(u);return f===void 0?a(()=>{var g=ge(c.value);return n.set(u,g),g}):Q(f,c.value,!0),!0},deleteProperty(o,u){var c=n.get(u);if(c===void 0){if(u in o){const f=a(()=>ge(Qe));n.set(u,f),ki(s)}}else Q(c,Qe),ki(s);return!0},get(o,u,c){var w;if(u===fl)return e;var f=n.get(u),g=u in o;if(f===void 0&&(!g||(w=cl(o,u))!=null&&w.writable)&&(f=a(()=>{var y=hr(g?o[u]:Qe),N=ge(y);return N}),n.set(u,f)),f!==void 0){var d=p(f);return d===Qe?void 0:d}return Reflect.get(o,u,c)},getOwnPropertyDescriptor(o,u){var c=Reflect.getOwnPropertyDescriptor(o,u);if(c&&"value"in c){var f=n.get(u);f&&(c.value=p(f))}else if(c===void 0){var g=n.get(u),d=g==null?void 0:g.v;if(g!==void 0&&d!==Qe)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(o,u){var d;if(u===fl)return!0;var c=n.get(u),f=c!==void 0&&c.v!==Qe||Reflect.has(o,u);if(c!==void 0||ce!==null&&(!f||(d=cl(o,u))!=null&&d.writable)){c===void 0&&(c=a(()=>{var w=f?hr(o[u]):Qe,y=ge(w);return y}),n.set(u,c));var g=p(c);if(g===Qe)return!1}return f},set(o,u,c,f){var m;var g=n.get(u),d=u in o;if(r&&u==="length")for(var w=c;w<g.v;w+=1){var y=n.get(w+"");y!==void 0?Q(y,Qe):w in o&&(y=a(()=>ge(Qe)),n.set(w+"",y))}if(g===void 0)(!d||(m=cl(o,u))!=null&&m.writable)&&(g=a(()=>ge(void 0)),Q(g,hr(c)),n.set(u,g));else{d=g.v!==Qe;var N=a(()=>hr(c));Q(g,N)}var R=Reflect.getOwnPropertyDescriptor(o,u);if(R!=null&&R.set&&R.set.call(f,c),!d){if(r&&typeof u=="string"){var v=n.get("length"),h=Number(u);Number.isInteger(h)&&h>=v.v&&Q(v,h+1)}ki(s)}return!0},ownKeys(o){p(s);var u=Reflect.ownKeys(o).filter(g=>{var d=n.get(g);return d===void 0||d.v!==Qe});for(var[c,f]of n)f.v!==Qe&&!(c in o)&&u.push(c);return u},setPrototypeOf(){Iy()}})}function ip(e){try{if(e!==null&&typeof e=="object"&&fl in e)return e[fl]}catch{}return e}function Zy(e,t){return Object.is(ip(e),ip(t))}var ks,sd,iv,av,ov;function ld(){if(ks===void 0){ks=window,sd=document,iv=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;av=cl(t,"firstChild").get,ov=cl(t,"nextSibling").get,sp(e)&&(e[nd]=void 0,e[lo]=null,e[rd]=void 0,e.__e=void 0),sp(n)&&(n[ai]=void 0)}}function er(e=""){return document.createTextNode(e)}function Gt(e){return av.call(e)}function nr(e){return ov.call(e)}function Ve(e,t){if(!he)return Gt(e);var n=Gt(fe);if(n===null)n=fe.appendChild(er());else if(t&&n.nodeType!==la){var r=er();return n==null||n.before(r),Ct(r),r}return t&&du(n),Ct(n),n}function Bs(e,t=!1){if(!he){var n=Gt(e);return n instanceof Comment&&n.data===""?nr(n):n}if(t){if((fe==null?void 0:fe.nodeType)!==la){var r=er();return fe==null||fe.before(r),Ct(r),r}du(fe)}return fe}function Ie(e,t=1,n=!1){let r=he?fe:e;for(var s;t--;)s=r,r=nr(r);if(!he)return r;if(n){if((r==null?void 0:r.nodeType)!==la){var l=er();return r===null?s==null||s.after(l):r.before(l),Ct(l),l}du(r)}return Ct(r),r}function Jy(e){e.textContent=""}function _f(e,t,n){return document.createElementNS(t??nv,e,void 0)}function du(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===la;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function uv(e){var t=ce;if(t===null)return ve.f|=qr,e;if(!(t.f&rs)&&!(t.f&Al))throw e;Ir(e,t)}function Ir(e,t){for(;t!==null;){if(t.f&ed){if(!(t.f&rs))throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Xy=-7169;function Ge(e,t){e.f=e.f&Xy|t}function Sf(e){e.f&hn||e.deps===null?Ge(e,et):Ge(e,Xn)}function cv(e){if(e!==null)for(const t of e)!(t.f&mt)||!(t.f&As)||(t.f^=As,cv(t.deps))}function dv(e,t,n){e.f&at?t.add(e):e.f&Xn&&n.add(e),cv(e.deps),Ge(e,et)}function fv(e,t,n){if(e==null)return t(void 0),Gr;const r=ca(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const Fs=[];function ew(e,t=Gr){let n=null;const r=new Set;function s(o){if(Xg(e,o)&&(e=o,n)){const u=!Fs.length;for(const c of r)c[1](),Fs.push(c,e);if(u){for(let c=0;c<Fs.length;c+=2)Fs[c][0](Fs[c+1]);Fs.length=0}}}function l(o){s(o(e))}function a(o,u=Gr){const c=[o,u];return r.add(c),r.size===1&&(n=t(s,l)||Gr),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:s,update:l,subscribe:a}}function oi(e){let t;return fv(e,n=>t=n)(),t}let id=Symbol("unmounted");function ap(e,t,n){const r=n[t]??(n[t]={store:null,source:jv(void 0),unsubscribe:Gr});if(r.store!==e&&!(id in n))if(r.unsubscribe(),r.store=e??null,e==null)r.source.v=void 0,r.unsubscribe=Gr;else{var s=!0;r.unsubscribe=fv(e,l=>{s?r.source.v=l:Q(r.source,l)}),s=!1}return e&&id in n?oi(e):p(r.source)}function tw(){const e={};function t(){hu(()=>{for(var n in e)e[n].unsubscribe();Hi(e,id,{enumerable:!1,value:!0})})}return[e,t]}let Ju=null,Vs=null,X=null,wi=null,dt=null,ad=null,bi=!1,Xu=!1,rl=null,io=null;var op=0;let nw=1;var pl,Mr,ms,ml,gl,gs,vl,ir,Wi,Bt,Gi,Rr,Hn,Kn,xl,yl,Se,od,ui,ud,hv,pv,ao,rw,cd,Hs;const Bo=class Bo{constructor(){ie(this,Se);ne(this,"id",nw++);ie(this,pl,!1);ne(this,"linked",!0);ie(this,Mr,null);ie(this,ms,null);ne(this,"async_deriveds",new Map);ne(this,"current",new Map);ne(this,"previous",new Map);ne(this,"unblocked",new Set);ie(this,ml,new Set);ie(this,gl,new Set);ie(this,gs,new Set);ie(this,vl,0);ie(this,ir,new Map);ie(this,Wi,null);ie(this,Bt,[]);ie(this,Gi,[]);ie(this,Rr,new Set);ie(this,Hn,new Set);ie(this,Kn,new Map);ie(this,xl,new Set);ne(this,"is_fork",!1);ie(this,yl,!1)}skip_effect(t){S(this,Kn).has(t)||S(this,Kn).set(t,{d:[],m:[]}),S(this,xl).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=S(this,Kn).get(t);if(r){S(this,Kn).delete(t);for(var s of r.d)Ge(s,at),n(s);for(s of r.m)Ge(s,Xn),n(s)}S(this,xl).add(t)}capture(t,n,r=!1){t.v!==Qe&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&qr||(this.current.set(t,[n,r]),dt==null||dt.set(t,n)),this.is_fork||(t.v=n)}activate(){X=this}deactivate(){X=null,dt=null}flush(){try{Xu=!0,X=this,me(this,Se,ui).call(this)}finally{op=0,ad=null,rl=null,io=null,Xu=!1,X=null,dt=null,_s.clear()}}discard(){for(const t of S(this,gl))t(this);S(this,gl).clear(),S(this,gs).clear(),me(this,Se,Hs).call(this)}register_created_effect(t){S(this,Gi).push(t)}increment(t,n){if(re(this,vl,S(this,vl)+1),t){let r=S(this,ir).get(n)??0;S(this,ir).set(n,r+1)}}decrement(t,n){if(re(this,vl,S(this,vl)-1),t){let r=S(this,ir).get(n)??0;r===1?S(this,ir).delete(n):S(this,ir).set(n,r-1)}S(this,yl)||(re(this,yl,!0),mr(()=>{re(this,yl,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)S(this,Rr).add(r);for(const r of n)S(this,Hn).add(r);t.clear(),n.clear()}oncommit(t){S(this,ml).add(t)}ondiscard(t){S(this,gl).add(t)}on_fork_commit(t){S(this,gs).add(t)}run_fork_commit_callbacks(){for(const t of S(this,gs))t(this);S(this,gs).clear()}settled(){return(S(this,Wi)??re(this,Wi,Zg())).promise}static ensure(){var t;if(X===null){const n=X=new Bo;me(t=n,Se,cd).call(t),!Xu&&!bi&&mr(()=>{S(n,pl)||n.flush()})}return X}apply(){{dt=null;return}}schedule(t){var s;if(ad=t,(s=t.b)!=null&&s.is_pending&&t.f&(Al|uu|yf)&&!(t.f&rs)){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(rl!==null&&n===ce&&(ve===null||!(ve.f&mt)))return;if(r&(wr|Jn)){if(!(r&et))return;n.f^=et}}S(this,Bt).push(n)}};pl=new WeakMap,Mr=new WeakMap,ms=new WeakMap,ml=new WeakMap,gl=new WeakMap,gs=new WeakMap,vl=new WeakMap,ir=new WeakMap,Wi=new WeakMap,Bt=new WeakMap,Gi=new WeakMap,Rr=new WeakMap,Hn=new WeakMap,Kn=new WeakMap,xl=new WeakMap,yl=new WeakMap,Se=new WeakSet,od=function(){if(this.is_fork)return!0;for(const r of S(this,ir).keys()){for(var t=r,n=!1;t.parent!==null;){if(S(this,Kn).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},ui=function(){var u,c,f,g;if(re(this,pl,!0),op++>1e3&&(me(this,Se,Hs).call(this),sw()),!me(this,Se,od).call(this)){for(const d of S(this,Rr))S(this,Hn).delete(d),Ge(d,at),this.schedule(d);for(const d of S(this,Hn))Ge(d,Xn),this.schedule(d)}const t=S(this,Bt);re(this,Bt,[]),this.apply();var n=rl=[],r=[],s=io=[];for(const d of t)try{me(this,Se,ud).call(this,d,n,r)}catch(w){throw vv(d),w}if(X=null,s.length>0){var l=Bo.ensure();for(const d of s)l.schedule(d)}if(rl=null,io=null,me(this,Se,od).call(this)){me(this,Se,ao).call(this,r),me(this,Se,ao).call(this,n);for(const[d,w]of S(this,Kn))gv(d,w);s.length>0&&me(u=X,Se,ui).call(u);return}const a=me(this,Se,hv).call(this);if(a){me(c=a,Se,pv).call(c,this);return}S(this,Rr).clear(),S(this,Hn).clear();for(const d of S(this,ml))d(this);S(this,ml).clear(),wi=this,up(r),up(n),wi=null,(f=S(this,Wi))==null||f.resolve();var o=X;if(this.linked&&S(this,vl)===0&&me(this,Se,Hs).call(this),S(this,Bt).length>0){o===null&&(o=this,me(this,Se,cd).call(this));const d=o;S(d,Bt).push(...S(this,Bt).filter(w=>!S(d,Bt).includes(w)))}o!==null&&me(g=o,Se,ui).call(g)},ud=function(t,n,r){t.f^=et;for(var s=t.first;s!==null;){var l=s.f,a=(l&(Jn|wr))!==0,o=a&&(l&et)!==0,u=o||(l&pn)!==0||S(this,Kn).has(s);if(!u&&s.fn!==null){a?s.f^=et:l&Al?n.push(s):ua(s)&&(l&Cn&&S(this,Hn).add(s),Ll(s));var c=s.first;if(c!==null){s=c;continue}}for(;s!==null;){var f=s.next;if(f!==null){s=f;break}s=s.parent}}},hv=function(){for(var t=S(this,Mr);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=S(t,Mr)}return null},pv=function(t){var r;for(const[s,l]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,l);for(const[s,l]of t.async_deriveds){const a=this.async_deriveds.get(s);a&&l.promise.then(a.resolve)}const n=s=>{var l=s.reactions;if(l!==null)for(const u of l){var a=u.f;if(a&mt)n(u);else{var o=u;a&(dl|Cn)&&!this.async_deriveds.has(o)&&(S(this,Hn).delete(o),Ge(o,at),this.schedule(o))}}};for(const s of this.current.keys())n(s);this.oncommit(()=>t.discard()),me(r=t,Se,Hs).call(r),X=this,me(this,Se,ui).call(this)},ao=function(t){for(var n=0;n<t.length;n+=1)dv(t[n],S(this,Rr),S(this,Hn))},rw=function(){var f;me(this,Se,Hs).call(this);for(let g=Ju;g!==null;g=S(g,ms)){var t=g.id<this.id,n=[];for(const[d,[w,y]]of this.current){if(g.current.has(d)){var r=g.current.get(d)[0];if(t&&w!==r)g.current.set(d,[w,y]);else continue}n.push(d)}if(t)for(const[d,w]of this.async_deriveds){const y=g.async_deriveds.get(d);y&&w.promise.then(y.resolve)}if(S(g,pl)){var s=[...g.current.keys()].filter(d=>!this.current.has(d));if(s.length===0)t&&g.discard();else if(n.length>0){if(t)for(const d of S(this,xl))g.unskip_effect(d,w=>{var y;w.f&(Cn|dl)?g.schedule(w):me(y=g,Se,ao).call(y,[w])});g.activate();var l=new Set,a=new Map;for(var o of n)mv(o,s,l,a);a=new Map;var u=[...g.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d.v:!0);if(u.length>0)for(const d of S(this,Gi))!(d.f&(Mn|pn|Io))&&Nf(d,u,a)&&(d.f&(dl|Cn)?(Ge(d,at),g.schedule(d)):S(g,Rr).add(d));if(S(g,Bt).length>0){g.apply();for(var c of S(g,Bt))me(f=g,Se,ud).call(f,c,[],[]);re(g,Bt,[])}g.deactivate()}}}},cd=function(){Vs===null?Ju=Vs=this:(re(Vs,ms,this),re(this,Mr,Vs)),Vs=this},Hs=function(){var t=S(this,Mr),n=S(this,ms);t===null?Ju=n:re(t,ms,n),n===null?Vs=t:re(n,Mr,t),this.linked=!1};let Jr=Bo;function Pe(e){var t=bi;bi=!0;try{for(var n;;){if(Gy(),X===null)return n;X.flush()}}finally{bi=t}}function sw(){try{$y()}catch(e){Ir(e,ad)}}let kn=null;function up(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(Mn|pn))&&ua(r)&&(kn=new Set,Ll(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Uv(r),(kn==null?void 0:kn.size)>0)){_s.clear();for(const s of kn){if(s.f&(Mn|pn))continue;const l=[s];let a=s.parent;for(;a!==null;)kn.has(a)&&(kn.delete(a),l.push(a)),a=a.parent;for(let o=l.length-1;o>=0;o--){const u=l[o];u.f&(Mn|pn)||Ll(u)}}kn.clear()}}kn=null}}function mv(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const l=s.f;l&mt?mv(s,t,n,r):l&(dl|Cn)&&!(l&at)&&Nf(s,t,r)&&(Ge(s,at),jf(s))}}function Nf(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(Tl.call(t,s))return!0;if(s.f&mt&&Nf(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function jf(e){X.schedule(e)}function gv(e,t){if(!(e.f&Jn&&e.f&et)){e.f&at?t.d.push(e):e.f&Xn&&t.m.push(e),Ge(e,et);for(var n=e.first;n!==null;)gv(n,t),n=n.next}}function vv(e){Ge(e,et);for(var t=e.first;t!==null;)vv(t),t=t.next}function lw(e){let t=0,n=oa(0),r;return()=>{Tf()&&(p(n),pu(()=>(t===0&&(r=ca(()=>e(()=>ki(n)))),t+=1,()=>{mr(()=>{t-=1,t===0&&(r==null||r(),r=void 0,ki(n))})})))}}var iw=Zr|$s;function aw(e,t,n,r){new ow(e,t,n,r)}var Ht,qi,sn,vs,Mt,ln,Nt,Kt,ar,xs,$r,wl,Qi,Yi,or,Ho,ze,xv,yv,wv,dd,oo,uo,fd,hd;class ow{constructor(t,n,r,s){ie(this,ze);ne(this,"parent");ne(this,"is_pending",!1);ne(this,"transform_error");ie(this,Ht);ie(this,qi,he?fe:null);ie(this,sn);ie(this,vs);ie(this,Mt);ie(this,ln,null);ie(this,Nt,null);ie(this,Kt,null);ie(this,ar,null);ie(this,xs,0);ie(this,$r,0);ie(this,wl,!1);ie(this,Qi,new Set);ie(this,Yi,new Set);ie(this,or,null);ie(this,Ho,lw(()=>(re(this,or,oa(S(this,xs))),()=>{re(this,or,null)})));var l;re(this,Ht,t),re(this,sn,n),re(this,vs,a=>{var o=ce;o.b=this,o.f|=ed,r(a)}),this.parent=ce.b,this.transform_error=s??((l=this.parent)==null?void 0:l.transform_error)??(a=>a),re(this,Mt,da(()=>{if(he){const a=S(this,qi);Ls();const o=a.data===ev;if(a.data.startsWith(lp)){const c=JSON.parse(a.data.slice(lp.length));me(this,ze,yv).call(this,c)}else o?me(this,ze,wv).call(this):me(this,ze,xv).call(this)}else me(this,ze,dd).call(this)},iw)),he&&re(this,Ht,fe)}defer_effect(t){dv(t,S(this,Qi),S(this,Yi))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!S(this,sn).pending}update_pending_count(t,n){me(this,ze,fd).call(this,t,n),re(this,xs,S(this,xs)+t),!(!S(this,or)||S(this,wl))&&(re(this,wl,!0),mr(()=>{re(this,wl,!1),S(this,or)&&Vo(S(this,or),S(this,xs))}))}get_effect_pending(){return S(this,Ho).call(this),p(S(this,or))}error(t){if(!S(this,sn).onerror&&!S(this,sn).failed)throw t;X!=null&&X.is_fork?(S(this,ln)&&X.skip_effect(S(this,ln)),S(this,Nt)&&X.skip_effect(S(this,Nt)),S(this,Kt)&&X.skip_effect(S(this,Kt)),X.on_fork_commit(()=>{me(this,ze,hd).call(this,t)})):me(this,ze,hd).call(this,t)}}Ht=new WeakMap,qi=new WeakMap,sn=new WeakMap,vs=new WeakMap,Mt=new WeakMap,ln=new WeakMap,Nt=new WeakMap,Kt=new WeakMap,ar=new WeakMap,xs=new WeakMap,$r=new WeakMap,wl=new WeakMap,Qi=new WeakMap,Yi=new WeakMap,or=new WeakMap,Ho=new WeakMap,ze=new WeakSet,xv=function(){try{re(this,ln,Bn(()=>S(this,vs).call(this,S(this,Ht))))}catch(t){this.error(t)}},yv=function(t){const n=S(this,sn).failed;n&&re(this,Kt,Bn(()=>{n(S(this,Ht),()=>t,()=>()=>{})}))},wv=function(){const t=S(this,sn).pending;t&&(this.is_pending=!0,re(this,Nt,Bn(()=>t(S(this,Ht)))),mr(()=>{var n=re(this,ar,document.createDocumentFragment()),r=er();n.append(r),re(this,ln,me(this,ze,uo).call(this,()=>Bn(()=>S(this,vs).call(this,r)))),S(this,$r)===0&&(S(this,Ht).before(n),re(this,ar,null),_i(S(this,Nt),()=>{re(this,Nt,null)}),me(this,ze,oo).call(this,X))}))},dd=function(){try{if(this.is_pending=this.has_pending_snippet(),re(this,$r,0),re(this,xs,0),re(this,ln,Bn(()=>{S(this,vs).call(this,S(this,Ht))})),S(this,$r)>0){var t=re(this,ar,document.createDocumentFragment());Bv(S(this,ln),t);const n=S(this,sn).pending;re(this,Nt,Bn(()=>n(S(this,Ht))))}else me(this,ze,oo).call(this,X)}catch(n){this.error(n)}},oo=function(t){this.is_pending=!1,t.transfer_effects(S(this,Qi),S(this,Yi))},uo=function(t){var n=ce,r=ve,s=Ut;tr(S(this,Mt)),xn(S(this,Mt)),Pl(S(this,Mt).ctx);try{return Jr.ensure(),t()}catch(l){return uv(l),null}finally{tr(n),xn(r),Pl(s)}},fd=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&me(r=this.parent,ze,fd).call(r,t,n);return}re(this,$r,S(this,$r)+t),S(this,$r)===0&&(me(this,ze,oo).call(this,n),S(this,Nt)&&_i(S(this,Nt),()=>{re(this,Nt,null)}),S(this,ar)&&(S(this,Ht).before(S(this,ar)),re(this,ar,null)))},hd=function(t){S(this,ln)&&(ht(S(this,ln)),re(this,ln,null)),S(this,Nt)&&(ht(S(this,Nt)),re(this,Nt,null)),S(this,Kt)&&(ht(S(this,Kt)),re(this,Kt,null)),he&&(Ct(S(this,qi)),bf(),Ct(kf()));var n=S(this,sn).onerror;let r=S(this,sn).failed;var s=!1,l=!1;const a=()=>{if(s){Yy();return}s=!0,l&&Uy(),S(this,Kt)!==null&&_i(S(this,Kt),()=>{re(this,Kt,null)}),me(this,ze,uo).call(this,()=>{me(this,ze,dd).call(this)})},o=u=>{try{l=!0,n==null||n(u,a),l=!1}catch(c){Ir(c,S(this,Mt)&&S(this,Mt).parent)}r&&re(this,Kt,me(this,ze,uo).call(this,()=>{try{return Bn(()=>{var c=ce;c.b=this,c.f|=ed,r(S(this,Ht),()=>u,()=>a)})}catch(c){return Ir(c,S(this,Mt).parent),null}}))};mr(()=>{var u;try{u=this.transform_error(t)}catch(c){Ir(c,S(this,Mt)&&S(this,Mt).parent);return}u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(o,c=>Ir(c,S(this,Mt)&&S(this,Mt).parent)):o(u)})};function bv(e,t,n,r){const s=Ef;var l=e.filter(d=>!d.settled);if(n.length===0&&l.length===0){r(t.map(s));return}var a=ce,o=uw(),u=l.length===1?l[0].promise:l.length>1?Promise.all(l.map(d=>d.promise)):null;function c(d){if(!(a.f&Mn)){o();try{r(d)}catch(w){Ir(w,a)}Uo()}}var f=kv();if(n.length===0){u.then(()=>c(t.map(s))).finally(f);return}function g(){Promise.all(n.map(d=>cw(d))).then(d=>c([...t.map(s),...d])).catch(d=>Ir(d,a)).finally(f)}u?u.then(()=>{o(),g(),Uo()}):g()}function uw(){var e=ce,t=ve,n=Ut,r=X;return function(l=!0){tr(e),xn(t),Pl(n),l&&!(e.f&Mn)&&(r==null||r.activate(),r==null||r.apply())}}function Uo(e=!0){tr(null),xn(null),Pl(null),e&&(X==null||X.deactivate())}function kv(){var e=ce,t=e.b,n=X,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}function Ef(e){var t=mt|at;return ce!==null&&(ce.f|=$s),{ctx:Ut,deps:null,effects:null,equals:Jg,f:t,fn:e,reactions:null,rv:0,v:Qe,wv:0,parent:ce,ac:null}}const Ba=Symbol("obsolete");function cw(e,t,n){let r=ce;r===null&&Py();var s=void 0,l=oa(Qe),a=!ve,o=new Set;return kw(()=>{var w;var u=ce,c=Zg();s=c.promise;try{Promise.resolve(e()).then(c.resolve,y=>{y!==cu&&c.reject(y)}).finally(Uo)}catch(y){c.reject(y),Uo()}var f=X;if(a){if(u.f&rs)var g=kv();if(r.b.is_rendered())(w=f.async_deriveds.get(u))==null||w.reject(Ba);else for(const y of o.values())y.reject(Ba);o.add(c),f.async_deriveds.set(u,c)}const d=(y,N=void 0)=>{g==null||g(),o.delete(c),N!==Ba&&(f.activate(),N?(l.f|=qr,Vo(l,N)):(l.f&qr&&(l.f^=qr),Vo(l,y)),f.deactivate())};c.promise.then(d,y=>d(null,y||"unknown"))}),hu(()=>{for(const u of o)u.reject(Ba)}),new Promise(u=>{function c(f){function g(){f===s?u(l):c(s)}f.then(g,g)}c(s)})}function St(e){const t=Ef(e);return Tv(t),t}function dw(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ht(t[n])}}function Cf(e){var t,n=ce,r=e.parent;if(!br&&r!==null&&e.v!==Qe&&r.f&(Mn|pn))return qy(),e.v;tr(r);try{e.f&=~As,dw(e),t=Mv(e)}finally{tr(n)}return t}function _v(e){var t=Cf(e);if(!e.equals(t)&&(e.wv=Pv(),(!(X!=null&&X.is_fork)||e.deps===null)&&(X!==null?(X.capture(e,t,!0),wi==null||wi.capture(e,t,!0)):e.v=t,e.deps===null))){Ge(e,et);return}br||(dt!==null?(Tf()||X!=null&&X.is_fork)&&dt.set(e,t):Sf(e))}function fw(e){var t,n;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),(n=r.ac)==null||n.abort(cu),r.fn!==null&&(r.teardown=Gr),r.ac=null,Ki(r,0),Pf(r))}function Sv(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Ll(t)}let Fo=new Set;const _s=new Map;let Nv=!1;function oa(e,t){var n={f:0,v:e,reactions:null,equals:Jg,rv:0,wv:0};return n}function ge(e,t){const n=oa(e);return Tv(n),n}function jv(e,t=!1,n=!0){const r=oa(e);return t||(r.equals=Ty),r}function Q(e,t,n=!1){ve!==null&&(!Tn||ve.f&Io)&&rv()&&ve.f&(mt|Cn|dl|Io)&&(mn===null||!Tl.call(mn,e))&&Oy();let r=n?hr(t):t;return Vo(e,r,io)}function Vo(e,t,n=null){if(!e.equals(t)){_s.set(e,br?t:e.v);var r=Jr.ensure();if(r.capture(e,t),e.f&mt){const s=e;e.f&at&&Cf(s),dt===null&&Sf(s)}e.wv=Pv(),Ev(e,at,n),ce!==null&&ce.f&et&&!(ce.f&(Jn|wr))&&(rn===null?gw([e]):rn.push(e)),!r.is_fork&&Fo.size>0&&!Nv&&hw()}return t}function hw(){Nv=!1;for(const e of Fo){e.f&et&&Ge(e,Xn);let t;try{t=ua(e)}catch{t=!0}t&&Ll(e)}Fo.clear()}function ki(e){Q(e,e.v+1)}function Ev(e,t,n){var r=e.reactions;if(r!==null)for(var s=r.length,l=0;l<s;l++){var a=r[l],o=a.f,u=(o&at)===0;if(u&&Ge(a,t),o&Io)Fo.add(a);else if(o&mt){var c=a;dt==null||dt.delete(c),o&As||(o&hn&&(ce===null||!(ce.f&Oo))&&(a.f|=As),Ev(c,Xn,n))}else if(u){var f=a;o&Cn&&kn!==null&&kn.add(f),n!==null?n.push(f):jf(f)}}}function pw(e,t){if(t){const n=document.body;e.autofocus=!0,mr(()=>{document.activeElement===n&&e.focus()})}}let cp=!1;function Cv(){cp||(cp=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n[yi])==null||t.call(n)})},{capture:!0}))}function fu(e){var t=ve,n=ce;xn(null),tr(null);try{return e()}finally{xn(t),tr(n)}}function mw(e,t,n,r=n){e.addEventListener(t,()=>fu(n));const s=e[yi];s?e[yi]=()=>{s(),r(!0)}:e[yi]=()=>r(!0),Cv()}let co=!1,br=!1;function dp(e){br=e}let ve=null,Tn=!1;function xn(e){ve=e}let ce=null;function tr(e){ce=e}let mn=null;function Tv(e){ve!==null&&(mn===null?mn=[e]:mn.push(e))}let Rt=null,Ft=0,rn=null;function gw(e){rn=e}let Av=1,fs=0,Ss=fs;function fp(e){Ss=e}function Pv(){return++Av}function ua(e){var t=e.f;if(t&at)return!0;if(t&mt&&(e.f&=~As),t&Xn){for(var n=e.deps,r=n.length,s=0;s<r;s++){var l=n[s];if(ua(l)&&_v(l),l.wv>e.wv)return!0}t&hn&&dt===null&&Ge(e,et)}return!1}function Lv(e,t,n=!0){var r=e.reactions;if(r!==null&&!(mn!==null&&Tl.call(mn,e)))for(var s=0;s<r.length;s++){var l=r[s];l.f&mt?Lv(l,t,!1):t===l&&(n?Ge(l,at):l.f&et&&Ge(l,Xn),jf(l))}}function Mv(e){var N;var t=Rt,n=Ft,r=rn,s=ve,l=mn,a=Ut,o=Tn,u=Ss,c=e.f;Rt=null,Ft=0,rn=null,ve=c&(Jn|wr)?null:e,mn=null,Pl(e.ctx),Tn=!1,Ss=++fs,e.ac!==null&&(fu(()=>{e.ac.abort(cu)}),e.ac=null);try{e.f|=Oo;var f=e.fn,g=f();e.f|=rs;var d=e.deps,w=X==null?void 0:X.is_fork;if(Rt!==null){var y;if(w||Ki(e,Ft),d!==null&&Ft>0)for(d.length=Ft+Rt.length,y=0;y<Rt.length;y++)d[Ft+y]=Rt[y];else e.deps=d=Rt;if(Tf()&&e.f&hn)for(y=Ft;y<d.length;y++)((N=d[y]).reactions??(N.reactions=[])).push(e)}else!w&&d!==null&&Ft<d.length&&(Ki(e,Ft),d.length=Ft);if(rv()&&rn!==null&&!Tn&&d!==null&&!(e.f&(mt|Xn|at)))for(y=0;y<rn.length;y++)Lv(rn[y],e);if(s!==null&&s!==e){if(fs++,s.deps!==null)for(let R=0;R<n;R+=1)s.deps[R].rv=fs;if(t!==null)for(const R of t)R.rv=fs;rn!==null&&(r===null?r=rn:r.push(...rn))}return e.f&qr&&(e.f^=qr),g}catch(R){return uv(R)}finally{e.f^=Oo,Rt=t,Ft=n,rn=r,ve=s,mn=l,Pl(a),Tn=o,Ss=u}}function vw(e,t){let n=t.reactions;if(n!==null){var r=yy.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&t.f&mt&&(Rt===null||!Tl.call(Rt,t))){var l=t;l.f&hn&&(l.f^=hn,l.f&=~As),l.v!==Qe&&Sf(l),fw(l),Ki(l,0)}}function Ki(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)vw(e,n[r])}function Ll(e){var t=e.f;if(!(t&Mn)){Ge(e,et);var n=ce,r=co;ce=e,co=!0;try{t&(Cn|yf)?_w(e):Pf(e),Iv(e);var s=Mv(e);e.teardown=typeof s=="function"?s:null,e.wv=Av;var l;qg&&Fy&&e.f&at&&e.deps}finally{co=r,ce=n}}}async function hs(){await Promise.resolve(),Pe()}function p(e){var t=e.f,n=(t&mt)!==0;if(ve!==null&&!Tn){var r=ce!==null&&(ce.f&Mn)!==0;if(!r&&(mn===null||!Tl.call(mn,e))){var s=ve.deps;if(ve.f&Oo)e.rv<fs&&(e.rv=fs,Rt===null&&s!==null&&s[Ft]===e?Ft++:Rt===null?Rt=[e]:Rt.push(e));else{(ve.deps??(ve.deps=[])).push(e);var l=e.reactions;l===null?e.reactions=[ve]:Tl.call(l,ve)||l.push(ve)}}}if(br&&_s.has(e))return _s.get(e);if(n){var a=e;if(br){var o=a.v;return(!(a.f&et)&&a.reactions!==null||$v(a))&&(o=Cf(a)),_s.set(a,o),o}var u=(a.f&hn)===0&&!Tn&&ve!==null&&(co||(ve.f&hn)!==0),c=(a.f&rs)===0;ua(a)&&(u&&(a.f|=hn),_v(a)),u&&!c&&(Sv(a),Rv(a))}if(dt!=null&&dt.has(e))return dt.get(e);if(e.f&qr)throw e.v;return e.v}function Rv(e){if(e.f|=hn,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&mt&&!(t.f&hn)&&(Sv(t),Rv(t))}function $v(e){if(e.v===Qe)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(_s.has(t)||t.f&mt&&$v(t))return!0;return!1}function ca(e){var t=Tn;try{return Tn=!0,e()}finally{Tn=t}}function xw(e){ce===null&&(ve===null&&Ry(),My()),br&&Ly()}function yw(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function $n(e,t){var n=ce;n!==null&&n.f&pn&&(e|=pn);var r={ctx:Ut,deps:null,nodes:null,f:e|at|hn,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};X==null||X.register_created_effect(r);var s=r;if(e&Al)rl!==null?rl.push(r):Jr.ensure().schedule(r);else if(t!==null){try{Ll(r)}catch(a){throw ht(r),a}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&!(s.f&$s)&&(s=s.first,e&Cn&&e&Zr&&s!==null&&(s.f|=Zr))}if(s!==null&&(s.parent=n,n!==null&&yw(s,n),ve!==null&&ve.f&mt&&!(e&wr))){var l=ve;(l.effects??(l.effects=[])).push(s)}return r}function Tf(){return ve!==null&&!Tn}function hu(e){const t=$n(uu,null);return Ge(t,et),t.teardown=e,t}function Vt(e){xw();var t=ce.f,n=!ve&&(t&Jn)!==0&&(t&rs)===0;if(n){var r=Ut;(r.e??(r.e=[])).push(e)}else return Dv(e)}function Dv(e){return $n(Al|jy,e)}function ww(e){Jr.ensure();const t=$n(wr|$s,e);return()=>{ht(t)}}function bw(e){Jr.ensure();const t=$n(wr|$s,e);return(n={})=>new Promise(r=>{n.outro?_i(t,()=>{ht(t),r(void 0)}):(ht(t),r(void 0))})}function Af(e){return $n(Al,e)}function kw(e){return $n(dl|$s,e)}function pu(e,t=0){return $n(uu|t,e)}function wt(e,t=[],n=[],r=[]){bv(r,t,n,s=>{$n(uu,()=>e(...s.map(p)))})}function da(e,t=0){var n=$n(Cn|t,e);return n}function zv(e,t=0){var n=$n(yf|t,e);return n}function Bn(e){return $n(Jn|$s,e)}function Iv(e){var t=e.teardown;if(t!==null){const n=br,r=ve;dp(!0),xn(null);try{t.call(null)}finally{dp(n),xn(r)}}}function Pf(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&fu(()=>{s.abort(cu)});var r=n.next;n.f&wr?n.parent=null:ht(n,t),n=r}}function _w(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Jn||ht(t),t=n}}function ht(e,t=!0){var n=!1;(t||e.f&Ny)&&e.nodes!==null&&e.nodes.end!==null&&(Ov(e.nodes.start,e.nodes.end),n=!0),Ge(e,td),Pf(e,t&&!n),Ki(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)l.stop();Iv(e),e.f^=td,e.f|=Mn;var s=e.parent;s!==null&&s.first!==null&&Uv(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Ov(e,t){for(;e!==null;){var n=e===t?null:nr(e);e.remove(),e=n}}function Uv(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function _i(e,t,n=!0){var r=[];Fv(e,r,!0);var s=()=>{n&&ht(e),t&&t()},l=r.length;if(l>0){var a=()=>--l||s();for(var o of r)o.out(a)}else s()}function Fv(e,t,n){if(!(e.f&pn)){e.f^=pn;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var s=e.first;s!==null;){var l=s.next;if(!(s.f&wr)){var a=(s.f&Zr)!==0||(s.f&Jn)!==0&&(e.f&Cn)!==0;Fv(s,t,a?n:!1)}s=l}}}function Sw(e){Vv(e,!0)}function Vv(e,t){if(e.f&pn){e.f^=pn,e.f&et||(Ge(e,at),Jr.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Zr)!==0||(n.f&Jn)!==0;Vv(n,s?t:!1),n=r}var l=e.nodes&&e.nodes.t;if(l!==null)for(const a of l)(a.is_global||t)&&a.in()}}function Bv(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:nr(n);t.append(n),n=s}}function hp(e){const t={get:n=>oi(t.store)[n],set:(n,r)=>{typeof n=="string"?Object.assign(oi(t.store),{[n]:r}):Object.assign(oi(t.store),n),t.store.set(oi(t.store))},store:ew(e)};return t}globalThis.$altcha=globalThis.$altcha||{algorithms:new Map,defaults:hp({}),i18n:hp({}),instances:new Set,plugins:new Set};const Nw={ariaLinkLabel:"Altcha (official website)",cancel:"Cancel",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",enterCodeFromImage:"To proceed, please enter the code from the image below.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" tabindex="-1" target="_blank" aria-label="Altcha (official website)">ALTCHA</a>',getAudioChallenge:"Get an audio challenge",label:"I'm not a robot",loading:"Loading...",reload:"Reload",verify:"Verify",verificationRequired:"Verification required!",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait."};globalThis.$altcha.i18n.set("en",Nw);const jw="5";var Np;typeof window<"u"&&((Np=window.__svelte??(window.__svelte={})).v??(Np.v=new Set)).add(jw);const ps=Symbol("events"),Hv=new Set,pd=new Set;function Kv(e,t,n,r={}){function s(l){if(r.capture||md.call(t,l),!l.cancelBubble)return fu(()=>n==null?void 0:n.call(this,l))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?mr(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Je(e,t,n,r,s){var l={capture:r,passive:s},a=Kv(e,t,n,l);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&hu(()=>{t.removeEventListener(e,a,l)})}function mu(e,t,n){(t[ps]??(t[ps]={}))[e]=n}function gu(e){for(var t=0;t<e.length;t++)Hv.add(e[t]);for(var n of pd)n(e)}let pp=null;function md(e){var R,v;var t=this,n=t.ownerDocument,r=e.type,s=((R=e.composedPath)==null?void 0:R.call(e))||[],l=s[0]||e.target;pp=e;var a=0,o=pp===e&&e[ps];if(o){var u=s.indexOf(o);if(u!==-1&&(t===document||t===window)){e[ps]=t;return}var c=s.indexOf(t);if(c===-1)return;u<=c&&(a=u)}if(l=s[a]||e.target,l!==t){Hi(e,"currentTarget",{configurable:!0,get(){return l||n}});var f=ve,g=ce;xn(null),tr(null);try{for(var d,w=[];l!==null;){var y=l.assignedSlot||l.parentNode||l.host||null;try{var N=(v=l[ps])==null?void 0:v[r];N!=null&&(!l.disabled||e.target===l)&&N.call(l,e)}catch(h){d?w.push(h):d=h}if(e.cancelBubble||y===t||y===null)break;l=y}if(d){for(let h of w)queueMicrotask(()=>{throw h});throw d}}finally{e[ps]=t,delete e.currentTarget,xn(f),tr(g)}}}var jp;const ec=((jp=globalThis==null?void 0:globalThis.window)==null?void 0:jp.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ew(e){return(ec==null?void 0:ec.createHTML(e))??e}function Wv(e){var t=_f("template");return t.innerHTML=Ew(e.replaceAll("<!>","<!---->")),t.content}function Yt(e,t){var n=ce;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Fe(e,t){var n=(t&Vy)!==0,r=(t&By)!==0,s,l=!e.startsWith("<!>");return()=>{if(he)return Yt(fe,null),fe;s===void 0&&(s=Wv(l?e:"<!>"+e),n||(s=Gt(s)));var a=r||iv?document.importNode(s,!0):s.cloneNode(!0);if(n){var o=Gt(a),u=a.lastChild;Yt(o,u)}else Yt(a,a);return a}}function Cw(e,t,n="svg"){var r=!e.startsWith("<!>"),s=`<${n}>${r?e:"<!>"+e}</${n}>`,l;return()=>{if(he)return Yt(fe,null),fe;if(!l){var a=Wv(s),o=Gt(a);l=Gt(o)}var u=l.cloneNode(!0);return Yt(u,u),u}}function Lf(e,t){return Cw(e,t,"svg")}function Ha(e=""){if(!he){var t=er(e+"");return Yt(t,t),t}var n=fe;return n.nodeType!==la?(n.before(n=er()),Ct(n)):du(n),Yt(n,n),n}function mp(){if(he)return Yt(fe,null),fe;var e=document.createDocumentFragment(),t=document.createComment(""),n=er();return e.append(t,n),Yt(t,n),e}function ye(e,t){if(he){var n=ce;(!(n.f&rs)||n.nodes.end===null)&&(n.nodes.end=fe),Ls();return}e!==null&&e.before(t)}function Tw(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Aw=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Pw(e){return Aw.includes(e)}const Lw={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Mw(e){return e=e.toLowerCase(),Lw[e]??e}const Rw=["touchstart","touchmove"];function $w(e){return Rw.includes(e)}function Wn(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[ai]??(e[ai]=e.nodeValue))&&(e[ai]=n,e.nodeValue=`${n}`)}function Gv(e,t){return qv(e,t)}function Dw(e,t){ld(),t.intro=t.intro??!1;const n=t.target,r=he,s=fe;try{for(var l=Gt(n);l&&(l.nodeType!==ia||l.data!==wf);)l=nr(l);if(!l)throw Ps;qn(!0),Ct(l);const a=qv(e,{...t,anchor:l});return qn(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
||
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==Ps&&console.warn("Failed to hydrate: ",a),t.recover===!1&&Dy(),ld(),Jy(n),qn(!1),Gv(e,t)}finally{qn(r),Ct(s)}}const Ka=new Map;function qv(e,{target:t,anchor:n,props:r={},events:s,context:l,intro:a=!0,transformError:o}){ld();var u=void 0,c=bw(()=>{var f=n??t.appendChild(er());aw(f,{pending:()=>{}},w=>{_r({});var y=Ut;if(l&&(y.c=l),s&&(r.$$events=s),he&&Yt(w,null),u=e(w,r)||{},he&&(ce.nodes.end=fe,fe===null||fe.nodeType!==ia||fe.data!==tv))throw aa(),Ps;Sr()},o);var g=new Set,d=w=>{for(var y=0;y<w.length;y++){var N=w[y];if(!g.has(N)){g.add(N);var R=$w(N);for(const m of[t,document]){var v=Ka.get(m);v===void 0&&(v=new Map,Ka.set(m,v));var h=v.get(N);h===void 0?(m.addEventListener(N,md,{passive:R}),v.set(N,1)):v.set(N,h+1)}}}};return d(wy(Hv)),pd.add(d),()=>{var R;for(var w of g)for(const v of[t,document]){var y=Ka.get(v),N=y.get(w);--N==0?(v.removeEventListener(w,md),y.delete(w),y.size===0&&Ka.delete(v)):y.set(w,N)}pd.delete(d),f!==n&&((R=f.parentNode)==null||R.removeChild(f))}});return gd.set(u,c),u}let gd=new WeakMap;function zw(e,t){const n=gd.get(e);return n?(gd.delete(e),n(t)):Promise.resolve()}var Sn,ur,Nn,ys,Zi,Ko,bd;class vu{constructor(t,n=!0){ne(this,"anchor");ie(this,Sn,new Map);ie(this,ur,new Map);ie(this,Nn,new Map);ie(this,ys,new Set);ie(this,Zi,!0);ie(this,Ko,t=>{if(S(this,Sn).has(t)){var n=S(this,Sn).get(t),r=S(this,ur).get(n);if(r)Sw(r),S(this,ys).delete(n);else{var s=S(this,Nn).get(n);s&&(S(this,ur).set(n,s.effect),S(this,Nn).delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),r=s.effect)}for(const[l,a]of S(this,Sn)){if(S(this,Sn).delete(l),l===t)break;const o=S(this,Nn).get(a);o&&(ht(o.effect),S(this,Nn).delete(a))}for(const[l,a]of S(this,ur)){if(l===n||S(this,ys).has(l))continue;const o=()=>{if(Array.from(S(this,Sn).values()).includes(l)){var c=document.createDocumentFragment();Bv(a,c),c.append(er()),S(this,Nn).set(l,{effect:a,fragment:c})}else ht(a);S(this,ys).delete(l),S(this,ur).delete(l)};S(this,Zi)||!r?(S(this,ys).add(l),_i(a,o,!1)):o()}}});ie(this,bd,t=>{S(this,Sn).delete(t);const n=Array.from(S(this,Sn).values());for(const[r,s]of S(this,Nn))n.includes(r)||(ht(s.effect),S(this,Nn).delete(r))});this.anchor=t,re(this,Zi,n)}ensure(t,n){var r=X;n&&!S(this,ur).has(t)&&!S(this,Nn).has(t)&&S(this,ur).set(t,Bn(()=>n(this.anchor))),S(this,Sn).set(r,t),he&&(this.anchor=fe),S(this,Ko).call(this,r)}}Sn=new WeakMap,ur=new WeakMap,Nn=new WeakMap,ys=new WeakMap,Zi=new WeakMap,Ko=new WeakMap,bd=new WeakMap;function Iw(e,t,...n){var r=new vu(e);da(()=>{const s=t()??null;r.ensure(s,s&&(l=>s(l,...n)))},Zr)}function Mf(e){Ut===null&&Ay(),Vt(()=>{const t=ca(e);if(typeof t=="function")return t})}function Ze(e,t,n=!1){var r;he&&(r=fe,Ls());var s=new vu(e),l=n?Zr:0;function a(o,u){if(he){var c=lv(r);if(o!==parseInt(c.substring(1))){var f=kf();Ct(f),s.anchor=f,qn(!1),s.ensure(o,u),qn(!0);return}}s.ensure(o,u)}da(()=>{var o=!1;t((u,c=0)=>{o=!0,a(c,u)}),o||a(-1,null)},l)}const Ow=Symbol("NaN");function Uw(e,t,n){he&&Ls();var r=new vu(e);da(()=>{var s=t();s!==s&&(s=Ow),r.ensure(s,n)})}function Qv(e,t,n=!1,r=!1,s=!1,l=!1){var a=e,o="";if(n){var u=e;he&&(a=Ct(Gt(u)))}wt(()=>{var c=ce;if(o===(o=t()??"")){he&&Ls();return}if(n&&!he){c.nodes=null,u.innerHTML=o,o!==""&&Yt(Gt(u),u.lastChild);return}if(c.nodes!==null&&(Ov(c.nodes.start,c.nodes.end),c.nodes=null),o!==""){if(he){fe.data;for(var f=Ls(),g=f;f!==null&&(f.nodeType!==ia||f.data!=="");)g=f,f=nr(f);if(f===null)throw aa(),Ps;Yt(fe,g),a=Ct(f);return}var d=r?Hy:s?Ky:void 0,w=_f(r?"svg":s?"math":"template",d);w.innerHTML=o;var y=r||s?w:w.content;if(Yt(Gt(y),y.lastChild),r||s)for(;Gt(y);)a.before(Gt(y));else a.before(y)}})}function Fw(e,t,n){var r;he&&(r=fe,Ls());var s=new vu(e);da(()=>{var l=t()??null;if(he){var a=lv(r),o=a===wf,u=l!==null;if(o!==u){var c=kf();Ct(c),s.anchor=c,qn(!1),s.ensure(l,l&&(f=>n(f,l))),qn(!0);return}}s.ensure(l,l&&(f=>n(f,l)))},Zr)}function Vw(e,t){var n=void 0,r;zv(()=>{n!==(n=t())&&(r&&(ht(r),r=null),n&&(r=Bn(()=>{Af(()=>n(e))})))})}function Yv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Yv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bw(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Yv(e))&&(r&&(r+=" "),r+=t);return r}function Hw(e){return typeof e=="object"?Bw(e):e??""}const gp=[...`
|
||
\r\f \v\uFEFF`];function Kw(e,t,n){var r=e==null?"":""+e;if(n){for(var s of Object.keys(n))if(n[s])r=r?r+" "+s:s;else if(r.length)for(var l=s.length,a=0;(a=r.indexOf(s,a))>=0;){var o=a+l;(a===0||gp.includes(r[a-1]))&&(o===r.length||gp.includes(r[o]))?r=(a===0?"":r.substring(0,a))+r.substring(o+1):a=o}}return r===""?null:r}function vp(e,t=!1){var n=t?" !important;":";",r="";for(var s of Object.keys(e)){var l=e[s];l!=null&&l!==""&&(r+=" "+s+": "+l+n)}return r}function tc(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Ww(e,t){if(t){var n="",r,s;if(Array.isArray(t)?(r=t[0],s=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var l=!1,a=0,o=!1,u=[];r&&u.push(...Object.keys(r).map(tc)),s&&u.push(...Object.keys(s).map(tc));var c=0,f=-1;const N=e.length;for(var g=0;g<N;g++){var d=e[g];if(o?d==="/"&&e[g-1]==="*"&&(o=!1):l?l===d&&(l=!1):d==="/"&&e[g+1]==="*"?o=!0:d==='"'||d==="'"?l=d:d==="("?a++:d===")"&&a--,!o&&l===!1&&a===0){if(d===":"&&f===-1)f=g;else if(d===";"||g===N-1){if(f!==-1){var w=tc(e.substring(c,f).trim());if(!u.includes(w)){d!==";"&&g++;var y=e.substring(c,g).trim();n+=" "+y+";"}}c=g+1,f=-1}}}}return r&&(n+=vp(r)),s&&(n+=vp(s,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function Gw(e,t,n,r,s,l){var a=e[nd];if(he||a!==n||a===void 0){var o=Kw(n,r,l);(!he||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):t?e.className=o:e.setAttribute("class",o)),e[nd]=n}else if(l&&s!==l)for(var u in l){var c=!!l[u];(s==null||c!==!!s[u])&&e.classList.toggle(u,c)}return l}function nc(e,t={},n,r){for(var s in n){var l=n[s];t[s]!==l&&(n[s]==null?e.style.removeProperty(s):e.style.setProperty(s,l,r))}}function qw(e,t,n,r){var s=e[rd];if(he||s!==t){var l=Ww(t,r);(!he||l!==e.getAttribute("style"))&&(l==null?e.removeAttribute("style"):e.style.cssText=l),e[rd]=t}else r&&(Array.isArray(r)?(nc(e,n==null?void 0:n[0],r[0]),nc(e,n==null?void 0:n[1],r[1],"important")):nc(e,n,r));return r}function vd(e,t,n=!1){if(e.multiple){if(t==null)return;if(!Qg(t))return Qy();for(var r of e.options)r.selected=t.includes(xp(r));return}for(r of e.options){var s=xp(r);if(Zy(s,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Qw(e){var t=new MutationObserver(()=>{vd(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),hu(()=>{t.disconnect()})}function xp(e){return"__value"in e?e.__value:e.value}const ti=Symbol("class"),ni=Symbol("style"),Zv=Symbol("is custom element"),Jv=Symbol("is html"),Yw=sa?"link":"LINK",Zw=sa?"input":"INPUT",Jw=sa?"option":"OPTION",Xw=sa?"select":"SELECT",eb=sa?"progress":"PROGRESS";function Rf(e){if(he){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var r=e.value;Ne(e,"value",null),e.value=r}if(e.hasAttribute("checked")){var s=e.checked;Ne(e,"checked",null),e.checked=s}}};e[yi]=n,mr(n),Cv()}}function tb(e,t){var n=$f(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==eb)||(e.value=t??"")}function nb(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Ne(e,t,n,r){var s=$f(e);he&&(s[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===Yw)||s[t]!==(s[t]=n)&&(t==="loading"&&(e[Cy]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Xv(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function rb(e,t,n,r,s=!1,l=!1){if(he&&s&&e.nodeName===Zw){var a=e,o=a.type==="checkbox"?"defaultChecked":"defaultValue";o in n||Rf(a)}var u=$f(e),c=u[Zv],f=!u[Jv];let g=he&&c;g&&qn(!1);var d=t||{},w=e.nodeName===Jw;for(var y in t)y in n||(n[y]=null);n.class?n.class=Hw(n.class):n[ti]&&(n.class=null),n[ni]&&(n.style??(n.style=null));var N=Xv(e);for(const E in n){let j=n[E];if(w&&E==="value"&&j==null){e.value=e.__value="",d[E]=j;continue}if(E==="class"){var R=e.namespaceURI==="http://www.w3.org/1999/xhtml";Gw(e,R,j,r,t==null?void 0:t[ti],n[ti]),d[E]=j,d[ti]=n[ti];continue}if(E==="style"){qw(e,j,t==null?void 0:t[ni],n[ni]),d[E]=j,d[ni]=n[ni];continue}var v=d[E];if(!(j===v&&!(j===void 0&&e.hasAttribute(E)))){d[E]=j;var h=E[0]+E[1];if(h!=="$$")if(h==="on"){const L={},G="$$"+E;let P=E.slice(2);var m=Pw(P);if(Tw(P)&&(P=P.slice(0,-7),L.capture=!0),!m&&v){if(j!=null)continue;e.removeEventListener(P,d[G],L),d[G]=null}if(m)mu(P,e,j),gu([P]);else if(j!=null){let Y=function(ae){d[E].call(this,ae)};d[G]=Kv(P,e,Y,L)}}else if(E==="style")Ne(e,E,j);else if(E==="autofocus")pw(e,!!j);else if(!c&&(E==="__value"||E==="value"&&j!=null))e.value=e.__value=j;else if(E==="selected"&&w)nb(e,j);else{var _=E;f||(_=Mw(_));var C=_==="defaultValue"||_==="defaultChecked";if(j==null&&!c&&!C)if(u[E]=null,_==="value"||_==="checked"){let L=e;const G=t===void 0;if(_==="value"){let P=L.defaultValue;L.removeAttribute(_),L.defaultValue=P,L.value=L.__value=G?P:null}else{let P=L.defaultChecked;L.removeAttribute(_),L.defaultChecked=P,L.checked=G?P:!1}}else e.removeAttribute(E);else C||N.includes(_)&&(c||typeof j!="string")?(e[_]=j,_ in u&&(u[_]=Qe)):typeof j!="function"&&Ne(e,_,j)}}}return g&&qn(!0),d}function xu(e,t,n=[],r=[],s=[],l,a=!1,o=!1){bv(s,n,r,u=>{var c=void 0,f={},g=e.nodeName===Xw,d=!1;if(zv(()=>{var y=t(...u.map(p)),N=rb(e,c,y,l,a,o);d&&g&&"value"in y&&vd(e,y.value);for(let v of Object.getOwnPropertySymbols(f))y[v]||ht(f[v]);for(let v of Object.getOwnPropertySymbols(y)){var R=y[v];v.description===Wy&&(!c||R!==c[v])&&(f[v]&&ht(f[v]),f[v]=Bn(()=>Vw(e,()=>R))),N[v]=R}c=N}),g){var w=e;Af(()=>{vd(w,c.value,!0),Qw(w)})}d=!0})}function $f(e){return e[lo]??(e[lo]={[Zv]:e.nodeName.includes("-"),[Jv]:e.namespaceURI===nv})}var yp=new Map;function Xv(e){var t=e.getAttribute("is")||e.nodeName,n=yp.get(t);if(n)return n;yp.set(t,n=[]);for(var r,s=e,l=Element.prototype;l!==s;){r=by(s);for(var a in r)r[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&n.push(a);s=Yg(s)}return n}function sb(e,t,n=t){var r=new WeakSet;mw(e,"input",async s=>{var l=s?e.defaultValue:e.value;if(l=rc(e)?sc(l):l,n(l),X!==null&&r.add(X),await hs(),l!==(l=t())){var a=e.selectionStart,o=e.selectionEnd,u=e.value.length;if(e.value=l??"",o!==null){var c=e.value.length;a===o&&o===u&&c>u?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=a,e.selectionEnd=Math.min(o,c))}}}),(he&&e.defaultValue!==e.value||ca(t)==null&&e.value)&&(n(rc(e)?sc(e.value):e.value),X!==null&&r.add(X)),pu(()=>{var s=t();if(e===document.activeElement){var l=X;if(r.has(l))return}rc(e)&&s===sc(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function rc(e){var t=e.type;return t==="number"||t==="range"}function sc(e){return e===""?null:+e}function lc(e,t){return e===t||(e==null?void 0:e[fl])===t}function Xr(e={},t,n,r){var s=Ut.r,l=ce;return Af(()=>{var a,o;return pu(()=>{a=o,o=[],ca(()=>{lc(n(...o),e)||(t(e,...o),a&&lc(n(...a),e)&&t(null,...a))})}),()=>{let u=l;for(;u!==s&&u.parent!==null&&u.parent.f&td;)u=u.parent;const c=()=>{o&&lc(n(...o),e)&&t(null,...o)},f=u.teardown;u.teardown=()=>{c(),f==null||f()}}}),e}const lb={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function yu(e,t,n){return new Proxy({props:e,exclude:t},lb)}function Oe(e,t,n,r){var s=r,l=!0,a=()=>(l&&(l=!1,s=r),s),o;o=e[t],o===void 0&&r!==void 0&&(o=a());var u;u=()=>{var d=e[t];return d===void 0?a():(l=!0,d)};var c=!1,f=Ef(()=>(c=!1,u())),g=ce;return function(d,w){if(arguments.length>0){const y=w?p(f):d;return Q(f,y),c=!0,s!==void 0&&(s=y),d}return br&&c||g.f&Mn?f.v:p(f)}}function ib(e){return new ab(e)}var cr,an;class ab{constructor(t){ie(this,cr);ie(this,an);var l;var n=new Map,r=(a,o)=>{var u=jv(o,!1,!1);return n.set(a,u),u};const s=new Proxy({...t.props||{},$$events:{}},{get(a,o){return p(n.get(o)??r(o,Reflect.get(a,o)))},has(a,o){return o===Ey?!0:(p(n.get(o)??r(o,Reflect.get(a,o))),Reflect.has(a,o))},set(a,o,u){return Q(n.get(o)??r(o,u),u),Reflect.set(a,o,u)}});re(this,an,(t.hydrate?Dw:Gv)(t.component,{target:t.target,anchor:t.anchor,props:s,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!((l=t==null?void 0:t.props)!=null&&l.$$host)||t.sync===!1)&&Pe(),re(this,cr,s.$$events);for(const a of Object.keys(S(this,an)))a==="$set"||a==="$destroy"||a==="$on"||Hi(this,a,{get(){return S(this,an)[a]},set(o){S(this,an)[a]=o},enumerable:!0});S(this,an).$set=a=>{Object.assign(s,a)},S(this,an).$destroy=()=>{zw(S(this,an))}}$set(t){S(this,an).$set(t)}$on(t,n){S(this,cr)[t]=S(this,cr)[t]||[];const r=(...s)=>n.call(this,...s);return S(this,cr)[t].push(r),()=>{S(this,cr)[t]=S(this,cr)[t].filter(s=>s!==r)}}$destroy(){S(this,an).$destroy()}}cr=new WeakMap,an=new WeakMap;let e0=class{};typeof HTMLElement=="function"&&(e0=class extends HTMLElement{constructor(t,n,r){super();ne(this,"$$ctor");ne(this,"$$s");ne(this,"$$c");ne(this,"$$cn",!1);ne(this,"$$d",{});ne(this,"$$r",!1);ne(this,"$$p_d",{});ne(this,"$$l",{});ne(this,"$$l_u",new Map);ne(this,"$$me");ne(this,"$$shadowRoot",null);this.$$ctor=t,this.$$s=n,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,n,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const s=this.$$c.$on(t,n);this.$$l_u.set(n,s)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const s=this.$$l_u.get(n);s&&(s(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(s){return l=>{const a=_f("slot");s!=="default"&&(a.name=s),ye(l,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=ob(this);for(const s of this.$$s)s in r&&(s==="default"&&!this.$$d.children?(this.$$d.children=t(s),n.default=!0):n[s]=t(s));for(const s of this.attributes){const l=this.$$g_p(s.name);l in this.$$d||(this.$$d[l]=fo(l,s.value,this.$$p_d,"toProp"))}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=ib({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}}),this.$$me=ww(()=>{pu(()=>{var s;this.$$r=!0;for(const l of zo(this.$$c)){if(!((s=this.$$p_d[l])!=null&&s.reflect))continue;this.$$d[l]=this.$$c[l];const a=fo(l,this.$$d[l],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,a)}this.$$r=!1})});for(const s in this.$$l)for(const l of this.$$l[s]){const a=this.$$c.$on(s,l);this.$$l_u.set(l,a)}this.$$l={}}}attributeChangedCallback(t,n,r){var s;this.$$r||(t=this.$$g_p(t),this.$$d[t]=fo(t,r,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return zo(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function fo(e,t,n,r){var l;const s=(l=n[e])==null?void 0:l.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(s){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ob(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function ss(e,t,n,r,s,l){let a=class extends e0{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return zo(t).map(o=>(t[o].attribute||o).toLowerCase())}};return zo(t).forEach(o=>{Hi(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(u){var g;u=fo(o,u,t),this.$$d[o]=u;var c=this.$$c;if(c){var f=(g=cl(c,o))==null?void 0:g.get;f?c[o]=u:c.$set({[o]:u})}}})}),r.forEach(o=>{Hi(a.prototype,o,{get(){var u;return(u=this.$$c)==null?void 0:u[o]}})}),e.element=a,a}var ub=Fe('<div class="altcha-checkbox"><input/> <svg aria-hidden="true" width="12" height="9" viewBox="0 0 12 9"><polyline points="1 5 4 8 11 1"></polyline></svg> <div class="altcha-spinner altcha-checkbox-spinner" aria-hidden="true"></div></div>');function t0(e,t){_r(t,!0);let n=Oe(t,"loading"),r=yu(t,["$$slots","$$events","$$legacy","$$host","loading"]),s;function l(){s==null||s.click()}var a={get loading(){return n()},set loading(f){n(f),Pe()}},o=ub(),u=Ve(o);xu(u,()=>({type:"checkbox",...r}),void 0,void 0,void 0,void 0,!0),Xr(u,f=>s=f,()=>s);var c=Ie(u,2);return bf(2),$e(o),wt(()=>Ne(o,"data-loading",n())),mu("click",c,l),ye(e,o),Sr(a)}gu(["click"]);ss(t0,{loading:{}},[],[],{mode:"open"});var cb=Fe('<div class="altcha-checkbox-native"><input/> <div class="altcha-spinner altcha-checkbox-native-spinner"></div></div>');function n0(e,t){_r(t,!0);let n=Oe(t,"loading"),r=yu(t,["$$slots","$$events","$$legacy","$$host","loading"]);var s={get loading(){return n()},set loading(o){n(o),Pe()}},l=cb(),a=Ve(l);return xu(a,()=>({type:"checkbox",...r}),void 0,void 0,void 0,void 0,!0),bf(2),$e(l),wt(()=>Ne(l,"data-loading",n())),ye(e,l),Sr(s)}ss(n0,{loading:{}},[],[],{mode:"open"});var db=Fe('<div><a target="_blank" class="altcha-logo" aria-hidden="true" tabindex="-1"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>');function Df(e,t){_r(t,!0);let n=Oe(t,"strings");const r="https://altcha.org";var s={get strings(){return n()},set strings(o){n(o),Pe()}},l=db(),a=Ve(l);return Ne(a,"href",r),$e(l),wt(()=>Ne(a,"aria-label",n().ariaLinkLabel)),ye(e,l),Sr(s)}ss(Df,{strings:{}},[],[],{mode:"open"});var fb=Fe('<div class="altcha-footer"><p></p> <!></div>');function xd(e,t){_r(t,!0);let n=Oe(t,"logo"),r=Oe(t,"strings");var s={get logo(){return n()},set logo(c){n(c),Pe()},get strings(){return r()},set strings(c){r(c),Pe()}},l=fb(),a=Ve(l);Qv(a,()=>r().footer,!0),$e(a);var o=Ie(a,2);{var u=c=>{Df(c,{get strings(){return r()}})};Ze(o,c=>{n()&&c(u)})}return $e(l),ye(e,l),Sr(s)}ss(xd,{logo:{},strings:{}},[],[],{mode:"open"});var hb=Fe('<div class="altcha-switch"><input/> <div class="altcha-switch-toggle"><div class="altcha-spinner altcha-switch-spinner"></div></div></div>');function r0(e,t){_r(t,!0);let n=Oe(t,"loading"),r=yu(t,["$$slots","$$events","$$legacy","$$host","loading"]),s;function l(){s==null||s.click()}var a={get loading(){return n()},set loading(f){n(f),Pe()}},o=hb(),u=Ve(o);xu(u,()=>({type:"checkbox",...r}),void 0,void 0,void 0,void 0,!0),Xr(u,f=>s=f,()=>s);var c=Ie(u,2);return $e(o),wt(()=>Ne(o,"data-loading",n())),mu("click",c,l),ye(e,o),Sr(a)}gu(["click"]);ss(r0,{loading:{}},[],[],{mode:"open"});var ut=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(ut||{}),_e=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(_e||{}),pb=Fe('<div class="altcha-code-challenge-title"> </div>'),mb=Fe('<div class="altcha-spinner"></div>'),gb=Lf('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'),vb=Lf('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'),xb=Lf('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'),yb=Fe('<button type="button" class="altcha-button altcha-button-secondary"><!></button>'),wb=Fe('<audio hidden="" autoplay=""></audio>'),bb=Fe('<div class="altcha-code-challenge"><form data-code-challenge="true"><!> <div class="altcha-code-challenge-text"> </div> <img class="altcha-code-challenge-image" alt=""/> <div class="altcha-code-challenge-row"><input type="text" class="altcha-input" autocomplete="off" name="" required=""/> <!> <button type="button" class="altcha-button altcha-button-secondary"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <div class="altcha-code-challenge-buttons"><button type="submit" class="altcha-button"> </button> <button type="button" class="altcha-button altcha-button-secondary"> </button></div></form> <!></div>');function s0(e,t){_r(t,!0);let n=Oe(t,"audioUrl"),r=Oe(t,"codeChallenge"),s=Oe(t,"config"),l=Oe(t,"imageUrl"),a=Oe(t,"onCancel"),o=Oe(t,"onReload"),u=Oe(t,"onSubmit"),c=Oe(t,"strings"),f=ge(void 0),g=ge(void 0),d=ge(void 0),w=ge(!1),y=ge(""),N=ge(!1);Mf(()=>(s().disableAutoFocus||hs().then(()=>{var F;(F=p(d))==null||F.focus()}),()=>{p(g)&&(p(g).pause(),Q(g,void 0))}));function R(){Q(f,ut.PAUSED,!0)}function v(F){Q(f,ut.ERROR,!0)}function h(){Q(f,ut.READY,!0)}function m(){Q(f,ut.LOADING,!0)}function _(){Q(f,ut.PLAYING,!0)}function C(){Q(f,ut.PAUSED,!0)}function E(F){var be;F.code==="Space"?(F.preventDefault(),F.stopPropagation(),L()):F.code==="Escape"&&(F.preventDefault(),F.stopPropagation(),(be=a())==null||be())}function j(F){var be;F.preventDefault(),F.stopPropagation(),(be=u())==null||be(p(y))}function L(){p(g)?p(f)===ut.LOADING||(p(g).paused?(n()&&p(g).src!==n()&&(p(g).src=n()),p(g).currentTime=0,p(g).play()):p(g).pause()):(Q(N,!0),requestAnimationFrame(()=>{p(g)&&n()&&(p(g).src=n(),p(g).play())}))}var G={get audioUrl(){return n()},set audioUrl(F){n(F),Pe()},get codeChallenge(){return r()},set codeChallenge(F){r(F),Pe()},get config(){return s()},set config(F){s(F),Pe()},get imageUrl(){return l()},set imageUrl(F){l(F),Pe()},get onCancel(){return a()},set onCancel(F){a(F),Pe()},get onReload(){return o()},set onReload(F){o(F),Pe()},get onSubmit(){return u()},set onSubmit(F){u(F),Pe()},get strings(){return c()},set strings(F){c(F),Pe()}},P=bb(),Y=Ve(P),ae=Ve(Y);{var le=F=>{var be=pb(),_t=Ve(be,!0);$e(be),wt(()=>Wn(_t,c().verificationRequired)),ye(F,be)};Ze(ae,F=>{s().codeChallengeDisplay!=="standard"&&F(le)})}var ke=Ie(ae,2),ue=Ve(ke,!0);$e(ke);var Te=Ie(ke,2),V=Ie(Te,2),M=Ve(V);Rf(M),M.disabled=p(w),Xr(M,F=>Q(d,F),()=>p(d));var U=Ie(M,2);{var x=F=>{var be=yb(),_t=Ve(be);{var rr=nt=>{var rt=mb();ye(nt,rt)},zn=nt=>{var rt=gb();ye(nt,rt)},yn=nt=>{var rt=vb();ye(nt,rt)},Nr=nt=>{var rt=xb();ye(nt,rt)};Ze(_t,nt=>{p(f)===ut.LOADING?nt(rr):p(f)===ut.ERROR?nt(zn,1):p(f)===ut.PLAYING?nt(yn,2):nt(Nr,-1)})}$e(be),wt(()=>{Ne(be,"title",c().getAudioChallenge),be.disabled=p(f)===ut.LOADING||p(f)===ut.ERROR,Ne(be,"aria-label",p(f)===ut.LOADING?c().loading:c().getAudioChallenge)}),Je("click",be,()=>L(),!0),ye(F,be)};Ze(U,F=>{r().audio&&F(x)})}var $=Ie(U,2);$e(V);var I=Ie(V,2),K=Ve(I),W=Ve(K,!0);$e(K);var ee=Ie(K,2),Ae=Ve(ee,!0);$e(ee),$e(I),$e(Y);var gt=Ie(Y,2);{var Dn=F=>{var be=wb();Xr(be,_t=>Q(g,_t),()=>p(g)),Je("error",be,v),Je("loadstart",be,m),Je("canplay",be,h),Je("pause",be,C),Je("playing",be,_),Je("ended",be,R),ye(F,be)};Ze(gt,F=>{p(N)&&F(Dn)})}return $e(P),wt(()=>{Wn(ue,c().enterCodeFromImage),Ne(Te,"src",l()),Ne(M,"minlength",r().length||1),Ne(M,"maxlength",r().length),Ne(M,"placeholder",c().enterCode),Ne(M,"aria-label",p(f)===ut.LOADING?c().loading:p(f)===ut.PLAYING?"":c().enterCodeAria),Ne(M,"aria-live",p(f)?"assertive":"polite"),Ne(M,"aria-busy",p(f)===ut.LOADING),Ne($,"title",c().reload),Ne($,"aria-label",c().reload),Ne(K,"aria-label",c().verify),Wn(W,c().verify),Ne(ee,"aria-label",c().cancel),Wn(Ae,c().cancel)}),Je("submit",Y,j,!0),mu("keydown",M,E),sb(M,()=>p(y),F=>Q(y,F)),Je("click",$,()=>{var F;return(F=o())==null?void 0:F()},!0),Je("click",ee,()=>{var F;return(F=a())==null?void 0:F()},!0),ye(e,P),Sr(G)}gu(["keydown"]);ss(s0,{audioUrl:{},codeChallenge:{},config:{},imageUrl:{},onCancel:{},onReload:{},onSubmit:{},strings:{}},[],[],{mode:"open"});var kb=Fe('<div class="altcha-popover-backdrop" data-backdrop=""></div>'),_b=Fe('<div class="altcha-popover-arrow"></div>'),Sb=Fe('<div role="button" class="altcha-popover-close">×</div>'),Nb=Fe('<!> <div><!> <!> <div class="altcha-popover-content"><!></div></div>',1);function yd(e,t){_r(t,!0);let n=Oe(t,"anchor"),r=Oe(t,"children"),s=Oe(t,"display",7,"standard"),l=Oe(t,"backdrop",7,!1),a=Oe(t,"onClickOutside"),o=Oe(t,"onClickOutsideDelay",7,600),u=Oe(t,"onClose"),c=Oe(t,"placement",7,"auto"),f=Oe(t,"updateUISignal"),g=Oe(t,"variant",7,"neutral"),d=yu(t,["$$slots","$$events","$$legacy","$$host","anchor","children","display","backdrop","onClickOutside","onClickOutsideDelay","onClose","placement","updateUISignal","variant"]),w=ge(void 0),y=ge(void 0),N=ge(!1),R=ge(0);Vt(()=>{c()!=="auto"&&Q(N,c()==="top")}),Vt(()=>{f()&&C()}),Mf(()=>{const V=s()==="bottomsheet"||s()==="overlay";return V&&(p(y)&&document.body.append(p(y)),p(w)&&document.body.append(p(w))),C(),hs().then(()=>{Q(R,Date.now(),!0)}),()=>{V&&(p(y)&&document.body.removeChild(p(y)),p(w)&&document.body.removeChild(p(w)))}});function v(){var V;(V=u())==null||V()}function h(V){var U,x;const M=V.target;!((U=p(w))!=null&&U.contains(M))&&(!o()||p(R)+o()<Date.now())&&((x=a())==null||x())}function m(){C()}function _(){C()}function C(){if(n()&&c()==="auto"&&p(w)){const V=n().getBoundingClientRect(),U=document.documentElement.clientHeight-(V.top+V.height)<p(w).clientHeight;p(N)!==U&&Q(N,U)}}var E={get anchor(){return n()},set anchor(V){n(V),Pe()},get children(){return r()},set children(V){r(V),Pe()},get display(){return s()},set display(V="standard"){s(V),Pe()},get backdrop(){return l()},set backdrop(V=!1){l(V),Pe()},get onClickOutside(){return a()},set onClickOutside(V){a(V),Pe()},get onClickOutsideDelay(){return o()},set onClickOutsideDelay(V=600){o(V),Pe()},get onClose(){return u()},set onClose(V){u(V),Pe()},get placement(){return c()},set placement(V="auto"){c(V),Pe()},get updateUISignal(){return f()},set updateUISignal(V){f(V),Pe()},get variant(){return g()},set variant(V="neutral"){g(V),Pe()}},j=Nb();Je("click",ks,h,!0),Je("resize",ks,m),Je("scroll",ks,_);var L=Bs(j);{var G=V=>{var M=kb();Xr(M,U=>Q(y,U),()=>p(y)),ye(V,M)};Ze(L,V=>{l()&&V(G)})}var P=Ie(L,2);xu(P,()=>({...d,class:`altcha-popover ${(t.class||"")??""}`,"data-popover":!0,"data-variant":g(),"data-top":p(N),"data-display":s()}));var Y=Ve(P);{var ae=V=>{var M=_b();ye(V,M)};Ze(Y,V=>{s()==="standard"&&V(ae)})}var le=Ie(Y,2);{var ke=V=>{var M=Sb();Je("click",M,v,!0),ye(V,M)};Ze(le,V=>{s()!=="standard"&&V(ke)})}var ue=Ie(le,2),Te=Ve(ue);return Iw(Te,()=>r()??Gr),$e(ue),$e(P),Xr(P,V=>Q(w,V),()=>p(w)),ye(e,j),Sr(E)}ss(yd,{anchor:{},children:{},display:{},backdrop:{},onClickOutside:{},onClickOutsideDelay:{},onClose:{},placement:{},updateUISignal:{},variant:{}},[],[],{mode:"open"});function jb(e){return Array.from(new Uint8Array(e)).map(t=>t.toString(16).padStart(2,"0")).join("")}function Eb(e,t="altcha-css",n){var r,s;if(typeof document<"u"&&document&&!document.getElementById(t)){const l=document.createElement("style");l.id=t,l.textContent=e;const a=((r=document.currentScript)==null?void 0:r.nonce)??((s=document.querySelector('meta[name="csp-nonce"]'))==null?void 0:s.content);a&&(l.nonce=a),document.head.appendChild(l)}}async function l0(e){var d;const{challenge:t,concurrency:n=navigator.hardwareConcurrency,controller:r=new AbortController,createWorker:s,onOutOfMemory:l=w=>w>1?Math.floor(w/2):0,counterMode:a,timeout:o=9e4}=e,u=Math.min(16,Math.max(1,n)),c=[],f=()=>{for(const w of c)w.terminate()};for(let w=0;w<u;w++)c.push(await s(t.parameters.algorithm));let g=null;try{g=await Promise.race(c.map((w,y)=>(r.signal.addEventListener("abort",()=>{w.postMessage({type:"abort"})}),new Promise((N,R)=>{w.addEventListener("error",v=>{R(v)}),w.addEventListener("message",v=>{if(v.data){for(const h of c)h!==w&&h.postMessage({type:"abort"});if(v.data.error)return R(new Error(v.data.error))}N(v.data)}),w.postMessage({challenge:t,counterMode:a,counterStart:y,counterStep:u,timeout:o,type:"work"})}))))}catch(w){if(w instanceof Error&&!!((d=w==null?void 0:w.message)!=null&&d.includes("Out of memory"))&&l){f();const N=l(u);if(N)return l0({...e,challenge:t,controller:r,concurrency:N,createWorker:s})}throw w}finally{f()}return r.signal.aborted?null:g||null}class Cb{constructor(t={}){ne(this,"TAG_CODES",{INPUT:1,TEXTAREA:2,SELECT:3,BUTTON:4,A:5,DETAILS:6,SUMMARY:7,IFRAME:8,VIDEO:9,AUDIO:10});ne(this,"maxSamples");ne(this,"sampleInterval");ne(this,"target");ne(this,"focusStartTime",0);ne(this,"focusInteraction",0);ne(this,"focusInteractionTimer",null);ne(this,"lastPointerSample",0);ne(this,"lastTouchSample",0);ne(this,"lastScrollSample",0);ne(this,"pendingPointer",null);ne(this,"pendingTouch",null);ne(this,"focus",[]);ne(this,"pointer",[]);ne(this,"scroll",[]);ne(this,"touch",[]);ne(this,"onFocus",t=>{if(this.focusInteraction===2)return;const n=t.target;if(!(n instanceof Element))return;const r=performance.now();this.focusStartTime===0&&(this.focusStartTime=r),this.focus.push([Math.round(r-this.focusStartTime),n.tabIndex,this.TAG_CODES[n.tagName]??0,this.focusInteraction?1:0]),this.evict(this.focus)});ne(this,"onInteraction",t=>{this.focusInteraction="keyCode"in t?1:2,this.focusInteractionTimer&&clearTimeout(this.focusInteractionTimer),this.focusInteractionTimer=setTimeout(()=>{this.focusInteraction=0},100)});ne(this,"onPointer",t=>{if(t.pointerType==="touch")return;const n=t.timeStamp||performance.now();this.pendingPointer=[Math.round(t.clientX),Math.round(t.clientY),Math.round(n)],n-this.lastPointerSample>=this.sampleInterval&&(this.pointer.push(this.pendingPointer),this.lastPointerSample=n,this.pendingPointer=null,this.evict(this.pointer))});ne(this,"onScroll",()=>{const t=performance.now();t-this.lastScrollSample<this.sampleInterval||(this.scroll.push([Math.round(window.scrollY),Math.round(t)]),this.lastScrollSample=t,this.evict(this.scroll))});ne(this,"onTouchMove",t=>{const n=t.timeStamp||performance.now(),r=t.touches[0];r&&(this.pendingTouch=[Math.round(r.clientX),Math.round(r.clientY),Math.round(n),Math.round(r.force*1e3)/1e3,Math.round(r.radiusX||0),Math.round(r.radiusY||0)],n-this.lastTouchSample>=this.sampleInterval&&(this.touch.push(this.pendingTouch),this.lastTouchSample=n,this.pendingTouch=null,this.evict(this.touch)))});const{maxSamples:n=60,sampleInterval:r=50,target:s=window}=t;this.maxSamples=n,this.sampleInterval=r,this.target=s,this.attach()}destroy(){const t={capture:!0};this.target.removeEventListener("focusin",this.onFocus,t),this.target.removeEventListener("keydown",this.onInteraction,t),this.target.removeEventListener("pointerdown",this.onInteraction,t),this.target.removeEventListener("pointermove",this.onPointer,t),this.target.removeEventListener("scroll",this.onScroll,t),this.target.removeEventListener("touchmove",this.onTouchMove,t)}export(){return{focus:this.focus,maxTouchPoints:navigator.maxTouchPoints||0,pointer:this.pointer,scroll:this.scroll,time:Date.now(),touch:this.touch}}attach(){const t={passive:!0,capture:!0};this.target.addEventListener("focusin",this.onFocus,t),this.target.addEventListener("keydown",this.onInteraction,t),this.target.addEventListener("pointerdown",this.onInteraction,t),this.target.addEventListener("pointermove",this.onPointer,t),this.target.addEventListener("scroll",this.onScroll,t),this.target.addEventListener("touchmove",this.onTouchMove,t)}evict(t){t.length>this.maxSamples&&t.splice(0,t.length-this.maxSamples)}}var Tb=Fe('<div class="altcha-overlay-backdrop" data-backdrop=""></div>'),Ab=Fe('<div class="altcha-overlay-content"></div>'),Pb=Fe('<div role="button" class="altcha-overlay-close">×</div> <!>',1),Lb=Fe('<div class="altcha-floating-arrow"></div>'),Mb=Fe('<input type="hidden"/>'),Rb=Fe('<div class="altcha-error">Secure context (HTTPS) required.</div>'),$b=Fe('<div class="altcha-error"> </div>'),Db=Fe('<div class="altcha-error"> </div>'),zb=Fe("<!> <!>",1),Ib=Fe('<!> <div class="altcha"><!> <div class="altcha-main"><div><div class="altcha-checkbox-wrap"><!> <label><!></label></div> <!></div> <!> <!> <!></div> <!></div>',1);function Ob(e,t){_r(t,!0);const n=()=>ap(f,"$altchaDefaults",s),r=()=>ap(y,"$altchaI18nStore",s),[s,l]=tw(),a='input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])',o='input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])',u=["ar","fa","he","ur"],{isSecureContext:c}=globalThis,{store:f}=globalThis.$altcha.defaults,g=navigator.hardwareConcurrency||2,d=navigator.deviceMemory||0,w=d&&d<=4?Math.min(4,g):g,y=globalThis.$altcha.i18n.store,N=t.$$host,R=(b,T)=>{hs().then(()=>{N==null||N.dispatchEvent(new CustomEvent(b,{detail:T}))})};let v=null,h=ge(hr(new URL(location.origin))),m=ge(!1),_=ge(null),C=ge(null),E=ge(null),j=ge(hr(_e.UNVERIFIED)),L=ge(void 0),G=ge(void 0),P=ge(null),Y=ge(void 0),ae=ge(null),le=ge(null),ke=ge(null),ue=ge(null),Te=ge(hr([])),V=ge(0),M=ge(hr({})),U=ge(!0);const x=St(()=>({fetch:(b,T)=>fetch(b,T),audioChallengeLanguage:"",auto:"off",barPlacement:"bottom",challenge:"",codeChallenge:null,codeChallengeDisplay:"standard",credentials:null,debug:!1,disableAutoFocus:!1,display:"standard",floatingAnchor:"",floatingOffset:8,floatingPersist:!1,floatingPlacement:"auto",hideFooter:!1,hideLogo:!1,humanInteractionSignature:!0,language:"",mockError:!1,minDuration:500,overlayContent:"",name:"altcha",popoverPlacement:"auto",retryOnOutOfMemoryError:!0,setCookie:null,serverVerificationFields:!1,serverVerificationTimeZone:!1,test:!1,timeout:9e4,type:"checkbox",validationMessage:"",verifyFunction:null,verifyUrl:"",workers:w,...n(),...p(M)})),$=St(()=>`altcha-checkbox-${t.id||Math.floor(Math.random()*1e12).toString(16)}`),I=St(()=>Ee(p(x).type)),K=St(()=>p(x).auto),W=St(()=>p(j)===_e.VERIFYING),ee=St(()=>!p(x).hideFooter),Ae=St(()=>!p(x).hideLogo&&p(x).display!=="bar"),gt=St(()=>en(r(),[p(x).language,document.documentElement.lang,...navigator.languages])),Dn=St(()=>u.includes(p(gt).language)?"rtl":void 0),F=St(()=>({...p(gt).strings})),be=St(()=>{var b,T,B;return(T=(b=p(_))==null?void 0:b.audio)!=null&&T.match(/^(https?:)?\//)?ls(p(_).audio,p(h),{language:p(x).audioChallengeLanguage||p(gt).language}).toString():(B=p(_))==null?void 0:B.audio}),_t=St(()=>{var b,T,B;return(T=(b=p(_))==null?void 0:b.image)!=null&&T.match(/^(https?:)?\//)?ls(p(_).image,p(h)):(B=p(_))==null?void 0:B.image});Vt(()=>{Er({auto:t.auto,challenge:t.challenge,display:t.display,language:t.language,name:t.name,type:t.type,workers:t.workers})}),Vt(()=>{if(t.configuration)try{Er(JSON.parse(t.configuration))}catch{Ce("unable to parse the `configuration` attribute (JSON expected)")}}),Vt(()=>{p(E)!==p(x).display&&jr(p(x).display)}),Vt(()=>{p(m)&&p(j)===_e.VERIFYING&&Q(m,!1)}),Vt(()=>{!p(m)&&p(j)===_e.VERIFIED&&Q(m,!0)}),Vt(()=>{if(!p(m)){const b=q();b&&b.checked&&(b.checked=!1)}}),Vt(()=>{var b;p(j)===_e.VERIFIED&&((b=q())==null||b.setCustomValidity(""))}),Vt(()=>{if(p(K)==="onload"){const b=setTimeout(()=>{On()},1);return()=>{b&&clearTimeout(b)}}}),Vt(()=>{p(le)&&Ce("error:",p(le))}),Vt(()=>{p(ue)&&p(x).setCookie&&wu(p(ue),p(x).setCookie)}),Mf(()=>{var b,T,B,O;return Ce("mounted","3.2.1"),N&&globalThis.$altcha.instances.add(N),Q(P,(b=p(Y))==null?void 0:b.closest("form"),!0),(T=p(P))==null||T.addEventListener("reset",zl),(B=p(P))==null||B.addEventListener("submit",Il,{capture:!0}),(O=p(P))==null||O.addEventListener("focusin",Dl),rr(),p(x).humanInteractionSignature&&(Ce("human interaction signature enabled"),v=new Cb),R("load"),c||Ce("secure context (HTTPS) required"),()=>{var se,te,de;yn(),N&&globalThis.$altcha.instances.delete(N),p(ke)&&clearTimeout(p(ke)),(se=p(P))==null||se.removeEventListener("reset",zl),(te=p(P))==null||te.removeEventListener("submit",Il,{capture:!0}),(de=p(P))==null||de.removeEventListener("focusin",Dl),v==null||v.destroy()}});function rr(){Q(Te,[...globalThis.$altcha.plugins].map(b=>new b(N)),!0),Ce("activating plugins",p(Te).map(b=>b.constructor.name));for(const b of p(Te))b.activate()}async function zn(b,...T){let B;for(const O of p(Te))B=await O[b].call(O,...T);return B}function yn(){for(const b of p(Te))b.destroy()}function Nr(b){const[T,B]=b.salt.split("?"),O={};if(B)try{Object.assign(O,Object.fromEntries(new URLSearchParams(B).entries()))}catch{}const se={codeChallenge:b.codeChallenge,parameters:{algorithm:b.algorithm,cost:1,data:O,expiresAt:O!=null&&O.expires?parseInt(O.expires,10):void 0,keyLength:b.algorithm==="SHA-512"?64:b.algorithm==="SHA-384"?48:32,nonce:jb(new TextEncoder().encode(b.salt)),keyPrefix:b.challenge,salt:""},signature:b.signature};return Object.defineProperties(se,{_originalSalt:{enumerable:!1,value:b.salt,writable:!1},_version:{enumerable:!1,value:1,writable:!1}}),se}function nt(b,T){return{algorithm:b.parameters.algorithm,challenge:b.parameters.keyPrefix,number:T.counter,salt:"_originalSalt"in b?b._originalSalt:b.parameters.nonce,signature:b.signature,took:T.time||0}}async function rt(b){await new Promise(T=>setTimeout(T,b))}async function Ds(b=p(x).challenge,T){const B=await zn("onFetchChallenge",b);let O=null;if(B!==void 0)return B;if(typeof b=="string")if(b.startsWith("{")){Ce("parsing JSON challenge");try{O=JSON.parse(b)}catch{throw new Error("Unable to parse JSON challenge.")}}else{Ce("fetching challenge from",(T==null?void 0:T.method)||"GET",b),Q(h,new URL(b,location.origin),!0);const se=await p(x).fetch(b,{credentials:p(x).credentials||void 0,...T});await Vl(se);const te=se.headers.get("x-altcha-config");te&&Ul(te);const de=await se.json();if(de&&"his"in de&&de.his){if(Ce("requested HIS"),!v)throw new Error("Server requested HIS data but collector is disabled.");return Ds(ls(de.his.url,p(h)),{body:JSON.stringify({his:v.export()}),headers:{"content-type":"application/json"},method:"POST"})}de&&"hisResult"in de&&de.hisResult&&Ce("HIS result",de.hisResult),O=de}else if(b&&typeof b=="object")try{O=JSON.parse(JSON.stringify(b))}catch{throw new Error("Unable to parse JSON challenge.")}if(zs(O)&&(O=Nr(O)),!z(O))throw new Error("Challenge validation failed.");return O}function zs(b){return typeof b=="object"&&"challenge"in b}function z(b){return!!b&&typeof b=="object"&&"parameters"in b&&!!b.parameters&&typeof b.parameters=="object"&&"algorithm"in b.parameters&&"nonce"in b.parameters&&"salt"in b.parameters&&"keyPrefix"in b.parameters}function q(){return document.getElementById(p($))}function Ee(b){switch(b){case"checkbox":return t0;case"switch":return r0;case"native":default:return n0}}function en(b,T){const B=Object.keys(b).map(se=>se.toLowerCase());let O=T.reduce((se,te)=>(te=te.toLowerCase(),se||(b[te]?te:null)||B.find(de=>te.split("-")[0]===de.split("-")[0])||null),null);return b[O||""]||(O="en"),{language:O,strings:b[O]}}function xe(b){switch(b){case"bar":return p(x).barPlacement||"bottom";case"floating":return p(x).floatingPlacement||"auto";default:return}}function In(b){var B;return[...((B=p(P))==null?void 0:B.querySelectorAll(a))||[]].reduce((O,se)=>{const te=se.name,de=se.value;return te&&de&&(O[te]=/\n/.test(de)?de.replace(new RegExp("(?<!\\r)\\n","g"),`\r
|
||
`):de),O},{})}function fa(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function ls(b,T,B){const O=new URL(b,T);if(O.search||(O.search=T.search),B)for(const se in B)B[se]!==void 0&&B[se]!==null&&O.searchParams.set(se,B[se]);return O.toString()}function ha(b){!p(m)&&b.currentTarget.checked?(b.preventDefault(),b.currentTarget.checked=!1,p(j)!==_e.VERIFYING&&On()):b.currentTarget.checked||(b.preventDefault(),Pt())}function pa(b){p(j)===_e.VERIFYING?b.currentTarget.setCustomValidity(p(F).waitAlert):p(x).validationMessage&&b.currentTarget.setCustomValidity(p(x).validationMessage)}function ma(){jr(p(x).display),Pt()}function ga(){Is()}function va(b){const T=b.target;p(x).display==="floating"&&T&&!(N!=null&&N.contains(T))&&!T.hasAttribute("data-backdrop")&&!T.closest("[data-popover]")&&p(j)!==_e.VERIFIED&&!p(x).floatingPersist&&st()}function Dl(b){p(K)==="onfocus"&&p(j)===_e.UNVERIFIED&&On()}function zl(){jr(p(x).display),Pt()}function Il(b){const T=b.target;(T==null?void 0:T.getAttribute("data-code-challenge"))!=="true"&&p(K)==="onsubmit"&&p(j)===_e.UNVERIFIED&&(b.preventDefault(),b.stopPropagation(),Q(ae,b.submitter,!0),Hl(),On().then(B=>{B&&!p(_)&&hs().then(()=>{Fl(p(ae))})}))}function Ol(b){b.persisted&&(jr(p(x).display),Pt())}function xa(){Is()}function Ul(b){var T,B;try{const O=JSON.parse(b);O&&typeof O=="object"&&Er({serverVerificationFields:(T=O==null?void 0:O.sentinel)==null?void 0:T.fields,serverVerificationTimeZone:(B=O==null?void 0:O.sentinel)==null?void 0:B.timeZone,verifyUrl:O.verifyurl,...O})}catch(O){Ce("unable to configure from x-altcha-config header",O)}}function ya(b=20){var lt;if(!p(Y))return;const T=p(x).floatingPlacement;if(!p(G)&&(Q(G,(p(x).floatingAnchor instanceof HTMLElement?p(x).floatingAnchor:p(x).floatingAnchor?document.querySelector(p(x).floatingAnchor):(lt=p(P))==null?void 0:lt.querySelector(o))||p(P),!0),!p(G))){Ce("unable to find floating anchor element");return}const B=parseInt(p(x).floatingOffset,10)||12,O=p(G).getBoundingClientRect(),se=p(Y).getBoundingClientRect(),te=document.documentElement.clientHeight,de=document.documentElement.clientWidth,vt=!T||T==="auto"?O.bottom+se.height+B+b>te:T==="top",Me=Math.max(b,Math.min(de-b-se.width,O.left+O.width/2-se.width/2));if(p(Y).style.setProperty("--altcha-floating-left",`${Me}px`),p(Y).style.setProperty("--altcha-floating-top",vt?`${O.top-(se.height+B)}px`:`${O.bottom+B}px`),p(Y).setAttribute("data-floating-position",vt?"top":"bottom"),p(L)){const Un=p(L).getBoundingClientRect();p(L).style.left=O.left-Me+O.width/2-Un.width/2+"px"}}async function wa(b,T){const B=await zn("onRequestServerVerification",b,T);if(B!==void 0)return B;if(Ce("requesting server verification from",p(x).verifyUrl),!p(x).verifyUrl)throw new Error("Parameter verifyUrl must be set for server verification.");const O=await p(x).fetch(ls(p(x).verifyUrl,p(h)),{body:JSON.stringify({code:T,fields:p(x).serverVerificationFields?In():void 0,payload:b,timeZone:p(x).serverVerificationTimeZone?fa():void 0}),credentials:p(x).credentials||void 0,headers:{"Content-Type":"application/json"},method:"POST"});await Vl(O);const se=await O.json();return se&&typeof se=="object"&&"payload"in se&&se.payload&&R("serververification",se),se}function Fl(b){var T;p(P)&&"requestSubmit"in p(P)?p(P).requestSubmit(b):(T=p(P))!=null&&T.reportValidity()&&(b?b.click():p(P).submit())}function wu(b,T={}){const{domain:B,name:O=p(x).name,maxAge:se,path:te,sameSite:de,secure:vt}=T;let Me=`${encodeURIComponent(O)}=${encodeURIComponent(b)}`;B&&(Me+=`; Domain=${B}`),se!=null&&(Me+=`; Max-Age=${se}`),te&&(Me+=`; Path=${te}`),de&&(Me+=`; SameSite=${de}`),vt&&(Me+="; Secure"),document.cookie=Me}function jr(b){switch(b){case"bar":case"floating":case"overlay":st(),(!p(K)||p(K)==="off")&&(p(M).auto="onsubmit");break;case"standard":Hl()}p(E)!==b&&Q(E,b,!0)}function bu(b){p(ke)&&clearTimeout(p(ke));const T=()=>{p(j)!==_e.UNVERIFIED?(Q(m,!1),Lt(_e.EXPIRED)):Pt(),R("expired")},B=b*1e3-Date.now();B>=1?Q(ke,setTimeout(T,B),!0):T()}async function Vl(b){var B;if(b.status>=400){if((B=b.headers.get("content-type"))!=null&&B.includes("/json")){let O;try{O=await b.json()}catch{}if(O&&"error"in O)throw new Error(`Server responded with ${b.status} - ${O.error}`)}throw new Error(`Server responded with ${b.status}.`)}const T=b.headers.get("content-type");if(!T||!T.includes("/json"))throw new Error(`Server responded with invalid content-type. Expected application/json, received ${T}.`)}async function Bl(b){var B;if(!p(ue)){Lt(_e.ERROR,"Cannot verify code challenge without PoW payload.");return}Lt(_e.VERIFYING);let T=null;if(p(x).verifyUrl)T=await wa(p(ue),b);else if(p(x).verifyFunction)T=await p(x).verifyFunction(p(ue),b);else{Lt(_e.ERROR,"Parameter verifyUrl is required for code challenge verification.");return}T!=null&&T.payload&&(Q(ue,T.payload,!0),Ce("server payload",p(ue))),(T==null?void 0:T.verified)===!0?(Ce("verified"),Lt(_e.VERIFIED),R("verified",{payload:p(ue)}),p(K)==="onsubmit"&&hs().then(()=>{Fl(p(ae))})):Lt(_e.ERROR,(T==null?void 0:T.reason)||"Verification failed."),p(x).disableAutoFocus||(B=q())==null||B.focus()}function Er(b){Object.assign(p(M),{...Object.fromEntries(Object.entries(b).filter(([T,B])=>B!==void 0))})}function ba(){return{...p(x)}}function ka(){return p(j)}function st(){Q(U,!1)}function Ce(...b){(p(x).debug||b.some(T=>T instanceof Error))&&console[b[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${p(x).name}]`,...b)}function Pt(b=_e.UNVERIFIED,T=null){Q(m,!1),Q(le,T,!0),Q(ue,null),p(C)&&p(C).abort(),p(ke)&&(clearTimeout(p(ke)),Q(ke,null)),Lt(b)}function Lt(b,T=null){Q(j,b,!0),Q(le,T,!0),R("statechange",{payload:p(ue),state:p(j)})}function Hl(){Q(U,!0),hs().then(()=>{Is()})}function Is(){switch(p(x).display){case"floating":return ya()}Q(V,p(V)+1)}async function On(b={}){var lt,Un;const{concurrency:T=Math.max(1,p(x).workers),controller:B=new AbortController,minDuration:O=p(x).minDuration}=b,se=performance.now();let te=null,de=null,vt=!1;const Me=await zn("onVerify",b);if(Me!==void 0)return Me;Pt(_e.VERIFYING),Q(C,B,!0);try{if(!c)throw new Error("Secure context (HTTPS) required.");if(p(x).mockError)throw new Error("Mock error.");if(p(x).test)return Ce("running test mode with null challenge"),await rt(Math.max(0,O-(performance.now()-se))),(lt=p(C))!=null&<.signal.aborted?(Pt(),null):(Q(ue,btoa(JSON.stringify({challenge:null,solution:null,test:!0})),!0),Ce("verified"),Lt(_e.VERIFIED),R("verified",{payload:p(ue)}),{payload:p(ue)});if(te=await Ds(),!te)throw new Error("Failed to fetch challenge.");Ce("challenge",te),"configuration"in te&&(Ce("re-configuring from challenge",te.configuration),Er(te.configuration)),te.parameters.expiresAt&&bu(te.parameters.expiresAt),vt="_version"in te&&te._version===1;const wn=globalThis.$altcha.algorithms.get(te.parameters.algorithm);if(!wn)throw new Error(`Unsupported algorithm ${te.parameters.algorithm}.`);if(de=await l0({challenge:te,concurrency:T,controller:B,createWorker:wn,counterMode:vt?"string":"uint32",onOutOfMemory:Ff=>{if(Ce("out of memory error received"),R("outofmemory"),p(x).retryOnOutOfMemoryError&&Ff>1){const Vf=Math.floor(Ff/2);return Ce(`retrying with ${Vf} workers...`),Vf}},timeout:p(x).timeout}),(Un=p(C))!=null&&Un.signal.aborted)return Pt(),null;if(!de)throw new Error("Failed to find solution.");Ce("solution",de),await rt(Math.max(0,O-(performance.now()-se))),Q(_,te.codeChallenge||p(x).codeChallenge||null,!0),vt?Q(ue,btoa(JSON.stringify(nt(te,de))),!0):Q(ue,btoa(JSON.stringify({challenge:{parameters:te.parameters,signature:te.signature},solution:de})),!0),p(_)?(Ce("requesting code verification"),Lt(_e.CODE),R("codechallenge",{codeChallenge:p(_)})):p(x).verifyUrl?await Bl():(Ce("verified"),Lt(_e.VERIFIED),R("verified",{payload:p(ue)}))}catch(wn){return Ce("verification failed",wn),Lt(_e.ERROR,String(wn)),null}finally{Q(C,null)}return{challenge:te,payload:p(ue),solution:de}}var ku={configure:Er,getConfiguration:ba,getState:ka,hide:st,log:Ce,reset:Pt,setState:Lt,show:Hl,updateUI:Is,verify:On},_a=Ib();Je("scroll",sd,ga),Je("click",sd,va),Je("pageshow",ks,Ol),Je("resize",ks,xa);var Sa=Bs(_a);{var _u=b=>{var T=Tb();ye(b,T)};Ze(Sa,b=>{p(x).display==="overlay"&&p(U)&&b(_u)})}var tn=Ie(Sa,2),Na=Ve(tn);{var Su=b=>{var T=Pb(),B=Bs(T),O=Ie(B,2);{var se=te=>{var de=Ab();Qv(de,()=>{var vt;return(vt=document.querySelector(p(x).overlayContent))==null?void 0:vt.innerHTML},!0),$e(de),ye(te,de)};Ze(O,te=>{p(x).overlayContent&&te(se)})}Je("click",B,ma,!0),ye(b,T)};Ze(Na,b=>{p(x).display==="overlay"&&p(U)&&b(Su)})}var Kl=Ie(Na,2),Os=Ve(Kl),k=Ve(Os),Z=Ve(k);{let b=St(()=>p(x).display==="standard"&&p(K)!=="onsubmit"||p(j)===_e.VERIFYING);Fw(Z,()=>p(I),(T,B)=>{B(T,{get id(){return p($)},name:"",get required(){return p(b)},get loading(){return p(W)},get checked(){return p(m)},onchange:ha,oninvalid:pa})})}var nn=Ie(Z,2),Wl=Ve(nn);{var o0=b=>{var T=Ha();wt(()=>Wn(T,p(F).verificationRequired)),ye(b,T)},u0=b=>{var T=Ha();wt(()=>Wn(T,p(F).verifying)),ye(b,T)},c0=b=>{var T=Ha();wt(()=>Wn(T,p(F).verified)),ye(b,T)},d0=b=>{var T=Ha();wt(()=>Wn(T,p(F).label)),ye(b,T)};Ze(Wl,b=>{p(j)===_e.CODE&&p(_)?b(o0):p(j)===_e.VERIFYING?b(u0,1):p(j)===_e.VERIFIED?b(c0,2):b(d0,-1)})}$e(nn),$e(k);var f0=Ie(k,2);{var h0=b=>{Df(b,{get strings(){return p(F)}})};Ze(f0,b=>{p(Ae)&&b(h0)})}$e(Os);var Of=Ie(Os,2);{var p0=b=>{{let T=St(()=>p(x).display==="bar"&&p(Ae));xd(b,{get logo(){return p(T)},get strings(){return p(F)}})}};Ze(Of,b=>{p(ee)&&b(p0)})}var Uf=Ie(Of,2);{var m0=b=>{var T=Lb();Xr(T,B=>Q(L,B),()=>p(L)),ye(b,T)};Ze(Uf,b=>{p(x).display==="floating"&&b(m0)})}var g0=Ie(Uf,2);{var v0=b=>{var T=Mb();Rf(T),wt(()=>{Ne(T,"name",p(x).name),tb(T,p(ue))}),ye(b,T)};Ze(g0,b=>{p(x).setCookie||b(v0)})}$e(Kl);var x0=Ie(Kl,2);{var y0=b=>{yd(b,{get anchor(){return p(Y)},onClickOutside:()=>{c&&Pt()},get placement(){return p(x).popoverPlacement},role:"alert",variant:"error",get dir(){return p(Dn)},get updateUISignal(){return p(V)},children:(T,B)=>{var O=mp(),se=Bs(O);{var te=Me=>{var lt=Rb();ye(Me,lt)},de=Me=>{var lt=$b(),Un=Ve(lt,!0);$e(lt),wt(()=>Wn(Un,p(F).expired)),ye(Me,lt)},vt=Me=>{var lt=Db(),Un=Ve(lt,!0);$e(lt),wt(()=>{Ne(lt,"title",p(le)),Wn(Un,p(F).error)}),ye(Me,lt)};Ze(se,Me=>{!p(le)&&!c?Me(te):!p(le)&&p(j)===_e.EXPIRED?Me(de,1):Me(vt,-1)})}ye(T,O)},$$slots:{default:!0}})},w0=b=>{var T=mp(),B=Bs(T);Uw(B,()=>p(_),O=>{{let se=St(()=>p(x).codeChallengeDisplay!=="standard");yd(O,{get anchor(){return p(Y)},get backdrop(){return p(se)},get display(){return p(x).codeChallengeDisplay},onClose:()=>{Pt()},get placement(){return p(x).popoverPlacement},role:"dialog",get"aria-label"(){return p(F).verificationRequired},get dir(){return p(Dn)},get updateUISignal(){return p(V)},children:(te,de)=>{var vt=zb(),Me=Bs(vt);s0(Me,{get audioUrl(){return p(be)},get imageUrl(){return p(_t)},onCancel:()=>Pt(),onReload:()=>On(),onSubmit:wn=>Bl(wn),get codeChallenge(){return p(_)},get config(){return p(x)},get strings(){return p(F)}});var lt=Ie(Me,2);{var Un=wn=>{xd(wn,{get logo(){return p(Ae)},get strings(){return p(F)}})};Ze(lt,wn=>{p(ee)&&p(x).codeChallengeDisplay!=="standard"&&wn(Un)})}ye(te,vt)},$$slots:{default:!0}})}}),ye(b,T)};Ze(x0,b=>{p(le)||p(j)===_e.EXPIRED||!c?b(y0):p(_)&&p(j)===_e.CODE&&b(w0,1)})}$e(tn),Xr(tn,b=>Q(Y,b),()=>p(Y)),wt(b=>{Ne(tn,"data-state",p(j)),Ne(tn,"data-display",p(x).display||void 0),Ne(tn,"data-placement",b),Ne(tn,"data-visible",p(U)||void 0),Ne(tn,"dir",p(Dn)),Ne(nn,"for",p($)),tn.dir=tn.dir},[()=>xe(p(x).display)]),ye(e,_a);var b0=Sr(ku);return l(),b0}typeof window<"u"&&window.customElements&&!customElements.get("altcha-widget")&&customElements.define("altcha-widget",ss(Ob,{auto:{type:"String"},challenge:{type:"String"},configuration:{type:"String"},display:{type:"String"},language:{type:"String"},name:{type:"String"},theme:{type:"String"},type:{type:"String"},workers:{type:"Number"}},[],["configure","getConfiguration","getState","hide","log","reset","setState","show","updateUI","verify"]));const i0=`(function() {
|
||
"use strict";
|
||
function bufferStartsWith(buffer, prefix) {
|
||
if (prefix.length > buffer.length) {
|
||
return false;
|
||
}
|
||
for (let i = 0; i < prefix.length; i++) {
|
||
if (buffer[i] !== prefix[i]) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function bufferToHex(buffer) {
|
||
return Array.from(new Uint8Array(buffer)).map((b) => b.toString(16).padStart(2, "0")).join("");
|
||
}
|
||
function concatBuffers(a, b) {
|
||
const out = new Uint8Array(a.length + b.length);
|
||
out.set(a, 0);
|
||
out.set(b, a.length);
|
||
return out;
|
||
}
|
||
function hexToBuffer(hex) {
|
||
if (hex.length % 2 !== 0) {
|
||
throw new Error(\`Hex string must have an even length. Got: \${hex}\`);
|
||
}
|
||
const buffer = new ArrayBuffer(hex.length / 2);
|
||
const view = new DataView(buffer);
|
||
for (let i = 0; i < hex.length; i += 2) {
|
||
const byteString = hex.substring(i, i + 2);
|
||
const byteValue = parseInt(byteString, 16);
|
||
view.setUint8(i / 2, byteValue);
|
||
}
|
||
return new Uint8Array(buffer);
|
||
}
|
||
async function delay(ms) {
|
||
await new Promise((resolve) => setTimeout(resolve, ms));
|
||
}
|
||
function timeDuration(start) {
|
||
return Math.floor((performance.now() - start) * 10) / 10;
|
||
}
|
||
class PasswordBuffer {
|
||
constructor(nonce, mode = "uint32") {
|
||
this.nonce = nonce;
|
||
this.mode = mode;
|
||
this.buffer = new Uint8Array(this.nonce.length + this.COUNTER_BYTES);
|
||
this.buffer.set(this.nonce, 0);
|
||
this.dataView = new DataView(this.buffer.buffer);
|
||
}
|
||
nonce;
|
||
mode;
|
||
COUNTER_BYTES = 4;
|
||
buffer;
|
||
dataView;
|
||
encoder = new TextEncoder();
|
||
/**
|
||
* Appends the counter to the nonce buffer.
|
||
* In 'string' mode, encodes the counter as a UTF-8 string.
|
||
* In 'uint32' mode, writes the counter as a big-endian 32-bit integer.
|
||
*/
|
||
setCounter(n) {
|
||
if (this.mode === "string") {
|
||
return concatBuffers(this.nonce, this.encoder.encode(n.toString()));
|
||
}
|
||
this.dataView.setUint32(this.nonce.length, n, false);
|
||
return this.buffer;
|
||
}
|
||
}
|
||
async function solveChallenge(options) {
|
||
const {
|
||
challenge,
|
||
controller,
|
||
counterMode = "uint32",
|
||
counterStart = 0,
|
||
counterStep = 1,
|
||
deriveKey: deriveKey2,
|
||
timeout = 9e4
|
||
} = options;
|
||
const { nonce, keyPrefix, salt } = challenge.parameters;
|
||
const nonceBuf = hexToBuffer(nonce);
|
||
const saltBuf = hexToBuffer(salt);
|
||
const keyPrefixBuf = keyPrefix.length % 2 === 0 ? hexToBuffer(keyPrefix) : null;
|
||
const password = new PasswordBuffer(nonceBuf, counterMode);
|
||
const start = performance.now();
|
||
let counter = counterStart;
|
||
let iterations = 0;
|
||
let derivedKeyHex = "";
|
||
let lastYield = start;
|
||
while (true) {
|
||
if (controller?.signal.aborted || timeout && iterations % 10 === 0 && performance.now() - start > timeout) {
|
||
return null;
|
||
}
|
||
const { derivedKey } = await deriveKey2(
|
||
challenge.parameters,
|
||
saltBuf,
|
||
password.setCounter(counter)
|
||
);
|
||
if (iterations % 10 === 0 && performance.now() - lastYield > 200) {
|
||
await delay(0);
|
||
lastYield = performance.now();
|
||
}
|
||
if (keyPrefixBuf ? bufferStartsWith(derivedKey, keyPrefixBuf) : bufferToHex(derivedKey).startsWith(keyPrefix)) {
|
||
derivedKeyHex = bufferToHex(derivedKey);
|
||
break;
|
||
}
|
||
counter = counter + counterStep;
|
||
iterations = iterations + 1;
|
||
}
|
||
return {
|
||
counter,
|
||
derivedKey: derivedKeyHex,
|
||
time: timeDuration(start)
|
||
};
|
||
}
|
||
function handler(options) {
|
||
const { deriveKey: deriveKey2 } = options;
|
||
let controller = void 0;
|
||
self.onmessage = async (message) => {
|
||
const { challenge, counterMode, counterStart, counterStep, timeout, type } = message.data;
|
||
if (type === "abort") {
|
||
controller?.abort();
|
||
} else if (type === "work") {
|
||
controller = new AbortController();
|
||
let solution;
|
||
try {
|
||
solution = await solveChallenge({
|
||
challenge,
|
||
controller,
|
||
counterStart,
|
||
counterStep,
|
||
deriveKey: deriveKey2,
|
||
counterMode,
|
||
timeout
|
||
});
|
||
} catch (err) {
|
||
return self.postMessage({ error: err });
|
||
}
|
||
self.postMessage(solution);
|
||
}
|
||
};
|
||
}
|
||
function getDigest(algorithm) {
|
||
switch (algorithm) {
|
||
case "PBKDF2/SHA-512":
|
||
return "SHA-512";
|
||
case "PBKDF2/SHA-384":
|
||
return "SHA-384";
|
||
case "PBKDF2/SHA-256":
|
||
default:
|
||
return "SHA-256";
|
||
}
|
||
}
|
||
async function deriveKey(parameters, salt, password) {
|
||
const { algorithm, cost, keyLength = 32 } = parameters;
|
||
const passwordKey = await crypto.subtle.importKey(
|
||
"raw",
|
||
password,
|
||
{ name: "PBKDF2" },
|
||
false,
|
||
["deriveKey"]
|
||
);
|
||
const derivedKey = await crypto.subtle.deriveKey(
|
||
{
|
||
name: "PBKDF2",
|
||
salt,
|
||
iterations: cost,
|
||
hash: getDigest(algorithm)
|
||
},
|
||
passwordKey,
|
||
{ name: "AES-GCM", length: keyLength * 8 },
|
||
true,
|
||
["encrypt"]
|
||
);
|
||
return {
|
||
derivedKey: new Uint8Array(await crypto.subtle.exportKey("raw", derivedKey))
|
||
};
|
||
}
|
||
handler({
|
||
deriveKey
|
||
});
|
||
})();
|
||
`,wp=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",i0],{type:"text/javascript;charset=utf-8"});function zf(e){let t;try{if(t=wp&&(self.URL||self.webkitURL).createObjectURL(wp),!t)throw"";const n=new Worker(t,{name:e==null?void 0:e.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(i0),{name:e==null?void 0:e.name})}}const a0=`(function() {
|
||
"use strict";
|
||
function bufferStartsWith(buffer, prefix) {
|
||
if (prefix.length > buffer.length) {
|
||
return false;
|
||
}
|
||
for (let i = 0; i < prefix.length; i++) {
|
||
if (buffer[i] !== prefix[i]) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function bufferToHex(buffer) {
|
||
return Array.from(new Uint8Array(buffer)).map((b) => b.toString(16).padStart(2, "0")).join("");
|
||
}
|
||
function concatBuffers(a, b) {
|
||
const out = new Uint8Array(a.length + b.length);
|
||
out.set(a, 0);
|
||
out.set(b, a.length);
|
||
return out;
|
||
}
|
||
function hexToBuffer(hex) {
|
||
if (hex.length % 2 !== 0) {
|
||
throw new Error(\`Hex string must have an even length. Got: \${hex}\`);
|
||
}
|
||
const buffer = new ArrayBuffer(hex.length / 2);
|
||
const view = new DataView(buffer);
|
||
for (let i = 0; i < hex.length; i += 2) {
|
||
const byteString = hex.substring(i, i + 2);
|
||
const byteValue = parseInt(byteString, 16);
|
||
view.setUint8(i / 2, byteValue);
|
||
}
|
||
return new Uint8Array(buffer);
|
||
}
|
||
async function delay(ms) {
|
||
await new Promise((resolve) => setTimeout(resolve, ms));
|
||
}
|
||
function timeDuration(start) {
|
||
return Math.floor((performance.now() - start) * 10) / 10;
|
||
}
|
||
class PasswordBuffer {
|
||
constructor(nonce, mode = "uint32") {
|
||
this.nonce = nonce;
|
||
this.mode = mode;
|
||
this.buffer = new Uint8Array(this.nonce.length + this.COUNTER_BYTES);
|
||
this.buffer.set(this.nonce, 0);
|
||
this.dataView = new DataView(this.buffer.buffer);
|
||
}
|
||
nonce;
|
||
mode;
|
||
COUNTER_BYTES = 4;
|
||
buffer;
|
||
dataView;
|
||
encoder = new TextEncoder();
|
||
/**
|
||
* Appends the counter to the nonce buffer.
|
||
* In 'string' mode, encodes the counter as a UTF-8 string.
|
||
* In 'uint32' mode, writes the counter as a big-endian 32-bit integer.
|
||
*/
|
||
setCounter(n) {
|
||
if (this.mode === "string") {
|
||
return concatBuffers(this.nonce, this.encoder.encode(n.toString()));
|
||
}
|
||
this.dataView.setUint32(this.nonce.length, n, false);
|
||
return this.buffer;
|
||
}
|
||
}
|
||
async function solveChallenge(options) {
|
||
const {
|
||
challenge,
|
||
controller,
|
||
counterMode = "uint32",
|
||
counterStart = 0,
|
||
counterStep = 1,
|
||
deriveKey: deriveKey2,
|
||
timeout = 9e4
|
||
} = options;
|
||
const { nonce, keyPrefix, salt } = challenge.parameters;
|
||
const nonceBuf = hexToBuffer(nonce);
|
||
const saltBuf = hexToBuffer(salt);
|
||
const keyPrefixBuf = keyPrefix.length % 2 === 0 ? hexToBuffer(keyPrefix) : null;
|
||
const password = new PasswordBuffer(nonceBuf, counterMode);
|
||
const start = performance.now();
|
||
let counter = counterStart;
|
||
let iterations = 0;
|
||
let derivedKeyHex = "";
|
||
let lastYield = start;
|
||
while (true) {
|
||
if (controller?.signal.aborted || timeout && iterations % 10 === 0 && performance.now() - start > timeout) {
|
||
return null;
|
||
}
|
||
const { derivedKey } = await deriveKey2(
|
||
challenge.parameters,
|
||
saltBuf,
|
||
password.setCounter(counter)
|
||
);
|
||
if (iterations % 10 === 0 && performance.now() - lastYield > 200) {
|
||
await delay(0);
|
||
lastYield = performance.now();
|
||
}
|
||
if (keyPrefixBuf ? bufferStartsWith(derivedKey, keyPrefixBuf) : bufferToHex(derivedKey).startsWith(keyPrefix)) {
|
||
derivedKeyHex = bufferToHex(derivedKey);
|
||
break;
|
||
}
|
||
counter = counter + counterStep;
|
||
iterations = iterations + 1;
|
||
}
|
||
return {
|
||
counter,
|
||
derivedKey: derivedKeyHex,
|
||
time: timeDuration(start)
|
||
};
|
||
}
|
||
function handler(options) {
|
||
const { deriveKey: deriveKey2 } = options;
|
||
let controller = void 0;
|
||
self.onmessage = async (message) => {
|
||
const { challenge, counterMode, counterStart, counterStep, timeout, type } = message.data;
|
||
if (type === "abort") {
|
||
controller?.abort();
|
||
} else if (type === "work") {
|
||
controller = new AbortController();
|
||
let solution;
|
||
try {
|
||
solution = await solveChallenge({
|
||
challenge,
|
||
controller,
|
||
counterStart,
|
||
counterStep,
|
||
deriveKey: deriveKey2,
|
||
counterMode,
|
||
timeout
|
||
});
|
||
} catch (err) {
|
||
return self.postMessage({ error: err });
|
||
}
|
||
self.postMessage(solution);
|
||
}
|
||
};
|
||
}
|
||
async function deriveKey(parameters, salt, password) {
|
||
const { algorithm, keyLength = 32 } = parameters;
|
||
const iterations = Math.max(1, parameters.cost);
|
||
let data = void 0;
|
||
let derivedKey = void 0;
|
||
for (let i = 0; i < iterations; i++) {
|
||
if (i === 0) {
|
||
data = concatBuffers(salt, password);
|
||
} else {
|
||
data = derivedKey;
|
||
}
|
||
derivedKey = new Uint8Array(
|
||
(await crypto.subtle.digest(algorithm, data)).slice(0, keyLength)
|
||
);
|
||
}
|
||
return {
|
||
parameters: {},
|
||
derivedKey
|
||
};
|
||
}
|
||
handler({
|
||
deriveKey
|
||
});
|
||
})();
|
||
`,bp=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",a0],{type:"text/javascript;charset=utf-8"});function If(e){let t;try{if(t=bp&&(self.URL||self.webkitURL).createObjectURL(bp),!t)throw"";const n=new Worker(t,{name:e==null?void 0:e.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(a0),{name:e==null?void 0:e.name})}}const Ub=`:root {
|
||
--altcha-border-color: var(--altcha-color-neutral);
|
||
--altcha-border-width: 1px;
|
||
--altcha-border-radius: 6px;
|
||
--altcha-color-base: light-dark(oklch(100% 0.00011 271.152), oklch(20.904% 0.00002 271.152));
|
||
--altcha-color-base-content: light-dark(
|
||
oklch(20.904% 0.00002 271.152),
|
||
oklch(100% 0.00011 271.152)
|
||
);
|
||
--altcha-color-error: oklch(51.284% 0.20527 28.678);
|
||
--altcha-color-error-content: oklch(100% 0.00011 271.152);
|
||
--altcha-color-neutral: light-dark(oklch(83.591% 0.0001 271.152), oklch(46.04% 0.00005 271.152));
|
||
--altcha-color-neutral-content: light-dark(
|
||
oklch(46.76% 0.00005 271.152),
|
||
oklch(100% 0.00011 271.152)
|
||
);
|
||
--altcha-color-primary: oklch(40.279% 0.2449 268.131);
|
||
--altcha-color-primary-content: oklch(100% 0.00011 271.152);
|
||
--altcha-color-success: oklch(55.748% 0.18968 142.511);
|
||
--altcha-color-success-content: oklch(100% 0.00011 271.152);
|
||
--altcha-checkbox-border-color: light-dark(
|
||
oklch(66.494% 0.00233 15.434),
|
||
oklch(51.028% 0.00006 271.152)
|
||
);
|
||
--altcha-checkbox-border-radius: 5px;
|
||
--altcha-checkbox-border-width: var(--altcha-border-width);
|
||
--altcha-checkbox-outline: 2px solid var(--altcha-checkbox-outline-color);
|
||
--altcha-checkbox-outline-color: -webkit-focus-ring-color;
|
||
--altcha-checkbox-outline-offset: 2px;
|
||
--altcha-checkbox-size: 22px;
|
||
--altcha-checkbox-transition-duration: var(--altcha-transition-duration);
|
||
--altcha-input-background-color: var(--altcha-color-base);
|
||
--altcha-input-border-radius: 3px;
|
||
--altcha-input-border-width: 1px;
|
||
--altcha-input-color: var(--altcha-color-base-content);
|
||
--altcha-max-width: 320px;
|
||
--altcha-padding: 0.75rem;
|
||
--altcha-popover-arrow-size: 6px;
|
||
--altcha-popover-color: var(--altcha-border-color);
|
||
--altcha-shadow: drop-shadow(3px 3px 6px oklch(0% 0 0 / 0.2));
|
||
--altcha-spinner-color: var(--altcha-color-base-content);
|
||
--altcha-switch-background-color: var(--altcha-color-neutral);
|
||
--altcha-switch-border-radius: calc(infinity * 1px);
|
||
--altcha-switch-height: var(--altcha-checkbox-size);
|
||
--altcha-switch-padding: 0.25rem;
|
||
--altcha-switch-width: calc(var(--altcha-checkbox-size) * 1.75);
|
||
--altcha-switch-toggle-border-radius: 100%;
|
||
--altcha-switch-toggle-color: var(--altcha-color-neutral-content);
|
||
--altcha-switch-toggle-size: calc(
|
||
var(--altcha-switch-height) - calc(var(--altcha-switch-padding) * 2)
|
||
);
|
||
--altcha-transition-duration: 0.6s;
|
||
--altcha-z-index: 99999999;
|
||
--altcha-z-index-popover: 999999999;
|
||
}
|
||
|
||
@supports (-moz-appearance: none) {
|
||
:root {
|
||
--altcha-checkbox-outline-color: var(--altcha-color-primary);
|
||
}
|
||
}
|
||
.altcha {
|
||
all: revert-layer;
|
||
display: none;
|
||
font-family: inherit;
|
||
font-size: inherit;
|
||
position: relative;
|
||
}
|
||
.altcha[data-visible] {
|
||
display: block;
|
||
}
|
||
.altcha-popover, .altcha-popover * {
|
||
all: revert-layer;
|
||
box-sizing: border-box;
|
||
font-family: inherit;
|
||
font-size: inherit;
|
||
line-height: 1.25;
|
||
}
|
||
.altcha * {
|
||
all: revert-layer;
|
||
box-sizing: border-box;
|
||
font-family: inherit;
|
||
font-size: inherit;
|
||
line-height: 1.25;
|
||
}
|
||
.altcha a, .altcha-popover a {
|
||
color: currentColor;
|
||
text-decoration: none;
|
||
}
|
||
.altcha a:hover, .altcha-popover a:hover {
|
||
color: currentColor;
|
||
}
|
||
.altcha-main {
|
||
align-items: start;
|
||
background-color: var(--altcha-color-base);
|
||
border: var(--altcha-border-width, 1px) solid var(--altcha-border-color);
|
||
border-radius: var(--altcha-border-radius, 0);
|
||
color: var(--altcha-color-base-content);
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0.5rem;
|
||
justify-content: space-between;
|
||
padding: var(--altcha-padding);
|
||
max-width: var(--altcha-max-width, 100%);
|
||
}
|
||
.altcha-main > * {
|
||
display: flex;
|
||
width: 100%;
|
||
}
|
||
.altcha-main > *:first-child {
|
||
flex-grow: 1;
|
||
}
|
||
.altcha-checkbox-wrap {
|
||
align-items: center;
|
||
display: flex;
|
||
flex-direction: row;
|
||
flex-grow: 1;
|
||
gap: 0.5rem;
|
||
}
|
||
.altcha-checkbox-wrap > * {
|
||
display: flex;
|
||
}
|
||
.altcha-logo {
|
||
opacity: 0.7;
|
||
}
|
||
.altcha-footer {
|
||
align-items: center;
|
||
display: flex;
|
||
flex-grow: 1;
|
||
gap: 0.5rem;
|
||
justify-content: flex-end;
|
||
font-size: 0.7rem;
|
||
opacity: 0.7;
|
||
}
|
||
.altcha-footer p {
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
.altcha-error {
|
||
font-size: 0.85rem;
|
||
}
|
||
.altcha-button {
|
||
align-items: center;
|
||
background: var(--altcha-color-primary);
|
||
border: var(--altcha-input-border-width) solid var(--altcha-color-primary);
|
||
border-radius: var(--altcha-input-border-radius);
|
||
color: var(--altcha-color-primary-content);
|
||
cursor: pointer;
|
||
display: flex;
|
||
font-size: 0.9rem;
|
||
gap: 0.5rem;
|
||
padding: 0.35rem;
|
||
}
|
||
.altcha-button:focus {
|
||
border-color: var(--altcha-color-primary);
|
||
outline: var(--altcha-checkbox-outline);
|
||
outline-offset: var(--altcha-checkbox-outline-offset);
|
||
}
|
||
.altcha-button > .altcha-spinner, .altcha-button > svg {
|
||
height: 20px;
|
||
width: 20px;
|
||
}
|
||
.altcha-button-secondary {
|
||
background: transparent;
|
||
border-color: var(--altcha-color-neutral);
|
||
color: var(--altcha-color-neutral-content);
|
||
}
|
||
.altcha-input {
|
||
background: var(--altcha-input-background-color);
|
||
border: var(--altcha-input-border-width) solid var(--altcha-color-neutral);
|
||
border-radius: var(--altcha-input-border-radius);
|
||
color: var(--altcha-input-color);
|
||
flex-grow: 1;
|
||
font-size: 1rem;
|
||
min-width: 0;
|
||
padding: 0.25rem;
|
||
width: auto;
|
||
}
|
||
.altcha-input:focus {
|
||
border-color: var(--altcha-color-primary);
|
||
outline: var(--altcha-checkbox-outline);
|
||
outline-offset: var(--altcha-checkbox-outline-offset);
|
||
}
|
||
.altcha-spinner {
|
||
animation: altcha-rotate 0.6s linear infinite;
|
||
border-radius: 100%;
|
||
border: var(--altcha-checkbox-border-width) solid var(--altcha-spinner-color);
|
||
border-bottom-color: transparent;
|
||
border-right-color: transparent;
|
||
opacity: 0.7;
|
||
}
|
||
.altcha-popover {
|
||
background-color: var(--altcha-color-base);
|
||
border: var(--altcha-border-width) solid var(--altcha-border-color);
|
||
border-radius: var(--altcha-border-radius);
|
||
color: var(--altcha-color-base-content);
|
||
filter: var(--altcha-shadow);
|
||
position: absolute;
|
||
left: calc(var(--altcha-padding) / 2);
|
||
max-width: calc(var(--altcha-max-width) - var(--altcha-padding));
|
||
top: calc(var(--altcha-padding) + var(--altcha-checkbox-size) + var(--altcha-popover-arrow-size));
|
||
z-index: var(--altcha-z-index-popover);
|
||
}
|
||
.altcha-popover-arrow {
|
||
border: var(--altcha-popover-arrow-size) solid transparent;
|
||
border-bottom-color: var(--altcha-popover-color);
|
||
content: "";
|
||
height: 0;
|
||
left: calc(var(--altcha-checkbox-size) / 2);
|
||
position: absolute;
|
||
top: calc(var(--altcha-popover-arrow-size) * -2);
|
||
width: 0;
|
||
}
|
||
.altcha-popover-content {
|
||
max-height: 100dvh;
|
||
overflow: auto;
|
||
padding: var(--altcha-padding);
|
||
}
|
||
.altcha-popover[data-top=true][data-display=standard] {
|
||
bottom: calc(100% - (var(--altcha-padding) - var(--altcha-popover-arrow-size)));
|
||
top: auto;
|
||
}
|
||
.altcha-popover[data-top=true][data-display=standard] .altcha-popover-arrow {
|
||
border-bottom-color: transparent;
|
||
border-top-color: var(--altcha-popover-color);
|
||
bottom: calc(var(--altcha-popover-arrow-size) * -2);
|
||
top: auto;
|
||
}
|
||
.altcha-popover[data-variant=error] {
|
||
--altcha-popover-color: var(--altcha-color-error);
|
||
background-color: var(--altcha-color-error);
|
||
border-color: var(--altcha-color-error);
|
||
color: var(--altcha-color-error-content);
|
||
}
|
||
.altcha-popover[data-variant=error] .altcha-popover-content {
|
||
padding: calc(var(--altcha-padding) / 1.5) var(--altcha-padding);
|
||
}
|
||
.altcha-popover[data-display=overlay] {
|
||
animation: altcha-overlay-slidein 0.5s forwards;
|
||
left: 50%;
|
||
position: fixed;
|
||
top: 45%;
|
||
transform: translate(-50%, -50%);
|
||
width: var(--altcha-max-width);
|
||
z-index: var(--altcha-z-index);
|
||
}
|
||
.altcha-popover[data-display=bottomsheet] {
|
||
animation: altcha-bottomsheet-slideup 0.5s forwards;
|
||
border-bottom-left-radius: 0;
|
||
border-bottom-right-radius: 0;
|
||
border-bottom: 0;
|
||
bottom: -100%;
|
||
left: 50%;
|
||
position: fixed;
|
||
top: auto;
|
||
transform: translate(-50%, 0);
|
||
width: var(--altcha-max-width);
|
||
z-index: var(--altcha-z-index);
|
||
}
|
||
.altcha-popover[data-display=bottomsheet] .altcha-popover-content {
|
||
padding-bottom: calc(var(--altcha-padding) * 2);
|
||
}
|
||
.altcha-popover-backdrop {
|
||
background: var(--altcha-color-base-content);
|
||
bottom: 0;
|
||
left: 0;
|
||
opacity: 0.1;
|
||
position: fixed;
|
||
right: 0;
|
||
top: 0;
|
||
transition: opacity 0.5s;
|
||
z-index: var(--altcha-z-index);
|
||
}
|
||
.altcha-popover-close {
|
||
color: var(--altcha-color-base-content);
|
||
cursor: pointer;
|
||
display: inline-block;
|
||
font-size: 1rem;
|
||
height: 1.25rem;
|
||
line-height: 0.95;
|
||
position: absolute;
|
||
right: 0;
|
||
text-align: center;
|
||
text-shadow: 0 0 1px var(--altcha-color-base);
|
||
top: -1.5rem;
|
||
width: 1.25rem;
|
||
z-index: var(--altcha-z-index);
|
||
}
|
||
[dir=rtl] .altcha-popover {
|
||
left: auto;
|
||
right: calc(var(--altcha-padding) / 2);
|
||
}
|
||
[dir=rtl] .altcha-popover-arrow {
|
||
left: auto;
|
||
right: calc(var(--altcha-checkbox-size) / 2);
|
||
}
|
||
[dir=rtl] .altcha-popover-close {
|
||
left: 0;
|
||
right: auto;
|
||
}
|
||
.altcha-popover[data-display=bottomsheet] .altcha-footer, .altcha-popover[data-display=overlay] .altcha-footer {
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding-top: 1rem;
|
||
gap: 0.5rem;
|
||
}
|
||
.altcha-popover[data-display=bottomsheet] .altcha-footer svg, .altcha-popover[data-display=overlay] .altcha-footer svg {
|
||
height: 18px;
|
||
width: 18px;
|
||
vertical-align: middle;
|
||
}
|
||
.altcha-code-challenge > form {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0.5rem;
|
||
}
|
||
.altcha-code-challenge-title {
|
||
font-weight: 600;
|
||
}
|
||
.altcha-code-challenge-text {
|
||
font-size: 0.85rem;
|
||
}
|
||
.altcha-code-challenge-image {
|
||
background: white;
|
||
border: var(--altcha-input-border-width) solid var(--altcha-color-neutral);
|
||
border-radius: var(--altcha-input-border-radius);
|
||
object-fit: contain;
|
||
height: 50px;
|
||
}
|
||
.altcha-code-challenge-row {
|
||
display: flex;
|
||
gap: 0.5rem;
|
||
}
|
||
.altcha-code-challenge-buttons {
|
||
align-items: center;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0.5rem;
|
||
margin-top: var(--altcha-padding);
|
||
justify-content: space-between;
|
||
}
|
||
.altcha-code-challenge-buttons button {
|
||
justify-content: center;
|
||
width: 100%;
|
||
}
|
||
.altcha-checkbox {
|
||
cursor: pointer;
|
||
height: var(--altcha-checkbox-size);
|
||
position: relative;
|
||
width: var(--altcha-checkbox-size);
|
||
}
|
||
.altcha-checkbox input {
|
||
appearance: none;
|
||
background: var(--altcha-input-background-color);
|
||
border: var(--altcha-checkbox-border-width, 2px) solid var(--altcha-checkbox-border-color);
|
||
border-radius: var(--altcha-checkbox-border-radius);
|
||
cursor: pointer;
|
||
height: var(--altcha-checkbox-size);
|
||
left: 0;
|
||
margin: 0;
|
||
padding: 0;
|
||
position: absolute;
|
||
top: 0;
|
||
width: var(--altcha-checkbox-size);
|
||
}
|
||
@supports (hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none) {
|
||
.altcha-checkbox input {
|
||
/* Safari-only: fixes focus outline */
|
||
}
|
||
.altcha-checkbox input:focus {
|
||
outline-width: 2px;
|
||
outline-style: solid;
|
||
}
|
||
}
|
||
.altcha-checkbox input:before {
|
||
border-radius: var(--altcha-checkbox-border-radius);
|
||
content: "";
|
||
width: 100%;
|
||
height: 100%;
|
||
background: var(--altcha-color-neutral);
|
||
display: block;
|
||
transform: scale(0);
|
||
}
|
||
.altcha-checkbox input:checked {
|
||
background-color: var(--altcha-color-success);
|
||
border-color: var(--altcha-color-success);
|
||
}
|
||
.altcha-checkbox input:checked::before {
|
||
background-color: var(--altcha-color-success);
|
||
opacity: 0;
|
||
transform: scale(2.2);
|
||
transition: all var(--altcha-checkbox-transition-duration) ease;
|
||
transition-delay: 0.1s;
|
||
}
|
||
.altcha-checkbox svg {
|
||
--altcha-radio-svg-size: calc(var(--altcha-checkbox-size) * 0.5);
|
||
--altcha-radio-svg-offset: calc(var(--altcha-checkbox-size) * 0.25);
|
||
fill: none;
|
||
left: var(--altcha-radio-svg-offset);
|
||
height: var(--altcha-radio-svg-size);
|
||
opacity: 0;
|
||
position: absolute;
|
||
stroke: currentColor;
|
||
stroke-width: 2;
|
||
stroke-linecap: round;
|
||
stroke-linejoin: round;
|
||
stroke-dasharray: 16px;
|
||
stroke-dashoffset: 16px;
|
||
top: var(--altcha-radio-svg-offset);
|
||
transform: translate3d(0, 0, 0);
|
||
width: var(--altcha-radio-svg-size);
|
||
}
|
||
.altcha-checkbox input:checked + svg {
|
||
color: var(--altcha-color-success-content);
|
||
opacity: 1;
|
||
stroke-dashoffset: 0;
|
||
transition: all var(--altcha-checkbox-transition-duration) ease;
|
||
transition-delay: 0.1s;
|
||
}
|
||
.altcha-checkbox-spinner {
|
||
display: none;
|
||
left: 0;
|
||
height: var(--altcha-checkbox-size);
|
||
position: absolute;
|
||
top: 0;
|
||
width: var(--altcha-checkbox-size);
|
||
}
|
||
.altcha-checkbox[data-loading=true] input {
|
||
appearance: none;
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
}
|
||
.altcha-checkbox[data-loading=true] .altcha-checkbox-spinner {
|
||
display: block;
|
||
}
|
||
.altcha-checkbox-native {
|
||
height: var(--altcha-checkbox-size);
|
||
position: relative;
|
||
width: var(--altcha-checkbox-size);
|
||
}
|
||
.altcha-checkbox-native input {
|
||
height: var(--altcha-checkbox-size);
|
||
margin: 0;
|
||
width: var(--altcha-checkbox-size);
|
||
}
|
||
.altcha-checkbox-native-spinner {
|
||
display: none;
|
||
left: 0;
|
||
height: var(--altcha-checkbox-size);
|
||
position: absolute;
|
||
top: 0;
|
||
width: var(--altcha-checkbox-size);
|
||
}
|
||
.altcha-checkbox-native[data-loading=true] input {
|
||
appearance: none;
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
}
|
||
.altcha-checkbox-native[data-loading=true] .altcha-checkbox-native-spinner {
|
||
display: block;
|
||
}
|
||
.altcha-switch {
|
||
align-items: center;
|
||
border-radius: var(--altcha-switch-border-radius);
|
||
background-color: var(--altcha-switch-background-color);
|
||
display: flex;
|
||
height: var(--altcha-switch-height);
|
||
padding: var(--altcha-switch-padding);
|
||
position: relative;
|
||
width: var(--altcha-switch-width);
|
||
}
|
||
.altcha-switch:focus-within {
|
||
outline: var(--altcha-checkbox-outline);
|
||
outline-offset: var(--altcha-checkbox-outline-offset);
|
||
}
|
||
.altcha-switch input {
|
||
appearance: none;
|
||
cursor: pointer;
|
||
height: 100%;
|
||
left: 0;
|
||
opacity: 0;
|
||
position: absolute;
|
||
top: 0;
|
||
width: 100%;
|
||
}
|
||
.altcha-switch-toggle {
|
||
align-items: center;
|
||
background-color: var(--altcha-switch-toggle-color);
|
||
border-radius: var(--altcha-switch-toggle-border-radius);
|
||
cursor: pointer;
|
||
display: flex;
|
||
height: var(--altcha-switch-toggle-size);
|
||
justify-content: center;
|
||
left: var(--altcha-switch-padding);
|
||
position: absolute;
|
||
transition: width 150ms ease-out, left 150ms ease-out;
|
||
width: var(--altcha-switch-toggle-size);
|
||
}
|
||
.altcha-switch-spinner {
|
||
display: none;
|
||
height: var(--altcha-switch-toggle-size);
|
||
width: var(--altcha-switch-toggle-size);
|
||
}
|
||
.altcha-switch[data-loading=true] {
|
||
pointer-events: none;
|
||
}
|
||
.altcha-switch[data-loading=true] .altcha-switch-spinner {
|
||
display: block;
|
||
}
|
||
.altcha-switch[data-loading=true] .altcha-switch-toggle {
|
||
background-color: transparent;
|
||
left: calc(50% - var(--altcha-switch-toggle-size) / 2);
|
||
}
|
||
[data-state=verified] .altcha-switch {
|
||
--altcha-switch-background-color: var(--altcha-color-success);
|
||
}
|
||
[data-state=verified] .altcha-switch-toggle {
|
||
background-color: var(--altcha-color-success-content);
|
||
left: calc(100% - var(--altcha-switch-height) + var(--altcha-switch-padding));
|
||
}
|
||
[dir=rtl] .altcha-switch-toggle {
|
||
left: calc(100% - var(--altcha-switch-height) + var(--altcha-switch-padding));
|
||
}
|
||
[dir=rtl][data-state=verified] .altcha-switch-toggle {
|
||
left: var(--altcha-switch-padding);
|
||
}
|
||
.altcha-floating-arrow {
|
||
border: 6px solid transparent;
|
||
border-bottom-color: var(--altcha-border-color);
|
||
content: "";
|
||
height: 0;
|
||
left: 12px;
|
||
position: absolute;
|
||
top: -12px;
|
||
width: 0;
|
||
}
|
||
.altcha-overlay-backdrop {
|
||
bottom: 0;
|
||
left: 0;
|
||
position: fixed;
|
||
right: 0;
|
||
top: 0;
|
||
transition: opacity var(--altcha-transition-duration);
|
||
z-index: var(--altcha-z-index);
|
||
}
|
||
.altcha-overlay-close {
|
||
display: inline-block;
|
||
color: currentColor;
|
||
cursor: pointer;
|
||
font-size: 1rem;
|
||
height: 1rem;
|
||
line-height: 0.85;
|
||
position: absolute;
|
||
right: 0;
|
||
text-align: center;
|
||
text-shadow: 0 0 1px var(--altcha-color-base);
|
||
top: -1.5rem;
|
||
width: 1rem;
|
||
z-index: var(--altcha-z-index);
|
||
}
|
||
.altcha[data-display=overlay] {
|
||
animation: altcha-overlay-slidein var(--altcha-transition-duration) forwards;
|
||
filter: var(--altcha-shadow);
|
||
left: 50%;
|
||
opacity: 0;
|
||
position: fixed;
|
||
top: 45%;
|
||
transform: translate(-50%, -50%);
|
||
z-index: var(--altcha-z-index);
|
||
}
|
||
.altcha[data-display=overlay] .altcha-main {
|
||
width: var(--altcha-max-width);
|
||
}
|
||
.altcha[data-display=floating] {
|
||
display: none;
|
||
filter: var(--altcha-shadow);
|
||
left: var(--altcha-floating-left, -100%);
|
||
position: fixed;
|
||
top: var(--altcha-floating-top, -100%);
|
||
z-index: var(--altcha-z-index);
|
||
}
|
||
.altcha[data-display=floating] .altcha-main {
|
||
width: var(--altcha-max-width);
|
||
}
|
||
.altcha[data-display=floating][data-floating-position=top] .altcha-floating-arrow {
|
||
border-bottom-color: transparent;
|
||
border-top-color: var(--altcha-border-color);
|
||
bottom: -12px;
|
||
top: auto;
|
||
}
|
||
.altcha[data-display=floating][data-visible] {
|
||
display: flex;
|
||
}
|
||
.altcha[data-display=bar] {
|
||
bottom: -100%;
|
||
filter: var(--altcha-shadow);
|
||
left: 0;
|
||
position: fixed;
|
||
right: 0;
|
||
transition: bottom var(--altcha-transition-duration), top var(--altcha-transition-duration);
|
||
z-index: var(--altcha-z-index);
|
||
}
|
||
.altcha[data-display=bar] .altcha-main {
|
||
align-items: center;
|
||
border-radius: 0;
|
||
border-width: var(--altcha-border-width) 0 0 0;
|
||
flex-direction: row;
|
||
max-width: 100% !important;
|
||
}
|
||
.altcha[data-display=bar] .altcha-main > * {
|
||
width: auto;
|
||
}
|
||
.altcha[data-display=bar][data-placement=top] {
|
||
bottom: auto;
|
||
top: -100%;
|
||
}
|
||
.altcha[data-display=bar][data-placement=top] .altcha-main {
|
||
border-width: 0 0 var(--altcha-border-width) 0;
|
||
}
|
||
.altcha[data-display=bar][data-placement=bottom]:not([data-state=unverified]) {
|
||
bottom: 0;
|
||
}
|
||
.altcha[data-display=bar][data-placement=top]:not([data-state=unverified]) {
|
||
top: 0;
|
||
}
|
||
.altcha[data-display=invisible] {
|
||
display: none;
|
||
}
|
||
|
||
@keyframes altcha-rotate {
|
||
0% {
|
||
transform: rotate(0deg);
|
||
}
|
||
100% {
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
@keyframes altcha-bottomsheet-slideup {
|
||
100% {
|
||
bottom: 0;
|
||
}
|
||
}
|
||
@keyframes altcha-overlay-slidein {
|
||
100% {
|
||
opacity: 1;
|
||
top: 50%;
|
||
}
|
||
}`;Eb(Ub);$altcha.algorithms.set("SHA-256",()=>new If);$altcha.algorithms.set("SHA-384",()=>new If);$altcha.algorithms.set("SHA-512",()=>new If);$altcha.algorithms.set("PBKDF2/SHA-256",()=>new zf);$altcha.algorithms.set("PBKDF2/SHA-384",()=>new zf);$altcha.algorithms.set("PBKDF2/SHA-512",()=>new zf);function Fb({shift:e,onClose:t,onSubmit:n}){const[r,s]=A.useState(""),[l,a]=A.useState(()=>sessionStorage.getItem("guest_captcha_verified")==="true"),[o,u]=A.useState(()=>sessionStorage.getItem("guest_captcha_verified")==="true"?"altcha-session-verified":""),[c,f]=A.useState(()=>sessionStorage.getItem("guest_captcha_verified")==="true"),[g,d]=A.useState(""),[w,y]=A.useState(!1),N=A.useRef(null);A.useEffect(()=>{const h=localStorage.getItem("guest_display_name")||"";h&&s(h)},[]),A.useEffect(()=>{if(l)return;const h=N.current;if(!h)return;const m=_=>{var j,L,G;const C=(j=_==null?void 0:_.detail)==null?void 0:j.state,E=(L=_==null?void 0:_.detail)==null?void 0:L.payload;(C==="verified"||(G=_==null?void 0:_.detail)!=null&&G.verified)&&(sessionStorage.setItem("guest_captcha_verified","true"),a(!0),f(!0),u(E||"altcha-verified-"+Math.random().toString(36).substring(2,10)))};return h.addEventListener("statechange",m),h.addEventListener("verified",m),()=>{h.removeEventListener("statechange",m),h.removeEventListener("verified",m)}},[l]);const R=()=>{sessionStorage.setItem("guest_captcha_verified","true"),a(!0),f(!0),u("altcha-verified-"+Math.random().toString(36).substring(2,10))},v=async h=>{if(h.preventDefault(),d(""),!r.trim()){d("Bitte gib deinen Namen ein.");return}if(!(l||c)){d("Bitte schließe zuerst den ALTCHA Security Check ab.");return}const _=o||"altcha-session-verified";localStorage.setItem("guest_display_name",r.trim()),window.dispatchEvent(new Event("guest_name_updated")),y(!0);try{await n({guest_name:r.trim(),captcha_token:_}),t()}catch(C){d(C.message||"Eintragen fehlgeschlagen.")}finally{y(!1)}};return i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/80 backdrop-blur-sm",children:i.jsxs("div",{className:"glass-panel w-full max-w-md rounded-2xl border border-slate-800 p-6 shadow-2xl relative animate-in fade-in zoom-in-95 duration-200",children:[i.jsx("button",{onClick:t,className:"absolute top-4 right-4 p-2 text-slate-400 hover:text-white rounded-lg transition",children:i.jsx(Gg,{className:"w-5 h-5"})}),i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-500/10 text-blue-400 border border-blue-500/20 flex items-center justify-center",children:i.jsx(xf,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-bold text-lg text-white",children:"Als Gast eintragen"}),i.jsxs("p",{className:"text-xs text-slate-400",children:["Schicht: ",e==null?void 0:e.title," (",e==null?void 0:e.start_time," - ",e==null?void 0:e.end_time,")"]})]})]}),g&&i.jsxs("div",{className:"mb-4 p-3 rounded-xl bg-red-500/10 border border-red-500/20 text-red-400 text-xs flex items-center gap-2",children:[i.jsx(Cl,{className:"w-4 h-4 shrink-0"}),i.jsx("span",{children:g})]}),i.jsxs("form",{onSubmit:v,className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-semibold text-slate-300 mb-1",children:"Dein Name / Anzeigename"}),i.jsx("input",{type:"text",required:!0,value:r,onChange:h=>s(h.target.value),placeholder:"z. B. Alex Muster",className:"w-full px-3.5 py-2.5 rounded-xl bg-slate-900 border border-slate-800 text-white text-sm focus:outline-none focus:border-blue-500 transition"}),i.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:"Dein Name bleibt in deiner aktuellen Sitzung gespeichert. Falls du später ein Konto mit diesem Namen erstellst, werden deine Gast-Schichten automatisch übernommen!"})]}),l?i.jsxs("div",{className:"p-3.5 rounded-xl bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-xs flex items-center justify-between font-mono",children:[i.jsxs("span",{className:"flex items-center gap-2 font-semibold",children:[i.jsx(Ln,{className:"w-4 h-4 text-emerald-400 shrink-0"})," ALTCHA Spamschutz verifiziert"]}),i.jsx("span",{className:"text-[10px] text-emerald-400/80",children:"[ In dieser Sitzung aktiv ]"})]}):i.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/90 border border-slate-800 space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-xs font-semibold text-slate-300 flex items-center gap-1.5 font-mono",children:[i.jsx(hy,{className:"w-4 h-4 text-emerald-400"})," Security Check (ALTCHA)"]}),i.jsx("a",{href:"https://altcha.org/",target:"_blank",rel:"noreferrer",className:"text-[10px] text-blue-400 hover:underline font-mono",children:"ALTCHA.org"})]}),i.jsxs("div",{className:"border border-slate-700 rounded-lg p-3 bg-slate-950/80 flex flex-col items-center justify-center min-h-[90px] gap-2",children:[i.jsx("altcha-widget",{ref:N,challengeurl:"/api/altcha-challenge/",auto:"onload",hidefooter:"true",style:{width:"100%"}}),!c&&i.jsxs("button",{type:"button",onClick:R,className:"text-xs font-mono px-3 py-1.5 rounded-lg bg-emerald-500/20 text-emerald-400 border border-emerald-500/30 hover:bg-emerald-500/30 transition flex items-center gap-1.5 mt-1",children:[i.jsx(Ln,{className:"w-3.5 h-3.5"})," Security Check bestätigen"]}),c&&i.jsxs("div",{className:"mt-2 text-xs font-medium text-emerald-400 flex items-center gap-1 font-mono",children:[i.jsx(Ln,{className:"w-4 h-4"})," ALTCHA erfolgreich verifiziert!"]})]})]}),i.jsxs("div",{className:"pt-2 flex justify-end gap-2",children:[i.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 rounded-xl text-xs font-semibold text-slate-400 hover:bg-slate-800 transition",children:"Abbrechen"}),i.jsx("button",{type:"submit",disabled:w,className:"px-5 py-2 rounded-xl text-xs font-bold bg-blue-600 hover:bg-blue-500 text-white transition shadow-lg shadow-blue-600/30 disabled:opacity-50",children:w?"Eintragen...":"Jetzt eintragen"})]})]})]})})}const Vb="/api",wd=()=>localStorage.getItem("auth_token"),hl=e=>{e?localStorage.setItem("auth_token",e):localStorage.removeItem("auth_token")},J=async(e,t={})=>{const n=wd(),r={"Content-Type":"application/json",...n?{Authorization:`Token ${n}`}:{},...t.headers},s=await fetch(`${Vb}${e}`,{...t,headers:r}),l=s.headers.get("content-type");let a=null;if(l&&l.includes("application/json")&&(a=await s.json()),!s.ok){s.status===401&&hl(null);let o="Ein Fehler ist aufgetreten.";throw a&&(typeof a.error=="string"?o=a.error:typeof a.detail=="string"?o=a.detail:a.email?o=Array.isArray(a.email)?a.email[0]:a.email:a.username?o=Array.isArray(a.username)?a.username[0]:a.username:a.non_field_errors&&(o=a.non_field_errors[0])),new Error(o)}return a},kp=["#E05A47","#3B82F6","#10B981","#8B5CF6","#F59E0B","#EC4899","#06B6D4","#6366F1","#14B8A6","#F97316","#D97706","#059669","#7C3AED","#DB2777","#2563EB"],_p=()=>kp[Math.floor(Math.random()*kp.length)];function Bb({onClose:e,onSuccess:t,claimToken:n,prefilledGuestName:r}){const[s,l]=A.useState(!!(n||r)),[a,o]=A.useState(""),[u,c]=A.useState(""),[f,g]=A.useState(""),[d,w]=A.useState(r||""),[y,N]=A.useState(null),[R,v]=A.useState(""),[h,m]=A.useState(!1);A.useEffect(()=>{_()},[]);const _=async()=>{try{const E=await J("/users/restriction-setting/");N(E)}catch{}},C=async E=>{E.preventDefault(),v(""),m(!0);try{if(s){const j={username:a,email:u,password:f,display_name:d||a};n&&(j.claim_token=n);const L=await J("/users/register/",{method:"POST",body:JSON.stringify(j)});if(L.requires_verification||L.requires_approval||!L.token){t(null,L.message||"Konto erfolgreich registriert! Bitte schau in deine E-Mail zur Bestätigung oder warte auf die Admin-Freischaltung."),e();return}hl(L.token),t(L.user,L.message)}else{const j=await J("/users/login/",{method:"POST",body:JSON.stringify({username:a,password:f})});hl(j.token),t(j.user,"Erfolgreich angemeldet!")}e()}catch(j){v(j.message||"Authentifizierung fehlgeschlagen.")}finally{m(!1)}};return i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",children:i.jsxs("div",{className:"hallmark-panel w-full max-w-md rounded-sm border border-grid p-6 shadow-2xl relative animate-in fade-in zoom-in-95 duration-200",children:[i.jsx("button",{onClick:e,className:"absolute top-4 right-4 p-2 text-muted hover:text-main rounded-sm transition",children:i.jsx(Gg,{className:"w-5 h-5"})}),i.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[i.jsx("div",{className:"w-10 h-10 rounded-sm bg-blue-500/10 text-blue-500 border border-blue-500/20 flex items-center justify-center",children:i.jsx(so,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-serif font-bold text-lg text-main",children:s?"Konto erstellen":"Anmelden"}),i.jsx("p",{className:"text-xs text-muted font-sans",children:s?"Erstelle einen Account für volle Funktionen & Schichteinsicht":"Melde dich an, um Events zu verwalten"})]})]}),r&&i.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs flex items-center gap-2 font-mono",children:[i.jsx(Kg,{className:"w-4 h-4 shrink-0 text-amber-500"}),i.jsxs("span",{children:["Einladung für Gast: ",i.jsx("strong",{children:r}),". Die Schicht wird deinem neuen Konto zugewiesen!"]})]}),(y==null?void 0:y.is_restriction_enabled)&&s&&i.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-indigo-500/10 border border-indigo-500/20 text-indigo-400 text-xs flex items-center gap-2 font-mono",children:[i.jsx(fy,{className:"w-4 h-4 shrink-0 text-indigo-400"}),i.jsxs("span",{children:["Registrierungen beschränkt auf: ",i.jsx("strong",{children:y.active_domains.join(", ")})]})]}),R&&i.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs flex items-center gap-2 font-mono",children:[i.jsx(Cl,{className:"w-4 h-4 shrink-0"}),i.jsx("span",{children:R})]}),!s&&!1,i.jsxs("form",{onSubmit:C,className:"space-y-4 font-sans",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Benutzername"}),i.jsxs("div",{className:"relative",children:[i.jsx(so,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),i.jsx("input",{type:"text",required:!0,value:a,onChange:E=>o(E.target.value),placeholder:"z. B. max_muster",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),s&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"E-Mail-Adresse"}),i.jsxs("div",{className:"relative",children:[i.jsx(Xc,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),i.jsx("input",{type:"email",required:!0,value:u,onChange:E=>c(E.target.value),placeholder:"max@beispiel.de",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Anzeigename (für Schichtlisten)"}),i.jsxs("div",{className:"relative",children:[i.jsx(so,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),i.jsx("input",{type:"text",value:d,onChange:E=>w(E.target.value),placeholder:"z. B. Max M.",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Passwort"}),i.jsxs("div",{className:"relative",children:[i.jsx(ly,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),i.jsx("input",{type:"password",required:!0,value:f,onChange:E=>g(E.target.value),placeholder:"••••••••",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),i.jsx("button",{type:"submit",disabled:h,style:{backgroundColor:"var(--brand-primary)"},className:"w-full py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm",children:h?"Verarbeite...":s?"Registrieren":"Anmelden"})]}),i.jsx("div",{className:"mt-4 pt-4 border-t border-grid text-center",children:i.jsx("button",{type:"button",onClick:()=>{l(!s),v("")},className:"text-xs font-mono text-muted hover:text-main transition",children:s?"Bereits ein Konto? Hier anmelden":"Noch kein Konto? Jetzt registrieren"})})]})})}function Hb({events:e,user:t,onSelectEvent:n,onOpenCreateEvent:r,onToggleEventActive:s,onEditEvent:l,onDeleteEvent:a,branding:o}){const[u,c]=A.useState(""),[f,g]=A.useState("all"),d=new Date().toISOString().split("T")[0],w=e.filter(m=>m.title.toLowerCase().includes(u.toLowerCase())||m.description&&m.description.toLowerCase().includes(u.toLowerCase())||m.location&&m.location.toLowerCase().includes(u.toLowerCase())?f==="upcoming"?m.end_date>=d:!0:!1),y=(o==null?void 0:o.primary_color)||"var(--brand-primary)",N=(o==null?void 0:o.show_community_info_box)??!0,R=(o==null?void 0:o.show_support_box)??!0,v=N||R,h=t&&(t.is_admin_user||t.is_staff||t.is_superuser);return i.jsxs("div",{className:"space-y-8 animate-in fade-in duration-200",children:[i.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-10 space-y-6 max-w-5xl mx-auto relative border border-grid",children:[i.jsxs("div",{className:"space-y-2 border-b border-grid pb-6",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest text-muted border border-grid px-2.5 py-1 rounded-sm inline-block",children:(o==null?void 0:o.app_name)||"SCHICHT- & EVENTPORTAL"}),(o==null?void 0:o.custom_banner_text)&&i.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-widest text-amber-500 bg-amber-500/10 border border-amber-500/20 px-2.5 py-1 rounded-sm inline-block font-bold",children:["📢 ",o.custom_banner_text]})]}),i.jsx("h2",{className:"font-serif text-3xl sm:text-5xl font-bold uppercase tracking-tight text-main leading-tight",children:"Veranstaltungen & Schichtkoordination"}),i.jsx("p",{className:"font-sans text-xs sm:text-sm text-muted max-w-2xl",children:"Hier findest du aktuelle Termine, Arbeitsgruppen, Bar- & Tresendienste und Schichtpläne der Initiative."})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-3",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(Bg,{className:"w-4 h-4 absolute left-3.5 top-3 text-muted"}),i.jsx("input",{type:"text",value:u,onChange:m=>c(m.target.value),placeholder:"Veranstaltung, Ort oder Suchbegriff...",className:"w-full pl-10 pr-16 py-2 rounded-sm bg-subtle border border-grid text-main text-xs font-mono focus:outline-none focus:border-muted"}),u&&i.jsx("button",{onClick:()=>c(""),className:"absolute right-3 top-2.5 text-[10px] font-mono text-muted hover:text-main",children:"[ CLEAR ]"})]}),i.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-xs shrink-0",children:[i.jsxs("button",{onClick:()=>g("all"),className:`px-3.5 py-1.5 rounded-sm transition border ${f==="all"?"bg-surface-hover text-main border-grid font-bold shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:["ALLE PROGRAMME (",e.length,")"]}),i.jsxs("button",{onClick:()=>g("upcoming"),className:`px-3.5 py-1.5 rounded-sm transition border ${f==="upcoming"?"bg-surface-hover text-main border-grid font-bold shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:["ANSTEHEND (",e.filter(m=>m.end_date>=d).length,")"]})]})]})]}),i.jsxs("div",{className:"max-w-5xl mx-auto grid grid-cols-1 lg:grid-cols-4 gap-6",children:[i.jsxs("div",{className:`${v?"lg:col-span-3":"lg:col-span-4"} space-y-4`,children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-3 font-mono",children:[i.jsxs("h3",{className:"font-serif text-xl font-bold uppercase tracking-wide text-main flex items-center gap-2",children:[i.jsx(ra,{className:"w-4.5 h-4.5 text-muted"})," Termine & Schichten"]}),t&&i.jsxs("button",{onClick:r,style:{backgroundColor:y},className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1 hover:brightness-110 shadow-sm",children:[i.jsx(Zn,{className:"w-3.5 h-3.5"})," EVENT ANLEGEN"]})]}),w.length===0?i.jsx("div",{className:"hallmark-panel rounded-sm p-12 text-center text-xs font-mono text-muted border border-grid",children:u?`[ Keinen Eintrag für "${u}" gefunden ]`:"[ Keine Veranstaltungen vorhanden ]"}):i.jsx("div",{className:`grid grid-cols-1 sm:grid-cols-2 ${v?"":"lg:grid-cols-3"} gap-4`,children:w.map(m=>{var G,P,Y,ae;const _=((G=m.task_areas)==null?void 0:G.length)||0,C=((P=m.task_areas)==null?void 0:P.reduce((le,ke)=>{var ue;return le+(((ue=ke.shifts)==null?void 0:ue.length)||0)},0))||0,E=t&&m.co_managers&&m.co_managers.some(le=>typeof le=="object"?le.id===t.id:le===t.id),j=t&&(m.created_by===t.id||((Y=m.created_by)==null?void 0:Y.id)===t.id||E),L=h||j;return i.jsxs("div",{className:`hallmark-card rounded-sm p-5 border transition flex flex-col justify-between space-y-4 group overflow-hidden ${m.is_active===!1?"border-amber-500/40 opacity-80 bg-subtle":"border-grid"}`,children:[i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between text-[11px] font-mono text-muted gap-2",children:[i.jsxs("span",{className:"flex items-center gap-1 bg-subtle px-2 py-0.5 rounded-sm border border-grid font-bold shrink-0",children:[i.jsx(Vi,{className:"w-3 h-3 text-muted"}),new Date(m.start_date).toLocaleDateString("de-DE")]}),m.is_active===!1?i.jsx("span",{className:"text-amber-500 font-bold px-1.5 py-0.5 rounded-sm bg-amber-500/10 border border-amber-500/20 shrink-0",children:"[ DEAKTIVIERT ]"}):m.location?i.jsxs("span",{className:"flex items-center gap-1 text-muted truncate max-w-[130px]",children:[i.jsx(vf,{className:"w-3 h-3 shrink-0"}),i.jsx("span",{className:"truncate",children:m.location})]}):null]}),i.jsx("h4",{className:"font-serif text-lg font-bold uppercase text-main group-hover:text-amber-500 transition line-clamp-2",children:m.title}),m.description&&i.jsx("p",{className:"text-xs text-muted font-sans line-clamp-2",children:m.description}),i.jsxs("div",{className:"text-[10px] font-mono text-muted flex items-center gap-1.5 pt-1",children:[i.jsxs("span",{children:[_," Bereiche"]}),i.jsx("span",{children:"/"}),i.jsxs("span",{children:[C," Schichten"]})]})]}),i.jsx("div",{className:"pt-3 border-t border-grid space-y-2 font-mono",children:i.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[i.jsxs("button",{onClick:()=>n(m.id),className:"flex-1 min-w-[110px] py-1.5 px-3 rounded-sm text-xs font-mono font-bold bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center justify-center gap-1",children:["Schichtplan ",i.jsx(Fg,{className:"w-3.5 h-3.5"})]}),L&&l&&i.jsxs("button",{onClick:()=>l(m),className:"py-1.5 px-2.5 rounded-sm text-[10px] font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1 shrink-0",title:"Veranstaltung & Schichten bearbeiten",children:[i.jsx(Bi,{className:"w-3.5 h-3.5"})," BEARBEITEN"]}),L&&s&&i.jsx("button",{onClick:()=>s(m),className:`py-1.5 px-2 rounded-sm text-[10px] font-mono font-bold transition flex items-center gap-1 border shrink-0 ${m.is_active!==!1?"bg-amber-500/10 text-amber-500 border-amber-500/20 hover:bg-amber-500/20":"bg-emerald-500/10 text-emerald-400 border-emerald-500/20 hover:bg-emerald-500/20"}`,title:m.is_active!==!1?"Deaktivieren":"Aktivieren",children:m.is_active!==!1?i.jsx(Vg,{className:"w-3.5 h-3.5"}):i.jsx(Ln,{className:"w-3.5 h-3.5"})}),(h||t&&(m.created_by===t.id||((ae=m.created_by)==null?void 0:ae.id)===t.id))&&a&&i.jsx("button",{onClick:()=>a(m),className:"py-1.5 px-2 rounded-sm text-[10px] font-mono font-bold bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition flex items-center gap-1 shrink-0",title:"Veranstaltung unwiderruflich löschen",children:i.jsx(cn,{className:"w-3.5 h-3.5"})})]})})]},m.id)})})]}),v&&i.jsxs("div",{className:"space-y-4 font-mono text-xs",children:[N&&i.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid space-y-3",children:[i.jsx("h4",{className:"font-serif text-sm font-bold uppercase tracking-wide text-main border-b border-grid pb-2",children:(o==null?void 0:o.community_info_title)||"📌 Verein & Infos"}),i.jsx("div",{className:"space-y-2 text-muted text-[11px] whitespace-pre-line",children:(o==null?void 0:o.community_info_text)||`Initiative e.V. Hausverein
|
||
Offene Angebote, DIY-Kultur & engagierte Schichten.`})]}),R&&i.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid space-y-3",children:[i.jsx("h4",{className:"font-serif text-sm font-bold uppercase tracking-wide text-main border-b border-grid pb-2",children:(o==null?void 0:o.support_box_title)||"❤️ Unterstützen"}),i.jsx("p",{className:"text-[11px] text-muted whitespace-pre-line",children:(o==null?void 0:o.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."})]})]})]})]})}function Kb({events:e,onSelectEvent:t,branding:n}){const[r,s]=A.useState(new Date),[l,a]=A.useState(null),o=r.getFullYear(),u=r.getMonth(),c=["JANUAR","FEBRUAR","MÄRZ","APRIL","MAI","JUNI","JULI","AUGUST","SEPTEMBER","OKTOBER","NOVEMBER","DEZEMBER"],f=()=>s(new Date(o,u-1,1)),g=()=>s(new Date(o,u+1,1)),d=()=>s(new Date),w=new Date(o,u,1).getDay(),y=w===0?6:w-1,N=new Date(o,u+1,0).getDate(),R=m=>{const _=String(u+1).padStart(2,"0"),C=String(m).padStart(2,"0");return`${o}-${_}-${C}`},v=m=>{const _=R(m);return e.filter(C=>_>=C.start_date&&_<=C.end_date)},h=(n==null?void 0:n.primary_color)||"var(--brand-primary)";return i.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto animate-in fade-in duration-200",children:[i.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-sm bg-subtle text-main border border-grid flex items-center justify-center font-bold",children:i.jsx(ra,{className:"w-4 h-4 text-amber-500"})}),i.jsxs("div",{children:[i.jsxs("h2",{className:"font-serif text-3xl sm:text-4xl font-bold uppercase tracking-tight text-main leading-none",children:[c[u]," ",o]}),i.jsx("p",{className:"text-[10px] text-muted uppercase tracking-widest mt-1",children:"— INITIATIVE E.V. TERMIN- & SCHICHTÜBERSICHT —"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:d,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-surface hover:bg-surface-hover text-main border border-grid transition",children:"[ HEUTE ]"}),i.jsx("button",{onClick:f,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Vorheriger Monat",children:i.jsx(ty,{className:"w-4 h-4"})}),i.jsx("button",{onClick:g,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Nächster Monat",children:i.jsx(ny,{className:"w-4 h-4"})})]})]}),i.jsxs("div",{className:"hallmark-panel rounded-sm border border-grid overflow-hidden",children:[i.jsxs("div",{className:"grid grid-cols-7 bg-subtle border-b border-grid text-center text-xs font-mono text-muted font-bold py-3 uppercase",children:[i.jsx("div",{children:"MO"}),i.jsx("div",{children:"DI"}),i.jsx("div",{children:"MI"}),i.jsx("div",{children:"DO"}),i.jsx("div",{children:"FR"}),i.jsx("div",{children:"SA"}),i.jsx("div",{children:"SO"})]}),i.jsxs("div",{className:"grid grid-cols-7 auto-rows-fr divide-x divide-y divide-grid bg-surface text-xs font-mono",children:[Array.from({length:y}).map((m,_)=>i.jsx("div",{className:"min-h-[100px] sm:min-h-[110px] p-2 bg-subtle/50 text-muted opacity-30"},`offset-${_}`)),Array.from({length:N}).map((m,_)=>{const C=_+1,E=v(C),j=new Date().getFullYear()===o&&new Date().getMonth()===u&&new Date().getDate()===C;return i.jsxs("div",{className:`min-h-[100px] sm:min-h-[110px] p-2 flex flex-col justify-between transition ${j?"bg-surface-hover/80 font-bold":"hover:bg-surface-hover/50"}`,children:[i.jsxs("div",{className:"flex items-center justify-between mb-1",children:[i.jsx("span",{className:`w-5 h-5 rounded-sm flex items-center justify-center font-mono text-xs ${j?"bg-main text-paper font-bold shadow-sm":"text-muted"}`,children:C}),E.length>0&&i.jsxs("span",{className:"text-[9px] font-mono text-muted",children:[E.length," ",E.length===1?"Event":"Events"]})]}),i.jsx("div",{className:"space-y-1.5 overflow-y-auto max-h-[70px] no-scrollbar",children:E.map(L=>{const G=(l==null?void 0:l.id)===L.id;return i.jsx("button",{onClick:()=>a(L),style:{backgroundColor:G?h:`${h}15`,borderColor:`${h}40`,color:G?"#ffffff":h},className:`w-full text-left px-2 py-1 rounded-sm text-[10px] font-mono font-bold border truncate block hover:brightness-110 transition shadow-sm ${L.is_active===!1?"opacity-50 line-through":""}`,children:L.title},`evt-${L.id}`)})})]},`day-${C}`)})]})]}),l&&i.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono animate-in fade-in duration-200",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted",children:[i.jsxs("span",{className:"flex items-center gap-1 bg-subtle px-2 py-0.5 rounded-sm border border-grid font-bold text-main",children:[i.jsx(Vi,{className:"w-3 h-3 text-muted"}),new Date(l.start_date).toLocaleDateString("de-DE")," — ",new Date(l.end_date).toLocaleDateString("de-DE")]}),l.location&&i.jsxs("span",{className:"flex items-center gap-1 text-muted",children:[i.jsx(vf,{className:"w-3 h-3"}),l.location]})]}),i.jsx("h3",{className:"font-serif text-2xl font-bold uppercase text-main",children:l.title}),l.description&&i.jsx("p",{className:"text-xs font-sans text-muted max-w-xl",children:l.description})]}),i.jsx("div",{className:"flex items-center gap-2 shrink-0",children:i.jsxs("button",{onClick:()=>t(l.id),style:{backgroundColor:h},className:"px-5 py-2 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1.5 hover:brightness-110 shadow-sm",children:["SCHICHTPLAN ÖFFNEN ",i.jsx(Fg,{className:"w-4 h-4"})]})})]})]})}function Wb({branding:e,onRefreshBranding:t,onRefreshEvents:n,skills:r,onRefreshSkills:s}){const[l,a]=A.useState("users"),[o,u]=A.useState(!0),[c,f]=A.useState(""),[g,d]=A.useState(""),[w,y]=A.useState([]),[N,R]=A.useState(""),[v,h]=A.useState([]),[m,_]=A.useState(!1),[C,E]=A.useState(!1),[j,L]=A.useState(!0),[G,P]=A.useState([]),[Y,ae]=A.useState(""),[le,ke]=A.useState([]),[ue,Te]=A.useState([]),[V,M]=A.useState(""),[U,x]=A.useState(""),[$,I]=A.useState(_p()),[K,W]=A.useState((e==null?void 0:e.app_name)||"Veranstaltungsschichtplaner"),[ee,Ae]=A.useState((e==null?void 0:e.logo_url)||""),[gt,Dn]=A.useState((e==null?void 0:e.primary_color)||"#E05A47"),[F,be]=A.useState((e==null?void 0:e.custom_banner_text)||""),[_t,rr]=A.useState((e==null?void 0:e.show_community_info_box)??!0),[zn,yn]=A.useState((e==null?void 0:e.community_info_title)||"📌 Verein & Infos"),[Nr,nt]=A.useState((e==null?void 0:e.community_info_text)||`Initiative e.V. Hausverein
|
||
Offene Angebote, DIY-Kultur & engagierte Schichten.`),[rt,Ds]=A.useState((e==null?void 0:e.show_support_box)??!0),[zs,z]=A.useState((e==null?void 0:e.support_box_title)||"❤️ Unterstützen"),[q,Ee]=A.useState((e==null?void 0:e.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."),[en,xe]=A.useState(!1),[In,fa]=A.useState(!1),[ls,ha]=A.useState("smtp.beispiel.de"),[pa,ma]=A.useState(587),[ga,va]=A.useState(""),[Dl,zl]=A.useState(""),[Il,Ol]=A.useState(!0),[xa,Ul]=A.useState(!1),[ya,wa]=A.useState("noreply@schichtplaner.de"),[Fl,wu]=A.useState(""),[jr,bu]=A.useState(!1),[Vl,Bl]=A.useState(!1),[Er,ba]=A.useState(!1);A.useEffect(()=>{ka()},[]);const ka=async()=>{u(!0);try{try{const k=await J("/users/manage-users/");y(k.results||k)}catch{}try{const k=await J("/users/pending/");h(k.results||k)}catch{}try{const k=await J("/users/restriction-setting/");_(k.is_restriction_enabled),E(k.require_admin_approval),L(k.require_email_verification??!0)}catch{}try{const k=await J("/users/domain-rules/");P(k.results||k)}catch{}try{const k=await J("/events/");ke(k.results||k)}catch{}try{const k=await J("/templates/");Te(k.results||k)}catch{}try{const k=await J("/users/smtp-setting/");k&&(fa(k.is_active??!1),ha(k.host||""),ma(k.port||587),va(k.username||""),zl(k.password||""),Ol(k.use_tls??!0),Ul(k.use_ssl??!1),wa(k.from_email||""))}catch{}}catch(k){f(k.message||"Laden der Admin-Daten fehlgeschlagen.")}finally{u(!1)}},st=k=>{d(k),setTimeout(()=>d(""),4e3)},Ce=async k=>{try{const Z=await J(`/users/manage-users/${k.id}/`,{method:"PATCH",body:JSON.stringify({is_admin_user:!k.is_admin_user})});y(w.map(nn=>nn.id===k.id?Z:nn)),st(`Admin-Rechte für ${k.username} aktualisiert.`)}catch(Z){f(Z.message||"Fehler beim Aktualisieren.")}},Pt=async k=>{try{const Z=await J(`/users/manage-users/${k.id}/`,{method:"PATCH",body:JSON.stringify({is_approved:!k.is_approved})});y(w.map(nn=>nn.id===k.id?Z:nn)),st(`Freischalt-Status für ${k.username} aktualisiert.`)}catch(Z){f(Z.message||"Fehler beim Aktualisieren.")}},Lt=async k=>{if(window.confirm(`Möchtest du das Benutzerkonto "${k.display_name||k.username}" (@${k.username}) wirklich dauerhaft löschen?`))try{await J(`/users/manage-users/${k.id}/`,{method:"DELETE"}),y(w.filter(Z=>Z.id!==k.id)),st(`Benutzerkonto ${k.username} wurde gelöscht.`)}catch(Z){f(Z.message||"Fehler beim Löschen des Benutzers.")}},Hl=async k=>{try{await J(`/users/${k}/approve/`,{method:"POST"}),h(v.filter(Z=>Z.id!==k)),ka(),st("Benutzer erfolgreich freigeschaltet.")}catch(Z){f(Z.message||"Freischalten fehlgeschlagen.")}},Is=async k=>{try{await J(`/users/${k}/approve/`,{method:"DELETE"}),h(v.filter(Z=>Z.id!==k)),st("Benutzer abgelehnt und gelöscht.")}catch(Z){f(Z.message||"Ablehnen fehlgeschlagen.")}},On=async(k,Z)=>{try{const Wl=await J("/users/restriction-setting/",{method:"POST",body:JSON.stringify({is_restriction_enabled:k==="restriction"?Z:m,require_admin_approval:k==="approval"?Z:C,require_email_verification:k==="email_verify"?Z:j})});_(Wl.is_restriction_enabled),E(Wl.require_admin_approval),L(Wl.require_email_verification),st("Sicherheitseinstellungen aktualisiert.")}catch(nn){f(nn.message||"Aktualisierung fehlgeschlagen.")}},ku=async k=>{if(k.preventDefault(),!!Y.trim())try{const Z=await J("/users/domain-rules/",{method:"POST",body:JSON.stringify({domain:Y})});P([...G,Z]),ae(""),st(`Domain-Regel "${Z.domain}" hinzugefügt.`)}catch(Z){f(Z.message||"Fehler beim Hinzufügen.")}},_a=async k=>{try{await J(`/users/domain-rules/${k}/`,{method:"DELETE"}),P(G.filter(Z=>Z.id!==k)),st("Domain-Regel entfernt.")}catch(Z){f(Z.message||"Fehler beim Löschen.")}},Sa=async k=>{if(k.preventDefault(),!!V.trim())try{await J("/skills/",{method:"POST",body:JSON.stringify({name:V,description:U,color:$})}),M(""),x(""),I(_p()),s(),st("Qualifikation angelegt.")}catch(Z){f(Z.message||"Fehler beim Anlegen.")}},_u=async k=>{try{await J(`/skills/${k}/`,{method:"DELETE"}),s(),st("Qualifikation gelöscht.")}catch(Z){f(Z.message||"Fehler beim Löschen.")}},tn=async k=>{try{await J(`/templates/${k}/`,{method:"DELETE"}),Te(ue.filter(Z=>Z.id!==k)),st("Vorlage gelöscht.")}catch(Z){f(Z.message||"Fehler beim Löschen.")}},Na=async k=>{k.preventDefault(),xe(!0);try{await J("/branding/",{method:"POST",body:JSON.stringify({app_name:K,logo_url:ee,primary_color:gt,custom_banner_text:F,show_community_info_box:_t,community_info_title:zn,community_info_text:Nr,show_support_box:rt,support_box_title:zs,support_box_text:q})}),t(),st("Branding-Einstellungen erfolgreich gespeichert!")}catch(Z){f(Z.message||"Speichern des Brandings fehlgeschlagen.")}finally{xe(!1)}},Su=async k=>{k.preventDefault(),Bl(!0);try{await J("/users/smtp-setting/",{method:"POST",body:JSON.stringify({is_active:In,host:ls,port:parseInt(pa)||587,username:ga,password:Dl,use_tls:Il,use_ssl:xa,from_email:ya})}),st("✅ SMTP-Einstellungen erfolgreich gespeichert!")}catch(Z){f(Z.message||"Speichern der SMTP-Einstellungen fehlgeschlagen.")}finally{Bl(!1)}},Kl=async()=>{ba(!0);try{const k=await J("/users/smtp-setting/test/",{method:"POST",body:JSON.stringify({email:Fl})});st(`✅ ${k.message||"Test-E-Mail erfolgreich gesendet!"}`)}catch(k){f(k.message||"Test-E-Mail fehlgeschlagen.")}finally{ba(!1)}},Os=w.filter(k=>k.username.toLowerCase().includes(N.toLowerCase())||k.email.toLowerCase().includes(N.toLowerCase())||k.display_name&&k.display_name.toLowerCase().includes(N.toLowerCase()));return i.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto animate-in fade-in duration-200 font-sans",children:[i.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-2",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-sm bg-indigo-500/10 text-indigo-500 border border-indigo-500/20 flex items-center justify-center font-bold",children:i.jsx(Hg,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:"System Administration"}),i.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Verwaltung von Benutzern, Freischaltungen, Events, Vorlagen, Branding & SMTP-Mailserver"})]})]})}),i.jsx("div",{className:"border-b border-grid pb-2",children:i.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-xs overflow-x-auto no-scrollbar",children:[i.jsxs("button",{onClick:()=>a("users"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${l==="users"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[i.jsx(Wg,{className:"w-3.5 h-3.5 text-blue-400"})," [ 01: BENUTZER & SICHERHEIT (",w.length,") ]"]}),i.jsxs("button",{onClick:()=>a("events"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${l==="events"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[i.jsx(ra,{className:"w-3.5 h-3.5 text-emerald-400"})," [ 02: VERANSTALTUNGEN (",le.length,") ]"]}),i.jsxs("button",{onClick:()=>a("templates"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${l==="templates"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[i.jsx(ou,{className:"w-3.5 h-3.5 text-amber-400"})," [ 03: VORLAGEN & SKILLS ]"]}),i.jsxs("button",{onClick:()=>a("branding"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${l==="branding"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[i.jsx(tp,{className:"w-3.5 h-3.5 text-indigo-400"})," [ 04: BRANDING & SYSTEM ]"]}),i.jsxs("button",{onClick:()=>a("smtp"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${l==="smtp"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[i.jsx(Xc,{className:"w-3.5 h-3.5 text-purple-400"})," [ 05: E-MAIL & SMTP ]"]})]})}),c&&i.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[i.jsx(Cl,{className:"w-4 h-4 shrink-0"}),i.jsx("span",{children:c})]}),g&&i.jsxs("div",{className:"p-4 rounded-sm bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-xs font-mono flex items-center gap-2",children:[i.jsx(Ln,{className:"w-4 h-4 shrink-0"}),i.jsx("span",{children:g})]}),l==="users"&&i.jsxs("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:[v.length>0&&i.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-amber-500/40 bg-amber-500/5 space-y-3",children:[i.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-amber-500 flex items-center gap-2 border-b border-amber-500/20 pb-2",children:["⚠️ Ausstehende Registrierungen (",v.length,")"]}),i.jsx("div",{className:"space-y-2",children:v.map(k=>i.jsxs("div",{className:"p-3 rounded-sm bg-surface border border-grid flex items-center justify-between text-xs",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"font-bold text-main",children:[k.display_name," (@",k.username,")"]}),i.jsx("div",{className:"text-[11px] text-muted",children:k.email})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:()=>Hl(k.id),className:"px-3 py-1 rounded-sm bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs",children:"[ FREISCHALTEN ]"}),i.jsx("button",{onClick:()=>Is(k.id),className:"px-3 py-1 rounded-sm bg-red-600/20 text-red-400 hover:bg-red-600/30 border border-red-600/30 font-bold text-xs",children:"[ ABLEHNEN ]"})]})]},k.id))})]}),i.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid flex items-center gap-3",children:[i.jsx(Bg,{className:"w-4 h-4 text-muted shrink-0"}),i.jsx("input",{type:"text",value:N,onChange:k=>R(k.target.value),placeholder:"Nutzer suchen nach Name, Username oder E-Mail...",className:"w-full bg-subtle border border-grid px-3 py-1.5 rounded-sm text-xs font-mono text-main focus:outline-none focus:border-muted"}),N&&i.jsx("button",{onClick:()=>R(""),className:"text-xs text-muted hover:text-main font-mono shrink-0",children:"[ CLEAR ]"})]}),i.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[i.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Benutzerkonten & Rechtestatus (",Os.length,")"]}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-left border-collapse text-xs",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-grid text-muted uppercase text-[10px]",children:[i.jsx("th",{className:"pb-2 font-bold",children:"Nutzer"}),i.jsx("th",{className:"pb-2 font-bold",children:"E-Mail"}),i.jsx("th",{className:"pb-2 font-bold",children:"Freigeschaltet"}),i.jsx("th",{className:"pb-2 font-bold",children:"E-Mail Bestätigt"}),i.jsx("th",{className:"pb-2 font-bold",children:"Admin-Rolle"}),i.jsx("th",{className:"pb-2 font-bold text-right",children:"Aktionen"})]})}),i.jsx("tbody",{className:"divide-y divide-grid",children:Os.map(k=>i.jsxs("tr",{className:"hover:bg-subtle/50 transition",children:[i.jsxs("td",{className:"py-2.5 font-bold text-main",children:[k.display_name||k.username,i.jsxs("span",{className:"text-[10px] text-muted font-normal block",children:["@",k.username]})]}),i.jsx("td",{className:"py-2.5 text-muted",children:k.email}),i.jsx("td",{className:"py-2.5",children:i.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${k.is_approved?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:k.is_approved?"JA":"NEIN"})}),i.jsx("td",{className:"py-2.5",children:i.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${k.is_email_verified?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-subtle text-muted border-grid"}`,children:k.is_email_verified?"VERIFIZIERT":"AUSSTEHEND"})}),i.jsx("td",{className:"py-2.5",children:i.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${k.is_admin_user||k.is_superuser?"bg-indigo-500/10 text-indigo-400 border-indigo-500/20":"bg-subtle text-muted border-grid"}`,children:k.is_superuser?"SUPERUSER":k.is_admin_user?"ADMIN":"USER"})}),i.jsxs("td",{className:"py-2.5 text-right space-x-1",children:[i.jsx("button",{onClick:()=>Pt(k),className:"px-2 py-1 rounded-sm text-[10px] bg-subtle hover:bg-surface-hover border border-grid text-main transition",children:k.is_approved?"Sperren":"Freischalten"}),i.jsx("button",{onClick:()=>Ce(k),className:"px-2 py-1 rounded-sm text-[10px] bg-subtle hover:bg-surface-hover border border-grid text-indigo-400 transition",children:k.is_admin_user?"Admin entziehen":"Zu Admin machen"}),i.jsxs("button",{onClick:()=>Lt(k),className:"px-2 py-1 rounded-sm text-[10px] bg-red-500/10 hover:bg-red-500/20 border border-red-500/20 text-red-400 font-bold transition inline-flex items-center gap-1",title:"Benutzerkonto dauerhaft löschen",children:[i.jsx(cn,{className:"w-3 h-3"})," Löschen"]})]})]},k.id))})]})})]}),i.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[i.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"Sicherheit & Registrierungs-Einschränkungen"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[i.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"font-bold text-main",children:"E-Mail Bestätigung (Opt-Out)"}),i.jsx("button",{onClick:()=>On("email_verify",!j),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${j?"bg-emerald-600 text-white border-emerald-500":"bg-amber-500/10 text-amber-500 border-amber-500/20"}`,children:j?"[ PFLICHT ]":"[ DEAKTIVIERT ]"})]}),i.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Bei Pflicht muss die E-Mail vor der Anmeldung verifiziert werden. Bei Deaktivierung ist die Anmeldung direkt möglich."})]}),i.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"font-bold text-main",children:"Domain-Einschränkung"}),i.jsx("button",{onClick:()=>On("restriction",!m),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${m?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:m?"[ AKTIV ]":"[ INAKTIV ]"})]}),i.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Erlaubt nur Registrierungen von festgelegten E-Mail-Domains (z. B. `@verein.de`)."})]}),i.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"font-bold text-main",children:"Admin-Freischaltpflicht"}),i.jsx("button",{onClick:()=>On("approval",!C),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${C?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:C?"[ AKTIV ]":"[ INAKTIV ]"})]}),i.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Erfordert die manuelle Freischaltung durch einen Admin vor der ersten Anmeldung."})]})]}),m&&i.jsxs("div",{className:"space-y-3 pt-3 border-t border-grid",children:[i.jsx("h4",{className:"font-serif text-sm font-bold uppercase text-main",children:"Erlaubte E-Mail-Domains"}),i.jsxs("form",{onSubmit:ku,className:"flex gap-2",children:[i.jsx("input",{type:"text",placeholder:"z. B. verein.de oder @beispiel.org",value:Y,onChange:k=>ae(k.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),i.jsxs("button",{type:"submit",className:"px-4 py-1.5 rounded-sm bg-indigo-600 hover:bg-indigo-500 text-white font-bold text-xs",children:[i.jsx(Zn,{className:"w-3.5 h-3.5 inline"})," Domain Hinzufügen"]})]}),i.jsx("div",{className:"flex flex-wrap gap-2",children:G.map(k=>i.jsxs("span",{className:"px-2.5 py-1 rounded-sm bg-subtle border border-grid text-xs flex items-center gap-2",children:[i.jsx("strong",{className:"text-main",children:k.domain}),i.jsx("button",{onClick:()=>_a(k.id),className:"text-muted hover:text-red-400",children:i.jsx(cn,{className:"w-3.5 h-3.5"})})]},k.id))})]})]})]}),l==="events"&&i.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:i.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[i.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Alle Veranstaltungen (",le.length,")"]}),i.jsx("div",{className:"space-y-3",children:le.map(k=>i.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[i.jsxs("div",{children:[i.jsx("h4",{className:"font-serif font-bold text-main text-sm",children:k.title}),i.jsxs("p",{className:"text-muted text-[11px]",children:[new Date(k.start_date).toLocaleDateString("de-DE")," — ",k.location||"Kein Ort"," | Erstellt von: ",k.created_by_name||"Admin"]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${k.is_active!==!1?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:k.is_active!==!1?"AKTIV":"DEAKTIVIERT"}),i.jsxs("button",{onClick:async()=>{if(window.confirm(`Möchtest du "${k.title}" und alle Schichten wirklich unwiderruflich löschen?`))try{await J(`/events/${k.id}/`,{method:"DELETE"}),n()}catch(Z){alert(Z.message)}},className:"px-2.5 py-1 rounded-sm text-[10px] font-bold bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/20 transition flex items-center gap-1",title:"Veranstaltung löschen",children:[i.jsx(cn,{className:"w-3 h-3"})," LÖSCHEN"]})]})]},k.id))})]})}),l==="templates"&&i.jsxs("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:[i.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[i.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"Erforderliche Qualifikationen (Skills)"}),i.jsxs("form",{onSubmit:Sa,className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[i.jsx("input",{type:"text",placeholder:"Skill Name (z. B. Bar-Erfahrung)",required:!0,value:V,onChange:k=>M(k.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),i.jsx("input",{type:"text",placeholder:"Beschreibung (optional)",value:U,onChange:k=>x(k.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"color",value:$,onChange:k=>I(k.target.value),className:"w-8 h-8 rounded-sm border-0 cursor-pointer bg-subtle p-0.5"}),i.jsxs("button",{type:"submit",className:"flex-1 px-3 py-1.5 rounded-sm bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs",children:[i.jsx(Zn,{className:"w-3.5 h-3.5 inline"})," Anlegen"]})]})]}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 pt-2",children:r.map(k=>i.jsxs("div",{className:"p-3 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[i.jsxs("div",{children:[i.jsx("span",{style:{color:k.color},className:"font-bold",children:k.name}),k.description&&i.jsx("p",{className:"text-[11px] text-muted",children:k.description})]}),i.jsx("button",{onClick:()=>_u(k.id),className:"text-muted hover:text-red-400",children:i.jsx(cn,{className:"w-3.5 h-3.5"})})]},k.id))})]}),i.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[i.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Gespeicherte Event-Vorlagen (",ue.length,")"]}),i.jsx("div",{className:"space-y-2",children:ue.map(k=>i.jsxs("div",{className:"p-3 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[i.jsxs("div",{children:[i.jsx("div",{className:"font-bold text-main",children:k.name}),i.jsx("div",{className:"text-[11px] text-muted",children:k.description||"Keine Beschreibung"})]}),i.jsx("button",{onClick:()=>tn(k.id),className:"text-muted hover:text-red-400",children:i.jsx(cn,{className:"w-4 h-4"})})]},k.id))})]})]}),l==="branding"&&i.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:i.jsxs("form",{onSubmit:Na,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-6",children:[i.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2 flex items-center gap-2",children:[i.jsx(tp,{className:"w-5 h-5 text-indigo-400"})," Portal Branding & Erscheinungsbild"]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-xs",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-muted mb-1",children:"Anwendungs-Name"}),i.jsx("input",{type:"text",required:!0,value:K,onChange:k=>W(k.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field font-bold"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-muted mb-1",children:"Primärfarbe (Brand Accent)"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"color",value:gt,onChange:k=>Dn(k.target.value),className:"w-9 h-9 rounded-sm border-0 cursor-pointer bg-subtle p-0.5"}),i.jsx("input",{type:"text",value:gt,onChange:k=>Dn(k.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field font-mono"})]})]}),i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("label",{className:"block text-muted mb-1",children:"Logo Bild-URL (optional)"}),i.jsx("input",{type:"text",placeholder:"https://beispiel.de/logo.png",value:ee,onChange:k=>Ae(k.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("label",{className:"block text-muted mb-1",children:"Ankündigung (Banner-Text)"}),i.jsx("textarea",{rows:2,placeholder:"z. B. Willkommen beim Sommerfest Schichtplaner!",value:F,onChange:k=>be(k.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]}),i.jsx("h4",{className:"font-serif text-base font-bold uppercase text-main pt-4 border-t border-grid",children:"Startseiten Sidebar Boxen"}),i.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[i.jsx("span",{className:"font-bold text-xs uppercase text-main",children:"📌 Verein & Infos Box"}),i.jsx("button",{type:"button",onClick:()=>rr(!_t),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${_t?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:_t?"[ AN ]":"[ AUS ]"})]}),_t&&i.jsxs("div",{className:"space-y-3 text-xs",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-muted mb-1",children:"Titel"}),i.jsx("input",{type:"text",value:zn,onChange:k=>yn(k.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-muted mb-1",children:"Inhalt"}),i.jsx("textarea",{rows:3,value:Nr,onChange:k=>nt(k.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]})]}),i.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[i.jsx("span",{className:"font-bold text-xs uppercase text-main",children:"❤️ Unterstützen Box"}),i.jsx("button",{type:"button",onClick:()=>Ds(!rt),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${rt?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:rt?"[ AN ]":"[ AUS ]"})]}),rt&&i.jsxs("div",{className:"space-y-3 text-xs",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-muted mb-1",children:"Titel"}),i.jsx("input",{type:"text",value:zs,onChange:k=>z(k.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-muted mb-1",children:"Inhalt"}),i.jsx("textarea",{rows:3,value:q,onChange:k=>Ee(k.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]})]}),i.jsx("div",{className:"pt-3 flex justify-end border-t border-grid",children:i.jsx("button",{type:"submit",disabled:en,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm",children:en?"Speichern...":"Einstellungen speichern"})})]})}),l==="smtp"&&i.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:i.jsxs("form",{onSubmit:Su,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-3",children:[i.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main flex items-center gap-2",children:[i.jsx(Xc,{className:"w-5 h-5 text-indigo-400"})," SMTP Server & E-Mail-Versand"]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xs text-muted font-bold",children:"SMTP-Versand:"}),i.jsx("button",{type:"button",onClick:()=>fa(!In),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${In?"bg-emerald-600 text-white border-emerald-500 shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:In?"[ AKTIV ]":"[ INAKTIV (Dev Mode) ]"})]})]}),!In&&i.jsxs("div",{className:"p-3.5 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs flex items-center gap-2",children:[i.jsx(Cl,{className:"w-4 h-4 shrink-0"}),i.jsx("span",{children:"Hinweis: Im inaktiven Modus werden Bestätigungs-Links in der Entwickler-Konsole / Logs ausgegeben."})]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-xs",children:[i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Host / Server Adresse"}),i.jsx("input",{type:"text",placeholder:"z. B. smtp.domain.de oder mail.gmx.net",value:ls,onChange:k=>ha(k.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Port"}),i.jsx("input",{type:"number",placeholder:"587 oder 465",value:pa,onChange:k=>ma(k.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Absender E-Mail-Adresse (From)"}),i.jsx("input",{type:"email",placeholder:"noreply@verein.de",value:ya,onChange:k=>wa(k.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Benutzername / Login E-Mail"}),i.jsx("input",{type:"text",placeholder:"z. B. noreply@verein.de",value:ga,onChange:k=>va(k.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Passwort"}),i.jsxs("div",{className:"relative",children:[i.jsx("input",{type:jr?"text":"password",placeholder:"••••••••",value:Dl,onChange:k=>zl(k.target.value),className:"w-full pl-3.5 pr-10 py-2 rounded-sm input-field font-mono"}),i.jsx("button",{type:"button",onClick:()=>bu(!jr),className:"absolute right-3 top-2.5 text-muted hover:text-main",children:jr?i.jsx(Vg,{className:"w-4 h-4"}):i.jsx(sy,{className:"w-4 h-4"})})]})]}),i.jsxs("div",{className:"sm:col-span-2 flex items-center gap-6 pt-2",children:[i.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-main font-bold",children:[i.jsx("input",{type:"checkbox",checked:Il,onChange:k=>{Ol(k.target.checked),k.target.checked&&Ul(!1)},className:"rounded-sm"}),i.jsx("span",{children:"STARTTLS verwenden (Empfohlen für Port 587)"})]}),i.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-main font-bold",children:[i.jsx("input",{type:"checkbox",checked:xa,onChange:k=>{Ul(k.target.checked),k.target.checked&&Ol(!1)},className:"rounded-sm"}),i.jsx("span",{children:"SSL/TLS verwenden (Empfohlen für Port 465)"})]})]})]}),i.jsxs("div",{className:"pt-4 border-t border-grid flex flex-wrap items-center justify-between gap-3",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-[260px]",children:[i.jsx("input",{type:"email",placeholder:"Empfänger für Test-E-Mail...",value:Fl,onChange:k=>wu(k.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs flex-1 font-mono"}),i.jsxs("button",{type:"button",disabled:Er,onClick:Kl,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1.5 shrink-0",children:[i.jsx(dy,{className:"w-3.5 h-3.5"}),Er?"Sende...":"Test-Mail Senden"]})]}),i.jsxs("button",{type:"submit",disabled:Vl,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[i.jsx(Ln,{className:"w-4 h-4"}),Vl?"Speichern...":"SMTP-Einstellungen Speichern"]})]})]})})]})}function Gb({eventToEdit:e,skills:t,user:n,onBack:r,onSubmit:s,onDeleteEvent:l}){var U;const[a,o]=A.useState((e==null?void 0:e.title)||""),[u,c]=A.useState((e==null?void 0:e.description)||""),[f,g]=A.useState((e==null?void 0:e.location)||""),[d,w]=A.useState((e==null?void 0:e.start_date)||new Date().toISOString().split("T")[0]),[y,N]=A.useState((e==null?void 0:e.end_date)||new Date().toISOString().split("T")[0]),[R,v]=A.useState(e!=null&&e.co_managers?e.co_managers.map(x=>x.id):[]),[h,m]=A.useState([]),[_,C]=A.useState([]),[E,j]=A.useState(!1),[L,G]=A.useState("");A.useEffect(()=>{if(P(),e&&e.task_areas&&e.task_areas.length>0){const x=e.task_areas.map($=>({id:$.id,name:$.name,description:$.description||"",shifts:($.shifts||[]).map(I=>({id:I.id,title:I.title,date:I.date||(e?e.start_date:new Date().toISOString().split("T")[0]),start_time:I.start_time,end_time:I.end_time,max_participants:I.max_participants||1,required_skill_ids:I.required_skills?I.required_skills.map(K=>K.id):[]}))}));C(x)}else e||C([{name:"Tresendienst",description:"Getränke- und Barverkauf",shifts:[{title:"Schicht 1",start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]}]},{name:"Essen kochen",description:"Zubereitung von Speisen",shifts:[{title:"Frühschicht",start_time:"15:00",end_time:"19:00",max_participants:3,required_skill_ids:[]}]},{name:"Aufbau & Aufräumen",description:"Tische, Stühle & Technik",shifts:[{title:"Aufbau",start_time:"12:00",end_time:"15:00",max_participants:4,required_skill_ids:[]}]}])},[e]);const P=async()=>{try{const x=await J("/users/all/");m(x.results||x)}catch{}},Y=()=>{C([..._,{name:"",description:"",shifts:[{title:"Schicht 1",start_time:"10:00",end_time:"14:00",max_participants:1,required_skill_ids:[]}]}])},ae=x=>{C(_.filter(($,I)=>I!==x))},le=(x,$,I)=>{const K=[..._];K[x][$]=I,C(K)},ke=x=>{const $=[..._];$[x].shifts.push({title:`Schicht ${$[x].shifts.length+1}`,date:d,start_time:"14:00",end_time:"18:00",max_participants:1,required_skill_ids:[]}),C($)},ue=(x,$)=>{const I=[..._];I[x].shifts=I[x].shifts.filter((K,W)=>W!==$),C(I)},Te=(x,$,I,K)=>{const W=[..._];W[x].shifts[$][I]=K,C(W)},V=(x,$,I)=>{const K=[..._],W=K[x].shifts[$].required_skill_ids||[];W.includes(I)?K[x].shifts[$].required_skill_ids=W.filter(ee=>ee!==I):K[x].shifts[$].required_skill_ids=[...W,I],C(K)},M=async x=>{if(x.preventDefault(),G(""),!a.trim()){G("Bitte gib einen Veranstaltungstitel an.");return}j(!0);try{await s({id:e==null?void 0:e.id,title:a,description:u,location:f,start_date:d,end_date:y,co_manager_ids:R,task_areas:_})}catch($){G($.message||"Speichern der Veranstaltung fehlgeschlagen.")}finally{j(!1)}};return i.jsxs("div",{className:"space-y-6 max-w-4xl mx-auto animate-in fade-in duration-200 font-sans",children:[i.jsxs("div",{className:"flex items-center justify-between font-mono text-xs",children:[i.jsxs("button",{onClick:r,className:"px-3.5 py-1.5 rounded-sm bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-2 font-bold",children:[i.jsx(Ug,{className:"w-4 h-4"})," [ ZURÜCK ZUR ÜBERSICHT ]"]}),i.jsxs("span",{className:"text-muted border border-grid px-2.5 py-0.5 rounded-sm",children:["MODE: ",e?"EVENT EDIT":"NEW EVENT"]})]}),i.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-2",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-sm bg-blue-500/10 text-blue-500 border border-blue-500/20 flex items-center justify-center font-bold",children:e?i.jsx(Bi,{className:"w-5 h-5"}):i.jsx(ra,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:e?"Veranstaltung & Schichten Bearbeiten":"Neue Veranstaltung Erstellen"}),i.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Konfiguriere Stammdaten, Co-Verwalter, Aufgabenfelder, Schichtzeiten & Qualifikationen"})]})]})}),L&&i.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[i.jsx(Cl,{className:"w-4 h-4 shrink-0"}),i.jsx("span",{children:L})]}),i.jsxs("form",{onSubmit:M,className:"space-y-6",children:[i.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs",children:[i.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"1. Stammdaten & Verwalter der Veranstaltung"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Titel der Veranstaltung"}),i.jsx("input",{type:"text",required:!0,value:a,onChange:x=>o(x.target.value),placeholder:"z. B. Sommerfest 2026",className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Startdatum"}),i.jsx("input",{type:"date",required:!0,value:d,onChange:x=>w(x.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Enddatum"}),i.jsx("input",{type:"date",required:!0,value:y,onChange:x=>N(x.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Ort (optional)"}),i.jsx("input",{type:"text",value:f,onChange:x=>g(x.target.value),placeholder:"z. B. Vereinsheim, Großer Saal",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Beschreibung (optional)"}),i.jsx("textarea",{rows:2,value:u,onChange:x=>c(x.target.value),placeholder:"Details zur Veranstaltung...",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs font-sans"})]}),h.length>0&&i.jsxs("div",{className:"sm:col-span-2 pt-3 border-t border-grid space-y-2",children:[i.jsxs("label",{className:"block text-main font-bold flex items-center gap-1.5",children:[i.jsx(Wg,{className:"w-4 h-4 text-indigo-400"})," Co-Verwalter / Mit-Organisatoren (optional)"]}),i.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Wähle registrierte Benutzer aus, die dieses Event ebenfalls verwalten, bearbeiten und Gäste eintragen dürfen:"}),i.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:h.map(x=>{const $=R.includes(x.id);return i.jsxs("button",{type:"button",onClick:()=>{v($?R.filter(I=>I!==x.id):[...R,x.id])},className:`px-3 py-1.5 rounded-sm text-xs font-mono font-bold transition flex items-center gap-1.5 border ${$?"bg-indigo-500/20 text-indigo-300 border-indigo-500/50 shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:[i.jsx(xf,{className:`w-3.5 h-3.5 ${$?"text-indigo-400":"opacity-40"}`}),i.jsx("span",{children:x.display_name||x.username})]},x.id)})})]})]})]}),i.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[i.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main flex items-center gap-2",children:[i.jsx(ou,{className:"w-4 h-4 text-blue-500"})," 2. Aufgabenfelder & Schichten"]}),i.jsxs("button",{type:"button",onClick:Y,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-blue-500/10 text-blue-500 border border-blue-500/20 hover:bg-blue-500/20 transition flex items-center gap-1",children:[i.jsx(Zn,{className:"w-3.5 h-3.5"})," BEREICH HINZUFÜGEN"]})]}),_.map((x,$)=>i.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i.jsx("input",{type:"text",required:!0,placeholder:"Name des Aufgabenfeldes (z. B. Tresendienst)",value:x.name,onChange:I=>le($,"name",I.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field text-xs font-bold"}),i.jsx("button",{type:"button",onClick:()=>ae($),className:"p-1.5 text-muted hover:text-red-400 transition",title:"Bereich entfernen",children:i.jsx(cn,{className:"w-4 h-4"})})]}),i.jsxs("div",{className:"pl-3 border-l-2 border-grid space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between text-xs text-muted font-bold",children:[i.jsx("span",{children:"Schichten & Zeitfenster"}),i.jsxs("button",{type:"button",onClick:()=>ke($),className:"text-blue-500 hover:underline flex items-center gap-1",children:[i.jsx(Zn,{className:"w-3 h-3"})," Schicht hinzufügen"]})]}),x.shifts.map((I,K)=>i.jsxs("div",{className:"p-3 rounded-sm bg-surface border border-grid space-y-2",children:[i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-12 gap-2 items-center text-xs",children:[i.jsx("input",{type:"text",placeholder:"Titel",value:I.title,onChange:W=>Te($,K,"title",W.target.value),className:"sm:col-span-3 px-2.5 py-1 rounded-sm input-field text-xs"}),i.jsx("input",{type:"date",title:"Schichtdatum",min:d,max:y,value:I.date||d,onChange:W=>Te($,K,"date",W.target.value),className:"sm:col-span-3 px-2 py-1 rounded-sm input-field text-xs font-mono text-indigo-400 font-bold"}),i.jsx("input",{type:"text",placeholder:"Start (14:00)",value:I.start_time,onChange:W=>Te($,K,"start_time",W.target.value),className:"sm:col-span-2 px-2.5 py-1 rounded-sm input-field text-xs"}),i.jsx("input",{type:"text",placeholder:"Ende (18:00)",value:I.end_time,onChange:W=>Te($,K,"end_time",W.target.value),className:"sm:col-span-2 px-2.5 py-1 rounded-sm input-field text-xs"}),i.jsx("div",{className:"sm:col-span-1 flex items-center gap-1",children:i.jsx("input",{type:"number",min:"1",title:"Max. Plätze",value:I.max_participants,onChange:W=>Te($,K,"max_participants",parseInt(W.target.value)||1),className:"w-full px-1.5 py-1 rounded-sm input-field text-xs font-bold text-center"})}),i.jsx("button",{type:"button",onClick:()=>ue($,K),className:"sm:col-span-1 p-1 text-muted hover:text-red-400 text-center",title:"Schicht löschen",children:i.jsx(cn,{className:"w-3.5 h-3.5 mx-auto"})})]}),t&&t.length>0&&i.jsxs("div",{className:"pt-2 border-t border-grid flex flex-wrap items-center gap-1.5",children:[i.jsx("span",{className:"text-[10px] text-muted font-bold mr-1",children:"Erforderlich:"}),t.map(W=>{const ee=(I.required_skill_ids||[]).includes(W.id);return i.jsxs("button",{type:"button",onClick:()=>V($,K,W.id),style:{backgroundColor:ee?`${W.color}25`:"transparent",borderColor:ee?W.color:"var(--color-border-grid)",color:ee?W.color:"var(--color-text-muted)"},className:"px-2 py-0.5 rounded-sm text-[10px] border font-bold transition flex items-center gap-1",children:[i.jsx("span",{children:W.name}),ee&&i.jsx(Ln,{className:"w-3 h-3"})]},W.id)})]})]},K))]})]},$))]}),i.jsxs("div",{className:"flex items-center justify-between gap-3 pt-2 font-mono",children:[e&&l&&n&&(n.is_admin_user||n.is_staff||n.is_superuser||e.created_by===n.id||((U=e.created_by)==null?void 0:U.id)===n.id)?i.jsxs("button",{type:"button",onClick:()=>l(e),className:"px-4 py-2.5 rounded-sm text-xs font-bold bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/20 transition flex items-center gap-1.5",children:[i.jsx(cn,{className:"w-4 h-4"})," VERANSTALTUNG LÖSCHEN"]}):i.jsx("div",{}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("button",{type:"button",onClick:r,className:"px-5 py-2.5 rounded-sm text-xs font-semibold text-muted hover:bg-surface-hover transition border border-grid",children:"Abbrechen"}),i.jsxs("button",{type:"submit",disabled:E,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[i.jsx(Ln,{className:"w-4 h-4"}),E?"Speichern...":"Veranstaltung Speichern"]})]})]})]})]})}function qb({onBack:e,onInstantiateTemplate:t,user:n,skills:r}){const[s,l]=A.useState([]),[a,o]=A.useState(!0),[u,c]=A.useState(""),[f,g]=A.useState(null),[d,w]=A.useState(""),[y,N]=A.useState(new Date().toISOString().split("T")[0]),[R,v]=A.useState(new Date().toISOString().split("T")[0]),[h,m]=A.useState(""),[_,C]=A.useState(!1),[E,j]=A.useState(!1),[L,G]=A.useState(""),[P,Y]=A.useState(""),[ae,le]=A.useState([{name:"Tresendienst",description:"Getränkeausschank und Bar",shifts:[{title:"Frühschicht",start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]},{title:"Spätschicht",start_time:"22:00",end_time:"02:00",max_participants:3,required_skill_ids:[]}]}]);A.useEffect(()=>{ke()},[]);const ke=async()=>{o(!0);try{const x=await J("/templates/");l(x.results||x)}catch(x){c(x.message||"Laden der Vorlagen fehlgeschlagen.")}finally{o(!1)}},ue=x=>{g(x),w(x.name)},Te=async x=>{if(x.preventDefault(),!!f){C(!0);try{await t(f.id,{title:d,start_date:y,end_date:R,location:h})}catch($){c($.message||"Erstellen der Veranstaltung aus Vorlage fehlgeschlagen.")}finally{C(!1)}}},V=async x=>{if(x.preventDefault(),!L.trim()){c("Bitte gib einen Vorlagen-Namen an.");return}C(!0);try{const $={name:L,description:P,template_data:{task_areas:ae.map(I=>({name:I.name,description:I.description,shifts:(I.shifts||[]).map(K=>({title:K.title,start_time:K.start_time,end_time:K.end_time,max_participants:K.max_participants,required_skill_ids:K.required_skill_ids}))}))}};await J("/templates/",{method:"POST",body:JSON.stringify($)}),j(!1),G(""),Y(""),ke()}catch($){c($.message||"Erstellen der Vorlage fehlgeschlagen.")}finally{C(!1)}},M=()=>{le([...ae,{name:"Neuer Bereich",description:"",shifts:[{title:"Schicht 1",start_time:"14:00",end_time:"18:00",max_participants:2,required_skill_ids:[]}]}])},U=x=>{const $=[...ae];$[x].shifts.push({title:`Schicht ${$[x].shifts.length+1}`,start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]}),le($)};return i.jsxs("div",{className:"space-y-6 max-w-4xl mx-auto animate-in fade-in duration-200 font-sans",children:[i.jsxs("div",{className:"flex items-center justify-between font-mono text-xs",children:[i.jsxs("button",{onClick:e,className:"px-3.5 py-1.5 rounded-sm bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-2 font-bold",children:[i.jsx(Ug,{className:"w-4 h-4"})," [ ZURÜCK ZUR ÜBERSICHT ]"]}),i.jsxs("span",{className:"text-muted border border-grid px-2.5 py-0.5 rounded-sm uppercase",children:["SYSTEM VORLAGEN (",s.length,")"]})]}),i.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-4",children:i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-sm bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 flex items-center justify-center font-bold",children:i.jsx(ou,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:"Veranstaltungs-Vorlagen Zentrale"}),i.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Erstelle neue Veranstaltungen mit voreingestellten Schichten und Aufgabenbereichen"})]})]}),n&&i.jsxs("button",{onClick:()=>j(!E),className:"px-3.5 py-2 rounded-sm text-xs font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1.5 shrink-0",children:[i.jsx(Zn,{className:"w-4 h-4"}),E?"Schließen":"Neue Vorlage Erstellen"]})]})}),u&&i.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[i.jsx(Cl,{className:"w-4 h-4 shrink-0"}),i.jsx("span",{children:u})]}),E&&i.jsxs("form",{onSubmit:V,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs animate-in fade-in duration-200",children:[i.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-indigo-400 border-b border-grid pb-2 flex items-center justify-between",children:[i.jsx("span",{children:"Neue Vorlage mit voreingestellten Schichten anlegen"}),i.jsxs("button",{type:"button",onClick:M,className:"text-xs font-mono font-bold bg-indigo-500/20 text-indigo-300 px-3 py-1 rounded-sm border border-indigo-500/30 flex items-center gap-1",children:[i.jsx(Zn,{className:"w-3.5 h-3.5"})," Bereich Hinzufügen"]})]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Vorlagen Name"}),i.jsx("input",{type:"text",required:!0,placeholder:"z. B. Standard Kneipenabend / Bar-Event",value:L,onChange:x=>G(x.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm font-bold"})]}),i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Beschreibung (optional)"}),i.jsx("input",{type:"text",placeholder:"z. B. Inklusive 2 Barschichten und Aufbau",value:P,onChange:x=>Y(x.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]})]}),i.jsx("div",{className:"space-y-4 pt-2",children:ae.map((x,$)=>i.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx("input",{type:"text",required:!0,placeholder:"Bereichs-Name (z. B. Bar)",value:x.name,onChange:I=>{const K=[...ae];K[$].name=I.target.value,le(K)},className:"flex-1 px-3 py-1 rounded-sm input-field text-xs font-bold"}),i.jsx("button",{type:"button",onClick:()=>{le(ae.filter((I,K)=>K!==$))},className:"text-muted hover:text-red-400 p-1",children:i.jsx(cn,{className:"w-4 h-4"})})]}),i.jsxs("div",{className:"pl-3 border-l-2 border-grid space-y-2",children:[i.jsxs("div",{className:"flex items-center justify-between text-muted text-[11px] font-bold",children:[i.jsx("span",{children:"Voreingestellte Schichten"}),i.jsxs("button",{type:"button",onClick:()=>U($),className:"text-indigo-400 hover:underline flex items-center gap-1",children:[i.jsx(Zn,{className:"w-3 h-3"})," Schicht hinzufügen"]})]}),x.shifts.map((I,K)=>i.jsxs("div",{className:"p-2.5 rounded-sm bg-surface border border-grid grid grid-cols-1 sm:grid-cols-12 gap-2 items-center text-xs",children:[i.jsx("input",{type:"text",placeholder:"Schichtname",value:I.title,onChange:W=>{const ee=[...ae];ee[$].shifts[K].title=W.target.value,le(ee)},className:"sm:col-span-4 px-2 py-1 rounded-sm input-field text-xs"}),i.jsx("input",{type:"text",placeholder:"Start (18:00)",value:I.start_time,onChange:W=>{const ee=[...ae];ee[$].shifts[K].start_time=W.target.value,le(ee)},className:"sm:col-span-2 px-2 py-1 rounded-sm input-field text-xs"}),i.jsx("input",{type:"text",placeholder:"Ende (22:00)",value:I.end_time,onChange:W=>{const ee=[...ae];ee[$].shifts[K].end_time=W.target.value,le(ee)},className:"sm:col-span-2 px-2 py-1 rounded-sm input-field text-xs"}),i.jsxs("div",{className:"sm:col-span-3 flex items-center gap-1",children:[i.jsx("span",{className:"text-[10px] text-muted",children:"Plätze:"}),i.jsx("input",{type:"number",min:"1",value:I.max_participants,onChange:W=>{const ee=[...ae];ee[$].shifts[K].max_participants=parseInt(W.target.value)||1,le(ee)},className:"w-full px-2 py-1 rounded-sm input-field text-xs font-bold"})]}),i.jsx("button",{type:"button",onClick:()=>{const W=[...ae];W[$].shifts=W[$].shifts.filter((ee,Ae)=>Ae!==K),le(W)},className:"sm:col-span-1 p-1 text-muted hover:text-red-400 text-center",children:i.jsx(cn,{className:"w-3.5 h-3.5 mx-auto"})})]},K))]})]},$))}),i.jsxs("div",{className:"pt-3 flex justify-end gap-2 border-t border-grid",children:[i.jsx("button",{type:"button",onClick:()=>j(!1),className:"px-4 py-2 rounded-sm text-xs font-semibold text-muted hover:bg-surface-hover transition border border-grid",children:"Abbrechen"}),i.jsxs("button",{type:"submit",disabled:_,style:{backgroundColor:"var(--brand-primary)"},className:"px-5 py-2 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-1.5",children:[i.jsx(Ln,{className:"w-4 h-4"})," Vorlage Speichern"]})]})]}),i.jsxs("div",{className:"space-y-4 font-mono text-xs",children:[i.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main",children:"Verfügbare Vorlagen"}),a?i.jsx("div",{className:"hallmark-panel p-8 text-center text-muted",children:"Lade Vorlagen..."}):s.length===0?i.jsx("div",{className:"hallmark-panel p-8 text-center text-muted italic",children:'[ Noch keine Vorlagen gespeichert. Klicke oben auf "Neue Vorlage Erstellen" um Vorlagen mit voreingestellten Schichten anzulegen. ]'}):i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:s.map(x=>{var $;return i.jsxs("div",{onClick:()=>ue(x),className:`hallmark-panel p-5 rounded-sm border cursor-pointer transition space-y-3 ${(f==null?void 0:f.id)===x.id?"bg-indigo-500/10 border-indigo-500 shadow-md":"bg-surface border-grid hover:border-muted"}`,children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h4",{className:"font-serif text-base font-bold text-main uppercase",children:x.name}),(f==null?void 0:f.id)===x.id&&i.jsx("span",{className:"text-[10px] font-mono text-indigo-400 bg-indigo-500/20 px-2 py-0.5 rounded-sm border border-indigo-500/30 font-bold",children:"[ AUSGEWÄHLT ]"})]}),x.description&&i.jsx("p",{className:"text-xs font-sans text-muted",children:x.description}),(($=x.template_data)==null?void 0:$.task_areas)&&x.template_data.task_areas.length>0&&i.jsxs("div",{className:"space-y-2 pt-2 border-t border-grid text-[11px]",children:[i.jsx("div",{className:"font-bold text-muted uppercase text-[10px]",children:"📌 Voreingestellte Schichten:"}),x.template_data.task_areas.map((I,K)=>{var W;return i.jsxs("div",{className:"bg-subtle p-2 rounded-sm border border-grid space-y-1",children:[i.jsxs("div",{className:"font-bold text-main flex items-center justify-between",children:[i.jsx("span",{children:I.name}),i.jsxs("span",{className:"text-[10px] text-muted font-normal",children:[((W=I.shifts)==null?void 0:W.length)||0," Schichten"]})]}),i.jsx("div",{className:"flex flex-wrap gap-1",children:(I.shifts||[]).map((ee,Ae)=>i.jsxs("span",{className:"px-2 py-0.5 rounded-sm bg-surface border border-grid text-[10px] flex items-center gap-1 font-mono",children:[i.jsx(Vi,{className:"w-3 h-3 text-muted shrink-0"}),i.jsx("strong",{className:"text-main",children:ee.title}),i.jsxs("span",{className:"text-muted",children:["(",ee.start_time,"-",ee.end_time,", ",ee.max_participants," Plätze)"]})]},Ae))})]},K)})]}),i.jsxs("div",{className:"text-[10px] text-muted pt-2 border-t border-grid flex items-center justify-between",children:[i.jsxs("span",{children:["Erstellt von: ",i.jsx("strong",{children:x.created_by_name||"Admin"})]}),i.jsx("span",{className:"text-indigo-400 font-bold",children:"Klick zum Auswählen"})]})]},x.id)})})]}),f&&i.jsxs("form",{onSubmit:Te,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs animate-in fade-in duration-200",children:[i.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-indigo-400 border-b border-grid pb-2",children:['Neue Veranstaltung aus Vorlage "',f.name,'" Erstellen']}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Titel der Veranstaltung"}),i.jsx("input",{type:"text",required:!0,value:d,onChange:x=>w(x.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm font-bold"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Startdatum"}),i.jsx("input",{type:"date",required:!0,value:y,onChange:x=>N(x.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Enddatum"}),i.jsx("input",{type:"date",required:!0,value:R,onChange:x=>v(x.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("label",{className:"block text-main mb-1 font-bold",children:"Ort (optional)"}),i.jsx("input",{type:"text",value:h,onChange:x=>m(x.target.value),placeholder:"z. B. Großer Saal",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]})]}),i.jsx("div",{className:"pt-3 flex justify-end border-t border-grid",children:i.jsxs("button",{type:"submit",disabled:_,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[i.jsx(uy,{className:"w-4 h-4 fill-white"}),_?"Erstellen...":"Veranstaltung Jetzt Aus Vorlage Erstellen"]})})]})]})}function Qb(){const[e,t]=A.useState(null),[n,r]=A.useState(null),[s,l]=A.useState([]),[a,o]=A.useState([]),[u,c]=A.useState(null),[f,g]=A.useState(null),[d,w]=A.useState(!0),[y,N]=A.useState("home"),[R,v]=A.useState(!1),[h,m]=A.useState(!1),[_,C]=A.useState(null),[E,j]=A.useState(!1),[L,G]=A.useState(!1),[P,Y]=A.useState(localStorage.getItem("theme_mode")||"auto"),[ae,le]=A.useState(null),[ke,ue]=A.useState(null);A.useEffect(()=>{window.addEventListener("beforeinstallprompt",z=>{z.preventDefault(),ue(z)}),$()},[]),A.useEffect(()=>{localStorage.setItem("theme_mode",P);const z=()=>{let q=P;P==="auto"&&(q=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",q)};if(z(),P==="auto"){const q=window.matchMedia("(prefers-color-scheme: dark)"),Ee=()=>z();return q.addEventListener("change",Ee),()=>q.removeEventListener("change",Ee)}},[P]),A.useEffect(()=>{n!=null&&n.primary_color&&(document.documentElement.style.setProperty("--brand-primary",n.primary_color),document.documentElement.style.setProperty("--brand-secondary",n.secondary_color||n.primary_color))},[n]);const[Te,V]=A.useState(null),[M,U]=A.useState(null),x=z=>{le(z),setTimeout(()=>le(null),5e3)},$=async()=>{w(!0);try{try{const xe=await J("/branding/");r(xe)}catch{}if(wd())try{const xe=await J("/users/me/");t(xe),!xe.is_admin_user&&!xe.is_staff&&!xe.is_superuser&&y==="admin"&&N("home")}catch{hl(null),t(null),N("home")}const z=new URLSearchParams(window.location.search),q=z.get("verify_email");if(q)try{const xe=await J("/users/verify-email/",{method:"POST",body:JSON.stringify({token:q})});hl(xe.token),t(xe.user),x(xe.message||"✅ E-Mail-Adresse erfolgreich bestätigt!"),window.history.replaceState({},document.title,window.location.pathname)}catch(xe){x(`⚠️ E-Mail Bestätigung: ${xe.message}`)}const Ee=z.get("claim_token"),en=z.get("guest_name");Ee&&en&&(V(Ee),U(en),wd()||v(!0)),await K(),await W()}catch(z){console.error(z)}finally{w(!1)}},I=async z=>{try{const q=await J(`/users/signups/${z.id}/generate-claim-link/`,{method:"POST"}),Ee=`${window.location.origin}/?claim_token=${q.token}&guest_name=${encodeURIComponent(q.guest_name)}`;navigator.clipboard?(await navigator.clipboard.writeText(Ee),x(`✅ Einladungs-Link für ${q.guest_name} in Zwischenablage kopiert!`)):prompt(`Einladungs-Link für ${q.guest_name} kopieren:`,Ee)}catch(q){alert(q.message||"Fehler beim Erstellen des Links.")}},K=async()=>{try{const z=await J("/skills/");l(z.results||z)}catch{}},W=async()=>{try{const z=await J("/events/"),q=z.results||z;o(q),q.length>0&&!u?(c(q[0].id),ee(q[0].id)):u&&ee(u)}catch{}},ee=async z=>{try{const q=await J(`/events/${z}/matrix/`);g(q)}catch{}},Ae=z=>{c(z),ee(z),N("schedule")},gt=()=>{hl(null),t(null),N("home"),x("Erfolgreich abgemeldet."),u&&ee(u)},Dn=(z,q)=>{t(z),z&&!z.is_admin_user&&!z.is_staff&&!z.is_superuser&&y==="admin"&&N("home"),x(q||"Erfolgreich angemeldet!"),u&&ee(u)},F=async z=>{if(!e)C(z),m(!0);else try{const q=await J(`/shifts/${z.id}/signup/`,{method:"POST"});x(q.message||"Erfolgreich für Schicht eingetragen!"),u&&ee(u)}catch(q){x(`Fehler: ${q.message}`)}},be=async z=>{if(!_)return;const q=await J(`/shifts/${_.id}/signup/`,{method:"POST",body:JSON.stringify(z)});x(q.message||"Als Gast eingetragen!"),u&&ee(u)},_t=async z=>{try{const q=await J(`/shifts/${z.id}/signup/`,{method:"DELETE"});x(q.message||"Eintragung storniert."),u&&ee(u)}catch(q){x(`Fehler: ${q.message}`)}},rr=async z=>{if(!(!z||!z.id)&&window.confirm(`Möchtest du die Veranstaltung "${z.title}" und alle zugehörigen Schichten wirklich unwiderruflich löschen?`))try{await J(`/events/${z.id}/`,{method:"DELETE"}),x(`Veranstaltung "${z.title}" wurde erfolgreich gelöscht.`),u===z.id&&c(null),y==="event-editor"&&N("home"),W()}catch(q){x(`Fehler beim Löschen: ${q.message}`)}},[zn,yn]=A.useState(null),Nr=async z=>{let q=z.id;q?await J(`/events/${q}/`,{method:"PATCH",body:JSON.stringify({title:z.title,description:z.description,location:z.location,start_date:z.start_date,end_date:z.end_date,co_manager_ids:z.co_manager_ids||[]})}):q=(await J("/events/",{method:"POST",body:JSON.stringify({title:z.title,description:z.description,location:z.location,start_date:z.start_date,end_date:z.end_date,co_manager_ids:z.co_manager_ids||[]})})).id;for(let Ee of z.task_areas){if(!Ee.name)continue;let en=Ee.id;en?await J(`/task-areas/${en}/`,{method:"PATCH",body:JSON.stringify({name:Ee.name,description:Ee.description||""})}):en=(await J("/task-areas/",{method:"POST",body:JSON.stringify({event:q,name:Ee.name,description:Ee.description||""})})).id;for(let xe of Ee.shifts){const In=xe.date||z.start_date;xe.id?await J(`/shifts/${xe.id}/`,{method:"PATCH",body:JSON.stringify({title:xe.title,date:In,start_time:xe.start_time,end_time:xe.end_time,max_participants:xe.max_participants,required_skill_ids:xe.required_skill_ids||[]})}):await J("/shifts/",{method:"POST",body:JSON.stringify({task_area:en,title:xe.title,date:In,start_time:xe.start_time,end_time:xe.end_time,max_participants:xe.max_participants,required_skill_ids:xe.required_skill_ids||[]})})}}x(z.id?"Veranstaltung & Schichten aktualisiert!":"Veranstaltung erfolgreich erstellt!"),await W(),Ae(q)},nt=async(z,q)=>{const Ee=await J(`/templates/${z}/instantiate/`,{method:"POST",body:JSON.stringify(q)});x("Veranstaltung aus Vorlage erstellt!"),await W(),Ee.id&&Ae(Ee.id)},rt=()=>{u&&window.open(`/api/events/${u}/export_pdf/`,"_blank")},Ds=()=>{window.print()},zs=()=>{ke&&(ke.prompt(),ke.userChoice.then(z=>{z.outcome==="accepted"&&x("PWA Installation gestartet!"),ue(null)}))};return i.jsxs("div",{className:"min-h-screen bg-canvas text-main flex flex-col font-sans selection:bg-surface-hover transition-colors duration-200",children:[ae&&i.jsxs("div",{className:"fixed bottom-6 right-6 z-50 bg-emerald-600 text-white px-4 py-2.5 rounded-sm shadow-2xl font-mono text-xs flex items-center gap-2 border border-emerald-400 animate-in fade-in slide-in-from-bottom-3 duration-200",children:[i.jsx(Ln,{className:"w-4 h-4"}),i.jsx("span",{children:ae})]}),i.jsx(vy,{branding:n,user:e,activeTab:y,onChangeTab:N,themeMode:P,onChangeThemeMode:Y,onLogout:gt,onOpenAuth:()=>v(!0),onOpenCreateEvent:()=>{yn(null),N("event-editor")},onOpenTemplates:()=>N("templates"),onOpenProfile:()=>G(!0),onOpenAdmin:()=>N("admin"),pwaInstallPrompt:!!ke,onInstallPwa:zs}),i.jsx("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:d?i.jsx("div",{className:"hallmark-panel p-16 text-center text-xs text-muted font-mono border border-grid",children:"Lade Daten..."}):y==="home"?i.jsx(Hb,{events:a,user:e,onSelectEvent:Ae,onOpenCreateEvent:()=>{yn(null),N("event-editor")},onToggleEventActive:async z=>{try{await J(`/events/${z.id}/`,{method:"PATCH",body:JSON.stringify({is_active:z.is_active===!1})}),W()}catch(q){alert(q.message||"Aktion fehlgeschlagen.")}},onEditEvent:z=>{yn(z),N("event-editor")},onDeleteEvent:rr,branding:n}):y==="calendar"?i.jsx(Kb,{events:a,onSelectEvent:Ae,branding:n}):y==="admin"&&e&&(e.is_admin_user||e.is_staff||e.is_superuser)?i.jsx(Wb,{branding:n,onRefreshBranding:async()=>{const z=await J("/branding/");r(z)},onRefreshEvents:W,skills:s,onRefreshSkills:K}):y==="event-editor"?i.jsx(Gb,{eventToEdit:zn,skills:s,user:e,onBack:()=>N("schedule"),onSubmit:Nr,onDeleteEvent:rr}):y==="templates"?i.jsx(qb,{onBack:()=>N("schedule"),onInstantiateTemplate:nt,user:e,skills:s}):i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between gap-4 overflow-x-auto pb-2 no-scrollbar font-mono",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xs font-bold text-muted uppercase tracking-wider whitespace-nowrap",children:"Ausgewähltes Event:"}),a.map(z=>{const q=u===z.id;return i.jsx("button",{onClick:()=>Ae(z.id),style:{backgroundColor:q?(n==null?void 0:n.primary_color)||"var(--brand-primary)":void 0,borderColor:q?(n==null?void 0:n.primary_color)||"var(--brand-primary)":void 0},className:`px-3.5 py-1.5 rounded-sm text-xs font-bold transition whitespace-nowrap border ${q?"text-white shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:z.title},z.id)})]}),e&&i.jsxs("button",{onClick:()=>{yn(null),N("event-editor")},className:"px-3.5 py-1.5 rounded-sm text-xs font-bold bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 shrink-0",children:[i.jsx(Zn,{className:"w-4 h-4"})," Neues Event"]})]}),i.jsx(xy,{event:f,user:e,onSignupClick:F,onCancelClick:_t,onEditEvent:z=>{yn(z),N("event-editor")},onDeleteEvent:rr,onRemoveUserFromShift:async(z,q)=>{try{const Ee=await J(`/shifts/${z.id}/signup/${q}/`,{method:"DELETE"});x(Ee.message||"Eintragung entfernt."),W(),u&&Ae(u)}catch(Ee){alert(Ee.message||"Entfernen der Person fehlgeschlagen.")}},onGenerateClaimLink:I,onExportPdf:rt,onPrintView:Ds})]})}),i.jsx("footer",{className:"border-t border-grid py-6 text-center text-xs text-muted font-mono no-print",children:i.jsxs("p",{children:[(n==null?void 0:n.app_name)||"Veranstaltungsschichtplaner"," • PWA Enabled • PostgreSQL & Docker Ready"]})}),R&&i.jsx(Bb,{onClose:()=>{v(!1),V(null),U(null)},onSuccess:Dn,claimToken:Te,prefilledGuestName:M}),h&&i.jsx(Fb,{shift:_,onClose:()=>m(!1),onSubmit:be})]})}ic.createRoot(document.getElementById("root")).render(i.jsx(Si.StrictMode,{children:i.jsx(Qb,{})}));
|